create proper Output class. clone brim to current z when output
This commit is contained in:
parent
993364543d
commit
1e1f47868d
2 changed files with 25 additions and 10 deletions
|
|
@ -570,7 +570,9 @@
|
||||||
// draft shield
|
// draft shield
|
||||||
if (layerno > 0 && brimout && draftShield) {
|
if (layerno > 0 && brimout && draftShield) {
|
||||||
print.setType('brim');
|
print.setType('brim');
|
||||||
print.addPrintPoints(brimout, layerout, null);
|
print.addPrintPoints(brimout.map(o => o.clone(printPoint.z)), layerout, null);
|
||||||
|
layerout.last().retract = true;
|
||||||
|
printPoint = layerout.last().point;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if a declared extruder isn't used in a layer, use selected
|
// if a declared extruder isn't used in a layer, use selected
|
||||||
|
|
|
||||||
|
|
@ -413,15 +413,28 @@
|
||||||
return a !== undefined ? a : b;
|
return a !== undefined ? a : b;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
class Output {
|
||||||
* @constructor
|
constructor(point, emit, speed, tool, type) {
|
||||||
*/
|
this.point = point; // point to emit
|
||||||
function Output(point, emit, speed, tool, type) {
|
this.emit = emit; // emit (feed for printers, power for lasers, cut for cam)
|
||||||
this.point = point; // point to emit
|
this.speed = speed;
|
||||||
this.emit = emit; // emit (feed for printers, power for lasers, cut for cam)
|
this.tool = tool;
|
||||||
this.speed = speed;
|
this.type = type;
|
||||||
this.tool = tool;
|
}
|
||||||
this.type = type;
|
|
||||||
|
clone(z) {
|
||||||
|
let o = new Output(
|
||||||
|
this.point.clone(),
|
||||||
|
this.emit,
|
||||||
|
this.speed,
|
||||||
|
this.tool,
|
||||||
|
this.type
|
||||||
|
);
|
||||||
|
if (z !== undefined) {
|
||||||
|
o.point.setZ(z);
|
||||||
|
}
|
||||||
|
return o;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setType(type) {
|
function setType(type) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue