diff --git a/notes.md b/notes.md index b4b6b8a1..09a30f38 100644 --- a/notes.md +++ b/notes.md @@ -10,12 +10,12 @@ * `P` client/worker message interface normalization * `P` explore widget vertex reloading / replacing (Onshape) (issue #48) +* `F` SVG import to 3D part like images * `F` show slider range values in workspace units (on hover?) * `F` allow select of a range by typing in values in slices or workspace units * `F` add % field type with conversion (like units) * `F` complete G2/G3 arc output / input (85% now) * `F` expose grouping feature -* `F` SVG import to 3D part like images * `F` integrate svg nest arrange algorithm # FDM @@ -68,19 +68,16 @@ * `B` path routing with tabs sometimes makes no sense * `B` clicking on a pop-op should pin it until clicked or [esc] * `B` need to force cut line at synthetic z bottom (midlines, etc) -* `B` non-clear-voids duplicates thru-holes * `B` starting export during animation unleashes chaos -* `B` climb vs conventional not fully consistent after refactor -* `B` outside cutting direction in roughing mode inverted +* `F` add ease-down support to trace op +* `F` add linear clearing strategy +* `F` add adaptive clearing strategy * `F` user-selectable origin (issue #28) -* `F` import SVG into a path that can be overlaid onto a 3D mesh (laser?) * `F` intelligently turn circle hole pocket clear into spiral down * `F` trace follow hole that matches endmill should turn into a drill op * `F` add climb/conventional into each operation * `F` update analyzer to detect overhangs -* `F` add linear clearing strategy option for roughing / pocket -* `F` adaptive clearing in roughing mode * `F` extend acute roughing on inside polys to clear small voids * `F` option to use part / STL coordinate space to determine X,Y origin * `F` validate muti-part layout and spacing exceeds largest outside tool diameter @@ -97,7 +94,6 @@ * `F` can animation clear the mesh in areas where the cuts go through the stock? * `F` support lathe mode / A-axis / rotary * `F` gcode output option as zip for multiple or flip ops or tool change -* `F` ease-down should be engaged in all descending cutting operations * `F` maintain several part orientations + op chains in a single profile * `P` common part pre-analyze to speed up 'slice' and improve shadow (overhangs) diff --git a/src/mode/cam/ops.js b/src/mode/cam/ops.js index 4d0e0ce3..465a3cce 100644 --- a/src/mode/cam/ops.js +++ b/src/mode/cam/ops.js @@ -223,7 +223,7 @@ }); shadow = POLY.nest(shadow); - // expand shadow by half tool diameter + stock to leave + // shell = shadow expanded by half tool diameter + leave stock const sadd = roughIn ? toolDiam / 2 : toolDiam / 2; const shell = POLY.offset(shadow, sadd + roughLeave); @@ -274,10 +274,12 @@ // elimate double inset on inners offset.forEach(op => { if (op.inner) { - let operim = op.perimeter(); + let pv1 = op.perimeter(); let newinner = []; op.inner.forEach(oi => { - if (Math.abs(oi.perimeter() - operim) > 0.01) { + let pv2 = oi.perimeter(); + let pct = pv1 > pv2 ? pv2/pv1 : pv1/pv2; + if (pct < 0.98) { newinner.push(oi); } }); diff --git a/src/mode/fdm/prepare.js b/src/mode/fdm/prepare.js index 32db121e..3891e03c 100644 --- a/src/mode/fdm/prepare.js +++ b/src/mode/fdm/prepare.js @@ -580,6 +580,7 @@ const flat = opts.flat; const thin = opts.thin && !flat; const ckspeed = opts.speed !== false; + const headColor = 0x888888; const moveColor = opts.move >= 0 ? opts.move : 0xaaaaaa; const printColor = opts.print >= 0 ? opts.print : 0x777700; const layers = []; @@ -709,14 +710,14 @@ } if (heads.length) { output - .setLayer('arrows', { face: moveColor, line: 0x555555, opacity: 0.5 }, true) + .setLayer('arrows', { face: headColor, line: 0x112233, opacity: 0.5 }, true) .addAreas(heads.map(points => { const {p1, p2} = points; const slope = p2.slopeTo(p1); const s1 = BASE.newSlopeFromAngle(slope.angle + 20); const s2 = BASE.newSlopeFromAngle(slope.angle - 20); - const p3 = points.p2.projectOnSlope(s1, 0.4); - const p4 = points.p2.projectOnSlope(s2, 0.4); + const p3 = points.p2.projectOnSlope(s1, 0.8); + const p4 = points.p2.projectOnSlope(s2, 0.8); return newPolygon().addPoints([p2,p3,p4]).setZ(p2.z + 0.01); }), { thin: true, outline: true }); }