From 871890415cd84f74c20784fc8daa5be5fafe7ddd Mon Sep 17 00:00:00 2001 From: Adam Chalmers Date: Fri, 24 Jan 2025 14:03:23 -0600 Subject: [PATCH] Rectangle tool should use default unlabeled, fix broken regex find-replace --- src/lib/rectangleTool.ts | 2 +- .../executor/inputs/e2e-can-sketch-on-chamfer-no-pipeExpr.kcl | 2 +- .../tests/executor/inputs/e2e-can-sketch-on-chamfer.kcl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/rectangleTool.ts b/src/lib/rectangleTool.ts index 53dea27f7..c61bec0ed 100644 --- a/src/lib/rectangleTool.ts +++ b/src/lib/rectangleTool.ts @@ -64,7 +64,7 @@ export const getRectangleCallExpressions = ( createPipeSubstitution(), createTagDeclarator(tags[2]), ]), - createCallExpressionStdLibKw('line', createPipeSubstitution(), [ + createCallExpressionStdLibKw('line', null, [ createLabeledArg( 'endAbsolute', createArrayExpression([ diff --git a/src/wasm-lib/tests/executor/inputs/e2e-can-sketch-on-chamfer-no-pipeExpr.kcl b/src/wasm-lib/tests/executor/inputs/e2e-can-sketch-on-chamfer-no-pipeExpr.kcl index 1eb44829a..ead71f435 100644 --- a/src/wasm-lib/tests/executor/inputs/e2e-can-sketch-on-chamfer-no-pipeExpr.kcl +++ b/src/wasm-lib/tests/executor/inputs/e2e-can-sketch-on-chamfer-no-pipeExpr.kcl @@ -9,7 +9,7 @@ const sketch001 = startSketchOn('XZ') segAng(rectangleSegmentA001), -segLen(rectangleSegmentA001) ], %, $yo) - |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) + |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg02) |> close() const extrude001 = extrude(sketch001, length = 100) const chamf = chamfer({ diff --git a/src/wasm-lib/tests/executor/inputs/e2e-can-sketch-on-chamfer.kcl b/src/wasm-lib/tests/executor/inputs/e2e-can-sketch-on-chamfer.kcl index 38d64ab13..0d18d5e9f 100644 --- a/src/wasm-lib/tests/executor/inputs/e2e-can-sketch-on-chamfer.kcl +++ b/src/wasm-lib/tests/executor/inputs/e2e-can-sketch-on-chamfer.kcl @@ -9,7 +9,7 @@ const sketch001 = startSketchOn('XZ') segAng(rectangleSegmentA001), -segLen(rectangleSegmentA001) ], %, $yo) - |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) + |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg02) |> close() const extrude001 = extrude(sketch001, length = 100) |> chamfer({