From 38622b40d9f55baa587b7692d2b0d8d0c0f61c34 Mon Sep 17 00:00:00 2001 From: bakedpotatolord Date: Sat, 31 May 2025 09:25:38 -0600 Subject: [PATCH 1/3] fix drill bug --- src/kiri-mode/cam/slice.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/kiri-mode/cam/slice.js b/src/kiri-mode/cam/slice.js index aab397a4..0d1a80e9 100644 --- a/src/kiri-mode/cam/slice.js +++ b/src/kiri-mode/cam/slice.js @@ -500,6 +500,7 @@ CAM.holes = async function(settings, widget, diam) { continue; } for (let poly of inner) { + if ( poly.points.length < 7 ) continue; let center = poly.calcCircleCenter(); center.area = poly.area(); center.overlapping = [center] From 45823642c3c0f962f1d0493d3a2c7fb0b9c580f6 Mon Sep 17 00:00:00 2001 From: bakedpotatolord Date: Sat, 31 May 2025 18:52:07 -0600 Subject: [PATCH 2/3] remove dead whitespace --- src/kiri-mode/cam/ops.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/kiri-mode/cam/ops.js b/src/kiri-mode/cam/ops.js index dced8347..7df5ac1b 100644 --- a/src/kiri-mode/cam/ops.js +++ b/src/kiri-mode/cam/ops.js @@ -1503,22 +1503,19 @@ class OpDrill extends CamOp { if(!drill.selected){ return } - let slice = newSlice(0); + let slice = newSlice(0); if (op.mark) { // replace depth with single down peck drill.depth = op.down } drill.zBottom = drill.z - drill.depth; - // for thru holes, follow z thru when set if ((op.thru>0) ) { drill.zBottom -= op.thru; } - const poly = newPolygon() poly.points.push(newPoint(drill.x, drill.y, drill.z)) poly.points.push(newPoint(drill.x, drill.y, drill.zBottom)) - // poly.points.pop(); slice.camTrace = { tool: op.tool, rate: op.feed, plunge: op.rate }; slice.camLines = [poly]; From f2d6120a5fc4c1b4a85b1b1e1120aa35c9fe65e4 Mon Sep 17 00:00:00 2001 From: bakedpotatolord Date: Sat, 31 May 2025 20:03:56 -0600 Subject: [PATCH 3/3] add prettier config --- prettier.config.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 prettier.config.js diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 00000000..5a5bf0eb --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,19 @@ + +/** + * @see https://prettier.io/docs/configuration + * @type {import("prettier").Config} + */ +const config = { + trailingComma: "es5", + useTabs: false, + bracketSpacing: true, + objectWrap: "preserve", + tabWidth: 4, + semi: false, + singleQuote: true, + bracketSameLine: true, + arrowParens: "always", + endOfLine: "crlf" +} + +module.exports = config \ No newline at end of file