update thin wall comments, enable for local mode testing
This commit is contained in:
parent
d19e2d01ea
commit
5df89763b0
6 changed files with 33 additions and 15 deletions
|
|
@ -531,7 +531,7 @@
|
|||
let circ1 = sumCirc(orig),
|
||||
circ2 = sumCirc(polys),
|
||||
diff = Math.abs(1 - (circ1 / circ2));
|
||||
|
||||
// if circularity of original and offset differ, possible wall gaps
|
||||
if (diff > 0.2) {
|
||||
thins(orig, out.length ? polys : null, diff, -over);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1512,8 +1512,8 @@
|
|||
zHopDistance: UC.newInput(LANG.ad_zhop_s, {title:LANG.ad_zhop_l, bound:UC.bound(0,3.0), convert:UC.toFloat, modes:FDM, expert:true}),
|
||||
antiBacklash: UC.newInput(LANG.ad_abkl_s, {title:LANG.ad_abkl_l, bound:UC.bound(0,3), convert:UC.toInt, modes:FDM, expert:true}),
|
||||
sliceRotation: LOCAL ? UC.newInput(LANG.ad_slrt_s, {title:LANG.ad_slrt_l, bound:UC.bound(-45,45), convert:UC.toFloat, modes:FDM, expert:true}) : null,
|
||||
// detectThinWalls: UC.newBoolean("thin wall fill", onBooleanClick, {title: "detect and fill thin openings\nbetween shells walls", modes:FDM, expert:true})
|
||||
gcodePauseLayers: UC.newInput(LANG.ag_paws_s, {title:LANG.ag_paws_l, modes:FDM, expert:true, comma:true}),
|
||||
detectThinWalls: LOCAL ? UC.newBoolean(LANG.ad_thin_s, onBooleanClick, {title: LANG.ad_thin_l, modes:FDM, expert:true}) : null,
|
||||
outputLayerRetract: UC.newBoolean(LANG.ad_lret_s, onBooleanClick, {title:LANG.ad_lret_l, modes:FDM, expert:true}),
|
||||
|
||||
// SLA
|
||||
|
|
|
|||
|
|
@ -358,20 +358,21 @@
|
|||
}
|
||||
|
||||
if (count) {
|
||||
// permit offset of 0 for laser
|
||||
// permit offset of 0 for laser and drag knife
|
||||
if (offset1 === 0 && count === 1) {
|
||||
last = top_poly.clone(true);
|
||||
top.traces = last;
|
||||
} else {
|
||||
if (opt.thin) {
|
||||
// thin wall offset strategy
|
||||
let on1s2 = offset1 * 2,
|
||||
on2s2 = offsetN * 2;
|
||||
POLY.expand2(
|
||||
top_poly,
|
||||
-offset1,
|
||||
-offsetN,
|
||||
top.traces,
|
||||
count,
|
||||
top_poly, // reference polygon(s)
|
||||
-offset1, // first inset distance
|
||||
-offsetN, // subsequent inset distnace
|
||||
top.traces, // accumulator array
|
||||
count, // numberof insets to perform
|
||||
// on each new offset trace ...
|
||||
function(polys, countNow) {
|
||||
last = polys;
|
||||
|
|
@ -385,6 +386,10 @@
|
|||
});
|
||||
},
|
||||
// thin wall probe
|
||||
// p1 = original polys
|
||||
// p2 = collected polys
|
||||
// diff = circularity difference
|
||||
// dist = over-expansion distance
|
||||
function(p1, p2, diff, dist) {
|
||||
if (p2) {
|
||||
// nth offset
|
||||
|
|
@ -405,13 +410,14 @@
|
|||
},
|
||||
z);
|
||||
} else {
|
||||
// standard wall offsetting strategy
|
||||
POLY.expand(
|
||||
top_poly,
|
||||
-offset1,
|
||||
z,
|
||||
top.traces,
|
||||
count,
|
||||
-offsetN,
|
||||
top_poly, // reference polygon(s)
|
||||
-offset1, // first inset distance
|
||||
z, // set new polys to this z
|
||||
top.traces, // accumulator array
|
||||
count, // number of insets to perform
|
||||
-offsetN, // subsequent inset distance
|
||||
// on each new offset trace ...
|
||||
function(polys, countNow) {
|
||||
last = polys;
|
||||
|
|
@ -427,6 +433,7 @@
|
|||
}
|
||||
}
|
||||
} else {
|
||||
// no shells, just infill, is permitted
|
||||
last = [top.poly];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@
|
|||
) && !vaseMode;
|
||||
slice.doShells(spro.sliceShells, firstOffset, shellOffset, fillOffset, {
|
||||
vase: vaseMode,
|
||||
thin: false && spro.detectThinWalls
|
||||
thin: spro.detectThinWalls
|
||||
});
|
||||
if (solid) slice.doSolidLayerFill(fillSpacing, sliceFillAngle);
|
||||
sliceFillAngle += 90.0;
|
||||
|
|
@ -192,6 +192,11 @@
|
|||
slice.doThinFill(fillSpacing, sliceFillAngle);
|
||||
sliceFillAngle += 90.0;
|
||||
}, "solids");
|
||||
} else if (spro.detectThinWalls) {
|
||||
forSlices(0.35, 0.5, function(slice) {
|
||||
slice.doThinFill(fillSpacing, sliceFillAngle);
|
||||
sliceFillAngle += 90.0;
|
||||
}, "thins");
|
||||
}
|
||||
|
||||
// calculations only relevant when supports are enabled
|
||||
|
|
|
|||
Loading…
Reference in a new issue