Merge branch 'master' of github.com:GridSpace/grid-apps
This commit is contained in:
commit
fae69bbf81
5 changed files with 26 additions and 11 deletions
|
|
@ -85,6 +85,9 @@
|
|||
}
|
||||
|
||||
addPolys(polys, options) {
|
||||
if (options && options.clean) {
|
||||
polys = polys.map(p => p.clean());
|
||||
}
|
||||
if (options && options.flat) {
|
||||
return this.addFlats(polys, options);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ let BASE = self.base,
|
|||
KIRI = self.kiri,
|
||||
UTIL = BASE.util,
|
||||
time = UTIL.time,
|
||||
qtpi = Math.cos(Math.PI/4),
|
||||
current = self.worker = {
|
||||
print: null,
|
||||
snap: null
|
||||
|
|
@ -122,6 +123,9 @@ KIRI.worker = {
|
|||
let ypos = settings.device.bedDepth / 2 + track.pos.y + miny;
|
||||
let rotation = (Math.PI / 180) * 45;
|
||||
|
||||
// move to accomodate anchor
|
||||
ypos += (settings.process.firstLayerBeltLead || 0);
|
||||
|
||||
widget.rotate(rotation,0,0,true);
|
||||
let minr = gmin(group);
|
||||
widget.belt = { xpos, ypos, yadd: minr.maxy - minr.miny };
|
||||
|
|
@ -147,6 +151,8 @@ KIRI.worker = {
|
|||
let { dy, dz } = widget.track.center;
|
||||
widget.groupBounds();
|
||||
let { xpos, ypos } = widget.belt;
|
||||
// move to accomodate anchor
|
||||
dy -= (settings.process.firstLayerBeltLead || 0) ;
|
||||
widget.rotinfo = { angle: 45, dy, dz, xpos, ypos };
|
||||
for (let others of group.slice(1)) {
|
||||
others.rotinfo = widget.rotinfo;
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@
|
|||
// output seek to start point between mesh slices if previous data
|
||||
printPoint = print.slicePrintPath(
|
||||
slice,
|
||||
slice.belt && slice.belt.touch ? newPoint(-wtb.w, wtb.d * 2, 0) : printPoint.sub(offset),
|
||||
slice.belt && slice.belt.touch ? newPoint(-5000, 0, 0) : printPoint.sub(offset),
|
||||
offset,
|
||||
layerout,
|
||||
{
|
||||
|
|
|
|||
|
|
@ -339,7 +339,7 @@
|
|||
maxx = Math.max(maxx, poly.bounds.maxx);
|
||||
}
|
||||
}
|
||||
if (Math.abs(slice.belt.miny - smin) < 0.001) {
|
||||
if (Math.abs(slice.belt.miny - smin) < 0.01) {
|
||||
slice.belt.touch = true;
|
||||
if (!start) start = slice;
|
||||
}
|
||||
|
|
@ -350,6 +350,12 @@
|
|||
while (start.up && start.topShells().length === 0) {
|
||||
start = start.up;
|
||||
}
|
||||
// if a brim applies, add that width to anchor
|
||||
let brim = getRangeParameters(settings, 0).firstLayerBrim || 0;
|
||||
if (brim) {
|
||||
minx -= brim;
|
||||
maxx += brim;
|
||||
}
|
||||
while (offset && start && offset >= sliceHeight) {
|
||||
let addto = start.down;
|
||||
if (!addto) {
|
||||
|
|
@ -478,7 +484,7 @@
|
|||
|
||||
if (top.shells) output
|
||||
.setLayer("shells", isSynth ? COLOR.support : COLOR.shell)
|
||||
.addPolys(top.shells, vopt({ offset, height }));
|
||||
.addPolys(top.shells, vopt({ offset, height, clean: true }));
|
||||
|
||||
if (top.gaps) output
|
||||
.setLayer("gaps", COLOR.gaps)
|
||||
|
|
|
|||
Loading…
Reference in a new issue