remove gcode int/ext macros (unused) and repurpose type system to identify features in gcode output

This commit is contained in:
Stewart Allen 2022-01-31 09:33:10 -05:00
commit 9fd74cb27f
5 changed files with 13 additions and 25 deletions

View file

@ -26,8 +26,6 @@
gcodeFan = device.gcodeFan,
gcodeLayer = device.gcodeLayer,
gcodeTrack = device.gcodeTrack,
gcodeExt = device.gcodeExt,
gcodeInt = device.gcodeInt,
zMoveMax = device.deviceZMax || 0,
tool = 0,
fwRetract = device.fwRetract,
@ -576,16 +574,9 @@
}
}
// emit gcode macro for changed print region
// emit comment on output type chage
if (last && out.type !== last.type) {
switch (out.type) {
case 'ext':
appendAllSub(gcodeExt);
break;
case 'int':
appendAllSub(gcodeInt);
break;
}
append(`; feature ${out.type}`);
lastType = out.type;
}

View file

@ -164,6 +164,8 @@
z: firstLayerHeight / 2
});
print.setType('brim');
// output brim points
let brimStart = offset < nozzle * 2 ? newPoint(-bedWidth, -bedDepth, 0) : printPoint;
printPoint = print.poly2polyEmit(polys, brimStart, (poly, index, count, startPoint) => {
@ -345,6 +347,7 @@
let wipe = true;
lastPurgeTool = tool;
if (rec) {
print.setType('purge tower');
if (layer.last()) {
layer.last().retract = true;
}
@ -513,6 +516,7 @@
let wtb = slice.widget.track.box;
let beltStart = slice.belt && slice.belt.touch;// && (widgets.length === 1);
// output seek to start point between mesh slices if previous data
print.setType('layer');
printPoint = print.slicePrintPath(
slice,
beltStart ? newPoint(-5000, 5000, 0) : printPoint.sub(offset),