complete line type support
This commit is contained in:
parent
f30e3a0288
commit
ed0a831332
8 changed files with 39 additions and 32 deletions
|
|
@ -42,7 +42,8 @@
|
|||
slices = [],
|
||||
sliceEntry,
|
||||
print = self.worker.print = KIRI.newPrint(settings, widgets),
|
||||
isThin = settings.controller.thinRender;
|
||||
isThin = settings.controller.lineType === "line",
|
||||
isFlat = settings.controller.lineType === "flat";
|
||||
|
||||
// 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)
|
||||
|
|
@ -376,7 +377,7 @@
|
|||
print.output = output;
|
||||
print.render = FDM.prepareRender(output, progress => {
|
||||
update(0.5 + progress * 0.5);
|
||||
}, { tools: device.extruders, thin: isThin });
|
||||
}, { tools: device.extruders, thin: isThin, flat: isFlat });
|
||||
|
||||
return print.render;
|
||||
};
|
||||
|
|
@ -507,7 +508,7 @@
|
|||
.addPolys(moves, { thin: true, z: opts.z });
|
||||
Object.values(prints).forEach(array => {
|
||||
array.forEach(poly => {
|
||||
if (poly.appearsClosed()) {
|
||||
if (flat && poly.appearsClosed()) {
|
||||
poly.setClosed();
|
||||
poly.points.pop();
|
||||
poly.length--;
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@
|
|||
sliceFillAngle = spro.sliceFillAngle,
|
||||
view = widget.mesh && widget.mesh.newGroup ? widget.mesh.newGroup() : null;
|
||||
|
||||
isFlat = false;
|
||||
isThin = !isFlat && settings.controller.thinRender;
|
||||
isFlat = settings.controller.lineType === "flat";
|
||||
isThin = !isFlat && settings.controller.lineType === "line";
|
||||
offset = nozzleSize / 2;
|
||||
|
||||
if (isFlat) {
|
||||
|
|
@ -84,7 +84,13 @@
|
|||
color.line = 1
|
||||
color.opacity = 0.5;
|
||||
});
|
||||
};
|
||||
} else {
|
||||
Object.values(COLOR).forEach(color => {
|
||||
color.flat = false;
|
||||
color.line = 1
|
||||
color.opacity = 1;
|
||||
});
|
||||
}
|
||||
|
||||
if (!(sliceHeight > 0 && sliceHeight < 100)) {
|
||||
return ondone("invalid slice height");
|
||||
|
|
|
|||
Loading…
Reference in a new issue