avoid chcek if no relevant solid tops

This commit is contained in:
Stewart Allen 2022-02-27 15:32:19 -05:00
commit 86166bd3ba

View file

@ -1165,6 +1165,7 @@ function doSolidsFill(slice, spacing, angle, minArea, fillQ) {
stop.push(solid); stop.push(solid);
} }
} }
if (stop.length) {
let top_area = top.poly.areaDeep(); let top_area = top.poly.areaDeep();
let stop_area = stop.map(p => p.areaDeep()).reduce((a,v) => a + v); let stop_area = stop.map(p => p.areaDeep()).reduce((a,v) => a + v);
if (stop_area / top_area > 0.5) { if (stop_area / top_area > 0.5) {
@ -1172,6 +1173,7 @@ function doSolidsFill(slice, spacing, angle, minArea, fillQ) {
} }
} }
} }
}
// if 50% of top is filled with solids, trigger layer conversion to solid // if 50% of top is filled with solids, trigger layer conversion to solid
// in future, this should be limited to a specific top, not entire layer // in future, this should be limited to a specific top, not entire layer
if (make_solid_layer) { if (make_solid_layer) {