Skip to content

Commit

Permalink
add minx, maxx, miny, maxy to macro substitution
Browse files Browse the repository at this point in the history
  • Loading branch information
stewartoallen committed Nov 8, 2021
1 parent 8739011 commit 62e2c69
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/mode/fdm/export.js
Expand Up @@ -73,7 +73,10 @@
arcDev = 0.5,
arcMax = 40,
originCenter = process.outputOriginCenter || device.bedRound,
offset = originCenter ? null : {
offset = originCenter ? {
x: 0,
y: 0
} : {
x: device.bedWidth/2,
y: isBelt ? 0 : device.bedDepth/2
},
Expand All @@ -84,7 +87,12 @@
lastNozzleTemp = nozzleTemp,
lastBedTemp = bedTemp,
lastFanSpeed = fanSpeed,
bounds = settings.bounds,
subst = {
minx: bounds.min.x + offset.x,
maxx: bounds.max.x + offset.x,
miny: bounds.min.y + offset.y,
maxy: bounds.max.y + offset.y,
travel_speed: seekMMM,
retract_speed: retSpeed,
retract_distance: retDist,
Expand All @@ -93,10 +101,10 @@
bed_temp: bedTemp,
fan_speed: fanSpeed,
speed: fanSpeed, // legacy
top: offset ? device.bedDepth : device.bedDepth/2,
left: offset ? 0 : -device.bedWidth/2,
right: offset ? device.bedWidth : device.bedWidth/2,
bottom: offset ? 0 : -device.bedDepth/2,
top: offset.x ? device.bedDepth : device.bedDepth/2,
left: offset.x ? 0 : -device.bedWidth/2,
right: offset.x ? device.bedWidth : device.bedWidth/2,
bottom: offset.x ? 0 : -device.bedDepth/2,
z_max: device.maxHeight,
layers: layers.length,
progress: 0,
Expand Down

0 comments on commit 62e2c69

Please sign in to comment.