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
|
||||
if (layerno > 0 && brimout && draftShield) {
|
||||
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
|
||||
|
|
|
|||
|
|
@ -413,15 +413,28 @@
|
|||
return a !== undefined ? a : b;
|
||||
}
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function Output(point, emit, speed, tool, type) {
|
||||
this.point = point; // point to emit
|
||||
this.emit = emit; // emit (feed for printers, power for lasers, cut for cam)
|
||||
this.speed = speed;
|
||||
this.tool = tool;
|
||||
this.type = type;
|
||||
class Output {
|
||||
constructor(point, emit, speed, tool, type) {
|
||||
this.point = point; // point to emit
|
||||
this.emit = emit; // emit (feed for printers, power for lasers, cut for cam)
|
||||
this.speed = speed;
|
||||
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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue