fix sparse fill for certain values. update n2 profile
This commit is contained in:
parent
2930e1f615
commit
cada414f21
3 changed files with 44 additions and 37 deletions
|
|
@ -74,6 +74,7 @@ var gs_kiri_print = exports;
|
||||||
min: { x:Infinity, y:Infinity, z:Infinity}
|
min: { x:Infinity, y:Infinity, z:Infinity}
|
||||||
},
|
},
|
||||||
seq = [],
|
seq = [],
|
||||||
|
abs = true,
|
||||||
move = false,
|
move = false,
|
||||||
E0G0 = false,
|
E0G0 = false,
|
||||||
G0 = function() {
|
G0 = function() {
|
||||||
|
|
@ -92,15 +93,23 @@ var gs_kiri_print = exports;
|
||||||
E: 0.0
|
E: 0.0
|
||||||
},
|
},
|
||||||
off = {
|
off = {
|
||||||
x: offset ? offset.x || 0 : 0,
|
X: offset ? offset.x || 0 : 0,
|
||||||
y: offset ? offset.y || 0 : 0,
|
Y: offset ? offset.y || 0 : 0,
|
||||||
z: offset ? offset.z || 0 : 0
|
Z: offset ? offset.z || 0 : 0
|
||||||
};
|
};
|
||||||
|
|
||||||
lines.forEach(function(line) {
|
lines.forEach(function(line) {
|
||||||
line = line.split(";")[0].split(" ");
|
line = line.split(";")[0].split(" ");
|
||||||
if (line.length < 2) return;
|
if (line.length < 2) return;
|
||||||
switch (line.shift()) {
|
switch (line.shift()) {
|
||||||
|
case 'G90':
|
||||||
|
// absolute positioning
|
||||||
|
abs = true;
|
||||||
|
break;
|
||||||
|
case 'G91':
|
||||||
|
// relative positioning
|
||||||
|
abs = false;
|
||||||
|
break;
|
||||||
case 'G0':
|
case 'G0':
|
||||||
G0();
|
G0();
|
||||||
case 'G1':
|
case 'G1':
|
||||||
|
|
@ -120,7 +129,7 @@ var gs_kiri_print = exports;
|
||||||
}
|
}
|
||||||
addOutput(
|
addOutput(
|
||||||
seq,
|
seq,
|
||||||
{x:pos.X + off.x, y:pos.Y + off.y, z:pos.Z + off.z},
|
{x:pos.X + off.X, y:pos.Y + off.Y, z:pos.Z + off.Z},
|
||||||
!move,
|
!move,
|
||||||
pos.F
|
pos.F
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1122,6 +1122,7 @@ var gs_kiri_slice = exports;
|
||||||
bounds = target.bounds(),
|
bounds = target.bounds(),
|
||||||
even = true,
|
even = true,
|
||||||
evenZ = target.zIndex() % 2 === 0,
|
evenZ = target.zIndex() % 2 === 0,
|
||||||
|
maxy = bounds.max.y + (vhlen + anylen * 2),
|
||||||
x, y;
|
x, y;
|
||||||
|
|
||||||
if (full || evenZ) {
|
if (full || evenZ) {
|
||||||
|
|
@ -1131,7 +1132,7 @@ var gs_kiri_slice = exports;
|
||||||
if (!even && x > bounds.max.x + anxlen + spacing) break;
|
if (!even && x > bounds.max.x + anxlen + spacing) break;
|
||||||
y = bounds.min.y;
|
y = bounds.min.y;
|
||||||
target.newline();
|
target.newline();
|
||||||
while (y < bounds.max.y) {
|
while (y <= maxy) {
|
||||||
target.emit(x,y);
|
target.emit(x,y);
|
||||||
y += vhlen;
|
y += vhlen;
|
||||||
target.emit(x,y);
|
target.emit(x,y);
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@
|
||||||
"G28 Z0",
|
"G28 Z0",
|
||||||
"G1 Z0.05 F6000.00",
|
"G1 Z0.05 F6000.00",
|
||||||
"G92 E0",
|
"G92 E0",
|
||||||
";G1 X10 F600",
|
|
||||||
"G1 F140 E29",
|
"G1 F140 E29",
|
||||||
"G1 F600 E28",
|
"G1 F600 E28",
|
||||||
"G1 X15 Y15 Z0.02 F2000",
|
"G1 X15 Y15 Z0.02 F2000",
|
||||||
|
|
@ -22,18 +21,16 @@
|
||||||
"M1001"
|
"M1001"
|
||||||
],
|
],
|
||||||
"post":[
|
"post":[
|
||||||
"G92 E0",
|
"G91",
|
||||||
|
"G1 Z10",
|
||||||
|
"G90",
|
||||||
"M1002",
|
"M1002",
|
||||||
"M104 T0 S0",
|
"M104 T0 S0",
|
||||||
"M104 S0",
|
"M104 S0",
|
||||||
"M140 S0",
|
"M140 S0",
|
||||||
"G91",
|
"G1 X20 Y20 F6000",
|
||||||
"G1 E-1 F300",
|
"G1 X0 Y0",
|
||||||
"G1 E-5 X20 Y20 F6000.00",
|
"M84"
|
||||||
"G1 Z0.5 X0 Y0",
|
|
||||||
"G28 X0 Y0",
|
|
||||||
"M84",
|
|
||||||
"G90"
|
|
||||||
],
|
],
|
||||||
"cmd":{
|
"cmd":{
|
||||||
"fan_power": "M106 S{fan_speed}"
|
"fan_power": "M106 S{fan_speed}"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue