diff --git a/src/kiri-mode/cam/client.js b/src/kiri-mode/cam/client.js index 1fe3f477..f0b2f578 100644 --- a/src/kiri-mode/cam/client.js +++ b/src/kiri-mode/cam/client.js @@ -1152,7 +1152,7 @@ CAM.init = function(kiri, api) { sep: UC.newBlank({class:"pop-sep"}), spindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, show:hasSpindle}), step: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, bound:UC.bound(0.01,1.0)}), - down: UC.newInput(LANG.cc_sdwn_s, {title:LANG.cc_sdwn_l, convert:UC.toFloat, units:true, show:() => !(poppedRec.engrave && poppedRec.contour)}), + down: UC.newInput(LANG.cc_sdwn_s, {title:LANG.cc_sdwn_l, convert:UC.toFloat, units:true, show:() => !poppedRec.contour}), rate: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, units:true}), plunge: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toInt, units:true}), sep: UC.newBlank({class:"pop-sep"}), diff --git a/src/kiri-mode/cam/ops.js b/src/kiri-mode/cam/ops.js index eaa8f5d2..52a5b535 100644 --- a/src/kiri-mode/cam/ops.js +++ b/src/kiri-mode/cam/ops.js @@ -1103,10 +1103,10 @@ class OpPocket extends CamOp { } // mold cam output lines to the surface of the topo offset by tool geometry - conform(camLines, refine = 10, engrave) { + conform(camLines, refine, engrave) { const topo = this.topo; // re-segment polygon to a higher resolution - const hirez = camLines.map(p => p.segment(topo.tolerance * 2)); + const hirez = refine > 0 ? camLines.map(p => p.segment(topo.tolerance * 2)) : camLines; // walk points and offset from surface taking into account tool geometry for (let poly of hirez) { for (let point of poly.points) { diff --git a/src/kiri/platform.js b/src/kiri/platform.js index 13575ec9..5b2faf0a 100644 --- a/src/kiri/platform.js +++ b/src/kiri/platform.js @@ -14,10 +14,11 @@ // use: kiri-mode.cam.tool gapp.register("kiri.platform", [], (root, exports) => { -const { kiri, moto, load } = root; +const { base, kiri, moto, load } = root; const { api, consts, driver, utils, newWidget, Widget } = kiri; const { ajax, js2o } = utils; const { space } = moto; +const { util } = base; const { COLOR, MODES } = consts; let grouping = false; @@ -203,8 +204,8 @@ function platformUpdateSelected() { } ui.mesh.name.innerText = name; } - ui.mesh.points.innerText = sel.meta.vertices; - ui.mesh.faces.innerText = sel.meta.vertices / 3; + ui.mesh.points.innerText = util.comma(sel.meta.vertices); + ui.mesh.faces.innerText = util.comma(sel.meta.vertices / 3); } else { ui.mesh.name.innerText = `[${selcount}]`; ui.mesh.points.innerText = '-';