add standalone slicing engine / api
This commit is contained in:
parent
15cfa5fa0a
commit
f8c8f73349
5 changed files with 54 additions and 8 deletions
|
|
@ -45,6 +45,21 @@
|
|||
isThin = settings.controller.lineType === "line",
|
||||
isFlat = settings.controller.lineType === "flat";
|
||||
|
||||
// compute bounds if missing
|
||||
if (!bounds) {
|
||||
bounds = new THREE.Box3();
|
||||
for (let widget of widgets) {
|
||||
let wp = widget.track.pos;
|
||||
let wb = widget.bounds.clone();
|
||||
wb.min.x += wp.x;
|
||||
wb.max.x += wp.x;
|
||||
wb.min.y += wp.y;
|
||||
wb.max.y += wp.y;
|
||||
bounds.union(wb);
|
||||
}
|
||||
settings.bounds = bounds;
|
||||
}
|
||||
|
||||
// TODO pick a widget with a slice on the first layer and use that nozzle
|
||||
// create brim, skirt, raft if specificed in FDM mode (code shared by laser)
|
||||
if (process.outputBrimCount || process.outputRaft) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue