mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-22 05:37:55 +01:00
parent
1107353290
commit
f032d8c267
@ -22,16 +22,14 @@ export default function generateSupport(slices, settings) {
|
||||
|
||||
let supportArea = new Shape([], true);
|
||||
|
||||
for (let layer = slices.length - 1 - supportDistanceLayers; layer >= supportDistanceLayers; layer --) {
|
||||
for (let layer = slices.length - 1 - supportDistanceLayers; layer >= 0; layer --) {
|
||||
const currentLayer = slices[layer + supportDistanceLayers - 1];
|
||||
const upSkin = slices[layer + supportDistanceLayers];
|
||||
const downSkin = slices[layer - supportDistanceLayers];
|
||||
|
||||
const neededSupportArea = upSkin.outline.difference(currentLayer.outline.offset(margin));
|
||||
|
||||
if (neededSupportArea.totalArea() * PRECISION_SQUARED > minArea) {
|
||||
supportArea = supportArea.union(neededSupportArea);
|
||||
}
|
||||
if (neededSupportArea.totalArea() * PRECISION_SQUARED > minArea) supportArea = supportArea.union(neededSupportArea);
|
||||
if (downSkin) supportArea = supportArea.difference(downSkin.outline.offset(margin));
|
||||
|
||||
const bounds = supportArea.shapeBounds();
|
||||
|
Loading…
Reference in New Issue
Block a user