Merge pull request #389 from GridSpace/cut-direction-bugfix
Cut direction bugfix
This commit is contained in:
commit
c6c5a8cd9f
3 changed files with 3 additions and 5 deletions
|
|
@ -698,10 +698,6 @@ class OpOutline extends CamOp {
|
||||||
setTool(op.tool, op.rate, op.plunge);
|
setTool(op.tool, op.rate, op.plunge);
|
||||||
setSpindle(op.spindle);
|
setSpindle(op.spindle);
|
||||||
|
|
||||||
if (!process.camOutlinePocket) {
|
|
||||||
cutdir = !cutdir;
|
|
||||||
}
|
|
||||||
|
|
||||||
// printpoint becomes NaN in engine mode. not sure why but this fixes it
|
// printpoint becomes NaN in engine mode. not sure why but this fixes it
|
||||||
if(Object.values(printPoint).some(v=>Number.isNaN(v))){
|
if(Object.values(printPoint).some(v=>Number.isNaN(v))){
|
||||||
printPoint = newPoint(0,0,0);
|
printPoint = newPoint(0,0,0);
|
||||||
|
|
|
||||||
|
|
@ -547,6 +547,7 @@ function prepEach(widget, settings, print, firstPoint, update) {
|
||||||
if (depthFirst) {
|
if (depthFirst) {
|
||||||
depthData.push(polys);
|
depthData.push(polys);
|
||||||
} else {
|
} else {
|
||||||
|
// if not depth first, output the polys in slice order
|
||||||
printPoint = poly2polyEmit(polys, printPoint, function(poly, index, count) {
|
printPoint = poly2polyEmit(polys, printPoint, function(poly, index, count) {
|
||||||
poly.forEachPoint(function(point, pidx, points, offset) {
|
poly.forEachPoint(function(point, pidx, points, offset) {
|
||||||
// scale speed of first cutting poly since it engages the full bit
|
// scale speed of first cutting poly since it engages the full bit
|
||||||
|
|
@ -564,10 +565,12 @@ function prepEach(widget, settings, print, firstPoint, update) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (depthFirst) {
|
if (depthFirst) {
|
||||||
|
// get inside vals (the positive ones)
|
||||||
let ins = depthData.map(a => a.filter(p => !isNeg(p.depth)));
|
let ins = depthData.map(a => a.filter(p => !isNeg(p.depth)));
|
||||||
let itops = ins.map(level => {
|
let itops = ins.map(level => {
|
||||||
return POLY.nest(level.filter(poly => poly.depth === 0).clone());
|
return POLY.nest(level.filter(poly => poly.depth === 0).clone());
|
||||||
});
|
});
|
||||||
|
// get outside vals (the negative ones)
|
||||||
let outs = depthData.map(a => a.filter(p => isNeg(p.depth)));
|
let outs = depthData.map(a => a.filter(p => isNeg(p.depth)));
|
||||||
let otops = outs.map(level => {
|
let otops = outs.map(level => {
|
||||||
return POLY.nest(level.filter(poly => poly.depth === 0).clone());
|
return POLY.nest(level.filter(poly => poly.depth === 0).clone());
|
||||||
|
|
|
||||||
|
|
@ -215,7 +215,6 @@ const renamed = {
|
||||||
drillDwell: "camDrillDwell",
|
drillDwell: "camDrillDwell",
|
||||||
drillLift: "camDrillLift",
|
drillLift: "camDrillLift",
|
||||||
drillingOn: "camDrillingOn",
|
drillingOn: "camDrillingOn",
|
||||||
camPocketOnlyFinish: "camOutlinePocket",
|
|
||||||
camWideCutout: "camOutlineWide",
|
camWideCutout: "camOutlineWide",
|
||||||
outputClockwise: "camConventional"
|
outputClockwise: "camConventional"
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue