CAM routing refactor, area operation, and taper ball tool implementation
Major routing improvements: - Refactor depth-first routing algorithm for better path optimization - Reimplemented outline, roughing, pocket, and trace as area operation wrappers - Add pocket shadow travel routing with optimized descent using travel bounds - Improve contour routing with arc detection and polyEmit arc strategy - Add area smoothing and ease-down options - Fix outline handling with thru holes and surface reversal on tip2tip - Move widget shadow methods into widget class for faster hole detection - Better camInnerFirst support and proper feed/plunge defaults Tool system improvements: - Implement taper ball tool type with full support - Add renderTool2() for profile-based visualization - Convert tool menu to init code with bound vars - Fix auto tool and auto spindle for prep operations - Update tool profile generation for taperball geometry - Add calcTaperBallExtent() for proper ball tangency calculations Code cleanup: - Remove duplicated slicer code from specialized slicers - Asyncify shadowAt operations - Deprecate pocket engrave operation - Simplify upNover implementation - Fix animation with new tool+settings requirements
This commit is contained in:
parent
761568b533
commit
e0b1c4e31f
44 changed files with 1607 additions and 2894 deletions
|
|
@ -54,22 +54,13 @@ class OpLathe extends CamOp {
|
|||
}
|
||||
|
||||
prepare(ops, progress) {
|
||||
let { op, state, slices, topo } = this;
|
||||
let { settings } = state;
|
||||
let { op, slices, topo } = this;
|
||||
let { camOut, newLayer, zSafe } = ops;
|
||||
|
||||
let { setTool, setSpindle } = ops;
|
||||
let { camOut, newLayer, printPoint } = ops;
|
||||
let { zmax } = ops;
|
||||
|
||||
let toolDiam = new Tool(settings, op.tool).fluteDiameter();
|
||||
let stepover = toolDiam * op.step * 2;
|
||||
let rez = topo.resolution;
|
||||
|
||||
setTool(op.tool, op.rate, op.plunge);
|
||||
setSpindle(op.spindle);
|
||||
|
||||
// start top center, X = 0, Y = 0 closest to 4th axis chuck
|
||||
printPoint = newPoint(0, 0, zmax);
|
||||
camOut(newPoint(0, 0, zSafe), 0);
|
||||
|
||||
for (let slice of slices) {
|
||||
// ignore debug slices
|
||||
|
|
@ -90,14 +81,14 @@ class OpLathe extends CamOp {
|
|||
return;
|
||||
}
|
||||
if (latent) {
|
||||
camOut(latent, true, stepover);
|
||||
camOut(latent, 1);
|
||||
latent = undefined;
|
||||
}
|
||||
}
|
||||
camOut(last = point.clone(), pidx > 0, stepover);
|
||||
camOut(last = point.clone(), pidx > 0 ? 1 : 0);
|
||||
}, false);
|
||||
if (latent) {
|
||||
camOut(latent, true, stepover);
|
||||
camOut(latent, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -110,7 +101,7 @@ class OpLathe extends CamOp {
|
|||
// camOut(last = last.clone().setZ(zmax), 0);
|
||||
// camOut(last = last.clone().setA(amax), 0);
|
||||
newLayer();
|
||||
ops.addGCode([`G0 Z${zmax.round(2)}`, `G0 A${amax}`, "G92 A0"]);
|
||||
ops.addGCode([`G0 Z${zSafe.round(2)}`, `G0 A${amax}`, "G92 A0"]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue