mark bed type for later import / reconstruction for belted gcode. fix belt orientation
This commit is contained in:
parent
a0f08f0776
commit
7128d18e98
3 changed files with 9 additions and 8 deletions
|
|
@ -26,8 +26,9 @@
|
|||
}
|
||||
|
||||
rotate(set) {
|
||||
this.view.rotation.y = -set.angle * (Math.PI/180);
|
||||
this.view.position.x = +set.centerz - set.movez;
|
||||
this.view.rotation.x = -set.angle * (Math.PI/180);
|
||||
this.view.position.y = -set.centerz + set.movez;
|
||||
this.view.position.z = -set.movez/2;
|
||||
}
|
||||
|
||||
destroy() {
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ KIRI.worker = {
|
|||
widget.points = null;
|
||||
widget.loadVertices(widget.vertices);
|
||||
let bbox1 = widget.getBoundingBox(true);
|
||||
widget._rotate(0,rotation,0,true);
|
||||
widget._rotate(rotation,0,0,true);
|
||||
widget.center();
|
||||
widget.rotated = true;
|
||||
let bbox2 = widget.getBoundingBox(true);
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
gcodeLayer = device.gcodeLayer,
|
||||
gcodeTrack = device.gcodeTrack,
|
||||
tool = 0,
|
||||
bedType = device.bedBelt ? "belt" : "fixed",
|
||||
extruder = extruders[tool],
|
||||
offset_x = extruder.extOffsetX,
|
||||
offset_y = extruder.extOffsetY,
|
||||
|
|
@ -110,6 +111,7 @@
|
|||
append(`; Generated by Kiri:Moto ${KIRI.version}`);
|
||||
append(`; ${new Date().toString()}`);
|
||||
appendSub("; Bed left:{left} right:{right} top:{top} bottom:{bottom}");
|
||||
append(`; Bed type: ${bedType}`);
|
||||
append(`; Target: ${settings.filter[settings.mode]}`);
|
||||
append("; --- process ---");
|
||||
for (let pk in process) {
|
||||
|
|
@ -174,25 +176,23 @@
|
|||
}
|
||||
let o = [!rate && !newpos.e ? 'G0' : 'G1'];
|
||||
if (typeof newpos.x === 'number') {
|
||||
pos.x = newpos.x;//UTIL.round(newpos.x,decimals);
|
||||
pos.x = newpos.x;
|
||||
o.append(" X").append(pos.x.toFixed(decimals));
|
||||
}
|
||||
if (typeof newpos.y === 'number') {
|
||||
pos.y = newpos.y;//UTIL.round(newpos.y,decimals);
|
||||
pos.y = newpos.y;
|
||||
o.append(" Y").append(pos.y.toFixed(decimals));
|
||||
}
|
||||
if (typeof newpos.z === 'number') {
|
||||
pos.z = newpos.z;//UTIL.round(newpos.z,decimals);
|
||||
pos.z = newpos.z;
|
||||
o.append(" Z").append(pos.z.toFixed(decimals));
|
||||
}
|
||||
if (typeof newpos.e === 'number') {
|
||||
outputLength += newpos.e;
|
||||
if (extrudeAbs) {
|
||||
// for cumulative (absolute) extruder positions
|
||||
// o.append(" E").append(UTIL.round(outputLength, decimals));
|
||||
o.append(" E").append(outputLength.toFixed(decimals));
|
||||
} else {
|
||||
// o.append(" E").append(UTIL.round(newpos.e, decimals));
|
||||
o.append(" E").append(newpos.e.toFixed(decimals));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue