From 98fe0cf9c06d9a62a55469a20a05b2fc2eb6f2d2 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Sat, 14 Nov 2020 16:30:43 -0500 Subject: [PATCH] notes and debugging --- notes.md | 3 ++- src/mode/cam/topo.js | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/notes.md b/notes.md index 12f11c0e..36007473 100644 --- a/notes.md +++ b/notes.md @@ -10,7 +10,8 @@ * onshape mouse mapping option ## 2.4 -* cnc: tracing, visualization, manual tabs, auto feature detection (slicing) +* cnc: tracing (chamfer, engrave), milling visualization +* cnc: auto feature detection (slicing), manual tabs * fdm: manual supports, continuous printing * all: 2d image to 3d part diff --git a/src/mode/cam/topo.js b/src/mode/cam/topo.js index ce7e7856..83e71d7f 100644 --- a/src/mode/cam/topo.js +++ b/src/mode/cam/topo.js @@ -158,6 +158,21 @@ gridv, // value i, il, j, jl, x, y, tv, ltv; + if (false) + slices.map(slice => { + newslices.push(slice); + const points = []; + slice.lines.forEach(line => { + if (line.p1.z > 0 || line.p2.z > 0) + points.push(line.p1, line.p2); + }); + slice.output() + .setLayer("topo slices", {face: 0xff00ff, line: 0xff00ff}) + .addLines(points) + // .addPolys(slice.topPolys()) + ; + }); + // for each Y slice, find z grid value (x/z swapped) for (j=0, jl=slices.length; j