diff --git a/e2e/playwright/editor-tests.spec.ts b/e2e/playwright/editor-tests.spec.ts index c04393f753..4719253570 100644 --- a/e2e/playwright/editor-tests.spec.ts +++ b/e2e/playwright/editor-tests.spec.ts @@ -912,7 +912,7 @@ a1 = startSketchOn(offsetPlane(XY, offset = 10)) |> close() |> revolve( axis = revolveAxis, - angle = 90 + angle = 90deg ) ` ) diff --git a/e2e/playwright/point-click.spec.ts b/e2e/playwright/point-click.spec.ts index fdc9be1224..fc26f0c7d3 100644 --- a/e2e/playwright/point-click.spec.ts +++ b/e2e/playwright/point-click.spec.ts @@ -317,7 +317,7 @@ test.describe('Point-and-click tests', () => { clickCoords: { x: 570, y: 220 }, cameraPos: { x: 16020, y: -2000, z: 10500 }, cameraTarget: { x: -150, y: -4500, z: -80 }, - beforeChamferSnippet: `angledLine(angle=segAng(rectangleSegmentA001)-90,length=217.26,tag=$seg01) + beforeChamferSnippet: `angledLine(angle=segAng(rectangleSegmentA001)-90deg,length=217.26,tag=$seg01) chamfer(length = 30,tags = [ seg01, getNextAdjacentEdge(yo), @@ -330,8 +330,8 @@ test.describe('Point-and-click tests', () => { 'sketch002 = startSketchOn(extrude001, face = seg03)', afterRectangle1stClickSnippet: 'startProfile(sketch002, at = [205.96, 254.59])', - afterRectangle2ndClickSnippet: `angledLine(angle=0,length=11.39,tag=$rectangleSegmentA002) - |>angledLine(angle=segAng(rectangleSegmentA002)-90,length=105.26) + afterRectangle2ndClickSnippet: `angledLine(angle=0deg,length=11.39,tag=$rectangleSegmentA002) + |>angledLine(angle=segAng(rectangleSegmentA002)-90deg,length=105.26) |>angledLine(angle=segAng(rectangleSegmentA002),length=-segLen(rectangleSegmentA002)) |>line(endAbsolute=[profileStartX(%),profileStartY(%)]) |>close()`, @@ -341,7 +341,7 @@ test.describe('Point-and-click tests', () => { clickCoords: { x: 690, y: 250 }, cameraPos: { x: 16020, y: -2000, z: 10500 }, cameraTarget: { x: -150, y: -4500, z: -80 }, - beforeChamferSnippet: `angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 217.26, tag = $seg01)chamfer( + beforeChamferSnippet: `angledLine(angle = segAng(rectangleSegmentA001) - 90deg, length = 217.26, tag = $seg01)chamfer( length = 30, tags = [ seg01, @@ -354,8 +354,8 @@ test.describe('Point-and-click tests', () => { 'sketch003 = startSketchOn(extrude001, face = seg04)', afterRectangle1stClickSnippet: 'startProfile(sketch003, at = [-209.64, 255.28])', - afterRectangle2ndClickSnippet: `angledLine(angle=0,length=11.56,tag=$rectangleSegmentA003) - |>angledLine(angle=segAng(rectangleSegmentA003)-90,length=106.84) + afterRectangle2ndClickSnippet: `angledLine(angle=0deg,length=11.56,tag=$rectangleSegmentA003) + |>angledLine(angle=segAng(rectangleSegmentA003)-90deg,length=106.84) |>angledLine(angle=segAng(rectangleSegmentA003),length=-segLen(rectangleSegmentA003)) |>line(endAbsolute=[profileStartX(%),profileStartY(%)]) |>close()`, @@ -365,7 +365,7 @@ test.describe('Point-and-click tests', () => { clickCoords: { x: 677, y: 87 }, cameraPos: { x: -6200, y: 1500, z: 6200 }, cameraTarget: { x: 8300, y: 1100, z: 4800 }, - beforeChamferSnippet: `angledLine(angle = 0, length = 268.43, tag = $rectangleSegmentA001)chamfer( + beforeChamferSnippet: `angledLine(angle = 0deg, length = 268.43, tag = $rectangleSegmentA001)chamfer( length = 30, tags = [ getNextAdjacentEdge(yo), @@ -376,8 +376,8 @@ test.describe('Point-and-click tests', () => { 'sketch004 = startSketchOn(extrude001, face = seg05)', afterRectangle1stClickSnippet: 'startProfile(sketch004, at = [82.57, 322.96])', - afterRectangle2ndClickSnippet: `angledLine(angle=0,length=11.16,tag=$rectangleSegmentA004) - |>angledLine(angle=segAng(rectangleSegmentA004)-90,length=103.07) + afterRectangle2ndClickSnippet: `angledLine(angle=0deg,length=11.16,tag=$rectangleSegmentA004) + |>angledLine(angle=segAng(rectangleSegmentA004)-90deg,length=103.07) |>angledLine(angle=segAng(rectangleSegmentA004),length=-segLen(rectangleSegmentA004)) |>line(endAbsolute=[profileStartX(%),profileStartY(%)]) |>close()`, @@ -394,8 +394,8 @@ test.describe('Point-and-click tests', () => { 'sketch005 = startSketchOn(extrude001, face = seg06)', afterRectangle1stClickSnippet: 'startProfile(sketch005, at = [-23.43, 19.69])', - afterRectangle2ndClickSnippet: `angledLine(angle=0,length=9.1,tag=$rectangleSegmentA005) - |>angledLine(angle=segAng(rectangleSegmentA005)-90,length=84.07) + afterRectangle2ndClickSnippet: `angledLine(angle=0deg,length=9.1,tag=$rectangleSegmentA005) + |>angledLine(angle=segAng(rectangleSegmentA005)-90deg,length=84.07) |>angledLine(angle=segAng(rectangleSegmentA005),length=-segLen(rectangleSegmentA005)) |>line(endAbsolute=[profileStartX(%),profileStartY(%)]) |>close()`, @@ -407,8 +407,8 @@ test.describe('Point-and-click tests', () => { sketch001 = startSketchOn(XZ) |> startProfile(at = [75.8, 317.2]) // [$startCapTag, $EndCapTag] - |> angledLine(angle = 0, length = 268.43, tag = $rectangleSegmentA001) - |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 217.26, tag = $seg01) + |> angledLine(angle = 0deg, length = 268.43, tag = $rectangleSegmentA001) + |> angledLine(angle = segAng(rectangleSegmentA001) - 90deg, length = 217.26, tag = $seg01) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $yo) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg02) |> close() @@ -419,29 +419,29 @@ extrude001 = extrude(sketch001, length = 100) |> chamfer(length = 30, tags = [getNextAdjacentEdge(yo)], tag = $seg06) sketch002 = startSketchOn(extrude001, face = seg03) profile001 = startProfile(sketch002, at = [205.96, 254.59]) - |> angledLine(angle = 0, length = 11.39, tag = $rectangleSegmentA002) - |> angledLine(angle = segAng(rectangleSegmentA002) - 90, length = 105.26) + |> angledLine(angle = 0deg, length = 11.39, tag = $rectangleSegmentA002) + |> angledLine(angle = segAng(rectangleSegmentA002) - 90deg, length = 105.26) |> angledLine(angle = segAng(rectangleSegmentA002), length = -segLen(rectangleSegmentA002)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() sketch003 = startSketchOn(extrude001, face = seg04) profile002 = startProfile(sketch003, at = [-209.64, 255.28]) - |> angledLine(angle = 0, length = 11.56, tag = $rectangleSegmentA003) - |> angledLine(angle = segAng(rectangleSegmentA003) - 90, length = 106.84) + |> angledLine(angle = 0deg, length = 11.56, tag = $rectangleSegmentA003) + |> angledLine(angle = segAng(rectangleSegmentA003) - 90deg, length = 106.84) |> angledLine(angle = segAng(rectangleSegmentA003), length = -segLen(rectangleSegmentA003)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() sketch004 = startSketchOn(extrude001, face = seg05) profile003 = startProfile(sketch004, at = [82.57, 322.96]) - |> angledLine(angle = 0, length = 11.16, tag = $rectangleSegmentA004) - |> angledLine(angle = segAng(rectangleSegmentA004) - 90, length = 103.07) + |> angledLine(angle = 0deg, length = 11.16, tag = $rectangleSegmentA004) + |> angledLine(angle = segAng(rectangleSegmentA004) - 90deg, length = 103.07) |> angledLine(angle = segAng(rectangleSegmentA004), length = -segLen(rectangleSegmentA004)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() sketch005 = startSketchOn(extrude001, face = seg06) profile004 = startProfile(sketch005, at = [-23.43, 19.69]) - |> angledLine(angle = 0, length = 9.1, tag = $rectangleSegmentA005) - |> angledLine(angle = segAng(rectangleSegmentA005) - 90, length = 84.07) + |> angledLine(angle = 0deg, length = 9.1, tag = $rectangleSegmentA005) + |> angledLine(angle = segAng(rectangleSegmentA005) - 90deg, length = 84.07) |> angledLine(angle = segAng(rectangleSegmentA005), length = -segLen(rectangleSegmentA005)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() @@ -482,7 +482,7 @@ profile004 = startProfile(sketch005, at = [-23.43, 19.69]) clickCoords: { x: 570, y: 220 }, cameraPos: { x: 16020, y: -2000, z: 10500 }, cameraTarget: { x: -150, y: -4500, z: -80 }, - beforeChamferSnippet: `angledLine(angle=segAng(rectangleSegmentA001)-90,length=217.26,tag=$seg01) + beforeChamferSnippet: `angledLine(angle=segAng(rectangleSegmentA001)-90deg,length=217.26,tag=$seg01) chamfer(extrude001,length=30,tags=[ seg01, getNextAdjacentEdge(yo), @@ -494,8 +494,8 @@ profile004 = startProfile(sketch005, at = [-23.43, 19.69]) 'sketch002 = startSketchOn(extrude001, face = seg03)', afterRectangle1stClickSnippet: 'startProfile(sketch002, at = [205.96, 254.59])', - afterRectangle2ndClickSnippet: `angledLine(angle=0,length=11.39,tag=$rectangleSegmentA002) - |>angledLine(angle=segAng(rectangleSegmentA002)-90,length=105.26) + afterRectangle2ndClickSnippet: `angledLine(angle=0deg,length=11.39,tag=$rectangleSegmentA002) + |>angledLine(angle=segAng(rectangleSegmentA002)-90deg,length=105.26) |>angledLine(angle=segAng(rectangleSegmentA002),length=-segLen(rectangleSegmentA002)) |>line(endAbsolute=[profileStartX(%),profileStartY(%)]) |>close()`, @@ -504,8 +504,8 @@ profile004 = startProfile(sketch005, at = [-23.43, 19.69]) `@settings(defaultLengthUnit = in) sketch001 = startSketchOn(XZ) |> startProfile(at = [75.8, 317.2]) - |> angledLine(angle = 0, length = 268.43, tag = $rectangleSegmentA001) - |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 217.26, tag = $seg01) + |> angledLine(angle = 0deg, length = 268.43, tag = $rectangleSegmentA001) + |> angledLine(angle = segAng(rectangleSegmentA001) - 90deg, length = 217.26, tag = $seg01) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $yo) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg02) |> close() @@ -526,8 +526,8 @@ chamf = chamfer( ) sketch002 = startSketchOn(extrude001, face = seg03) profile001 = startProfile(sketch002, at = [205.96, 254.59]) - |> angledLine(angle = 0, length = 11.39, tag = $rectangleSegmentA002) - |> angledLine(angle = segAng(rectangleSegmentA002) - 90, length = 105.26) + |> angledLine(angle = 0deg, length = 11.39, tag = $rectangleSegmentA002) + |> angledLine(angle = segAng(rectangleSegmentA002) - 90deg, length = 105.26) |> angledLine(angle = segAng(rectangleSegmentA002), length = -segLen(rectangleSegmentA002)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() @@ -1153,7 +1153,7 @@ openSketch = startSketchOn(XY) }) => { // One dumb hardcoded screen pixel value const testPoint = { x: 620, y: 257 } - const expectedOutput = `helix001 = helix( axis = X, radius = 5, length = 5, revolutions = 1, angleStart = 270, ccw = false,)` + const expectedOutput = `helix001 = helix( axis = X, radius = 5, length = 5, revolutions = 1, angleStart = 270deg, ccw = false,)` const expectedLine = `axis=X,` await homePage.goToModelingScene() @@ -1183,7 +1183,7 @@ openSketch = startSketchOn(XY) stage: 'arguments', currentArgKey: 'angleStart', highlightedHeaderArg: 'angleStart', - currentArgValue: '360', + currentArgValue: '360deg', headerArguments: { Mode: 'Axis', Axis: 'X', @@ -1195,7 +1195,7 @@ openSketch = startSketchOn(XY) }, commandName: 'Helix', }) - await cmdBar.currentArgumentInput.locator('.cm-content').fill('270') + await cmdBar.currentArgumentInput.locator('.cm-content').fill('270deg') await cmdBar.progressCmdBar() await cmdBar.progressCmdBar() await cmdBar.progressCmdBar() @@ -1471,9 +1471,9 @@ extrude001 = extrude(profile001, length = 100) // One dumb hardcoded screen pixel value const testPoint = { x: 620, y: 257 } const [clickOnWall] = scene.makeMouseHelpers(testPoint.x, testPoint.y) - const expectedOutput = `helix001 = helix( cylinder = extrude001, revolutions = 1, angleStart = 360, ccw = false,)` + const expectedOutput = `helix001 = helix( cylinder = extrude001, revolutions = 1, angleStart = 360deg, ccw = false,)` const expectedLine = `cylinder = extrude001,` - const expectedEditedOutput = `helix001 = helix( cylinder = extrude001, revolutions = 1, angleStart = 360, ccw = true,)` + const expectedEditedOutput = `helix001 = helix( cylinder = extrude001, revolutions = 1, angleStart = 360deg, ccw = true,)` await test.step(`Go through the command bar flow`, async () => { await toolbar.helixButton.click() @@ -1776,8 +1776,8 @@ profile002 = startProfile(sketch002, at = [0, 0]) initialCode: `@settings(defaultLengthUnit = in) sketch001 = startSketchOn(YZ) profile001 = startProfile(sketch001, at = [-400, -400]) - |> angledLine(angle = 0, length = 800, tag = $rectangleSegmentA001) - |> angledLine(angle = segAng(rectangleSegmentA001) + 90, length = 800) + |> angledLine(angle = 0deg, length = 800, tag = $rectangleSegmentA001) + |> angledLine(angle = segAng(rectangleSegmentA001) + 90deg, length = 800) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() @@ -1950,7 +1950,7 @@ profile002 = startProfile(sketch002, at = [0, 0]) radius = 1, length = 10, revolutions = 10, - angleStart = 0, + angleStart = 0deg, ccw = false, ) sketch001 = startSketchOn(XZ) @@ -3660,8 +3660,8 @@ profile001 = startProfile(sketch001, at = [-20, 20]) const initialCode = ` sketch001 = startSketchOn(XZ) |> startProfile(at = [-100.0, 100.0]) -|> angledLine(angle = 0, length = 200.0, tag = $rectangleSegmentA001) -|> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 200, tag = $rectangleSegmentB001) +|> angledLine(angle = 0deg, length = 200.0, tag = $rectangleSegmentA001) +|> angledLine(angle = segAng(rectangleSegmentA001) - 90deg, length = 200, tag = $rectangleSegmentB001) |> angledLine( angle=segAng(rectangleSegmentA001), length=-segLen(rectangleSegmentA001), @@ -3672,9 +3672,9 @@ tag=$rectangleSegmentC001, extrude001 = extrude(sketch001, length = 200) sketch002 = startSketchOn(extrude001, face = rectangleSegmentA001) |> startProfile(at = [-66.77, 84.81]) -|> angledLine(angle = 180, length = 27.08, tag = $rectangleSegmentA002) +|> angledLine(angle = 180deg, length = 27.08, tag = $rectangleSegmentA002) |> angledLine( -angle=segAng(rectangleSegmentA002) - 90, +angle=segAng(rectangleSegmentA002) - 90deg, length=27.8, tag=$rectangleSegmentB002, ) @@ -3706,11 +3706,10 @@ tag=$rectangleSegmentC002, await cmdBar.progressCmdBar() await cmdBar.progressCmdBar() - const newCodeToFind = `revolve001 = revolve(sketch002, angle = 360, axis = X)` + const newCodeToFind = `revolve001 = revolve(sketch002, angle = 360deg, axis = X)` expect(editor.expectEditor.toContain(newCodeToFind)).toBeTruthy() // Edit flow - const newAngle = '90' await toolbar.openPane('feature-tree') const operationButton = await toolbar.getFeatureTreeOperation( 'Revolve', @@ -3720,26 +3719,26 @@ tag=$rectangleSegmentC002, await cmdBar.expectState({ commandName: 'Revolve', currentArgKey: 'angle', - currentArgValue: '360', + currentArgValue: '360deg', headerArguments: { Angle: '360', }, highlightedHeaderArg: 'angle', stage: 'arguments', }) - await page.keyboard.insertText(newAngle) + await page.keyboard.insertText('90deg') await cmdBar.progressCmdBar() await cmdBar.expectState({ stage: 'review', headerArguments: { - Angle: newAngle, + Angle: '90', }, commandName: 'Revolve', }) await cmdBar.progressCmdBar() await toolbar.closePane('feature-tree') await editor.expectEditor.toContain( - newCodeToFind.replace('angle = 360', 'angle = ' + newAngle) + newCodeToFind.replace('angle = 360deg', 'angle = 90deg') ) }) test('revolve surface around edge from an extruded solid2d', async ({ @@ -3753,8 +3752,8 @@ tag=$rectangleSegmentC002, }) => { const initialCode = `sketch001 = startSketchOn(XZ) |> startProfile(at = [-102.57, 101.72]) - |> angledLine(angle = 0, length = 202.6, tag = $rectangleSegmentA001) - |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 202.6, tag = $rectangleSegmentB001) + |> angledLine(angle = 0deg, length = 202.6, tag = $rectangleSegmentA001) + |> angledLine(angle = segAng(rectangleSegmentA001) - 90deg, length = 202.6, tag = $rectangleSegmentB001) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $rectangleSegmentC001) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() @@ -3779,17 +3778,17 @@ sketch002 = startSketchOn(extrude001, face = rectangleSegmentA001) await toolbar.revolveButton.click() await cmdBar.progressCmdBar() await page.getByText('Edge', { exact: true }).click() - const lineCodeToSelection = `angledLine(angle = 0, length = 202.6, tag = $rectangleSegmentA001)` + const lineCodeToSelection = `angledLine(angle = 0deg, length = 202.6, tag = $rectangleSegmentA001)` await page.getByText(lineCodeToSelection).click() await cmdBar.progressCmdBar() await cmdBar.progressCmdBar() await cmdBar.progressCmdBar() - const newCodeToFind = `revolve001 = revolve(sketch002, angle = 360, axis = rectangleSegmentA001)` + const newCodeToFind = `revolve001 = revolve(sketch002, angle = 360deg, axis = rectangleSegmentA001)` await editor.expectEditor.toContain(newCodeToFind) // Edit flow - const newAngle = '180' + const newAngle = '180deg' await toolbar.openPane('feature-tree') const operationButton = await toolbar.getFeatureTreeOperation( 'Revolve', @@ -3799,9 +3798,9 @@ sketch002 = startSketchOn(extrude001, face = rectangleSegmentA001) await cmdBar.expectState({ commandName: 'Revolve', currentArgKey: 'angle', - currentArgValue: '360', + currentArgValue: '360deg', headerArguments: { - Angle: '360', + Angle: '360deg', }, highlightedHeaderArg: 'angle', stage: 'arguments', @@ -3823,7 +3822,7 @@ sketch002 = startSketchOn(extrude001, face = rectangleSegmentA001) await toolbar.closePane('feature-tree') await editor.expectEditor.toContain('angle001 = ' + newAngle) await editor.expectEditor.toContain( - newCodeToFind.replace('angle = 360', 'angle = angle001') + newCodeToFind.replace('angle = 360deg', 'angle = angle001') ) expect(editor.expectEditor.toContain(newCodeToFind)).toBeTruthy() }) @@ -3842,8 +3841,8 @@ sketch002 = startSketchOn(extrude001, face = rectangleSegmentA001) |> xLine(length = 2.6) sketch001 = startSketchOn(-XY) |> startProfile(at = [-0.48, 1.25]) - |> angledLine(angle = 0, length = 2.38, tag = $rectangleSegmentA001) - |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 2.4, tag = $rectangleSegmentB001) + |> angledLine(angle = 0deg, length = 2.38, tag = $rectangleSegmentA001) + |> angledLine(angle = segAng(rectangleSegmentA001) - 90deg, length = 2.4, tag = $rectangleSegmentB001) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $rectangleSegmentC001) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() @@ -3880,11 +3879,10 @@ sketch002 = startSketchOn(extrude001, face = rectangleSegmentA001) await cmdBar.progressCmdBar() await cmdBar.progressCmdBar() - const newCodeToFind = `revolve001 = revolve(sketch003, angle = 360, axis = seg01)` + const newCodeToFind = `revolve001 = revolve(sketch003, angle = 360deg, axis = seg01)` expect(editor.expectEditor.toContain(newCodeToFind)).toBeTruthy() // Edit flow - const newAngle = '270' await toolbar.openPane('feature-tree') const operationButton = await toolbar.getFeatureTreeOperation( 'Revolve', @@ -3894,26 +3892,26 @@ sketch002 = startSketchOn(extrude001, face = rectangleSegmentA001) await cmdBar.expectState({ commandName: 'Revolve', currentArgKey: 'angle', - currentArgValue: '360', + currentArgValue: '360deg', headerArguments: { Angle: '360', }, highlightedHeaderArg: 'angle', stage: 'arguments', }) - await page.keyboard.insertText(newAngle) + await page.keyboard.insertText('270deg') await cmdBar.progressCmdBar() await cmdBar.expectState({ stage: 'review', headerArguments: { - Angle: newAngle, + Angle: '270', }, commandName: 'Revolve', }) await cmdBar.progressCmdBar() await toolbar.closePane('feature-tree') await editor.expectEditor.toContain( - newCodeToFind.replace('angle = 360', 'angle = ' + newAngle) + newCodeToFind.replace('angle = 360deg', 'angle = 270deg') ) }) }) @@ -4856,7 +4854,7 @@ path001 = startProfile(sketch001, at = [0, 0]) await cmdBar.expectState({ stage: 'arguments', currentArgKey: 'angle', - currentArgValue: '360', + currentArgValue: '360deg', headerArguments: { Profiles: '2 profiles', AxisOrEdge: 'Edge', @@ -4866,7 +4864,7 @@ path001 = startProfile(sketch001, at = [0, 0]) highlightedHeaderArg: 'angle', commandName: 'Revolve', }) - await page.keyboard.insertText('180') + await page.keyboard.insertText('180deg') await cmdBar.progressCmdBar() await cmdBar.expectState({ stage: 'review', @@ -4885,7 +4883,7 @@ path001 = startProfile(sketch001, at = [0, 0]) shouldNormalise: true, }) await editor.expectEditor.toContain( - `revolve001 = revolve([profile001, profile002], angle=180, axis=seg01)`, + `revolve001 = revolve([profile001, profile002], angle=180deg, axis=seg01)`, { shouldNormalise: true } ) }) @@ -4897,7 +4895,7 @@ path001 = startProfile(sketch001, at = [0, 0]) await page.getByTestId('context-menu-delete').click() await scene.settled(cmdBar) await editor.expectEditor.not.toContain( - `revolve001 = revolve([profile001, profile002], axis = XY, angle = 180)`, + `revolve001 = revolve([profile001, profile002], axis = XY, angle = 180deg)`, { shouldNormalise: true } ) }) diff --git a/e2e/playwright/sketch-tests.spec.ts b/e2e/playwright/sketch-tests.spec.ts index 9c29666e57..b55495aa44 100644 --- a/e2e/playwright/sketch-tests.spec.ts +++ b/e2e/playwright/sketch-tests.spec.ts @@ -2100,8 +2100,8 @@ profile003 = startProfile(sketch001, at = [206.63, -56.73]) ) await crnRect1point2() await editor.expectEditor.toContain( - `|> angledLine(angle = 0, length = 2.37, tag = $rectangleSegmentA001) - |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 7.8) + `|> angledLine(angle = 0deg, length = 2.37, tag = $rectangleSegmentA001) + |> angledLine(angle = segAng(rectangleSegmentA001) - 90deg, length = 7.8) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close()`.replaceAll('\n', '') @@ -2115,8 +2115,8 @@ profile003 = startProfile(sketch001, at = [206.63, -56.73]) await crnRect2point2() await page.waitForTimeout(300) await editor.expectEditor.toContain( - `|> angledLine(angle = 0, length = 5.49, tag = $rectangleSegmentA002) - |> angledLine(angle = segAng(rectangleSegmentA002) - 90, length = 4.14) + `|> angledLine(angle = 0deg, length = 5.49, tag = $rectangleSegmentA002) + |> angledLine(angle = segAng(rectangleSegmentA002) - 90deg, length = 4.14) |> angledLine(angle = segAng(rectangleSegmentA002), length = -segLen(rectangleSegmentA002)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close()`.replaceAll('\n', '') @@ -2134,8 +2134,8 @@ profile003 = startProfile(sketch001, at = [206.63, -56.73]) await cntrRect1point2() await page.waitForTimeout(300) await editor.expectEditor.toContain( - `|> angledLine(angle = 0, length = 7.06, tag = $rectangleSegmentA003) - |> angledLine(angle = segAng(rectangleSegmentA003) + 90, length = 4.34) + `|> angledLine(angle = 0deg, length = 7.06, tag = $rectangleSegmentA003) + |> angledLine(angle = segAng(rectangleSegmentA003) + 90deg, length = 4.34) |> angledLine(angle = segAng(rectangleSegmentA003), length = -segLen(rectangleSegmentA003)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close()`.replaceAll('\n', '') @@ -2150,8 +2150,8 @@ profile003 = startProfile(sketch001, at = [206.63, -56.73]) await cntrRect2point2() await page.waitForTimeout(300) await editor.expectEditor.toContain( - `|> angledLine(angle = 0, length = 3.12, tag = $rectangleSegmentA004) - |> angledLine(angle = segAng(rectangleSegmentA004) + 90, length = 6.24) + `|> angledLine(angle = 0deg, length = 3.12, tag = $rectangleSegmentA004) + |> angledLine(angle = segAng(rectangleSegmentA004) + 90deg, length = 6.24) |> angledLine(angle = segAng(rectangleSegmentA004), length = -segLen(rectangleSegmentA004)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close()`.replaceAll('\n', '') @@ -2300,8 +2300,8 @@ profile001 = startProfile(sketch001, at = [6.24, 4.54]) |> line(end = [8.61, 0.74]) |> line(end = [10.99, -5.22]) profile002 = startProfile(sketch001, at = [11.19, 5.02]) - |> angledLine(angle = 0, length = 10.78, tag = $rectangleSegmentA001) - |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 4.14) + |> angledLine(angle = 0deg, length = 10.78, tag = $rectangleSegmentA001) + |> angledLine(angle = segAng(rectangleSegmentA001) - 90deg, length = 4.14) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() @@ -2373,7 +2373,7 @@ profile004 = circleThreePoint(sketch001, p1 = [13.44, -6.8], p2 = [13.39, -2.07] await page.mouse.up() await page.waitForTimeout(200) await editor.expectEditor.toContain( - `angledLine(angle = -7, length = 10.27, tag = $rectangleSegmentA001)` + `angledLine(angle = -7deg, length = 10.27, tag = $rectangleSegmentA001)` ) }) @@ -2415,8 +2415,8 @@ profile004 = circleThreePoint(sketch001, p1 = [13.44, -6.8], p2 = [13.39, -2.07] await page.waitForTimeout(100) await rectEnd() await editor.expectEditor.toContain( - `|> angledLine(angle = 180, length = 1.97, tag = $rectangleSegmentA002) - |> angledLine(angle = segAng(rectangleSegmentA002) + 90, length = 3.89) + `|> angledLine(angle = 180deg, length = 1.97, tag = $rectangleSegmentA002) + |> angledLine(angle = segAng(rectangleSegmentA002) + 90deg, length = 3.89) |> angledLine(angle = segAng(rectangleSegmentA002), length = -segLen(rectangleSegmentA002)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close()`.replaceAll('\n', '') @@ -2441,8 +2441,8 @@ profile001 = startProfile(sketch001, at = [6.24, 4.54]) |> line(end = [8.61, 0.74]) |> line(end = [10.99, -5.22]) profile002 = startProfile(sketch001, at = [11.19, 5.02]) - |> angledLine(angle = 0, length = 10.78, tag = $rectangleSegmentA001) - |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 4.14) + |> angledLine(angle = 0deg, length = 10.78, tag = $rectangleSegmentA001) + |> angledLine(angle = segAng(rectangleSegmentA001) - 90deg, length = 4.14) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() @@ -2771,8 +2771,8 @@ profile002 = startProfile(sketch002, at = [0.75, 13.46]) |> line(end = [4.52, 3.79]) |> line(end = [5.98, -2.81]) profile003 = startProfile(sketch002, at = [3.19, 13.3]) - |> angledLine(angle = 0, length = 6.64, tag = $rectangleSegmentA001) - |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 2.81) + |> angledLine(angle = 0deg, length = 6.64, tag = $rectangleSegmentA001) + |> angledLine(angle = segAng(rectangleSegmentA001) - 90deg, length = 2.81) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() @@ -2789,7 +2789,7 @@ profile006 = startProfile(sketch002, at = [9.65, 3.82]) |> close() revolve001 = revolve( profile004, - angle = 45, + angle = 45deg, axis = getNextAdjacentEdge(seg01) ) extrude002 = extrude(profile006, length = 4) @@ -2813,8 +2813,8 @@ profile010 = circle( radius = 2.67 ) profile011 = startProfile(sketch003, at = [5.07, -6.39]) - |> angledLine(angle = 0, length = 4.54, tag = $rectangleSegmentA002) - |> angledLine(angle = segAng(rectangleSegmentA002) - 90, length = 4.17) + |> angledLine(angle = 0deg, length = 4.54, tag = $rectangleSegmentA002) + |> angledLine(angle = segAng(rectangleSegmentA002) - 90deg, length = 4.17) |> angledLine(angle = segAng(rectangleSegmentA002), length = -segLen(rectangleSegmentA002)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() @@ -2966,7 +2966,7 @@ loft([profile001, profile002]) ) await rect1Crn2() await editor.expectEditor.toContain( - `angledLine(angle = 0, length = 113.01, tag = $rectangleSegmentA001)` + `angledLine(angle = 0deg, length = 113.01, tag = $rectangleSegmentA001)` ) }) test('Can enter sketch loft edges offsetPlane and continue sketch', async ({ @@ -3035,7 +3035,7 @@ loft([profile001, profile002]) ) await rect1Crn2() await editor.expectEditor.toContain( - `angledLine(angle = 0, length = 106.42], tag = $rectangleSegmentA001)` + `angledLine(angle = 0deg, length = 106.42], tag = $rectangleSegmentA001)` ) await page.waitForTimeout(100) }) @@ -3257,8 +3257,8 @@ test.describe('manual edits during sketch mode', () => { extrude001 = extrude(profile001, length = 500) sketch002 = startSketchOn(extrude001, face = seg01) profile002 = startProfile(sketch002, at = [83.39, 329.15]) - |> angledLine(angle = 0, length = 119.61, tag = $rectangleSegmentA001) - |> angledLine(length = 156.54, angle = -28) + |> angledLine(angle = 0deg, length = 119.61, tag = $rectangleSegmentA001) + |> angledLine(length = 156.54, angle = -28deg) |> angledLine( angle = -151, length = 116.27, @@ -3296,7 +3296,9 @@ test.describe('manual edits during sketch mode', () => { await expect .poll( async () => { - await editor.expectEditor.toContain('length = 156.54, angle = -28') + await editor.expectEditor.toContain( + 'length = 156.54, angle = -28deg' + ) await page.mouse.move(handle1Location.x, handle1Location.y) await page.mouse.down() await page.mouse.move( @@ -3307,7 +3309,9 @@ test.describe('manual edits during sketch mode', () => { } ) await page.mouse.up() - await editor.expectEditor.toContain('length = 231.59, angle = -34') + await editor.expectEditor.toContain( + 'length = 231.59, angle = -34deg' + ) return true }, { timeout: 10_000 } @@ -3325,7 +3329,7 @@ test.describe('manual edits during sketch mode', () => { const handle2Location = { x: 872, y: 273 } await test.step('Edit sketch again', async () => { - await editor.expectEditor.toContain('length = 231.59, angle = -34') + await editor.expectEditor.toContain('length = 231.59, angle = -34deg') await page.waitForTimeout(500) await expect .poll( @@ -3336,7 +3340,9 @@ test.describe('manual edits during sketch mode', () => { steps: 5, }) await page.mouse.up() - await editor.expectEditor.toContain('length = 167.36, angle = -14') + await editor.expectEditor.toContain( + 'length = 167.36, angle = -14deg' + ) return true }, { timeout: 10_000 } @@ -3361,14 +3367,18 @@ test.describe('manual edits during sketch mode', () => { await expect .poll( async () => { - await editor.expectEditor.toContain('length = 167.36, angle = -14') + await editor.expectEditor.toContain( + 'length = 167.36, angle = -14deg' + ) await page.mouse.move(handle3Location.x, handle3Location.y) await page.mouse.down() await page.mouse.move(handle3Location.x, handle3Location.y + 110, { steps: 5, }) await page.mouse.up() - await editor.expectEditor.toContain('length = 219.2, angle = -56') + await editor.expectEditor.toContain( + 'length = 219.2, angle = -56deg' + ) return true }, { timeout: 10_000 } @@ -3393,9 +3403,9 @@ profile001 = startProfile(sketch001, at = [106.68, 89.77]) extrude001 = extrude(profile001, length = 500) sketch002 = startSketchOn(extrude001, face = seg01) profile002 = startProfile(sketch002, at = [83.39, 329.15]) - |> angledLine(angle = 0, length = 119.61, tag = $rectangleSegmentA001) - |> angledLine(length = 219.2, angle = -56) - |> angledLine(angle = -151, length = 116.27) + |> angledLine(angle = 0deg, length = 119.61, tag = $rectangleSegmentA001) + |> angledLine(length = 219.2, angle = -56deg) + |> angledLine(angle = -151deg, length = 116.27) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() profile003 = startProfile(sketch002, at = [-201.08, 254.17]) @@ -3432,10 +3442,10 @@ profile003 = startProfile(sketch002, at = [-201.08, 254.17]) extrude001 = extrude(profile001, length = 500) sketch002 = startSketchOn(extrude001, face = seg01) profile002 = startProfile(sketch002, at = [83.39, 329.15]) - |> angledLine(angle = 0, length = 119.61, tag = $rectangleSegmentA001) - |> angledLine(length = 156.54, angle = -28) + |> angledLine(angle = 0deg, length = 119.61, tag = $rectangleSegmentA001) + |> angledLine(length = 156.54, angle = -28deg) |> angledLine( - angle = -151, + angle = -151deg, length = 116.27, ) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) @@ -3496,10 +3506,10 @@ profile003 = startProfile(sketch002, at = [-201.08, 254.17]) extrude001 = extrude(profile001, length = 500) sketch002 = startSketchOn(extrude001, face = seg01) profile002 = startProfile(sketch002, at = [83.39, 329.15]) - |> angledLine(angle = 0, length = 119.61, tag = $rectangleSegmentA001) - |> angledLine(length = 156.54, angle = -28) + |> angledLine(angle = 0deg, length = 119.61, tag = $rectangleSegmentA001) + |> angledLine(length = 156.54, angle = -28deg) |> angledLine( - angle = -151, + angle = -151deg, length = 116.27, ) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) diff --git a/e2e/playwright/snapshot-tests.spec.ts b/e2e/playwright/snapshot-tests.spec.ts index 5d59d9caa1..32ca803ce5 100644 --- a/e2e/playwright/snapshot-tests.spec.ts +++ b/e2e/playwright/snapshot-tests.spec.ts @@ -845,14 +845,14 @@ test.describe('code color goober', { tag: '@snapshot' }, () => { sweepPath = startSketchOn(XZ) |> startProfile(at = [0.05, 0.05]) |> line(end = [0, 7]) - |> tangentialArc(angle = 90, radius = 5) + |> tangentialArc(angle = 90deg, radius = 5) |> line(end = [-3, 0]) - |> tangentialArc(angle = -90, radius = 5) + |> tangentialArc(angle = -90deg, radius = 5) |> line(end = [0, 7]) sweepSketch = startSketchOn(XY) |> startProfile(at = [2, 0]) - |> arc(angleStart = 0, angleEnd = 360, radius = 2) + |> arc(angleStart = 0, angleEnd = 360deg, radius = 2) |> sweep(path = sweepPath) |> appearance( color = "#bb00ff", @@ -889,14 +889,14 @@ sweepSketch = startSketchOn(XY) sweepPath = startSketchOn(XZ) |> startProfile(at = [0.05, 0.05]) |> line(end = [0, 7]) - |> tangentialArc(angle = 90, radius = 5) + |> tangentialArc(angle = 90deg, radius = 5) |> line(end = [-3, 0]) - |> tangentialArc(angle = -90, radius = 5) + |> tangentialArc(angle = -90deg, radius = 5) |> line(end = [0, 7]) sweepSketch = startSketchOn(XY) |> startProfile(at = [2, 0]) - |> arc(angleStart = 0, angleEnd = 360, radius = 2) + |> arc(angleStart = 0deg, angleEnd = 360deg, radius = 2) |> sweep(path = sweepPath) |> appearance( color = '#bb00ff', @@ -934,14 +934,14 @@ sweepSketch = startSketchOn(XY) sweepPath = startSketchOn(XZ) |> startProfile(at = [0.05, 0.05]) |> line(end = [0, 7]) - |> tangentialArc(angle = 90, radius = 5) + |> tangentialArc(angle = 90deg, radius = 5) |> line(end = [-3, 0]) - |> tangentialArc(angle = -90, radius = 5) + |> tangentialArc(angle = -90deg, radius = 5) |> line(end = [0, 7]) sweepSketch = startSketchOn(XY) |> startProfile(at = [2, 0]) - |> arc(angleStart = 0, angleEnd = 360, radius = 2) + |> arc(angleStart = 0deg, angleEnd = 360deg, radius = 2) |> sweep(path = sweepPath) |> appearance( color = "#bb00ff", diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-1-Google-Chrome-linux.png index 1a6b72f11d..aab2024ba3 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-opening-window-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-opening-window-1-Google-Chrome-linux.png index ae43715377..b1204f3b51 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-opening-window-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-opening-window-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-works-with-single-quotes-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-works-with-single-quotes-1-Google-Chrome-linux.png index b585ffbd75..db4f540090 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-works-with-single-quotes-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-works-with-single-quotes-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/testing-constraints.spec.ts b/e2e/playwright/testing-constraints.spec.ts index bd2babdd66..8b4dea4d62 100644 --- a/e2e/playwright/testing-constraints.spec.ts +++ b/e2e/playwright/testing-constraints.spec.ts @@ -57,7 +57,7 @@ test.describe('Testing constraints', () => { .click() await expect(page.locator('.cm-content')).toHaveText( - `length001 = 20sketch001 = startSketchOn(XY) |> startProfile(at = [-10, -10]) |> line(end = [20, 0]) |> angledLine(angle = 90, length = length001) |> xLine(length = -20)` + `length001 = 20sketch001 = startSketchOn(XY) |> startProfile(at = [-10, -10]) |> line(end = [20, 0]) |> angledLine(angle = 90deg, length = length001) |> xLine(length = -20)` ) // Make sure we didn't pop out of sketch mode. @@ -208,7 +208,9 @@ test.describe('Testing constraints', () => { .click() // Wait for the codemod to take effect - await expect(page.locator('.cm-content')).toContainText(`angle = -57,`) + await expect(page.locator('.cm-content')).toContainText( + `angle = -57deg,` + ) await expect(page.locator('.cm-content')).toContainText( `offset = ${offset},` ) @@ -219,7 +221,7 @@ test.describe('Testing constraints', () => { `|> line(end = [74.36, 130.4], tag = $seg01)` ) await expect(activeLinesContent[1]).toHaveText( - ` |> angledLineThatIntersects(angle = -57, offset = ${offset}, intersectTag = seg01)` + ` |> angledLineThatIntersects(angle = -57deg, offset = ${offset}, intersectTag = seg01)` ) // checking the count of the overlays is a good proxy check that the client sketch scene is in a good state @@ -470,7 +472,7 @@ test.describe('Testing constraints', () => { testName: 'No variable', addVariable: false, axisSelect: false, - value: 'segAng(seg01) + 22.69', + value: 'segAng(seg01) + 22.69deg', }, { testName: 'Add variable, selecting axis', @@ -482,7 +484,7 @@ test.describe('Testing constraints', () => { testName: 'No variable, selecting axis', addVariable: false, axisSelect: true, - value: 'turns::QUARTER_TURN - 7', + value: 'turns::QUARTER_TURN - 7deg', }, ] as const for (const { testName, addVariable, value, axisSelect } of cases) { @@ -585,7 +587,7 @@ test.describe('Testing constraints', () => { testName: 'Angle - No variable', addVariable: false, constraint: 'angle', - value: '83, 78.33', + value: '83deg, 78.33', }, ] as const for (const { testName, addVariable, value, constraint } of cases) { @@ -657,13 +659,13 @@ test.describe('Testing constraints', () => { testName: 'Length - Add variable', addVariable: true, constraint: 'length', - value: '83, length001', + value: '83deg, length001', }, { testName: 'Length - No variable', addVariable: false, constraint: 'length', - value: '83, 78.33', + value: '83deg, 78.33', }, ] as const for (const { testName, addVariable, value, constraint } of cases) { @@ -852,7 +854,7 @@ part002 = startSketchOn(XZ) test.describe('Two segment - no modal constraints', () => { const cases = [ { - codeAfter: `|> angledLine(angle = 83, length = segLen(seg01))`, + codeAfter: `|> angledLine(angle = 83deg, length = segLen(seg01))`, constraintName: 'Equal Length', }, { @@ -1174,7 +1176,7 @@ test.describe('Electron constraint tests', () => { await cmdBar.progressCmdBar() await editor.expectEditor.toContain('length001 = 15.3') await editor.expectEditor.toContain( - '|> angledLine(angle = 9, length = length001)' + '|> angledLine(angle = 9deg, length = length001)' ) }) diff --git a/package-lock.json b/package-lock.json index f6d219b489..2984567764 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2495,6 +2495,7 @@ }, "node_modules/@clack/prompts/node_modules/is-unicode-supported": { "version": "1.3.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { diff --git a/public/kcl-samples/ball-bearing/main.kcl b/public/kcl-samples/ball-bearing/main.kcl index a6e8568a63..72a326a01f 100644 --- a/public/kcl-samples/ball-bearing/main.kcl +++ b/public/kcl-samples/ball-bearing/main.kcl @@ -27,7 +27,7 @@ insideWall = extrude(insideWallSketch, length = overallThickness) // Create the sketch of one of the balls ballsSketch = startSketchOn(XY) |> startProfile(at = [shaftDia / 2 + wallThickness, 0.001]) - |> arc(angleStart = 180, angleEnd = 0, radius = sphereDia / 2) + |> arc(angleStart = 180deg, angleEnd = 0, radius = sphereDia / 2) |> close() // Revolve the ball to make a sphere and pattern around the inside wall @@ -44,9 +44,9 @@ balls = revolve(ballsSketch, axis = X) chainSketch = startSketchOn(XY) |> startProfile(at = [ shaftDia / 2 + wallThickness + sphereDia / 2 - (chainWidth / 2), - 0.125 * sin(60) + 0.125 * sin(60deg) ]) - |> arc(angleStart = 120, angleEnd = 60, radius = sphereDia / 2) + |> arc(angleStart = 120deg, angleEnd = 60deg, radius = sphereDia / 2) |> line(end = [0, chainThickness]) |> line(end = [-chainWidth, 0]) |> close() @@ -54,7 +54,7 @@ chainSketch = startSketchOn(XY) // Revolve the chain sketch chainHead = revolve(chainSketch, axis = X) |> patternCircular3d( - arcDegrees = 360, + arcDegrees = 360deg, axis = [0, 0, 1], center = [0, 0, 0], instances = nBalls, @@ -72,9 +72,9 @@ linkSketch = startSketchOn(XZ) ) // Revolve the link sketch -linkRevolve = revolve(linkSketch, axis = Y, angle = 360 / nBalls) +linkRevolve = revolve(linkSketch, axis = Y, angle = 360deg / nBalls) |> patternCircular3d( - arcDegrees = 360, + arcDegrees = 360deg, axis = [0, 0, 1], center = [0, 0, 0], instances = nBalls, diff --git a/public/kcl-samples/brake-rotor/main.kcl b/public/kcl-samples/brake-rotor/main.kcl index 510363fd33..2b3cfd7885 100644 --- a/public/kcl-samples/brake-rotor/main.kcl +++ b/public/kcl-samples/brake-rotor/main.kcl @@ -23,12 +23,12 @@ nVentBosses = 36 // Drilling parameters. dDrillDia = 6 -aBase = 90 -aSweep = 30 +aBase = 90deg +aSweep = 30deg nArcs = 12 // Bell parameters. -aDraftBell = 5 +aDraftBell = 5deg tBell = 5 // Wall thickness. hBellAboveDiscFace = 40 hBellSubflush = 4 @@ -98,7 +98,7 @@ planeVent = offsetPlane(XY, offset = tDiscHalf) sketchVent = startSketchOn(planeVent) profileVent = startProfile(sketchVent, at = [-wVent, dDisc / 2]) |> angledLine(angle = 0, length = wVent, tag = $rectangleSegmentA001) - |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = hFrictionSurface, tag = $seg02) + |> angledLine(angle = segAng(rectangleSegmentA001) - 90deg, length = hFrictionSurface, tag = $seg02) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $seg03) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg01) |> close() @@ -118,7 +118,7 @@ ventSet = patternCircular3d( instances = nVentBosses, axis = [0, 0, 1], center = [0, 0, tDiscHalf], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) @@ -134,8 +134,8 @@ discOutboard = createDiscHalf( // Now create bell. rCenter = dDisc / 2 - hFrictionSurface - wUndercut rBore = dBore / 2 -lDraftExterior = hBellAboveDiscFace / tan(90 - aDraftBell) -lDraftInterior = (hBellAboveDiscFace - tBell) / tan(90 - aDraftBell) +lDraftExterior = hBellAboveDiscFace / tan(90deg - aDraftBell) +lDraftInterior = (hBellAboveDiscFace - tBell) / tan(90deg - aDraftBell) // Inner and outer radius of outboard face of disc bell. rOuter = rCenter - lDraftExterior - rBore @@ -151,7 +151,7 @@ bodyDiscBell = startProfile( ) |> arc( %, - angleStart = -180, + angleStart = -180deg, angleEnd = 0, radius = wUndercut / 2, ) @@ -172,7 +172,7 @@ profileStud = circle(sketchLugs, center = [0, dPitchCircle / 2], radius = dStudD %, instances = nStuds, center = [0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) diff --git a/public/kcl-samples/clock/main.kcl b/public/kcl-samples/clock/main.kcl index 7ff1ee8300..f9240788d2 100644 --- a/public/kcl-samples/clock/main.kcl +++ b/public/kcl-samples/clock/main.kcl @@ -28,8 +28,8 @@ hour = 9 minute = 29 // Calculate hand angles -hourHandAngle = 90 - (hour * 30) -minuteHandAngle = 90 - (minute * 6) +hourHandAngle = 90deg - (hour * 30deg) +minuteHandAngle = 90deg - (minute * 6deg) // Create the clock body clockBodySketch = startSketchOn(XY) @@ -72,18 +72,18 @@ numberObject = { // one = { i = [90, 160] }, one = { i = [ - clockDiameter / 2 * 3 / 4 * cos(60), - clockDiameter / 2 * 3 / 4 * sin(60) + clockDiameter / 2 * 3 / 4 * cos(60deg), + clockDiameter / 2 * 3 / 4 * sin(60deg) ] }, two = { i = [ - clockDiameter / 2 * 3 / 4 * cos(30) - 10, - clockDiameter / 2 * 3 / 4 * sin(30) + clockDiameter / 2 * 3 / 4 * cos(30deg) - 10, + clockDiameter / 2 * 3 / 4 * sin(30deg) ], i2 = [ - clockDiameter / 2 * 3 / 4 * cos(30) + 5, - clockDiameter / 2 * 3 / 4 * sin(30) + clockDiameter / 2 * 3 / 4 * cos(30deg) + 5, + clockDiameter / 2 * 3 / 4 * sin(30deg) ] }, three = { @@ -102,100 +102,100 @@ numberObject = { }, four = { i = [ - clockDiameter / 2 * 3 / 4 * cos(-30) - 10, - clockDiameter / 2 * 3 / 4 * sin(-30) + clockDiameter / 2 * 3 / 4 * cos(-30deg) - 10, + clockDiameter / 2 * 3 / 4 * sin(-30deg) ], v = [ - clockDiameter / 2 * 3 / 4 * cos(-30) + 13, - clockDiameter / 2 * 3 / 4 * sin(-30) + clockDiameter / 2 * 3 / 4 * cos(-30deg) + 13, + clockDiameter / 2 * 3 / 4 * sin(-30deg) ] }, five = { v = [ - clockDiameter / 2 * 3 / 4 * cos(-60), - clockDiameter / 2 * 3 / 4 * sin(-60) + clockDiameter / 2 * 3 / 4 * cos(-60deg), + clockDiameter / 2 * 3 / 4 * sin(-60deg) ] }, six = { v = [ - clockDiameter / 2 * 3 / 4 * cos(-90) - 10, - clockDiameter / 2 * 3 / 4 * sin(-90) + clockDiameter / 2 * 3 / 4 * cos(-90deg) - 10, + clockDiameter / 2 * 3 / 4 * sin(-90deg) ], i = [ - clockDiameter / 2 * 3 / 4 * cos(-90) + 12, - clockDiameter / 2 * 3 / 4 * sin(-90) + clockDiameter / 2 * 3 / 4 * cos(-90deg) + 12, + clockDiameter / 2 * 3 / 4 * sin(-90deg) ] }, seven = { v = [ - clockDiameter / 2 * 3 / 4 * cos(-120) - 15, - clockDiameter / 2 * 3 / 4 * sin(-120) + clockDiameter / 2 * 3 / 4 * cos(-120deg) - 15, + clockDiameter / 2 * 3 / 4 * sin(-120deg) ], i = [ - clockDiameter / 2 * 3 / 4 * cos(-120) + 5, - clockDiameter / 2 * 3 / 4 * sin(-120) + clockDiameter / 2 * 3 / 4 * cos(-120deg) + 5, + clockDiameter / 2 * 3 / 4 * sin(-120deg) ], i2 = [ - clockDiameter / 2 * 3 / 4 * cos(-120) + 20, - clockDiameter / 2 * 3 / 4 * sin(-120) + clockDiameter / 2 * 3 / 4 * cos(-120deg) + 20, + clockDiameter / 2 * 3 / 4 * sin(-120deg) ] }, eight = { v = [ - clockDiameter / 2 * 3 / 4 * cos(-150) - 10, - clockDiameter / 2 * 3 / 4 * sin(-150) + clockDiameter / 2 * 3 / 4 * cos(-150deg) - 10, + clockDiameter / 2 * 3 / 4 * sin(-150deg) ], i = [ - clockDiameter / 2 * 3 / 4 * cos(-150) + 10, - clockDiameter / 2 * 3 / 4 * sin(-150) + clockDiameter / 2 * 3 / 4 * cos(-150deg) + 10, + clockDiameter / 2 * 3 / 4 * sin(-150deg) ], i2 = [ - clockDiameter / 2 * 3 / 4 * cos(-150) + 25, - clockDiameter / 2 * 3 / 4 * sin(-150) + clockDiameter / 2 * 3 / 4 * cos(-150deg) + 25, + clockDiameter / 2 * 3 / 4 * sin(-150deg) ], i3 = [ - clockDiameter / 2 * 3 / 4 * cos(-150) + 40, - clockDiameter / 2 * 3 / 4 * sin(-150) + clockDiameter / 2 * 3 / 4 * cos(-150deg) + 40, + clockDiameter / 2 * 3 / 4 * sin(-150deg) ] }, nine = { i = [ - clockDiameter / 2 * 3 / 4 * cos(180) - 15, - clockDiameter / 2 * 3 / 4 * sin(180) + clockDiameter / 2 * 3 / 4 * cos(180deg) - 15, + clockDiameter / 2 * 3 / 4 * sin(180deg) ], x = [ - clockDiameter / 2 * 3 / 4 * cos(180) + 15, - clockDiameter / 2 * 3 / 4 * sin(180) + clockDiameter / 2 * 3 / 4 * cos(180deg) + 15, + clockDiameter / 2 * 3 / 4 * sin(180deg) ] }, ten = { x = [ - clockDiameter / 2 * 3 / 4 * cos(150) + 5, - clockDiameter / 2 * 3 / 4 * sin(150) + clockDiameter / 2 * 3 / 4 * cos(150deg) + 5, + clockDiameter / 2 * 3 / 4 * sin(150deg) ] }, eleven = { x = [ - clockDiameter / 2 * 3 / 4 * cos(120), - clockDiameter / 2 * 3 / 4 * sin(120) + clockDiameter / 2 * 3 / 4 * cos(120deg), + clockDiameter / 2 * 3 / 4 * sin(120deg) ], i = [ - clockDiameter / 2 * 3 / 4 * cos(120) + 10, - clockDiameter / 2 * 3 / 4 * sin(120) + clockDiameter / 2 * 3 / 4 * cos(120deg) + 10, + clockDiameter / 2 * 3 / 4 * sin(120deg) ] }, twelve = { x = [ - clockDiameter / 2 * 3 / 4 * cos(90) - 10, - clockDiameter / 2 * 3 / 4 * sin(90) + clockDiameter / 2 * 3 / 4 * cos(90deg) - 10, + clockDiameter / 2 * 3 / 4 * sin(90deg) ], i = [ - clockDiameter / 2 * 3 / 4 * cos(90) + 5, - clockDiameter / 2 * 3 / 4 * sin(90) + clockDiameter / 2 * 3 / 4 * cos(90deg) + 5, + clockDiameter / 2 * 3 / 4 * sin(90deg) ], i2 = [ - clockDiameter / 2 * 3 / 4 * cos(90) + 20, - clockDiameter / 2 * 3 / 4 * sin(90) + clockDiameter / 2 * 3 / 4 * cos(90deg) + 20, + clockDiameter / 2 * 3 / 4 * sin(90deg) ] } } @@ -234,16 +234,16 @@ fn letterX(startX, startY) { ], ) |> xLine(%, length = xWidth / 6) - |> angledLine(%, angle = -70, lengthY = xLength * 1 / 3) - |> angledLine(%, angle = 70, lengthY = xLength * 1 / 3) + |> angledLine(%, angle = -70deg, lengthY = xLength * 1 / 3) + |> angledLine(%, angle = 70deg, lengthY = xLength * 1 / 3) |> xLine(%, length = xWidth / 6) - |> angledLine(%, angle = 70 + 180, lengthY = xLength * 1 / 2) - |> angledLine(%, angle = -70, lengthY = xLength * 1 / 2) + |> angledLine(%, angle = 70deg + 180deg, lengthY = xLength * 1 / 2) + |> angledLine(%, angle = -70deg, lengthY = xLength * 1 / 2) |> xLine(%, length = -xWidth / 6) - |> angledLine(%, angle = -70 - 180, lengthY = xLength * 1 / 3) - |> angledLine(%, angle = 70 + 180, lengthY = xLength * 1 / 3) + |> angledLine(%, angle = -70deg - 180deg, lengthY = xLength * 1 / 3) + |> angledLine(%, angle = 70deg + 180deg, lengthY = xLength * 1 / 3) |> xLine(%, length = -xWidth / 6) - |> angledLine(%, angle = 70, lengthY = xLength * 1 / 2) + |> angledLine(%, angle = 70deg, lengthY = xLength * 1 / 2) |> close(%) |> extrude(%, length = numberThickness) |> appearance(%, color = "#140f0f") @@ -333,25 +333,25 @@ sketch005 = startSketchOn(offsetPlane(XY, offset = 55)) profile007 = startProfile( sketch005, at = [ - nubDiameter / 2 * 1.375 * cos(hourHandAngle + 20), - nubDiameter / 2 * 1.375 * sin(hourHandAngle + 20) + nubDiameter / 2 * 1.375 * cos(hourHandAngle + 20deg), + nubDiameter / 2 * 1.375 * sin(hourHandAngle + 20deg) ], ) |> arc( %, interiorAbsolute = [ - nubDiameter / 2 * 1.375 * cos(hourHandAngle + 180), - nubDiameter / 2 * 1.375 * sin(hourHandAngle + 180) + nubDiameter / 2 * 1.375 * cos(hourHandAngle + 180deg), + nubDiameter / 2 * 1.375 * sin(hourHandAngle + 180deg) ], endAbsolute = [ - nubDiameter / 2 * 1.375 * cos(hourHandAngle + 340), - nubDiameter / 2 * 1.375 * sin(hourHandAngle + 340) + nubDiameter / 2 * 1.375 * cos(hourHandAngle + 340deg), + nubDiameter / 2 * 1.375 * sin(hourHandAngle + 340deg) ], ) |> angledLine(%, angle = hourHandAngle, length = hourHandArmLength) |> angledLine( %, - angle = hourHandAngle - 90, + angle = hourHandAngle - 90deg, length = hourHandWidth / 2, tag = $seg004, ) @@ -363,9 +363,9 @@ profile007 = startProfile( ], tag = $seg002, ) - |> angledLine(%, angle = segAng(seg002) + 120, length = segLen(seg002)) - // |> angledLineThatIntersects(%, angle = segAng(seg002) + hourHandAngle - 90, intersectTag = seg004) - |> angledLine(%, angle = hourHandAngle - 90, length = segLen(seg004)) + |> angledLine(%, angle = segAng(seg002) + 120deg, length = segLen(seg002)) + // |> angledLineThatIntersects(%, angle = segAng(seg002) + hourHandAngle - 90deg, intersectTag = seg004) + |> angledLine(%, angle = hourHandAngle - 90deg, length = segLen(seg004)) |> line(%, endAbsolute = [profileStartX(%), profileStartY(%)]) |> close(%) profile008 = circle(sketch005, center = [0, 0], diameter = nubDiameter) @@ -378,25 +378,25 @@ sketch006 = startSketchOn(offsetPlane(XY, offset = 50)) profile009 = startProfile( sketch006, at = [ - nubDiameter / 2 * 1.375 * cos(minuteHandAngle + 20), - nubDiameter / 2 * 1.375 * sin(minuteHandAngle + 20) + nubDiameter / 2 * 1.375 * cos(minuteHandAngle + 20deg), + nubDiameter / 2 * 1.375 * sin(minuteHandAngle + 20deg) ], ) |> arc( %, interiorAbsolute = [ - nubDiameter / 2 * 1.375 * cos(minuteHandAngle + 180), - nubDiameter / 2 * 1.375 * sin(minuteHandAngle + 180) + nubDiameter / 2 * 1.375 * cos(minuteHandAngle + 180deg), + nubDiameter / 2 * 1.375 * sin(minuteHandAngle + 180deg) ], endAbsolute = [ - nubDiameter / 2 * 1.375 * cos(minuteHandAngle + 340), - nubDiameter / 2 * 1.375 * sin(minuteHandAngle + 340) + nubDiameter / 2 * 1.375 * cos(minuteHandAngle + 340deg), + nubDiameter / 2 * 1.375 * sin(minuteHandAngle + 340deg) ], ) |> angledLine(%, angle = minuteHandAngle, length = minuteHandArmLength) |> angledLine( %, - angle = minuteHandAngle - 90, + angle = minuteHandAngle - 90deg, length = minuteHandWidth / 2, tag = $seg003, ) @@ -408,8 +408,8 @@ profile009 = startProfile( ], tag = $seg005, ) - |> angledLine(%, angle = segAng(seg005) + 120, length = segLen(seg005)) - |> angledLine(%, angle = minuteHandAngle - 90, length = segLen(seg003)) + |> angledLine(%, angle = segAng(seg005) + 120deg, length = segLen(seg005)) + |> angledLine(%, angle = minuteHandAngle - 90deg, length = segLen(seg003)) |> line(%, endAbsolute = [profileStartX(%), profileStartY(%)]) |> close(%) profile010 = circle(sketch006, center = [0, 0], diameter = 30) @@ -430,8 +430,8 @@ profile004 = startProfile(sketch003, at = [-slotWidth / 2, 200]) |> arc( %, radius = screwHeadDiameter / 2 + screwTolerance, - angleStart = 120, - angleEnd = 420, + angleStart = 120deg, + angleEnd = 420deg, ) |> yLine(%, length = slotLength) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) diff --git a/public/kcl-samples/cold-plate/main.kcl b/public/kcl-samples/cold-plate/main.kcl index 37f5b9fa85..42f90b193b 100644 --- a/public/kcl-samples/cold-plate/main.kcl +++ b/public/kcl-samples/cold-plate/main.kcl @@ -14,15 +14,15 @@ coldPlate = startSketchOn(YZ) |> startProfile(at = [0, tubeDiameter * 2]) |> xLine(length = bendRadius - (tubeDiameter / 2)) |> yLine(length = -tubeDiameter) - |> tangentialArc(angle = 180, radius = tubeDiameter / 2) + |> tangentialArc(angle = 180deg, radius = tubeDiameter / 2) |> yLine(length = tubeDiameter) |> xLine(length = bendRadius * 2 - tubeDiameter, tag = $seg07) |> yLine(length = -tubeDiameter, tag = $seg09) - |> tangentialArc(angle = 180, radius = tubeDiameter / 2) + |> tangentialArc(angle = 180deg, radius = tubeDiameter / 2) |> yLine(length = tubeDiameter, tag = $seg08) |> xLine(length = bendRadius - (tubeDiameter / 2)) - |> angledLine(angle = -77, length = tubeDiameter / 3) - |> tangentialArc(angle = 77, radius = tubeDiameter, tag = $seg01) + |> angledLine(angle = -77deg, length = tubeDiameter / 3) + |> tangentialArc(angle = 77deg, radius = tubeDiameter, tag = $seg01) |> angledLine(angle = tangentToEnd(seg01), length = 1) |> yLine(endAbsolute = 0) |> xLine(endAbsolute = 0) @@ -34,11 +34,11 @@ coldPlate = startSketchOn(YZ) copperTubePath = startSketchOn(offsetPlane(XY, offset = tubeDiameter)) |> startProfile(at = [-7.35, -bendRadius * 3]) |> xLine(length = 14.13, tag = $seg05) - |> tangentialArc(angle = 180, radius = bendRadius, tag = $seg02) + |> tangentialArc(angle = 180deg, radius = bendRadius, tag = $seg02) |> angledLine(angle = tangentToEnd(seg02), length = 13.02, tag = $seg06) - |> tangentialArc(angle = -180, radius = bendRadius, tag = $seg03) + |> tangentialArc(angle = -180deg, radius = bendRadius, tag = $seg03) |> angledLine(angle = tangentToEnd(seg03), length = segLen(seg06)) - |> tangentialArc(angle = 180, radius = bendRadius, tag = $seg04) + |> tangentialArc(angle = 180deg, radius = bendRadius, tag = $seg04) |> angledLine(angle = tangentToEnd(seg04), length = segLen(seg05)) // Create the profile for the inner and outer diameter of the hollow copper tube diff --git a/public/kcl-samples/countersunk-plate/main.kcl b/public/kcl-samples/countersunk-plate/main.kcl index d42061e373..bf1f49d58d 100644 --- a/public/kcl-samples/countersunk-plate/main.kcl +++ b/public/kcl-samples/countersunk-plate/main.kcl @@ -22,13 +22,13 @@ tangentLength = (r1 - r2) / tan(tangentAngle) plateBody = startSketchOn(XY) // Use polar coordinates to start the sketch at the tangent point of the larger radius - |> startProfile(at = polar(angle = 90 - tangentAngle, length = r1)) + |> startProfile(at = polar(angle = 90deg - tangentAngle, length = r1)) |> angledLine(angle = -tangentAngle, length = tangentLength) - |> tangentialArc(radius = r2, angle = (tangentAngle - 90) * 2) + |> tangentialArc(radius = r2, angle = (tangentAngle - 90deg) * 2) |> angledLine(angle = tangentAngle, length = -tangentLength) |> tangentialArc(radius = r1, angle = -tangentAngle * 2) |> angledLine(angle = -tangentAngle, length = -tangentLength) - |> tangentialArc(radius = r2, angle = (tangentAngle - 90) * 2) + |> tangentialArc(radius = r2, angle = (tangentAngle - 90deg) * 2) |> angledLine(angle = tangentAngle, length = tangentLength) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() diff --git a/public/kcl-samples/cpu-cooler/fan-housing.kcl b/public/kcl-samples/cpu-cooler/fan-housing.kcl index 812a733a45..30270378df 100644 --- a/public/kcl-samples/cpu-cooler/fan-housing.kcl +++ b/public/kcl-samples/cpu-cooler/fan-housing.kcl @@ -12,7 +12,7 @@ import * from "parameters.kcl" bottomFaceSketch = startSketchOn(YZ) |> startProfile(at = [-fanSize / 2, -fanSize / 2]) |> angledLine(angle = 0, length = fanSize, tag = $rectangleSegmentA001) - |> angledLine(angle = segAng(rectangleSegmentA001) + 90, length = fanSize, tag = $rectangleSegmentB001) + |> angledLine(angle = segAng(rectangleSegmentA001) + 90deg, length = fanSize, tag = $rectangleSegmentB001) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $rectangleSegmentC001) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $rectangleSegmentD001) |> close() @@ -50,12 +50,12 @@ bottomFaceSketch = startSketchOn(YZ) // Add large openings to the bottom face to allow airflow through the fan airflowPattern = startSketchOn(bottomFaceSketch, face = END) |> startProfile(at = [fanSize * 7 / 25, -fanSize * 9 / 25]) - |> angledLine(angle = 140, length = fanSize * 12 / 25, tag = $seg01) - |> tangentialArc(radius = fanSize * 1 / 50, angle = 90) - |> angledLine(angle = -130, length = fanSize * 8 / 25) - |> tangentialArc(radius = fanSize * 1 / 50, angle = 90) - |> angledLine(angle = segAng(seg01) + 180, length = fanSize * 2 / 25) - |> tangentialArc(radius = fanSize * 8 / 25, angle = 40) + |> angledLine(angle = 140deg, length = fanSize * 12 / 25, tag = $seg01) + |> tangentialArc(radius = fanSize * 1 / 50, angle = 90deg) + |> angledLine(angle = -130deg, length = fanSize * 8 / 25) + |> tangentialArc(radius = fanSize * 1 / 50, angle = 90deg) + |> angledLine(angle = segAng(seg01) + 180deg, length = fanSize * 2 / 25) + |> tangentialArc(radius = fanSize * 8 / 25, angle = 40deg) |> xLine(length = fanSize * 3 / 25) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() @@ -75,13 +75,13 @@ bodyMiddle = startSketchOn(bottomFaceSketch, face = END) housingMiddleLength / 2, -housingMiddleLength / 2 - housingMiddleRadius ]) - |> tangentialArc(radius = housingMiddleRadius, angle = 90) + |> tangentialArc(radius = housingMiddleRadius, angle = 90deg) |> yLine(length = housingMiddleLength) - |> tangentialArc(radius = housingMiddleRadius, angle = 90) + |> tangentialArc(radius = housingMiddleRadius, angle = 90deg) |> xLine(length = -housingMiddleLength) - |> tangentialArc(radius = housingMiddleRadius, angle = 90) + |> tangentialArc(radius = housingMiddleRadius, angle = 90deg) |> yLine(length = -housingMiddleLength) - |> tangentialArc(radius = housingMiddleRadius, angle = 90) + |> tangentialArc(radius = housingMiddleRadius, angle = 90deg) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> extrude(length = fanHeight - 4 - 4) diff --git a/public/kcl-samples/cpu-cooler/fan.kcl b/public/kcl-samples/cpu-cooler/fan.kcl index 602c8401f9..c3ee99c36b 100644 --- a/public/kcl-samples/cpu-cooler/fan.kcl +++ b/public/kcl-samples/cpu-cooler/fan.kcl @@ -20,32 +20,32 @@ fn fanBlade(offsetHeight, startAngle) { 15 * cos(startAngle), 15 * sin(startAngle) ]) - |> arc(angleStart = startAngle, angleEnd = startAngle + 14, radius = 15) + |> arc(angleStart = startAngle, angleEnd = startAngle + 14deg, radius = 15) |> arc( endAbsolute = [ - fanSize * 22 / 50 * cos(startAngle - 20), - fanSize * 22 / 50 * sin(startAngle - 20) + fanSize * 22 / 50 * cos(startAngle - 20deg), + fanSize * 22 / 50 * sin(startAngle - 20deg) ], interiorAbsolute = [ - fanSize * 11 / 50 * cos(startAngle + 3), - fanSize * 11 / 50 * sin(startAngle + 3) + fanSize * 11 / 50 * cos(startAngle + 3deg), + fanSize * 11 / 50 * sin(startAngle + 3deg) ], ) |> arc( endAbsolute = [ - fanSize * 22 / 50 * cos(startAngle - 24), - fanSize * 22 / 50 * sin(startAngle - 24) + fanSize * 22 / 50 * cos(startAngle - 24deg), + fanSize * 22 / 50 * sin(startAngle - 24deg) ], interiorAbsolute = [ - fanSize * 22 / 50 * cos(startAngle - 22), - fanSize * 22 / 50 * sin(startAngle - 22) + fanSize * 22 / 50 * cos(startAngle - 22deg), + fanSize * 22 / 50 * sin(startAngle - 22deg) ], ) |> arc( endAbsolute = [profileStartX(%), profileStartY(%)], interiorAbsolute = [ - fanSize * 11 / 50 * cos(startAngle - 5), - fanSize * 11 / 50 * sin(startAngle - 5) + fanSize * 11 / 50 * cos(startAngle - 5deg), + fanSize * 11 / 50 * sin(startAngle - 5deg) ], ) |> close() @@ -54,8 +54,8 @@ fn fanBlade(offsetHeight, startAngle) { // Loft the fan blade cross sections into a single blade, then pattern them about the fan center crossSections = [ - fanBlade(offsetHeight = 4.5, startAngle = 50), - fanBlade(offsetHeight = (fanHeight - 2 - 4) / 2, startAngle = 30), + fanBlade(offsetHeight = 4.5, startAngle = 50deg), + fanBlade(offsetHeight = (fanHeight - 2 - 4) / 2, startAngle = 30deg), fanBlade(offsetHeight = fanHeight - 2, startAngle = 0) ] bladeLoft = loft(crossSections) @@ -63,7 +63,7 @@ bladeLoft = loft(crossSections) instances = 9, axis = [1, 0, 0], center = [0, 0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) diff --git a/public/kcl-samples/cpu-cooler/heat-sink.kcl b/public/kcl-samples/cpu-cooler/heat-sink.kcl index 71f0846e06..1e583ebf66 100644 --- a/public/kcl-samples/cpu-cooler/heat-sink.kcl +++ b/public/kcl-samples/cpu-cooler/heat-sink.kcl @@ -11,10 +11,10 @@ import * from "parameters.kcl" endTubePath = startSketchOn(offsetPlane(YZ, offset = -20)) |> startProfile(at = [fanSize / 4, fanSize + 38]) |> yLine(endAbsolute = bendRadius + 10, tag = $seg01) - |> tangentialArc(radius = bendRadius, angle = -90) + |> tangentialArc(radius = bendRadius, angle = -90deg) |> xLine(endAbsolute = 0, tag = $seg02) |> xLine(length = -segLen(seg02)) - |> tangentialArc(radius = bendRadius, angle = -90) + |> tangentialArc(radius = bendRadius, angle = -90deg) |> yLine(length = segLen(seg01)) // Sweep and translate the outermost tube on each end @@ -35,13 +35,13 @@ endTube = startSketchOn(offsetPlane(XY, offset = fanSize + 38)) centerTubePath = startSketchOn(offsetPlane(YZ, offset = -4)) |> startProfile(at = [fanSize / 2.67, fanSize + 38]) |> yLine(endAbsolute = bendRadius + 15 + 10) - |> tangentialArc(radius = bendRadius, angle = -45) - |> angledLine(angle = -135, lengthY = 15) - |> tangentialArc(radius = bendRadius, angle = -45) + |> tangentialArc(radius = bendRadius, angle = -45deg) + |> angledLine(angle = -135deg, lengthY = 15) + |> tangentialArc(radius = bendRadius, angle = -45deg) |> xLine(endAbsolute = 0, tag = $seg03) |> xLine(length = -segLen(seg03)) - |> tangentialArc(radius = bendRadius, angle = -155) - |> tangentialArc(radius = bendRadius, angle = 65) + |> tangentialArc(radius = bendRadius, angle = -155deg) + |> tangentialArc(radius = bendRadius, angle = 65deg) |> yLine(endAbsolute = fanSize + 38) // Draw the profile and sweep the 4 interior tubes @@ -68,13 +68,13 @@ centerTube = startSketchOn(offsetPlane(XY, offset = fanSize + 38)) heatFins = startSketchOn(offsetPlane(XY, offset = 45)) |> startProfile(at = [0, -fanSize / 2]) |> xLine(length = 9) - |> angledLine(angle = -60, length = 2.5, tag = $seg04) + |> angledLine(angle = -60deg, length = 2.5, tag = $seg04) |> xLine(length = 0.75) |> arc(interiorAbsolute = [lastSegX(%) + 1, lastSegY(%) + 1.2], endAbsolute = [lastSegX(%) + 2, lastSegY(%)]) |> xLine(length = 0.75) - |> angledLine(angle = 60, length = segLen(seg04)) + |> angledLine(angle = 60deg, length = segLen(seg04)) |> xLine(endAbsolute = heatSinkDepth / 2 - 3) - |> tangentialArc(angle = 90, radius = 3) + |> tangentialArc(angle = 90deg, radius = 3) |> yLine(endAbsolute = 0) |> mirror2d(axis = X) |> mirror2d(axis = Y) @@ -91,11 +91,11 @@ heatFins = startSketchOn(offsetPlane(XY, offset = 45)) coolerBase = startSketchOn(-XZ) baseLower = startProfile(coolerBase, at = [0, 10]) |> xLine(length = -0.9) - |> arc(angleStart = 0, angleEnd = -180, radius = 3.1) + |> arc(angleStart = 0, angleEnd = -180deg, radius = 3.1) |> xLine(length = -1.8) - |> arc(angleStart = 0, angleEnd = -180, radius = 3) + |> arc(angleStart = 0, angleEnd = -180deg, radius = 3) |> xLine(length = -1.8) - |> arc(angleStart = 0, angleEnd = -180, radius = 3) + |> arc(angleStart = 0, angleEnd = -180deg, radius = 3) |> xLine(length = -1.8) |> xLine(length = -2) |> yLine(length = -10) @@ -105,15 +105,15 @@ baseLower = startProfile(coolerBase, at = [0, 10]) baseUpper = startProfile(coolerBase, at = [0, 10]) |> xLine(length = -0.9) - |> arc(angleStart = 0, angleEnd = 180, radius = 3.1) + |> arc(angleStart = 0, angleEnd = 180deg, radius = 3.1) |> xLine(length = -1.8) - |> arc(angleStart = 0, angleEnd = 180, radius = 3) + |> arc(angleStart = 0, angleEnd = 180deg, radius = 3) |> xLine(length = -1.8) - |> arc(angleStart = 0, angleEnd = 180, radius = 3) + |> arc(angleStart = 0, angleEnd = 180deg, radius = 3) |> xLine(length = -1.8) |> xLine(length = -1) |> yLine(length = 4) - |> tangentialArc(angle = -90, radius = 2) + |> tangentialArc(angle = -90deg, radius = 2) |> xLine(endAbsolute = 0) |> mirror2d(axis = Y) |> extrude(length = 2 * segLen(seg02) * 3 / 4, symmetric = true) @@ -122,15 +122,15 @@ baseUpper = startProfile(coolerBase, at = [0, 10]) mountingBracket = startSketchOn(XZ) |> startProfile(at = [-10, 16]) |> xLine(length = -20) - |> tangentialArc(angle = 20, radius = bendRadius) - |> angledLine(angle = -160, length = 14, tag = $seg09) - |> tangentialArc(angle = -30, radius = bendRadius + sheetThickness) - |> angledLine(angle = 170, length = 21.5, tag = $seg04Q) - |> angledLine(angle = 170 - 90, length = sheetThickness, tag = $seg08) - |> angledLine(angle = segAng(seg04Q) + 180, length = segLen(seg04Q), tag = $seg05E) - |> tangentialArc(angle = 30, radius = bendRadius) - |> angledLine(angle = segAng(seg09) + 180, length = segLen(seg09)) - |> tangentialArc(angle = -20, radius = bendRadius + sheetThickness) + |> tangentialArc(angle = 20deg, radius = bendRadius) + |> angledLine(angle = -160deg, length = 14, tag = $seg09) + |> tangentialArc(angle = -30deg, radius = bendRadius + sheetThickness) + |> angledLine(angle = 170deg, length = 21.5, tag = $seg04Q) + |> angledLine(angle = 170deg - 90, length = sheetThickness, tag = $seg08) + |> angledLine(angle = segAng(seg04Q) + 180deg, length = segLen(seg04Q), tag = $seg05E) + |> tangentialArc(angle = 30deg, radius = bendRadius) + |> angledLine(angle = segAng(seg09) + 180deg, length = segLen(seg09)) + |> tangentialArc(angle = -20deg, radius = bendRadius + sheetThickness) |> xLine(endAbsolute = profileStartX(%)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg07) |> close() @@ -166,6 +166,6 @@ thruHole = startSketchOn(mountingBracket, face = seg05E) instances = 2, axis = [0, 0, 1], center = [0, 0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) diff --git a/public/kcl-samples/cpu-cooler/main.kcl b/public/kcl-samples/cpu-cooler/main.kcl index ffc9a1b6ce..10a804f88b 100644 --- a/public/kcl-samples/cpu-cooler/main.kcl +++ b/public/kcl-samples/cpu-cooler/main.kcl @@ -37,7 +37,7 @@ mountingWire instances = 2, axis = [0, 1, 0], center = [0, 0, 40 + fanSize / 2], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) |> patternCircular3d( @@ -45,7 +45,7 @@ mountingWire instances = 2, axis = [0, 0, 1], center = [0, 0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) removableSticker diff --git a/public/kcl-samples/cpu-cooler/mounting-wire.kcl b/public/kcl-samples/cpu-cooler/mounting-wire.kcl index 2302efe62d..21cd4ff206 100644 --- a/public/kcl-samples/cpu-cooler/mounting-wire.kcl +++ b/public/kcl-samples/cpu-cooler/mounting-wire.kcl @@ -11,29 +11,29 @@ import * from "parameters.kcl" upperArm = startSketchOn(offsetPlane(XZ, offset = fanSize / 2 + 2)) |> startProfile(at = [-12, 40 + fanSize / 2]) |> yLine(length = 7) - |> tangentialArc(radius = 2, angle = 90) + |> tangentialArc(radius = 2, angle = 90deg) |> xLine(length = -9) - |> tangentialArc(radius = 2, angle = -90) + |> tangentialArc(radius = 2, angle = -90deg) |> yLine(length = 14) - |> tangentialArc(radius = 2, angle = 90) + |> tangentialArc(radius = 2, angle = 90deg) |> xLine(length = -9) - |> tangentialArc(radius = 2, angle = -80) - |> angledLine(angle = 100, endAbsoluteY = 40 + fanSize / 2 + mountingHoleSpacing / 2 - 1.5) - |> tangentialArc(radius = 2, angle = 80, tag = $seg07) + |> tangentialArc(radius = 2, angle = -80deg) + |> angledLine(angle = 100deg, endAbsoluteY = 40 + fanSize / 2 + mountingHoleSpacing / 2 - 1.5) + |> tangentialArc(radius = 2, angle = 80deg, tag = $seg07) // Draw the XZ component of the mounting wire path lowerArm = startSketchOn(offsetPlane(XZ, offset = fanSize / 2 + 2)) |> startProfile(at = [-12, 40 + fanSize / 2]) |> yLine(length = -7) - |> tangentialArc(radius = 2, angle = -90) + |> tangentialArc(radius = 2, angle = -90deg) |> xLine(length = -9) - |> tangentialArc(radius = 2, angle = 90) + |> tangentialArc(radius = 2, angle = 90deg) |> yLine(length = -14) - |> tangentialArc(radius = 2, angle = -90) + |> tangentialArc(radius = 2, angle = -90deg) |> xLine(length = -9) - |> tangentialArc(radius = 2, angle = 80) - |> angledLine(angle = -100, endAbsoluteY = 40 + fanSize / 2 - (mountingHoleSpacing / 2) + 1.5) - |> tangentialArc(radius = 2, angle = -80, tag = $seg08) + |> tangentialArc(radius = 2, angle = 80deg) + |> angledLine(angle = -100deg, endAbsoluteY = 40 + fanSize / 2 - (mountingHoleSpacing / 2) + 1.5) + |> tangentialArc(radius = 2, angle = -80deg, tag = $seg08) // Create the profile of the mounting wire and sweep along the XZ path wireProfile = startSketchOn(offsetPlane(XY, offset = 40 + fanSize / 2)) @@ -47,18 +47,18 @@ sweepLowerArm = circle(wireProfile, center = [-12, -fanSize / 2 - 2], radius = 1 upperHook = startSketchOn(offsetPlane(XY, offset = segEndY(seg07))) |> startProfile(at = [segEndX(seg07), -fanSize / 2 - 2]) |> xLine(endAbsolute = -heatSinkDepth / 2 - fanHeight) - |> tangentialArc(radius = 2, angle = -90) + |> tangentialArc(radius = 2, angle = -90deg) |> yLine(endAbsolute = -mountingHoleSpacing / 2 - 2) - |> tangentialArc(radius = 2, angle = -90) + |> tangentialArc(radius = 2, angle = -90deg) |> xLine(length = fanHeight / 3) // Draw the XY components of the mounting wire path lowerHook = startSketchOn(offsetPlane(XY, offset = segEndY(seg08))) |> startProfile(at = [segEndX(seg07), -fanSize / 2 - 2]) |> xLine(endAbsolute = -heatSinkDepth / 2 - fanHeight) - |> tangentialArc(radius = 2, angle = -90) + |> tangentialArc(radius = 2, angle = -90deg) |> yLine(endAbsolute = -mountingHoleSpacing / 2 - 2) - |> tangentialArc(radius = 2, angle = -90) + |> tangentialArc(radius = 2, angle = -90deg) |> xLine(length = fanHeight / 3) // Sweep the wire profile around the hook-shaped segments of the mounting wire diff --git a/public/kcl-samples/cpu-cooler/removable-sticker.kcl b/public/kcl-samples/cpu-cooler/removable-sticker.kcl index 849089db1d..826aef4e64 100644 --- a/public/kcl-samples/cpu-cooler/removable-sticker.kcl +++ b/public/kcl-samples/cpu-cooler/removable-sticker.kcl @@ -8,7 +8,7 @@ removableSticker = startSketchOn(-XY) |> startProfile(at = [-12, -12]) |> angledLine(angle = 0, length = 24, tag = $rectangleSegmentA001) - |> angledLine(angle = segAng(rectangleSegmentA001) + 90, length = 24, tag = $rectangleSegmentB001) + |> angledLine(angle = segAng(rectangleSegmentA001) + 90deg, length = 24, tag = $rectangleSegmentB001) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $rectangleSegmentC001) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $rectangleSegmentD001) |> close() diff --git a/public/kcl-samples/cycloidal-gear/main.kcl b/public/kcl-samples/cycloidal-gear/main.kcl index 74d1f5848e..925e364d5d 100644 --- a/public/kcl-samples/cycloidal-gear/main.kcl +++ b/public/kcl-samples/cycloidal-gear/main.kcl @@ -14,11 +14,11 @@ fn cycloidalGear(gearPitch, gearHeight, holeDiameter, helixAngle: number(deg)) { gearPitch * 1.55 * cos(helixAngleP) + gearPitch * sin(-helixAngleP), gearPitch * 1.55 * sin(helixAngleP) + gearPitch * cos(-helixAngleP) ]) - |> arc(angleStart = 90 + helixAngleP, angleEnd = -90 + helixAngleP, radius = gearPitch) - |> tangentialArc(radius = gearPitch * 1.67, angle = 60) - |> tangentialArc(radius = gearPitch, angle = -180) - |> tangentialArc(radius = gearPitch * 1.67, angle = 60) - |> tangentialArc(radius = gearPitch, angle = -180) + |> arc(angleStart = 90deg + helixAngleP, angleEnd = -90deg + helixAngleP, radius = gearPitch) + |> tangentialArc(radius = gearPitch * 1.67, angle = 60deg) + |> tangentialArc(radius = gearPitch, angle = -180deg) + |> tangentialArc(radius = gearPitch * 1.67, angle = 60deg) + |> tangentialArc(radius = gearPitch, angle = -180deg) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close(%) |> subtract2d(tool = circle(center = [0, 0], radius = holeDiameter / 2)) @@ -40,5 +40,5 @@ cycloidalGear( gearPitch = .3, gearHeight = 1.5, holeDiameter = 0.297, - helixAngle = -80, + helixAngle = -80deg, ) diff --git a/public/kcl-samples/exhaust-manifold/main.kcl b/public/kcl-samples/exhaust-manifold/main.kcl index 6260b2e3d1..8b2886e0f5 100644 --- a/public/kcl-samples/exhaust-manifold/main.kcl +++ b/public/kcl-samples/exhaust-manifold/main.kcl @@ -27,9 +27,9 @@ fn primaryTube(n, angle001, length001, length002, length003) { sweepPath = startSketchOn(sweepPlane) |> startProfile(at = [0, plateHeight]) |> line(end = [0, length001]) - |> tangentialArc(angle = -80, radius = bendRadius, tag = $arc01) + |> tangentialArc(angle = -80deg, radius = bendRadius, tag = $arc01) |> angledLine(angle = tangentToEnd(arc01), length = length002) - |> tangentialArc(angle = 85, radius = bendRadius, tag = $arc02) + |> tangentialArc(angle = 85deg, radius = bendRadius, tag = $arc02) |> angledLine(angle = tangentToEnd(arc02), length = length003) // Create the cross section of each tube and sweep them @@ -51,21 +51,21 @@ primaryTube( ) primaryTube( n = 1, - angle001 = 1, + angle001 = 1deg, length001 = 3, length002 = 6, length003 = 5, ) primaryTube( n = 2, - angle001 = 24.3, + angle001 = 24.3deg, length001 = 5, length002 = 5, length003 = 3, ) primaryTube( n = 3, - angle001 = 25.2, + angle001 = 25.2deg, length001 = 5, length002 = 5, length003 = 3, @@ -75,20 +75,20 @@ primaryTube( flangeSketch = startSketchOn(XY) |> startProfile(at = [3 + 1.3, -1.25]) |> xLine(length = -2.6, tag = $seg01) - |> tangentialArc(radius = .3, angle = -40) - |> tangentialArc(radius = .9, angle = 80) - |> tangentialArc(radius = .3, angle = -40) + |> tangentialArc(radius = .3, angle = -40deg) + |> tangentialArc(radius = .9, angle = 80deg) + |> tangentialArc(radius = .3, angle = -40deg) |> xLine(length = -1.4, tag = $seg03) |> yLine(length = segLen(seg01), tag = $seg04) |> xLine(length = 3.1, tag = $seg05) - |> tangentialArc(radius = .3, angle = -40) - |> tangentialArc(radius = 1.5, angle = 80) - |> tangentialArc(radius = .3, angle = -40) + |> tangentialArc(radius = .3, angle = -40deg) + |> tangentialArc(radius = 1.5, angle = 80deg) + |> tangentialArc(radius = .3, angle = -40deg) |> xLine(length = segLen(seg05), tag = $seg07) |> yLine(endAbsolute = profileStartY(%), tag = $seg08) |> xLine(length = -segLen(seg03), tag = $seg09) - |> tangentialArc(radius = .3, angle = -40) - |> tangentialArc(radius = .9, angle = 80) + |> tangentialArc(radius = .3, angle = -40deg) + |> tangentialArc(radius = .9, angle = 80deg) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() diff --git a/public/kcl-samples/food-service-spatula/main.kcl b/public/kcl-samples/food-service-spatula/main.kcl index e0d5141dfc..4c2d00f88a 100644 --- a/public/kcl-samples/food-service-spatula/main.kcl +++ b/public/kcl-samples/food-service-spatula/main.kcl @@ -20,24 +20,24 @@ gripSlotWidth = 8.0 fn slot(sketch1, start, end, width) { angle = if start[0] == end[0] { if end[1] > start[1] { - 90 + 90deg } else { - 270 + 270deg } } else { if end[0] < start[0] { - units::toDegrees(atan((end[1] - start[1]) / (end[0] - start[0]))) + 180 + units::toDegrees(atan((end[1] - start[1]) / (end[0] - start[0]))) + 180deg } else { units::toDegrees(atan((end[1] - start[1]) / (end[0] - start[0]))) } } dist = sqrt(pow(end[1] - start[1], exp = 2) + pow(end[0] - start[0], exp = 2)) - xstart = width / 2 * cos(angle - 90) + start[0] - ystart = width / 2 * sin(angle - 90) + start[1] + xstart = width / 2 * cos(angle - 90deg) + start[0] + ystart = width / 2 * sin(angle - 90deg) + start[1] slotSketch = startProfile(sketch1, at = [xstart, ystart]) - |> angledLine(angle = angle, length = dist) - |> tangentialArc(radius = width / 2, angle = 180) - |> angledLine(angle = angle, length = -dist) + |> angledLine(angle, length = dist) + |> tangentialArc(radius = width / 2, angle = 180deg) + |> angledLine(angle, length = -dist) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() return slotSketch @@ -51,7 +51,7 @@ flipperProfile = startProfile(flipperSketch, at = [-flipperLength, -32.0]) |> line(end = [flipperLength, 2.0]) |> yLine(length = 60.0, tag = $backEdge) |> line(end = [-flipperLength, 2.0]) - |> arc(angleStart = 163.087610, angleEnd = 196.912390, radius = 110.0) + |> arc(angleStart = 163.087610deg, angleEnd = 196.912390deg, radius = 110.0) |> close() // Create a profile of the middle @@ -137,13 +137,13 @@ gripSketch = startSketchOn(handlePlane) // Create a profile of the grip gripProfile = startProfile(gripSketch, at = [-26.806746, -10.0]) |> xLine(length = gripWidth - (2 * gripFilletRadius)) - |> arc(angleStart = -90.0, angleEnd = 0.0, radius = gripFilletRadius) + |> arc(angleStart = -90.0deg, angleEnd = 0.0, radius = gripFilletRadius) |> yLine(length = gripHeight - (2 * gripFilletRadius)) - |> arc(angleStart = 0.0, angleEnd = 90.0, radius = gripFilletRadius) + |> arc(angleStart = 0.0, angleEnd = 90.0deg, radius = gripFilletRadius) |> xLine(length = -(gripWidth - (2 * gripFilletRadius))) - |> arc(angleStart = 90.0, angleEnd = 180.0, radius = gripFilletRadius) + |> arc(angleStart = 90.0deg, angleEnd = 180.0deg, radius = gripFilletRadius) |> yLine(length = -(gripHeight - (2 * gripFilletRadius)), tag = $gripEdgeTop) - |> arc(angleStart = 180.0, angleEnd = 270.0, radius = gripFilletRadius) + |> arc(angleStart = 180.0deg, angleEnd = 270.0deg, radius = gripFilletRadius) |> close() // Extrude the grip profile to create the grip diff --git a/public/kcl-samples/french-press/main.kcl b/public/kcl-samples/french-press/main.kcl index 4f19b3ae79..f8dedf5e05 100644 --- a/public/kcl-samples/french-press/main.kcl +++ b/public/kcl-samples/french-press/main.kcl @@ -13,11 +13,11 @@ handleThickness = 0.65 sketch001 = startSketchOn(XZ) |> startProfile(at = [carafeDiameter / 2, 5.7]) |> angledLine(angle = 0, length = 0.1, tag = $rectangleSegmentA001) - |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = -0.75, tag = $rectangleSegmentB001) + |> angledLine(angle = segAng(rectangleSegmentA001) - 90deg, length = -0.75, tag = $rectangleSegmentB001) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $rectangleSegmentC001) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() - |> revolve(angle = 360, axis = Y) + |> revolve(angle = 360deg, axis = Y) // Create an angled plane to sketch the supports plane001 = { @@ -32,19 +32,19 @@ sketch002 = startSketchOn(plane001) |> startProfile(at = [carafeDiameter / 2, 5.7]) |> xLine(length = 0.1) |> yLine(length = -5.2, tag = $edge1) - |> arc(angleStart = 180, angleEnd = 205, radius = 0.3) - |> angledLine(angle = -60, length = 0.6, tag = $edge2) - |> arc(angleStart = 30, angleEnd = -120, radius = 0.6) - |> angledLine(angle = 150, endAbsoluteY = -0.2, tag = $edge3) - |> arc(angleStart = 60, angleEnd = 90, radius = 0.5) + |> arc(angleStart = 180deg, angleEnd = 205deg, radius = 0.3) + |> angledLine(angle = -60deg, length = 0.6, tag = $edge2) + |> arc(angleStart = 30deg, angleEnd = -120deg, radius = 0.6) + |> angledLine(angle = 150deg, endAbsoluteY = -0.2, tag = $edge3) + |> arc(angleStart = 60deg, angleEnd = 90deg, radius = 0.5) |> xLine(endAbsolute = 0.1, tag = $edgeLen) |> yLine(length = 0.1) |> xLine(length = segLen(edgeLen) + 0.035, tag = $edge4) - |> arc(angleStart = 90, angleEnd = 60, radius = 0.6) - |> angledLine(angle = 150, length = -segLen(edge3) + 0.035, tag = $edge5) - |> arc(angleStart = -120, angleEnd = 30, radius = 0.5) - |> angledLine(angle = -60, length = -segLen(edge2) + 0.035, tag = $edge6) - |> arc(angleStart = 205, angleEnd = 180, radius = 0.6) + |> arc(angleStart = 90deg, angleEnd = 60deg, radius = 0.6) + |> angledLine(angle = 150deg, length = -segLen(edge3) + 0.035, tag = $edge5) + |> arc(angleStart = -120deg, angleEnd = 30deg, radius = 0.5) + |> angledLine(angle = -60deg, length = -segLen(edge2) + 0.035, tag = $edge6) + |> arc(angleStart = 205deg, angleEnd = 180deg, radius = 0.6) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() |> extrude(length = 0.75) @@ -52,7 +52,7 @@ sketch002 = startSketchOn(plane001) axis = [0, 0, 1], center = [0, 0, 0], instances = 4, - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) @@ -65,7 +65,7 @@ extrude001 = extrude(sketch003, length = 0.050) sketch004 = startSketchOn(extrude001, face = END) |> startProfile(at = [0.3, 0.17]) |> yLine(length = 1.2) - |> arc(angleStart = 90, angleEnd = -30, radius = 1.2) + |> arc(angleStart = 90deg, angleEnd = -30deg, radius = 1.2) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() |> patternCircular2d( @@ -81,9 +81,9 @@ extrude002 = extrude(sketch004, length = -0.050) sketch005 = startSketchOn(XZ) |> startProfile(at = [0.15, 1.11]) |> xLine(endAbsolute = carafeDiameter / 2 - 0.2) - |> angledLine(angle = 30, endAbsoluteX = carafeDiameter / 2 - 0.07, tag = $seg1) - |> angledLine(angle = -60, length = 0.050) - |> angledLine(angle = 30, length = -segLen(seg1)) + |> angledLine(angle = 30deg, endAbsoluteX = carafeDiameter / 2 - 0.07, tag = $seg1) + |> angledLine(angle = -60deg, length = 0.050) + |> angledLine(angle = 30deg, length = -segLen(seg1)) |> xLine(endAbsolute = 0.15) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() @@ -93,11 +93,11 @@ sketch005 = startSketchOn(XZ) sketch006 = startSketchOn(XZ) |> startProfile(at = [0.1, 1]) |> line(end = [0.1, 0]) - |> angledLine(angle = 10, endAbsoluteX = 0.05) + |> angledLine(angle = 10deg, endAbsoluteX = 0.05) |> yLine(length = 10) |> line(end = [0.6, 0]) |> yLine(length = -.05) - |> tangentialArc(radius = 0.6, angle = -90) + |> tangentialArc(radius = 0.6, angle = -90deg) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() |> revolve(axis = Y) @@ -115,7 +115,7 @@ sketch008 = startSketchOn(extrude003, face = END) |> patternCircular2d( center = [0, 0], instances = 8, - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) @@ -127,7 +127,7 @@ sketch009 = startSketchOn(extrude003, face = END) |> patternCircular2d( center = [0, 0], instances = 4, - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) diff --git a/public/kcl-samples/hammer/main.kcl b/public/kcl-samples/hammer/main.kcl index 303729c61c..c769808421 100644 --- a/public/kcl-samples/hammer/main.kcl +++ b/public/kcl-samples/hammer/main.kcl @@ -10,16 +10,16 @@ headSideProfile = startSketchOn(XZ) |> yLine(length = 0.1) |> tangentialArc(endAbsolute = [0.95, 11.92]) |> tangentialArc(endAbsolute = [2.72, 11.26], tag = $seg01) - |> angledLine(angle = tangentToEnd(seg01) + 90, length = .2) - |> angledLine(angle = tangentToEnd(seg01) - 10, length = -0.5) + |> angledLine(angle = tangentToEnd(seg01) + 90deg, length = .2) + |> angledLine(angle = tangentToEnd(seg01) - 10deg, length = -0.5) |> tangentialArc(endAbsolute = [-0.91, 12.78], tag = $seg03) |> tangentialArc(endAbsolute = [-1.67, 12.85]) |> xLine(length = -.25) - |> tangentialArc(angle = 90, radius = .05) + |> tangentialArc(angle = 90deg, radius = .05) |> yLine(length = -1.125, tag = $seg02) - |> tangentialArc(angle = 90, radius = .05) + |> tangentialArc(angle = 90deg, radius = .05) |> xLine(length = .25, tag = $seg04) - |> angledLine(angle = 23, length = 0.1) + |> angledLine(angle = 23deg, length = 0.1) |> tangentialArc(endAbsolute = [-0.33, profileStartY(%)]) |> xLine(endAbsolute = profileStartX(%)) |> close() @@ -31,8 +31,8 @@ leftSideCut = startProfile(headTopProfile, at = [-4, -1.6]) |> line(endAbsolute = [segEndX(seg02), -segLen(seg02) / 2]) |> arc( %, - angleStart = 180, - angleEnd = 270, + angleStart = 180deg, + angleEnd = 270deg, radius = .05, ) |> xLine(endAbsolute = segEndX(seg04)) @@ -44,7 +44,7 @@ leftSideCut = startProfile(headTopProfile, at = [-4, -1.6]) |> extrude(length = -14) rearCut = startProfile(headTopProfile, at = [3.39, -0.56]) - |> angledLine(angle = 177, length = 0.1) + |> angledLine(angle = 177deg, length = 0.1) |> tangentialArc(endAbsolute = [1.86, -0.37]) |> tangentialArc(endAbsolute = [lastSegX(%), -lastSegY(%)]) |> tangentialArc(endAbsolute = [profileStartX(%), -profileStartY(%)]) @@ -56,8 +56,8 @@ rightSideCut = startProfile(headTopProfile, at = [-4, 1.6]) |> line(endAbsolute = [segEndX(seg02), segLen(seg02) / 2]) |> arc( %, - angleStart = -180, - angleEnd = -270, + angleStart = -180deg, + angleEnd = -270deg, radius = .05, ) |> xLine(endAbsolute = segEndX(seg04)) @@ -108,11 +108,11 @@ hammerHead = union([firstProfiles, baseSupport]) handleSketch = startSketchOn(XZ) |> startProfile(at = [0.01, 0]) |> xLine(length = 1.125 / 2) - |> tangentialArc(angle = 90, radius = 0.05) + |> tangentialArc(angle = 90deg, radius = 0.05) |> tangentialArc(endAbsolute = [0.38, 12.8 / 1.612]) |> tangentialArc(endAbsolute = [0.28, 12.8]) |> xLine(endAbsolute = profileStartX(%)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() -handle = revolve(handleSketch, angle = 360, axis = Y) +handle = revolve(handleSketch, angle = 360deg, axis = Y) |> appearance(color = "#f14f04") diff --git a/public/kcl-samples/helical-gear/main.kcl b/public/kcl-samples/helical-gear/main.kcl index 52f20fcc4e..589b5cbfa5 100644 --- a/public/kcl-samples/helical-gear/main.kcl +++ b/public/kcl-samples/helical-gear/main.kcl @@ -29,8 +29,8 @@ fn helicalGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { |> xLine(length = keywayDepth) |> yLine(length = -keywayWidth) |> xLine(length = -keywayDepth) - |> arc(angleStart = -1 * startAngle + 360, angleEnd = 180, radius = holeRadius) - |> arc(angleStart = 180, angleEnd = startAngle, radius = holeRadius) + |> arc(angleStart = -1 * startAngle + 360deg, angleEnd = 180deg, radius = holeRadius) + |> arc(angleStart = 180deg, angleEnd = startAngle, radius = holeRadius) |> close() // Define a function to create a rotated gear sketch on an offset plane @@ -47,7 +47,7 @@ fn helicalGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { angle = helixCalc, tag = $seg01, ) - |> line(endAbsolute = polar(angle = 160 / nTeeth + helixCalc, length = tipDiameter / 2)) + |> line(endAbsolute = polar(angle = 160deg / nTeeth + helixCalc, length = tipDiameter / 2)) |> involuteCircular( startRadius = baseDiameter / 2, endRadius = tipDiameter / 2, @@ -56,14 +56,14 @@ fn helicalGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { ) // Position the end line of the sketch at the start of the next tooth - |> line(endAbsolute = polar(angle = 360 / nTeeth + helixCalc, length = baseDiameter / 2)) + |> line(endAbsolute = polar(angle = 360deg / nTeeth + helixCalc, length = baseDiameter / 2)) // Pattern the sketch about the center by the specified number of teeth, then close the sketch |> patternCircular2d( %, instances = nTeeth, center = [0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) |> close() @@ -93,7 +93,7 @@ fn helicalGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { helicalGear( nTeeth = 21, module = 2, - pressureAngle = 20, - helixAngle = 35, + pressureAngle = 20deg, + helixAngle = 35deg, gearHeight = 7, ) diff --git a/public/kcl-samples/helical-planetary-gearset/main.kcl b/public/kcl-samples/helical-planetary-gearset/main.kcl index 96c0908b87..7706f4761e 100644 --- a/public/kcl-samples/helical-planetary-gearset/main.kcl +++ b/public/kcl-samples/helical-planetary-gearset/main.kcl @@ -29,8 +29,8 @@ fn helicalGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { |> xLine(length = keywayDepth) |> yLine(length = -keywayWidth) |> xLine(length = -keywayDepth) - |> arc(angleStart = -1 * startAngle + 360, angleEnd = 180, radius = holeRadius) - |> arc(angleStart = 180, angleEnd = startAngle, radius = holeRadius) + |> arc(angleStart = -1 * startAngle + 360deg, angleEnd = 180deg, radius = holeRadius) + |> arc(angleStart = 180deg, angleEnd = startAngle, radius = holeRadius) |> close() // Define a function to create a rotated gear sketch on an offset plane @@ -47,7 +47,7 @@ fn helicalGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { angle = helixCalc, tag = $seg01, ) - |> line(endAbsolute = polar(angle = 160 / nTeeth + helixCalc, length = tipDiameter / 2)) + |> line(endAbsolute = polar(angle = 160deg / nTeeth + helixCalc, length = tipDiameter / 2)) |> involuteCircular( startRadius = baseDiameter / 2, endRadius = tipDiameter / 2, @@ -56,14 +56,14 @@ fn helicalGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { ) // Position the end line of the sketch at the start of the next tooth - |> line(endAbsolute = polar(angle = 360 / nTeeth + helixCalc, length = baseDiameter / 2)) + |> line(endAbsolute = polar(angle = 360deg / nTeeth + helixCalc, length = baseDiameter / 2)) // Pattern the sketch about the center by the specified number of teeth, then close the sketch |> patternCircular2d( %, instances = nTeeth, center = [0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) |> close() @@ -113,7 +113,7 @@ fn ringGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { angle = helixCalc, tag = $seg01, ) - |> line(endAbsolute = polar(angle = 200 / nTeeth + helixCalc, length = tipDiameter / 2)) + |> line(endAbsolute = polar(angle = 200deg / nTeeth + helixCalc, length = tipDiameter / 2)) |> involuteCircular( startRadius = baseDiameter / 2, endRadius = tipDiameter / 2, @@ -129,7 +129,7 @@ fn ringGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { %, instances = nTeeth, center = [0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) |> close() @@ -164,8 +164,8 @@ fn ringGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { ringGear( nTeeth = 42, module = 1.5, - pressureAngle = 14, - helixAngle = -25, + pressureAngle = 14deg, + helixAngle = -25deg, gearHeight = 5, ) @@ -173,8 +173,8 @@ ringGear( helicalGear( nTeeth = 12, module = 1.5, - pressureAngle = 14, - helixAngle = 25, + pressureAngle = 14deg, + helixAngle = 25deg, gearHeight = 5, ) @@ -183,8 +183,8 @@ numPlanetGears = 3 helicalGear( nTeeth = 12, module = 1.5, - pressureAngle = 14, - helixAngle = -25, + pressureAngle = 14deg, + helixAngle = -25deg, gearHeight = 5, ) |> translate(y = (12 + 12) / 2 * 1.5 + 2.7) @@ -192,6 +192,6 @@ helicalGear( instances = numPlanetGears, axis = [0, 0, 1], center = [0, 0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = false, ) diff --git a/public/kcl-samples/helium-tank/main.kcl b/public/kcl-samples/helium-tank/main.kcl index 4a109ffbd4..2f45800792 100644 --- a/public/kcl-samples/helium-tank/main.kcl +++ b/public/kcl-samples/helium-tank/main.kcl @@ -17,26 +17,26 @@ tankSketch = startSketchOn(YZ) |> startProfile(at = [portDiameter / 2, tankHeight]) |> yLine(length = -0.6) |> xLine(length = 0.1) - |> tangentialArc(angle = -110, radius = 0.1) - |> tangentialArc(angle = 40, radius = 0.6) - |> tangentialArc(angle = -110, radius = 0.1) - |> tangentialArc(angle = 180, radius = 0.1) - |> tangentialArc(angle = -90, radius = tankDiameter / 2 - lastSegX(%), tag = $seg01) + |> tangentialArc(angle = -110deg, radius = 0.1) + |> tangentialArc(angle = 40deg, radius = 0.6) + |> tangentialArc(angle = -110deg, radius = 0.1) + |> tangentialArc(angle = 180deg, radius = 0.1) + |> tangentialArc(angle = -90deg, radius = tankDiameter / 2 - lastSegX(%), tag = $seg01) |> angledLine(angle = tangentToEnd(seg01), endAbsoluteY = 1.5, tag = $seg09) - |> tangentialArc(angle = -90, radius = 2, tag = $seg02) + |> tangentialArc(angle = -90deg, radius = 2, tag = $seg02) |> angledLine(angle = tangentToEnd(seg02), endAbsoluteX = 0.001, tag = $seg08) |> yLine(length = wallThickness) |> xLine(length = segLen(seg08)) - |> tangentialArc(angle = 90, radius = 2 - wallThickness) + |> tangentialArc(angle = 90deg, radius = 2 - wallThickness) |> yLine(length = segLen(seg09)) - |> tangentialArc(angle = 90, radius = tankDiameter / 2 - wallThickness - 1.3) + |> tangentialArc(angle = 90deg, radius = tankDiameter / 2 - wallThickness - 1.3) |> xLine(endAbsolute = profileStartX(%) - .1) |> yLine(endAbsolute = profileStartY(%)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() // Only revolving to 220deg so that the interior of the tank is visible. It should ultimately be closed at 360deg -tankRevolve = revolve(tankSketch, angle = 220, axis = Y) +tankRevolve = revolve(tankSketch, angle = 220deg, axis = Y) // Model the brass valve on top of the tank port valveBody = startSketchOn(offsetPlane(XY, offset = tankHeight - 0.5)) @@ -61,10 +61,10 @@ valve = union([valveBody, valvePort]) bracketOffsetProfile = startSketchOn(offsetPlane(XY, offset = tankHeight * 0.67)) |> startProfile(at = [0, tankDiameter / 2 + wallThickness]) |> xLine(length = -0.1) - |> tangentialArc(angle = 35, radius = tankDiameter / 2 + wallThickness) - |> tangentialArc(angle = -135, radius = 0.25 - wallThickness, tag = $seg06) + |> tangentialArc(angle = 35deg, radius = tankDiameter / 2 + wallThickness) + |> tangentialArc(angle = -135deg, radius = 0.25 - wallThickness, tag = $seg06) |> angledLine(angle = tangentToEnd(seg06), length = tankDiameter / 7) - |> tangentialArc(angle = -80, radius = 0.25 - wallThickness, tag = $seg07) + |> tangentialArc(angle = -80deg, radius = 0.25 - wallThickness, tag = $seg07) |> angledLine(angle = tangentToEnd(seg07), endAbsoluteX = 0) |> mirror2d(axis = Y) |> close() @@ -73,10 +73,10 @@ bracketOffsetProfile = startSketchOn(offsetPlane(XY, offset = tankHeight * 0.67) bracketProfile = startSketchOn(offsetPlane(XY, offset = tankHeight * 0.67)) |> startProfile(at = [0, tankDiameter / 2]) |> xLine(length = -0.1) - |> tangentialArc(angle = 35, radius = tankDiameter / 2) - |> tangentialArc(angle = -135, radius = 0.25, tag = $seg04) + |> tangentialArc(angle = 35deg, radius = tankDiameter / 2) + |> tangentialArc(angle = -135deg, radius = 0.25, tag = $seg04) |> angledLine(angle = tangentToEnd(seg04), length = tankDiameter / 7) - |> tangentialArc(angle = -80, radius = 0.25, tag = $seg05) + |> tangentialArc(angle = -80deg, radius = 0.25, tag = $seg05) |> angledLine(angle = tangentToEnd(seg05), endAbsoluteX = 0) |> mirror2d(axis = Y) |> close() diff --git a/public/kcl-samples/herringbone-gear/main.kcl b/public/kcl-samples/herringbone-gear/main.kcl index 82a2b55344..f368f53280 100644 --- a/public/kcl-samples/herringbone-gear/main.kcl +++ b/public/kcl-samples/herringbone-gear/main.kcl @@ -27,7 +27,7 @@ fn herringboneGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { angle = helixCalc, tag = $seg01, ) - |> line(endAbsolute = polar(angle = 160 / nTeeth + helixCalc, length = tipDiameter / 2)) + |> line(endAbsolute = polar(angle = 160deg / nTeeth + helixCalc, length = tipDiameter / 2)) |> involuteCircular( startRadius = baseDiameter / 2, endRadius = tipDiameter / 2, @@ -36,14 +36,14 @@ fn herringboneGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { ) // Position the end line of the sketch at the start of the next tooth - |> line(endAbsolute = polar(angle = 360 / nTeeth + helixCalc, length = baseDiameter / 2)) + |> line(endAbsolute = polar(angle = 360deg / nTeeth + helixCalc, length = baseDiameter / 2)) // Pattern the sketch about the center by the specified number of teeth, then close the sketch |> patternCircular2d( %, instances = nTeeth, center = [0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) |> close() @@ -78,7 +78,7 @@ fn herringboneGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { herringboneGear( nTeeth = 25, module = 1, - pressureAngle = 14, - helixAngle = 40, + pressureAngle = 14deg, + helixAngle = 40deg, gearHeight = 8, ) diff --git a/public/kcl-samples/herringbone-planetary-gearset/main.kcl b/public/kcl-samples/herringbone-planetary-gearset/main.kcl index 4fd110d143..77e0be4c0d 100644 --- a/public/kcl-samples/herringbone-planetary-gearset/main.kcl +++ b/public/kcl-samples/herringbone-planetary-gearset/main.kcl @@ -27,7 +27,7 @@ fn herringboneGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { angle = helixCalc, tag = $seg01, ) - |> line(endAbsolute = polar(angle = 160 / nTeeth + helixCalc, length = tipDiameter / 2)) + |> line(endAbsolute = polar(angle = 160deg / nTeeth + helixCalc, length = tipDiameter / 2)) |> involuteCircular( startRadius = baseDiameter / 2, endRadius = tipDiameter / 2, @@ -36,14 +36,14 @@ fn herringboneGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { ) // Position the end line of the sketch at the start of the next tooth - |> line(endAbsolute = polar(angle = 360 / nTeeth + helixCalc, length = baseDiameter / 2)) + |> line(endAbsolute = polar(angle = 360deg / nTeeth + helixCalc, length = baseDiameter / 2)) // Pattern the sketch about the center by the specified number of teeth, then close the sketch |> patternCircular2d( %, instances = nTeeth, center = [0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) |> close() @@ -98,7 +98,7 @@ fn ringGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { angle = helixCalc, tag = $seg01, ) - |> line(endAbsolute = polar(angle = 220 / nTeeth + helixCalc, length = tipDiameter / 2)) + |> line(endAbsolute = polar(angle = 220deg / nTeeth + helixCalc, length = tipDiameter / 2)) |> involuteCircular( startRadius = baseDiameter / 2, endRadius = tipDiameter / 2, @@ -107,14 +107,14 @@ fn ringGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { ) // Position the end line of the sketch at the start of the next tooth - |> line(endAbsolute = polar(angle = 360 / nTeeth + helixCalc, length = baseDiameter / 2)) + |> line(endAbsolute = polar(angle = 360deg / nTeeth + helixCalc, length = baseDiameter / 2)) // Pattern the sketch about the center by the specified number of teeth, then close the sketch |> patternCircular2d( %, instances = nTeeth, center = [0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) |> close() @@ -153,8 +153,8 @@ fn ringGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { ringGear( nTeeth = 58, module = 1.5, - pressureAngle = 14, - helixAngle = -35, + pressureAngle = 14deg, + helixAngle = -35deg, gearHeight = 8, ) @@ -162,8 +162,8 @@ ringGear( herringboneGear( nTeeth = 18, module = 1.5, - pressureAngle = 14, - helixAngle = 35, + pressureAngle = 14deg, + helixAngle = 35deg, gearHeight = 8, ) @@ -172,8 +172,8 @@ numPlanetGears = 4 herringboneGear( nTeeth = 18, module = 1.5, - pressureAngle = 14, - helixAngle = -35, + pressureAngle = 14deg, + helixAngle = -35deg, gearHeight = 8, ) |> translate(y = 18 * 1.5 + 1.95) @@ -181,6 +181,6 @@ herringboneGear( instances = numPlanetGears, axis = [0, 0, 1], center = [0, 0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = false, ) diff --git a/public/kcl-samples/i-beam/main.kcl b/public/kcl-samples/i-beam/main.kcl index 631c530d44..4ec07eec36 100644 --- a/public/kcl-samples/i-beam/main.kcl +++ b/public/kcl-samples/i-beam/main.kcl @@ -18,7 +18,7 @@ iBeam = startSketchOn(-XZ) |> xLine(length = flangeWidth / 2) |> yLine(length = -flangeThickness) |> xLine(endAbsolute = webThickness / 2 + rootRadius) - |> tangentialArc(radius = rootRadius, angle = 90) + |> tangentialArc(radius = rootRadius, angle = 90deg) |> yLine(endAbsolute = 0) |> mirror2d(axis = X) |> mirror2d(axis = Y) diff --git a/public/kcl-samples/keyboard/main.kcl b/public/kcl-samples/keyboard/main.kcl index f548564a4b..c8d04af1fd 100644 --- a/public/kcl-samples/keyboard/main.kcl +++ b/public/kcl-samples/keyboard/main.kcl @@ -22,7 +22,7 @@ row6 = row5 + keyHeight + spacing sketch001 = startSketchOn(YZ) |> startProfile(at = [0, 0]) |> line(end = [-0.14, 0.68], tag = $seg01) - |> angledLine(angle = 7, length = row6 + 3 * spacing + keyHeight, tag = $seg02) + |> angledLine(angle = 7deg, length = row6 + 3 * spacing + keyHeight, tag = $seg02) |> line(endAbsolute = [5.13, 0], tag = $seg03) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg04) |> close() @@ -66,13 +66,13 @@ plane001 = { fn keyFn(originStart, keyWidth, keyHeight, repeats, color) { sketch002 = startSketchOn(plane001) profile002 = startProfile(sketch002, at = [originStart[0], originStart[1]]) - |> arc(angleStart = 180, angleEnd = 270, radius = 0.1) + |> arc(angleStart = 180deg, angleEnd = 270deg, radius = 0.1) |> angledLine(angle = 0, length = keyWidth - .2, tag = $rectangleSegmentA001) - |> tangentialArc(radius = 0.1, angle = 90) - |> angledLine(angle = segAng(rectangleSegmentA001) + 90, length = keyHeight - .2, tag = $rectangleSegmentB001) - |> tangentialArc(radius = 0.1, angle = 90) + |> tangentialArc(radius = 0.1, angle = 90deg) + |> angledLine(angle = segAng(rectangleSegmentA001) + 90deg, length = keyHeight - .2, tag = $rectangleSegmentB001) + |> tangentialArc(radius = 0.1, angle = 90deg) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $rectangleSegmentC001) - |> tangentialArc(radius = 0.1, angle = 90) + |> tangentialArc(radius = 0.1, angle = 90deg) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $rectangleSegmentD001) |> close() |> extrude(length = keyDepth) @@ -263,15 +263,15 @@ fn z(origin, scale, depth) { ]) |> yLine(length = -0.15 * scale) |> xLine(length = 0.15 * scale) - |> angledLine(angle = 47.15, endAbsoluteX = 0.3 * scale + origin[0], tag = $seg1) + |> angledLine(angle = 47.15deg, endAbsoluteX = 0.3 * scale + origin[0], tag = $seg1) |> yLine(endAbsolute = 0 + origin[1], tag = $seg3) |> xLine(length = 0.63 * scale) |> yLine(length = 0.225 * scale) |> xLine(length = -0.57 * scale) - |> angledLine(angle = 47.15, endAbsoluteX = 0.93 * scale + origin[0]) + |> angledLine(angle = 47.15deg, endAbsoluteX = 0.93 * scale + origin[0]) |> yLine(length = 0.15 * scale) |> xLine(length = -0.15 * scale) - |> angledLine(angle = 47.15, length = -segLen(seg1), tag = $seg2) + |> angledLine(angle = 47.15deg, length = -segLen(seg1), tag = $seg2) |> yLine(length = segLen(seg3)) |> xLine(endAbsolute = 0 + origin[0]) |> yLine(length = -0.225 * scale) @@ -289,9 +289,9 @@ fn o(origin, scale, depth) { .788 * scale + origin[0], .921 * scale + origin[1] ]) - |> arc(angleStart = 47.15 + 6, angleEnd = 47.15 - 6 + 180, radius = .525 * scale) - |> angledLine(angle = 47.15, length = .24 * scale) - |> arc(angleStart = 47.15 - 11 + 180, angleEnd = 47.15 + 11, radius = .288 * scale) + |> arc(angleStart = 47.15deg + 6deg, angleEnd = 47.15deg - 6deg + 180deg, radius = .525 * scale) + |> angledLine(angle = 47.15deg, length = .24 * scale) + |> arc(angleStart = 47.15deg - 11deg + 180deg, angleEnd = 47.15deg + 11deg, radius = .288 * scale) |> close() |> extrude(length = -depth) |> appearance(color = baseColor) @@ -301,9 +301,9 @@ fn o(origin, scale, depth) { .16 * scale + origin[0], .079 * scale + origin[1] ]) - |> arc(angleStart = 47.15 + 6 - 180, angleEnd = 47.15 - 6, radius = .525 * scale) - |> angledLine(angle = 47.15, length = -.24 * scale) - |> arc(angleStart = 47.15 - 11, angleEnd = 47.15 + 11 - 180, radius = .288 * scale) + |> arc(angleStart = 47.15deg + 6deg - 180deg, angleEnd = 47.15deg - 6deg, radius = .525 * scale) + |> angledLine(angle = 47.15deg, length = -.24 * scale) + |> arc(angleStart = 47.15deg - 11deg, angleEnd = 47.15deg + 11deg - 180deg, radius = .288 * scale) |> close() |> extrude(length = -depth) |> appearance(color = baseColor) diff --git a/public/kcl-samples/poopy-shoe/main.kcl b/public/kcl-samples/poopy-shoe/main.kcl index 4f36377f2a..6fb5d3bc87 100644 --- a/public/kcl-samples/poopy-shoe/main.kcl +++ b/public/kcl-samples/poopy-shoe/main.kcl @@ -17,21 +17,21 @@ frontLength = 7 sketch001 = startSketchOn(-YZ) |> startProfile(at = [wallsWidth / 2, 0]) |> xLine(length = wallThickness / 2) - |> angledLine(angle = 60, endAbsoluteX = wallsWidth, tag = $seg01) + |> angledLine(angle = 60deg, endAbsoluteX = wallsWidth, tag = $seg01) |> yLine(endAbsolute = height) |> xLine(length = -wallThickness) |> yLine(endAbsolute = segEndY(seg01)) - |> angledLine(angle = 60, endAbsoluteX = wallsWidth / 2 + wallThickness / 2) + |> angledLine(angle = 60deg, endAbsoluteX = wallsWidth / 2 + wallThickness / 2) |> xLine(length = -wallThickness) - |> angledLine(angle = 180 - 60, endAbsoluteX = wallThickness) + |> angledLine(angle = 180deg - 60deg, endAbsoluteX = wallThickness) |> yLine(endAbsolute = height) |> xLine(endAbsolute = 0) |> yLine(endAbsolute = segEndY(seg01)) - |> angledLine(angle = 180 - 60, endAbsoluteY = 0) + |> angledLine(angle = 180deg - 60deg, endAbsoluteY = 0) |> close() part001 = revolve( sketch001, - angle = 90, + angle = 90deg, axis = { direction = [1.0, 0.0], origin = [0.0, height + .0001] @@ -41,17 +41,17 @@ part001 = revolve( sketch002 = startSketchOn(-YZ) |> startProfile(at = [wallsWidth / 2, 0]) |> xLine(length = wallThickness / 2) - |> angledLine(angle = 60, endAbsoluteX = wallsWidth, tag = $seg02) + |> angledLine(angle = 60deg, endAbsoluteX = wallsWidth, tag = $seg02) |> yLine(endAbsolute = height) |> xLine(length = -wallThickness) |> yLine(endAbsolute = segEndY(seg01)) - |> angledLine(angle = 60, endAbsoluteX = wallsWidth / 2 + wallThickness / 2) + |> angledLine(angle = 60deg, endAbsoluteX = wallsWidth / 2 + wallThickness / 2) |> xLine(length = -wallThickness) - |> angledLine(angle = 180 - 60, endAbsoluteX = wallThickness) + |> angledLine(angle = 180deg - 60deg, endAbsoluteX = wallThickness) |> yLine(endAbsolute = height) |> xLine(endAbsolute = 0) |> yLine(endAbsolute = segEndY(seg02)) - |> angledLine(angle = 180 - 60, endAbsoluteY = 0) + |> angledLine(angle = 180deg - 60deg, endAbsoluteY = 0) |> close() |> extrude(length = backLength - height) @@ -66,8 +66,8 @@ customPlane = { } sketch003 = startSketchOn(customPlane) |> startProfile(at = [0, 0]) - |> tangentialArc(angle = 60, radius = height) - |> angledLine(angle = 60, endAbsoluteY = 0) + |> tangentialArc(angle = 60deg, radius = height) + |> angledLine(angle = 60deg, endAbsoluteY = 0) |> close() |> extrude(length = wallThickness) @@ -77,9 +77,9 @@ sketch004 = startSketchOn(sketch002, face = END) |> yLine(endAbsolute = height) |> xLine(endAbsolute = wallThickness) |> yLine(endAbsolute = segEndY(seg01)) - |> angledLine(angle = 180 - 60, endAbsoluteX = wallsWidth / 2 - (wallThickness / 2)) + |> angledLine(angle = 180deg - 60deg, endAbsoluteX = wallsWidth / 2 - (wallThickness / 2)) |> xLine(length = wallThickness) - |> angledLine(angle = 60, endAbsoluteY = segEndY(seg01)) + |> angledLine(angle = 60deg, endAbsoluteY = segEndY(seg01)) |> yLine(endAbsolute = height) |> xLine(length = wallThickness) |> tangentialArc(endAbsolute = [ diff --git a/public/kcl-samples/prosthetic-hip/main.kcl b/public/kcl-samples/prosthetic-hip/main.kcl index e048101d7b..42b2ea0f67 100644 --- a/public/kcl-samples/prosthetic-hip/main.kcl +++ b/public/kcl-samples/prosthetic-hip/main.kcl @@ -10,10 +10,10 @@ r1 = 3 stemLoftProfile1 = startSketchOn(XY) |> startProfile(at = [-3, -l1 / 2]) |> yLine(length = l1, tag = $seg01) - |> tangentialArc(angle = -120, radius = r1) - |> angledLine(angle = -30, length = segLen(seg01)) - |> tangentialArc(angle = -120, radius = r1) - |> angledLine(angle = 30, length = -segLen(seg01)) + |> tangentialArc(angle = -120deg, radius = r1) + |> angledLine(angle = -30deg, length = segLen(seg01)) + |> tangentialArc(angle = -120deg, radius = r1) + |> angledLine(angle = 30deg, length = -segLen(seg01)) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() @@ -23,10 +23,10 @@ r2 = 3 stemLoftProfile2 = startSketchOn(offsetPlane(XY, offset = 75)) |> startProfile(at = [-8, -l2 / 2]) |> yLine(length = l2, tag = $seg02) - |> tangentialArc(angle = -120, radius = r2) - |> angledLine(angle = -30, length = segLen(seg02)) - |> tangentialArc(angle = -120, radius = r2) - |> angledLine(angle = 30, length = -segLen(seg02)) + |> tangentialArc(angle = -120deg, radius = r2) + |> angledLine(angle = -30deg, length = segLen(seg02)) + |> tangentialArc(angle = -120deg, radius = r2) + |> angledLine(angle = 30deg, length = -segLen(seg02)) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() @@ -38,10 +38,10 @@ r3 = 4 stemLoftProfile3 = startSketchOn(XY) |> startProfile(at = [-15.5, -l3 / 2]) |> yLine(length = l3, tag = $seg03) - |> tangentialArc(angle = -120, radius = r3) - |> angledLine(angle = -30, length = segLen(seg03)) - |> tangentialArc(angle = -120, radius = r3) - |> angledLine(angle = 30, length = -segLen(seg03)) + |> tangentialArc(angle = -120deg, radius = r3) + |> angledLine(angle = -30deg, length = segLen(seg03)) + |> tangentialArc(angle = -120deg, radius = r3) + |> angledLine(angle = 30deg, length = -segLen(seg03)) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() |> translate(z = p3Z) @@ -54,10 +54,10 @@ r4 = 5 stemLoftProfile4 = startSketchOn(XY) |> startProfile(at = [-23, -l4 / 2]) |> yLine(length = l4, tag = $seg04) - |> tangentialArc(angle = -120, radius = r4) - |> angledLine(angle = -30, length = segLen(seg04)) - |> tangentialArc(angle = -120, radius = r4) - |> angledLine(angle = 30, length = -segLen(seg04)) + |> tangentialArc(angle = -120deg, radius = r4) + |> angledLine(angle = -30deg, length = segLen(seg04)) + |> tangentialArc(angle = -120deg, radius = r4) + |> angledLine(angle = 30deg, length = -segLen(seg04)) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() |> translate(z = p4Z) @@ -70,10 +70,10 @@ r5 = 1.6 stemLoftProfile5 = startSketchOn(XY) |> startProfile(at = [-19.5, -l5 / 2]) |> yLine(length = l5, tag = $seg05) - |> tangentialArc(angle = -120, radius = r5) - |> angledLine(angle = -30, length = segLen(seg05)) - |> tangentialArc(angle = -120, radius = r5) - |> angledLine(angle = 30, length = -segLen(seg05)) + |> tangentialArc(angle = -120deg, radius = r5) + |> angledLine(angle = -30deg, length = segLen(seg05)) + |> tangentialArc(angle = -120deg, radius = r5) + |> angledLine(angle = 30deg, length = -segLen(seg05)) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() |> translate(z = p5Z) @@ -86,10 +86,10 @@ r6 = 3 stemLoftProfile6 = startSketchOn(XY) |> startProfile(at = [-23.4, -l6 / 2]) |> yLine(length = l6, tag = $seg06) - |> tangentialArc(angle = -120, radius = r6) - |> angledLine(angle = -30, length = segLen(seg06)) - |> tangentialArc(angle = -120, radius = r6) - |> angledLine(angle = 30, length = -segLen(seg06)) + |> tangentialArc(angle = -120deg, radius = r6) + |> angledLine(angle = -30deg, length = segLen(seg06)) + |> tangentialArc(angle = -120deg, radius = r6) + |> angledLine(angle = 30deg, length = -segLen(seg06)) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() |> translate(z = p6Z) @@ -114,13 +114,13 @@ stemTab = stemLoftProfile6 femoralHead = startSketchOn(XZ) |> startProfile(at = [4, 0]) |> xLine(length = 1.1) - |> tangentialArc(angle = 90, radius = 3) - |> tangentialArc(angle = 90, radius = 8) + |> tangentialArc(angle = 90deg, radius = 3) + |> tangentialArc(angle = 90deg, radius = 8) |> yLine(length = -1) - |> tangentialArc(angle = 90, radius = .1) + |> tangentialArc(angle = 90deg, radius = .1) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() - |> revolve(angle = 360, axis = Y) + |> revolve(angle = 360deg, axis = Y) |> translate(x = -16.1, z = 133) |> rotate(pitch = -36.5) |> appearance(color = "#d64398") @@ -135,7 +135,7 @@ polyethyleneInsert = startSketchOn(XZ) |> xLine(length = 0.58) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() - |> revolve(angle = 360, axis = Y) + |> revolve(angle = 360deg, axis = Y) |> translate(x = -16.1, z = 133) |> rotate(pitch = -36.5) |> appearance(color = "#3cadd3") @@ -150,7 +150,7 @@ acetabularShell = startSketchOn(XZ) |> xLine(length = 0.1) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() - |> revolve(angle = 360, axis = Y) + |> revolve(angle = 360deg, axis = Y) |> translate(x = -16.1, z = 133) |> rotate(pitch = -36.5) |> appearance(color = "#a55e2c") diff --git a/public/kcl-samples/sheet-metal-bracket/main.kcl b/public/kcl-samples/sheet-metal-bracket/main.kcl index 8bc897d246..ee1bf610d0 100644 --- a/public/kcl-samples/sheet-metal-bracket/main.kcl +++ b/public/kcl-samples/sheet-metal-bracket/main.kcl @@ -16,7 +16,7 @@ componentBoltPatternY = 3 // Define bracket parameters such as sheet metal thickness, bend radius, flange length, etc. hatHeight = 2.5 -bendAngle = 75 +bendAngle = 75deg thickness = 0.125 interiorBendRadius = 0.125 @@ -49,12 +49,12 @@ bracketProfile = startSketchOn(XZ) |> yLine(length = thickness, tag = $seg03) |> xLine(length = -flangeLength, tag = $seg04) |> tangentialArc(radius = interiorBendRadius, angle = -bendAngle) - |> angledLine(angle = 180 - bendAngle, length = segLen(seg01)) + |> angledLine(angle = 180deg - bendAngle, length = segLen(seg01)) |> tangentialArc(radius = exteriorBendRadius, angle = bendAngle) |> xLine(endAbsolute = 0, tag = $seg05) |> xLine(length = -segLen(seg05)) |> tangentialArc(radius = exteriorBendRadius, angle = bendAngle) - |> angledLine(angle = bendAngle - 180, length = segLen(seg01)) + |> angledLine(angle = bendAngle - 180deg, length = segLen(seg01)) |> tangentialArc(radius = interiorBendRadius, angle = -bendAngle) |> xLine(length = -flangeLength, tag = $seg06) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg07) diff --git a/public/kcl-samples/shepherds-hook-bolt/main.kcl b/public/kcl-samples/shepherds-hook-bolt/main.kcl index 3a3b70b223..9a824ca6f7 100644 --- a/public/kcl-samples/shepherds-hook-bolt/main.kcl +++ b/public/kcl-samples/shepherds-hook-bolt/main.kcl @@ -10,8 +10,8 @@ hookRadius = 12 shankLength = 5 threadedEndLength = 30 nutDistance = 20 -hookStartAngle = 290 -hookEndAngle = 150 +hookStartAngle = 290deg +hookEndAngle = 150deg approximatePitch = boltDiameter * 0.15 threadDepth = 0.6134 * approximatePitch @@ -19,7 +19,7 @@ innerRadius = boltDiameter / 2 - threadDepth boltNumberOfRevolutions = threadedEndLength / approximatePitch // Helper values for computing geometry transitions between straight shaft and hook arc -hypotenuse = hookRadius / cos(hookStartAngle - 270) +hypotenuse = hookRadius / cos(hookStartAngle - 270deg) side = sqrt(pow(hypotenuse, exp = 2) - pow(hookRadius, exp = 2)) shankOffset = hypotenuse + side @@ -86,4 +86,4 @@ boltThreadSectionShapeForRevolve = startProfile( |> close() // Create a revolved solid representing the thread geometry by repeating and revolving the profile around the shaft -boltThreadRevolve = revolve(boltThreadSectionShapeForRevolve, angle = 360, axis = Y) +boltThreadRevolve = revolve(boltThreadSectionShapeForRevolve, angle = 360deg, axis = Y) diff --git a/public/kcl-samples/spur-gear/main.kcl b/public/kcl-samples/spur-gear/main.kcl index c27df0b849..2ddb2094bd 100644 --- a/public/kcl-samples/spur-gear/main.kcl +++ b/public/kcl-samples/spur-gear/main.kcl @@ -29,8 +29,8 @@ fn spurGear(nTeeth, module, pressureAngle, gearHeight) { |> xLine(length = keywayDepth) |> yLine(length = -keywayWidth) |> xLine(length = -keywayDepth) - |> arc(angleStart = -1 * startAngle + 360, angleEnd = 180, radius = holeRadius) - |> arc(angleStart = 180, angleEnd = startAngle, radius = holeRadius) + |> arc(angleStart = -1 * startAngle + 360deg, angleEnd = 180deg, radius = holeRadius) + |> arc(angleStart = 180deg, angleEnd = startAngle, radius = holeRadius) |> close() // Using the gear parameters, sketch an involute tooth spanning from the base diameter to the tip diameter @@ -42,21 +42,21 @@ fn spurGear(nTeeth, module, pressureAngle, gearHeight) { angle = 0, tag = $seg01, ) - |> line(endAbsolute = polar(angle = 160 / nTeeth, length = tipDiameter / 2)) + |> line(endAbsolute = polar(angle = 160deg / nTeeth, length = tipDiameter / 2)) |> involuteCircular( startRadius = baseDiameter / 2, endRadius = tipDiameter / 2, - angle = -atan(segEndY(seg01) / segEndX(seg01)) - (180 / nTeeth), + angle = -atan(segEndY(seg01) / segEndX(seg01)) - (180deg / nTeeth), reverse = true, ) // Position the end line of the sketch at the start of the next tooth - |> line(endAbsolute = polar(angle = 360 / nTeeth, length = baseDiameter / 2)) + |> line(endAbsolute = polar(angle = 360deg / nTeeth, length = baseDiameter / 2)) // Pattern the sketch about the center by the specified number of teeth, then close the sketch |> patternCircular2d( %, instances = nTeeth, center = [0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) |> close() @@ -71,6 +71,6 @@ fn spurGear(nTeeth, module, pressureAngle, gearHeight) { spurGear( nTeeth = 21, module = 1.5, - pressureAngle = 14, + pressureAngle = 14deg, gearHeight = 6, ) diff --git a/public/kcl-samples/spur-reduction-gearset/main.kcl b/public/kcl-samples/spur-reduction-gearset/main.kcl index 2904f9ceb5..e34213fde0 100644 --- a/public/kcl-samples/spur-reduction-gearset/main.kcl +++ b/public/kcl-samples/spur-reduction-gearset/main.kcl @@ -22,21 +22,21 @@ fn spurGear(nTeeth, module, pressureAngle, gearHeight) { angle = 0, tag = $seg01, ) - |> line(endAbsolute = polar(angle = 160 / nTeeth, length = tipDiameter / 2)) + |> line(endAbsolute = polar(angle = 160deg / nTeeth, length = tipDiameter / 2)) |> involuteCircular( startRadius = baseDiameter / 2, endRadius = tipDiameter / 2, - angle = -atan(segEndY(seg01) / segEndX(seg01)) - (180 / nTeeth), + angle = -atan(segEndY(seg01) / segEndX(seg01)) - (180deg / nTeeth), reverse = true, ) // Position the end line of the sketch at the start of the next tooth - |> line(endAbsolute = polar(angle = 360 / nTeeth, length = baseDiameter / 2)) + |> line(endAbsolute = polar(angle = 360deg / nTeeth, length = baseDiameter / 2)) // Pattern the sketch about the center by the specified number of teeth, then close the sketch |> patternCircular2d( %, instances = nTeeth, center = [0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) |> close() @@ -52,7 +52,7 @@ fn spurGear(nTeeth, module, pressureAngle, gearHeight) { spurGear( nTeeth = 17, module = 1.5, - pressureAngle = 14, + pressureAngle = 14deg, gearHeight = 9, ) @@ -60,7 +60,7 @@ spurGear( spurGear( nTeeth = 51, module = 1.5, - pressureAngle = 14, + pressureAngle = 14deg, gearHeight = 7, ) // Translate the larger gear by the combined pitch radius of both gears, plus a small gap diff --git a/public/kcl-samples/surgical-drill-guide/main.kcl b/public/kcl-samples/surgical-drill-guide/main.kcl index 84210375dc..009f38348b 100644 --- a/public/kcl-samples/surgical-drill-guide/main.kcl +++ b/public/kcl-samples/surgical-drill-guide/main.kcl @@ -19,10 +19,10 @@ bracket = startSketchOn(YZ) |> xLine(length = handleLength, tag = $seg02) |> yLine(length = stockThickness, tag = $seg06) |> xLine(length = -segLen(seg02), tag = $seg04) - |> tangentialArc(angle = -60, radius = bendRadius, tag = $seg01) + |> tangentialArc(angle = -60deg, radius = bendRadius, tag = $seg01) |> angledLine(angle = tangentToEnd(seg01), length = handleLength / 3, tag = $seg03) - |> angledLine(angle = tangentToEnd(seg01) + 90, length = stockThickness, tag = $seg05) - |> angledLine(angle = segAng(seg03) + 180, length = segLen(seg03), tag = $seg07) + |> angledLine(angle = tangentToEnd(seg01) + 90deg, length = stockThickness, tag = $seg05) + |> angledLine(angle = segAng(seg03) + 180deg, length = segLen(seg03), tag = $seg07) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() |> extrude( diff --git a/public/kcl-samples/t-slot-rail/main.kcl b/public/kcl-samples/t-slot-rail/main.kcl index 25232497dc..3636a8656e 100644 --- a/public/kcl-samples/t-slot-rail/main.kcl +++ b/public/kcl-samples/t-slot-rail/main.kcl @@ -15,17 +15,17 @@ fn railTslot(railHeight, railLength) { railProfile = startSketchOn(XZ) |> startProfile(at = [0.5, (1 - 0.356) / 2]) |> xLine(length = -0.08) - |> tangentialArc(angle = 45, radius = .09) - |> angledLine(angle = 45, endAbsoluteY = 0.113) - |> tangentialArc(angle = 135, radius = interiorRadius) + |> tangentialArc(angle = 45deg, radius = .09) + |> angledLine(angle = 45deg, endAbsoluteY = 0.113) + |> tangentialArc(angle = 135deg, radius = interiorRadius) |> xLine(endAbsolute = .5 - (.320 / 2) - interiorRadius) - |> tangentialArc(angle = -90, radius = interiorRadius) + |> tangentialArc(angle = -90deg, radius = interiorRadius) |> yLine(endAbsolute = interiorRadius) - |> tangentialArc(angle = -90, radius = interiorRadius) + |> tangentialArc(angle = -90deg, radius = interiorRadius) |> xLine(length = -0.03) - |> arc(angleStart = 0, angleEnd = 180, radius = scoreDepth) + |> arc(angleStart = 0, angleEnd = 180deg, radius = scoreDepth) |> xLine(length = -0.1) - |> arc(angleStart = 0, angleEnd = 180, radius = scoreDepth) + |> arc(angleStart = 0, angleEnd = 180deg, radius = scoreDepth) |> xLine(length = -0.03) |> tangentialArc(endAbsolute = [arcEnd, arcEnd]) diff --git a/public/kcl-samples/wing-spar/main.kcl b/public/kcl-samples/wing-spar/main.kcl index 1240ed2b08..b4a3a78f88 100644 --- a/public/kcl-samples/wing-spar/main.kcl +++ b/public/kcl-samples/wing-spar/main.kcl @@ -22,7 +22,7 @@ ribSketch = startSketchOn(offsetPlane(-XZ, offset = -foilThickness)) |> line(endAbsolute = [rearSpar, upperCamber]) |> tangentialArc(endAbsolute = [frontSpar, upperCamber * 1.3]) |> tangentialArc(endAbsolute = [0, 0]) - |> tangentialArc(angle = 76, radius = lowerCamber) + |> tangentialArc(angle = 76deg, radius = lowerCamber) |> tangentialArc(endAbsolute = [rearSpar, -lowerCamber]) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() @@ -43,19 +43,19 @@ sparSketch = startSketchOn(-XZ) // Sketch the sheet metal profile for the front spar, then extrude frontSparProfile = startProfile(sparSketch, at = [frontSpar, -lowerCamber * 0.85]) |> yLine(endAbsolute = upperCamber, tag = $seg01) - |> tangentialArc(angle = -90, radius = sparBendRadius + sparStockThicknes) + |> tangentialArc(angle = -90deg, radius = sparBendRadius + sparStockThicknes) |> xLine(length = 4, tag = $seg02) - |> tangentialArc(angle = -90, radius = sparBendRadius + sparStockThicknes) + |> tangentialArc(angle = -90deg, radius = sparBendRadius + sparStockThicknes) |> yLine(length = -4, tag = $seg03) - |> tangentialArc(angle = -90, radius = sparBendRadius + sparStockThicknes) + |> tangentialArc(angle = -90deg, radius = sparBendRadius + sparStockThicknes) |> xLine(length = -3, tag = $seg04) |> yLine(length = sparStockThicknes) |> xLine(length = segLen(seg04)) - |> tangentialArc(angle = 90, radius = sparBendRadius) + |> tangentialArc(angle = 90deg, radius = sparBendRadius) |> yLine(length = segLen(seg03)) - |> tangentialArc(angle = 90, radius = sparBendRadius) + |> tangentialArc(angle = 90deg, radius = sparBendRadius) |> xLine(length = -segLen(seg02)) - |> tangentialArc(angle = 90, radius = sparBendRadius) + |> tangentialArc(angle = 90deg, radius = sparBendRadius) |> yLine(length = -segLen(seg01), tag = $seg10) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() @@ -64,19 +64,19 @@ frontSparProfile = startProfile(sparSketch, at = [frontSpar, -lowerCamber * 0.85 // Sketch the sheet metal profile for the rear spar, then extrude rearSparProfile = startProfile(sparSketch, at = [rearSpar, -lowerCamber * 0.7]) |> yLine(endAbsolute = upperCamber * 0.7, tag = $seg05) - |> tangentialArc(angle = 90, radius = sparBendRadius + sparStockThicknes) + |> tangentialArc(angle = 90deg, radius = sparBendRadius + sparStockThicknes) |> xLine(length = -4, tag = $seg06) - |> tangentialArc(angle = 90, radius = sparBendRadius + sparStockThicknes) + |> tangentialArc(angle = 90deg, radius = sparBendRadius + sparStockThicknes) |> yLine(length = -4, tag = $seg07) - |> tangentialArc(angle = 90, radius = sparBendRadius + sparStockThicknes) + |> tangentialArc(angle = 90deg, radius = sparBendRadius + sparStockThicknes) |> xLine(length = 3, tag = $seg08) |> yLine(length = sparStockThicknes) |> xLine(length = -segLen(seg08)) - |> tangentialArc(angle = -90, radius = sparBendRadius) + |> tangentialArc(angle = -90deg, radius = sparBendRadius) |> yLine(length = segLen(seg07)) - |> tangentialArc(angle = -90, radius = sparBendRadius) + |> tangentialArc(angle = -90deg, radius = sparBendRadius) |> xLine(length = segLen(seg06)) - |> tangentialArc(angle = -90, radius = sparBendRadius) + |> tangentialArc(angle = -90deg, radius = sparBendRadius) |> yLine(length = -segLen(seg05), tag = $seg09) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() @@ -86,11 +86,11 @@ rearSparProfile = startProfile(sparSketch, at = [rearSpar, -lowerCamber * 0.7]) frontSparHoles = startSketchOn(frontSparProfile, face = seg10) |> startProfile(at = [-lowerCamber * 0.1, -foilThickness * 3]) |> xLine(endAbsolute = upperCamber * 0.4, tag = $seg11) - |> tangentialArc(angle = -90, radius = 5) + |> tangentialArc(angle = -90deg, radius = 5) |> yLine(endAbsolute = -(sparSpan - (3 * foilThickness)) / (nSections - 1) + 5, tag = $seg12) - |> tangentialArc(angle = -90, radius = 5) + |> tangentialArc(angle = -90deg, radius = 5) |> xLine(length = -segLen(seg11)) - |> tangentialArc(angle = -90, radius = 5) + |> tangentialArc(angle = -90deg, radius = 5) |> yLine(length = segLen(seg12)) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() @@ -104,11 +104,11 @@ frontSparHoles = startSketchOn(frontSparProfile, face = seg10) rearSparHoles = startSketchOn(rearSparProfile, face = seg09) |> startProfile(at = [-lowerCamber * 0.3, -foilThickness * 3]) |> xLine(endAbsolute = -upperCamber * 0.01, tag = $seg14) - |> tangentialArc(angle = -90, radius = 5) + |> tangentialArc(angle = -90deg, radius = 5) |> yLine(length = -segLen(seg12)) - |> tangentialArc(angle = -90, radius = 5) + |> tangentialArc(angle = -90deg, radius = 5) |> xLine(length = -segLen(seg14)) - |> tangentialArc(angle = -90, radius = 5) + |> tangentialArc(angle = -90deg, radius = 5) |> yLine(length = segLen(seg12)) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() diff --git a/rust/kcl-lib/e2e/executor/inputs/e2e-can-sketch-on-chamfer-no-pipeExpr.kcl b/rust/kcl-lib/e2e/executor/inputs/e2e-can-sketch-on-chamfer-no-pipeExpr.kcl index cd013a5fc4..489eca0dfb 100644 --- a/rust/kcl-lib/e2e/executor/inputs/e2e-can-sketch-on-chamfer-no-pipeExpr.kcl +++ b/rust/kcl-lib/e2e/executor/inputs/e2e-can-sketch-on-chamfer-no-pipeExpr.kcl @@ -1,8 +1,8 @@ @settings(defaultLengthUnit = in) sketch001 = startSketchOn(XZ) |> startProfile(at = [75.8, 317.2]) - |> angledLine(angle = 0, length = 268.43, tag = $rectangleSegmentA001) - |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 217.26, tag = $seg01) + |> angledLine(angle = 0deg, length = 268.43, tag = $rectangleSegmentA001) + |> angledLine(angle = segAng(rectangleSegmentA001) - 90deg, length = 217.26, tag = $seg01) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $yo) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg02) |> close() diff --git a/rust/kcl-lib/e2e/executor/inputs/e2e-can-sketch-on-chamfer.kcl b/rust/kcl-lib/e2e/executor/inputs/e2e-can-sketch-on-chamfer.kcl index 768bf99328..60ee4f65d9 100644 --- a/rust/kcl-lib/e2e/executor/inputs/e2e-can-sketch-on-chamfer.kcl +++ b/rust/kcl-lib/e2e/executor/inputs/e2e-can-sketch-on-chamfer.kcl @@ -1,8 +1,8 @@ @settings(defaultLengthUnit = in) sketch001 = startSketchOn(XZ) |> startProfile(at = [75.8, 317.2]) // [$startCapTag, $EndCapTag] - |> angledLine(angle = 0, length = 268.43, tag = $rectangleSegmentA001) - |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 217.26, tag = $seg01) + |> angledLine(angle = 0deg, length = 268.43, tag = $rectangleSegmentA001) + |> angledLine(angle = segAng(rectangleSegmentA001) - 90deg, length = 217.26, tag = $seg01) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $yo) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg02) |> close() diff --git a/rust/kcl-lib/e2e/executor/main.rs b/rust/kcl-lib/e2e/executor/main.rs index 591f735eec..bc3d661625 100644 --- a/rust/kcl-lib/e2e/executor/main.rs +++ b/rust/kcl-lib/e2e/executor/main.rs @@ -181,13 +181,13 @@ wallMountL = 8 bracket = startSketchOn(XY) |> startProfile(at = [0, 0]) |> line(end = [0, wallMountL]) - |> tangentialArc(radius = filletR, angle = 90 ) + |> tangentialArc(radius = filletR, angle = 90deg ) |> line(end = [-shelfMountL, 0]) |> line(end = [0, -thickness]) |> line(end = [shelfMountL, 0]) |> tangentialArc( radius = filletR - thickness, - angle = -90, + angle = -90deg, ) |> line(end = [0, -wallMountL]) |> close() diff --git a/rust/kcl-lib/src/docs/kcl_doc.rs b/rust/kcl-lib/src/docs/kcl_doc.rs index 2b027a1051..09c2b489cb 100644 --- a/rust/kcl-lib/src/docs/kcl_doc.rs +++ b/rust/kcl-lib/src/docs/kcl_doc.rs @@ -816,7 +816,16 @@ impl ArgData { } match self.ty.as_deref() { Some("Sketch") if self.kind == ArgKind::Special => None, - Some(s) if s.starts_with("number") => Some((index, format!(r#"{label}${{{}:10}}"#, index))), + Some(s) if s.starts_with("number") => { + let value = match &*self.name { + "angleStart" => "0", + "angleEnd" => "180deg", + "angle" => "180deg", + "arcDegrees" => "360deg", + _ => "10", + }; + Some((index, format!(r#"{label}${{{}:{value}}}"#, index))) + } Some("Point2d") => Some((index + 1, format!(r#"{label}[${{{}:0}}, ${{{}:0}}]"#, index, index + 1))), Some("Point3d") => Some(( index + 2, diff --git a/rust/kcl-lib/src/docs/mod.rs b/rust/kcl-lib/src/docs/mod.rs index 55b6ae9849..2abb9fce32 100644 --- a/rust/kcl-lib/src/docs/mod.rs +++ b/rust/kcl-lib/src/docs/mod.rs @@ -106,7 +106,7 @@ mod tests { let snippet = data.to_autocomplete_snippet(); assert_eq!( snippet, - r#"arc(angleStart = ${0:10}, angleEnd = ${1:10}, diameter = ${2:10})"# + r#"arc(angleStart = ${0:0}, angleEnd = ${1:180deg}, diameter = ${2:10})"# ); } @@ -172,7 +172,7 @@ mod tests { let snippet = helix_fn.to_autocomplete_snippet(); assert_eq!( snippet, - r#"helix(revolutions = ${0:10}, angleStart = ${1:10}, radius = ${2:10}, axis = ${3:X}, length = ${4:10})"# + r#"helix(revolutions = ${0:10}, angleStart = ${1:0}, radius = ${2:10}, axis = ${3:X}, length = ${4:10})"# ); } diff --git a/rust/kcl-lib/src/execution/annotations.rs b/rust/kcl-lib/src/execution/annotations.rs index 9d0652a71b..2df175ccb0 100644 --- a/rust/kcl-lib/src/execution/annotations.rs +++ b/rust/kcl-lib/src/execution/annotations.rs @@ -12,7 +12,7 @@ use crate::{ }; /// Annotations which should cause re-execution if they change. -pub(super) const SIGNIFICANT_ATTRS: [&str; 2] = [SETTINGS, NO_PRELUDE]; +pub(super) const SIGNIFICANT_ATTRS: [&str; 3] = [SETTINGS, NO_PRELUDE, WARNINGS]; pub(crate) const SETTINGS: &str = "settings"; pub(crate) const SETTINGS_UNIT_LENGTH: &str = "defaultLengthUnit"; @@ -33,6 +33,23 @@ pub(crate) const IMPL_PRIMITIVE: &str = "primitive"; pub(super) const IMPL_VALUES: [&str; 3] = [IMPL_RUST, IMPL_KCL, IMPL_PRIMITIVE]; pub(crate) const DEPRECATED: &str = "deprecated"; +pub(crate) const WARNINGS: &str = "warnings"; +pub(crate) const WARN_ALLOW: &str = "allow"; +pub(crate) const WARN_DENY: &str = "deny"; +pub(crate) const WARN_UNKNOWN_UNITS: &str = "unknownUnits"; +pub(crate) const WARN_ANGLE_UNITS: &str = "angleUnits"; +pub(crate) const WARN_UNKNOWN_ATTR: &str = "unknownAttribute"; +pub(crate) const WARN_MOD_RETURN_VALUE: &str = "moduleReturnValue"; +pub(crate) const WARN_DEPRECATED: &str = "deprecated"; +pub(crate) const WARN_IGNORED_Z_AXIS: &str = "ignoredZAxis"; +pub(super) const WARN_VALUES: [&str; 6] = [ + WARN_UNKNOWN_UNITS, + WARN_ANGLE_UNITS, + WARN_UNKNOWN_ATTR, + WARN_MOD_RETURN_VALUE, + WARN_DEPRECATED, + WARN_IGNORED_Z_AXIS, +]; #[derive(Clone, Copy, Eq, PartialEq, Debug, Default)] pub enum Impl { @@ -92,6 +109,64 @@ pub(super) fn expect_ident(expr: &Expr) -> Result<&str, KclError> { ))) } +pub(super) fn many_of( + expr: &Expr, + of: &[&'static str], + source_range: SourceRange, +) -> Result, KclError> { + const UNEXPECTED_MSG: &str = "Unexpected warnings value, expected a name or array of names, e.g., `unknownUnits` or `[unknownUnits, deprecated]`"; + + let values = match expr { + Expr::Name(name) => { + if let Some(name) = name.local_ident() { + vec![*name] + } else { + return Err(KclError::new_semantic(KclErrorDetails::new( + UNEXPECTED_MSG.to_owned(), + vec![expr.into()], + ))); + } + } + Expr::ArrayExpression(e) => { + let mut result = Vec::new(); + for e in &e.elements { + if let Expr::Name(name) = e { + if let Some(name) = name.local_ident() { + result.push(*name); + continue; + } + } + return Err(KclError::new_semantic(KclErrorDetails::new( + UNEXPECTED_MSG.to_owned(), + vec![e.into()], + ))); + } + result + } + _ => { + return Err(KclError::new_semantic(KclErrorDetails::new( + UNEXPECTED_MSG.to_owned(), + vec![expr.into()], + ))) + } + }; + + values + .into_iter() + .map(|v| { + of.iter() + .find(|vv| **vv == v) + .ok_or_else(|| { + KclError::new_semantic(KclErrorDetails::new( + format!("Unexpected warning value: `{v}`; accepted values: {}", of.join(", "),), + vec![source_range], + )) + }) + .copied() + }) + .collect::, KclError>>() +} + // Returns the unparsed number literal. pub(super) fn expect_number(expr: &Expr) -> Result { if let Expr::Literal(lit) = expr { diff --git a/rust/kcl-lib/src/execution/exec_ast.rs b/rust/kcl-lib/src/execution/exec_ast.rs index 54219fa3a6..88636ffb09 100644 --- a/rust/kcl-lib/src/execution/exec_ast.rs +++ b/rust/kcl-lib/src/execution/exec_ast.rs @@ -49,9 +49,20 @@ impl ExecutorContext { for annotation in annotations { if annotation.name() == Some(annotations::SETTINGS) { if matches!(body_type, BodyType::Root) { - if exec_state.mod_local.settings.update_from_annotation(annotation)? { + let (updated_len, updated_angle) = + exec_state.mod_local.settings.update_from_annotation(annotation)?; + if updated_len { exec_state.mod_local.explicit_length_units = true; } + if updated_angle { + exec_state.warn( + CompilationError::err( + annotation.as_source_range(), + "Prefer to use explicit units for angles", + ), + annotations::WARN_ANGLE_UNITS, + ); + } } else { exec_state.err(CompilationError::err( annotation.as_source_range(), @@ -67,11 +78,51 @@ impl ExecutorContext { "The standard library can only be skipped at the top level scope of a file", )); } + } else if annotation.name() == Some(annotations::WARNINGS) { + // TODO we should support setting warnings for the whole project, not just one file + if matches!(body_type, BodyType::Root) { + let props = annotations::expect_properties(annotations::WARNINGS, annotation)?; + for p in props { + match &*p.inner.key.name { + annotations::WARN_ALLOW => { + let allowed = annotations::many_of( + &p.inner.value, + &annotations::WARN_VALUES, + annotation.as_source_range(), + )?; + exec_state.mod_local.allowed_warnings = allowed; + } + annotations::WARN_DENY => { + let denied = annotations::many_of( + &p.inner.value, + &annotations::WARN_VALUES, + annotation.as_source_range(), + )?; + exec_state.mod_local.denied_warnings = denied; + } + name => { + return Err(KclError::new_semantic(KclErrorDetails::new( + format!( + "Unexpected warnings key: `{name}`; expected one of `{}`, `{}`", + annotations::WARN_ALLOW, + annotations::WARN_DENY, + ), + vec![annotation.as_source_range()], + ))) + } + } + } + } else { + exec_state.err(CompilationError::err( + annotation.as_source_range(), + "Warnings can only be customized at the top level scope of a file", + )); + } } else { - exec_state.warn(CompilationError::err( - annotation.as_source_range(), - "Unknown annotation", - )); + exec_state.warn( + CompilationError::err(annotation.as_source_range(), "Unknown annotation"), + annotations::WARN_UNKNOWN_ATTR, + ); } } Ok(no_prelude) @@ -685,7 +736,8 @@ impl ExecutorContext { exec_state.warn(CompilationError::err( metadata.source_range, "Imported module has no return value. The last statement of the module must be an expression, usually the Solid.", - )); + ), + annotations::WARN_MOD_RETURN_VALUE); let mut new_meta = vec![metadata.to_owned()]; new_meta.extend(meta); @@ -1163,12 +1215,12 @@ impl Node { let value = match self.operator { BinaryOperator::Add => { - let (l, r, ty) = NumericType::combine_eq_coerce(left, right); + let (l, r, ty) = NumericType::combine_eq_coerce(left, right, None); self.warn_on_unknown(&ty, "Adding", exec_state); KclValue::Number { value: l + r, meta, ty } } BinaryOperator::Sub => { - let (l, r, ty) = NumericType::combine_eq_coerce(left, right); + let (l, r, ty) = NumericType::combine_eq_coerce(left, right, None); self.warn_on_unknown(&ty, "Subtracting", exec_state); KclValue::Number { value: l - r, meta, ty } } @@ -1193,32 +1245,32 @@ impl Node { ty: exec_state.current_default_units(), }, BinaryOperator::Neq => { - let (l, r, ty) = NumericType::combine_eq(left, right); + let (l, r, ty) = NumericType::combine_eq(left, right, exec_state, self.as_source_range()); self.warn_on_unknown(&ty, "Comparing", exec_state); KclValue::Bool { value: l != r, meta } } BinaryOperator::Gt => { - let (l, r, ty) = NumericType::combine_eq(left, right); + let (l, r, ty) = NumericType::combine_eq(left, right, exec_state, self.as_source_range()); self.warn_on_unknown(&ty, "Comparing", exec_state); KclValue::Bool { value: l > r, meta } } BinaryOperator::Gte => { - let (l, r, ty) = NumericType::combine_eq(left, right); + let (l, r, ty) = NumericType::combine_eq(left, right, exec_state, self.as_source_range()); self.warn_on_unknown(&ty, "Comparing", exec_state); KclValue::Bool { value: l >= r, meta } } BinaryOperator::Lt => { - let (l, r, ty) = NumericType::combine_eq(left, right); + let (l, r, ty) = NumericType::combine_eq(left, right, exec_state, self.as_source_range()); self.warn_on_unknown(&ty, "Comparing", exec_state); KclValue::Bool { value: l < r, meta } } BinaryOperator::Lte => { - let (l, r, ty) = NumericType::combine_eq(left, right); + let (l, r, ty) = NumericType::combine_eq(left, right, exec_state, self.as_source_range()); self.warn_on_unknown(&ty, "Comparing", exec_state); KclValue::Bool { value: l <= r, meta } } BinaryOperator::Eq => { - let (l, r, ty) = NumericType::combine_eq(left, right); + let (l, r, ty) = NumericType::combine_eq(left, right, exec_state, self.as_source_range()); self.warn_on_unknown(&ty, "Comparing", exec_state); KclValue::Bool { value: l == r, meta } } @@ -1237,7 +1289,7 @@ impl Node { format!("{} numbers which have unknown or incompatible units.\nYou can probably fix this error by specifying the units using type ascription, e.g., `len: number(mm)` or `(a * b): number(deg)`.", verb), ); err.tag = crate::errors::Tag::UnknownNumericUnits; - exec_state.warn(err); + exec_state.warn(err, annotations::WARN_UNKNOWN_UNITS); } } } @@ -1733,6 +1785,7 @@ mod test { use super::*; use crate::{ + errors::Severity, exec::UnitType, execution::{parse_execute, ContextType}, ExecutorSettings, UnitLen, @@ -2141,4 +2194,29 @@ c = ((PI * 2) / 3): number(deg) let result = parse_execute(ast).await.unwrap(); assert_eq!(result.exec_state.errors().len(), 2); } + + #[tokio::test(flavor = "multi_thread")] + async fn custom_warning() { + let warn = r#" +a = PI * 2 +"#; + let result = parse_execute(warn).await.unwrap(); + assert_eq!(result.exec_state.errors().len(), 1); + assert_eq!(result.exec_state.errors()[0].severity, Severity::Warning); + + let allow = r#" +@warnings(allow = unknownUnits) +a = PI * 2 +"#; + let result = parse_execute(allow).await.unwrap(); + assert_eq!(result.exec_state.errors().len(), 0); + + let deny = r#" +@warnings(deny = [unknownUnits]) +a = PI * 2 +"#; + let result = parse_execute(deny).await.unwrap(); + assert_eq!(result.exec_state.errors().len(), 1); + assert_eq!(result.exec_state.errors()[0].severity, Severity::Error); + } } diff --git a/rust/kcl-lib/src/execution/fn_call.rs b/rust/kcl-lib/src/execution/fn_call.rs index 5188597f37..c13a11888c 100644 --- a/rust/kcl-lib/src/execution/fn_call.rs +++ b/rust/kcl-lib/src/execution/fn_call.rs @@ -4,6 +4,7 @@ use indexmap::IndexMap; use crate::{ errors::{KclError, KclErrorDetails}, execution::{ + annotations, cad_op::{Group, OpArg, OpKclValue, Operation}, kcl_value::FunctionSource, memory, @@ -290,16 +291,19 @@ impl FunctionDefinition<'_> { callsite: SourceRange, ) -> Result, KclError> { if self.deprecated { - exec_state.warn(CompilationError::err( - callsite, - format!( - "{} is deprecated, see the docs for a recommended replacement", - match &fn_name { - Some(n) => format!("`{n}`"), - None => "This function".to_owned(), - } + exec_state.warn( + CompilationError::err( + callsite, + format!( + "{} is deprecated, see the docs for a recommended replacement", + match &fn_name { + Some(n) => format!("`{n}`"), + None => "This function".to_owned(), + } + ), ), - )); + annotations::WARN_DEPRECATED, + ); } type_check_params_kw(fn_name.as_deref(), self, &mut args.kw_args, exec_state)?; diff --git a/rust/kcl-lib/src/execution/kcl_value.rs b/rust/kcl-lib/src/execution/kcl_value.rs index 53456fa2d8..7cad1457bc 100644 --- a/rust/kcl-lib/src/execution/kcl_value.rs +++ b/rust/kcl-lib/src/execution/kcl_value.rs @@ -7,7 +7,7 @@ use serde::Serialize; use crate::{ errors::KclErrorDetails, execution::{ - annotations::{SETTINGS, SETTINGS_UNIT_LENGTH}, + annotations::{self, SETTINGS, SETTINGS_UNIT_LENGTH}, types::{NumericType, PrimitiveType, RuntimeType, UnitLen}, EnvironmentRef, ExecState, Face, Geometry, GeometryWithImportedGeometry, Helix, ImportedGeometry, MetaSettings, Metadata, Plane, Sketch, Solid, TagIdentifier, @@ -377,6 +377,7 @@ impl KclValue { Some(SourceRange::new(0, 0, literal.module_id)), crate::errors::Tag::Deprecated, ), + annotations::WARN_DEPRECATED, ); } } diff --git a/rust/kcl-lib/src/execution/mod.rs b/rust/kcl-lib/src/execution/mod.rs index a4b8ab7494..28cb9b4465 100644 --- a/rust/kcl-lib/src/execution/mod.rs +++ b/rust/kcl-lib/src/execution/mod.rs @@ -604,8 +604,9 @@ impl ExecutorContext { settings: &self.settings, }; + let cache_result = cache::get_changed_program(old, new).await; // Get the program that actually changed from the old and new information. - let (clear_scene, program, import_check_info) = match cache::get_changed_program(old, new).await { + let (clear_scene, program, import_check_info) = match cache_result { CacheResult::ReExecute { clear_scene, reapply_settings, diff --git a/rust/kcl-lib/src/execution/state.rs b/rust/kcl-lib/src/execution/state.rs index e41f370b31..faaaaa624e 100644 --- a/rust/kcl-lib/src/execution/state.rs +++ b/rust/kcl-lib/src/execution/state.rs @@ -108,6 +108,9 @@ pub(super) struct ModuleState { pub(super) path: ModulePath, /// Artifacts for only this module. pub artifacts: ModuleArtifactState, + + pub(super) allowed_warnings: Vec<&'static str>, + pub(super) denied_warnings: Vec<&'static str>, } impl ExecState { @@ -133,8 +136,19 @@ impl ExecState { } /// Log a warning. - pub fn warn(&mut self, mut e: CompilationError) { - e.severity = Severity::Warning; + pub fn warn(&mut self, mut e: CompilationError, name: &'static str) { + debug_assert!(annotations::WARN_VALUES.contains(&name)); + + if self.mod_local.allowed_warnings.contains(&name) { + return; + } + + if self.mod_local.denied_warnings.contains(&name) { + e.severity = Severity::Error; + } else { + e.severity = Severity::Warning; + } + self.global.errors.push(e); } @@ -502,6 +516,8 @@ impl ModuleState { kcl_version: "0.1".to_owned(), }, artifacts: Default::default(), + allowed_warnings: Vec::new(), + denied_warnings: Vec::new(), } } @@ -526,10 +542,11 @@ impl MetaSettings { pub(crate) fn update_from_annotation( &mut self, annotation: &crate::parsing::ast::types::Node, - ) -> Result { + ) -> Result<(bool, bool), KclError> { let properties = annotations::expect_properties(annotations::SETTINGS, annotation)?; let mut updated_len = false; + let mut updated_angle = false; for p in properties { match &*p.inner.key.name { annotations::SETTINGS_UNIT_LENGTH => { @@ -542,6 +559,7 @@ impl MetaSettings { let value = annotations::expect_ident(&p.inner.value)?; let value = types::UnitAngle::from_str(value, annotation.as_source_range())?; self.default_angle_units = value; + updated_angle = true; } annotations::SETTINGS_VERSION => { let value = annotations::expect_number(&p.inner.value)?; @@ -560,6 +578,6 @@ impl MetaSettings { } } - Ok(updated_len) + Ok((updated_len, updated_angle)) } } diff --git a/rust/kcl-lib/src/execution/types.rs b/rust/kcl-lib/src/execution/types.rs index 7708516a37..ded41cc356 100644 --- a/rust/kcl-lib/src/execution/types.rs +++ b/rust/kcl-lib/src/execution/types.rs @@ -6,6 +6,7 @@ use serde::{Deserialize, Serialize}; use crate::{ execution::{ + annotations, kcl_value::{KclValue, TypeDef}, memory::{self}, ExecState, Plane, PlaneInfo, Point3d, @@ -505,7 +506,12 @@ impl NumericType { /// /// This combinator function is suitable for comparisons where uncertainty should /// be handled by the user. - pub fn combine_eq(a: TyF64, b: TyF64) -> (f64, f64, NumericType) { + pub fn combine_eq( + a: TyF64, + b: TyF64, + exec_state: &mut ExecState, + source_range: SourceRange, + ) -> (f64, f64, NumericType) { use NumericType::*; match (a.ty, b.ty) { (at, bt) if at == bt => (a.n, b.n, at), @@ -520,8 +526,24 @@ impl NumericType { } (t @ Known(UnitType::Length(l1)), Default { len: l2, .. }) if l1 == l2 => (a.n, b.n, t), (Default { len: l1, .. }, t @ Known(UnitType::Length(l2))) if l1 == l2 => (a.n, b.n, t), - (t @ Known(UnitType::Angle(a1)), Default { angle: a2, .. }) if a1 == a2 => (a.n, b.n, t), - (Default { angle: a1, .. }, t @ Known(UnitType::Angle(a2))) if a1 == a2 => (a.n, b.n, t), + (t @ Known(UnitType::Angle(a1)), Default { angle: a2, .. }) if a1 == a2 => { + if b.n != 0.0 { + exec_state.warn( + CompilationError::err(source_range, "Prefer to use explicit units for angles"), + annotations::WARN_ANGLE_UNITS, + ); + } + (a.n, b.n, t) + } + (Default { angle: a1, .. }, t @ Known(UnitType::Angle(a2))) if a1 == a2 => { + if a.n != 0.0 { + exec_state.warn( + CompilationError::err(source_range, "Prefer to use explicit units for angles"), + annotations::WARN_ANGLE_UNITS, + ); + } + (a.n, b.n, t) + } _ => (a.n, b.n, Unknown), } @@ -534,7 +556,11 @@ impl NumericType { /// coerced together, for example two arguments to the same function or two numbers in an array being used as a point. /// /// Prefer to use `combine_eq` if possible since using that prioritises correctness over ergonomics. - pub fn combine_eq_coerce(a: TyF64, b: TyF64) -> (f64, f64, NumericType) { + pub fn combine_eq_coerce( + a: TyF64, + b: TyF64, + for_errs: Option<(&mut ExecState, SourceRange)>, + ) -> (f64, f64, NumericType) { use NumericType::*; match (a.ty, b.ty) { (at, bt) if at == bt => (a.n, b.n, at), @@ -552,8 +578,28 @@ impl NumericType { (t @ Known(UnitType::Length(l1)), Default { len: l2, .. }) => (a.n, l2.adjust_to(b.n, l1).0, t), (Default { len: l1, .. }, t @ Known(UnitType::Length(l2))) => (l1.adjust_to(a.n, l2).0, b.n, t), - (t @ Known(UnitType::Angle(a1)), Default { angle: a2, .. }) => (a.n, a2.adjust_to(b.n, a1).0, t), - (Default { angle: a1, .. }, t @ Known(UnitType::Angle(a2))) => (a1.adjust_to(a.n, a2).0, b.n, t), + (t @ Known(UnitType::Angle(a1)), Default { angle: a2, .. }) => { + if let Some((exec_state, source_range)) = for_errs { + if b.n != 0.0 { + exec_state.warn( + CompilationError::err(source_range, "Prefer to use explicit units for angles"), + annotations::WARN_ANGLE_UNITS, + ); + } + } + (a.n, a2.adjust_to(b.n, a1).0, t) + } + (Default { angle: a1, .. }, t @ Known(UnitType::Angle(a2))) => { + if let Some((exec_state, source_range)) = for_errs { + if a.n != 0.0 { + exec_state.warn( + CompilationError::err(source_range, "Prefer to use explicit units for angles"), + annotations::WARN_ANGLE_UNITS, + ); + } + } + (a1.adjust_to(a.n, a2).0, b.n, t) + } (Known(_), Known(_)) | (Default { .. }, Default { .. }) | (_, Unknown) | (Unknown, _) => { (a.n, b.n, Unknown) @@ -714,7 +760,7 @@ impl NumericType { } } - fn coerce(&self, val: &KclValue) -> Result { + fn coerce(&self, val: &KclValue, exec_state: &mut ExecState) -> Result { let KclValue::Number { value, ty, meta } = val else { return Err(val.into()); }; @@ -786,6 +832,14 @@ impl NumericType { } (Default { angle: a1, .. }, Known(UnitType::Angle(a2))) => { + let mut source_ranges = Into::>::into(val); + // A single source range means it's not via a function or something. + if source_ranges.len() == 1 { + exec_state.warn( + CompilationError::err(source_ranges.pop().unwrap(), "Prefer to use explicit units for angles"), + annotations::WARN_ANGLE_UNITS, + ); + } let (value, ty) = a1.adjust_to(*value, *a2); Ok(KclValue::Number { value, @@ -1110,7 +1164,7 @@ impl KclValue { PrimitiveType::Any => Ok(self.clone()), PrimitiveType::Number(ty) => { if convert_units { - return ty.coerce(self); + return ty.coerce(self, exec_state); } // Instead of converting units, reinterpret the number as having @@ -1126,10 +1180,10 @@ impl KclValue { value: *n, meta: meta.clone(), }; - return ty.coerce(&value); + return ty.coerce(&value, exec_state); } } - ty.coerce(self) + ty.coerce(self, exec_state) } PrimitiveType::String => match self { KclValue::String { .. } => Ok(self.clone()), @@ -1147,54 +1201,56 @@ impl KclValue { KclValue::Solid { .. } => Ok(self.clone()), _ => Err(self.into()), }, - PrimitiveType::Plane => match self { - KclValue::String { value: s, .. } - if [ - "xy", "xz", "yz", "-xy", "-xz", "-yz", "XY", "XZ", "YZ", "-XY", "-XZ", "-YZ", - ] - .contains(&&**s) => - { - Ok(self.clone()) - } - KclValue::Plane { .. } => Ok(self.clone()), - KclValue::Object { value, meta } => { - let origin = value - .get("origin") - .and_then(Point3d::from_kcl_val) - .ok_or(CoercionError::from(self))?; - let x_axis = value - .get("xAxis") - .and_then(Point3d::from_kcl_val) - .ok_or(CoercionError::from(self))?; - let y_axis = value - .get("yAxis") - .and_then(Point3d::from_kcl_val) - .ok_or(CoercionError::from(self))?; - - if value.get("zAxis").is_some() { - exec_state.warn(CompilationError::err( + PrimitiveType::Plane => { + match self { + KclValue::String { value: s, .. } + if [ + "xy", "xz", "yz", "-xy", "-xz", "-yz", "XY", "XZ", "YZ", "-XY", "-XZ", "-YZ", + ] + .contains(&&**s) => + { + Ok(self.clone()) + } + KclValue::Plane { .. } => Ok(self.clone()), + KclValue::Object { value, meta } => { + let origin = value + .get("origin") + .and_then(Point3d::from_kcl_val) + .ok_or(CoercionError::from(self))?; + let x_axis = value + .get("xAxis") + .and_then(Point3d::from_kcl_val) + .ok_or(CoercionError::from(self))?; + let y_axis = value + .get("yAxis") + .and_then(Point3d::from_kcl_val) + .ok_or(CoercionError::from(self))?; + + if value.get("zAxis").is_some() { + exec_state.warn(CompilationError::err( self.into(), "Object with a zAxis field is being coerced into a plane, but the zAxis is ignored.", - )); - } + ), annotations::WARN_IGNORED_Z_AXIS); + } - let id = exec_state.mod_local.id_generator.next_uuid(); - let plane = Plane { - id, - artifact_id: id.into(), - info: PlaneInfo { - origin, - x_axis: x_axis.normalize(), - y_axis: y_axis.normalize(), - }, - value: super::PlaneType::Uninit, - meta: meta.clone(), - }; + let id = exec_state.mod_local.id_generator.next_uuid(); + let plane = Plane { + id, + artifact_id: id.into(), + info: PlaneInfo { + origin, + x_axis: x_axis.normalize(), + y_axis: y_axis.normalize(), + }, + value: super::PlaneType::Uninit, + meta: meta.clone(), + }; - Ok(KclValue::Plane { value: Box::new(plane) }) + Ok(KclValue::Plane { value: Box::new(plane) }) + } + _ => Err(self.into()), } - _ => Err(self.into()), - }, + } PrimitiveType::Face => match self { KclValue::Face { .. } => Ok(self.clone()), _ => Err(self.into()), @@ -2347,14 +2403,18 @@ b = 180 / PI * a + 360 #[tokio::test(flavor = "multi_thread")] async fn cos_coercions() { let program = r#" -a = cos(units::toRadians(30)) +a = cos(units::toRadians(30deg)) b = 3 / a c = cos(30deg) -d = cos(30) +d = cos(1rad) "#; let result = parse_execute(program).await.unwrap(); - assert!(result.exec_state.errors().is_empty()); + assert!( + result.exec_state.errors().is_empty(), + "{:?}", + result.exec_state.errors() + ); assert_value_and_type("a", &result, 1.0, NumericType::default()); assert_value_and_type("b", &result, 3.0, NumericType::default()); diff --git a/rust/kcl-lib/src/lib.rs b/rust/kcl-lib/src/lib.rs index 95cdde5342..a4eeb14511 100644 --- a/rust/kcl-lib/src/lib.rs +++ b/rust/kcl-lib/src/lib.rs @@ -228,13 +228,9 @@ impl Program { } /// Change the meta settings for the kcl file. - pub fn change_default_units( - &self, - length_units: Option, - angle_units: Option, - ) -> Result { + pub fn change_default_units(&self, length_units: Option) -> Result { Ok(Self { - ast: self.ast.change_default_units(length_units, angle_units)?, + ast: self.ast.change_default_units(length_units)?, original_file_contents: self.original_file_contents.clone(), }) } diff --git a/rust/kcl-lib/src/parsing/ast/types/mod.rs b/rust/kcl-lib/src/parsing/ast/types/mod.rs index c5f2b7c085..952c20ae24 100644 --- a/rust/kcl-lib/src/parsing/ast/types/mod.rs +++ b/rust/kcl-lib/src/parsing/ast/types/mod.rs @@ -28,7 +28,7 @@ use crate::{ errors::KclError, execution::{ annotations, - types::{ArrayLen, UnitAngle, UnitLen}, + types::{ArrayLen, UnitLen}, KclValue, Metadata, TagIdentifier, }, parsing::{ast::digest::Digest, token::NumericSuffix, PIPE_OPERATOR}, @@ -357,11 +357,7 @@ impl Node { Ok(None) } - pub fn change_default_units( - &self, - length_units: Option, - angle_units: Option, - ) -> Result { + pub fn change_default_units(&self, length_units: Option) -> Result { let mut new_program = self.clone(); let mut found = false; for node in &mut new_program.inner_attrs { @@ -372,13 +368,6 @@ impl Node { Expr::Name(Box::new(Name::new(&len.to_string()))), ); } - if let Some(angle) = angle_units { - node.inner.add_or_update( - annotations::SETTINGS_UNIT_ANGLE, - Expr::Name(Box::new(Name::new(&angle.to_string()))), - ); - } - // Previous source range no longer makes sense, but we want to // preserve other things like comments. node.reset_source(); @@ -395,12 +384,6 @@ impl Node { Expr::Name(Box::new(Name::new(&len.to_string()))), ); } - if let Some(angle) = angle_units { - settings.inner.add_or_update( - annotations::SETTINGS_UNIT_ANGLE, - Expr::Name(Box::new(Name::new(&angle.to_string()))), - ); - } new_program.inner_attrs.push(settings); } @@ -4256,7 +4239,7 @@ startSketchOn(XY)"#; // Edit the ast. let new_program = program - .change_default_units(Some(crate::execution::types::UnitLen::Mm), None) + .change_default_units(Some(crate::execution::types::UnitLen::Mm)) .unwrap(); let result = new_program.meta_settings().unwrap(); @@ -4285,7 +4268,7 @@ startSketchOn(XY) // Edit the ast. let new_program = program - .change_default_units(Some(crate::execution::types::UnitLen::Mm), None) + .change_default_units(Some(crate::execution::types::UnitLen::Mm)) .unwrap(); let result = new_program.meta_settings().unwrap(); @@ -4320,7 +4303,7 @@ startSketchOn(XY) let program = crate::parsing::top_level_parse(code).unwrap(); let new_program = program - .change_default_units(Some(crate::execution::types::UnitLen::Cm), None) + .change_default_units(Some(crate::execution::types::UnitLen::Cm)) .unwrap(); let result = new_program.meta_settings().unwrap(); diff --git a/rust/kcl-lib/src/std/args.rs b/rust/kcl-lib/src/std/args.rs index 0afe72cec9..39bea4e99d 100644 --- a/rust/kcl-lib/src/std/args.rs +++ b/rust/kcl-lib/src/std/args.rs @@ -9,6 +9,7 @@ pub use crate::execution::fn_call::Args; use crate::{ errors::{KclError, KclErrorDetails}, execution::{ + annotations, kcl_value::FunctionSource, types::{NumericType, PrimitiveType, RuntimeType, UnitAngle, UnitLen, UnitType}, ExecState, ExtrudeSurface, Helix, KclObjectFields, KclValue, Metadata, PlaneInfo, Sketch, SketchSurface, Solid, @@ -21,7 +22,7 @@ use crate::{ sketch::FaceTag, sweep::SweepPath, }, - ModuleId, + CompilationError, ModuleId, }; const ERROR_STRING_SKETCH_TO_SOLID_HELPER: &str = @@ -56,9 +57,17 @@ impl TyF64 { len.adjust_to(self.n, units).0 } - pub fn to_degrees(&self) -> f64 { + pub fn to_degrees(&self, exec_state: &mut ExecState, source_range: SourceRange) -> f64 { let angle = match self.ty { - NumericType::Default { angle, .. } => angle, + NumericType::Default { angle, .. } => { + if self.n != 0.0 { + exec_state.warn( + CompilationError::err(source_range, "Prefer to use explicit units for angles"), + annotations::WARN_ANGLE_UNITS, + ); + } + angle + } NumericType::Known(UnitType::Angle(angle)) => angle, _ => unreachable!(), }; @@ -68,9 +77,17 @@ impl TyF64 { angle.adjust_to(self.n, UnitAngle::Degrees).0 } - pub fn to_radians(&self) -> f64 { + pub fn to_radians(&self, exec_state: &mut ExecState, source_range: SourceRange) -> f64 { let angle = match self.ty { - NumericType::Default { angle, .. } => angle, + NumericType::Default { angle, .. } => { + if self.n != 0.0 { + exec_state.warn( + CompilationError::err(source_range, "Prefer to use explicit units for angles"), + annotations::WARN_ANGLE_UNITS, + ); + } + angle + } NumericType::Known(UnitType::Angle(angle)) => angle, _ => unreachable!(), }; diff --git a/rust/kcl-lib/src/std/extrude.rs b/rust/kcl-lib/src/std/extrude.rs index df0aed61d4..55dc76b0c3 100644 --- a/rust/kcl-lib/src/std/extrude.rs +++ b/rust/kcl-lib/src/std/extrude.rs @@ -104,8 +104,13 @@ async fn inner_extrude( let cmd = match (&twist_angle, &twist_angle_step, &twist_center) { (Some(angle), angle_step, center) => { let center = center.clone().map(point_to_mm).map(Point2d::from).unwrap_or_default(); - let total_rotation_angle = Angle::from_degrees(angle.to_degrees()); - let angle_step_size = Angle::from_degrees(angle_step.clone().map(|a| a.to_degrees()).unwrap_or(15.0)); + let total_rotation_angle = Angle::from_degrees(angle.to_degrees(exec_state, args.source_range)); + let angle_step_size = Angle::from_degrees( + angle_step + .clone() + .map(|a| a.to_degrees(exec_state, args.source_range)) + .unwrap_or(15.0), + ); ModelingCmd::from(mcmd::TwistExtrude { target: sketch.id.into(), distance: LengthUnit(length.to_mm()), diff --git a/rust/kcl-lib/src/std/math.rs b/rust/kcl-lib/src/std/math.rs index 572db8d052..aa50bcd101 100644 --- a/rust/kcl-lib/src/std/math.rs +++ b/rust/kcl-lib/src/std/math.rs @@ -5,6 +5,7 @@ use anyhow::Result; use crate::{ errors::{KclError, KclErrorDetails}, execution::{ + annotations, types::{ArrayLen, NumericType, RuntimeType}, ExecState, KclValue, }, @@ -33,21 +34,21 @@ pub async fn rem(exec_state: &mut ExecState, args: Args) -> Result Result { let num: TyF64 = args.get_unlabeled_kw_arg("input", &RuntimeType::angle(), exec_state)?; - let num = num.to_radians(); + let num = num.to_radians(exec_state, args.source_range); Ok(args.make_user_val_from_f64_with_type(TyF64::new(libm::cos(num), exec_state.current_default_units()))) } /// Compute the sine of a number (in radians). pub async fn sin(exec_state: &mut ExecState, args: Args) -> Result { let num: TyF64 = args.get_unlabeled_kw_arg("input", &RuntimeType::angle(), exec_state)?; - let num = num.to_radians(); + let num = num.to_radians(exec_state, args.source_range); Ok(args.make_user_val_from_f64_with_type(TyF64::new(libm::sin(num), exec_state.current_default_units()))) } /// Compute the tangent of a number (in radians). pub async fn tan(exec_state: &mut ExecState, args: Args) -> Result { let num: TyF64 = args.get_unlabeled_kw_arg("input", &RuntimeType::angle(), exec_state)?; - let num = num.to_radians(); + let num = num.to_radians(exec_state, args.source_range); Ok(args.make_user_val_from_f64_with_type(TyF64::new(libm::tan(num), exec_state.current_default_units()))) } @@ -114,7 +115,7 @@ pub async fn min(exec_state: &mut ExecState, args: Args) -> Result Result Result Result { let y = args.get_kw_arg("y", &RuntimeType::length(), exec_state)?; let x = args.get_kw_arg("x", &RuntimeType::length(), exec_state)?; - let (y, x, _) = NumericType::combine_eq_coerce(y, x); + let (y, x, _) = NumericType::combine_eq_coerce(y, x, Some((exec_state, args.source_range))); let result = libm::atan2(y, x); Ok(args.make_user_val_from_f64_with_type(TyF64::new(result, NumericType::radians()))) @@ -236,7 +237,7 @@ pub async fn ln(exec_state: &mut ExecState, args: Args) -> Result Result { let hypotenuse: TyF64 = args.get_kw_arg("hypotenuse", &RuntimeType::length(), exec_state)?; let leg: TyF64 = args.get_kw_arg("leg", &RuntimeType::length(), exec_state)?; - let (hypotenuse, leg, ty) = NumericType::combine_eq_coerce(hypotenuse, leg); + let (hypotenuse, leg, ty) = NumericType::combine_eq_coerce(hypotenuse, leg, Some((exec_state, args.source_range))); let result = (hypotenuse.powi(2) - f64::min(hypotenuse.abs(), leg.abs()).powi(2)).sqrt(); Ok(KclValue::from_number_with_type(result, ty, vec![args.into()])) } @@ -245,7 +246,7 @@ pub async fn leg_length(exec_state: &mut ExecState, args: Args) -> Result Result { let hypotenuse: TyF64 = args.get_kw_arg("hypotenuse", &RuntimeType::length(), exec_state)?; let leg: TyF64 = args.get_kw_arg("leg", &RuntimeType::length(), exec_state)?; - let (hypotenuse, leg, _ty) = NumericType::combine_eq_coerce(hypotenuse, leg); + let (hypotenuse, leg, _ty) = NumericType::combine_eq_coerce(hypotenuse, leg, Some((exec_state, args.source_range))); let result = libm::acos(leg.min(hypotenuse) / hypotenuse).to_degrees(); Ok(KclValue::from_number_with_type( result, @@ -258,7 +259,7 @@ pub async fn leg_angle_x(exec_state: &mut ExecState, args: Args) -> Result Result { let hypotenuse: TyF64 = args.get_kw_arg("hypotenuse", &RuntimeType::length(), exec_state)?; let leg: TyF64 = args.get_kw_arg("leg", &RuntimeType::length(), exec_state)?; - let (hypotenuse, leg, _ty) = NumericType::combine_eq_coerce(hypotenuse, leg); + let (hypotenuse, leg, _ty) = NumericType::combine_eq_coerce(hypotenuse, leg, Some((exec_state, args.source_range))); let result = libm::asin(leg.min(hypotenuse) / hypotenuse).to_degrees(); Ok(KclValue::from_number_with_type( result, diff --git a/rust/kcl-lib/src/std/sketch.rs b/rust/kcl-lib/src/std/sketch.rs index c0c74360c0..da24053423 100644 --- a/rust/kcl-lib/src/std/sketch.rs +++ b/rust/kcl-lib/src/std/sketch.rs @@ -132,6 +132,8 @@ async fn inner_involute_circular( args: Args, ) -> Result { let id = exec_state.next_uuid(); + let angle_deg = angle.to_degrees(exec_state, args.source_range); + let angle_rad = angle.to_radians(exec_state, args.source_range); exec_state .batch_modeling_cmd( @@ -141,7 +143,7 @@ async fn inner_involute_circular( segment: PathSegment::CircularInvolute { start_radius: LengthUnit(start_radius.to_mm()), end_radius: LengthUnit(end_radius.to_mm()), - angle: Angle::from_degrees(angle.to_degrees()), + angle: Angle::from_degrees(angle_deg), reverse: reverse.unwrap_or_default(), }, }), @@ -157,11 +159,11 @@ async fn inner_involute_circular( let theta = f64::sqrt(end_radius * end_radius - start_radius * start_radius) / start_radius; let (x, y) = involute_curve(start_radius, theta); - end.x = x * libm::cos(angle.to_radians()) - y * libm::sin(angle.to_radians()); - end.y = x * libm::sin(angle.to_radians()) + y * libm::cos(angle.to_radians()); + end.x = x * libm::cos(angle_rad) - y * libm::sin(angle_rad); + end.y = x * libm::sin(angle_rad) + y * libm::cos(angle_rad); - end.x -= start_radius * libm::cos(angle.to_radians()); - end.y -= start_radius * libm::sin(angle.to_radians()); + end.x -= start_radius * libm::cos(angle_rad); + end.y -= start_radius * libm::sin(angle_rad); if reverse.unwrap_or_default() { end.x = -end.x; @@ -718,7 +720,7 @@ pub async fn inner_angled_line_that_intersects( point_to_len_unit(path.get_to(), from.units), ], offset.map(|t| t.to_length_units(from.units)).unwrap_or_default(), - angle.to_degrees(), + angle.to_degrees(exec_state, args.source_range), from.ignore_units(), ); let to = [ @@ -1256,8 +1258,8 @@ pub async fn relative_arc( radius: TyF64, tag: Option, ) -> Result { - let a_start = Angle::from_degrees(angle_start.to_degrees()); - let a_end = Angle::from_degrees(angle_end.to_degrees()); + let a_start = Angle::from_degrees(angle_start.to_degrees(exec_state, args.source_range)); + let a_end = Angle::from_degrees(angle_end.to_degrees(exec_state, args.source_range)); let radius = radius.to_length_units(from.units); let (center, end) = arc_center_and_end(from.ignore_units(), a_start, a_end, radius); if a_start == a_end { @@ -1409,7 +1411,7 @@ async fn inner_tangential_arc_radius_angle( let (center, to, ccw) = match data { TangentialArcData::RadiusAndOffset { radius, offset } => { // KCL stdlib types use degrees. - let offset = Angle::from_degrees(offset.to_degrees()); + let offset = Angle::from_degrees(offset.to_degrees(exec_state, args.source_range)); // Calculate the end point from the angle and radius. // atan2 outputs radians. diff --git a/rust/kcl-lib/src/std/utils.rs b/rust/kcl-lib/src/std/utils.rs index ea81f706f4..ba6d3e304d 100644 --- a/rust/kcl-lib/src/std/utils.rs +++ b/rust/kcl-lib/src/std/utils.rs @@ -6,7 +6,7 @@ use super::args::TyF64; use crate::execution::types::{NumericType, UnitLen}; pub(crate) fn untype_point(p: [TyF64; 2]) -> ([f64; 2], NumericType) { - let (x, y, ty) = NumericType::combine_eq_coerce(p[0].clone(), p[1].clone()); + let (x, y, ty) = NumericType::combine_eq_coerce(p[0].clone(), p[1].clone(), None); ([x, y], ty) } diff --git a/rust/kcl-lib/tests/import_async/artifact_commands.snap b/rust/kcl-lib/tests/import_async/artifact_commands.snap index fe05bf663d..f8c64c2089 100644 --- a/rust/kcl-lib/tests/import_async/artifact_commands.snap +++ b/rust/kcl-lib/tests/import_async/artifact_commands.snap @@ -5571398,7 +5571398,7 @@ description: Artifact commands import_async.kcl "segment": { "type": "line", "end": { - "x": -5.816564508980187, + "x": -5.816564508980192, "y": 18.856838998639372, "z": 0.0 }, @@ -5571814,7 +5571814,7 @@ description: Artifact commands import_async.kcl "segment": { "type": "line", "end": { - "x": -1.6644342460226098, + "x": -1.664434246022614, "y": 19.66322604122736, "z": 0.0 }, diff --git a/rust/kcl-lib/tests/import_async/artifact_graph_flowchart.snap.md b/rust/kcl-lib/tests/import_async/artifact_graph_flowchart.snap.md index 93075f1968..d60a8bb77f 100644 --- a/rust/kcl-lib/tests/import_async/artifact_graph_flowchart.snap.md +++ b/rust/kcl-lib/tests/import_async/artifact_graph_flowchart.snap.md @@ -9,64 +9,64 @@ flowchart LR %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }] 5["Segment
[938, 966, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }] - 6["Segment
[974, 1050, 0]"] + 6["Segment
[974, 1056, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }] - 7["Segment
[1058, 1123, 0]"] + 7["Segment
[1064, 1132, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }] - 8["Segment
[1131, 1138, 0]"] + 8["Segment
[1140, 1147, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }] 9[Solid2d] end subgraph path11 [Path] - 11["Path
[1643, 1713, 0]"] + 11["Path
[1652, 1722, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }] - 12["Segment
[1723, 1889, 0]"] + 12["Segment
[1732, 1898, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }] - 13["Segment
[1899, 1984, 0]"] + 13["Segment
[1908, 1993, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }] - 14["Segment
[1994, 2215, 0]"] + 14["Segment
[2003, 2224, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }] - 15["Segment
[2302, 2388, 0]"] + 15["Segment
[2311, 2400, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }] - 16["Segment
[2677, 2684, 0]"] + 16["Segment
[2692, 2699, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }] 17[Solid2d] end subgraph path19 [Path] - 19["Path
[1643, 1713, 0]"] + 19["Path
[1652, 1722, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }] - 20["Segment
[1723, 1889, 0]"] + 20["Segment
[1732, 1898, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }] - 21["Segment
[1899, 1984, 0]"] + 21["Segment
[1908, 1993, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }] - 22["Segment
[1994, 2215, 0]"] + 22["Segment
[2003, 2224, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }] - 23["Segment
[2302, 2388, 0]"] + 23["Segment
[2311, 2400, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }] - 24["Segment
[2677, 2684, 0]"] + 24["Segment
[2692, 2699, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }] 25[Solid2d] end subgraph path27 [Path] - 27["Path
[1643, 1713, 0]"] + 27["Path
[1652, 1722, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }] - 32["Segment
[2677, 2684, 0]"] + 32["Segment
[2692, 2699, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }] 33[Solid2d] end 1["Plane
[728, 745, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] - 10["Plane
[1594, 1632, 0]"] + 10["Plane
[1603, 1641, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }, CallKwUnlabeledArg] - 18["Plane
[1594, 1632, 0]"] + 18["Plane
[1603, 1641, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }, CallKwUnlabeledArg] - 26["Plane
[1594, 1632, 0]"] + 26["Plane
[1603, 1641, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }, CallKwUnlabeledArg] 28["SweepEdge Opposite"] 29["SweepEdge Opposite"] 30["SweepEdge Opposite"] 31["SweepEdge Opposite"] - 34["Sweep Loft
[3201, 3268, 0]"] + 34["Sweep Loft
[3216, 3283, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 15 }, VariableDeclarationDeclaration, VariableDeclarationInit] 35[Wall] %% face_code_ref=Missing NodePath @@ -84,11 +84,11 @@ flowchart LR 42["SweepEdge Adjacent"] 43["SweepEdge Adjacent"] 44["SweepEdge Adjacent"] - 45["StartSketchOnPlane
[1580, 1633, 0]"] + 45["StartSketchOnPlane
[1589, 1642, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] - 46["StartSketchOnPlane
[1580, 1633, 0]"] + 46["StartSketchOnPlane
[1589, 1642, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] - 47["StartSketchOnPlane
[1580, 1633, 0]"] + 47["StartSketchOnPlane
[1589, 1642, 0]"] %% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] 1 --- 2 2 --- 3 diff --git a/rust/kcl-lib/tests/import_async/ast.snap b/rust/kcl-lib/tests/import_async/ast.snap index f12bc507d0..24d604a241 100644 --- a/rust/kcl-lib/tests/import_async/ast.snap +++ b/rust/kcl-lib/tests/import_async/ast.snap @@ -1179,13 +1179,13 @@ description: Result of parsing import_async.kcl "right": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -1205,13 +1205,13 @@ description: Result of parsing import_async.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1278,13 +1278,13 @@ description: Result of parsing import_async.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2518,13 +2518,13 @@ description: Result of parsing import_async.kcl "left": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "/", @@ -2746,13 +2746,13 @@ description: Result of parsing import_async.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -3514,13 +3514,13 @@ description: Result of parsing import_async.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "20", + "raw": "20deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 20.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -3536,13 +3536,13 @@ description: Result of parsing import_async.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "35", + "raw": "35deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 35.0, - "suffix": "None" + "suffix": "Deg" } } }, diff --git a/rust/kcl-lib/tests/import_async/input.kcl b/rust/kcl-lib/tests/import_async/input.kcl index 2cce204d77..475edbc3db 100644 --- a/rust/kcl-lib/tests/import_async/input.kcl +++ b/rust/kcl-lib/tests/import_async/input.kcl @@ -30,8 +30,8 @@ fn helicalGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { |> xLine(length = keywayDepth) |> yLine(length = -keywayWidth) |> xLine(length = -keywayDepth) - |> arc(angleStart = -1 * startAngle + 360, angleEnd = 180, radius = holeRadius) - |> arc(angleStart = 180, angleEnd = startAngle, radius = holeRadius) + |> arc(angleStart = -1 * startAngle + 360deg, angleEnd = 180deg, radius = holeRadius) + |> arc(angleStart = 180deg, angleEnd = startAngle, radius = holeRadius) |> close() // Define a function to create a rotated gear sketch on an offset plane @@ -57,14 +57,14 @@ fn helicalGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { ) // Position the end line of the sketch at the start of the next tooth - |> line(endAbsolute = polar(angle = 360 / nTeeth + helixCalc, length = baseDiameter / 2)) + |> line(endAbsolute = polar(angle = 360deg / nTeeth + helixCalc, length = baseDiameter / 2)) // Pattern the sketch about the center by the specified number of teeth, then close the sketch |> patternCircular2d( %, instances = nTeeth, center = [0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) |> close() @@ -94,8 +94,8 @@ fn helicalGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { helicalGear( nTeeth = 21, module = 2, - pressureAngle = 20, - helixAngle = 35, + pressureAngle = 20deg, + helixAngle = 35deg, gearHeight = 7, ) diff --git a/rust/kcl-lib/tests/import_async/ops.snap b/rust/kcl-lib/tests/import_async/ops.snap index 25864b9ab4..64d5c2a006 100644 --- a/rust/kcl-lib/tests/import_async/ops.snap +++ b/rust/kcl-lib/tests/import_async/ops.snap @@ -54,13 +54,9 @@ description: Operations executed import_async.kcl "type": "Number", "value": 35.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -102,13 +98,9 @@ description: Operations executed import_async.kcl "type": "Number", "value": 20.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -1153,7 +1145,7 @@ description: Operations executed import_async.kcl "angle": { "value": { "type": "Number", - "value": 1.8699956271367815, + "value": 1.8699956271367817, "ty": { "type": "Known", "type": "Angle", @@ -1235,7 +1227,7 @@ description: Operations executed import_async.kcl "name": "x", "value": { "type": "Number", - "value": -5.816564508980187, + "value": -5.816564508980192, "ty": { "type": "Default", "len": { @@ -2595,7 +2587,7 @@ description: Operations executed import_async.kcl "angle": { "value": { "type": "Number", - "value": 1.655242081157069, + "value": 1.6552420811570692, "ty": { "type": "Known", "type": "Angle", @@ -2677,7 +2669,7 @@ description: Operations executed import_async.kcl "name": "x", "value": { "type": "Number", - "value": -1.6644342460226098, + "value": -1.664434246022614, "ty": { "type": "Default", "len": { diff --git a/rust/kcl-lib/tests/import_async/unparsed.snap b/rust/kcl-lib/tests/import_async/unparsed.snap index 1ddd6313ce..7138b06391 100644 --- a/rust/kcl-lib/tests/import_async/unparsed.snap +++ b/rust/kcl-lib/tests/import_async/unparsed.snap @@ -34,8 +34,8 @@ fn helicalGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { |> xLine(length = keywayDepth) |> yLine(length = -keywayWidth) |> xLine(length = -keywayDepth) - |> arc(angleStart = -1 * startAngle + 360, angleEnd = 180, radius = holeRadius) - |> arc(angleStart = 180, angleEnd = startAngle, radius = holeRadius) + |> arc(angleStart = -1 * startAngle + 360deg, angleEnd = 180deg, radius = holeRadius) + |> arc(angleStart = 180deg, angleEnd = startAngle, radius = holeRadius) |> close() // Define a function to create a rotated gear sketch on an offset plane @@ -61,14 +61,14 @@ fn helicalGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { ) // Position the end line of the sketch at the start of the next tooth - |> line(endAbsolute = polar(angle = 360 / nTeeth + helixCalc, length = baseDiameter / 2)) + |> line(endAbsolute = polar(angle = 360deg / nTeeth + helixCalc, length = baseDiameter / 2)) // Pattern the sketch about the center by the specified number of teeth, then close the sketch |> patternCircular2d( %, instances = nTeeth, center = [0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) |> close() @@ -98,8 +98,8 @@ fn helicalGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) { helicalGear( nTeeth = 21, module = 2, - pressureAngle = 20, - helixAngle = 35, + pressureAngle = 20deg, + helixAngle = 35deg, gearHeight = 7, ) diff --git a/rust/kcl-lib/tests/involute_circular_units/artifact_graph_flowchart.snap.md b/rust/kcl-lib/tests/involute_circular_units/artifact_graph_flowchart.snap.md index ea401706d9..2df2573a50 100644 --- a/rust/kcl-lib/tests/involute_circular_units/artifact_graph_flowchart.snap.md +++ b/rust/kcl-lib/tests/involute_circular_units/artifact_graph_flowchart.snap.md @@ -1,34 +1,34 @@ ```mermaid flowchart LR subgraph path2 [Path] - 2["Path
[335, 375, 0]"] + 2["Path
[338, 378, 0]"] %% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }] - 3["Segment
[381, 519, 0]"] + 3["Segment
[384, 522, 0]"] %% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }] - 4["Segment
[525, 571, 0]"] + 4["Segment
[528, 574, 0]"] %% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }] - 5["Segment
[577, 722, 0]"] + 5["Segment
[580, 728, 0]"] %% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }] - 6["Segment
[728, 870, 0]"] + 6["Segment
[734, 879, 0]"] %% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }] - 7["Segment
[876, 922, 0]"] + 7["Segment
[885, 931, 0]"] %% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }] - 8["Segment
[928, 1002, 0]"] + 8["Segment
[937, 1014, 0]"] %% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }] - 9["Segment
[1157, 1164, 0]"] + 9["Segment
[1172, 1179, 0]"] %% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 9 }] 10[Solid2d] end subgraph path11 [Path] - 11["Path
[1188, 1223, 0]"] + 11["Path
[1203, 1238, 0]"] %% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 10 }, CallKwArg { index: 0 }] - 12["Segment
[1188, 1223, 0]"] + 12["Segment
[1203, 1238, 0]"] %% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 10 }, CallKwArg { index: 0 }] 13[Solid2d] end - 1["Plane
[312, 329, 0]"] + 1["Plane
[315, 332, 0]"] %% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] - 14["Sweep Extrusion
[1230, 1258, 0]"] + 14["Sweep Extrusion
[1245, 1273, 0]"] %% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 11 }] 15[Wall] %% face_code_ref=Missing NodePath diff --git a/rust/kcl-lib/tests/involute_circular_units/ast.snap b/rust/kcl-lib/tests/involute_circular_units/ast.snap index 7ec0e4abe6..f7ca6eee25 100644 --- a/rust/kcl-lib/tests/involute_circular_units/ast.snap +++ b/rust/kcl-lib/tests/involute_circular_units/ast.snap @@ -1,6 +1,5 @@ --- source: kcl-lib/src/simulation_tests.rs -assertion_line: 87 description: Result of parsing involute_circular_units.kcl --- { @@ -475,13 +474,13 @@ description: Result of parsing involute_circular_units.kcl "init": { "commentStart": 0, "end": 0, - "raw": "6", + "raw": "6deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 6.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -1026,13 +1025,13 @@ description: Result of parsing involute_circular_units.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "9", + "raw": "9deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 9.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1230,13 +1229,13 @@ description: Result of parsing involute_circular_units.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "12", + "raw": "12deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 12.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -1419,13 +1418,13 @@ description: Result of parsing involute_circular_units.kcl "left": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "/", @@ -1626,13 +1625,13 @@ description: Result of parsing involute_circular_units.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, diff --git a/rust/kcl-lib/tests/involute_circular_units/input.kcl b/rust/kcl-lib/tests/involute_circular_units/input.kcl index 36e4d56426..115d01a8bc 100644 --- a/rust/kcl-lib/tests/involute_circular_units/input.kcl +++ b/rust/kcl-lib/tests/involute_circular_units/input.kcl @@ -11,7 +11,7 @@ baseDiameter = pitchDiameter * cos(pressureAngle) tipDiameter = pitchDiameter + 2 * module gearHeight = .3 -angle001 = 6 +angle001 = 6deg sketch001 = startSketchOn(XY) |> startProfile(at = [baseDiameter / 2, 0]) |> involuteCircular( @@ -23,23 +23,23 @@ sketch001 = startSketchOn(XY) |> line(endAbsolute = [lastSegX(%), lastSegY(%)]) |> arc( angleStart = asin(segEndY(seg01) / segEndX(seg01)), - angleEnd = 9, + angleEnd = 9deg, radius = tipDiameter / 2, tag = $seg02, ) |> involuteCircular( startRadius = baseDiameter / 2, endRadius = tipDiameter / 2, - angle = -12, + angle = -12deg, reverse = true, ) |> line(endAbsolute = [lastSegX(%), lastSegY(%)]) - |> line(endAbsolute = polar(angle = 360 / nTeeth, length = baseDiameter / 2)) + |> line(endAbsolute = polar(angle = 360deg / nTeeth, length = baseDiameter / 2)) |> patternCircular2d( %, instances = nTeeth, center = [0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) |> close() diff --git a/rust/kcl-lib/tests/involute_circular_units/ops.snap b/rust/kcl-lib/tests/involute_circular_units/ops.snap index a80bec3008..4f2468ad6b 100644 --- a/rust/kcl-lib/tests/involute_circular_units/ops.snap +++ b/rust/kcl-lib/tests/involute_circular_units/ops.snap @@ -304,13 +304,9 @@ description: Operations executed involute_circular_units.kcl "type": "Number", "value": 6.0, "ty": { - "type": "Default", - "len": { - "type": "Cm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", diff --git a/rust/kcl-lib/tests/involute_circular_units/program_memory.snap b/rust/kcl-lib/tests/involute_circular_units/program_memory.snap index 856f1089f2..94bbec5e7b 100644 --- a/rust/kcl-lib/tests/involute_circular_units/program_memory.snap +++ b/rust/kcl-lib/tests/involute_circular_units/program_memory.snap @@ -20,13 +20,9 @@ description: Variables in memory after executing involute_circular_units.kcl "type": "Number", "value": 6.0, "ty": { - "type": "Default", - "len": { - "type": "Cm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "baseDiameter": { @@ -138,9 +134,9 @@ description: Variables in memory after executing involute_circular_units.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 505, - "end": 511, - "start": 505, + "commentStart": 508, + "end": 514, + "start": 508, "type": "TagDeclarator", "value": "seg01" }, @@ -158,9 +154,9 @@ description: Variables in memory after executing involute_circular_units.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 708, - "end": 714, - "start": 708, + "commentStart": 714, + "end": 720, + "start": 714, "type": "TagDeclarator", "value": "seg02" }, @@ -202,9 +198,9 @@ description: Variables in memory after executing involute_circular_units.kcl 0.0 ], "tag": { - "commentStart": 505, - "end": 511, - "start": 505, + "commentStart": 508, + "end": 514, + "start": 508, "type": "TagDeclarator", "value": "seg01" }, @@ -252,9 +248,9 @@ description: Variables in memory after executing involute_circular_units.kcl ], "radius": 5.75, "tag": { - "commentStart": 708, - "end": 714, - "start": 708, + "commentStart": 714, + "end": 720, + "start": 714, "type": "TagDeclarator", "value": "seg02" }, diff --git a/rust/kcl-lib/tests/involute_circular_units/unparsed.snap b/rust/kcl-lib/tests/involute_circular_units/unparsed.snap index 86406514f3..cf634b7b39 100644 --- a/rust/kcl-lib/tests/involute_circular_units/unparsed.snap +++ b/rust/kcl-lib/tests/involute_circular_units/unparsed.snap @@ -1,6 +1,5 @@ --- source: kcl-lib/src/simulation_tests.rs -assertion_line: 109 description: Result of unparsing involute_circular_units.kcl --- @settings(defaultLengthUnit = cm) @@ -16,7 +15,7 @@ baseDiameter = pitchDiameter * cos(pressureAngle) tipDiameter = pitchDiameter + 2 * module gearHeight = .3 -angle001 = 6 +angle001 = 6deg sketch001 = startSketchOn(XY) |> startProfile(at = [baseDiameter / 2, 0]) |> involuteCircular( @@ -28,23 +27,23 @@ sketch001 = startSketchOn(XY) |> line(endAbsolute = [lastSegX(%), lastSegY(%)]) |> arc( angleStart = asin(segEndY(seg01) / segEndX(seg01)), - angleEnd = 9, + angleEnd = 9deg, radius = tipDiameter / 2, tag = $seg02, ) |> involuteCircular( startRadius = baseDiameter / 2, endRadius = tipDiameter / 2, - angle = -12, + angle = -12deg, reverse = true, ) |> line(endAbsolute = [lastSegX(%), lastSegY(%)]) - |> line(endAbsolute = polar(angle = 360 / nTeeth, length = baseDiameter / 2)) + |> line(endAbsolute = polar(angle = 360deg / nTeeth, length = baseDiameter / 2)) |> patternCircular2d( %, instances = nTeeth, center = [0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) |> close() diff --git a/rust/kcl-lib/tests/kcl_samples/ball-bearing/ast.snap b/rust/kcl-lib/tests/kcl_samples/ball-bearing/ast.snap index 611c70e5d2..d530e91d1c 100644 --- a/rust/kcl-lib/tests/kcl_samples/ball-bearing/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/ball-bearing/ast.snap @@ -1135,13 +1135,13 @@ description: Result of parsing ball-bearing.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1868,13 +1868,13 @@ description: Result of parsing ball-bearing.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1926,13 +1926,13 @@ description: Result of parsing ball-bearing.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1948,13 +1948,13 @@ description: Result of parsing ball-bearing.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2330,13 +2330,13 @@ description: Result of parsing ball-bearing.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2901,13 +2901,13 @@ description: Result of parsing ball-bearing.kcl "left": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "/", @@ -2984,13 +2984,13 @@ description: Result of parsing ball-bearing.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, diff --git a/rust/kcl-lib/tests/kcl_samples/ball-bearing/ops.snap b/rust/kcl-lib/tests/kcl_samples/ball-bearing/ops.snap index 63969081ae..19714f416e 100644 --- a/rust/kcl-lib/tests/kcl_samples/ball-bearing/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/ball-bearing/ops.snap @@ -1140,13 +1140,9 @@ description: Operations executed ball-bearing.kcl "type": "Number", "value": 36.0, "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] diff --git a/rust/kcl-lib/tests/kcl_samples/brake-rotor/ast.snap b/rust/kcl-lib/tests/kcl_samples/brake-rotor/ast.snap index f235321355..c0f6ab3e64 100644 --- a/rust/kcl-lib/tests/kcl_samples/brake-rotor/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/brake-rotor/ast.snap @@ -429,13 +429,13 @@ description: Result of parsing brake-rotor.kcl "init": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -462,13 +462,13 @@ description: Result of parsing brake-rotor.kcl "init": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -528,13 +528,13 @@ description: Result of parsing brake-rotor.kcl "init": { "commentStart": 0, "end": 0, - "raw": "5", + "raw": "5deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 5.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -3374,13 +3374,13 @@ description: Result of parsing brake-rotor.kcl "right": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -4397,13 +4397,13 @@ description: Result of parsing brake-rotor.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -4965,13 +4965,13 @@ description: Result of parsing brake-rotor.kcl "left": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "-", @@ -5092,13 +5092,13 @@ description: Result of parsing brake-rotor.kcl "left": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "-", @@ -5618,13 +5618,13 @@ description: Result of parsing brake-rotor.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -6730,13 +6730,13 @@ description: Result of parsing brake-rotor.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, diff --git a/rust/kcl-lib/tests/kcl_samples/brake-rotor/ops.snap b/rust/kcl-lib/tests/kcl_samples/brake-rotor/ops.snap index 36673fb098..a6e7c9ea1a 100644 --- a/rust/kcl-lib/tests/kcl_samples/brake-rotor/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/brake-rotor/ops.snap @@ -407,13 +407,9 @@ description: Operations executed brake-rotor.kcl "type": "Number", "value": 90.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -440,13 +436,9 @@ description: Operations executed brake-rotor.kcl "type": "Number", "value": 30.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -506,13 +498,9 @@ description: Operations executed brake-rotor.kcl "type": "Number", "value": 5.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -1002,13 +990,9 @@ description: Operations executed brake-rotor.kcl "type": "Number", "value": 90.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -1048,13 +1032,9 @@ description: Operations executed brake-rotor.kcl "type": "Number", "value": 60.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -1140,13 +1120,9 @@ description: Operations executed brake-rotor.kcl "type": "Number", "value": 84.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -1435,13 +1411,9 @@ description: Operations executed brake-rotor.kcl "type": "Number", "value": 90.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -1481,13 +1453,9 @@ description: Operations executed brake-rotor.kcl "type": "Number", "value": 60.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -1573,13 +1541,9 @@ description: Operations executed brake-rotor.kcl "type": "Number", "value": 75.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -1868,13 +1832,9 @@ description: Operations executed brake-rotor.kcl "type": "Number", "value": 90.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -1914,13 +1874,9 @@ description: Operations executed brake-rotor.kcl "type": "Number", "value": 60.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -2006,13 +1962,9 @@ description: Operations executed brake-rotor.kcl "type": "Number", "value": 66.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -3200,13 +3152,9 @@ description: Operations executed brake-rotor.kcl "type": "Number", "value": 90.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -3246,13 +3194,9 @@ description: Operations executed brake-rotor.kcl "type": "Number", "value": 60.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -3338,13 +3282,9 @@ description: Operations executed brake-rotor.kcl "type": "Number", "value": 84.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -3633,13 +3573,9 @@ description: Operations executed brake-rotor.kcl "type": "Number", "value": 90.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -3679,13 +3615,9 @@ description: Operations executed brake-rotor.kcl "type": "Number", "value": 60.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -3771,13 +3703,9 @@ description: Operations executed brake-rotor.kcl "type": "Number", "value": 75.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -4066,13 +3994,9 @@ description: Operations executed brake-rotor.kcl "type": "Number", "value": 90.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -4112,13 +4036,9 @@ description: Operations executed brake-rotor.kcl "type": "Number", "value": 60.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -4204,13 +4124,9 @@ description: Operations executed brake-rotor.kcl "type": "Number", "value": 66.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", diff --git a/rust/kcl-lib/tests/kcl_samples/brake-rotor/program_memory.snap b/rust/kcl-lib/tests/kcl_samples/brake-rotor/program_memory.snap index 063076a7a8..38afd89046 100644 --- a/rust/kcl-lib/tests/kcl_samples/brake-rotor/program_memory.snap +++ b/rust/kcl-lib/tests/kcl_samples/brake-rotor/program_memory.snap @@ -7,39 +7,27 @@ description: Variables in memory after executing brake-rotor.kcl "type": "Number", "value": 90.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "aDraftBell": { "type": "Number", "value": 5.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "aSweep": { "type": "Number", "value": 30.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "bodyDiscBell": { @@ -68,9 +56,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -177,9 +165,9 @@ description: Variables in memory after executing brake-rotor.kcl 70.0 ], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -836,9 +824,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -945,9 +933,9 @@ description: Variables in memory after executing brake-rotor.kcl 70.0 ], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -1270,9 +1258,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -1379,9 +1367,9 @@ description: Variables in memory after executing brake-rotor.kcl 70.0 ], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -1704,9 +1692,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -1813,9 +1801,9 @@ description: Variables in memory after executing brake-rotor.kcl 70.0 ], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -2138,9 +2126,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -2247,9 +2235,9 @@ description: Variables in memory after executing brake-rotor.kcl 70.0 ], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -2572,9 +2560,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -2681,9 +2669,9 @@ description: Variables in memory after executing brake-rotor.kcl 70.0 ], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -3101,9 +3089,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -3210,9 +3198,9 @@ description: Variables in memory after executing brake-rotor.kcl 70.0 ], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -3514,9 +3502,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -3623,9 +3611,9 @@ description: Variables in memory after executing brake-rotor.kcl 70.0 ], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -3927,9 +3915,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -4036,9 +4024,9 @@ description: Variables in memory after executing brake-rotor.kcl 70.0 ], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -4340,9 +4328,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -4449,9 +4437,9 @@ description: Variables in memory after executing brake-rotor.kcl 70.0 ], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -4753,9 +4741,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -4862,9 +4850,9 @@ description: Variables in memory after executing brake-rotor.kcl 70.0 ], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -5107,9 +5095,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -5132,9 +5120,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -5157,9 +5145,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -5182,9 +5170,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -5458,9 +5446,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -5567,9 +5555,9 @@ description: Variables in memory after executing brake-rotor.kcl 70.0 ], "tag": { - "commentStart": 4473, - "end": 4479, - "start": 4473, + "commentStart": 4497, + "end": 4503, + "start": 4497, "type": "TagDeclarator", "value": "seg04" }, @@ -5853,9 +5841,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -5866,9 +5854,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -5879,9 +5867,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -5892,9 +5880,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -5915,9 +5903,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -5940,9 +5928,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -5965,9 +5953,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -5990,9 +5978,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -6195,9 +6183,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -6208,9 +6196,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -6221,9 +6209,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -6234,9 +6222,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -6257,9 +6245,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -6282,9 +6270,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -6307,9 +6295,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -6332,9 +6320,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -6534,9 +6522,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -6547,9 +6535,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -6560,9 +6548,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -6573,9 +6561,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -6596,9 +6584,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -6621,9 +6609,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -6646,9 +6634,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -6671,9 +6659,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -6873,9 +6861,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -6886,9 +6874,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -6899,9 +6887,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -6912,9 +6900,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -6935,9 +6923,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -6960,9 +6948,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -6985,9 +6973,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -7010,9 +6998,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -7212,9 +7200,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -7225,9 +7213,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -7238,9 +7226,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -7251,9 +7239,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -7274,9 +7262,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -7299,9 +7287,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -7324,9 +7312,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -7349,9 +7337,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -7551,9 +7539,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -7564,9 +7552,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -7577,9 +7565,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -7590,9 +7578,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -7613,9 +7601,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -7638,9 +7626,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -7663,9 +7651,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -7688,9 +7676,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -7890,9 +7878,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -7903,9 +7891,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -7916,9 +7904,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -7929,9 +7917,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -7952,9 +7940,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -7977,9 +7965,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -8002,9 +7990,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -8027,9 +8015,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -8229,9 +8217,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -8242,9 +8230,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -8255,9 +8243,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -8268,9 +8256,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -8291,9 +8279,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -8316,9 +8304,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -8341,9 +8329,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -8366,9 +8354,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -8568,9 +8556,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -8581,9 +8569,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -8594,9 +8582,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -8607,9 +8595,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -8630,9 +8618,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -8655,9 +8643,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -8680,9 +8668,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -8705,9 +8693,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -8907,9 +8895,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -8920,9 +8908,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -8933,9 +8921,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -8946,9 +8934,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -8969,9 +8957,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -8994,9 +8982,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -9019,9 +9007,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -9044,9 +9032,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -9246,9 +9234,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -9259,9 +9247,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -9272,9 +9260,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -9285,9 +9273,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -9308,9 +9296,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -9333,9 +9321,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -9358,9 +9346,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -9383,9 +9371,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -9585,9 +9573,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -9598,9 +9586,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -9611,9 +9599,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -9624,9 +9612,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -9647,9 +9635,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -9672,9 +9660,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -9697,9 +9685,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -9722,9 +9710,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -9924,9 +9912,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -9937,9 +9925,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -9950,9 +9938,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -9963,9 +9951,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -9986,9 +9974,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -10011,9 +9999,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -10036,9 +10024,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -10061,9 +10049,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -10263,9 +10251,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -10276,9 +10264,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -10289,9 +10277,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -10302,9 +10290,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -10325,9 +10313,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -10350,9 +10338,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -10375,9 +10363,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -10400,9 +10388,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -10602,9 +10590,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -10615,9 +10603,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -10628,9 +10616,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -10641,9 +10629,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -10664,9 +10652,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -10689,9 +10677,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -10714,9 +10702,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -10739,9 +10727,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -10941,9 +10929,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -10954,9 +10942,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -10967,9 +10955,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -10980,9 +10968,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -11003,9 +10991,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -11028,9 +11016,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -11053,9 +11041,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -11078,9 +11066,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -11280,9 +11268,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -11293,9 +11281,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -11306,9 +11294,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -11319,9 +11307,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -11342,9 +11330,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -11367,9 +11355,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -11392,9 +11380,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -11417,9 +11405,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -11619,9 +11607,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -11632,9 +11620,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -11645,9 +11633,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -11658,9 +11646,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -11681,9 +11669,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -11706,9 +11694,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -11731,9 +11719,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -11756,9 +11744,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -11958,9 +11946,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -11971,9 +11959,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -11984,9 +11972,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -11997,9 +11985,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -12020,9 +12008,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -12045,9 +12033,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -12070,9 +12058,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -12095,9 +12083,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -12297,9 +12285,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -12310,9 +12298,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -12323,9 +12311,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -12336,9 +12324,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -12359,9 +12347,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -12384,9 +12372,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -12409,9 +12397,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -12434,9 +12422,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -12636,9 +12624,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -12649,9 +12637,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -12662,9 +12650,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -12675,9 +12663,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -12698,9 +12686,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -12723,9 +12711,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -12748,9 +12736,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -12773,9 +12761,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -12975,9 +12963,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -12988,9 +12976,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -13001,9 +12989,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -13014,9 +13002,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -13037,9 +13025,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -13062,9 +13050,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -13087,9 +13075,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -13112,9 +13100,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -13314,9 +13302,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -13327,9 +13315,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -13340,9 +13328,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -13353,9 +13341,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -13376,9 +13364,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -13401,9 +13389,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -13426,9 +13414,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -13451,9 +13439,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -13653,9 +13641,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -13666,9 +13654,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -13679,9 +13667,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -13692,9 +13680,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -13715,9 +13703,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -13740,9 +13728,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -13765,9 +13753,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -13790,9 +13778,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -13992,9 +13980,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -14005,9 +13993,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -14018,9 +14006,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -14031,9 +14019,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -14054,9 +14042,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -14079,9 +14067,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -14104,9 +14092,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -14129,9 +14117,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -14331,9 +14319,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -14344,9 +14332,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -14357,9 +14345,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -14370,9 +14358,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -14393,9 +14381,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -14418,9 +14406,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -14443,9 +14431,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -14468,9 +14456,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -14670,9 +14658,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -14683,9 +14671,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -14696,9 +14684,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -14709,9 +14697,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -14732,9 +14720,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -14757,9 +14745,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -14782,9 +14770,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -14807,9 +14795,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -15009,9 +14997,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -15022,9 +15010,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -15035,9 +15023,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -15048,9 +15036,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -15071,9 +15059,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -15096,9 +15084,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -15121,9 +15109,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -15146,9 +15134,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -15348,9 +15336,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -15361,9 +15349,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -15374,9 +15362,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -15387,9 +15375,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -15410,9 +15398,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -15435,9 +15423,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -15460,9 +15448,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -15485,9 +15473,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -15687,9 +15675,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -15700,9 +15688,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -15713,9 +15701,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -15726,9 +15714,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -15749,9 +15737,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -15774,9 +15762,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -15799,9 +15787,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -15824,9 +15812,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -16026,9 +16014,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -16039,9 +16027,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -16052,9 +16040,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -16065,9 +16053,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -16088,9 +16076,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -16113,9 +16101,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -16138,9 +16126,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -16163,9 +16151,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -16365,9 +16353,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -16378,9 +16366,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -16391,9 +16379,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -16404,9 +16392,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -16427,9 +16415,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -16452,9 +16440,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -16477,9 +16465,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -16502,9 +16490,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -16704,9 +16692,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -16717,9 +16705,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -16730,9 +16718,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -16743,9 +16731,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -16766,9 +16754,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -16791,9 +16779,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -16816,9 +16804,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -16841,9 +16829,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -17043,9 +17031,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -17056,9 +17044,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -17069,9 +17057,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -17082,9 +17070,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -17105,9 +17093,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -17130,9 +17118,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -17155,9 +17143,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -17180,9 +17168,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -17382,9 +17370,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -17395,9 +17383,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -17408,9 +17396,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -17421,9 +17409,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -17444,9 +17432,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -17469,9 +17457,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -17494,9 +17482,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -17519,9 +17507,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -17721,9 +17709,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -17734,9 +17722,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -17747,9 +17735,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -17760,9 +17748,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -17783,9 +17771,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -17808,9 +17796,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -17833,9 +17821,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -17858,9 +17846,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -18060,9 +18048,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -18073,9 +18061,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -18086,9 +18074,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -18099,9 +18087,9 @@ description: Variables in memory after executing brake-rotor.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, @@ -18122,9 +18110,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2641, - "end": 2662, - "start": 2641, + "commentStart": 2650, + "end": 2671, + "start": 2650, "type": "TagDeclarator", "value": "rectangleSegmentA001" }, @@ -18147,9 +18135,9 @@ description: Variables in memory after executing brake-rotor.kcl 160.0 ], "tag": { - "commentStart": 2756, - "end": 2762, - "start": 2756, + "commentStart": 2768, + "end": 2774, + "start": 2768, "type": "TagDeclarator", "value": "seg02" }, @@ -18172,9 +18160,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2864, - "end": 2870, - "start": 2864, + "commentStart": 2876, + "end": 2882, + "start": 2876, "type": "TagDeclarator", "value": "seg03" }, @@ -18197,9 +18185,9 @@ description: Variables in memory after executing brake-rotor.kcl 100.0 ], "tag": { - "commentStart": 2940, - "end": 2946, - "start": 2940, + "commentStart": 2952, + "end": 2958, + "start": 2952, "type": "TagDeclarator", "value": "seg01" }, diff --git a/rust/kcl-lib/tests/kcl_samples/clock/ast.snap b/rust/kcl-lib/tests/kcl_samples/clock/ast.snap index 39bbec4757..92efdbd934 100644 --- a/rust/kcl-lib/tests/kcl_samples/clock/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/clock/ast.snap @@ -806,13 +806,13 @@ description: Result of parsing clock.kcl "left": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "-", @@ -839,13 +839,13 @@ description: Result of parsing clock.kcl "right": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -888,13 +888,13 @@ description: Result of parsing clock.kcl "left": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "-", @@ -921,13 +921,13 @@ description: Result of parsing clock.kcl "right": { "commentStart": 0, "end": 0, - "raw": "6", + "raw": "6deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 6.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -2372,13 +2372,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2490,13 +2490,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2655,13 +2655,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2790,13 +2790,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2933,13 +2933,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -3068,13 +3068,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -4070,13 +4070,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -4213,13 +4213,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -4364,13 +4364,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -4507,13 +4507,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -4677,13 +4677,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -4803,13 +4803,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -4976,13 +4976,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -5119,13 +5119,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -5270,13 +5270,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -5413,13 +5413,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -5586,13 +5586,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -5729,13 +5729,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -5880,13 +5880,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -6023,13 +6023,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -6174,13 +6174,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -6317,13 +6317,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -6490,13 +6490,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "150", + "raw": "150deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 150.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -6633,13 +6633,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "150", + "raw": "150deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 150.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -6784,13 +6784,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "150", + "raw": "150deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 150.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -6927,13 +6927,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "150", + "raw": "150deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 150.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -7078,13 +7078,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "150", + "raw": "150deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 150.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -7221,13 +7221,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "150", + "raw": "150deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 150.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -7372,13 +7372,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "150", + "raw": "150deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 150.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -7515,13 +7515,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "150", + "raw": "150deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 150.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -7687,13 +7687,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -7822,13 +7822,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -7965,13 +7965,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -8100,13 +8100,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -8265,13 +8265,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "150", + "raw": "150deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 150.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -8400,13 +8400,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "150", + "raw": "150deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 150.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -8562,13 +8562,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -8680,13 +8680,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -8823,13 +8823,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -8958,13 +8958,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -9123,13 +9123,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -9258,13 +9258,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -9401,13 +9401,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -9536,13 +9536,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -9679,13 +9679,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -9814,13 +9814,13 @@ description: Result of parsing clock.kcl "unlabeled": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -11006,13 +11006,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "70", + "raw": "70deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 70.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -11132,13 +11132,13 @@ description: Result of parsing clock.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "70", + "raw": "70deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 70.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -11331,26 +11331,26 @@ description: Result of parsing clock.kcl "left": { "commentStart": 0, "end": 0, - "raw": "70", + "raw": "70deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 70.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "+", "right": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -11468,13 +11468,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "70", + "raw": "70deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 70.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -11683,13 +11683,13 @@ description: Result of parsing clock.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "70", + "raw": "70deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 70.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -11703,13 +11703,13 @@ description: Result of parsing clock.kcl "right": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -11829,26 +11829,26 @@ description: Result of parsing clock.kcl "left": { "commentStart": 0, "end": 0, - "raw": "70", + "raw": "70deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 70.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "+", "right": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -12050,13 +12050,13 @@ description: Result of parsing clock.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "70", + "raw": "70deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 70.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -18929,13 +18929,13 @@ description: Result of parsing clock.kcl "right": { "commentStart": 0, "end": 0, - "raw": "20", + "raw": "20deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 20.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -19051,13 +19051,13 @@ description: Result of parsing clock.kcl "right": { "commentStart": 0, "end": 0, - "raw": "20", + "raw": "20deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 20.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -19232,13 +19232,13 @@ description: Result of parsing clock.kcl "right": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -19354,13 +19354,13 @@ description: Result of parsing clock.kcl "right": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -19495,13 +19495,13 @@ description: Result of parsing clock.kcl "right": { "commentStart": 0, "end": 0, - "raw": "340", + "raw": "340deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 340.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -19617,13 +19617,13 @@ description: Result of parsing clock.kcl "right": { "commentStart": 0, "end": 0, - "raw": "340", + "raw": "340deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 340.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -19788,13 +19788,13 @@ description: Result of parsing clock.kcl "right": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -20183,13 +20183,13 @@ description: Result of parsing clock.kcl "right": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -20308,13 +20308,13 @@ description: Result of parsing clock.kcl "right": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -20549,7 +20549,7 @@ description: Result of parsing clock.kcl "type": "NonCodeNode", "value": { "type": "blockComment", - "value": "|> angledLineThatIntersects(%, angle = segAng(seg002) + hourHandAngle - 90, intersectTag = seg004)", + "value": "|> angledLineThatIntersects(%, angle = segAng(seg002) + hourHandAngle - 90deg, intersectTag = seg004)", "style": "line" } } @@ -21140,13 +21140,13 @@ description: Result of parsing clock.kcl "right": { "commentStart": 0, "end": 0, - "raw": "20", + "raw": "20deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 20.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -21262,13 +21262,13 @@ description: Result of parsing clock.kcl "right": { "commentStart": 0, "end": 0, - "raw": "20", + "raw": "20deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 20.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -21443,13 +21443,13 @@ description: Result of parsing clock.kcl "right": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -21565,13 +21565,13 @@ description: Result of parsing clock.kcl "right": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -21706,13 +21706,13 @@ description: Result of parsing clock.kcl "right": { "commentStart": 0, "end": 0, - "raw": "340", + "raw": "340deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 340.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -21828,13 +21828,13 @@ description: Result of parsing clock.kcl "right": { "commentStart": 0, "end": 0, - "raw": "340", + "raw": "340deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 340.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -21999,13 +21999,13 @@ description: Result of parsing clock.kcl "right": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -22394,13 +22394,13 @@ description: Result of parsing clock.kcl "right": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -22519,13 +22519,13 @@ description: Result of parsing clock.kcl "right": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -23636,13 +23636,13 @@ description: Result of parsing clock.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -23658,13 +23658,13 @@ description: Result of parsing clock.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "420", + "raw": "420deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 420.0, - "suffix": "None" + "suffix": "Deg" } } } diff --git a/rust/kcl-lib/tests/kcl_samples/clock/ops.snap b/rust/kcl-lib/tests/kcl_samples/clock/ops.snap index 52b3478ac9..d608ef196e 100644 --- a/rust/kcl-lib/tests/kcl_samples/clock/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/clock/ops.snap @@ -572,13 +572,9 @@ description: Operations executed clock.kcl "type": "Number", "value": -180.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -605,13 +601,9 @@ description: Operations executed clock.kcl "type": "Number", "value": -84.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", diff --git a/rust/kcl-lib/tests/kcl_samples/clock/program_memory.snap b/rust/kcl-lib/tests/kcl_samples/clock/program_memory.snap index c89a537f9d..88d587b87e 100644 --- a/rust/kcl-lib/tests/kcl_samples/clock/program_memory.snap +++ b/rust/kcl-lib/tests/kcl_samples/clock/program_memory.snap @@ -25,9 +25,9 @@ description: Variables in memory after executing clock.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 889, - "end": 895, - "start": 889, + "commentStart": 901, + "end": 907, + "start": 901, "type": "TagDeclarator", "value": "seg02" }, @@ -38,9 +38,9 @@ description: Variables in memory after executing clock.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 968, - "end": 980, - "start": 968, + "commentStart": 980, + "end": 992, + "start": 980, "type": "TagDeclarator", "value": "capStart001" }, @@ -67,9 +67,9 @@ description: Variables in memory after executing clock.kcl ], "radius": 250.0, "tag": { - "commentStart": 889, - "end": 895, - "start": 889, + "commentStart": 901, + "end": 907, + "start": 901, "type": "TagDeclarator", "value": "seg02" }, @@ -233,9 +233,9 @@ description: Variables in memory after executing clock.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1312, - "end": 1318, - "start": 1312, + "commentStart": 1324, + "end": 1330, + "start": 1324, "type": "TagDeclarator", "value": "seg01" }, @@ -246,9 +246,9 @@ description: Variables in memory after executing clock.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1512, - "end": 1522, - "start": 1512, + "commentStart": 1524, + "end": 1534, + "start": 1524, "type": "TagDeclarator", "value": "capEnd001" }, @@ -275,9 +275,9 @@ description: Variables in memory after executing clock.kcl ], "radius": 250.0, "tag": { - "commentStart": 1312, - "end": 1318, - "start": 1312, + "commentStart": 1324, + "end": 1330, + "start": 1324, "type": "TagDeclarator", "value": "seg01" }, @@ -322,9 +322,9 @@ description: Variables in memory after executing clock.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 889, - "end": 895, - "start": 889, + "commentStart": 901, + "end": 907, + "start": 901, "type": "TagDeclarator", "value": "seg02" }, @@ -335,9 +335,9 @@ description: Variables in memory after executing clock.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 968, - "end": 980, - "start": 968, + "commentStart": 980, + "end": 992, + "start": 980, "type": "TagDeclarator", "value": "capStart001" }, @@ -364,9 +364,9 @@ description: Variables in memory after executing clock.kcl ], "radius": 250.0, "tag": { - "commentStart": 889, - "end": 895, - "start": 889, + "commentStart": 901, + "end": 907, + "start": 901, "type": "TagDeclarator", "value": "seg02" }, @@ -571,9 +571,9 @@ description: Variables in memory after executing clock.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 889, - "end": 895, - "start": 889, + "commentStart": 901, + "end": 907, + "start": 901, "type": "TagDeclarator", "value": "seg02" }, @@ -584,9 +584,9 @@ description: Variables in memory after executing clock.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 968, - "end": 980, - "start": 968, + "commentStart": 980, + "end": 992, + "start": 980, "type": "TagDeclarator", "value": "capStart001" }, @@ -613,9 +613,9 @@ description: Variables in memory after executing clock.kcl ], "radius": 250.0, "tag": { - "commentStart": 889, - "end": 895, - "start": 889, + "commentStart": 901, + "end": 907, + "start": 901, "type": "TagDeclarator", "value": "seg02" }, @@ -769,13 +769,9 @@ description: Variables in memory after executing clock.kcl "type": "Number", "value": -180.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "hourHandArmLength": { @@ -846,13 +842,9 @@ description: Variables in memory after executing clock.kcl "type": "Number", "value": -84.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "minuteHandArmLength": { @@ -1839,9 +1831,9 @@ description: Variables in memory after executing clock.kcl ], "radius": 250.0, "tag": { - "commentStart": 889, - "end": 895, - "start": 889, + "commentStart": 901, + "end": 907, + "start": 901, "type": "TagDeclarator", "value": "seg02" }, @@ -1942,9 +1934,9 @@ description: Variables in memory after executing clock.kcl ], "radius": 250.0, "tag": { - "commentStart": 1312, - "end": 1318, - "start": 1312, + "commentStart": 1324, + "end": 1330, + "start": 1324, "type": "TagDeclarator", "value": "seg01" }, @@ -1989,9 +1981,9 @@ description: Variables in memory after executing clock.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 889, - "end": 895, - "start": 889, + "commentStart": 901, + "end": 907, + "start": 901, "type": "TagDeclarator", "value": "seg02" }, @@ -2002,9 +1994,9 @@ description: Variables in memory after executing clock.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 968, - "end": 980, - "start": 968, + "commentStart": 980, + "end": 992, + "start": 980, "type": "TagDeclarator", "value": "capStart001" }, @@ -2031,9 +2023,9 @@ description: Variables in memory after executing clock.kcl ], "radius": 250.0, "tag": { - "commentStart": 889, - "end": 895, - "start": 889, + "commentStart": 901, + "end": 907, + "start": 901, "type": "TagDeclarator", "value": "seg02" }, @@ -2241,9 +2233,9 @@ description: Variables in memory after executing clock.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 889, - "end": 895, - "start": 889, + "commentStart": 901, + "end": 907, + "start": 901, "type": "TagDeclarator", "value": "seg02" }, @@ -2254,9 +2246,9 @@ description: Variables in memory after executing clock.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 968, - "end": 980, - "start": 968, + "commentStart": 980, + "end": 992, + "start": 980, "type": "TagDeclarator", "value": "capStart001" }, @@ -2283,9 +2275,9 @@ description: Variables in memory after executing clock.kcl ], "radius": 250.0, "tag": { - "commentStart": 889, - "end": 895, - "start": 889, + "commentStart": 901, + "end": 907, + "start": 901, "type": "TagDeclarator", "value": "seg02" }, @@ -2598,9 +2590,9 @@ description: Variables in memory after executing clock.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 889, - "end": 895, - "start": 889, + "commentStart": 901, + "end": 907, + "start": 901, "type": "TagDeclarator", "value": "seg02" }, @@ -2611,9 +2603,9 @@ description: Variables in memory after executing clock.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 968, - "end": 980, - "start": 968, + "commentStart": 980, + "end": 992, + "start": 980, "type": "TagDeclarator", "value": "capStart001" }, @@ -2640,9 +2632,9 @@ description: Variables in memory after executing clock.kcl ], "radius": 250.0, "tag": { - "commentStart": 889, - "end": 895, - "start": 889, + "commentStart": 901, + "end": 907, + "start": 901, "type": "TagDeclarator", "value": "seg02" }, @@ -2851,9 +2843,9 @@ description: Variables in memory after executing clock.kcl 7.054165456091913 ], "tag": { - "commentStart": 9962, - "end": 9969, - "start": 9962, + "commentStart": 10163, + "end": 10170, + "start": 10163, "type": "TagDeclarator", "value": "seg004" }, @@ -2876,9 +2868,9 @@ description: Variables in memory after executing clock.kcl 19.554165456091912 ], "tag": { - "commentStart": 10158, - "end": 10165, - "start": 10158, + "commentStart": 10359, + "end": 10366, + "start": 10359, "type": "TagDeclarator", "value": "seg002" }, @@ -3186,9 +3178,9 @@ description: Variables in memory after executing clock.kcl -119.46453889126977 ], "tag": { - "commentStart": 11501, - "end": 11508, - "start": 11501, + "commentStart": 11732, + "end": 11739, + "start": 11732, "type": "TagDeclarator", "value": "seg003" }, @@ -3211,9 +3203,9 @@ description: Variables in memory after executing clock.kcl -120.77114468211543 ], "tag": { - "commentStart": 11705, - "end": 11712, - "start": 11705, + "commentStart": 11936, + "end": 11943, + "start": 11936, "type": "TagDeclarator", "value": "seg005" }, @@ -3569,9 +3561,9 @@ description: Variables in memory after executing clock.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 889, - "end": 895, - "start": 889, + "commentStart": 901, + "end": 907, + "start": 901, "type": "TagDeclarator", "value": "seg02" }, @@ -3582,9 +3574,9 @@ description: Variables in memory after executing clock.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 968, - "end": 980, - "start": 968, + "commentStart": 980, + "end": 992, + "start": 980, "type": "TagDeclarator", "value": "capStart001" }, @@ -3611,9 +3603,9 @@ description: Variables in memory after executing clock.kcl ], "radius": 250.0, "tag": { - "commentStart": 889, - "end": 895, - "start": 889, + "commentStart": 901, + "end": 907, + "start": 901, "type": "TagDeclarator", "value": "seg02" }, diff --git a/rust/kcl-lib/tests/kcl_samples/cold-plate/ast.snap b/rust/kcl-lib/tests/kcl_samples/cold-plate/ast.snap index a7a20025ad..e2faead800 100644 --- a/rust/kcl-lib/tests/kcl_samples/cold-plate/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/cold-plate/ast.snap @@ -439,13 +439,13 @@ description: Result of parsing cold-plate.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -773,13 +773,13 @@ description: Result of parsing cold-plate.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1031,13 +1031,13 @@ description: Result of parsing cold-plate.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "77", + "raw": "77deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 77.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -1131,13 +1131,13 @@ description: Result of parsing cold-plate.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "77", + "raw": "77deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 77.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1865,13 +1865,13 @@ description: Result of parsing cold-plate.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2070,13 +2070,13 @@ description: Result of parsing cold-plate.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -2289,13 +2289,13 @@ description: Result of parsing cold-plate.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, diff --git a/rust/kcl-lib/tests/kcl_samples/cold-plate/program_memory.snap b/rust/kcl-lib/tests/kcl_samples/cold-plate/program_memory.snap index 4465022f6f..7f0df54985 100644 --- a/rust/kcl-lib/tests/kcl_samples/cold-plate/program_memory.snap +++ b/rust/kcl-lib/tests/kcl_samples/cold-plate/program_memory.snap @@ -1015,9 +1015,9 @@ description: Variables in memory after executing cold-plate.kcl 1.25 ], "tag": { - "commentStart": 856, - "end": 862, - "start": 856, + "commentStart": 859, + "end": 865, + "start": 859, "type": "TagDeclarator", "value": "seg07" }, @@ -1040,9 +1040,9 @@ description: Variables in memory after executing cold-plate.kcl 1.25 ], "tag": { - "commentStart": 905, - "end": 911, - "start": 905, + "commentStart": 908, + "end": 914, + "start": 908, "type": "TagDeclarator", "value": "seg09" }, @@ -1089,9 +1089,9 @@ description: Variables in memory after executing cold-plate.kcl 0.625 ], "tag": { - "commentStart": 1012, - "end": 1018, - "start": 1012, + "commentStart": 1018, + "end": 1024, + "start": 1018, "type": "TagDeclarator", "value": "seg08" }, @@ -1157,9 +1157,9 @@ description: Variables in memory after executing cold-plate.kcl 1.047006236503076 ], "tag": { - "commentStart": 1189, - "end": 1195, - "start": 1189, + "commentStart": 1201, + "end": 1207, + "start": 1201, "type": "TagDeclarator", "value": "seg01" }, @@ -1346,9 +1346,9 @@ description: Variables in memory after executing cold-plate.kcl -3.0 ], "tag": { - "commentStart": 1594, - "end": 1600, - "start": 1594, + "commentStart": 1606, + "end": 1612, + "start": 1606, "type": "TagDeclarator", "value": "seg05" }, @@ -1376,9 +1376,9 @@ description: Variables in memory after executing cold-plate.kcl -3.0 ], "tag": { - "commentStart": 1661, - "end": 1667, - "start": 1661, + "commentStart": 1676, + "end": 1682, + "start": 1676, "type": "TagDeclarator", "value": "seg02" }, @@ -1401,9 +1401,9 @@ description: Variables in memory after executing cold-plate.kcl -1.0 ], "tag": { - "commentStart": 1736, - "end": 1742, - "start": 1736, + "commentStart": 1751, + "end": 1757, + "start": 1751, "type": "TagDeclarator", "value": "seg06" }, @@ -1431,9 +1431,9 @@ description: Variables in memory after executing cold-plate.kcl -0.9999999999999984 ], "tag": { - "commentStart": 1804, - "end": 1810, - "start": 1804, + "commentStart": 1822, + "end": 1828, + "start": 1822, "type": "TagDeclarator", "value": "seg03" }, @@ -1480,9 +1480,9 @@ description: Variables in memory after executing cold-plate.kcl 0.9999999999999998 ], "tag": { - "commentStart": 1940, - "end": 1946, - "start": 1940, + "commentStart": 1961, + "end": 1967, + "start": 1961, "type": "TagDeclarator", "value": "seg04" }, diff --git a/rust/kcl-lib/tests/kcl_samples/countersunk-plate/ast.snap b/rust/kcl-lib/tests/kcl_samples/countersunk-plate/ast.snap index 075238f8fb..29a8e086b3 100644 --- a/rust/kcl-lib/tests/kcl_samples/countersunk-plate/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/countersunk-plate/ast.snap @@ -734,13 +734,13 @@ description: Result of parsing countersunk-plate.kcl "left": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "-", @@ -986,13 +986,13 @@ description: Result of parsing countersunk-plate.kcl "right": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -1386,13 +1386,13 @@ description: Result of parsing countersunk-plate.kcl "right": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, diff --git a/rust/kcl-lib/tests/kcl_samples/cpu-cooler/ast.snap b/rust/kcl-lib/tests/kcl_samples/cpu-cooler/ast.snap index 695de80ed8..8fbecb7668 100644 --- a/rust/kcl-lib/tests/kcl_samples/cpu-cooler/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/cpu-cooler/ast.snap @@ -961,13 +961,13 @@ description: Result of parsing cpu-cooler.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1165,13 +1165,13 @@ description: Result of parsing cpu-cooler.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, diff --git a/rust/kcl-lib/tests/kcl_samples/cpu-cooler/ops.snap b/rust/kcl-lib/tests/kcl_samples/cpu-cooler/ops.snap index 2b7a12c221..27b84608c8 100644 --- a/rust/kcl-lib/tests/kcl_samples/cpu-cooler/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/cpu-cooler/ops.snap @@ -972,13 +972,9 @@ description: Operations executed cpu-cooler.kcl "type": "Number", "value": 50.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -1071,13 +1067,9 @@ description: Operations executed cpu-cooler.kcl "type": "Number", "value": 30.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] diff --git a/rust/kcl-lib/tests/kcl_samples/cycloidal-gear/ast.snap b/rust/kcl-lib/tests/kcl_samples/cycloidal-gear/ast.snap index e7cae4ba1a..24bb6d276c 100644 --- a/rust/kcl-lib/tests/kcl_samples/cycloidal-gear/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/cycloidal-gear/ast.snap @@ -603,13 +603,13 @@ description: Result of parsing cycloidal-gear.kcl "left": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "+", @@ -650,13 +650,13 @@ description: Result of parsing cycloidal-gear.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -797,13 +797,13 @@ description: Result of parsing cycloidal-gear.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } } } @@ -871,13 +871,13 @@ description: Result of parsing cycloidal-gear.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -971,13 +971,13 @@ description: Result of parsing cycloidal-gear.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } } } @@ -1045,13 +1045,13 @@ description: Result of parsing cycloidal-gear.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -1815,13 +1815,13 @@ description: Result of parsing cycloidal-gear.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "80", + "raw": "80deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 80.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, diff --git a/rust/kcl-lib/tests/kcl_samples/exhaust-manifold/ast.snap b/rust/kcl-lib/tests/kcl_samples/exhaust-manifold/ast.snap index b8e2cf3a79..1adb0683ac 100644 --- a/rust/kcl-lib/tests/kcl_samples/exhaust-manifold/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/exhaust-manifold/ast.snap @@ -765,13 +765,13 @@ description: Result of parsing exhaust-manifold.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "80", + "raw": "80deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 80.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -962,13 +962,13 @@ description: Result of parsing exhaust-manifold.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "85", + "raw": "85deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 85.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1885,13 +1885,13 @@ description: Result of parsing exhaust-manifold.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "1", + "raw": "1deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 1.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2027,13 +2027,13 @@ description: Result of parsing exhaust-manifold.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "24.3", + "raw": "24.3deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 24.3, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2169,13 +2169,13 @@ description: Result of parsing exhaust-manifold.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "25.2", + "raw": "25.2deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 25.2, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2530,13 +2530,13 @@ description: Result of parsing exhaust-manifold.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "40", + "raw": "40deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 40.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -2606,13 +2606,13 @@ description: Result of parsing exhaust-manifold.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "80", + "raw": "80deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 80.0, - "suffix": "None" + "suffix": "Deg" } } } @@ -2676,13 +2676,13 @@ description: Result of parsing exhaust-manifold.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "40", + "raw": "40deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 40.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -2982,13 +2982,13 @@ description: Result of parsing exhaust-manifold.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "40", + "raw": "40deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 40.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -3058,13 +3058,13 @@ description: Result of parsing exhaust-manifold.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "80", + "raw": "80deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 80.0, - "suffix": "None" + "suffix": "Deg" } } } @@ -3128,13 +3128,13 @@ description: Result of parsing exhaust-manifold.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "40", + "raw": "40deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 40.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -3477,13 +3477,13 @@ description: Result of parsing exhaust-manifold.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "40", + "raw": "40deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 40.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -3553,13 +3553,13 @@ description: Result of parsing exhaust-manifold.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "80", + "raw": "80deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 80.0, - "suffix": "None" + "suffix": "Deg" } } } diff --git a/rust/kcl-lib/tests/kcl_samples/exhaust-manifold/ops.snap b/rust/kcl-lib/tests/kcl_samples/exhaust-manifold/ops.snap index a063421a37..28580825f2 100644 --- a/rust/kcl-lib/tests/kcl_samples/exhaust-manifold/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/exhaust-manifold/ops.snap @@ -501,13 +501,9 @@ description: Operations executed exhaust-manifold.kcl "type": "Number", "value": 1.0, "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -853,13 +849,9 @@ description: Operations executed exhaust-manifold.kcl "type": "Number", "value": 24.3, "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -1205,13 +1197,9 @@ description: Operations executed exhaust-manifold.kcl "type": "Number", "value": 25.2, "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] diff --git a/rust/kcl-lib/tests/kcl_samples/exhaust-manifold/program_memory.snap b/rust/kcl-lib/tests/kcl_samples/exhaust-manifold/program_memory.snap index 30300f8a03..9ed3981279 100644 --- a/rust/kcl-lib/tests/kcl_samples/exhaust-manifold/program_memory.snap +++ b/rust/kcl-lib/tests/kcl_samples/exhaust-manifold/program_memory.snap @@ -28,9 +28,9 @@ description: Variables in memory after executing exhaust-manifold.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2009, - "end": 2015, - "start": 2009, + "commentStart": 2024, + "end": 2030, + "start": 2024, "type": "TagDeclarator", "value": "seg01" }, @@ -62,9 +62,9 @@ description: Variables in memory after executing exhaust-manifold.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2183, - "end": 2189, - "start": 2183, + "commentStart": 2207, + "end": 2213, + "start": 2207, "type": "TagDeclarator", "value": "seg03" }, @@ -75,9 +75,9 @@ description: Variables in memory after executing exhaust-manifold.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2232, - "end": 2238, - "start": 2232, + "commentStart": 2256, + "end": 2262, + "start": 2256, "type": "TagDeclarator", "value": "seg04" }, @@ -88,9 +88,9 @@ description: Variables in memory after executing exhaust-manifold.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2271, - "end": 2277, - "start": 2271, + "commentStart": 2295, + "end": 2301, + "start": 2295, "type": "TagDeclarator", "value": "seg05" }, @@ -122,9 +122,9 @@ description: Variables in memory after executing exhaust-manifold.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2455, - "end": 2461, - "start": 2455, + "commentStart": 2488, + "end": 2494, + "start": 2488, "type": "TagDeclarator", "value": "seg07" }, @@ -135,9 +135,9 @@ description: Variables in memory after executing exhaust-manifold.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2512, - "end": 2518, - "start": 2512, + "commentStart": 2545, + "end": 2551, + "start": 2545, "type": "TagDeclarator", "value": "seg08" }, @@ -148,9 +148,9 @@ description: Variables in memory after executing exhaust-manifold.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2562, - "end": 2568, - "start": 2562, + "commentStart": 2595, + "end": 2601, + "start": 2595, "type": "TagDeclarator", "value": "seg09" }, @@ -192,9 +192,9 @@ description: Variables in memory after executing exhaust-manifold.kcl -1.25 ], "tag": { - "commentStart": 2009, - "end": 2015, - "start": 2009, + "commentStart": 2024, + "end": 2030, + "start": 2024, "type": "TagDeclarator", "value": "seg01" }, @@ -289,9 +289,9 @@ description: Variables in memory after executing exhaust-manifold.kcl -1.2499999999999996 ], "tag": { - "commentStart": 2183, - "end": 2189, - "start": 2183, + "commentStart": 2207, + "end": 2213, + "start": 2207, "type": "TagDeclarator", "value": "seg03" }, @@ -314,9 +314,9 @@ description: Variables in memory after executing exhaust-manifold.kcl -1.2499999999999996 ], "tag": { - "commentStart": 2232, - "end": 2238, - "start": 2232, + "commentStart": 2256, + "end": 2262, + "start": 2256, "type": "TagDeclarator", "value": "seg04" }, @@ -339,9 +339,9 @@ description: Variables in memory after executing exhaust-manifold.kcl 1.3500000000000005 ], "tag": { - "commentStart": 2271, - "end": 2277, - "start": 2271, + "commentStart": 2295, + "end": 2301, + "start": 2295, "type": "TagDeclarator", "value": "seg05" }, @@ -436,9 +436,9 @@ description: Variables in memory after executing exhaust-manifold.kcl 1.3500000000000008 ], "tag": { - "commentStart": 2455, - "end": 2461, - "start": 2455, + "commentStart": 2488, + "end": 2494, + "start": 2488, "type": "TagDeclarator", "value": "seg07" }, @@ -461,9 +461,9 @@ description: Variables in memory after executing exhaust-manifold.kcl 1.3500000000000008 ], "tag": { - "commentStart": 2512, - "end": 2518, - "start": 2512, + "commentStart": 2545, + "end": 2551, + "start": 2545, "type": "TagDeclarator", "value": "seg08" }, @@ -486,9 +486,9 @@ description: Variables in memory after executing exhaust-manifold.kcl -1.25 ], "tag": { - "commentStart": 2562, - "end": 2568, - "start": 2562, + "commentStart": 2595, + "end": 2601, + "start": 2595, "type": "TagDeclarator", "value": "seg09" }, diff --git a/rust/kcl-lib/tests/kcl_samples/food-service-spatula/ast.snap b/rust/kcl-lib/tests/kcl_samples/food-service-spatula/ast.snap index 71f53b91cf..2a698ae321 100644 --- a/rust/kcl-lib/tests/kcl_samples/food-service-spatula/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/food-service-spatula/ast.snap @@ -1007,13 +1007,13 @@ description: Result of parsing food-service-spatula.kcl "right": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -1140,13 +1140,13 @@ description: Result of parsing food-service-spatula.kcl "expression": { "commentStart": 0, "end": 0, - "raw": "270", + "raw": "270deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 270.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -1167,13 +1167,13 @@ description: Result of parsing food-service-spatula.kcl "expression": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -1611,13 +1611,13 @@ description: Result of parsing food-service-spatula.kcl "right": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -1778,13 +1778,13 @@ description: Result of parsing food-service-spatula.kcl "right": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -1953,32 +1953,6 @@ description: Result of parsing food-service-spatula.kcl }, { "arguments": [ - { - "type": "LabeledArg", - "label": { - "commentStart": 0, - "end": 0, - "name": "angle", - "start": 0, - "type": "Identifier" - }, - "arg": { - "abs_path": false, - "commentStart": 0, - "end": 0, - "name": { - "commentStart": 0, - "end": 0, - "name": "angle", - "start": 0, - "type": "Identifier" - }, - "path": [], - "start": 0, - "type": "Name", - "type": "Name" - } - }, { "type": "LabeledArg", "label": { @@ -2026,7 +2000,22 @@ description: Result of parsing food-service-spatula.kcl "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", - "unlabeled": null + "unlabeled": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "angle", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name", + "type": "Name" + } }, { "arguments": [ @@ -2088,13 +2077,13 @@ description: Result of parsing food-service-spatula.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } } @@ -2123,32 +2112,6 @@ description: Result of parsing food-service-spatula.kcl }, { "arguments": [ - { - "type": "LabeledArg", - "label": { - "commentStart": 0, - "end": 0, - "name": "angle", - "start": 0, - "type": "Identifier" - }, - "arg": { - "abs_path": false, - "commentStart": 0, - "end": 0, - "name": { - "commentStart": 0, - "end": 0, - "name": "angle", - "start": 0, - "type": "Identifier" - }, - "path": [], - "start": 0, - "type": "Name", - "type": "Name" - } - }, { "type": "LabeledArg", "label": { @@ -2204,7 +2167,22 @@ description: Result of parsing food-service-spatula.kcl "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", - "unlabeled": null + "unlabeled": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "angle", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name", + "type": "Name" + } }, { "arguments": [ @@ -2849,13 +2827,13 @@ description: Result of parsing food-service-spatula.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "163.087610", + "raw": "163.087610deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 163.08761, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2871,13 +2849,13 @@ description: Result of parsing food-service-spatula.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "196.912390", + "raw": "196.912390deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 196.91239, - "suffix": "None" + "suffix": "Deg" } } }, @@ -5698,13 +5676,13 @@ description: Result of parsing food-service-spatula.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90.0", + "raw": "90.0deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -5917,13 +5895,13 @@ description: Result of parsing food-service-spatula.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90.0", + "raw": "90.0deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -6093,13 +6071,13 @@ description: Result of parsing food-service-spatula.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90.0", + "raw": "90.0deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -6115,13 +6093,13 @@ description: Result of parsing food-service-spatula.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180.0", + "raw": "180.0deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -6309,13 +6287,13 @@ description: Result of parsing food-service-spatula.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180.0", + "raw": "180.0deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -6331,13 +6309,13 @@ description: Result of parsing food-service-spatula.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "270.0", + "raw": "270.0deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 270.0, - "suffix": "None" + "suffix": "Deg" } } }, diff --git a/rust/kcl-lib/tests/kcl_samples/food-service-spatula/ops.snap b/rust/kcl-lib/tests/kcl_samples/food-service-spatula/ops.snap index d1359a84ba..6fb59cbfa9 100644 --- a/rust/kcl-lib/tests/kcl_samples/food-service-spatula/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/food-service-spatula/ops.snap @@ -2134,13 +2134,9 @@ description: Operations executed food-service-spatula.kcl "type": "Number", "value": 90.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", diff --git a/rust/kcl-lib/tests/kcl_samples/food-service-spatula/program_memory.snap b/rust/kcl-lib/tests/kcl_samples/food-service-spatula/program_memory.snap index ef37cfc802..39147a1f41 100644 --- a/rust/kcl-lib/tests/kcl_samples/food-service-spatula/program_memory.snap +++ b/rust/kcl-lib/tests/kcl_samples/food-service-spatula/program_memory.snap @@ -27,9 +27,9 @@ description: Variables in memory after executing food-service-spatula.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1590, - "end": 1599, - "start": 1590, + "commentStart": 1592, + "end": 1601, + "start": 1592, "type": "TagDeclarator", "value": "backEdge" }, @@ -90,9 +90,9 @@ description: Variables in memory after executing food-service-spatula.kcl -30.0 ], "tag": { - "commentStart": 1590, - "end": 1599, - "start": 1590, + "commentStart": 1592, + "end": 1601, + "start": 1592, "type": "TagDeclarator", "value": "backEdge" }, @@ -299,9 +299,9 @@ description: Variables in memory after executing food-service-spatula.kcl -30.0 ], "tag": { - "commentStart": 1590, - "end": 1599, - "start": 1590, + "commentStart": 1592, + "end": 1601, + "start": 1592, "type": "TagDeclarator", "value": "backEdge" }, @@ -551,9 +551,9 @@ description: Variables in memory after executing food-service-spatula.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4336, - "end": 4348, - "start": 4336, + "commentStart": 4356, + "end": 4368, + "start": 4356, "type": "TagDeclarator", "value": "gripEdgeTop" }, @@ -713,9 +713,9 @@ description: Variables in memory after executing food-service-spatula.kcl 7.0 ], "tag": { - "commentStart": 4336, - "end": 4348, - "start": 4336, + "commentStart": 4356, + "end": 4368, + "start": 4356, "type": "TagDeclarator", "value": "gripEdgeTop" }, @@ -1058,9 +1058,9 @@ description: Variables in memory after executing food-service-spatula.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4336, - "end": 4348, - "start": 4336, + "commentStart": 4356, + "end": 4368, + "start": 4356, "type": "TagDeclarator", "value": "gripEdgeTop" }, @@ -1220,9 +1220,9 @@ description: Variables in memory after executing food-service-spatula.kcl 7.0 ], "tag": { - "commentStart": 4336, - "end": 4348, - "start": 4336, + "commentStart": 4356, + "end": 4368, + "start": 4356, "type": "TagDeclarator", "value": "gripEdgeTop" }, @@ -1538,9 +1538,9 @@ description: Variables in memory after executing food-service-spatula.kcl 7.0 ], "tag": { - "commentStart": 4336, - "end": 4348, - "start": 4336, + "commentStart": 4356, + "end": 4368, + "start": 4356, "type": "TagDeclarator", "value": "gripEdgeTop" }, @@ -1729,9 +1729,9 @@ description: Variables in memory after executing food-service-spatula.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2988, - "end": 3005, - "start": 2988, + "commentStart": 2996, + "end": 3013, + "start": 2996, "type": "TagDeclarator", "value": "handleBottomEdge" }, @@ -1756,9 +1756,9 @@ description: Variables in memory after executing food-service-spatula.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3136, - "end": 3150, - "start": 3136, + "commentStart": 3144, + "end": 3158, + "start": 3144, "type": "TagDeclarator", "value": "handleTopEdge" }, @@ -1800,9 +1800,9 @@ description: Variables in memory after executing food-service-spatula.kcl 3.5 ], "tag": { - "commentStart": 2988, - "end": 3005, - "start": 2988, + "commentStart": 2996, + "end": 3013, + "start": 2996, "type": "TagDeclarator", "value": "handleBottomEdge" }, @@ -1863,9 +1863,9 @@ description: Variables in memory after executing food-service-spatula.kcl 91.32128900000001 ], "tag": { - "commentStart": 3136, - "end": 3150, - "start": 3136, + "commentStart": 3144, + "end": 3158, + "start": 3144, "type": "TagDeclarator", "value": "handleTopEdge" }, @@ -2211,9 +2211,9 @@ description: Variables in memory after executing food-service-spatula.kcl 3.5 ], "tag": { - "commentStart": 2988, - "end": 3005, - "start": 2988, + "commentStart": 2996, + "end": 3013, + "start": 2996, "type": "TagDeclarator", "value": "handleBottomEdge" }, @@ -2274,9 +2274,9 @@ description: Variables in memory after executing food-service-spatula.kcl 91.32128900000001 ], "tag": { - "commentStart": 3136, - "end": 3150, - "start": 3136, + "commentStart": 3144, + "end": 3158, + "start": 3144, "type": "TagDeclarator", "value": "handleTopEdge" }, @@ -2536,9 +2536,9 @@ description: Variables in memory after executing food-service-spatula.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4336, - "end": 4348, - "start": 4336, + "commentStart": 4356, + "end": 4368, + "start": 4356, "type": "TagDeclarator", "value": "gripEdgeTop" }, @@ -2698,9 +2698,9 @@ description: Variables in memory after executing food-service-spatula.kcl 7.0 ], "tag": { - "commentStart": 4336, - "end": 4348, - "start": 4336, + "commentStart": 4356, + "end": 4368, + "start": 4356, "type": "TagDeclarator", "value": "gripEdgeTop" }, @@ -3371,9 +3371,9 @@ description: Variables in memory after executing food-service-spatula.kcl -30.0 ], "tag": { - "commentStart": 1590, - "end": 1599, - "start": 1590, + "commentStart": 1592, + "end": 1601, + "start": 1592, "type": "TagDeclarator", "value": "backEdge" }, diff --git a/rust/kcl-lib/tests/kcl_samples/french-press/ast.snap b/rust/kcl-lib/tests/kcl_samples/french-press/ast.snap index c93c3e4f5b..4f3c8bbf17 100644 --- a/rust/kcl-lib/tests/kcl_samples/french-press/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/french-press/ast.snap @@ -394,13 +394,13 @@ description: Result of parsing french-press.kcl "right": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -765,13 +765,13 @@ description: Result of parsing french-press.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1411,13 +1411,13 @@ description: Result of parsing french-press.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1433,13 +1433,13 @@ description: Result of parsing french-press.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "205", + "raw": "205deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 205.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1503,13 +1503,13 @@ description: Result of parsing french-press.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -1597,13 +1597,13 @@ description: Result of parsing french-press.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1620,13 +1620,13 @@ description: Result of parsing french-press.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -1696,13 +1696,13 @@ description: Result of parsing french-press.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "150", + "raw": "150deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 150.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1791,13 +1791,13 @@ description: Result of parsing french-press.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1813,13 +1813,13 @@ description: Result of parsing french-press.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2105,13 +2105,13 @@ description: Result of parsing french-press.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2127,13 +2127,13 @@ description: Result of parsing french-press.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2196,13 +2196,13 @@ description: Result of parsing french-press.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "150", + "raw": "150deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 150.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2338,13 +2338,13 @@ description: Result of parsing french-press.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -2367,13 +2367,13 @@ description: Result of parsing french-press.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2437,13 +2437,13 @@ description: Result of parsing french-press.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -2585,13 +2585,13 @@ description: Result of parsing french-press.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "205", + "raw": "205deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 205.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2607,13 +2607,13 @@ description: Result of parsing french-press.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2980,13 +2980,13 @@ description: Result of parsing french-press.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -3611,13 +3611,13 @@ description: Result of parsing french-press.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -3634,13 +3634,13 @@ description: Result of parsing french-press.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -4284,13 +4284,13 @@ description: Result of parsing french-press.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -4416,13 +4416,13 @@ description: Result of parsing french-press.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -4492,13 +4492,13 @@ description: Result of parsing french-press.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -5045,13 +5045,13 @@ description: Result of parsing french-press.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "10", + "raw": "10deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 10.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -5307,13 +5307,13 @@ description: Result of parsing french-press.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -6262,13 +6262,13 @@ description: Result of parsing french-press.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -6675,13 +6675,13 @@ description: Result of parsing french-press.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, diff --git a/rust/kcl-lib/tests/kcl_samples/french-press/ops.snap b/rust/kcl-lib/tests/kcl_samples/french-press/ops.snap index ff80504e14..dec6013062 100644 --- a/rust/kcl-lib/tests/kcl_samples/french-press/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/french-press/ops.snap @@ -152,13 +152,9 @@ description: Operations executed french-press.kcl "type": "Number", "value": 360.0, "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] diff --git a/rust/kcl-lib/tests/kcl_samples/french-press/program_memory.snap b/rust/kcl-lib/tests/kcl_samples/french-press/program_memory.snap index 9a8a2da130..0a3d105e96 100644 --- a/rust/kcl-lib/tests/kcl_samples/french-press/program_memory.snap +++ b/rust/kcl-lib/tests/kcl_samples/french-press/program_memory.snap @@ -4412,9 +4412,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 479, - "end": 500, - "start": 479, + "commentStart": 482, + "end": 503, + "start": 482, "type": "TagDeclarator", "value": "rectangleSegmentB001" }, @@ -4425,9 +4425,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 602, - "end": 623, - "start": 602, + "commentStart": 605, + "end": 626, + "start": 605, "type": "TagDeclarator", "value": "rectangleSegmentC001" }, @@ -4480,9 +4480,9 @@ description: Variables in memory after executing french-press.kcl 5.7 ], "tag": { - "commentStart": 479, - "end": 500, - "start": 479, + "commentStart": 482, + "end": 503, + "start": 482, "type": "TagDeclarator", "value": "rectangleSegmentB001" }, @@ -4505,9 +4505,9 @@ description: Variables in memory after executing french-press.kcl 6.45 ], "tag": { - "commentStart": 602, - "end": 623, - "start": 602, + "commentStart": 605, + "end": 626, + "start": 605, "type": "TagDeclarator", "value": "rectangleSegmentC001" }, @@ -4658,9 +4658,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1091, - "end": 1097, - "start": 1091, + "commentStart": 1097, + "end": 1103, + "start": 1097, "type": "TagDeclarator", "value": "edge1" }, @@ -4678,9 +4678,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1205, - "end": 1211, - "start": 1205, + "commentStart": 1220, + "end": 1226, + "start": 1220, "type": "TagDeclarator", "value": "edge2" }, @@ -4698,9 +4698,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1326, - "end": 1332, - "start": 1326, + "commentStart": 1350, + "end": 1356, + "start": 1350, "type": "TagDeclarator", "value": "edge3" }, @@ -4718,9 +4718,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1425, - "end": 1433, - "start": 1425, + "commentStart": 1455, + "end": 1463, + "start": 1455, "type": "TagDeclarator", "value": "edgeLen" }, @@ -4738,9 +4738,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1511, - "end": 1517, - "start": 1511, + "commentStart": 1541, + "end": 1547, + "start": 1541, "type": "TagDeclarator", "value": "edge4" }, @@ -4758,9 +4758,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1642, - "end": 1648, - "start": 1642, + "commentStart": 1681, + "end": 1687, + "start": 1681, "type": "TagDeclarator", "value": "edge5" }, @@ -4778,9 +4778,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1775, - "end": 1781, - "start": 1775, + "commentStart": 1823, + "end": 1829, + "start": 1823, "type": "TagDeclarator", "value": "edge6" }, @@ -4834,9 +4834,9 @@ description: Variables in memory after executing french-press.kcl 5.7 ], "tag": { - "commentStart": 1091, - "end": 1097, - "start": 1091, + "commentStart": 1097, + "end": 1103, + "start": 1097, "type": "TagDeclarator", "value": "edge1" }, @@ -4884,9 +4884,9 @@ description: Variables in memory after executing french-press.kcl 0.37321452147779016 ], "tag": { - "commentStart": 1205, - "end": 1211, - "start": 1205, + "commentStart": 1220, + "end": 1226, + "start": 1220, "type": "TagDeclarator", "value": "edge2" }, @@ -4934,9 +4934,9 @@ description: Variables in memory after executing french-press.kcl -0.9660159630635361 ], "tag": { - "commentStart": 1326, - "end": 1332, - "start": 1326, + "commentStart": 1350, + "end": 1356, + "start": 1350, "type": "TagDeclarator", "value": "edge3" }, @@ -4984,9 +4984,9 @@ description: Variables in memory after executing french-press.kcl -0.13301270189221936 ], "tag": { - "commentStart": 1425, - "end": 1433, - "start": 1425, + "commentStart": 1455, + "end": 1463, + "start": 1455, "type": "TagDeclarator", "value": "edgeLen" }, @@ -5028,9 +5028,9 @@ description: Variables in memory after executing french-press.kcl -0.03301270189221936 ], "tag": { - "commentStart": 1511, - "end": 1517, - "start": 1511, + "commentStart": 1541, + "end": 1547, + "start": 1541, "type": "TagDeclarator", "value": "edge4" }, @@ -5078,9 +5078,9 @@ description: Variables in memory after executing french-press.kcl -0.11339745962155623 ], "tag": { - "commentStart": 1642, - "end": 1648, - "start": 1642, + "commentStart": 1681, + "end": 1687, + "start": 1681, "type": "TagDeclarator", "value": "edge5" }, @@ -5128,9 +5128,9 @@ description: Variables in memory after executing french-press.kcl -0.17890072079287297 ], "tag": { - "commentStart": 1775, - "end": 1781, - "start": 1775, + "commentStart": 1823, + "end": 1829, + "start": 1823, "type": "TagDeclarator", "value": "edge6" }, @@ -5319,9 +5319,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1091, - "end": 1097, - "start": 1091, + "commentStart": 1097, + "end": 1103, + "start": 1097, "type": "TagDeclarator", "value": "edge1" }, @@ -5339,9 +5339,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1205, - "end": 1211, - "start": 1205, + "commentStart": 1220, + "end": 1226, + "start": 1220, "type": "TagDeclarator", "value": "edge2" }, @@ -5359,9 +5359,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1326, - "end": 1332, - "start": 1326, + "commentStart": 1350, + "end": 1356, + "start": 1350, "type": "TagDeclarator", "value": "edge3" }, @@ -5379,9 +5379,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1425, - "end": 1433, - "start": 1425, + "commentStart": 1455, + "end": 1463, + "start": 1455, "type": "TagDeclarator", "value": "edgeLen" }, @@ -5399,9 +5399,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1511, - "end": 1517, - "start": 1511, + "commentStart": 1541, + "end": 1547, + "start": 1541, "type": "TagDeclarator", "value": "edge4" }, @@ -5419,9 +5419,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1642, - "end": 1648, - "start": 1642, + "commentStart": 1681, + "end": 1687, + "start": 1681, "type": "TagDeclarator", "value": "edge5" }, @@ -5439,9 +5439,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1775, - "end": 1781, - "start": 1775, + "commentStart": 1823, + "end": 1829, + "start": 1823, "type": "TagDeclarator", "value": "edge6" }, @@ -5495,9 +5495,9 @@ description: Variables in memory after executing french-press.kcl 5.7 ], "tag": { - "commentStart": 1091, - "end": 1097, - "start": 1091, + "commentStart": 1097, + "end": 1103, + "start": 1097, "type": "TagDeclarator", "value": "edge1" }, @@ -5545,9 +5545,9 @@ description: Variables in memory after executing french-press.kcl 0.37321452147779016 ], "tag": { - "commentStart": 1205, - "end": 1211, - "start": 1205, + "commentStart": 1220, + "end": 1226, + "start": 1220, "type": "TagDeclarator", "value": "edge2" }, @@ -5595,9 +5595,9 @@ description: Variables in memory after executing french-press.kcl -0.9660159630635361 ], "tag": { - "commentStart": 1326, - "end": 1332, - "start": 1326, + "commentStart": 1350, + "end": 1356, + "start": 1350, "type": "TagDeclarator", "value": "edge3" }, @@ -5645,9 +5645,9 @@ description: Variables in memory after executing french-press.kcl -0.13301270189221936 ], "tag": { - "commentStart": 1425, - "end": 1433, - "start": 1425, + "commentStart": 1455, + "end": 1463, + "start": 1455, "type": "TagDeclarator", "value": "edgeLen" }, @@ -5689,9 +5689,9 @@ description: Variables in memory after executing french-press.kcl -0.03301270189221936 ], "tag": { - "commentStart": 1511, - "end": 1517, - "start": 1511, + "commentStart": 1541, + "end": 1547, + "start": 1541, "type": "TagDeclarator", "value": "edge4" }, @@ -5739,9 +5739,9 @@ description: Variables in memory after executing french-press.kcl -0.11339745962155623 ], "tag": { - "commentStart": 1642, - "end": 1648, - "start": 1642, + "commentStart": 1681, + "end": 1687, + "start": 1681, "type": "TagDeclarator", "value": "edge5" }, @@ -5789,9 +5789,9 @@ description: Variables in memory after executing french-press.kcl -0.17890072079287297 ], "tag": { - "commentStart": 1775, - "end": 1781, - "start": 1775, + "commentStart": 1823, + "end": 1829, + "start": 1823, "type": "TagDeclarator", "value": "edge6" }, @@ -5980,9 +5980,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1091, - "end": 1097, - "start": 1091, + "commentStart": 1097, + "end": 1103, + "start": 1097, "type": "TagDeclarator", "value": "edge1" }, @@ -6000,9 +6000,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1205, - "end": 1211, - "start": 1205, + "commentStart": 1220, + "end": 1226, + "start": 1220, "type": "TagDeclarator", "value": "edge2" }, @@ -6020,9 +6020,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1326, - "end": 1332, - "start": 1326, + "commentStart": 1350, + "end": 1356, + "start": 1350, "type": "TagDeclarator", "value": "edge3" }, @@ -6040,9 +6040,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1425, - "end": 1433, - "start": 1425, + "commentStart": 1455, + "end": 1463, + "start": 1455, "type": "TagDeclarator", "value": "edgeLen" }, @@ -6060,9 +6060,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1511, - "end": 1517, - "start": 1511, + "commentStart": 1541, + "end": 1547, + "start": 1541, "type": "TagDeclarator", "value": "edge4" }, @@ -6080,9 +6080,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1642, - "end": 1648, - "start": 1642, + "commentStart": 1681, + "end": 1687, + "start": 1681, "type": "TagDeclarator", "value": "edge5" }, @@ -6100,9 +6100,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1775, - "end": 1781, - "start": 1775, + "commentStart": 1823, + "end": 1829, + "start": 1823, "type": "TagDeclarator", "value": "edge6" }, @@ -6156,9 +6156,9 @@ description: Variables in memory after executing french-press.kcl 5.7 ], "tag": { - "commentStart": 1091, - "end": 1097, - "start": 1091, + "commentStart": 1097, + "end": 1103, + "start": 1097, "type": "TagDeclarator", "value": "edge1" }, @@ -6206,9 +6206,9 @@ description: Variables in memory after executing french-press.kcl 0.37321452147779016 ], "tag": { - "commentStart": 1205, - "end": 1211, - "start": 1205, + "commentStart": 1220, + "end": 1226, + "start": 1220, "type": "TagDeclarator", "value": "edge2" }, @@ -6256,9 +6256,9 @@ description: Variables in memory after executing french-press.kcl -0.9660159630635361 ], "tag": { - "commentStart": 1326, - "end": 1332, - "start": 1326, + "commentStart": 1350, + "end": 1356, + "start": 1350, "type": "TagDeclarator", "value": "edge3" }, @@ -6306,9 +6306,9 @@ description: Variables in memory after executing french-press.kcl -0.13301270189221936 ], "tag": { - "commentStart": 1425, - "end": 1433, - "start": 1425, + "commentStart": 1455, + "end": 1463, + "start": 1455, "type": "TagDeclarator", "value": "edgeLen" }, @@ -6350,9 +6350,9 @@ description: Variables in memory after executing french-press.kcl -0.03301270189221936 ], "tag": { - "commentStart": 1511, - "end": 1517, - "start": 1511, + "commentStart": 1541, + "end": 1547, + "start": 1541, "type": "TagDeclarator", "value": "edge4" }, @@ -6400,9 +6400,9 @@ description: Variables in memory after executing french-press.kcl -0.11339745962155623 ], "tag": { - "commentStart": 1642, - "end": 1648, - "start": 1642, + "commentStart": 1681, + "end": 1687, + "start": 1681, "type": "TagDeclarator", "value": "edge5" }, @@ -6450,9 +6450,9 @@ description: Variables in memory after executing french-press.kcl -0.17890072079287297 ], "tag": { - "commentStart": 1775, - "end": 1781, - "start": 1775, + "commentStart": 1823, + "end": 1829, + "start": 1823, "type": "TagDeclarator", "value": "edge6" }, @@ -6641,9 +6641,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1091, - "end": 1097, - "start": 1091, + "commentStart": 1097, + "end": 1103, + "start": 1097, "type": "TagDeclarator", "value": "edge1" }, @@ -6661,9 +6661,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1205, - "end": 1211, - "start": 1205, + "commentStart": 1220, + "end": 1226, + "start": 1220, "type": "TagDeclarator", "value": "edge2" }, @@ -6681,9 +6681,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1326, - "end": 1332, - "start": 1326, + "commentStart": 1350, + "end": 1356, + "start": 1350, "type": "TagDeclarator", "value": "edge3" }, @@ -6701,9 +6701,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1425, - "end": 1433, - "start": 1425, + "commentStart": 1455, + "end": 1463, + "start": 1455, "type": "TagDeclarator", "value": "edgeLen" }, @@ -6721,9 +6721,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1511, - "end": 1517, - "start": 1511, + "commentStart": 1541, + "end": 1547, + "start": 1541, "type": "TagDeclarator", "value": "edge4" }, @@ -6741,9 +6741,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1642, - "end": 1648, - "start": 1642, + "commentStart": 1681, + "end": 1687, + "start": 1681, "type": "TagDeclarator", "value": "edge5" }, @@ -6761,9 +6761,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1775, - "end": 1781, - "start": 1775, + "commentStart": 1823, + "end": 1829, + "start": 1823, "type": "TagDeclarator", "value": "edge6" }, @@ -6817,9 +6817,9 @@ description: Variables in memory after executing french-press.kcl 5.7 ], "tag": { - "commentStart": 1091, - "end": 1097, - "start": 1091, + "commentStart": 1097, + "end": 1103, + "start": 1097, "type": "TagDeclarator", "value": "edge1" }, @@ -6867,9 +6867,9 @@ description: Variables in memory after executing french-press.kcl 0.37321452147779016 ], "tag": { - "commentStart": 1205, - "end": 1211, - "start": 1205, + "commentStart": 1220, + "end": 1226, + "start": 1220, "type": "TagDeclarator", "value": "edge2" }, @@ -6917,9 +6917,9 @@ description: Variables in memory after executing french-press.kcl -0.9660159630635361 ], "tag": { - "commentStart": 1326, - "end": 1332, - "start": 1326, + "commentStart": 1350, + "end": 1356, + "start": 1350, "type": "TagDeclarator", "value": "edge3" }, @@ -6967,9 +6967,9 @@ description: Variables in memory after executing french-press.kcl -0.13301270189221936 ], "tag": { - "commentStart": 1425, - "end": 1433, - "start": 1425, + "commentStart": 1455, + "end": 1463, + "start": 1455, "type": "TagDeclarator", "value": "edgeLen" }, @@ -7011,9 +7011,9 @@ description: Variables in memory after executing french-press.kcl -0.03301270189221936 ], "tag": { - "commentStart": 1511, - "end": 1517, - "start": 1511, + "commentStart": 1541, + "end": 1547, + "start": 1541, "type": "TagDeclarator", "value": "edge4" }, @@ -7061,9 +7061,9 @@ description: Variables in memory after executing french-press.kcl -0.11339745962155623 ], "tag": { - "commentStart": 1642, - "end": 1648, - "start": 1642, + "commentStart": 1681, + "end": 1687, + "start": 1681, "type": "TagDeclarator", "value": "edge5" }, @@ -7111,9 +7111,9 @@ description: Variables in memory after executing french-press.kcl -0.17890072079287297 ], "tag": { - "commentStart": 1775, - "end": 1781, - "start": 1775, + "commentStart": 1823, + "end": 1829, + "start": 1823, "type": "TagDeclarator", "value": "edge6" }, @@ -8128,9 +8128,9 @@ description: Variables in memory after executing french-press.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2929, - "end": 2934, - "start": 2929, + "commentStart": 2995, + "end": 3000, + "start": 2995, "type": "TagDeclarator", "value": "seg1" }, @@ -8198,9 +8198,9 @@ description: Variables in memory after executing french-press.kcl 1.11 ], "tag": { - "commentStart": 2929, - "end": 2934, - "start": 2929, + "commentStart": 2995, + "end": 3000, + "start": 2995, "type": "TagDeclarator", "value": "seg1" }, diff --git a/rust/kcl-lib/tests/kcl_samples/hammer/ast.snap b/rust/kcl-lib/tests/kcl_samples/hammer/ast.snap index 350babdaef..0f2bb67943 100644 --- a/rust/kcl-lib/tests/kcl_samples/hammer/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/hammer/ast.snap @@ -382,13 +382,13 @@ description: Result of parsing hammer.kcl "right": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -497,13 +497,13 @@ description: Result of parsing hammer.kcl "right": { "commentStart": 0, "end": 0, - "raw": "10", + "raw": "10deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 10.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -803,13 +803,13 @@ description: Result of parsing hammer.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -945,13 +945,13 @@ description: Result of parsing hammer.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1079,13 +1079,13 @@ description: Result of parsing hammer.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "23", + "raw": "23deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 23.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1797,13 +1797,13 @@ description: Result of parsing hammer.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1819,13 +1819,13 @@ description: Result of parsing hammer.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "270", + "raw": "270deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 270.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2645,13 +2645,13 @@ description: Result of parsing hammer.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "177", + "raw": "177deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 177.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -3452,13 +3452,13 @@ description: Result of parsing hammer.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -3482,13 +3482,13 @@ description: Result of parsing hammer.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "270", + "raw": "270deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 270.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -5480,13 +5480,13 @@ description: Result of parsing hammer.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -5924,13 +5924,13 @@ description: Result of parsing hammer.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, diff --git a/rust/kcl-lib/tests/kcl_samples/hammer/ops.snap b/rust/kcl-lib/tests/kcl_samples/hammer/ops.snap index b2e32b7f01..5d9d0f06e8 100644 --- a/rust/kcl-lib/tests/kcl_samples/hammer/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/hammer/ops.snap @@ -891,13 +891,9 @@ description: Operations executed hammer.kcl "type": "Number", "value": 360.0, "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] diff --git a/rust/kcl-lib/tests/kcl_samples/hammer/program_memory.snap b/rust/kcl-lib/tests/kcl_samples/hammer/program_memory.snap index 7e630a600d..8d25cd7bde 100644 --- a/rust/kcl-lib/tests/kcl_samples/hammer/program_memory.snap +++ b/rust/kcl-lib/tests/kcl_samples/hammer/program_memory.snap @@ -15,9 +15,9 @@ description: Variables in memory after executing hammer.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3375, - "end": 3381, - "start": 3375, + "commentStart": 3405, + "end": 3411, + "start": 3405, "type": "TagDeclarator", "value": "seg05" }, @@ -28,9 +28,9 @@ description: Variables in memory after executing hammer.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3419, - "end": 3431, - "start": 3419, + "commentStart": 3449, + "end": 3461, + "start": 3449, "type": "TagDeclarator", "value": "capStart001" }, @@ -57,9 +57,9 @@ description: Variables in memory after executing hammer.kcl ], "radius": 0.45, "tag": { - "commentStart": 3375, - "end": 3381, - "start": 3375, + "commentStart": 3405, + "end": 3411, + "start": 3405, "type": "TagDeclarator", "value": "seg05" }, @@ -224,9 +224,9 @@ description: Variables in memory after executing hammer.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 617, - "end": 623, - "start": 617, + "commentStart": 623, + "end": 629, + "start": 623, "type": "TagDeclarator", "value": "seg03" }, @@ -258,9 +258,9 @@ description: Variables in memory after executing hammer.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 779, - "end": 785, - "start": 779, + "commentStart": 788, + "end": 794, + "start": 788, "type": "TagDeclarator", "value": "seg02" }, @@ -278,9 +278,9 @@ description: Variables in memory after executing hammer.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 863, - "end": 869, - "start": 863, + "commentStart": 875, + "end": 881, + "start": 875, "type": "TagDeclarator", "value": "seg04" }, @@ -438,9 +438,9 @@ description: Variables in memory after executing hammer.kcl 11.77770605137785 ], "tag": { - "commentStart": 617, - "end": 623, - "start": 617, + "commentStart": 623, + "end": 629, + "start": 623, "type": "TagDeclarator", "value": "seg03" }, @@ -530,9 +530,9 @@ description: Variables in memory after executing hammer.kcl 12.799999999999999 ], "tag": { - "commentStart": 779, - "end": 785, - "start": 779, + "commentStart": 788, + "end": 794, + "start": 788, "type": "TagDeclarator", "value": "seg02" }, @@ -579,9 +579,9 @@ description: Variables in memory after executing hammer.kcl 11.624999999999998 ], "tag": { - "commentStart": 863, - "end": 869, - "start": 863, + "commentStart": 875, + "end": 881, + "start": 875, "type": "TagDeclarator", "value": "seg04" }, @@ -810,9 +810,9 @@ description: Variables in memory after executing hammer.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 617, - "end": 623, - "start": 617, + "commentStart": 623, + "end": 629, + "start": 623, "type": "TagDeclarator", "value": "seg03" }, @@ -844,9 +844,9 @@ description: Variables in memory after executing hammer.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 779, - "end": 785, - "start": 779, + "commentStart": 788, + "end": 794, + "start": 788, "type": "TagDeclarator", "value": "seg02" }, @@ -864,9 +864,9 @@ description: Variables in memory after executing hammer.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 863, - "end": 869, - "start": 863, + "commentStart": 875, + "end": 881, + "start": 875, "type": "TagDeclarator", "value": "seg04" }, @@ -1024,9 +1024,9 @@ description: Variables in memory after executing hammer.kcl 11.77770605137785 ], "tag": { - "commentStart": 617, - "end": 623, - "start": 617, + "commentStart": 623, + "end": 629, + "start": 623, "type": "TagDeclarator", "value": "seg03" }, @@ -1116,9 +1116,9 @@ description: Variables in memory after executing hammer.kcl 12.799999999999999 ], "tag": { - "commentStart": 779, - "end": 785, - "start": 779, + "commentStart": 788, + "end": 794, + "start": 788, "type": "TagDeclarator", "value": "seg02" }, @@ -1165,9 +1165,9 @@ description: Variables in memory after executing hammer.kcl 11.624999999999998 ], "tag": { - "commentStart": 863, - "end": 869, - "start": 863, + "commentStart": 875, + "end": 881, + "start": 875, "type": "TagDeclarator", "value": "seg04" }, @@ -2208,9 +2208,9 @@ description: Variables in memory after executing hammer.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 617, - "end": 623, - "start": 617, + "commentStart": 623, + "end": 629, + "start": 623, "type": "TagDeclarator", "value": "seg03" }, @@ -2242,9 +2242,9 @@ description: Variables in memory after executing hammer.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 779, - "end": 785, - "start": 779, + "commentStart": 788, + "end": 794, + "start": 788, "type": "TagDeclarator", "value": "seg02" }, @@ -2262,9 +2262,9 @@ description: Variables in memory after executing hammer.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 863, - "end": 869, - "start": 863, + "commentStart": 875, + "end": 881, + "start": 875, "type": "TagDeclarator", "value": "seg04" }, @@ -2422,9 +2422,9 @@ description: Variables in memory after executing hammer.kcl 11.77770605137785 ], "tag": { - "commentStart": 617, - "end": 623, - "start": 617, + "commentStart": 623, + "end": 629, + "start": 623, "type": "TagDeclarator", "value": "seg03" }, @@ -2514,9 +2514,9 @@ description: Variables in memory after executing hammer.kcl 12.799999999999999 ], "tag": { - "commentStart": 779, - "end": 785, - "start": 779, + "commentStart": 788, + "end": 794, + "start": 788, "type": "TagDeclarator", "value": "seg02" }, @@ -2563,9 +2563,9 @@ description: Variables in memory after executing hammer.kcl 11.624999999999998 ], "tag": { - "commentStart": 863, - "end": 869, - "start": 863, + "commentStart": 875, + "end": 881, + "start": 875, "type": "TagDeclarator", "value": "seg04" }, diff --git a/rust/kcl-lib/tests/kcl_samples/helical-gear/artifact_commands.snap b/rust/kcl-lib/tests/kcl_samples/helical-gear/artifact_commands.snap index 1b5e7070af..2514fd50eb 100644 --- a/rust/kcl-lib/tests/kcl_samples/helical-gear/artifact_commands.snap +++ b/rust/kcl-lib/tests/kcl_samples/helical-gear/artifact_commands.snap @@ -334,7 +334,7 @@ description: Artifact commands helical-gear.kcl "segment": { "type": "line", "end": { - "x": -5.816564508980187, + "x": -5.816564508980192, "y": 18.856838998639372, "z": 0.0 }, @@ -507,7 +507,7 @@ description: Artifact commands helical-gear.kcl "segment": { "type": "line", "end": { - "x": -0.603024957692658, + "x": -0.6030249576926529, "y": 22.992093443190416, "z": 0.0 }, @@ -715,7 +715,7 @@ description: Artifact commands helical-gear.kcl "segment": { "type": "line", "end": { - "x": 1.8787542118590292, + "x": 1.8787542118590241, "y": 22.923138585530168, "z": 0.0 }, @@ -750,7 +750,7 @@ description: Artifact commands helical-gear.kcl "segment": { "type": "line", "end": { - "x": -1.6644342460226098, + "x": -1.664434246022614, "y": 19.66322604122736, "z": 0.0 }, diff --git a/rust/kcl-lib/tests/kcl_samples/helical-gear/ast.snap b/rust/kcl-lib/tests/kcl_samples/helical-gear/ast.snap index 04f8395d94..b4c5d3d814 100644 --- a/rust/kcl-lib/tests/kcl_samples/helical-gear/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/helical-gear/ast.snap @@ -1081,13 +1081,13 @@ description: Result of parsing helical-gear.kcl "right": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -1107,13 +1107,13 @@ description: Result of parsing helical-gear.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1180,13 +1180,13 @@ description: Result of parsing helical-gear.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1920,13 +1920,13 @@ description: Result of parsing helical-gear.kcl "left": { "commentStart": 0, "end": 0, - "raw": "160", + "raw": "160deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 160.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "/", @@ -2420,13 +2420,13 @@ description: Result of parsing helical-gear.kcl "left": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "/", @@ -2648,13 +2648,13 @@ description: Result of parsing helical-gear.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -3414,13 +3414,13 @@ description: Result of parsing helical-gear.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "20", + "raw": "20deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 20.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -3436,13 +3436,13 @@ description: Result of parsing helical-gear.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "35", + "raw": "35deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 35.0, - "suffix": "None" + "suffix": "Deg" } } }, diff --git a/rust/kcl-lib/tests/kcl_samples/helical-gear/ops.snap b/rust/kcl-lib/tests/kcl_samples/helical-gear/ops.snap index 54168cea4c..2f480af5c5 100644 --- a/rust/kcl-lib/tests/kcl_samples/helical-gear/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/helical-gear/ops.snap @@ -33,13 +33,9 @@ description: Operations executed helical-gear.kcl "type": "Number", "value": 35.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -81,13 +77,9 @@ description: Operations executed helical-gear.kcl "type": "Number", "value": 20.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -1132,7 +1124,7 @@ description: Operations executed helical-gear.kcl "angle": { "value": { "type": "Number", - "value": 1.8699956271367815, + "value": 1.8699956271367817, "ty": { "type": "Known", "type": "Angle", @@ -1214,7 +1206,7 @@ description: Operations executed helical-gear.kcl "name": "x", "value": { "type": "Number", - "value": -5.816564508980187, + "value": -5.816564508980192, "ty": { "type": "Default", "len": { @@ -1718,7 +1710,7 @@ description: Operations executed helical-gear.kcl "angle": { "value": { "type": "Number", - "value": 1.5970178079464912, + "value": 1.597017807946491, "ty": { "type": "Known", "type": "Angle", @@ -1800,7 +1792,7 @@ description: Operations executed helical-gear.kcl "name": "x", "value": { "type": "Number", - "value": -0.603024957692658, + "value": -0.6030249576926529, "ty": { "type": "Default", "len": { @@ -2439,7 +2431,7 @@ description: Operations executed helical-gear.kcl "angle": { "value": { "type": "Number", - "value": 1.4890202476337995, + "value": 1.4890202476337997, "ty": { "type": "Known", "type": "Angle", @@ -2521,7 +2513,7 @@ description: Operations executed helical-gear.kcl "name": "x", "value": { "type": "Number", - "value": 1.8787542118590292, + "value": 1.8787542118590241, "ty": { "type": "Default", "len": { @@ -2574,7 +2566,7 @@ description: Operations executed helical-gear.kcl "angle": { "value": { "type": "Number", - "value": 1.655242081157069, + "value": 1.6552420811570692, "ty": { "type": "Known", "type": "Angle", @@ -2656,7 +2648,7 @@ description: Operations executed helical-gear.kcl "name": "x", "value": { "type": "Number", - "value": -1.6644342460226098, + "value": -1.664434246022614, "ty": { "type": "Default", "len": { diff --git a/rust/kcl-lib/tests/kcl_samples/helical-planetary-gearset/artifact_commands.snap b/rust/kcl-lib/tests/kcl_samples/helical-planetary-gearset/artifact_commands.snap index 2440021fed..8c86d32164 100644 --- a/rust/kcl-lib/tests/kcl_samples/helical-planetary-gearset/artifact_commands.snap +++ b/rust/kcl-lib/tests/kcl_samples/helical-planetary-gearset/artifact_commands.snap @@ -1545,7 +1545,7 @@ description: Artifact commands helical-planetary-gearset.kcl "segment": { "type": "line", "end": { - "x": -1.2721503422803828, + "x": -1.2721503422803806, "y": 10.422650023225183, "z": 0.0 }, @@ -1753,7 +1753,7 @@ description: Artifact commands helical-planetary-gearset.kcl "segment": { "type": "line", "end": { - "x": -0.09232333396144166, + "x": -0.09232333396144399, "y": 10.499594106536035, "z": 0.0 }, @@ -1788,8 +1788,8 @@ description: Artifact commands helical-planetary-gearset.kcl "segment": { "type": "line", "end": { - "x": -2.5780166821928425, - "y": 8.343452972068697, + "x": -2.5780166821928443, + "y": 8.343452972068695, "z": 0.0 }, "relative": false @@ -2388,8 +2388,8 @@ description: Artifact commands helical-planetary-gearset.kcl "segment": { "type": "line", "end": { - "x": -3.5408417166794406, - "y": 9.884960290128767, + "x": -3.540841716679438, + "y": 9.884960290128769, "z": 0.0 }, "relative": false @@ -2423,8 +2423,8 @@ description: Artifact commands helical-planetary-gearset.kcl "segment": { "type": "line", "end": { - "x": -5.17899041761511, - "y": 7.031175987346457, + "x": -5.178990417615113, + "y": 7.0311759873464545, "z": 0.0 }, "relative": false diff --git a/rust/kcl-lib/tests/kcl_samples/helical-planetary-gearset/ast.snap b/rust/kcl-lib/tests/kcl_samples/helical-planetary-gearset/ast.snap index d869f4c1d5..fecd5f779a 100644 --- a/rust/kcl-lib/tests/kcl_samples/helical-planetary-gearset/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/helical-planetary-gearset/ast.snap @@ -1081,13 +1081,13 @@ description: Result of parsing helical-planetary-gearset.kcl "right": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -1107,13 +1107,13 @@ description: Result of parsing helical-planetary-gearset.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1180,13 +1180,13 @@ description: Result of parsing helical-planetary-gearset.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1920,13 +1920,13 @@ description: Result of parsing helical-planetary-gearset.kcl "left": { "commentStart": 0, "end": 0, - "raw": "160", + "raw": "160deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 160.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "/", @@ -2420,13 +2420,13 @@ description: Result of parsing helical-planetary-gearset.kcl "left": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "/", @@ -2648,13 +2648,13 @@ description: Result of parsing helical-planetary-gearset.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -4283,13 +4283,13 @@ description: Result of parsing helical-planetary-gearset.kcl "left": { "commentStart": 0, "end": 0, - "raw": "200", + "raw": "200deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 200.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "/", @@ -5011,13 +5011,13 @@ description: Result of parsing helical-planetary-gearset.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -6029,13 +6029,13 @@ description: Result of parsing helical-planetary-gearset.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "14", + "raw": "14deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 14.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -6052,13 +6052,13 @@ description: Result of parsing helical-planetary-gearset.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "25", + "raw": "25deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 25.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -6184,13 +6184,13 @@ description: Result of parsing helical-planetary-gearset.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "14", + "raw": "14deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 14.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -6206,13 +6206,13 @@ description: Result of parsing helical-planetary-gearset.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "25", + "raw": "25deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 25.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -6371,13 +6371,13 @@ description: Result of parsing helical-planetary-gearset.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "14", + "raw": "14deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 14.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -6394,13 +6394,13 @@ description: Result of parsing helical-planetary-gearset.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "25", + "raw": "25deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 25.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -6733,13 +6733,13 @@ description: Result of parsing helical-planetary-gearset.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, diff --git a/rust/kcl-lib/tests/kcl_samples/helical-planetary-gearset/ops.snap b/rust/kcl-lib/tests/kcl_samples/helical-planetary-gearset/ops.snap index 25aa1e4b32..ab16d5f4fc 100644 --- a/rust/kcl-lib/tests/kcl_samples/helical-planetary-gearset/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/helical-planetary-gearset/ops.snap @@ -33,13 +33,9 @@ description: Operations executed helical-planetary-gearset.kcl "type": "Number", "value": -25.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -81,13 +77,9 @@ description: Operations executed helical-planetary-gearset.kcl "type": "Number", "value": 14.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -2993,13 +2985,9 @@ description: Operations executed helical-planetary-gearset.kcl "type": "Number", "value": 25.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -3041,13 +3029,9 @@ description: Operations executed helical-planetary-gearset.kcl "type": "Number", "value": 14.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -4678,7 +4662,7 @@ description: Operations executed helical-planetary-gearset.kcl "angle": { "value": { "type": "Number", - "value": 1.6922518897698449, + "value": 1.6922518897698446, "ty": { "type": "Known", "type": "Angle", @@ -4760,7 +4744,7 @@ description: Operations executed helical-planetary-gearset.kcl "name": "x", "value": { "type": "Number", - "value": -1.2721503422803828, + "value": -1.2721503422803806, "ty": { "type": "Default", "len": { @@ -5399,7 +5383,7 @@ description: Operations executed helical-planetary-gearset.kcl "angle": { "value": { "type": "Number", - "value": 1.5795891385675427, + "value": 1.579589138567543, "ty": { "type": "Known", "type": "Angle", @@ -5481,7 +5465,7 @@ description: Operations executed helical-planetary-gearset.kcl "name": "x", "value": { "type": "Number", - "value": -0.09232333396144166, + "value": -0.09232333396144399, "ty": { "type": "Default", "len": { @@ -5534,7 +5518,7 @@ description: Operations executed helical-planetary-gearset.kcl "angle": { "value": { "type": "Number", - "value": 1.870477347233264, + "value": 1.8704773472332643, "ty": { "type": "Known", "type": "Angle", @@ -5616,7 +5600,7 @@ description: Operations executed helical-planetary-gearset.kcl "name": "x", "value": { "type": "Number", - "value": -2.5780166821928425, + "value": -2.5780166821928443, "ty": { "type": "Default", "len": { @@ -5638,7 +5622,7 @@ description: Operations executed helical-planetary-gearset.kcl "name": "y", "value": { "type": "Number", - "value": 8.343452972068697, + "value": 8.343452972068695, "ty": { "type": "Default", "len": { @@ -5854,13 +5838,9 @@ description: Operations executed helical-planetary-gearset.kcl "type": "Number", "value": -25.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -5902,13 +5882,9 @@ description: Operations executed helical-planetary-gearset.kcl "type": "Number", "value": 14.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -7543,7 +7519,7 @@ description: Operations executed helical-planetary-gearset.kcl "angle": { "value": { "type": "Number", - "value": 1.914761897685103, + "value": 1.9147618976851029, "ty": { "type": "Known", "type": "Angle", @@ -7625,7 +7601,7 @@ description: Operations executed helical-planetary-gearset.kcl "name": "x", "value": { "type": "Number", - "value": -3.5408417166794406, + "value": -3.540841716679438, "ty": { "type": "Default", "len": { @@ -7647,7 +7623,7 @@ description: Operations executed helical-planetary-gearset.kcl "name": "y", "value": { "type": "Number", - "value": 9.884960290128767, + "value": 9.884960290128769, "ty": { "type": "Default", "len": { @@ -7678,7 +7654,7 @@ description: Operations executed helical-planetary-gearset.kcl "angle": { "value": { "type": "Number", - "value": 2.2056501063508245, + "value": 2.205650106350825, "ty": { "type": "Known", "type": "Angle", @@ -7760,7 +7736,7 @@ description: Operations executed helical-planetary-gearset.kcl "name": "x", "value": { "type": "Number", - "value": -5.17899041761511, + "value": -5.178990417615113, "ty": { "type": "Default", "len": { @@ -7782,7 +7758,7 @@ description: Operations executed helical-planetary-gearset.kcl "name": "y", "value": { "type": "Number", - "value": 7.031175987346457, + "value": 7.0311759873464545, "ty": { "type": "Default", "len": { diff --git a/rust/kcl-lib/tests/kcl_samples/helium-tank/ast.snap b/rust/kcl-lib/tests/kcl_samples/helium-tank/ast.snap index 91e8dcc956..ba7b2eae56 100644 --- a/rust/kcl-lib/tests/kcl_samples/helium-tank/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/helium-tank/ast.snap @@ -491,13 +491,13 @@ description: Result of parsing helium-tank.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "110", + "raw": "110deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 110.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -567,13 +567,13 @@ description: Result of parsing helium-tank.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "40", + "raw": "40deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 40.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -637,13 +637,13 @@ description: Result of parsing helium-tank.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "110", + "raw": "110deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 110.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -713,13 +713,13 @@ description: Result of parsing helium-tank.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -783,13 +783,13 @@ description: Result of parsing helium-tank.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -1052,13 +1052,13 @@ description: Result of parsing helium-tank.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -1383,13 +1383,13 @@ description: Result of parsing helium-tank.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1549,13 +1549,13 @@ description: Result of parsing helium-tank.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2010,13 +2010,13 @@ description: Result of parsing helium-tank.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "220", + "raw": "220deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 220.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -3481,13 +3481,13 @@ description: Result of parsing helium-tank.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "35", + "raw": "35deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 35.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -3599,13 +3599,13 @@ description: Result of parsing helium-tank.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "135", + "raw": "135deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 135.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -3837,13 +3837,13 @@ description: Result of parsing helium-tank.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "80", + "raw": "80deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 80.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -4427,13 +4427,13 @@ description: Result of parsing helium-tank.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "35", + "raw": "35deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 35.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -4521,13 +4521,13 @@ description: Result of parsing helium-tank.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "135", + "raw": "135deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 135.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -4735,13 +4735,13 @@ description: Result of parsing helium-tank.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "80", + "raw": "80deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 80.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, diff --git a/rust/kcl-lib/tests/kcl_samples/helium-tank/ops.snap b/rust/kcl-lib/tests/kcl_samples/helium-tank/ops.snap index 7c9d1affbc..29099f7d78 100644 --- a/rust/kcl-lib/tests/kcl_samples/helium-tank/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/helium-tank/ops.snap @@ -247,13 +247,9 @@ description: Operations executed helium-tank.kcl "type": "Number", "value": 220.0, "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] diff --git a/rust/kcl-lib/tests/kcl_samples/helium-tank/program_memory.snap b/rust/kcl-lib/tests/kcl_samples/helium-tank/program_memory.snap index 9c3e6edbe5..e028b47495 100644 --- a/rust/kcl-lib/tests/kcl_samples/helium-tank/program_memory.snap +++ b/rust/kcl-lib/tests/kcl_samples/helium-tank/program_memory.snap @@ -85,9 +85,9 @@ description: Variables in memory after executing helium-tank.kcl 3.6861841993004627 ], "tag": { - "commentStart": 3388, - "end": 3394, - "start": 3388, + "commentStart": 3430, + "end": 3436, + "start": 3430, "type": "TagDeclarator", "value": "seg04" }, @@ -134,9 +134,9 @@ description: Variables in memory after executing helium-tank.kcl 5.200565651519425 ], "tag": { - "commentStart": 3521, - "end": 3527, - "start": 3521, + "commentStart": 3566, + "end": 3572, + "start": 3566, "type": "TagDeclarator", "value": "seg05" }, @@ -325,9 +325,9 @@ description: Variables in memory after executing helium-tank.kcl 3.7885782048365866 ], "tag": { - "commentStart": 2738, - "end": 2744, - "start": 2738, + "commentStart": 2771, + "end": 2777, + "start": 2771, "type": "TagDeclarator", "value": "seg06" }, @@ -374,9 +374,9 @@ description: Variables in memory after executing helium-tank.kcl 5.1788596293110585 ], "tag": { - "commentStart": 2887, - "end": 2893, - "start": 2887, + "commentStart": 2923, + "end": 2929, + "start": 2923, "type": "TagDeclarator", "value": "seg07" }, @@ -562,9 +562,9 @@ description: Variables in memory after executing helium-tank.kcl 3.6861841993004627 ], "tag": { - "commentStart": 3388, - "end": 3394, - "start": 3388, + "commentStart": 3430, + "end": 3436, + "start": 3430, "type": "TagDeclarator", "value": "seg04" }, @@ -611,9 +611,9 @@ description: Variables in memory after executing helium-tank.kcl 5.200565651519425 ], "tag": { - "commentStart": 3521, - "end": 3527, - "start": 3521, + "commentStart": 3566, + "end": 3572, + "start": 3566, "type": "TagDeclarator", "value": "seg05" }, @@ -807,9 +807,9 @@ description: Variables in memory after executing helium-tank.kcl 3.6861841993004627 ], "tag": { - "commentStart": 3388, - "end": 3394, - "start": 3388, + "commentStart": 3430, + "end": 3436, + "start": 3430, "type": "TagDeclarator", "value": "seg04" }, @@ -856,9 +856,9 @@ description: Variables in memory after executing helium-tank.kcl 5.200565651519425 ], "tag": { - "commentStart": 3521, - "end": 3527, - "start": 3521, + "commentStart": 3566, + "end": 3572, + "start": 3566, "type": "TagDeclarator", "value": "seg05" }, @@ -1459,9 +1459,9 @@ description: Variables in memory after executing helium-tank.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 843, - "end": 849, - "start": 843, + "commentStart": 858, + "end": 864, + "start": 858, "type": "TagDeclarator", "value": "seg01" }, @@ -1472,9 +1472,9 @@ description: Variables in memory after executing helium-tank.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 922, - "end": 928, - "start": 922, + "commentStart": 937, + "end": 943, + "start": 937, "type": "TagDeclarator", "value": "seg09" }, @@ -1485,9 +1485,9 @@ description: Variables in memory after executing helium-tank.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 980, - "end": 986, - "start": 980, + "commentStart": 998, + "end": 1004, + "start": 998, "type": "TagDeclarator", "value": "seg02" }, @@ -1498,9 +1498,9 @@ description: Variables in memory after executing helium-tank.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1061, - "end": 1067, - "start": 1061, + "commentStart": 1079, + "end": 1085, + "start": 1079, "type": "TagDeclarator", "value": "seg08" }, @@ -1716,9 +1716,9 @@ description: Variables in memory after executing helium-tank.kcl 28.521171799344053 ], "tag": { - "commentStart": 843, - "end": 849, - "start": 843, + "commentStart": 858, + "end": 864, + "start": 858, "type": "TagDeclarator", "value": "seg01" }, @@ -1741,9 +1741,9 @@ description: Variables in memory after executing helium-tank.kcl 24.746171799344033 ], "tag": { - "commentStart": 922, - "end": 928, - "start": 922, + "commentStart": 937, + "end": 943, + "start": 937, "type": "TagDeclarator", "value": "seg09" }, @@ -1771,9 +1771,9 @@ description: Variables in memory after executing helium-tank.kcl 1.5 ], "tag": { - "commentStart": 980, - "end": 986, - "start": 980, + "commentStart": 998, + "end": 1004, + "start": 998, "type": "TagDeclarator", "value": "seg02" }, @@ -1796,9 +1796,9 @@ description: Variables in memory after executing helium-tank.kcl -0.499999999999992 ], "tag": { - "commentStart": 1061, - "end": 1067, - "start": 1061, + "commentStart": 1079, + "end": 1085, + "start": 1079, "type": "TagDeclarator", "value": "seg08" }, @@ -2229,9 +2229,9 @@ description: Variables in memory after executing helium-tank.kcl 28.521171799344053 ], "tag": { - "commentStart": 843, - "end": 849, - "start": 843, + "commentStart": 858, + "end": 864, + "start": 858, "type": "TagDeclarator", "value": "seg01" }, @@ -2254,9 +2254,9 @@ description: Variables in memory after executing helium-tank.kcl 24.746171799344033 ], "tag": { - "commentStart": 922, - "end": 928, - "start": 922, + "commentStart": 937, + "end": 943, + "start": 937, "type": "TagDeclarator", "value": "seg09" }, @@ -2284,9 +2284,9 @@ description: Variables in memory after executing helium-tank.kcl 1.5 ], "tag": { - "commentStart": 980, - "end": 986, - "start": 980, + "commentStart": 998, + "end": 1004, + "start": 998, "type": "TagDeclarator", "value": "seg02" }, @@ -2309,9 +2309,9 @@ description: Variables in memory after executing helium-tank.kcl -0.499999999999992 ], "tag": { - "commentStart": 1061, - "end": 1067, - "start": 1061, + "commentStart": 1079, + "end": 1085, + "start": 1079, "type": "TagDeclarator", "value": "seg08" }, @@ -2591,9 +2591,9 @@ description: Variables in memory after executing helium-tank.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1835, - "end": 1841, - "start": 1835, + "commentStart": 1862, + "end": 1868, + "start": 1862, "type": "TagDeclarator", "value": "seg03" }, @@ -2604,9 +2604,9 @@ description: Variables in memory after executing helium-tank.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1879, - "end": 1889, - "start": 1879, + "commentStart": 1906, + "end": 1916, + "start": 1906, "type": "TagDeclarator", "value": "capEnd001" }, @@ -2633,9 +2633,9 @@ description: Variables in memory after executing helium-tank.kcl ], "radius": 0.6578947368421053, "tag": { - "commentStart": 1835, - "end": 1841, - "start": 1835, + "commentStart": 1862, + "end": 1868, + "start": 1862, "type": "TagDeclarator", "value": "seg03" }, @@ -2754,9 +2754,9 @@ description: Variables in memory after executing helium-tank.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1835, - "end": 1841, - "start": 1835, + "commentStart": 1862, + "end": 1868, + "start": 1862, "type": "TagDeclarator", "value": "seg03" }, @@ -2767,9 +2767,9 @@ description: Variables in memory after executing helium-tank.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1879, - "end": 1889, - "start": 1879, + "commentStart": 1906, + "end": 1916, + "start": 1906, "type": "TagDeclarator", "value": "capEnd001" }, @@ -2796,9 +2796,9 @@ description: Variables in memory after executing helium-tank.kcl ], "radius": 0.6578947368421053, "tag": { - "commentStart": 1835, - "end": 1841, - "start": 1835, + "commentStart": 1862, + "end": 1868, + "start": 1862, "type": "TagDeclarator", "value": "seg03" }, diff --git a/rust/kcl-lib/tests/kcl_samples/herringbone-gear/artifact_commands.snap b/rust/kcl-lib/tests/kcl_samples/herringbone-gear/artifact_commands.snap index 0900e4fefb..8e99976562 100644 --- a/rust/kcl-lib/tests/kcl_samples/herringbone-gear/artifact_commands.snap +++ b/rust/kcl-lib/tests/kcl_samples/herringbone-gear/artifact_commands.snap @@ -157,8 +157,8 @@ description: Artifact commands herringbone-gear.kcl "segment": { "type": "line", "end": { - "x": -3.0162841835514778, - "y": 11.747651272325072, + "x": -3.016284183551481, + "y": 11.74765127232507, "z": 0.0 }, "relative": false @@ -415,8 +415,8 @@ description: Artifact commands herringbone-gear.kcl "segment": { "type": "line", "end": { - "x": 1.8779014305491148, - "y": 13.368750361089909, + "x": 1.877901430549112, + "y": 13.36875036108991, "z": 0.0 }, "relative": false @@ -450,7 +450,7 @@ description: Artifact commands herringbone-gear.kcl "segment": { "type": "line", "end": { - "x": -0.0008486680761613712, + "x": -0.0008486680761640642, "y": 12.128696548758493, "z": 0.0 }, diff --git a/rust/kcl-lib/tests/kcl_samples/herringbone-gear/ast.snap b/rust/kcl-lib/tests/kcl_samples/herringbone-gear/ast.snap index d201a66254..65a8d9720d 100644 --- a/rust/kcl-lib/tests/kcl_samples/herringbone-gear/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/herringbone-gear/ast.snap @@ -935,13 +935,13 @@ description: Result of parsing herringbone-gear.kcl "left": { "commentStart": 0, "end": 0, - "raw": "160", + "raw": "160deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 160.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "/", @@ -1435,13 +1435,13 @@ description: Result of parsing herringbone-gear.kcl "left": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "/", @@ -1663,13 +1663,13 @@ description: Result of parsing herringbone-gear.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2605,13 +2605,13 @@ description: Result of parsing herringbone-gear.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "14", + "raw": "14deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 14.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2627,13 +2627,13 @@ description: Result of parsing herringbone-gear.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "40", + "raw": "40deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 40.0, - "suffix": "None" + "suffix": "Deg" } } }, diff --git a/rust/kcl-lib/tests/kcl_samples/herringbone-gear/ops.snap b/rust/kcl-lib/tests/kcl_samples/herringbone-gear/ops.snap index b86d9b8f39..7caf3ed2ab 100644 --- a/rust/kcl-lib/tests/kcl_samples/herringbone-gear/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/herringbone-gear/ops.snap @@ -33,13 +33,9 @@ description: Operations executed herringbone-gear.kcl "type": "Number", "value": 40.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -81,13 +77,9 @@ description: Operations executed herringbone-gear.kcl "type": "Number", "value": 14.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -862,7 +854,7 @@ description: Operations executed herringbone-gear.kcl "angle": { "value": { "type": "Number", - "value": 1.82212373908208, + "value": 1.8221237390820801, "ty": { "type": "Known", "type": "Angle", @@ -944,7 +936,7 @@ description: Operations executed herringbone-gear.kcl "name": "x", "value": { "type": "Number", - "value": -3.0162841835514778, + "value": -3.016284183551481, "ty": { "type": "Default", "len": { @@ -966,7 +958,7 @@ description: Operations executed herringbone-gear.kcl "name": "y", "value": { "type": "Number", - "value": 11.747651272325072, + "value": 11.74765127232507, "ty": { "type": "Default", "len": { @@ -1448,7 +1440,7 @@ description: Operations executed herringbone-gear.kcl "angle": { "value": { "type": "Number", - "value": 1.4312399585462943, + "value": 1.4312399585462945, "ty": { "type": "Known", "type": "Angle", @@ -1530,7 +1522,7 @@ description: Operations executed herringbone-gear.kcl "name": "x", "value": { "type": "Number", - "value": 1.8779014305491148, + "value": 1.877901430549112, "ty": { "type": "Default", "len": { @@ -1552,7 +1544,7 @@ description: Operations executed herringbone-gear.kcl "name": "y", "value": { "type": "Number", - "value": 13.368750361089909, + "value": 13.36875036108991, "ty": { "type": "Default", "len": { @@ -1583,7 +1575,7 @@ description: Operations executed herringbone-gear.kcl "angle": { "value": { "type": "Number", - "value": 1.5708662987058406, + "value": 1.5708662987058408, "ty": { "type": "Known", "type": "Angle", @@ -1665,7 +1657,7 @@ description: Operations executed herringbone-gear.kcl "name": "x", "value": { "type": "Number", - "value": -0.0008486680761613712, + "value": -0.0008486680761640642, "ty": { "type": "Default", "len": { diff --git a/rust/kcl-lib/tests/kcl_samples/herringbone-planetary-gearset/artifact_commands.snap b/rust/kcl-lib/tests/kcl_samples/herringbone-planetary-gearset/artifact_commands.snap index 70f1a1e699..f032914883 100644 --- a/rust/kcl-lib/tests/kcl_samples/herringbone-planetary-gearset/artifact_commands.snap +++ b/rust/kcl-lib/tests/kcl_samples/herringbone-planetary-gearset/artifact_commands.snap @@ -122,7 +122,7 @@ description: Artifact commands herringbone-planetary-gearset.kcl "segment": { "type": "line", "end": { - "x": -2.9769208657835278, + "x": -2.9769208657835176, "y": 44.901424723040385, "z": 0.0 }, @@ -157,7 +157,7 @@ description: Artifact commands herringbone-planetary-gearset.kcl "segment": { "type": "line", "end": { - "x": -4.563472835506928, + "x": -4.563472835506937, "y": 41.96043978526968, "z": 0.0 }, @@ -454,7 +454,7 @@ description: Artifact commands herringbone-planetary-gearset.kcl "segment": { "type": "line", "end": { - "x": -5.765843883743658, + "x": -5.765843883743648, "y": 44.62908294272128, "z": 0.0 }, @@ -489,7 +489,7 @@ description: Artifact commands herringbone-planetary-gearset.kcl "segment": { "type": "line", "end": { - "x": -7.166270925682343, + "x": -7.166270925682353, "y": 41.595052017197574, "z": 0.0 }, @@ -1169,7 +1169,7 @@ description: Artifact commands herringbone-planetary-gearset.kcl "segment": { "type": "line", "end": { - "x": 0.49017318473970817, + "x": 0.4901731847397115, "y": 14.991988869024754, "z": 0.0 }, @@ -1204,7 +1204,7 @@ description: Artifact commands herringbone-planetary-gearset.kcl "segment": { "type": "line", "end": { - "x": -2.1029602755543437, + "x": -2.102960275554341, "y": 12.92908184979545, "z": 0.0 }, diff --git a/rust/kcl-lib/tests/kcl_samples/herringbone-planetary-gearset/ast.snap b/rust/kcl-lib/tests/kcl_samples/herringbone-planetary-gearset/ast.snap index 63325ef014..400099f69c 100644 --- a/rust/kcl-lib/tests/kcl_samples/herringbone-planetary-gearset/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/herringbone-planetary-gearset/ast.snap @@ -935,13 +935,13 @@ description: Result of parsing herringbone-planetary-gearset.kcl "left": { "commentStart": 0, "end": 0, - "raw": "160", + "raw": "160deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 160.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "/", @@ -1435,13 +1435,13 @@ description: Result of parsing herringbone-planetary-gearset.kcl "left": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "/", @@ -1663,13 +1663,13 @@ description: Result of parsing herringbone-planetary-gearset.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -3474,13 +3474,13 @@ description: Result of parsing herringbone-planetary-gearset.kcl "left": { "commentStart": 0, "end": 0, - "raw": "220", + "raw": "220deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 220.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "/", @@ -3974,13 +3974,13 @@ description: Result of parsing herringbone-planetary-gearset.kcl "left": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "/", @@ -4202,13 +4202,13 @@ description: Result of parsing herringbone-planetary-gearset.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -5304,13 +5304,13 @@ description: Result of parsing herringbone-planetary-gearset.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "14", + "raw": "14deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 14.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -5327,13 +5327,13 @@ description: Result of parsing herringbone-planetary-gearset.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "35", + "raw": "35deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 35.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -5459,13 +5459,13 @@ description: Result of parsing herringbone-planetary-gearset.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "14", + "raw": "14deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 14.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -5481,13 +5481,13 @@ description: Result of parsing herringbone-planetary-gearset.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "35", + "raw": "35deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 35.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -5646,13 +5646,13 @@ description: Result of parsing herringbone-planetary-gearset.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "14", + "raw": "14deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 14.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -5669,13 +5669,13 @@ description: Result of parsing herringbone-planetary-gearset.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "35", + "raw": "35deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 35.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -5968,13 +5968,13 @@ description: Result of parsing herringbone-planetary-gearset.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, diff --git a/rust/kcl-lib/tests/kcl_samples/herringbone-planetary-gearset/ops.snap b/rust/kcl-lib/tests/kcl_samples/herringbone-planetary-gearset/ops.snap index ceab2280ac..0496ae3081 100644 --- a/rust/kcl-lib/tests/kcl_samples/herringbone-planetary-gearset/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/herringbone-planetary-gearset/ops.snap @@ -33,13 +33,9 @@ description: Operations executed herringbone-planetary-gearset.kcl "type": "Number", "value": -35.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -81,13 +77,9 @@ description: Operations executed herringbone-planetary-gearset.kcl "type": "Number", "value": 14.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -727,7 +719,7 @@ description: Operations executed herringbone-planetary-gearset.kcl "angle": { "value": { "type": "Number", - "value": 1.6369984708360608, + "value": 1.6369984708360605, "ty": { "type": "Known", "type": "Angle", @@ -809,7 +801,7 @@ description: Operations executed herringbone-planetary-gearset.kcl "name": "x", "value": { "type": "Number", - "value": -2.9769208657835278, + "value": -2.9769208657835176, "ty": { "type": "Default", "len": { @@ -862,7 +854,7 @@ description: Operations executed herringbone-planetary-gearset.kcl "angle": { "value": { "type": "Number", - "value": 1.6791271079531653, + "value": 1.6791271079531656, "ty": { "type": "Known", "type": "Angle", @@ -944,7 +936,7 @@ description: Operations executed herringbone-planetary-gearset.kcl "name": "x", "value": { "type": "Number", - "value": -4.563472835506928, + "value": -4.563472835506937, "ty": { "type": "Default", "len": { @@ -1582,7 +1574,7 @@ description: Operations executed herringbone-planetary-gearset.kcl "angle": { "value": { "type": "Number", - "value": 1.6992793968141517, + "value": 1.6992793968141515, "ty": { "type": "Known", "type": "Angle", @@ -1664,7 +1656,7 @@ description: Operations executed herringbone-planetary-gearset.kcl "name": "x", "value": { "type": "Number", - "value": -5.765843883743658, + "value": -5.765843883743648, "ty": { "type": "Default", "len": { @@ -1717,7 +1709,7 @@ description: Operations executed herringbone-planetary-gearset.kcl "angle": { "value": { "type": "Number", - "value": 1.7414080339312563, + "value": 1.7414080339312565, "ty": { "type": "Known", "type": "Angle", @@ -1799,7 +1791,7 @@ description: Operations executed herringbone-planetary-gearset.kcl "name": "x", "value": { "type": "Number", - "value": -7.166270925682343, + "value": -7.166270925682353, "ty": { "type": "Default", "len": { @@ -2259,13 +2251,9 @@ description: Operations executed herringbone-planetary-gearset.kcl "type": "Number", "value": 35.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -2307,13 +2295,9 @@ description: Operations executed herringbone-planetary-gearset.kcl "type": "Number", "value": 14.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -3674,7 +3658,7 @@ description: Operations executed herringbone-planetary-gearset.kcl "angle": { "value": { "type": "Number", - "value": 1.5381122956927422, + "value": 1.538112295692742, "ty": { "type": "Known", "type": "Angle", @@ -3756,7 +3740,7 @@ description: Operations executed herringbone-planetary-gearset.kcl "name": "x", "value": { "type": "Number", - "value": 0.49017318473970817, + "value": 0.4901731847397115, "ty": { "type": "Default", "len": { @@ -3809,7 +3793,7 @@ description: Operations executed herringbone-planetary-gearset.kcl "angle": { "value": { "type": "Number", - "value": 1.7320377681365566, + "value": 1.7320377681365564, "ty": { "type": "Known", "type": "Angle", @@ -3891,7 +3875,7 @@ description: Operations executed herringbone-planetary-gearset.kcl "name": "x", "value": { "type": "Number", - "value": -2.1029602755543437, + "value": -2.102960275554341, "ty": { "type": "Default", "len": { @@ -4250,13 +4234,9 @@ description: Operations executed herringbone-planetary-gearset.kcl "type": "Number", "value": -35.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -4298,13 +4278,9 @@ description: Operations executed herringbone-planetary-gearset.kcl "type": "Number", "value": 14.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] diff --git a/rust/kcl-lib/tests/kcl_samples/i-beam/ast.snap b/rust/kcl-lib/tests/kcl_samples/i-beam/ast.snap index 9b7e9e326b..527aefb37d 100644 --- a/rust/kcl-lib/tests/kcl_samples/i-beam/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/i-beam/ast.snap @@ -623,13 +623,13 @@ description: Result of parsing i-beam.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } } diff --git a/rust/kcl-lib/tests/kcl_samples/keyboard/ast.snap b/rust/kcl-lib/tests/kcl_samples/keyboard/ast.snap index f576aae377..cc0556e067 100644 --- a/rust/kcl-lib/tests/kcl_samples/keyboard/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/keyboard/ast.snap @@ -907,13 +907,13 @@ description: Result of parsing keyboard.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "7", + "raw": "7deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 7.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2871,13 +2871,13 @@ description: Result of parsing keyboard.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2893,13 +2893,13 @@ description: Result of parsing keyboard.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "270", + "raw": "270deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 270.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -3095,13 +3095,13 @@ description: Result of parsing keyboard.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } } @@ -3184,13 +3184,13 @@ description: Result of parsing keyboard.kcl "right": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -3321,13 +3321,13 @@ description: Result of parsing keyboard.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } } @@ -3537,13 +3537,13 @@ description: Result of parsing keyboard.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } } @@ -9472,13 +9472,13 @@ description: Result of parsing keyboard.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "47.15", + "raw": "47.15deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 47.15, - "suffix": "None" + "suffix": "Deg" } } }, @@ -9957,13 +9957,13 @@ description: Result of parsing keyboard.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "47.15", + "raw": "47.15deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 47.15, - "suffix": "None" + "suffix": "Deg" } } }, @@ -10244,13 +10244,13 @@ description: Result of parsing keyboard.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "47.15", + "raw": "47.15deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 47.15, - "suffix": "None" + "suffix": "Deg" } } }, @@ -11206,26 +11206,26 @@ description: Result of parsing keyboard.kcl "left": { "commentStart": 0, "end": 0, - "raw": "47.15", + "raw": "47.15deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 47.15, - "suffix": "None" + "suffix": "Deg" } }, "operator": "+", "right": { "commentStart": 0, "end": 0, - "raw": "6", + "raw": "6deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 6.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -11251,26 +11251,26 @@ description: Result of parsing keyboard.kcl "left": { "commentStart": 0, "end": 0, - "raw": "47.15", + "raw": "47.15deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 47.15, - "suffix": "None" + "suffix": "Deg" } }, "operator": "-", "right": { "commentStart": 0, "end": 0, - "raw": "6", + "raw": "6deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 6.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -11281,13 +11281,13 @@ description: Result of parsing keyboard.kcl "right": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -11378,13 +11378,13 @@ description: Result of parsing keyboard.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "47.15", + "raw": "47.15deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 47.15, - "suffix": "None" + "suffix": "Deg" } } }, @@ -11477,26 +11477,26 @@ description: Result of parsing keyboard.kcl "left": { "commentStart": 0, "end": 0, - "raw": "47.15", + "raw": "47.15deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 47.15, - "suffix": "None" + "suffix": "Deg" } }, "operator": "-", "right": { "commentStart": 0, "end": 0, - "raw": "11", + "raw": "11deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 11.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -11507,13 +11507,13 @@ description: Result of parsing keyboard.kcl "right": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -11536,26 +11536,26 @@ description: Result of parsing keyboard.kcl "left": { "commentStart": 0, "end": 0, - "raw": "47.15", + "raw": "47.15deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 47.15, - "suffix": "None" + "suffix": "Deg" } }, "operator": "+", "right": { "commentStart": 0, "end": 0, - "raw": "11", + "raw": "11deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 11.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -12057,26 +12057,26 @@ description: Result of parsing keyboard.kcl "left": { "commentStart": 0, "end": 0, - "raw": "47.15", + "raw": "47.15deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 47.15, - "suffix": "None" + "suffix": "Deg" } }, "operator": "+", "right": { "commentStart": 0, "end": 0, - "raw": "6", + "raw": "6deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 6.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -12087,13 +12087,13 @@ description: Result of parsing keyboard.kcl "right": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -12116,26 +12116,26 @@ description: Result of parsing keyboard.kcl "left": { "commentStart": 0, "end": 0, - "raw": "47.15", + "raw": "47.15deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 47.15, - "suffix": "None" + "suffix": "Deg" } }, "operator": "-", "right": { "commentStart": 0, "end": 0, - "raw": "6", + "raw": "6deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 6.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -12226,13 +12226,13 @@ description: Result of parsing keyboard.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "47.15", + "raw": "47.15deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 47.15, - "suffix": "None" + "suffix": "Deg" } } }, @@ -12330,26 +12330,26 @@ description: Result of parsing keyboard.kcl "left": { "commentStart": 0, "end": 0, - "raw": "47.15", + "raw": "47.15deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 47.15, - "suffix": "None" + "suffix": "Deg" } }, "operator": "-", "right": { "commentStart": 0, "end": 0, - "raw": "11", + "raw": "11deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 11.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -12375,26 +12375,26 @@ description: Result of parsing keyboard.kcl "left": { "commentStart": 0, "end": 0, - "raw": "47.15", + "raw": "47.15deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 47.15, - "suffix": "None" + "suffix": "Deg" } }, "operator": "+", "right": { "commentStart": 0, "end": 0, - "raw": "11", + "raw": "11deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 11.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -12405,13 +12405,13 @@ description: Result of parsing keyboard.kcl "right": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, diff --git a/rust/kcl-lib/tests/kcl_samples/keyboard/program_memory.snap b/rust/kcl-lib/tests/kcl_samples/keyboard/program_memory.snap index e26b249560..f7b080dfa8 100644 --- a/rust/kcl-lib/tests/kcl_samples/keyboard/program_memory.snap +++ b/rust/kcl-lib/tests/kcl_samples/keyboard/program_memory.snap @@ -487,9 +487,9 @@ description: Variables in memory after executing keyboard.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 718, - "end": 724, - "start": 718, + "commentStart": 721, + "end": 727, + "start": 721, "type": "TagDeclarator", "value": "seg02" }, @@ -500,9 +500,9 @@ description: Variables in memory after executing keyboard.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 767, - "end": 773, - "start": 767, + "commentStart": 770, + "end": 776, + "start": 770, "type": "TagDeclarator", "value": "seg03" }, @@ -513,9 +513,9 @@ description: Variables in memory after executing keyboard.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 843, - "end": 849, - "start": 843, + "commentStart": 846, + "end": 852, + "start": 846, "type": "TagDeclarator", "value": "seg04" }, @@ -561,9 +561,9 @@ description: Variables in memory after executing keyboard.kcl 0.68 ], "tag": { - "commentStart": 718, - "end": 724, - "start": 718, + "commentStart": 721, + "end": 727, + "start": 721, "type": "TagDeclarator", "value": "seg02" }, @@ -586,9 +586,9 @@ description: Variables in memory after executing keyboard.kcl 1.3990291260903702 ], "tag": { - "commentStart": 767, - "end": 773, - "start": 767, + "commentStart": 770, + "end": 776, + "start": 770, "type": "TagDeclarator", "value": "seg03" }, @@ -611,9 +611,9 @@ description: Variables in memory after executing keyboard.kcl 0.0 ], "tag": { - "commentStart": 843, - "end": 849, - "start": 843, + "commentStart": 846, + "end": 852, + "start": 846, "type": "TagDeclarator", "value": "seg04" }, @@ -905,9 +905,9 @@ description: Variables in memory after executing keyboard.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 718, - "end": 724, - "start": 718, + "commentStart": 721, + "end": 727, + "start": 721, "type": "TagDeclarator", "value": "seg02" }, @@ -918,9 +918,9 @@ description: Variables in memory after executing keyboard.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 767, - "end": 773, - "start": 767, + "commentStart": 770, + "end": 776, + "start": 770, "type": "TagDeclarator", "value": "seg03" }, @@ -931,9 +931,9 @@ description: Variables in memory after executing keyboard.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 843, - "end": 849, - "start": 843, + "commentStart": 846, + "end": 852, + "start": 846, "type": "TagDeclarator", "value": "seg04" }, @@ -979,9 +979,9 @@ description: Variables in memory after executing keyboard.kcl 0.68 ], "tag": { - "commentStart": 718, - "end": 724, - "start": 718, + "commentStart": 721, + "end": 727, + "start": 721, "type": "TagDeclarator", "value": "seg02" }, @@ -1004,9 +1004,9 @@ description: Variables in memory after executing keyboard.kcl 1.3990291260903702 ], "tag": { - "commentStart": 767, - "end": 773, - "start": 767, + "commentStart": 770, + "end": 776, + "start": 770, "type": "TagDeclarator", "value": "seg03" }, @@ -1029,9 +1029,9 @@ description: Variables in memory after executing keyboard.kcl 0.0 ], "tag": { - "commentStart": 843, - "end": 849, - "start": 843, + "commentStart": 846, + "end": 852, + "start": 846, "type": "TagDeclarator", "value": "seg04" }, @@ -1323,9 +1323,9 @@ description: Variables in memory after executing keyboard.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 718, - "end": 724, - "start": 718, + "commentStart": 721, + "end": 727, + "start": 721, "type": "TagDeclarator", "value": "seg02" }, @@ -1336,9 +1336,9 @@ description: Variables in memory after executing keyboard.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 767, - "end": 773, - "start": 767, + "commentStart": 770, + "end": 776, + "start": 770, "type": "TagDeclarator", "value": "seg03" }, @@ -1349,9 +1349,9 @@ description: Variables in memory after executing keyboard.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 843, - "end": 849, - "start": 843, + "commentStart": 846, + "end": 852, + "start": 846, "type": "TagDeclarator", "value": "seg04" }, @@ -1397,9 +1397,9 @@ description: Variables in memory after executing keyboard.kcl 0.68 ], "tag": { - "commentStart": 718, - "end": 724, - "start": 718, + "commentStart": 721, + "end": 727, + "start": 721, "type": "TagDeclarator", "value": "seg02" }, @@ -1422,9 +1422,9 @@ description: Variables in memory after executing keyboard.kcl 1.3990291260903702 ], "tag": { - "commentStart": 767, - "end": 773, - "start": 767, + "commentStart": 770, + "end": 776, + "start": 770, "type": "TagDeclarator", "value": "seg03" }, @@ -1447,9 +1447,9 @@ description: Variables in memory after executing keyboard.kcl 0.0 ], "tag": { - "commentStart": 843, - "end": 849, - "start": 843, + "commentStart": 846, + "end": 852, + "start": 846, "type": "TagDeclarator", "value": "seg04" }, @@ -1741,9 +1741,9 @@ description: Variables in memory after executing keyboard.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 718, - "end": 724, - "start": 718, + "commentStart": 721, + "end": 727, + "start": 721, "type": "TagDeclarator", "value": "seg02" }, @@ -1754,9 +1754,9 @@ description: Variables in memory after executing keyboard.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 767, - "end": 773, - "start": 767, + "commentStart": 770, + "end": 776, + "start": 770, "type": "TagDeclarator", "value": "seg03" }, @@ -1767,9 +1767,9 @@ description: Variables in memory after executing keyboard.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 843, - "end": 849, - "start": 843, + "commentStart": 846, + "end": 852, + "start": 846, "type": "TagDeclarator", "value": "seg04" }, @@ -1815,9 +1815,9 @@ description: Variables in memory after executing keyboard.kcl 0.68 ], "tag": { - "commentStart": 718, - "end": 724, - "start": 718, + "commentStart": 721, + "end": 727, + "start": 721, "type": "TagDeclarator", "value": "seg02" }, @@ -1840,9 +1840,9 @@ description: Variables in memory after executing keyboard.kcl 1.3990291260903702 ], "tag": { - "commentStart": 767, - "end": 773, - "start": 767, + "commentStart": 770, + "end": 776, + "start": 770, "type": "TagDeclarator", "value": "seg03" }, @@ -1865,9 +1865,9 @@ description: Variables in memory after executing keyboard.kcl 0.0 ], "tag": { - "commentStart": 843, - "end": 849, - "start": 843, + "commentStart": 846, + "end": 852, + "start": 846, "type": "TagDeclarator", "value": "seg04" }, @@ -2206,9 +2206,9 @@ description: Variables in memory after executing keyboard.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 718, - "end": 724, - "start": 718, + "commentStart": 721, + "end": 727, + "start": 721, "type": "TagDeclarator", "value": "seg02" }, @@ -2219,9 +2219,9 @@ description: Variables in memory after executing keyboard.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 767, - "end": 773, - "start": 767, + "commentStart": 770, + "end": 776, + "start": 770, "type": "TagDeclarator", "value": "seg03" }, @@ -2232,9 +2232,9 @@ description: Variables in memory after executing keyboard.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 843, - "end": 849, - "start": 843, + "commentStart": 846, + "end": 852, + "start": 846, "type": "TagDeclarator", "value": "seg04" }, @@ -2280,9 +2280,9 @@ description: Variables in memory after executing keyboard.kcl 0.68 ], "tag": { - "commentStart": 718, - "end": 724, - "start": 718, + "commentStart": 721, + "end": 727, + "start": 721, "type": "TagDeclarator", "value": "seg02" }, @@ -2305,9 +2305,9 @@ description: Variables in memory after executing keyboard.kcl 1.3990291260903702 ], "tag": { - "commentStart": 767, - "end": 773, - "start": 767, + "commentStart": 770, + "end": 776, + "start": 770, "type": "TagDeclarator", "value": "seg03" }, @@ -2330,9 +2330,9 @@ description: Variables in memory after executing keyboard.kcl 0.0 ], "tag": { - "commentStart": 843, - "end": 849, - "start": 843, + "commentStart": 846, + "end": 852, + "start": 846, "type": "TagDeclarator", "value": "seg04" }, @@ -2565,9 +2565,9 @@ description: Variables in memory after executing keyboard.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 718, - "end": 724, - "start": 718, + "commentStart": 721, + "end": 727, + "start": 721, "type": "TagDeclarator", "value": "seg02" }, @@ -2578,9 +2578,9 @@ description: Variables in memory after executing keyboard.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 767, - "end": 773, - "start": 767, + "commentStart": 770, + "end": 776, + "start": 770, "type": "TagDeclarator", "value": "seg03" }, @@ -2591,9 +2591,9 @@ description: Variables in memory after executing keyboard.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 843, - "end": 849, - "start": 843, + "commentStart": 846, + "end": 852, + "start": 846, "type": "TagDeclarator", "value": "seg04" }, @@ -2639,9 +2639,9 @@ description: Variables in memory after executing keyboard.kcl 0.68 ], "tag": { - "commentStart": 718, - "end": 724, - "start": 718, + "commentStart": 721, + "end": 727, + "start": 721, "type": "TagDeclarator", "value": "seg02" }, @@ -2664,9 +2664,9 @@ description: Variables in memory after executing keyboard.kcl 1.3990291260903702 ], "tag": { - "commentStart": 767, - "end": 773, - "start": 767, + "commentStart": 770, + "end": 776, + "start": 770, "type": "TagDeclarator", "value": "seg03" }, @@ -2689,9 +2689,9 @@ description: Variables in memory after executing keyboard.kcl 0.0 ], "tag": { - "commentStart": 843, - "end": 849, - "start": 843, + "commentStart": 846, + "end": 852, + "start": 846, "type": "TagDeclarator", "value": "seg04" }, diff --git a/rust/kcl-lib/tests/kcl_samples/poopy-shoe/ast.snap b/rust/kcl-lib/tests/kcl_samples/poopy-shoe/ast.snap index 373b4e7362..7132062c27 100644 --- a/rust/kcl-lib/tests/kcl_samples/poopy-shoe/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/poopy-shoe/ast.snap @@ -476,13 +476,13 @@ description: Result of parsing poopy-shoe.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -750,13 +750,13 @@ description: Result of parsing poopy-shoe.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -949,26 +949,26 @@ description: Result of parsing poopy-shoe.kcl "left": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "-", "right": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -1213,26 +1213,26 @@ description: Result of parsing poopy-shoe.kcl "left": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "-", "right": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -1355,13 +1355,13 @@ description: Result of parsing poopy-shoe.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1784,13 +1784,13 @@ description: Result of parsing poopy-shoe.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2058,13 +2058,13 @@ description: Result of parsing poopy-shoe.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2257,26 +2257,26 @@ description: Result of parsing poopy-shoe.kcl "left": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "-", "right": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -2521,26 +2521,26 @@ description: Result of parsing poopy-shoe.kcl "left": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "-", "right": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -3238,13 +3238,13 @@ description: Result of parsing poopy-shoe.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -3311,13 +3311,13 @@ description: Result of parsing poopy-shoe.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -3814,26 +3814,26 @@ description: Result of parsing poopy-shoe.kcl "left": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "-", "right": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -4019,13 +4019,13 @@ description: Result of parsing poopy-shoe.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } } }, diff --git a/rust/kcl-lib/tests/kcl_samples/poopy-shoe/ops.snap b/rust/kcl-lib/tests/kcl_samples/poopy-shoe/ops.snap index f9e2bfc4eb..993f26d236 100644 --- a/rust/kcl-lib/tests/kcl_samples/poopy-shoe/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/poopy-shoe/ops.snap @@ -284,13 +284,9 @@ description: Operations executed poopy-shoe.kcl "type": "Number", "value": 90.0, "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] diff --git a/rust/kcl-lib/tests/kcl_samples/poopy-shoe/program_memory.snap b/rust/kcl-lib/tests/kcl_samples/poopy-shoe/program_memory.snap index cf0ca4a815..597aadb23d 100644 --- a/rust/kcl-lib/tests/kcl_samples/poopy-shoe/program_memory.snap +++ b/rust/kcl-lib/tests/kcl_samples/poopy-shoe/program_memory.snap @@ -498,9 +498,9 @@ description: Variables in memory after executing poopy-shoe.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 519, - "end": 525, - "start": 519, + "commentStart": 522, + "end": 528, + "start": 522, "type": "TagDeclarator", "value": "seg01" }, @@ -617,9 +617,9 @@ description: Variables in memory after executing poopy-shoe.kcl 0.0 ], "tag": { - "commentStart": 519, - "end": 525, - "start": 519, + "commentStart": 522, + "end": 528, + "start": 522, "type": "TagDeclarator", "value": "seg01" }, @@ -966,9 +966,9 @@ description: Variables in memory after executing poopy-shoe.kcl 0.0 ], "tag": { - "commentStart": 519, - "end": 525, - "start": 519, + "commentStart": 522, + "end": 528, + "start": 522, "type": "TagDeclarator", "value": "seg01" }, @@ -1271,9 +1271,9 @@ description: Variables in memory after executing poopy-shoe.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1286, - "end": 1292, - "start": 1286, + "commentStart": 1310, + "end": 1316, + "start": 1310, "type": "TagDeclarator", "value": "seg02" }, @@ -1390,9 +1390,9 @@ description: Variables in memory after executing poopy-shoe.kcl 0.0 ], "tag": { - "commentStart": 1286, - "end": 1292, - "start": 1286, + "commentStart": 1310, + "end": 1316, + "start": 1310, "type": "TagDeclarator", "value": "seg02" }, @@ -1932,9 +1932,9 @@ description: Variables in memory after executing poopy-shoe.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2912, - "end": 2918, - "start": 2912, + "commentStart": 2966, + "end": 2972, + "start": 2966, "type": "TagDeclarator", "value": "seg04" }, @@ -2174,9 +2174,9 @@ description: Variables in memory after executing poopy-shoe.kcl 0.0 ], "tag": { - "commentStart": 2912, - "end": 2918, - "start": 2912, + "commentStart": 2966, + "end": 2972, + "start": 2966, "type": "TagDeclarator", "value": "seg04" }, @@ -2228,9 +2228,9 @@ description: Variables in memory after executing poopy-shoe.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1286, - "end": 1292, - "start": 1286, + "commentStart": 1310, + "end": 1316, + "start": 1310, "type": "TagDeclarator", "value": "seg02" }, @@ -2347,9 +2347,9 @@ description: Variables in memory after executing poopy-shoe.kcl 0.0 ], "tag": { - "commentStart": 1286, - "end": 1292, - "start": 1286, + "commentStart": 1310, + "end": 1316, + "start": 1310, "type": "TagDeclarator", "value": "seg02" }, @@ -2723,9 +2723,9 @@ description: Variables in memory after executing poopy-shoe.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3517, - "end": 3523, - "start": 3517, + "commentStart": 3571, + "end": 3577, + "start": 3571, "type": "TagDeclarator", "value": "seg03" }, @@ -2839,9 +2839,9 @@ description: Variables in memory after executing poopy-shoe.kcl 1.0 ], "tag": { - "commentStart": 3517, - "end": 3523, - "start": 3517, + "commentStart": 3571, + "end": 3577, + "start": 3571, "type": "TagDeclarator", "value": "seg03" }, @@ -3119,9 +3119,9 @@ description: Variables in memory after executing poopy-shoe.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3517, - "end": 3523, - "start": 3517, + "commentStart": 3571, + "end": 3577, + "start": 3571, "type": "TagDeclarator", "value": "seg03" }, @@ -3235,9 +3235,9 @@ description: Variables in memory after executing poopy-shoe.kcl 1.0 ], "tag": { - "commentStart": 3517, - "end": 3523, - "start": 3517, + "commentStart": 3571, + "end": 3577, + "start": 3571, "type": "TagDeclarator", "value": "seg03" }, @@ -3600,9 +3600,9 @@ description: Variables in memory after executing poopy-shoe.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2912, - "end": 2918, - "start": 2912, + "commentStart": 2966, + "end": 2972, + "start": 2966, "type": "TagDeclarator", "value": "seg04" }, @@ -3842,9 +3842,9 @@ description: Variables in memory after executing poopy-shoe.kcl 0.0 ], "tag": { - "commentStart": 2912, - "end": 2918, - "start": 2912, + "commentStart": 2966, + "end": 2972, + "start": 2966, "type": "TagDeclarator", "value": "seg04" }, @@ -3896,9 +3896,9 @@ description: Variables in memory after executing poopy-shoe.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1286, - "end": 1292, - "start": 1286, + "commentStart": 1310, + "end": 1316, + "start": 1310, "type": "TagDeclarator", "value": "seg02" }, @@ -4015,9 +4015,9 @@ description: Variables in memory after executing poopy-shoe.kcl 0.0 ], "tag": { - "commentStart": 1286, - "end": 1292, - "start": 1286, + "commentStart": 1310, + "end": 1316, + "start": 1310, "type": "TagDeclarator", "value": "seg02" }, diff --git a/rust/kcl-lib/tests/kcl_samples/prosthetic-hip/ast.snap b/rust/kcl-lib/tests/kcl_samples/prosthetic-hip/ast.snap index 68df04fe95..16a749f08f 100644 --- a/rust/kcl-lib/tests/kcl_samples/prosthetic-hip/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/prosthetic-hip/ast.snap @@ -318,13 +318,13 @@ description: Result of parsing prosthetic-hip.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -399,13 +399,13 @@ description: Result of parsing prosthetic-hip.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -502,13 +502,13 @@ description: Result of parsing prosthetic-hip.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -582,13 +582,13 @@ description: Result of parsing prosthetic-hip.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1186,13 +1186,13 @@ description: Result of parsing prosthetic-hip.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -1267,13 +1267,13 @@ description: Result of parsing prosthetic-hip.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -1370,13 +1370,13 @@ description: Result of parsing prosthetic-hip.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -1450,13 +1450,13 @@ description: Result of parsing prosthetic-hip.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2074,13 +2074,13 @@ description: Result of parsing prosthetic-hip.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -2155,13 +2155,13 @@ description: Result of parsing prosthetic-hip.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -2258,13 +2258,13 @@ description: Result of parsing prosthetic-hip.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -2338,13 +2338,13 @@ description: Result of parsing prosthetic-hip.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -3072,13 +3072,13 @@ description: Result of parsing prosthetic-hip.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -3153,13 +3153,13 @@ description: Result of parsing prosthetic-hip.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -3256,13 +3256,13 @@ description: Result of parsing prosthetic-hip.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -3336,13 +3336,13 @@ description: Result of parsing prosthetic-hip.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -4070,13 +4070,13 @@ description: Result of parsing prosthetic-hip.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -4151,13 +4151,13 @@ description: Result of parsing prosthetic-hip.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -4254,13 +4254,13 @@ description: Result of parsing prosthetic-hip.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -4334,13 +4334,13 @@ description: Result of parsing prosthetic-hip.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -5068,13 +5068,13 @@ description: Result of parsing prosthetic-hip.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -5149,13 +5149,13 @@ description: Result of parsing prosthetic-hip.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -5252,13 +5252,13 @@ description: Result of parsing prosthetic-hip.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "120", + "raw": "120deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 120.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -5332,13 +5332,13 @@ description: Result of parsing prosthetic-hip.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "30deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -6248,13 +6248,13 @@ description: Result of parsing prosthetic-hip.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -6317,13 +6317,13 @@ description: Result of parsing prosthetic-hip.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -6441,13 +6441,13 @@ description: Result of parsing prosthetic-hip.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -6635,13 +6635,13 @@ description: Result of parsing prosthetic-hip.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -7427,13 +7427,13 @@ description: Result of parsing prosthetic-hip.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -8211,13 +8211,13 @@ description: Result of parsing prosthetic-hip.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, diff --git a/rust/kcl-lib/tests/kcl_samples/prosthetic-hip/ops.snap b/rust/kcl-lib/tests/kcl_samples/prosthetic-hip/ops.snap index b95b69eb24..0cf9a0f104 100644 --- a/rust/kcl-lib/tests/kcl_samples/prosthetic-hip/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/prosthetic-hip/ops.snap @@ -1570,13 +1570,9 @@ description: Operations executed prosthetic-hip.kcl "type": "Number", "value": 360.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -1837,13 +1833,9 @@ description: Operations executed prosthetic-hip.kcl "type": "Number", "value": 360.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -2104,13 +2096,9 @@ description: Operations executed prosthetic-hip.kcl "type": "Number", "value": 360.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] diff --git a/rust/kcl-lib/tests/kcl_samples/prosthetic-hip/program_memory.snap b/rust/kcl-lib/tests/kcl_samples/prosthetic-hip/program_memory.snap index 080dfcf403..a40d895af2 100644 --- a/rust/kcl-lib/tests/kcl_samples/prosthetic-hip/program_memory.snap +++ b/rust/kcl-lib/tests/kcl_samples/prosthetic-hip/program_memory.snap @@ -556,9 +556,9 @@ description: Variables in memory after executing prosthetic-hip.kcl -8.0 ], "tag": { - "commentStart": 1889, - "end": 1895, - "start": 1889, + "commentStart": 1925, + "end": 1931, + "start": 1925, "type": "TagDeclarator", "value": "seg04" }, @@ -1843,9 +1843,9 @@ description: Variables in memory after executing prosthetic-hip.kcl -9.5 ], "tag": { - "commentStart": 879, - "end": 885, - "start": 879, + "commentStart": 891, + "end": 897, + "start": 891, "type": "TagDeclarator", "value": "seg02" }, @@ -2065,9 +2065,9 @@ description: Variables in memory after executing prosthetic-hip.kcl -16.0 ], "tag": { - "commentStart": 1359, - "end": 1365, - "start": 1359, + "commentStart": 1383, + "end": 1389, + "start": 1383, "type": "TagDeclarator", "value": "seg03" }, @@ -2287,9 +2287,9 @@ description: Variables in memory after executing prosthetic-hip.kcl -8.0 ], "tag": { - "commentStart": 1889, - "end": 1895, - "start": 1889, + "commentStart": 1925, + "end": 1931, + "start": 1925, "type": "TagDeclarator", "value": "seg04" }, @@ -2509,9 +2509,9 @@ description: Variables in memory after executing prosthetic-hip.kcl -0.8 ], "tag": { - "commentStart": 2423, - "end": 2429, - "start": 2423, + "commentStart": 2471, + "end": 2477, + "start": 2471, "type": "TagDeclarator", "value": "seg05" }, @@ -2731,9 +2731,9 @@ description: Variables in memory after executing prosthetic-hip.kcl -0.5 ], "tag": { - "commentStart": 2954, - "end": 2960, - "start": 2954, + "commentStart": 3014, + "end": 3020, + "start": 3014, "type": "TagDeclarator", "value": "seg06" }, @@ -2949,9 +2949,9 @@ description: Variables in memory after executing prosthetic-hip.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2954, - "end": 2960, - "start": 2954, + "commentStart": 3014, + "end": 3020, + "start": 3014, "type": "TagDeclarator", "value": "seg06" }, @@ -3007,9 +3007,9 @@ description: Variables in memory after executing prosthetic-hip.kcl -0.5 ], "tag": { - "commentStart": 2954, - "end": 2960, - "start": 2954, + "commentStart": 3014, + "end": 3020, + "start": 3014, "type": "TagDeclarator", "value": "seg06" }, diff --git a/rust/kcl-lib/tests/kcl_samples/sheet-metal-bracket/ast.snap b/rust/kcl-lib/tests/kcl_samples/sheet-metal-bracket/ast.snap index 99fd3b8f92..24b027eb2f 100644 --- a/rust/kcl-lib/tests/kcl_samples/sheet-metal-bracket/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/sheet-metal-bracket/ast.snap @@ -304,13 +304,13 @@ description: Result of parsing sheet-metal-bracket.kcl "init": { "commentStart": 0, "end": 0, - "raw": "75", + "raw": "75deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 75.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -2000,13 +2000,13 @@ description: Result of parsing sheet-metal-bracket.kcl "left": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "-", @@ -2436,13 +2436,13 @@ description: Result of parsing sheet-metal-bracket.kcl "right": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, diff --git a/rust/kcl-lib/tests/kcl_samples/sheet-metal-bracket/ops.snap b/rust/kcl-lib/tests/kcl_samples/sheet-metal-bracket/ops.snap index f41021b5e9..e293b50efb 100644 --- a/rust/kcl-lib/tests/kcl_samples/sheet-metal-bracket/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/sheet-metal-bracket/ops.snap @@ -242,13 +242,9 @@ description: Operations executed sheet-metal-bracket.kcl "type": "Number", "value": 75.0, "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", diff --git a/rust/kcl-lib/tests/kcl_samples/sheet-metal-bracket/program_memory.snap b/rust/kcl-lib/tests/kcl_samples/sheet-metal-bracket/program_memory.snap index 82bfcfc426..7668e88c1f 100644 --- a/rust/kcl-lib/tests/kcl_samples/sheet-metal-bracket/program_memory.snap +++ b/rust/kcl-lib/tests/kcl_samples/sheet-metal-bracket/program_memory.snap @@ -7,13 +7,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "type": "Number", "value": 75.0, "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "bracketProfile": { @@ -42,9 +38,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1508, - "end": 1514, - "start": 1508, + "commentStart": 1511, + "end": 1517, + "start": 1511, "type": "TagDeclarator", "value": "seg01" }, @@ -62,9 +58,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1618, - "end": 1624, - "start": 1618, + "commentStart": 1621, + "end": 1627, + "start": 1621, "type": "TagDeclarator", "value": "seg02" }, @@ -103,9 +99,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1927, - "end": 1933, - "start": 1927, + "commentStart": 1930, + "end": 1936, + "start": 1930, "type": "TagDeclarator", "value": "seg03" }, @@ -116,9 +112,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1976, - "end": 1982, - "start": 1976, + "commentStart": 1979, + "end": 1985, + "start": 1979, "type": "TagDeclarator", "value": "seg04" }, @@ -150,9 +146,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2218, - "end": 2224, - "start": 2218, + "commentStart": 2224, + "end": 2230, + "start": 2224, "type": "TagDeclarator", "value": "seg05" }, @@ -184,9 +180,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2503, - "end": 2509, - "start": 2503, + "commentStart": 2512, + "end": 2518, + "start": 2512, "type": "TagDeclarator", "value": "seg06" }, @@ -197,9 +193,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2579, - "end": 2585, - "start": 2579, + "commentStart": 2588, + "end": 2594, + "start": 2588, "type": "TagDeclarator", "value": "seg07" }, @@ -263,9 +259,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.18529523872436982 ], "tag": { - "commentStart": 1508, - "end": 1514, - "start": 1508, + "commentStart": 1511, + "end": 1517, + "start": 1511, "type": "TagDeclarator", "value": "seg01" }, @@ -312,9 +308,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 2.467647619362185 ], "tag": { - "commentStart": 1618, - "end": 1624, - "start": 1618, + "commentStart": 1621, + "end": 1627, + "start": 1621, "type": "TagDeclarator", "value": "seg02" }, @@ -442,9 +438,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl -0.00000000000000016653345369377348 ], "tag": { - "commentStart": 1927, - "end": 1933, - "start": 1927, + "commentStart": 1930, + "end": 1936, + "start": 1930, "type": "TagDeclarator", "value": "seg03" }, @@ -467,9 +463,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.12499999999999983 ], "tag": { - "commentStart": 1976, - "end": 1982, - "start": 1976, + "commentStart": 1979, + "end": 1985, + "start": 1979, "type": "TagDeclarator", "value": "seg04" }, @@ -559,9 +555,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 2.5926476193621846 ], "tag": { - "commentStart": 2218, - "end": 2224, - "start": 2218, + "commentStart": 2224, + "end": 2230, + "start": 2224, "type": "TagDeclarator", "value": "seg05" }, @@ -670,9 +666,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.1249999999999997 ], "tag": { - "commentStart": 2503, - "end": 2509, - "start": 2503, + "commentStart": 2512, + "end": 2518, + "start": 2512, "type": "TagDeclarator", "value": "seg06" }, @@ -695,9 +691,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.1249999999999997 ], "tag": { - "commentStart": 2579, - "end": 2585, - "start": 2579, + "commentStart": 2588, + "end": 2594, + "start": 2588, "type": "TagDeclarator", "value": "seg07" }, @@ -987,9 +983,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1508, - "end": 1514, - "start": 1508, + "commentStart": 1511, + "end": 1517, + "start": 1511, "type": "TagDeclarator", "value": "seg01" }, @@ -1007,9 +1003,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1618, - "end": 1624, - "start": 1618, + "commentStart": 1621, + "end": 1627, + "start": 1621, "type": "TagDeclarator", "value": "seg02" }, @@ -1048,9 +1044,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1927, - "end": 1933, - "start": 1927, + "commentStart": 1930, + "end": 1936, + "start": 1930, "type": "TagDeclarator", "value": "seg03" }, @@ -1061,9 +1057,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1976, - "end": 1982, - "start": 1976, + "commentStart": 1979, + "end": 1985, + "start": 1979, "type": "TagDeclarator", "value": "seg04" }, @@ -1095,9 +1091,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2218, - "end": 2224, - "start": 2218, + "commentStart": 2224, + "end": 2230, + "start": 2224, "type": "TagDeclarator", "value": "seg05" }, @@ -1129,9 +1125,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2503, - "end": 2509, - "start": 2503, + "commentStart": 2512, + "end": 2518, + "start": 2512, "type": "TagDeclarator", "value": "seg06" }, @@ -1142,9 +1138,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2579, - "end": 2585, - "start": 2579, + "commentStart": 2588, + "end": 2594, + "start": 2588, "type": "TagDeclarator", "value": "seg07" }, @@ -1208,9 +1204,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.18529523872436982 ], "tag": { - "commentStart": 1508, - "end": 1514, - "start": 1508, + "commentStart": 1511, + "end": 1517, + "start": 1511, "type": "TagDeclarator", "value": "seg01" }, @@ -1257,9 +1253,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 2.467647619362185 ], "tag": { - "commentStart": 1618, - "end": 1624, - "start": 1618, + "commentStart": 1621, + "end": 1627, + "start": 1621, "type": "TagDeclarator", "value": "seg02" }, @@ -1387,9 +1383,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl -0.00000000000000016653345369377348 ], "tag": { - "commentStart": 1927, - "end": 1933, - "start": 1927, + "commentStart": 1930, + "end": 1936, + "start": 1930, "type": "TagDeclarator", "value": "seg03" }, @@ -1412,9 +1408,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.12499999999999983 ], "tag": { - "commentStart": 1976, - "end": 1982, - "start": 1976, + "commentStart": 1979, + "end": 1985, + "start": 1979, "type": "TagDeclarator", "value": "seg04" }, @@ -1504,9 +1500,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 2.5926476193621846 ], "tag": { - "commentStart": 2218, - "end": 2224, - "start": 2218, + "commentStart": 2224, + "end": 2230, + "start": 2224, "type": "TagDeclarator", "value": "seg05" }, @@ -1615,9 +1611,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.1249999999999997 ], "tag": { - "commentStart": 2503, - "end": 2509, - "start": 2503, + "commentStart": 2512, + "end": 2518, + "start": 2512, "type": "TagDeclarator", "value": "seg06" }, @@ -1640,9 +1636,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.1249999999999997 ], "tag": { - "commentStart": 2579, - "end": 2585, - "start": 2579, + "commentStart": 2588, + "end": 2594, + "start": 2588, "type": "TagDeclarator", "value": "seg07" }, @@ -2075,9 +2071,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1508, - "end": 1514, - "start": 1508, + "commentStart": 1511, + "end": 1517, + "start": 1511, "type": "TagDeclarator", "value": "seg01" }, @@ -2095,9 +2091,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1618, - "end": 1624, - "start": 1618, + "commentStart": 1621, + "end": 1627, + "start": 1621, "type": "TagDeclarator", "value": "seg02" }, @@ -2136,9 +2132,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1927, - "end": 1933, - "start": 1927, + "commentStart": 1930, + "end": 1936, + "start": 1930, "type": "TagDeclarator", "value": "seg03" }, @@ -2149,9 +2145,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1976, - "end": 1982, - "start": 1976, + "commentStart": 1979, + "end": 1985, + "start": 1979, "type": "TagDeclarator", "value": "seg04" }, @@ -2183,9 +2179,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2218, - "end": 2224, - "start": 2218, + "commentStart": 2224, + "end": 2230, + "start": 2224, "type": "TagDeclarator", "value": "seg05" }, @@ -2217,9 +2213,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2503, - "end": 2509, - "start": 2503, + "commentStart": 2512, + "end": 2518, + "start": 2512, "type": "TagDeclarator", "value": "seg06" }, @@ -2230,9 +2226,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2579, - "end": 2585, - "start": 2579, + "commentStart": 2588, + "end": 2594, + "start": 2588, "type": "TagDeclarator", "value": "seg07" }, @@ -2296,9 +2292,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.18529523872436982 ], "tag": { - "commentStart": 1508, - "end": 1514, - "start": 1508, + "commentStart": 1511, + "end": 1517, + "start": 1511, "type": "TagDeclarator", "value": "seg01" }, @@ -2345,9 +2341,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 2.467647619362185 ], "tag": { - "commentStart": 1618, - "end": 1624, - "start": 1618, + "commentStart": 1621, + "end": 1627, + "start": 1621, "type": "TagDeclarator", "value": "seg02" }, @@ -2475,9 +2471,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl -0.00000000000000016653345369377348 ], "tag": { - "commentStart": 1927, - "end": 1933, - "start": 1927, + "commentStart": 1930, + "end": 1936, + "start": 1930, "type": "TagDeclarator", "value": "seg03" }, @@ -2500,9 +2496,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.12499999999999983 ], "tag": { - "commentStart": 1976, - "end": 1982, - "start": 1976, + "commentStart": 1979, + "end": 1985, + "start": 1979, "type": "TagDeclarator", "value": "seg04" }, @@ -2592,9 +2588,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 2.5926476193621846 ], "tag": { - "commentStart": 2218, - "end": 2224, - "start": 2218, + "commentStart": 2224, + "end": 2230, + "start": 2224, "type": "TagDeclarator", "value": "seg05" }, @@ -2703,9 +2699,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.1249999999999997 ], "tag": { - "commentStart": 2503, - "end": 2509, - "start": 2503, + "commentStart": 2512, + "end": 2518, + "start": 2512, "type": "TagDeclarator", "value": "seg06" }, @@ -2728,9 +2724,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.1249999999999997 ], "tag": { - "commentStart": 2579, - "end": 2585, - "start": 2579, + "commentStart": 2588, + "end": 2594, + "start": 2588, "type": "TagDeclarator", "value": "seg07" }, @@ -3056,9 +3052,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1508, - "end": 1514, - "start": 1508, + "commentStart": 1511, + "end": 1517, + "start": 1511, "type": "TagDeclarator", "value": "seg01" }, @@ -3076,9 +3072,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1618, - "end": 1624, - "start": 1618, + "commentStart": 1621, + "end": 1627, + "start": 1621, "type": "TagDeclarator", "value": "seg02" }, @@ -3117,9 +3113,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1927, - "end": 1933, - "start": 1927, + "commentStart": 1930, + "end": 1936, + "start": 1930, "type": "TagDeclarator", "value": "seg03" }, @@ -3130,9 +3126,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1976, - "end": 1982, - "start": 1976, + "commentStart": 1979, + "end": 1985, + "start": 1979, "type": "TagDeclarator", "value": "seg04" }, @@ -3164,9 +3160,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2218, - "end": 2224, - "start": 2218, + "commentStart": 2224, + "end": 2230, + "start": 2224, "type": "TagDeclarator", "value": "seg05" }, @@ -3198,9 +3194,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2503, - "end": 2509, - "start": 2503, + "commentStart": 2512, + "end": 2518, + "start": 2512, "type": "TagDeclarator", "value": "seg06" }, @@ -3211,9 +3207,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2579, - "end": 2585, - "start": 2579, + "commentStart": 2588, + "end": 2594, + "start": 2588, "type": "TagDeclarator", "value": "seg07" }, @@ -3277,9 +3273,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.18529523872436982 ], "tag": { - "commentStart": 1508, - "end": 1514, - "start": 1508, + "commentStart": 1511, + "end": 1517, + "start": 1511, "type": "TagDeclarator", "value": "seg01" }, @@ -3326,9 +3322,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 2.467647619362185 ], "tag": { - "commentStart": 1618, - "end": 1624, - "start": 1618, + "commentStart": 1621, + "end": 1627, + "start": 1621, "type": "TagDeclarator", "value": "seg02" }, @@ -3456,9 +3452,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl -0.00000000000000016653345369377348 ], "tag": { - "commentStart": 1927, - "end": 1933, - "start": 1927, + "commentStart": 1930, + "end": 1936, + "start": 1930, "type": "TagDeclarator", "value": "seg03" }, @@ -3481,9 +3477,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.12499999999999983 ], "tag": { - "commentStart": 1976, - "end": 1982, - "start": 1976, + "commentStart": 1979, + "end": 1985, + "start": 1979, "type": "TagDeclarator", "value": "seg04" }, @@ -3573,9 +3569,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 2.5926476193621846 ], "tag": { - "commentStart": 2218, - "end": 2224, - "start": 2218, + "commentStart": 2224, + "end": 2230, + "start": 2224, "type": "TagDeclarator", "value": "seg05" }, @@ -3684,9 +3680,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.1249999999999997 ], "tag": { - "commentStart": 2503, - "end": 2509, - "start": 2503, + "commentStart": 2512, + "end": 2518, + "start": 2512, "type": "TagDeclarator", "value": "seg06" }, @@ -3709,9 +3705,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.1249999999999997 ], "tag": { - "commentStart": 2579, - "end": 2585, - "start": 2579, + "commentStart": 2588, + "end": 2594, + "start": 2588, "type": "TagDeclarator", "value": "seg07" }, @@ -4094,9 +4090,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1508, - "end": 1514, - "start": 1508, + "commentStart": 1511, + "end": 1517, + "start": 1511, "type": "TagDeclarator", "value": "seg01" }, @@ -4114,9 +4110,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1618, - "end": 1624, - "start": 1618, + "commentStart": 1621, + "end": 1627, + "start": 1621, "type": "TagDeclarator", "value": "seg02" }, @@ -4155,9 +4151,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1927, - "end": 1933, - "start": 1927, + "commentStart": 1930, + "end": 1936, + "start": 1930, "type": "TagDeclarator", "value": "seg03" }, @@ -4168,9 +4164,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1976, - "end": 1982, - "start": 1976, + "commentStart": 1979, + "end": 1985, + "start": 1979, "type": "TagDeclarator", "value": "seg04" }, @@ -4202,9 +4198,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2218, - "end": 2224, - "start": 2218, + "commentStart": 2224, + "end": 2230, + "start": 2224, "type": "TagDeclarator", "value": "seg05" }, @@ -4236,9 +4232,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2503, - "end": 2509, - "start": 2503, + "commentStart": 2512, + "end": 2518, + "start": 2512, "type": "TagDeclarator", "value": "seg06" }, @@ -4249,9 +4245,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2579, - "end": 2585, - "start": 2579, + "commentStart": 2588, + "end": 2594, + "start": 2588, "type": "TagDeclarator", "value": "seg07" }, @@ -4315,9 +4311,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.18529523872436982 ], "tag": { - "commentStart": 1508, - "end": 1514, - "start": 1508, + "commentStart": 1511, + "end": 1517, + "start": 1511, "type": "TagDeclarator", "value": "seg01" }, @@ -4364,9 +4360,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 2.467647619362185 ], "tag": { - "commentStart": 1618, - "end": 1624, - "start": 1618, + "commentStart": 1621, + "end": 1627, + "start": 1621, "type": "TagDeclarator", "value": "seg02" }, @@ -4494,9 +4490,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl -0.00000000000000016653345369377348 ], "tag": { - "commentStart": 1927, - "end": 1933, - "start": 1927, + "commentStart": 1930, + "end": 1936, + "start": 1930, "type": "TagDeclarator", "value": "seg03" }, @@ -4519,9 +4515,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.12499999999999983 ], "tag": { - "commentStart": 1976, - "end": 1982, - "start": 1976, + "commentStart": 1979, + "end": 1985, + "start": 1979, "type": "TagDeclarator", "value": "seg04" }, @@ -4611,9 +4607,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 2.5926476193621846 ], "tag": { - "commentStart": 2218, - "end": 2224, - "start": 2218, + "commentStart": 2224, + "end": 2230, + "start": 2224, "type": "TagDeclarator", "value": "seg05" }, @@ -4722,9 +4718,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.1249999999999997 ], "tag": { - "commentStart": 2503, - "end": 2509, - "start": 2503, + "commentStart": 2512, + "end": 2518, + "start": 2512, "type": "TagDeclarator", "value": "seg06" }, @@ -4747,9 +4743,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.1249999999999997 ], "tag": { - "commentStart": 2579, - "end": 2585, - "start": 2579, + "commentStart": 2588, + "end": 2594, + "start": 2588, "type": "TagDeclarator", "value": "seg07" }, @@ -5075,9 +5071,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1508, - "end": 1514, - "start": 1508, + "commentStart": 1511, + "end": 1517, + "start": 1511, "type": "TagDeclarator", "value": "seg01" }, @@ -5095,9 +5091,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1618, - "end": 1624, - "start": 1618, + "commentStart": 1621, + "end": 1627, + "start": 1621, "type": "TagDeclarator", "value": "seg02" }, @@ -5136,9 +5132,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1927, - "end": 1933, - "start": 1927, + "commentStart": 1930, + "end": 1936, + "start": 1930, "type": "TagDeclarator", "value": "seg03" }, @@ -5149,9 +5145,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1976, - "end": 1982, - "start": 1976, + "commentStart": 1979, + "end": 1985, + "start": 1979, "type": "TagDeclarator", "value": "seg04" }, @@ -5183,9 +5179,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2218, - "end": 2224, - "start": 2218, + "commentStart": 2224, + "end": 2230, + "start": 2224, "type": "TagDeclarator", "value": "seg05" }, @@ -5217,9 +5213,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2503, - "end": 2509, - "start": 2503, + "commentStart": 2512, + "end": 2518, + "start": 2512, "type": "TagDeclarator", "value": "seg06" }, @@ -5230,9 +5226,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2579, - "end": 2585, - "start": 2579, + "commentStart": 2588, + "end": 2594, + "start": 2588, "type": "TagDeclarator", "value": "seg07" }, @@ -5296,9 +5292,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.18529523872436982 ], "tag": { - "commentStart": 1508, - "end": 1514, - "start": 1508, + "commentStart": 1511, + "end": 1517, + "start": 1511, "type": "TagDeclarator", "value": "seg01" }, @@ -5345,9 +5341,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 2.467647619362185 ], "tag": { - "commentStart": 1618, - "end": 1624, - "start": 1618, + "commentStart": 1621, + "end": 1627, + "start": 1621, "type": "TagDeclarator", "value": "seg02" }, @@ -5475,9 +5471,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl -0.00000000000000016653345369377348 ], "tag": { - "commentStart": 1927, - "end": 1933, - "start": 1927, + "commentStart": 1930, + "end": 1936, + "start": 1930, "type": "TagDeclarator", "value": "seg03" }, @@ -5500,9 +5496,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.12499999999999983 ], "tag": { - "commentStart": 1976, - "end": 1982, - "start": 1976, + "commentStart": 1979, + "end": 1985, + "start": 1979, "type": "TagDeclarator", "value": "seg04" }, @@ -5592,9 +5588,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 2.5926476193621846 ], "tag": { - "commentStart": 2218, - "end": 2224, - "start": 2218, + "commentStart": 2224, + "end": 2230, + "start": 2224, "type": "TagDeclarator", "value": "seg05" }, @@ -5703,9 +5699,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.1249999999999997 ], "tag": { - "commentStart": 2503, - "end": 2509, - "start": 2503, + "commentStart": 2512, + "end": 2518, + "start": 2512, "type": "TagDeclarator", "value": "seg06" }, @@ -5728,9 +5724,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.1249999999999997 ], "tag": { - "commentStart": 2579, - "end": 2585, - "start": 2579, + "commentStart": 2588, + "end": 2594, + "start": 2588, "type": "TagDeclarator", "value": "seg07" }, @@ -6109,9 +6105,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1508, - "end": 1514, - "start": 1508, + "commentStart": 1511, + "end": 1517, + "start": 1511, "type": "TagDeclarator", "value": "seg01" }, @@ -6129,9 +6125,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1618, - "end": 1624, - "start": 1618, + "commentStart": 1621, + "end": 1627, + "start": 1621, "type": "TagDeclarator", "value": "seg02" }, @@ -6170,9 +6166,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1927, - "end": 1933, - "start": 1927, + "commentStart": 1930, + "end": 1936, + "start": 1930, "type": "TagDeclarator", "value": "seg03" }, @@ -6183,9 +6179,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1976, - "end": 1982, - "start": 1976, + "commentStart": 1979, + "end": 1985, + "start": 1979, "type": "TagDeclarator", "value": "seg04" }, @@ -6217,9 +6213,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2218, - "end": 2224, - "start": 2218, + "commentStart": 2224, + "end": 2230, + "start": 2224, "type": "TagDeclarator", "value": "seg05" }, @@ -6251,9 +6247,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2503, - "end": 2509, - "start": 2503, + "commentStart": 2512, + "end": 2518, + "start": 2512, "type": "TagDeclarator", "value": "seg06" }, @@ -6264,9 +6260,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2579, - "end": 2585, - "start": 2579, + "commentStart": 2588, + "end": 2594, + "start": 2588, "type": "TagDeclarator", "value": "seg07" }, @@ -6330,9 +6326,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.18529523872436982 ], "tag": { - "commentStart": 1508, - "end": 1514, - "start": 1508, + "commentStart": 1511, + "end": 1517, + "start": 1511, "type": "TagDeclarator", "value": "seg01" }, @@ -6379,9 +6375,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 2.467647619362185 ], "tag": { - "commentStart": 1618, - "end": 1624, - "start": 1618, + "commentStart": 1621, + "end": 1627, + "start": 1621, "type": "TagDeclarator", "value": "seg02" }, @@ -6509,9 +6505,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl -0.00000000000000016653345369377348 ], "tag": { - "commentStart": 1927, - "end": 1933, - "start": 1927, + "commentStart": 1930, + "end": 1936, + "start": 1930, "type": "TagDeclarator", "value": "seg03" }, @@ -6534,9 +6530,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.12499999999999983 ], "tag": { - "commentStart": 1976, - "end": 1982, - "start": 1976, + "commentStart": 1979, + "end": 1985, + "start": 1979, "type": "TagDeclarator", "value": "seg04" }, @@ -6626,9 +6622,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 2.5926476193621846 ], "tag": { - "commentStart": 2218, - "end": 2224, - "start": 2218, + "commentStart": 2224, + "end": 2230, + "start": 2224, "type": "TagDeclarator", "value": "seg05" }, @@ -6737,9 +6733,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.1249999999999997 ], "tag": { - "commentStart": 2503, - "end": 2509, - "start": 2503, + "commentStart": 2512, + "end": 2518, + "start": 2512, "type": "TagDeclarator", "value": "seg06" }, @@ -6762,9 +6758,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.1249999999999997 ], "tag": { - "commentStart": 2579, - "end": 2585, - "start": 2579, + "commentStart": 2588, + "end": 2594, + "start": 2588, "type": "TagDeclarator", "value": "seg07" }, @@ -7090,9 +7086,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1508, - "end": 1514, - "start": 1508, + "commentStart": 1511, + "end": 1517, + "start": 1511, "type": "TagDeclarator", "value": "seg01" }, @@ -7110,9 +7106,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1618, - "end": 1624, - "start": 1618, + "commentStart": 1621, + "end": 1627, + "start": 1621, "type": "TagDeclarator", "value": "seg02" }, @@ -7151,9 +7147,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1927, - "end": 1933, - "start": 1927, + "commentStart": 1930, + "end": 1936, + "start": 1930, "type": "TagDeclarator", "value": "seg03" }, @@ -7164,9 +7160,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1976, - "end": 1982, - "start": 1976, + "commentStart": 1979, + "end": 1985, + "start": 1979, "type": "TagDeclarator", "value": "seg04" }, @@ -7198,9 +7194,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2218, - "end": 2224, - "start": 2218, + "commentStart": 2224, + "end": 2230, + "start": 2224, "type": "TagDeclarator", "value": "seg05" }, @@ -7232,9 +7228,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2503, - "end": 2509, - "start": 2503, + "commentStart": 2512, + "end": 2518, + "start": 2512, "type": "TagDeclarator", "value": "seg06" }, @@ -7245,9 +7241,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2579, - "end": 2585, - "start": 2579, + "commentStart": 2588, + "end": 2594, + "start": 2588, "type": "TagDeclarator", "value": "seg07" }, @@ -7311,9 +7307,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.18529523872436982 ], "tag": { - "commentStart": 1508, - "end": 1514, - "start": 1508, + "commentStart": 1511, + "end": 1517, + "start": 1511, "type": "TagDeclarator", "value": "seg01" }, @@ -7360,9 +7356,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 2.467647619362185 ], "tag": { - "commentStart": 1618, - "end": 1624, - "start": 1618, + "commentStart": 1621, + "end": 1627, + "start": 1621, "type": "TagDeclarator", "value": "seg02" }, @@ -7490,9 +7486,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl -0.00000000000000016653345369377348 ], "tag": { - "commentStart": 1927, - "end": 1933, - "start": 1927, + "commentStart": 1930, + "end": 1936, + "start": 1930, "type": "TagDeclarator", "value": "seg03" }, @@ -7515,9 +7511,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.12499999999999983 ], "tag": { - "commentStart": 1976, - "end": 1982, - "start": 1976, + "commentStart": 1979, + "end": 1985, + "start": 1979, "type": "TagDeclarator", "value": "seg04" }, @@ -7607,9 +7603,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 2.5926476193621846 ], "tag": { - "commentStart": 2218, - "end": 2224, - "start": 2218, + "commentStart": 2224, + "end": 2230, + "start": 2224, "type": "TagDeclarator", "value": "seg05" }, @@ -7718,9 +7714,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.1249999999999997 ], "tag": { - "commentStart": 2503, - "end": 2509, - "start": 2503, + "commentStart": 2512, + "end": 2518, + "start": 2512, "type": "TagDeclarator", "value": "seg06" }, @@ -7743,9 +7739,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.1249999999999997 ], "tag": { - "commentStart": 2579, - "end": 2585, - "start": 2579, + "commentStart": 2588, + "end": 2594, + "start": 2588, "type": "TagDeclarator", "value": "seg07" }, @@ -8071,9 +8067,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1508, - "end": 1514, - "start": 1508, + "commentStart": 1511, + "end": 1517, + "start": 1511, "type": "TagDeclarator", "value": "seg01" }, @@ -8091,9 +8087,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1618, - "end": 1624, - "start": 1618, + "commentStart": 1621, + "end": 1627, + "start": 1621, "type": "TagDeclarator", "value": "seg02" }, @@ -8132,9 +8128,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1927, - "end": 1933, - "start": 1927, + "commentStart": 1930, + "end": 1936, + "start": 1930, "type": "TagDeclarator", "value": "seg03" }, @@ -8145,9 +8141,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1976, - "end": 1982, - "start": 1976, + "commentStart": 1979, + "end": 1985, + "start": 1979, "type": "TagDeclarator", "value": "seg04" }, @@ -8179,9 +8175,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2218, - "end": 2224, - "start": 2218, + "commentStart": 2224, + "end": 2230, + "start": 2224, "type": "TagDeclarator", "value": "seg05" }, @@ -8213,9 +8209,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2503, - "end": 2509, - "start": 2503, + "commentStart": 2512, + "end": 2518, + "start": 2512, "type": "TagDeclarator", "value": "seg06" }, @@ -8226,9 +8222,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2579, - "end": 2585, - "start": 2579, + "commentStart": 2588, + "end": 2594, + "start": 2588, "type": "TagDeclarator", "value": "seg07" }, @@ -8292,9 +8288,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.18529523872436982 ], "tag": { - "commentStart": 1508, - "end": 1514, - "start": 1508, + "commentStart": 1511, + "end": 1517, + "start": 1511, "type": "TagDeclarator", "value": "seg01" }, @@ -8341,9 +8337,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 2.467647619362185 ], "tag": { - "commentStart": 1618, - "end": 1624, - "start": 1618, + "commentStart": 1621, + "end": 1627, + "start": 1621, "type": "TagDeclarator", "value": "seg02" }, @@ -8471,9 +8467,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl -0.00000000000000016653345369377348 ], "tag": { - "commentStart": 1927, - "end": 1933, - "start": 1927, + "commentStart": 1930, + "end": 1936, + "start": 1930, "type": "TagDeclarator", "value": "seg03" }, @@ -8496,9 +8492,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.12499999999999983 ], "tag": { - "commentStart": 1976, - "end": 1982, - "start": 1976, + "commentStart": 1979, + "end": 1985, + "start": 1979, "type": "TagDeclarator", "value": "seg04" }, @@ -8588,9 +8584,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 2.5926476193621846 ], "tag": { - "commentStart": 2218, - "end": 2224, - "start": 2218, + "commentStart": 2224, + "end": 2230, + "start": 2224, "type": "TagDeclarator", "value": "seg05" }, @@ -8699,9 +8695,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.1249999999999997 ], "tag": { - "commentStart": 2503, - "end": 2509, - "start": 2503, + "commentStart": 2512, + "end": 2518, + "start": 2512, "type": "TagDeclarator", "value": "seg06" }, @@ -8724,9 +8720,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.1249999999999997 ], "tag": { - "commentStart": 2579, - "end": 2585, - "start": 2579, + "commentStart": 2588, + "end": 2594, + "start": 2588, "type": "TagDeclarator", "value": "seg07" }, @@ -9052,9 +9048,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1508, - "end": 1514, - "start": 1508, + "commentStart": 1511, + "end": 1517, + "start": 1511, "type": "TagDeclarator", "value": "seg01" }, @@ -9072,9 +9068,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1618, - "end": 1624, - "start": 1618, + "commentStart": 1621, + "end": 1627, + "start": 1621, "type": "TagDeclarator", "value": "seg02" }, @@ -9113,9 +9109,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1927, - "end": 1933, - "start": 1927, + "commentStart": 1930, + "end": 1936, + "start": 1930, "type": "TagDeclarator", "value": "seg03" }, @@ -9126,9 +9122,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1976, - "end": 1982, - "start": 1976, + "commentStart": 1979, + "end": 1985, + "start": 1979, "type": "TagDeclarator", "value": "seg04" }, @@ -9160,9 +9156,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2218, - "end": 2224, - "start": 2218, + "commentStart": 2224, + "end": 2230, + "start": 2224, "type": "TagDeclarator", "value": "seg05" }, @@ -9194,9 +9190,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2503, - "end": 2509, - "start": 2503, + "commentStart": 2512, + "end": 2518, + "start": 2512, "type": "TagDeclarator", "value": "seg06" }, @@ -9207,9 +9203,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2579, - "end": 2585, - "start": 2579, + "commentStart": 2588, + "end": 2594, + "start": 2588, "type": "TagDeclarator", "value": "seg07" }, @@ -9273,9 +9269,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.18529523872436982 ], "tag": { - "commentStart": 1508, - "end": 1514, - "start": 1508, + "commentStart": 1511, + "end": 1517, + "start": 1511, "type": "TagDeclarator", "value": "seg01" }, @@ -9322,9 +9318,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 2.467647619362185 ], "tag": { - "commentStart": 1618, - "end": 1624, - "start": 1618, + "commentStart": 1621, + "end": 1627, + "start": 1621, "type": "TagDeclarator", "value": "seg02" }, @@ -9452,9 +9448,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl -0.00000000000000016653345369377348 ], "tag": { - "commentStart": 1927, - "end": 1933, - "start": 1927, + "commentStart": 1930, + "end": 1936, + "start": 1930, "type": "TagDeclarator", "value": "seg03" }, @@ -9477,9 +9473,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.12499999999999983 ], "tag": { - "commentStart": 1976, - "end": 1982, - "start": 1976, + "commentStart": 1979, + "end": 1985, + "start": 1979, "type": "TagDeclarator", "value": "seg04" }, @@ -9569,9 +9565,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 2.5926476193621846 ], "tag": { - "commentStart": 2218, - "end": 2224, - "start": 2218, + "commentStart": 2224, + "end": 2230, + "start": 2224, "type": "TagDeclarator", "value": "seg05" }, @@ -9680,9 +9676,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.1249999999999997 ], "tag": { - "commentStart": 2503, - "end": 2509, - "start": 2503, + "commentStart": 2512, + "end": 2518, + "start": 2512, "type": "TagDeclarator", "value": "seg06" }, @@ -9705,9 +9701,9 @@ description: Variables in memory after executing sheet-metal-bracket.kcl 0.1249999999999997 ], "tag": { - "commentStart": 2579, - "end": 2585, - "start": 2579, + "commentStart": 2588, + "end": 2594, + "start": 2588, "type": "TagDeclarator", "value": "seg07" }, diff --git a/rust/kcl-lib/tests/kcl_samples/shepherds-hook-bolt/ast.snap b/rust/kcl-lib/tests/kcl_samples/shepherds-hook-bolt/ast.snap index 1641fc4ecc..35283c044f 100644 --- a/rust/kcl-lib/tests/kcl_samples/shepherds-hook-bolt/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/shepherds-hook-bolt/ast.snap @@ -188,13 +188,13 @@ description: Result of parsing shepherds-hook-bolt.kcl "init": { "commentStart": 0, "end": 0, - "raw": "290", + "raw": "290deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 290.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -221,13 +221,13 @@ description: Result of parsing shepherds-hook-bolt.kcl "init": { "commentStart": 0, "end": 0, - "raw": "150", + "raw": "150deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 150.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -571,13 +571,13 @@ description: Result of parsing shepherds-hook-bolt.kcl "right": { "commentStart": 0, "end": 0, - "raw": "270", + "raw": "270deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 270.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -3523,13 +3523,13 @@ description: Result of parsing shepherds-hook-bolt.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, diff --git a/rust/kcl-lib/tests/kcl_samples/shepherds-hook-bolt/ops.snap b/rust/kcl-lib/tests/kcl_samples/shepherds-hook-bolt/ops.snap index 3394eb02d9..e50cf7f527 100644 --- a/rust/kcl-lib/tests/kcl_samples/shepherds-hook-bolt/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/shepherds-hook-bolt/ops.snap @@ -176,13 +176,9 @@ description: Operations executed shepherds-hook-bolt.kcl "type": "Number", "value": 290.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -209,13 +205,9 @@ description: Operations executed shepherds-hook-bolt.kcl "type": "Number", "value": 150.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -506,13 +498,9 @@ description: Operations executed shepherds-hook-bolt.kcl "type": "Number", "value": 290.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -667,13 +655,9 @@ description: Operations executed shepherds-hook-bolt.kcl "type": "Number", "value": 150.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -1113,13 +1097,9 @@ description: Operations executed shepherds-hook-bolt.kcl "type": "Number", "value": 360.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] diff --git a/rust/kcl-lib/tests/kcl_samples/shepherds-hook-bolt/program_memory.snap b/rust/kcl-lib/tests/kcl_samples/shepherds-hook-bolt/program_memory.snap index 529480d31e..f71dce9c6b 100644 --- a/rust/kcl-lib/tests/kcl_samples/shepherds-hook-bolt/program_memory.snap +++ b/rust/kcl-lib/tests/kcl_samples/shepherds-hook-bolt/program_memory.snap @@ -597,13 +597,9 @@ description: Variables in memory after executing shepherds-hook-bolt.kcl "type": "Number", "value": 150.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "hookProfilePlane": { @@ -702,9 +698,9 @@ description: Variables in memory after executing shepherds-hook-bolt.kcl -11.2763114494309 ], "tag": { - "commentStart": 1558, - "end": 1563, - "start": 1558, + "commentStart": 1567, + "end": 1572, + "start": 1567, "type": "TagDeclarator", "value": "hook" }, @@ -915,13 +911,9 @@ description: Variables in memory after executing shepherds-hook-bolt.kcl "type": "Number", "value": 290.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "hypotenuse": { @@ -1054,9 +1046,9 @@ description: Variables in memory after executing shepherds-hook-bolt.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2148, - "end": 2154, - "start": 2148, + "commentStart": 2157, + "end": 2163, + "start": 2157, "type": "TagDeclarator", "value": "seg01" }, @@ -1067,9 +1059,9 @@ description: Variables in memory after executing shepherds-hook-bolt.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2246, - "end": 2255, - "start": 2246, + "commentStart": 2255, + "end": 2264, + "start": 2255, "type": "TagDeclarator", "value": "startTag" }, @@ -1080,9 +1072,9 @@ description: Variables in memory after executing shepherds-hook-bolt.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2273, - "end": 2283, - "start": 2273, + "commentStart": 2282, + "end": 2292, + "start": 2282, "type": "TagDeclarator", "value": "capEnd001" }, @@ -1109,9 +1101,9 @@ description: Variables in memory after executing shepherds-hook-bolt.kcl ], "radius": 2.5, "tag": { - "commentStart": 2148, - "end": 2154, - "start": 2148, + "commentStart": 2157, + "end": 2163, + "start": 2157, "type": "TagDeclarator", "value": "seg01" }, @@ -1476,9 +1468,9 @@ description: Variables in memory after executing shepherds-hook-bolt.kcl ], "radius": 2.5, "tag": { - "commentStart": 2148, - "end": 2154, - "start": 2148, + "commentStart": 2157, + "end": 2163, + "start": 2157, "type": "TagDeclarator", "value": "seg01" }, diff --git a/rust/kcl-lib/tests/kcl_samples/spur-gear/ast.snap b/rust/kcl-lib/tests/kcl_samples/spur-gear/ast.snap index d7e0a46a9d..fcb0e761c7 100644 --- a/rust/kcl-lib/tests/kcl_samples/spur-gear/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/spur-gear/ast.snap @@ -1081,13 +1081,13 @@ description: Result of parsing spur-gear.kcl "right": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -1107,13 +1107,13 @@ description: Result of parsing spur-gear.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1180,13 +1180,13 @@ description: Result of parsing spur-gear.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1692,13 +1692,13 @@ description: Result of parsing spur-gear.kcl "left": { "commentStart": 0, "end": 0, - "raw": "160", + "raw": "160deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 160.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "/", @@ -2043,13 +2043,13 @@ description: Result of parsing spur-gear.kcl "left": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "/", @@ -2148,13 +2148,13 @@ description: Result of parsing spur-gear.kcl "left": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "/", @@ -2355,13 +2355,13 @@ description: Result of parsing spur-gear.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2776,13 +2776,13 @@ description: Result of parsing spur-gear.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "14", + "raw": "14deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 14.0, - "suffix": "None" + "suffix": "Deg" } } }, diff --git a/rust/kcl-lib/tests/kcl_samples/spur-gear/ops.snap b/rust/kcl-lib/tests/kcl_samples/spur-gear/ops.snap index 9832dcb706..521d3ffc1b 100644 --- a/rust/kcl-lib/tests/kcl_samples/spur-gear/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/spur-gear/ops.snap @@ -65,13 +65,9 @@ description: Operations executed spur-gear.kcl "type": "Number", "value": 14.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] diff --git a/rust/kcl-lib/tests/kcl_samples/spur-reduction-gearset/ast.snap b/rust/kcl-lib/tests/kcl_samples/spur-reduction-gearset/ast.snap index ffd8365a19..0e19d0c1d4 100644 --- a/rust/kcl-lib/tests/kcl_samples/spur-reduction-gearset/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/spur-reduction-gearset/ast.snap @@ -707,13 +707,13 @@ description: Result of parsing spur-reduction-gearset.kcl "left": { "commentStart": 0, "end": 0, - "raw": "160", + "raw": "160deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 160.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "/", @@ -1058,13 +1058,13 @@ description: Result of parsing spur-reduction-gearset.kcl "left": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "/", @@ -1163,13 +1163,13 @@ description: Result of parsing spur-reduction-gearset.kcl "left": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "/", @@ -1370,13 +1370,13 @@ description: Result of parsing spur-reduction-gearset.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1870,13 +1870,13 @@ description: Result of parsing spur-reduction-gearset.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "14", + "raw": "14deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 14.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1997,13 +1997,13 @@ description: Result of parsing spur-reduction-gearset.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "14", + "raw": "14deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 14.0, - "suffix": "None" + "suffix": "Deg" } } }, diff --git a/rust/kcl-lib/tests/kcl_samples/spur-reduction-gearset/ops.snap b/rust/kcl-lib/tests/kcl_samples/spur-reduction-gearset/ops.snap index 49b891583c..770488421a 100644 --- a/rust/kcl-lib/tests/kcl_samples/spur-reduction-gearset/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/spur-reduction-gearset/ops.snap @@ -65,13 +65,9 @@ description: Operations executed spur-reduction-gearset.kcl "type": "Number", "value": 14.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] @@ -914,13 +910,9 @@ description: Operations executed spur-reduction-gearset.kcl "type": "Number", "value": 14.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] diff --git a/rust/kcl-lib/tests/kcl_samples/surgical-drill-guide/ast.snap b/rust/kcl-lib/tests/kcl_samples/surgical-drill-guide/ast.snap index 5e99870e0b..80f8995594 100644 --- a/rust/kcl-lib/tests/kcl_samples/surgical-drill-guide/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/surgical-drill-guide/ast.snap @@ -635,13 +635,13 @@ description: Result of parsing surgical-drill-guide.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "60deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -912,13 +912,13 @@ description: Result of parsing surgical-drill-guide.kcl "right": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -1049,13 +1049,13 @@ description: Result of parsing surgical-drill-guide.kcl "right": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, diff --git a/rust/kcl-lib/tests/kcl_samples/surgical-drill-guide/program_memory.snap b/rust/kcl-lib/tests/kcl_samples/surgical-drill-guide/program_memory.snap index 71f93a5eff..d7a663d262 100644 --- a/rust/kcl-lib/tests/kcl_samples/surgical-drill-guide/program_memory.snap +++ b/rust/kcl-lib/tests/kcl_samples/surgical-drill-guide/program_memory.snap @@ -92,9 +92,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2124, - "end": 2130, - "start": 2124, + "commentStart": 2133, + "end": 2139, + "start": 2133, "type": "TagDeclarator", "value": "seg10" }, @@ -105,9 +105,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2174, - "end": 2184, - "start": 2174, + "commentStart": 2183, + "end": 2193, + "start": 2183, "type": "TagDeclarator", "value": "capEnd004" }, @@ -134,9 +134,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl ], "radius": 2.0, "tag": { - "commentStart": 2124, - "end": 2130, - "start": 2124, + "commentStart": 2133, + "end": 2139, + "start": 2133, "type": "TagDeclarator", "value": "seg10" }, @@ -455,9 +455,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3480, - "end": 3486, - "start": 3480, + "commentStart": 3489, + "end": 3495, + "start": 3489, "type": "TagDeclarator", "value": "seg09" }, @@ -468,9 +468,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3530, - "end": 3540, - "start": 3530, + "commentStart": 3539, + "end": 3549, + "start": 3539, "type": "TagDeclarator", "value": "capEnd003" }, @@ -497,9 +497,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl ], "radius": 3.2, "tag": { - "commentStart": 3480, - "end": 3486, - "start": 3480, + "commentStart": 3489, + "end": 3495, + "start": 3489, "type": "TagDeclarator", "value": "seg09" }, @@ -1264,9 +1264,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 751, - "end": 757, - "start": 751, + "commentStart": 754, + "end": 760, + "start": 754, "type": "TagDeclarator", "value": "seg01" }, @@ -1277,9 +1277,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 837, - "end": 843, - "start": 837, + "commentStart": 840, + "end": 846, + "start": 840, "type": "TagDeclarator", "value": "seg03" }, @@ -1290,9 +1290,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 926, - "end": 932, - "start": 926, + "commentStart": 932, + "end": 938, + "start": 932, "type": "TagDeclarator", "value": "seg05" }, @@ -1303,9 +1303,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1009, - "end": 1015, - "start": 1009, + "commentStart": 1018, + "end": 1024, + "start": 1018, "type": "TagDeclarator", "value": "seg07" }, @@ -1323,9 +1323,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1215, - "end": 1227, - "start": 1215, + "commentStart": 1224, + "end": 1236, + "start": 1224, "type": "TagDeclarator", "value": "capStart001" }, @@ -1336,9 +1336,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1185, - "end": 1195, - "start": 1185, + "commentStart": 1194, + "end": 1204, + "start": 1194, "type": "TagDeclarator", "value": "capEnd001" }, @@ -1439,9 +1439,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl 6.0 ], "tag": { - "commentStart": 751, - "end": 757, - "start": 751, + "commentStart": 754, + "end": 760, + "start": 754, "type": "TagDeclarator", "value": "seg01" }, @@ -1464,9 +1464,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl 9.75 ], "tag": { - "commentStart": 837, - "end": 843, - "start": 837, + "commentStart": 840, + "end": 846, + "start": 840, "type": "TagDeclarator", "value": "seg03" }, @@ -1489,9 +1489,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl 53.05127018922193 ], "tag": { - "commentStart": 926, - "end": 932, - "start": 926, + "commentStart": 932, + "end": 938, + "start": 932, "type": "TagDeclarator", "value": "seg05" }, @@ -1514,9 +1514,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl 50.05127018922193 ], "tag": { - "commentStart": 1009, - "end": 1015, - "start": 1009, + "commentStart": 1018, + "end": 1024, + "start": 1018, "type": "TagDeclarator", "value": "seg07" }, @@ -1726,9 +1726,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2743, - "end": 2749, - "start": 2743, + "commentStart": 2752, + "end": 2758, + "start": 2752, "type": "TagDeclarator", "value": "seg11" }, @@ -1739,9 +1739,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2896, - "end": 2908, - "start": 2896, + "commentStart": 2905, + "end": 2917, + "start": 2905, "type": "TagDeclarator", "value": "capStart003" }, @@ -1752,9 +1752,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2873, - "end": 2883, - "start": 2873, + "commentStart": 2882, + "end": 2892, + "start": 2882, "type": "TagDeclarator", "value": "capEnd005" }, @@ -1781,9 +1781,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl ], "radius": 16.216216216216214, "tag": { - "commentStart": 2743, - "end": 2749, - "start": 2743, + "commentStart": 2752, + "end": 2758, + "start": 2752, "type": "TagDeclarator", "value": "seg11" }, @@ -1924,9 +1924,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4073, - "end": 4079, - "start": 4073, + "commentStart": 4082, + "end": 4088, + "start": 4082, "type": "TagDeclarator", "value": "seg08" }, @@ -1937,9 +1937,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4200, - "end": 4212, - "start": 4200, + "commentStart": 4209, + "end": 4221, + "start": 4209, "type": "TagDeclarator", "value": "capStart002" }, @@ -1950,9 +1950,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4223, - "end": 4233, - "start": 4223, + "commentStart": 4232, + "end": 4242, + "start": 4232, "type": "TagDeclarator", "value": "capEnd002" }, @@ -1979,9 +1979,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl ], "radius": 16.216216216216214, "tag": { - "commentStart": 4073, - "end": 4079, - "start": 4073, + "commentStart": 4082, + "end": 4088, + "start": 4082, "type": "TagDeclarator", "value": "seg08" }, @@ -2161,9 +2161,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 751, - "end": 757, - "start": 751, + "commentStart": 754, + "end": 760, + "start": 754, "type": "TagDeclarator", "value": "seg01" }, @@ -2174,9 +2174,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 837, - "end": 843, - "start": 837, + "commentStart": 840, + "end": 846, + "start": 840, "type": "TagDeclarator", "value": "seg03" }, @@ -2187,9 +2187,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 926, - "end": 932, - "start": 926, + "commentStart": 932, + "end": 938, + "start": 932, "type": "TagDeclarator", "value": "seg05" }, @@ -2200,9 +2200,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1009, - "end": 1015, - "start": 1009, + "commentStart": 1018, + "end": 1024, + "start": 1018, "type": "TagDeclarator", "value": "seg07" }, @@ -2220,9 +2220,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1215, - "end": 1227, - "start": 1215, + "commentStart": 1224, + "end": 1236, + "start": 1224, "type": "TagDeclarator", "value": "capStart001" }, @@ -2233,9 +2233,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 1185, - "end": 1195, - "start": 1185, + "commentStart": 1194, + "end": 1204, + "start": 1194, "type": "TagDeclarator", "value": "capEnd001" }, @@ -2336,9 +2336,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl 6.0 ], "tag": { - "commentStart": 751, - "end": 757, - "start": 751, + "commentStart": 754, + "end": 760, + "start": 754, "type": "TagDeclarator", "value": "seg01" }, @@ -2361,9 +2361,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl 9.75 ], "tag": { - "commentStart": 837, - "end": 843, - "start": 837, + "commentStart": 840, + "end": 846, + "start": 840, "type": "TagDeclarator", "value": "seg03" }, @@ -2386,9 +2386,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl 53.05127018922193 ], "tag": { - "commentStart": 926, - "end": 932, - "start": 926, + "commentStart": 932, + "end": 938, + "start": 932, "type": "TagDeclarator", "value": "seg05" }, @@ -2411,9 +2411,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl 50.05127018922193 ], "tag": { - "commentStart": 1009, - "end": 1015, - "start": 1009, + "commentStart": 1018, + "end": 1024, + "start": 1018, "type": "TagDeclarator", "value": "seg07" }, @@ -2664,9 +2664,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2124, - "end": 2130, - "start": 2124, + "commentStart": 2133, + "end": 2139, + "start": 2133, "type": "TagDeclarator", "value": "seg10" }, @@ -2677,9 +2677,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2174, - "end": 2184, - "start": 2174, + "commentStart": 2183, + "end": 2193, + "start": 2183, "type": "TagDeclarator", "value": "capEnd004" }, @@ -2706,9 +2706,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl ], "radius": 2.0, "tag": { - "commentStart": 2124, - "end": 2130, - "start": 2124, + "commentStart": 2133, + "end": 2139, + "start": 2133, "type": "TagDeclarator", "value": "seg10" }, @@ -2927,9 +2927,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3480, - "end": 3486, - "start": 3480, + "commentStart": 3489, + "end": 3495, + "start": 3489, "type": "TagDeclarator", "value": "seg09" }, @@ -2940,9 +2940,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3530, - "end": 3540, - "start": 3530, + "commentStart": 3539, + "end": 3549, + "start": 3539, "type": "TagDeclarator", "value": "capEnd003" }, @@ -2969,9 +2969,9 @@ description: Variables in memory after executing surgical-drill-guide.kcl ], "radius": 3.2, "tag": { - "commentStart": 3480, - "end": 3486, - "start": 3480, + "commentStart": 3489, + "end": 3495, + "start": 3489, "type": "TagDeclarator", "value": "seg09" }, diff --git a/rust/kcl-lib/tests/kcl_samples/t-slot-rail/ast.snap b/rust/kcl-lib/tests/kcl_samples/t-slot-rail/ast.snap index 07f303da76..53fc6d5fb3 100644 --- a/rust/kcl-lib/tests/kcl_samples/t-slot-rail/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/t-slot-rail/ast.snap @@ -384,13 +384,13 @@ description: Result of parsing t-slot-rail.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "45", + "raw": "45deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 45.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -453,13 +453,13 @@ description: Result of parsing t-slot-rail.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "45", + "raw": "45deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 45.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -522,13 +522,13 @@ description: Result of parsing t-slot-rail.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "135", + "raw": "135deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 135.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -707,13 +707,13 @@ description: Result of parsing t-slot-rail.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -839,13 +839,13 @@ description: Result of parsing t-slot-rail.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -996,13 +996,13 @@ description: Result of parsing t-slot-rail.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -1146,13 +1146,13 @@ description: Result of parsing t-slot-rail.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "180", + "raw": "180deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, - "suffix": "None" + "suffix": "Deg" } } }, diff --git a/rust/kcl-lib/tests/kcl_samples/wing-spar/ast.snap b/rust/kcl-lib/tests/kcl_samples/wing-spar/ast.snap index 97b202cc06..ba1456e3fc 100644 --- a/rust/kcl-lib/tests/kcl_samples/wing-spar/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/wing-spar/ast.snap @@ -782,13 +782,13 @@ description: Result of parsing wing-spar.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "76", + "raw": "76deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 76.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -2311,13 +2311,13 @@ description: Result of parsing wing-spar.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -2481,13 +2481,13 @@ description: Result of parsing wing-spar.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -2659,13 +2659,13 @@ description: Result of parsing wing-spar.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -2960,13 +2960,13 @@ description: Result of parsing wing-spar.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -3106,13 +3106,13 @@ description: Result of parsing wing-spar.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -3260,13 +3260,13 @@ description: Result of parsing wing-spar.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -3875,13 +3875,13 @@ description: Result of parsing wing-spar.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -4045,13 +4045,13 @@ description: Result of parsing wing-spar.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -4215,13 +4215,13 @@ description: Result of parsing wing-spar.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -4510,13 +4510,13 @@ description: Result of parsing wing-spar.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -4664,13 +4664,13 @@ description: Result of parsing wing-spar.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -4818,13 +4818,13 @@ description: Result of parsing wing-spar.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -5517,13 +5517,13 @@ description: Result of parsing wing-spar.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -5779,13 +5779,13 @@ description: Result of parsing wing-spar.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -5937,13 +5937,13 @@ description: Result of parsing wing-spar.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -6834,13 +6834,13 @@ description: Result of parsing wing-spar.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -6992,13 +6992,13 @@ description: Result of parsing wing-spar.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -7150,13 +7150,13 @@ description: Result of parsing wing-spar.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, diff --git a/rust/kcl-lib/tests/kcl_samples/wing-spar/program_memory.snap b/rust/kcl-lib/tests/kcl_samples/wing-spar/program_memory.snap index 6907123eb4..f76f28c436 100644 --- a/rust/kcl-lib/tests/kcl_samples/wing-spar/program_memory.snap +++ b/rust/kcl-lib/tests/kcl_samples/wing-spar/program_memory.snap @@ -57,9 +57,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4188, - "end": 4194, - "start": 4188, + "commentStart": 4227, + "end": 4233, + "start": 4227, "type": "TagDeclarator", "value": "seg11" }, @@ -77,9 +77,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4328, - "end": 4334, - "start": 4328, + "commentStart": 4370, + "end": 4376, + "start": 4370, "type": "TagDeclarator", "value": "seg12" }, @@ -135,9 +135,9 @@ description: Variables in memory after executing wing-spar.kcl -24.0 ], "tag": { - "commentStart": 4188, - "end": 4194, - "start": 4188, + "commentStart": 4227, + "end": 4233, + "start": 4227, "type": "TagDeclarator", "value": "seg11" }, @@ -184,9 +184,9 @@ description: Variables in memory after executing wing-spar.kcl -29.0 ], "tag": { - "commentStart": 4328, - "end": 4334, - "start": 4328, + "commentStart": 4370, + "end": 4376, + "start": 4370, "type": "TagDeclarator", "value": "seg12" }, @@ -360,9 +360,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2102, - "end": 2108, - "start": 2102, + "commentStart": 2105, + "end": 2111, + "start": 2105, "type": "TagDeclarator", "value": "seg01" }, @@ -380,9 +380,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2216, - "end": 2222, - "start": 2216, + "commentStart": 2222, + "end": 2228, + "start": 2222, "type": "TagDeclarator", "value": "seg02" }, @@ -400,9 +400,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2331, - "end": 2337, - "start": 2331, + "commentStart": 2340, + "end": 2346, + "start": 2340, "type": "TagDeclarator", "value": "seg03" }, @@ -420,9 +420,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2446, - "end": 2452, - "start": 2446, + "commentStart": 2458, + "end": 2464, + "start": 2458, "type": "TagDeclarator", "value": "seg04" }, @@ -482,9 +482,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2809, - "end": 2815, - "start": 2809, + "commentStart": 2830, + "end": 2836, + "start": 2830, "type": "TagDeclarator", "value": "seg10" }, @@ -512,9 +512,9 @@ description: Variables in memory after executing wing-spar.kcl -15.299999999999999 ], "tag": { - "commentStart": 2102, - "end": 2108, - "start": 2102, + "commentStart": 2105, + "end": 2111, + "start": 2105, "type": "TagDeclarator", "value": "seg01" }, @@ -561,9 +561,9 @@ description: Variables in memory after executing wing-spar.kcl 34.204 ], "tag": { - "commentStart": 2216, - "end": 2222, - "start": 2216, + "commentStart": 2222, + "end": 2228, + "start": 2222, "type": "TagDeclarator", "value": "seg02" }, @@ -610,9 +610,9 @@ description: Variables in memory after executing wing-spar.kcl 30.0 ], "tag": { - "commentStart": 2331, - "end": 2337, - "start": 2331, + "commentStart": 2340, + "end": 2346, + "start": 2340, "type": "TagDeclarator", "value": "seg03" }, @@ -659,9 +659,9 @@ description: Variables in memory after executing wing-spar.kcl 21.796 ], "tag": { - "commentStart": 2446, - "end": 2452, - "start": 2446, + "commentStart": 2458, + "end": 2464, + "start": 2458, "type": "TagDeclarator", "value": "seg04" }, @@ -832,9 +832,9 @@ description: Variables in memory after executing wing-spar.kcl 29.999999999999996 ], "tag": { - "commentStart": 2809, - "end": 2815, - "start": 2809, + "commentStart": 2830, + "end": 2836, + "start": 2830, "type": "TagDeclarator", "value": "seg10" }, @@ -1029,9 +1029,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4188, - "end": 4194, - "start": 4188, + "commentStart": 4227, + "end": 4233, + "start": 4227, "type": "TagDeclarator", "value": "seg11" }, @@ -1049,9 +1049,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4328, - "end": 4334, - "start": 4328, + "commentStart": 4370, + "end": 4376, + "start": 4370, "type": "TagDeclarator", "value": "seg12" }, @@ -1107,9 +1107,9 @@ description: Variables in memory after executing wing-spar.kcl -24.0 ], "tag": { - "commentStart": 4188, - "end": 4194, - "start": 4188, + "commentStart": 4227, + "end": 4233, + "start": 4227, "type": "TagDeclarator", "value": "seg11" }, @@ -1156,9 +1156,9 @@ description: Variables in memory after executing wing-spar.kcl -29.0 ], "tag": { - "commentStart": 4328, - "end": 4334, - "start": 4328, + "commentStart": 4370, + "end": 4376, + "start": 4370, "type": "TagDeclarator", "value": "seg12" }, @@ -1332,9 +1332,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2102, - "end": 2108, - "start": 2102, + "commentStart": 2105, + "end": 2111, + "start": 2105, "type": "TagDeclarator", "value": "seg01" }, @@ -1352,9 +1352,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2216, - "end": 2222, - "start": 2216, + "commentStart": 2222, + "end": 2228, + "start": 2222, "type": "TagDeclarator", "value": "seg02" }, @@ -1372,9 +1372,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2331, - "end": 2337, - "start": 2331, + "commentStart": 2340, + "end": 2346, + "start": 2340, "type": "TagDeclarator", "value": "seg03" }, @@ -1392,9 +1392,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2446, - "end": 2452, - "start": 2446, + "commentStart": 2458, + "end": 2464, + "start": 2458, "type": "TagDeclarator", "value": "seg04" }, @@ -1454,9 +1454,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2809, - "end": 2815, - "start": 2809, + "commentStart": 2830, + "end": 2836, + "start": 2830, "type": "TagDeclarator", "value": "seg10" }, @@ -1484,9 +1484,9 @@ description: Variables in memory after executing wing-spar.kcl -15.299999999999999 ], "tag": { - "commentStart": 2102, - "end": 2108, - "start": 2102, + "commentStart": 2105, + "end": 2111, + "start": 2105, "type": "TagDeclarator", "value": "seg01" }, @@ -1533,9 +1533,9 @@ description: Variables in memory after executing wing-spar.kcl 34.204 ], "tag": { - "commentStart": 2216, - "end": 2222, - "start": 2216, + "commentStart": 2222, + "end": 2228, + "start": 2222, "type": "TagDeclarator", "value": "seg02" }, @@ -1582,9 +1582,9 @@ description: Variables in memory after executing wing-spar.kcl 30.0 ], "tag": { - "commentStart": 2331, - "end": 2337, - "start": 2331, + "commentStart": 2340, + "end": 2346, + "start": 2340, "type": "TagDeclarator", "value": "seg03" }, @@ -1631,9 +1631,9 @@ description: Variables in memory after executing wing-spar.kcl 21.796 ], "tag": { - "commentStart": 2446, - "end": 2452, - "start": 2446, + "commentStart": 2458, + "end": 2464, + "start": 2458, "type": "TagDeclarator", "value": "seg04" }, @@ -1804,9 +1804,9 @@ description: Variables in memory after executing wing-spar.kcl 29.999999999999996 ], "tag": { - "commentStart": 2809, - "end": 2815, - "start": 2809, + "commentStart": 2830, + "end": 2836, + "start": 2830, "type": "TagDeclarator", "value": "seg10" }, @@ -2001,9 +2001,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4188, - "end": 4194, - "start": 4188, + "commentStart": 4227, + "end": 4233, + "start": 4227, "type": "TagDeclarator", "value": "seg11" }, @@ -2021,9 +2021,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4328, - "end": 4334, - "start": 4328, + "commentStart": 4370, + "end": 4376, + "start": 4370, "type": "TagDeclarator", "value": "seg12" }, @@ -2079,9 +2079,9 @@ description: Variables in memory after executing wing-spar.kcl -24.0 ], "tag": { - "commentStart": 4188, - "end": 4194, - "start": 4188, + "commentStart": 4227, + "end": 4233, + "start": 4227, "type": "TagDeclarator", "value": "seg11" }, @@ -2128,9 +2128,9 @@ description: Variables in memory after executing wing-spar.kcl -29.0 ], "tag": { - "commentStart": 4328, - "end": 4334, - "start": 4328, + "commentStart": 4370, + "end": 4376, + "start": 4370, "type": "TagDeclarator", "value": "seg12" }, @@ -2304,9 +2304,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2102, - "end": 2108, - "start": 2102, + "commentStart": 2105, + "end": 2111, + "start": 2105, "type": "TagDeclarator", "value": "seg01" }, @@ -2324,9 +2324,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2216, - "end": 2222, - "start": 2216, + "commentStart": 2222, + "end": 2228, + "start": 2222, "type": "TagDeclarator", "value": "seg02" }, @@ -2344,9 +2344,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2331, - "end": 2337, - "start": 2331, + "commentStart": 2340, + "end": 2346, + "start": 2340, "type": "TagDeclarator", "value": "seg03" }, @@ -2364,9 +2364,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2446, - "end": 2452, - "start": 2446, + "commentStart": 2458, + "end": 2464, + "start": 2458, "type": "TagDeclarator", "value": "seg04" }, @@ -2426,9 +2426,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2809, - "end": 2815, - "start": 2809, + "commentStart": 2830, + "end": 2836, + "start": 2830, "type": "TagDeclarator", "value": "seg10" }, @@ -2456,9 +2456,9 @@ description: Variables in memory after executing wing-spar.kcl -15.299999999999999 ], "tag": { - "commentStart": 2102, - "end": 2108, - "start": 2102, + "commentStart": 2105, + "end": 2111, + "start": 2105, "type": "TagDeclarator", "value": "seg01" }, @@ -2505,9 +2505,9 @@ description: Variables in memory after executing wing-spar.kcl 34.204 ], "tag": { - "commentStart": 2216, - "end": 2222, - "start": 2216, + "commentStart": 2222, + "end": 2228, + "start": 2222, "type": "TagDeclarator", "value": "seg02" }, @@ -2554,9 +2554,9 @@ description: Variables in memory after executing wing-spar.kcl 30.0 ], "tag": { - "commentStart": 2331, - "end": 2337, - "start": 2331, + "commentStart": 2340, + "end": 2346, + "start": 2340, "type": "TagDeclarator", "value": "seg03" }, @@ -2603,9 +2603,9 @@ description: Variables in memory after executing wing-spar.kcl 21.796 ], "tag": { - "commentStart": 2446, - "end": 2452, - "start": 2446, + "commentStart": 2458, + "end": 2464, + "start": 2458, "type": "TagDeclarator", "value": "seg04" }, @@ -2776,9 +2776,9 @@ description: Variables in memory after executing wing-spar.kcl 29.999999999999996 ], "tag": { - "commentStart": 2809, - "end": 2815, - "start": 2809, + "commentStart": 2830, + "end": 2836, + "start": 2830, "type": "TagDeclarator", "value": "seg10" }, @@ -2973,9 +2973,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4188, - "end": 4194, - "start": 4188, + "commentStart": 4227, + "end": 4233, + "start": 4227, "type": "TagDeclarator", "value": "seg11" }, @@ -2993,9 +2993,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4328, - "end": 4334, - "start": 4328, + "commentStart": 4370, + "end": 4376, + "start": 4370, "type": "TagDeclarator", "value": "seg12" }, @@ -3051,9 +3051,9 @@ description: Variables in memory after executing wing-spar.kcl -24.0 ], "tag": { - "commentStart": 4188, - "end": 4194, - "start": 4188, + "commentStart": 4227, + "end": 4233, + "start": 4227, "type": "TagDeclarator", "value": "seg11" }, @@ -3100,9 +3100,9 @@ description: Variables in memory after executing wing-spar.kcl -29.0 ], "tag": { - "commentStart": 4328, - "end": 4334, - "start": 4328, + "commentStart": 4370, + "end": 4376, + "start": 4370, "type": "TagDeclarator", "value": "seg12" }, @@ -3276,9 +3276,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2102, - "end": 2108, - "start": 2102, + "commentStart": 2105, + "end": 2111, + "start": 2105, "type": "TagDeclarator", "value": "seg01" }, @@ -3296,9 +3296,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2216, - "end": 2222, - "start": 2216, + "commentStart": 2222, + "end": 2228, + "start": 2222, "type": "TagDeclarator", "value": "seg02" }, @@ -3316,9 +3316,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2331, - "end": 2337, - "start": 2331, + "commentStart": 2340, + "end": 2346, + "start": 2340, "type": "TagDeclarator", "value": "seg03" }, @@ -3336,9 +3336,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2446, - "end": 2452, - "start": 2446, + "commentStart": 2458, + "end": 2464, + "start": 2458, "type": "TagDeclarator", "value": "seg04" }, @@ -3398,9 +3398,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2809, - "end": 2815, - "start": 2809, + "commentStart": 2830, + "end": 2836, + "start": 2830, "type": "TagDeclarator", "value": "seg10" }, @@ -3428,9 +3428,9 @@ description: Variables in memory after executing wing-spar.kcl -15.299999999999999 ], "tag": { - "commentStart": 2102, - "end": 2108, - "start": 2102, + "commentStart": 2105, + "end": 2111, + "start": 2105, "type": "TagDeclarator", "value": "seg01" }, @@ -3477,9 +3477,9 @@ description: Variables in memory after executing wing-spar.kcl 34.204 ], "tag": { - "commentStart": 2216, - "end": 2222, - "start": 2216, + "commentStart": 2222, + "end": 2228, + "start": 2222, "type": "TagDeclarator", "value": "seg02" }, @@ -3526,9 +3526,9 @@ description: Variables in memory after executing wing-spar.kcl 30.0 ], "tag": { - "commentStart": 2331, - "end": 2337, - "start": 2331, + "commentStart": 2340, + "end": 2346, + "start": 2340, "type": "TagDeclarator", "value": "seg03" }, @@ -3575,9 +3575,9 @@ description: Variables in memory after executing wing-spar.kcl 21.796 ], "tag": { - "commentStart": 2446, - "end": 2452, - "start": 2446, + "commentStart": 2458, + "end": 2464, + "start": 2458, "type": "TagDeclarator", "value": "seg04" }, @@ -3748,9 +3748,9 @@ description: Variables in memory after executing wing-spar.kcl 29.999999999999996 ], "tag": { - "commentStart": 2809, - "end": 2815, - "start": 2809, + "commentStart": 2830, + "end": 2836, + "start": 2830, "type": "TagDeclarator", "value": "seg10" }, @@ -3947,9 +3947,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2102, - "end": 2108, - "start": 2102, + "commentStart": 2105, + "end": 2111, + "start": 2105, "type": "TagDeclarator", "value": "seg01" }, @@ -3967,9 +3967,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2216, - "end": 2222, - "start": 2216, + "commentStart": 2222, + "end": 2228, + "start": 2222, "type": "TagDeclarator", "value": "seg02" }, @@ -3987,9 +3987,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2331, - "end": 2337, - "start": 2331, + "commentStart": 2340, + "end": 2346, + "start": 2340, "type": "TagDeclarator", "value": "seg03" }, @@ -4007,9 +4007,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2446, - "end": 2452, - "start": 2446, + "commentStart": 2458, + "end": 2464, + "start": 2458, "type": "TagDeclarator", "value": "seg04" }, @@ -4069,9 +4069,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2809, - "end": 2815, - "start": 2809, + "commentStart": 2830, + "end": 2836, + "start": 2830, "type": "TagDeclarator", "value": "seg10" }, @@ -4099,9 +4099,9 @@ description: Variables in memory after executing wing-spar.kcl -15.299999999999999 ], "tag": { - "commentStart": 2102, - "end": 2108, - "start": 2102, + "commentStart": 2105, + "end": 2111, + "start": 2105, "type": "TagDeclarator", "value": "seg01" }, @@ -4148,9 +4148,9 @@ description: Variables in memory after executing wing-spar.kcl 34.204 ], "tag": { - "commentStart": 2216, - "end": 2222, - "start": 2216, + "commentStart": 2222, + "end": 2228, + "start": 2222, "type": "TagDeclarator", "value": "seg02" }, @@ -4197,9 +4197,9 @@ description: Variables in memory after executing wing-spar.kcl 30.0 ], "tag": { - "commentStart": 2331, - "end": 2337, - "start": 2331, + "commentStart": 2340, + "end": 2346, + "start": 2340, "type": "TagDeclarator", "value": "seg03" }, @@ -4246,9 +4246,9 @@ description: Variables in memory after executing wing-spar.kcl 21.796 ], "tag": { - "commentStart": 2446, - "end": 2452, - "start": 2446, + "commentStart": 2458, + "end": 2464, + "start": 2458, "type": "TagDeclarator", "value": "seg04" }, @@ -4419,9 +4419,9 @@ description: Variables in memory after executing wing-spar.kcl 29.999999999999996 ], "tag": { - "commentStart": 2809, - "end": 2815, - "start": 2809, + "commentStart": 2830, + "end": 2836, + "start": 2830, "type": "TagDeclarator", "value": "seg10" }, @@ -4612,9 +4612,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4950, - "end": 4956, - "start": 4950, + "commentStart": 4998, + "end": 5004, + "start": 4998, "type": "TagDeclarator", "value": "seg14" }, @@ -4684,9 +4684,9 @@ description: Variables in memory after executing wing-spar.kcl -24.0 ], "tag": { - "commentStart": 4950, - "end": 4956, - "start": 4950, + "commentStart": 4998, + "end": 5004, + "start": 4998, "type": "TagDeclarator", "value": "seg14" }, @@ -4903,9 +4903,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3122, - "end": 3128, - "start": 3122, + "commentStart": 3143, + "end": 3149, + "start": 3143, "type": "TagDeclarator", "value": "seg05" }, @@ -4923,9 +4923,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3236, - "end": 3242, - "start": 3236, + "commentStart": 3260, + "end": 3266, + "start": 3260, "type": "TagDeclarator", "value": "seg06" }, @@ -4943,9 +4943,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3350, - "end": 3356, - "start": 3350, + "commentStart": 3377, + "end": 3383, + "start": 3377, "type": "TagDeclarator", "value": "seg07" }, @@ -4963,9 +4963,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3463, - "end": 3469, - "start": 3463, + "commentStart": 3493, + "end": 3499, + "start": 3493, "type": "TagDeclarator", "value": "seg08" }, @@ -5025,9 +5025,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3829, - "end": 3835, - "start": 3829, + "commentStart": 3868, + "end": 3874, + "start": 3868, "type": "TagDeclarator", "value": "seg09" }, @@ -5055,9 +5055,9 @@ description: Variables in memory after executing wing-spar.kcl -12.6 ], "tag": { - "commentStart": 3122, - "end": 3128, - "start": 3122, + "commentStart": 3143, + "end": 3149, + "start": 3143, "type": "TagDeclarator", "value": "seg05" }, @@ -5104,9 +5104,9 @@ description: Variables in memory after executing wing-spar.kcl 25.204 ], "tag": { - "commentStart": 3236, - "end": 3242, - "start": 3236, + "commentStart": 3260, + "end": 3266, + "start": 3260, "type": "TagDeclarator", "value": "seg06" }, @@ -5153,9 +5153,9 @@ description: Variables in memory after executing wing-spar.kcl 21.0 ], "tag": { - "commentStart": 3350, - "end": 3356, - "start": 3350, + "commentStart": 3377, + "end": 3383, + "start": 3377, "type": "TagDeclarator", "value": "seg07" }, @@ -5202,9 +5202,9 @@ description: Variables in memory after executing wing-spar.kcl 12.796 ], "tag": { - "commentStart": 3463, - "end": 3469, - "start": 3463, + "commentStart": 3493, + "end": 3499, + "start": 3493, "type": "TagDeclarator", "value": "seg08" }, @@ -5375,9 +5375,9 @@ description: Variables in memory after executing wing-spar.kcl 21.0 ], "tag": { - "commentStart": 3829, - "end": 3835, - "start": 3829, + "commentStart": 3868, + "end": 3874, + "start": 3868, "type": "TagDeclarator", "value": "seg09" }, @@ -5568,9 +5568,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4950, - "end": 4956, - "start": 4950, + "commentStart": 4998, + "end": 5004, + "start": 4998, "type": "TagDeclarator", "value": "seg14" }, @@ -5640,9 +5640,9 @@ description: Variables in memory after executing wing-spar.kcl -24.0 ], "tag": { - "commentStart": 4950, - "end": 4956, - "start": 4950, + "commentStart": 4998, + "end": 5004, + "start": 4998, "type": "TagDeclarator", "value": "seg14" }, @@ -5859,9 +5859,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3122, - "end": 3128, - "start": 3122, + "commentStart": 3143, + "end": 3149, + "start": 3143, "type": "TagDeclarator", "value": "seg05" }, @@ -5879,9 +5879,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3236, - "end": 3242, - "start": 3236, + "commentStart": 3260, + "end": 3266, + "start": 3260, "type": "TagDeclarator", "value": "seg06" }, @@ -5899,9 +5899,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3350, - "end": 3356, - "start": 3350, + "commentStart": 3377, + "end": 3383, + "start": 3377, "type": "TagDeclarator", "value": "seg07" }, @@ -5919,9 +5919,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3463, - "end": 3469, - "start": 3463, + "commentStart": 3493, + "end": 3499, + "start": 3493, "type": "TagDeclarator", "value": "seg08" }, @@ -5981,9 +5981,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3829, - "end": 3835, - "start": 3829, + "commentStart": 3868, + "end": 3874, + "start": 3868, "type": "TagDeclarator", "value": "seg09" }, @@ -6011,9 +6011,9 @@ description: Variables in memory after executing wing-spar.kcl -12.6 ], "tag": { - "commentStart": 3122, - "end": 3128, - "start": 3122, + "commentStart": 3143, + "end": 3149, + "start": 3143, "type": "TagDeclarator", "value": "seg05" }, @@ -6060,9 +6060,9 @@ description: Variables in memory after executing wing-spar.kcl 25.204 ], "tag": { - "commentStart": 3236, - "end": 3242, - "start": 3236, + "commentStart": 3260, + "end": 3266, + "start": 3260, "type": "TagDeclarator", "value": "seg06" }, @@ -6109,9 +6109,9 @@ description: Variables in memory after executing wing-spar.kcl 21.0 ], "tag": { - "commentStart": 3350, - "end": 3356, - "start": 3350, + "commentStart": 3377, + "end": 3383, + "start": 3377, "type": "TagDeclarator", "value": "seg07" }, @@ -6158,9 +6158,9 @@ description: Variables in memory after executing wing-spar.kcl 12.796 ], "tag": { - "commentStart": 3463, - "end": 3469, - "start": 3463, + "commentStart": 3493, + "end": 3499, + "start": 3493, "type": "TagDeclarator", "value": "seg08" }, @@ -6331,9 +6331,9 @@ description: Variables in memory after executing wing-spar.kcl 21.0 ], "tag": { - "commentStart": 3829, - "end": 3835, - "start": 3829, + "commentStart": 3868, + "end": 3874, + "start": 3868, "type": "TagDeclarator", "value": "seg09" }, @@ -6524,9 +6524,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4950, - "end": 4956, - "start": 4950, + "commentStart": 4998, + "end": 5004, + "start": 4998, "type": "TagDeclarator", "value": "seg14" }, @@ -6596,9 +6596,9 @@ description: Variables in memory after executing wing-spar.kcl -24.0 ], "tag": { - "commentStart": 4950, - "end": 4956, - "start": 4950, + "commentStart": 4998, + "end": 5004, + "start": 4998, "type": "TagDeclarator", "value": "seg14" }, @@ -6815,9 +6815,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3122, - "end": 3128, - "start": 3122, + "commentStart": 3143, + "end": 3149, + "start": 3143, "type": "TagDeclarator", "value": "seg05" }, @@ -6835,9 +6835,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3236, - "end": 3242, - "start": 3236, + "commentStart": 3260, + "end": 3266, + "start": 3260, "type": "TagDeclarator", "value": "seg06" }, @@ -6855,9 +6855,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3350, - "end": 3356, - "start": 3350, + "commentStart": 3377, + "end": 3383, + "start": 3377, "type": "TagDeclarator", "value": "seg07" }, @@ -6875,9 +6875,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3463, - "end": 3469, - "start": 3463, + "commentStart": 3493, + "end": 3499, + "start": 3493, "type": "TagDeclarator", "value": "seg08" }, @@ -6937,9 +6937,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3829, - "end": 3835, - "start": 3829, + "commentStart": 3868, + "end": 3874, + "start": 3868, "type": "TagDeclarator", "value": "seg09" }, @@ -6967,9 +6967,9 @@ description: Variables in memory after executing wing-spar.kcl -12.6 ], "tag": { - "commentStart": 3122, - "end": 3128, - "start": 3122, + "commentStart": 3143, + "end": 3149, + "start": 3143, "type": "TagDeclarator", "value": "seg05" }, @@ -7016,9 +7016,9 @@ description: Variables in memory after executing wing-spar.kcl 25.204 ], "tag": { - "commentStart": 3236, - "end": 3242, - "start": 3236, + "commentStart": 3260, + "end": 3266, + "start": 3260, "type": "TagDeclarator", "value": "seg06" }, @@ -7065,9 +7065,9 @@ description: Variables in memory after executing wing-spar.kcl 21.0 ], "tag": { - "commentStart": 3350, - "end": 3356, - "start": 3350, + "commentStart": 3377, + "end": 3383, + "start": 3377, "type": "TagDeclarator", "value": "seg07" }, @@ -7114,9 +7114,9 @@ description: Variables in memory after executing wing-spar.kcl 12.796 ], "tag": { - "commentStart": 3463, - "end": 3469, - "start": 3463, + "commentStart": 3493, + "end": 3499, + "start": 3493, "type": "TagDeclarator", "value": "seg08" }, @@ -7287,9 +7287,9 @@ description: Variables in memory after executing wing-spar.kcl 21.0 ], "tag": { - "commentStart": 3829, - "end": 3835, - "start": 3829, + "commentStart": 3868, + "end": 3874, + "start": 3868, "type": "TagDeclarator", "value": "seg09" }, @@ -7480,9 +7480,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 4950, - "end": 4956, - "start": 4950, + "commentStart": 4998, + "end": 5004, + "start": 4998, "type": "TagDeclarator", "value": "seg14" }, @@ -7552,9 +7552,9 @@ description: Variables in memory after executing wing-spar.kcl -24.0 ], "tag": { - "commentStart": 4950, - "end": 4956, - "start": 4950, + "commentStart": 4998, + "end": 5004, + "start": 4998, "type": "TagDeclarator", "value": "seg14" }, @@ -7771,9 +7771,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3122, - "end": 3128, - "start": 3122, + "commentStart": 3143, + "end": 3149, + "start": 3143, "type": "TagDeclarator", "value": "seg05" }, @@ -7791,9 +7791,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3236, - "end": 3242, - "start": 3236, + "commentStart": 3260, + "end": 3266, + "start": 3260, "type": "TagDeclarator", "value": "seg06" }, @@ -7811,9 +7811,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3350, - "end": 3356, - "start": 3350, + "commentStart": 3377, + "end": 3383, + "start": 3377, "type": "TagDeclarator", "value": "seg07" }, @@ -7831,9 +7831,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3463, - "end": 3469, - "start": 3463, + "commentStart": 3493, + "end": 3499, + "start": 3493, "type": "TagDeclarator", "value": "seg08" }, @@ -7893,9 +7893,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3829, - "end": 3835, - "start": 3829, + "commentStart": 3868, + "end": 3874, + "start": 3868, "type": "TagDeclarator", "value": "seg09" }, @@ -7923,9 +7923,9 @@ description: Variables in memory after executing wing-spar.kcl -12.6 ], "tag": { - "commentStart": 3122, - "end": 3128, - "start": 3122, + "commentStart": 3143, + "end": 3149, + "start": 3143, "type": "TagDeclarator", "value": "seg05" }, @@ -7972,9 +7972,9 @@ description: Variables in memory after executing wing-spar.kcl 25.204 ], "tag": { - "commentStart": 3236, - "end": 3242, - "start": 3236, + "commentStart": 3260, + "end": 3266, + "start": 3260, "type": "TagDeclarator", "value": "seg06" }, @@ -8021,9 +8021,9 @@ description: Variables in memory after executing wing-spar.kcl 21.0 ], "tag": { - "commentStart": 3350, - "end": 3356, - "start": 3350, + "commentStart": 3377, + "end": 3383, + "start": 3377, "type": "TagDeclarator", "value": "seg07" }, @@ -8070,9 +8070,9 @@ description: Variables in memory after executing wing-spar.kcl 12.796 ], "tag": { - "commentStart": 3463, - "end": 3469, - "start": 3463, + "commentStart": 3493, + "end": 3499, + "start": 3493, "type": "TagDeclarator", "value": "seg08" }, @@ -8243,9 +8243,9 @@ description: Variables in memory after executing wing-spar.kcl 21.0 ], "tag": { - "commentStart": 3829, - "end": 3835, - "start": 3829, + "commentStart": 3868, + "end": 3874, + "start": 3868, "type": "TagDeclarator", "value": "seg09" }, @@ -8438,9 +8438,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3122, - "end": 3128, - "start": 3122, + "commentStart": 3143, + "end": 3149, + "start": 3143, "type": "TagDeclarator", "value": "seg05" }, @@ -8458,9 +8458,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3236, - "end": 3242, - "start": 3236, + "commentStart": 3260, + "end": 3266, + "start": 3260, "type": "TagDeclarator", "value": "seg06" }, @@ -8478,9 +8478,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3350, - "end": 3356, - "start": 3350, + "commentStart": 3377, + "end": 3383, + "start": 3377, "type": "TagDeclarator", "value": "seg07" }, @@ -8498,9 +8498,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3463, - "end": 3469, - "start": 3463, + "commentStart": 3493, + "end": 3499, + "start": 3493, "type": "TagDeclarator", "value": "seg08" }, @@ -8560,9 +8560,9 @@ description: Variables in memory after executing wing-spar.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 3829, - "end": 3835, - "start": 3829, + "commentStart": 3868, + "end": 3874, + "start": 3868, "type": "TagDeclarator", "value": "seg09" }, @@ -8590,9 +8590,9 @@ description: Variables in memory after executing wing-spar.kcl -12.6 ], "tag": { - "commentStart": 3122, - "end": 3128, - "start": 3122, + "commentStart": 3143, + "end": 3149, + "start": 3143, "type": "TagDeclarator", "value": "seg05" }, @@ -8639,9 +8639,9 @@ description: Variables in memory after executing wing-spar.kcl 25.204 ], "tag": { - "commentStart": 3236, - "end": 3242, - "start": 3236, + "commentStart": 3260, + "end": 3266, + "start": 3260, "type": "TagDeclarator", "value": "seg06" }, @@ -8688,9 +8688,9 @@ description: Variables in memory after executing wing-spar.kcl 21.0 ], "tag": { - "commentStart": 3350, - "end": 3356, - "start": 3350, + "commentStart": 3377, + "end": 3383, + "start": 3377, "type": "TagDeclarator", "value": "seg07" }, @@ -8737,9 +8737,9 @@ description: Variables in memory after executing wing-spar.kcl 12.796 ], "tag": { - "commentStart": 3463, - "end": 3469, - "start": 3463, + "commentStart": 3493, + "end": 3499, + "start": 3493, "type": "TagDeclarator", "value": "seg08" }, @@ -8910,9 +8910,9 @@ description: Variables in memory after executing wing-spar.kcl 21.0 ], "tag": { - "commentStart": 3829, - "end": 3835, - "start": 3829, + "commentStart": 3868, + "end": 3874, + "start": 3868, "type": "TagDeclarator", "value": "seg09" }, diff --git a/rust/kcl-lib/tests/loop_tag/artifact_graph_flowchart.snap.md b/rust/kcl-lib/tests/loop_tag/artifact_graph_flowchart.snap.md index b7755cb188..8da432c289 100644 --- a/rust/kcl-lib/tests/loop_tag/artifact_graph_flowchart.snap.md +++ b/rust/kcl-lib/tests/loop_tag/artifact_graph_flowchart.snap.md @@ -1,113 +1,113 @@ ```mermaid flowchart LR subgraph path2 [Path] - 2["Path
[733, 769, 0]"] + 2["Path
[736, 772, 0]"] %% [ProgramBodyItem { index: 5 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }] - 3["Segment
[923, 986, 0]"] + 3["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 4["Segment
[923, 986, 0]"] + 4["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 5["Segment
[923, 986, 0]"] + 5["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 6["Segment
[923, 986, 0]"] + 6["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 7["Segment
[923, 986, 0]"] + 7["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 8["Segment
[923, 986, 0]"] + 8["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 9["Segment
[923, 986, 0]"] + 9["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 10["Segment
[923, 986, 0]"] + 10["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 11["Segment
[923, 986, 0]"] + 11["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 12["Segment
[923, 986, 0]"] + 12["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 13["Segment
[923, 986, 0]"] + 13["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 14["Segment
[923, 986, 0]"] + 14["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 15["Segment
[923, 986, 0]"] + 15["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 16["Segment
[923, 986, 0]"] + 16["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 17["Segment
[923, 986, 0]"] + 17["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 18["Segment
[923, 986, 0]"] + 18["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 19["Segment
[923, 986, 0]"] + 19["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 20["Segment
[923, 986, 0]"] + 20["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 21["Segment
[923, 986, 0]"] + 21["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 22["Segment
[923, 986, 0]"] + 22["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 23["Segment
[923, 986, 0]"] + 23["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 24["Segment
[923, 986, 0]"] + 24["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 25["Segment
[923, 986, 0]"] + 25["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 26["Segment
[923, 986, 0]"] + 26["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 27["Segment
[923, 986, 0]"] + 27["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 28["Segment
[923, 986, 0]"] + 28["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 29["Segment
[923, 986, 0]"] + 29["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 30["Segment
[923, 986, 0]"] + 30["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 31["Segment
[923, 986, 0]"] + 31["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 32["Segment
[923, 986, 0]"] + 32["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 33["Segment
[923, 986, 0]"] + 33["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 34["Segment
[923, 986, 0]"] + 34["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 35["Segment
[923, 986, 0]"] + 35["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 36["Segment
[923, 986, 0]"] + 36["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 37["Segment
[923, 986, 0]"] + 37["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 38["Segment
[923, 986, 0]"] + 38["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 39["Segment
[923, 986, 0]"] + 39["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 40["Segment
[923, 986, 0]"] + 40["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 41["Segment
[923, 986, 0]"] + 41["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 42["Segment
[923, 986, 0]"] + 42["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 43["Segment
[923, 986, 0]"] + 43["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 44["Segment
[923, 986, 0]"] + 44["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 45["Segment
[923, 986, 0]"] + 45["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 46["Segment
[923, 986, 0]"] + 46["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 47["Segment
[923, 986, 0]"] + 47["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 48["Segment
[923, 986, 0]"] + 48["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 49["Segment
[923, 986, 0]"] + 49["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 50["Segment
[923, 986, 0]"] + 50["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 51["Segment
[923, 986, 0]"] + 51["Segment
[926, 989, 0]"] %% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 1 }, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, ReturnStatementArg] - 52["Segment
[1050, 1068, 0]"] + 52["Segment
[1053, 1071, 0]"] %% [ProgramBodyItem { index: 7 }, VariableDeclarationDeclaration, VariableDeclarationInit] 53[Solid2d] end - 1["Plane
[710, 727, 0]"] + 1["Plane
[713, 730, 0]"] %% [ProgramBodyItem { index: 5 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] - 54["Sweep Extrusion
[1122, 1160, 0]"] + 54["Sweep Extrusion
[1125, 1163, 0]"] %% [ProgramBodyItem { index: 8 }, VariableDeclarationDeclaration, VariableDeclarationInit] 55[Wall] %% face_code_ref=Missing NodePath diff --git a/rust/kcl-lib/tests/loop_tag/ast.snap b/rust/kcl-lib/tests/loop_tag/ast.snap index 1a893a3ce9..72debe325e 100644 --- a/rust/kcl-lib/tests/loop_tag/ast.snap +++ b/rust/kcl-lib/tests/loop_tag/ast.snap @@ -125,13 +125,13 @@ description: Result of parsing loop_tag.kcl "left": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } }, "operator": "/", diff --git a/rust/kcl-lib/tests/loop_tag/input.kcl b/rust/kcl-lib/tests/loop_tag/input.kcl index e86bf8abbd..0ad68c062c 100644 --- a/rust/kcl-lib/tests/loop_tag/input.kcl +++ b/rust/kcl-lib/tests/loop_tag/input.kcl @@ -9,7 +9,7 @@ radius = 10 height = 50 numSides = 50 -angleIncrement = 360 / numSides +angleIncrement = 360deg / numSides // Function to calculate the coordinates of a point on the circle fn calculatePoint(@index) { diff --git a/rust/kcl-lib/tests/loop_tag/ops.snap b/rust/kcl-lib/tests/loop_tag/ops.snap index d2d34b1674..0b74c4031b 100644 --- a/rust/kcl-lib/tests/loop_tag/ops.snap +++ b/rust/kcl-lib/tests/loop_tag/ops.snap @@ -110,13 +110,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 7.2, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -222,13 +218,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 0.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -471,13 +463,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 7.2, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -723,13 +711,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 14.4, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -975,13 +959,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 21.6, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -1227,13 +1207,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 28.8, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -1479,13 +1455,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 36.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -1731,13 +1703,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 43.2, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -1983,13 +1951,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 50.4, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -2235,13 +2199,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 57.6, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -2487,13 +2447,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 64.8, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -2739,13 +2695,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 72.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -2991,13 +2943,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 79.2, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -3243,13 +3191,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 86.4, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -3495,13 +3439,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 93.60000000000001, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -3747,13 +3687,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 100.8, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -3999,13 +3935,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 108.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -4251,13 +4183,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 115.2, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -4503,13 +4431,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 122.4, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -4755,13 +4679,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 129.6, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -5007,13 +4927,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 136.8, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -5259,13 +5175,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 144.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -5511,13 +5423,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 151.20000000000002, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -5763,13 +5671,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 158.4, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -6015,13 +5919,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 165.6, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -6267,13 +6167,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 172.8, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -6519,13 +6415,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 180.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -6771,13 +6663,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 187.20000000000002, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -7023,13 +6911,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 194.4, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -7275,13 +7159,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 201.6, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -7527,13 +7407,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 208.8, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -7779,13 +7655,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 216.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -8031,13 +7903,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 223.20000000000002, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -8283,13 +8151,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 230.4, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -8535,13 +8399,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 237.6, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -8787,13 +8647,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 244.8, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -9039,13 +8895,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 252.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -9291,13 +9143,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 259.2, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -9543,13 +9391,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 266.40000000000003, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -9795,13 +9639,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 273.6, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -10047,13 +9887,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 280.8, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -10299,13 +10135,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 288.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -10551,13 +10383,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 295.2, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -10803,13 +10631,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 302.40000000000003, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -11055,13 +10879,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 309.6, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -11307,13 +11127,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 316.8, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -11559,13 +11375,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 324.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -11811,13 +11623,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 331.2, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -12063,13 +11871,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 338.40000000000003, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -12315,13 +12119,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 345.6, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -12567,13 +12367,9 @@ description: Operations executed loop_tag.kcl "type": "Number", "value": 352.8, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", diff --git a/rust/kcl-lib/tests/loop_tag/program_memory.snap b/rust/kcl-lib/tests/loop_tag/program_memory.snap index a9ba234e42..6ec6f4238d 100644 --- a/rust/kcl-lib/tests/loop_tag/program_memory.snap +++ b/rust/kcl-lib/tests/loop_tag/program_memory.snap @@ -7,13 +7,9 @@ description: Variables in memory after executing loop_tag.kcl "type": "Number", "value": 7.2, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "calculatePoint": { @@ -36,9 +32,9 @@ description: Variables in memory after executing loop_tag.kcl 0.0 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -61,9 +57,9 @@ description: Variables in memory after executing loop_tag.kcl 1.2533323356430426 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -86,9 +82,9 @@ description: Variables in memory after executing loop_tag.kcl 3.7402312072915906 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -111,9 +107,9 @@ description: Variables in memory after executing loop_tag.kcl 7.42147673413837 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -136,9 +132,9 @@ description: Variables in memory after executing loop_tag.kcl 12.239013475155524 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -161,9 +157,9 @@ description: Variables in memory after executing loop_tag.kcl 18.116865998080257 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -186,9 +182,9 @@ description: Variables in memory after executing loop_tag.kcl 24.962337057367144 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -211,9 +207,9 @@ description: Variables in memory after executing loop_tag.kcl 32.66746948512503 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -236,9 +232,9 @@ description: Variables in memory after executing loop_tag.kcl 41.11074874014518 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -261,9 +257,9 @@ description: Variables in memory after executing loop_tag.kcl 50.15901926480538 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -286,9 +282,9 @@ description: Variables in memory after executing loop_tag.kcl 59.66958442775692 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -311,9 +307,9 @@ description: Variables in memory after executing loop_tag.kcl 69.4924569350438 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -336,9 +332,9 @@ description: Variables in memory after executing loop_tag.kcl 79.47272421932652 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -361,9 +357,9 @@ description: Variables in memory after executing loop_tag.kcl 89.45299150360924 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -386,9 +382,9 @@ description: Variables in memory after executing loop_tag.kcl 99.27586401089613 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -411,9 +407,9 @@ description: Variables in memory after executing loop_tag.kcl 108.78642917384767 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -436,9 +432,9 @@ description: Variables in memory after executing loop_tag.kcl 117.83469969850786 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -461,9 +457,9 @@ description: Variables in memory after executing loop_tag.kcl 126.277978953528 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -486,9 +482,9 @@ description: Variables in memory after executing loop_tag.kcl 133.9831113812859 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -511,9 +507,9 @@ description: Variables in memory after executing loop_tag.kcl 140.8285824405728 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -536,9 +532,9 @@ description: Variables in memory after executing loop_tag.kcl 146.70643496349754 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -561,9 +557,9 @@ description: Variables in memory after executing loop_tag.kcl 151.5239717045147 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -586,9 +582,9 @@ description: Variables in memory after executing loop_tag.kcl 155.2052172313615 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -611,9 +607,9 @@ description: Variables in memory after executing loop_tag.kcl 157.69211610301005 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -636,9 +632,9 @@ description: Variables in memory after executing loop_tag.kcl 158.9454484386531 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -661,9 +657,9 @@ description: Variables in memory after executing loop_tag.kcl 158.9454484386531 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -686,9 +682,9 @@ description: Variables in memory after executing loop_tag.kcl 157.69211610301005 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -711,9 +707,9 @@ description: Variables in memory after executing loop_tag.kcl 155.2052172313615 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -736,9 +732,9 @@ description: Variables in memory after executing loop_tag.kcl 151.52397170451474 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -761,9 +757,9 @@ description: Variables in memory after executing loop_tag.kcl 146.70643496349757 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -786,9 +782,9 @@ description: Variables in memory after executing loop_tag.kcl 140.82858244057283 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -811,9 +807,9 @@ description: Variables in memory after executing loop_tag.kcl 133.98311138128594 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -836,9 +832,9 @@ description: Variables in memory after executing loop_tag.kcl 126.27797895352805 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -861,9 +857,9 @@ description: Variables in memory after executing loop_tag.kcl 117.83469969850789 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -886,9 +882,9 @@ description: Variables in memory after executing loop_tag.kcl 108.7864291738477 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -911,9 +907,9 @@ description: Variables in memory after executing loop_tag.kcl 99.27586401089616 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -936,9 +932,9 @@ description: Variables in memory after executing loop_tag.kcl 89.45299150360927 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -961,9 +957,9 @@ description: Variables in memory after executing loop_tag.kcl 79.47272421932655 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -986,9 +982,9 @@ description: Variables in memory after executing loop_tag.kcl 69.49245693504383 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1011,9 +1007,9 @@ description: Variables in memory after executing loop_tag.kcl 59.669584427756945 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1036,9 +1032,9 @@ description: Variables in memory after executing loop_tag.kcl 50.15901926480541 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1061,9 +1057,9 @@ description: Variables in memory after executing loop_tag.kcl 41.11074874014521 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1086,9 +1082,9 @@ description: Variables in memory after executing loop_tag.kcl 32.66746948512506 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1111,9 +1107,9 @@ description: Variables in memory after executing loop_tag.kcl 24.962337057367172 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1136,9 +1132,9 @@ description: Variables in memory after executing loop_tag.kcl 18.116865998080282 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1161,9 +1157,9 @@ description: Variables in memory after executing loop_tag.kcl 12.239013475155549 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1186,9 +1182,9 @@ description: Variables in memory after executing loop_tag.kcl 7.421476734138388 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1211,9 +1207,9 @@ description: Variables in memory after executing loop_tag.kcl 3.740231207291609 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1236,9 +1232,9 @@ description: Variables in memory after executing loop_tag.kcl 1.253332335643064 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1344,9 +1340,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1357,9 +1353,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1370,9 +1366,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1383,9 +1379,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1396,9 +1392,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1409,9 +1405,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1422,9 +1418,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1435,9 +1431,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1448,9 +1444,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1461,9 +1457,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1474,9 +1470,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1487,9 +1483,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1500,9 +1496,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1513,9 +1509,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1526,9 +1522,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1539,9 +1535,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1552,9 +1548,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1565,9 +1561,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1578,9 +1574,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1591,9 +1587,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1604,9 +1600,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1617,9 +1613,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1630,9 +1626,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1643,9 +1639,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1656,9 +1652,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1669,9 +1665,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1682,9 +1678,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1695,9 +1691,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1708,9 +1704,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1721,9 +1717,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1734,9 +1730,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1747,9 +1743,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1760,9 +1756,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1773,9 +1769,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1786,9 +1782,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1799,9 +1795,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1812,9 +1808,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1825,9 +1821,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1838,9 +1834,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1851,9 +1847,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1864,9 +1860,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1877,9 +1873,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1890,9 +1886,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1903,9 +1899,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1916,9 +1912,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1929,9 +1925,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1942,9 +1938,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1955,9 +1951,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1968,9 +1964,9 @@ description: Variables in memory after executing loop_tag.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -1998,9 +1994,9 @@ description: Variables in memory after executing loop_tag.kcl 0.0 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2023,9 +2019,9 @@ description: Variables in memory after executing loop_tag.kcl 1.2533323356430426 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2048,9 +2044,9 @@ description: Variables in memory after executing loop_tag.kcl 3.7402312072915906 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2073,9 +2069,9 @@ description: Variables in memory after executing loop_tag.kcl 7.42147673413837 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2098,9 +2094,9 @@ description: Variables in memory after executing loop_tag.kcl 12.239013475155524 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2123,9 +2119,9 @@ description: Variables in memory after executing loop_tag.kcl 18.116865998080257 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2148,9 +2144,9 @@ description: Variables in memory after executing loop_tag.kcl 24.962337057367144 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2173,9 +2169,9 @@ description: Variables in memory after executing loop_tag.kcl 32.66746948512503 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2198,9 +2194,9 @@ description: Variables in memory after executing loop_tag.kcl 41.11074874014518 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2223,9 +2219,9 @@ description: Variables in memory after executing loop_tag.kcl 50.15901926480538 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2248,9 +2244,9 @@ description: Variables in memory after executing loop_tag.kcl 59.66958442775692 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2273,9 +2269,9 @@ description: Variables in memory after executing loop_tag.kcl 69.4924569350438 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2298,9 +2294,9 @@ description: Variables in memory after executing loop_tag.kcl 79.47272421932652 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2323,9 +2319,9 @@ description: Variables in memory after executing loop_tag.kcl 89.45299150360924 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2348,9 +2344,9 @@ description: Variables in memory after executing loop_tag.kcl 99.27586401089613 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2373,9 +2369,9 @@ description: Variables in memory after executing loop_tag.kcl 108.78642917384767 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2398,9 +2394,9 @@ description: Variables in memory after executing loop_tag.kcl 117.83469969850786 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2423,9 +2419,9 @@ description: Variables in memory after executing loop_tag.kcl 126.277978953528 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2448,9 +2444,9 @@ description: Variables in memory after executing loop_tag.kcl 133.9831113812859 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2473,9 +2469,9 @@ description: Variables in memory after executing loop_tag.kcl 140.8285824405728 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2498,9 +2494,9 @@ description: Variables in memory after executing loop_tag.kcl 146.70643496349754 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2523,9 +2519,9 @@ description: Variables in memory after executing loop_tag.kcl 151.5239717045147 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2548,9 +2544,9 @@ description: Variables in memory after executing loop_tag.kcl 155.2052172313615 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2573,9 +2569,9 @@ description: Variables in memory after executing loop_tag.kcl 157.69211610301005 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2598,9 +2594,9 @@ description: Variables in memory after executing loop_tag.kcl 158.9454484386531 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2623,9 +2619,9 @@ description: Variables in memory after executing loop_tag.kcl 158.9454484386531 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2648,9 +2644,9 @@ description: Variables in memory after executing loop_tag.kcl 157.69211610301005 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2673,9 +2669,9 @@ description: Variables in memory after executing loop_tag.kcl 155.2052172313615 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2698,9 +2694,9 @@ description: Variables in memory after executing loop_tag.kcl 151.52397170451474 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2723,9 +2719,9 @@ description: Variables in memory after executing loop_tag.kcl 146.70643496349757 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2748,9 +2744,9 @@ description: Variables in memory after executing loop_tag.kcl 140.82858244057283 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2773,9 +2769,9 @@ description: Variables in memory after executing loop_tag.kcl 133.98311138128594 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2798,9 +2794,9 @@ description: Variables in memory after executing loop_tag.kcl 126.27797895352805 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2823,9 +2819,9 @@ description: Variables in memory after executing loop_tag.kcl 117.83469969850789 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2848,9 +2844,9 @@ description: Variables in memory after executing loop_tag.kcl 108.7864291738477 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2873,9 +2869,9 @@ description: Variables in memory after executing loop_tag.kcl 99.27586401089616 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2898,9 +2894,9 @@ description: Variables in memory after executing loop_tag.kcl 89.45299150360927 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2923,9 +2919,9 @@ description: Variables in memory after executing loop_tag.kcl 79.47272421932655 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2948,9 +2944,9 @@ description: Variables in memory after executing loop_tag.kcl 69.49245693504383 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2973,9 +2969,9 @@ description: Variables in memory after executing loop_tag.kcl 59.669584427756945 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -2998,9 +2994,9 @@ description: Variables in memory after executing loop_tag.kcl 50.15901926480541 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3023,9 +3019,9 @@ description: Variables in memory after executing loop_tag.kcl 41.11074874014521 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3048,9 +3044,9 @@ description: Variables in memory after executing loop_tag.kcl 32.66746948512506 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3073,9 +3069,9 @@ description: Variables in memory after executing loop_tag.kcl 24.962337057367172 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3098,9 +3094,9 @@ description: Variables in memory after executing loop_tag.kcl 18.116865998080282 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3123,9 +3119,9 @@ description: Variables in memory after executing loop_tag.kcl 12.239013475155549 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3148,9 +3144,9 @@ description: Variables in memory after executing loop_tag.kcl 7.421476734138388 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3173,9 +3169,9 @@ description: Variables in memory after executing loop_tag.kcl 3.740231207291609 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3198,9 +3194,9 @@ description: Variables in memory after executing loop_tag.kcl 1.253332335643064 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3318,9 +3314,9 @@ description: Variables in memory after executing loop_tag.kcl 0.0 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3343,9 +3339,9 @@ description: Variables in memory after executing loop_tag.kcl 1.2533323356430426 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3368,9 +3364,9 @@ description: Variables in memory after executing loop_tag.kcl 3.7402312072915906 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3393,9 +3389,9 @@ description: Variables in memory after executing loop_tag.kcl 7.42147673413837 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3418,9 +3414,9 @@ description: Variables in memory after executing loop_tag.kcl 12.239013475155524 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3443,9 +3439,9 @@ description: Variables in memory after executing loop_tag.kcl 18.116865998080257 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3468,9 +3464,9 @@ description: Variables in memory after executing loop_tag.kcl 24.962337057367144 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3493,9 +3489,9 @@ description: Variables in memory after executing loop_tag.kcl 32.66746948512503 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3518,9 +3514,9 @@ description: Variables in memory after executing loop_tag.kcl 41.11074874014518 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3543,9 +3539,9 @@ description: Variables in memory after executing loop_tag.kcl 50.15901926480538 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3568,9 +3564,9 @@ description: Variables in memory after executing loop_tag.kcl 59.66958442775692 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3593,9 +3589,9 @@ description: Variables in memory after executing loop_tag.kcl 69.4924569350438 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3618,9 +3614,9 @@ description: Variables in memory after executing loop_tag.kcl 79.47272421932652 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3643,9 +3639,9 @@ description: Variables in memory after executing loop_tag.kcl 89.45299150360924 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3668,9 +3664,9 @@ description: Variables in memory after executing loop_tag.kcl 99.27586401089613 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3693,9 +3689,9 @@ description: Variables in memory after executing loop_tag.kcl 108.78642917384767 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3718,9 +3714,9 @@ description: Variables in memory after executing loop_tag.kcl 117.83469969850786 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3743,9 +3739,9 @@ description: Variables in memory after executing loop_tag.kcl 126.277978953528 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3768,9 +3764,9 @@ description: Variables in memory after executing loop_tag.kcl 133.9831113812859 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3793,9 +3789,9 @@ description: Variables in memory after executing loop_tag.kcl 140.8285824405728 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3818,9 +3814,9 @@ description: Variables in memory after executing loop_tag.kcl 146.70643496349754 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3843,9 +3839,9 @@ description: Variables in memory after executing loop_tag.kcl 151.5239717045147 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3868,9 +3864,9 @@ description: Variables in memory after executing loop_tag.kcl 155.2052172313615 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3893,9 +3889,9 @@ description: Variables in memory after executing loop_tag.kcl 157.69211610301005 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3918,9 +3914,9 @@ description: Variables in memory after executing loop_tag.kcl 158.9454484386531 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3943,9 +3939,9 @@ description: Variables in memory after executing loop_tag.kcl 158.9454484386531 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3968,9 +3964,9 @@ description: Variables in memory after executing loop_tag.kcl 157.69211610301005 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -3993,9 +3989,9 @@ description: Variables in memory after executing loop_tag.kcl 155.2052172313615 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -4018,9 +4014,9 @@ description: Variables in memory after executing loop_tag.kcl 151.52397170451474 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -4043,9 +4039,9 @@ description: Variables in memory after executing loop_tag.kcl 146.70643496349757 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -4068,9 +4064,9 @@ description: Variables in memory after executing loop_tag.kcl 140.82858244057283 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -4093,9 +4089,9 @@ description: Variables in memory after executing loop_tag.kcl 133.98311138128594 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -4118,9 +4114,9 @@ description: Variables in memory after executing loop_tag.kcl 126.27797895352805 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -4143,9 +4139,9 @@ description: Variables in memory after executing loop_tag.kcl 117.83469969850789 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -4168,9 +4164,9 @@ description: Variables in memory after executing loop_tag.kcl 108.7864291738477 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -4193,9 +4189,9 @@ description: Variables in memory after executing loop_tag.kcl 99.27586401089616 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -4218,9 +4214,9 @@ description: Variables in memory after executing loop_tag.kcl 89.45299150360927 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -4243,9 +4239,9 @@ description: Variables in memory after executing loop_tag.kcl 79.47272421932655 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -4268,9 +4264,9 @@ description: Variables in memory after executing loop_tag.kcl 69.49245693504383 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -4293,9 +4289,9 @@ description: Variables in memory after executing loop_tag.kcl 59.669584427756945 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -4318,9 +4314,9 @@ description: Variables in memory after executing loop_tag.kcl 50.15901926480541 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -4343,9 +4339,9 @@ description: Variables in memory after executing loop_tag.kcl 41.11074874014521 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -4368,9 +4364,9 @@ description: Variables in memory after executing loop_tag.kcl 32.66746948512506 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -4393,9 +4389,9 @@ description: Variables in memory after executing loop_tag.kcl 24.962337057367172 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -4418,9 +4414,9 @@ description: Variables in memory after executing loop_tag.kcl 18.116865998080282 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -4443,9 +4439,9 @@ description: Variables in memory after executing loop_tag.kcl 12.239013475155549 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -4468,9 +4464,9 @@ description: Variables in memory after executing loop_tag.kcl 7.421476734138388 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -4493,9 +4489,9 @@ description: Variables in memory after executing loop_tag.kcl 3.740231207291609 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, @@ -4518,9 +4514,9 @@ description: Variables in memory after executing loop_tag.kcl 1.253332335643064 ], "tag": { - "commentStart": 970, - "end": 985, - "start": 970, + "commentStart": 973, + "end": 988, + "start": 973, "type": "TagDeclarator", "value": "problematicTag" }, diff --git a/rust/kcl-lib/tests/loop_tag/unparsed.snap b/rust/kcl-lib/tests/loop_tag/unparsed.snap index 0543b6ccbf..dfbaf0b3ae 100644 --- a/rust/kcl-lib/tests/loop_tag/unparsed.snap +++ b/rust/kcl-lib/tests/loop_tag/unparsed.snap @@ -16,7 +16,7 @@ description: Result of unparsing loop_tag.kcl radius = 10 height = 50 numSides = 50 -angleIncrement = 360 / numSides +angleIncrement = 360deg / numSides // Function to calculate the coordinates of a point on the circle fn calculatePoint(@index) { diff --git a/rust/kcl-lib/tests/parametric_with_tan_arc/artifact_graph_flowchart.snap.md b/rust/kcl-lib/tests/parametric_with_tan_arc/artifact_graph_flowchart.snap.md index 5960b0c851..b0387e542d 100644 --- a/rust/kcl-lib/tests/parametric_with_tan_arc/artifact_graph_flowchart.snap.md +++ b/rust/kcl-lib/tests/parametric_with_tan_arc/artifact_graph_flowchart.snap.md @@ -5,25 +5,25 @@ flowchart LR %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }] 3["Segment
[293, 320, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }] - 4["Segment
[326, 369, 0]"] + 4["Segment
[326, 372, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }] - 5["Segment
[375, 404, 0]"] + 5["Segment
[378, 407, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }] - 6["Segment
[410, 437, 0]"] + 6["Segment
[413, 440, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }] - 7["Segment
[443, 471, 0]"] + 7["Segment
[446, 474, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }] - 8["Segment
[477, 533, 0]"] + 8["Segment
[480, 539, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }] - 9["Segment
[539, 567, 0]"] + 9["Segment
[545, 573, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 8 }] - 10["Segment
[573, 581, 0]"] + 10["Segment
[579, 587, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 9 }] 11[Solid2d] end 1["Plane
[239, 256, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] - 12["Sweep Extrusion
[587, 610, 0]"] + 12["Sweep Extrusion
[593, 616, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 10 }] 13[Wall] %% face_code_ref=Missing NodePath diff --git a/rust/kcl-lib/tests/parametric_with_tan_arc/ast.snap b/rust/kcl-lib/tests/parametric_with_tan_arc/ast.snap index 573424d62e..2afd33790b 100644 --- a/rust/kcl-lib/tests/parametric_with_tan_arc/ast.snap +++ b/rust/kcl-lib/tests/parametric_with_tan_arc/ast.snap @@ -700,13 +700,13 @@ description: Result of parsing parametric_with_tan_arc.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } } @@ -1030,13 +1030,13 @@ description: Result of parsing parametric_with_tan_arc.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, diff --git a/rust/kcl-lib/tests/parametric_with_tan_arc/input.kcl b/rust/kcl-lib/tests/parametric_with_tan_arc/input.kcl index 76226836cf..8fe1704dd1 100644 --- a/rust/kcl-lib/tests/parametric_with_tan_arc/input.kcl +++ b/rust/kcl-lib/tests/parametric_with_tan_arc/input.kcl @@ -11,11 +11,11 @@ wallMountL = 8 bracket = startSketchOn(XY) |> startProfile(at = [0, 0]) |> line(end = [0, wallMountL]) - |> tangentialArc(radius = filletR, angle = 90) + |> tangentialArc(radius = filletR, angle = 90deg) |> line(end = [-shelfMountL, 0]) |> line(end = [0, -thickness]) |> line(end = [shelfMountL, 0]) - |> tangentialArc(radius = filletR - thickness, angle = -90) + |> tangentialArc(radius = filletR - thickness, angle = -90deg) |> line(end = [0, -wallMountL]) |> close(%) |> extrude(length = width) diff --git a/rust/kcl-lib/tests/parametric_with_tan_arc/unparsed.snap b/rust/kcl-lib/tests/parametric_with_tan_arc/unparsed.snap index 61aad4046f..32cffa24b4 100644 --- a/rust/kcl-lib/tests/parametric_with_tan_arc/unparsed.snap +++ b/rust/kcl-lib/tests/parametric_with_tan_arc/unparsed.snap @@ -15,11 +15,11 @@ wallMountL = 8 bracket = startSketchOn(XY) |> startProfile(at = [0, 0]) |> line(end = [0, wallMountL]) - |> tangentialArc(radius = filletR, angle = 90) + |> tangentialArc(radius = filletR, angle = 90deg) |> line(end = [-shelfMountL, 0]) |> line(end = [0, -thickness]) |> line(end = [shelfMountL, 0]) - |> tangentialArc(radius = filletR - thickness, angle = -90) + |> tangentialArc(radius = filletR - thickness, angle = -90deg) |> line(end = [0, -wallMountL]) |> close(%) |> extrude(length = width) diff --git a/rust/kcl-lib/tests/subtract_regression10/artifact_graph_flowchart.snap.md b/rust/kcl-lib/tests/subtract_regression10/artifact_graph_flowchart.snap.md index b914b1d6a2..0d1ecac84f 100644 --- a/rust/kcl-lib/tests/subtract_regression10/artifact_graph_flowchart.snap.md +++ b/rust/kcl-lib/tests/subtract_regression10/artifact_graph_flowchart.snap.md @@ -7,279 +7,279 @@ flowchart LR %% [ProgramBodyItem { index: 8 }, ExpressionStatementExpr, PipeBodyItem { index: 1 }] 4["Segment
[614, 787, 0]"] %% [ProgramBodyItem { index: 8 }, ExpressionStatementExpr, PipeBodyItem { index: 2 }] - 5["Segment
[793, 857, 0]"] + 5["Segment
[793, 860, 0]"] %% [ProgramBodyItem { index: 8 }, ExpressionStatementExpr, PipeBodyItem { index: 3 }] end subgraph path7 [Path] - 7["Path
[1105, 1249, 0]"] + 7["Path
[1108, 1252, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }] - 8["Segment
[1255, 1279, 0]"] + 8["Segment
[1258, 1282, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }] - 9["Segment
[1285, 1303, 0]"] + 9["Segment
[1288, 1306, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }] - 10["Segment
[1309, 1327, 0]"] + 10["Segment
[1312, 1330, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }] - 11["Segment
[1333, 1351, 0]"] + 11["Segment
[1336, 1354, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }] - 12["Segment
[1357, 1374, 0]"] + 12["Segment
[1360, 1377, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }] - 13["Segment
[1380, 1398, 0]"] + 13["Segment
[1383, 1401, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }] - 14["Segment
[1404, 1422, 0]"] + 14["Segment
[1407, 1425, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 8 }] - 15["Segment
[1428, 1446, 0]"] + 15["Segment
[1431, 1449, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 9 }] - 16["Segment
[1452, 1469, 0]"] + 16["Segment
[1455, 1472, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 10 }] - 17["Segment
[1475, 1493, 0]"] + 17["Segment
[1478, 1496, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 11 }] - 18["Segment
[1499, 1517, 0]"] + 18["Segment
[1502, 1520, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 12 }] - 19["Segment
[1523, 1541, 0]"] + 19["Segment
[1526, 1544, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 13 }] - 20["Segment
[1547, 1564, 0]"] + 20["Segment
[1550, 1567, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 14 }] - 21["Segment
[1570, 1626, 0]"] + 21["Segment
[1573, 1629, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 15 }] - 22["Segment
[1632, 1650, 0]"] + 22["Segment
[1635, 1653, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 16 }] - 23["Segment
[1656, 1710, 0]"] + 23["Segment
[1659, 1713, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 17 }] - 24["Segment
[1716, 1760, 0]"] + 24["Segment
[1719, 1766, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 18 }] - 25["Segment
[1766, 1803, 0]"] + 25["Segment
[1772, 1809, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 19 }] - 26["Segment
[1809, 1865, 0]"] + 26["Segment
[1815, 1871, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 27["Segment
[1871, 1878, 0]"] + 27["Segment
[1877, 1884, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 21 }] 28[Solid2d] end subgraph path69 [Path] - 69["Path
[2014, 2178, 0]"] + 69["Path
[2020, 2184, 0]"] %% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }] - 70["Segment
[2184, 2217, 0]"] + 70["Segment
[2190, 2223, 0]"] %% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }] - 71["Segment
[2223, 2244, 0]"] + 71["Segment
[2229, 2250, 0]"] %% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }] - 72["Segment
[2250, 2287, 0]"] + 72["Segment
[2256, 2293, 0]"] %% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }] - 73["Segment
[2293, 2349, 0]"] + 73["Segment
[2299, 2355, 0]"] %% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }] - 74["Segment
[2355, 2362, 0]"] + 74["Segment
[2361, 2368, 0]"] %% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }] 75[Solid2d] end subgraph path94 [Path] - 94["Path
[2795, 3000, 0]"] + 94["Path
[2804, 3009, 0]"] %% [ProgramBodyItem { index: 13 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }] - 95["Segment
[2795, 3000, 0]"] + 95["Segment
[2804, 3009, 0]"] %% [ProgramBodyItem { index: 13 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }] 96[Solid2d] end subgraph path105 [Path] - 105["Path
[3228, 3394, 0]"] + 105["Path
[3237, 3403, 0]"] %% [ProgramBodyItem { index: 14 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }] - 106["Segment
[3400, 3418, 0]"] + 106["Segment
[3409, 3427, 0]"] %% [ProgramBodyItem { index: 14 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }] - 107["Segment
[3424, 3606, 0]"] + 107["Segment
[3433, 3615, 0]"] %% [ProgramBodyItem { index: 14 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }] - 108["Segment
[3612, 3634, 0]"] + 108["Segment
[3621, 3643, 0]"] %% [ProgramBodyItem { index: 14 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }] - 109["Segment
[3640, 3662, 0]"] + 109["Segment
[3649, 3671, 0]"] %% [ProgramBodyItem { index: 14 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }] - 110["Segment
[3668, 3686, 0]"] + 110["Segment
[3677, 3695, 0]"] %% [ProgramBodyItem { index: 14 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }] - 111["Segment
[3668, 3686, 0]"] + 111["Segment
[3677, 3695, 0]"] %% [ProgramBodyItem { index: 14 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }] - 112["Segment
[3668, 3686, 0]"] + 112["Segment
[3677, 3695, 0]"] %% [ProgramBodyItem { index: 14 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }] - 113["Segment
[3668, 3686, 0]"] + 113["Segment
[3677, 3695, 0]"] %% [ProgramBodyItem { index: 14 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }] - 114["Segment
[3668, 3686, 0]"] + 114["Segment
[3677, 3695, 0]"] %% [ProgramBodyItem { index: 14 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }] - 115["Segment
[3668, 3686, 0]"] + 115["Segment
[3677, 3695, 0]"] %% [ProgramBodyItem { index: 14 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }] - 116["Segment
[3668, 3686, 0]"] + 116["Segment
[3677, 3695, 0]"] %% [ProgramBodyItem { index: 14 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }] - 117["Segment
[3692, 3699, 0]"] + 117["Segment
[3701, 3708, 0]"] %% [ProgramBodyItem { index: 14 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }] 118[Solid2d] end subgraph path145 [Path] - 145["Path
[3956, 4116, 0]"] + 145["Path
[3965, 4125, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }] - 146["Segment
[4122, 4186, 0]"] + 146["Segment
[4131, 4198, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }] - 147["Segment
[4192, 4229, 0]"] + 147["Segment
[4204, 4244, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }] - 148["Segment
[4235, 4299, 0]"] + 148["Segment
[4250, 4317, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }] - 149["Segment
[4305, 4343, 0]"] + 149["Segment
[4323, 4364, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }] - 150["Segment
[4349, 4413, 0]"] + 150["Segment
[4370, 4437, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }] - 151["Segment
[4419, 4482, 0]"] + 151["Segment
[4443, 4506, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }] - 152["Segment
[4488, 4552, 0]"] + 152["Segment
[4512, 4579, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 8 }] - 153["Segment
[4558, 4596, 0]"] + 153["Segment
[4585, 4626, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 9 }] - 154["Segment
[4602, 4666, 0]"] + 154["Segment
[4632, 4699, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 10 }] - 155["Segment
[4672, 4720, 0]"] + 155["Segment
[4705, 4756, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 11 }] - 156["Segment
[4726, 4822, 0]"] + 156["Segment
[4762, 4858, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 12 }] - 157["Segment
[4828, 4866, 0]"] + 157["Segment
[4864, 4905, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 13 }] - 158["Segment
[4872, 4936, 0]"] + 158["Segment
[4911, 4978, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 14 }] - 159["Segment
[4942, 4980, 0]"] + 159["Segment
[4984, 5025, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 15 }] - 160["Segment
[4986, 5050, 0]"] + 160["Segment
[5031, 5098, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 16 }] - 161["Segment
[5056, 5151, 0]"] + 161["Segment
[5104, 5199, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 17 }] - 162["Segment
[5157, 5257, 0]"] + 162["Segment
[5205, 5308, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 18 }] - 163["Segment
[5263, 5340, 0]"] + 163["Segment
[5314, 5394, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 19 }] - 164["Segment
[5346, 5368, 0]"] + 164["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 165["Segment
[5346, 5368, 0]"] + 165["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 166["Segment
[5346, 5368, 0]"] + 166["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 167["Segment
[5346, 5368, 0]"] + 167["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 168["Segment
[5346, 5368, 0]"] + 168["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 169["Segment
[5346, 5368, 0]"] + 169["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 170["Segment
[5346, 5368, 0]"] + 170["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 171["Segment
[5346, 5368, 0]"] + 171["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 172["Segment
[5346, 5368, 0]"] + 172["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 173["Segment
[5346, 5368, 0]"] + 173["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 174["Segment
[5346, 5368, 0]"] + 174["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 175["Segment
[5346, 5368, 0]"] + 175["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 176["Segment
[5346, 5368, 0]"] + 176["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 177["Segment
[5346, 5368, 0]"] + 177["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 178["Segment
[5346, 5368, 0]"] + 178["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 179["Segment
[5346, 5368, 0]"] + 179["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 180["Segment
[5346, 5368, 0]"] + 180["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 181["Segment
[5346, 5368, 0]"] + 181["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 182["Segment
[5346, 5368, 0]"] + 182["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 183["Segment
[5346, 5368, 0]"] + 183["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 184["Segment
[5346, 5368, 0]"] + 184["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 185["Segment
[5346, 5368, 0]"] + 185["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 186["Segment
[5346, 5368, 0]"] + 186["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 187["Segment
[5346, 5368, 0]"] + 187["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 188["Segment
[5346, 5368, 0]"] + 188["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 189["Segment
[5346, 5368, 0]"] + 189["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 190["Segment
[5346, 5368, 0]"] + 190["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 191["Segment
[5346, 5368, 0]"] + 191["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 192["Segment
[5346, 5368, 0]"] + 192["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 193["Segment
[5346, 5368, 0]"] + 193["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 194["Segment
[5346, 5368, 0]"] + 194["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 195["Segment
[5346, 5368, 0]"] + 195["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 196["Segment
[5346, 5368, 0]"] + 196["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 197["Segment
[5346, 5368, 0]"] + 197["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 198["Segment
[5346, 5368, 0]"] + 198["Segment
[5400, 5422, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 20 }] - 199["Segment
[5374, 5381, 0]"] + 199["Segment
[5428, 5435, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 21 }] 200[Solid2d] end subgraph path310 [Path] - 310["Path
[5900, 5941, 0]"] + 310["Path
[5954, 5995, 0]"] %% [ProgramBodyItem { index: 18 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }] - 311["Segment
[5947, 5964, 0]"] + 311["Segment
[6001, 6018, 0]"] %% [ProgramBodyItem { index: 18 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }] - 312["Segment
[5970, 6007, 0]"] + 312["Segment
[6024, 6064, 0]"] %% [ProgramBodyItem { index: 18 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }] - 313["Segment
[6013, 6069, 0]"] + 313["Segment
[6070, 6126, 0]"] %% [ProgramBodyItem { index: 18 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }] - 314["Segment
[6075, 6112, 0]"] + 314["Segment
[6132, 6172, 0]"] %% [ProgramBodyItem { index: 18 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }] - 315["Segment
[6118, 6155, 0]"] + 315["Segment
[6178, 6215, 0]"] %% [ProgramBodyItem { index: 18 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }] - 316["Segment
[6161, 6179, 0]"] + 316["Segment
[6221, 6239, 0]"] %% [ProgramBodyItem { index: 18 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }] - 317["Segment
[6161, 6179, 0]"] + 317["Segment
[6221, 6239, 0]"] %% [ProgramBodyItem { index: 18 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }] - 318["Segment
[6161, 6179, 0]"] + 318["Segment
[6221, 6239, 0]"] %% [ProgramBodyItem { index: 18 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }] - 319["Segment
[6161, 6179, 0]"] + 319["Segment
[6221, 6239, 0]"] %% [ProgramBodyItem { index: 18 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }] - 320["Segment
[6161, 6179, 0]"] + 320["Segment
[6221, 6239, 0]"] %% [ProgramBodyItem { index: 18 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }] - 321["Segment
[6161, 6179, 0]"] + 321["Segment
[6221, 6239, 0]"] %% [ProgramBodyItem { index: 18 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }] - 322["Segment
[6161, 6179, 0]"] + 322["Segment
[6221, 6239, 0]"] %% [ProgramBodyItem { index: 18 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }] - 323["Segment
[6161, 6179, 0]"] + 323["Segment
[6221, 6239, 0]"] %% [ProgramBodyItem { index: 18 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }] - 324["Segment
[6161, 6179, 0]"] + 324["Segment
[6221, 6239, 0]"] %% [ProgramBodyItem { index: 18 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }] - 325["Segment
[6185, 6192, 0]"] + 325["Segment
[6245, 6252, 0]"] %% [ProgramBodyItem { index: 18 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 8 }] 326[Solid2d] end subgraph path359 [Path] - 359["Path
[6473, 6567, 0]"] + 359["Path
[6533, 6627, 0]"] %% [ProgramBodyItem { index: 21 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] - 360["Segment
[6473, 6567, 0]"] + 360["Segment
[6533, 6627, 0]"] %% [ProgramBodyItem { index: 21 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] 361[Solid2d] end subgraph path368 [Path] - 368["Path
[6627, 6829, 0]"] + 368["Path
[6687, 6889, 0]"] %% [ProgramBodyItem { index: 22 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] - 369["Segment
[6627, 6829, 0]"] + 369["Segment
[6687, 6889, 0]"] %% [ProgramBodyItem { index: 22 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] 370[Solid2d] end subgraph path380 [Path] - 380["Path
[7102, 7138, 0]"] + 380["Path
[7162, 7198, 0]"] %% [ProgramBodyItem { index: 24 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }] - 381["Segment
[7102, 7138, 0]"] + 381["Segment
[7162, 7198, 0]"] %% [ProgramBodyItem { index: 24 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }] 382[Solid2d] end 1["Plane
[479, 496, 0]"] %% [ProgramBodyItem { index: 7 }, VariableDeclarationDeclaration, VariableDeclarationInit] - 6["Plane
[1082, 1099, 0]"] + 6["Plane
[1085, 1102, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] - 29["Sweep Revolve
[1884, 1914, 0]"] + 29["Sweep Revolve
[1890, 1920, 0]"] %% [ProgramBodyItem { index: 9 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 22 }] 30[Wall] %% face_code_ref=Missing NodePath @@ -338,9 +338,9 @@ flowchart LR 65["SweepEdge Adjacent"] 66["SweepEdge Adjacent"] 67["SweepEdge Adjacent"] - 68["Plane
[1991, 2008, 0]"] + 68["Plane
[1997, 2014, 0]"] %% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] - 76["Sweep Extrusion
[2368, 2407, 0]"] + 76["Sweep Extrusion
[2374, 2413, 0]"] %% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }] 77[Wall] %% face_code_ref=Missing NodePath @@ -362,13 +362,13 @@ flowchart LR 88["SweepEdge Adjacent"] 89["SweepEdge Opposite"] 90["SweepEdge Adjacent"] - 91["CompositeSolid Union
[2708, 2724, 0]"] + 91["CompositeSolid Union
[2717, 2733, 0]"] %% [ProgramBodyItem { index: 12 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 0 }] - 92["CompositeSolid Subtract
[2677, 2725, 0]"] + 92["CompositeSolid Subtract
[2686, 2734, 0]"] %% [ProgramBodyItem { index: 12 }, VariableDeclarationDeclaration, VariableDeclarationInit] - 93["Plane
[2772, 2789, 0]"] + 93["Plane
[2781, 2798, 0]"] %% [ProgramBodyItem { index: 13 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] - 97["Sweep Extrusion
[3006, 3046, 0]"] + 97["Sweep Extrusion
[3015, 3055, 0]"] %% [ProgramBodyItem { index: 13 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }] 98[Wall] %% face_code_ref=Missing NodePath @@ -378,11 +378,11 @@ flowchart LR %% face_code_ref=Missing NodePath 101["SweepEdge Opposite"] 102["SweepEdge Adjacent"] - 103["EdgeCut Fillet
[3052, 3126, 0]"] + 103["EdgeCut Fillet
[3061, 3135, 0]"] %% [ProgramBodyItem { index: 13 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }] - 104["Plane
[3205, 3222, 0]"] + 104["Plane
[3214, 3231, 0]"] %% [ProgramBodyItem { index: 14 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] - 119["Sweep Extrusion
[3705, 3744, 0]"] + 119["Sweep Extrusion
[3714, 3753, 0]"] %% [ProgramBodyItem { index: 14 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 8 }] 120[Wall] %% face_code_ref=Missing NodePath @@ -416,11 +416,11 @@ flowchart LR 140["SweepEdge Adjacent"] 141["SweepEdge Opposite"] 142["SweepEdge Adjacent"] - 143["CompositeSolid Subtract
[3781, 3825, 0]"] + 143["CompositeSolid Subtract
[3790, 3834, 0]"] %% [ProgramBodyItem { index: 15 }, VariableDeclarationDeclaration, VariableDeclarationInit] - 144["Plane
[3933, 3950, 0]"] + 144["Plane
[3942, 3959, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] - 201["Sweep Extrusion
[5387, 5425, 0]"] + 201["Sweep Extrusion
[5441, 5479, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 22 }] 202[Wall] %% face_code_ref=Missing NodePath @@ -566,9 +566,9 @@ flowchart LR 306["SweepEdge Adjacent"] 307["SweepEdge Opposite"] 308["SweepEdge Adjacent"] - 309["Plane
[5861, 5894, 0]"] + 309["Plane
[5915, 5948, 0]"] %% [ProgramBodyItem { index: 18 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] - 327["Sweep Extrusion
[6198, 6237, 0]"] + 327["Sweep Extrusion
[6258, 6297, 0]"] %% [ProgramBodyItem { index: 18 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 9 }] 328[Wall] %% face_code_ref=Missing NodePath @@ -610,11 +610,11 @@ flowchart LR 354["SweepEdge Adjacent"] 355["SweepEdge Opposite"] 356["SweepEdge Adjacent"] - 357["CompositeSolid Intersect
[6268, 6327, 0]"] + 357["CompositeSolid Intersect
[6328, 6387, 0]"] %% [ProgramBodyItem { index: 19 }, VariableDeclarationDeclaration, VariableDeclarationInit] - 358["Plane
[6443, 6460, 0]"] + 358["Plane
[6503, 6520, 0]"] %% [ProgramBodyItem { index: 20 }, VariableDeclarationDeclaration, VariableDeclarationInit] - 362["Sweep Extrusion
[6573, 6611, 0]"] + 362["Sweep Extrusion
[6633, 6671, 0]"] %% [ProgramBodyItem { index: 21 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }] 363[Wall] %% face_code_ref=Missing NodePath @@ -624,7 +624,7 @@ flowchart LR %% face_code_ref=Missing NodePath 366["SweepEdge Opposite"] 367["SweepEdge Adjacent"] - 371["Sweep Extrusion
[6835, 6873, 0]"] + 371["Sweep Extrusion
[6895, 6933, 0]"] %% [ProgramBodyItem { index: 22 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }] 372[Wall] %% face_code_ref=Missing NodePath @@ -634,13 +634,13 @@ flowchart LR %% face_code_ref=Missing NodePath 375["SweepEdge Opposite"] 376["SweepEdge Adjacent"] - 377["CompositeSolid Union
[6973, 7005, 0]"] + 377["CompositeSolid Union
[7033, 7065, 0]"] %% [ProgramBodyItem { index: 23 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 0 }] - 378["CompositeSolid Subtract
[6926, 7006, 0]"] + 378["CompositeSolid Subtract
[6986, 7066, 0]"] %% [ProgramBodyItem { index: 23 }, VariableDeclarationDeclaration, VariableDeclarationInit] - 379["Plane
[7063, 7096, 0]"] + 379["Plane
[7123, 7156, 0]"] %% [ProgramBodyItem { index: 24 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] - 383["Sweep Extrusion
[7278, 7299, 0]"] + 383["Sweep Extrusion
[7341, 7362, 0]"] %% [ProgramBodyItem { index: 24 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }] 384[Wall] %% face_code_ref=Missing NodePath @@ -650,11 +650,11 @@ flowchart LR %% face_code_ref=Missing NodePath 387["SweepEdge Opposite"] 388["SweepEdge Adjacent"] - 389["Sweep Extrusion
[7278, 7299, 0]"] + 389["Sweep Extrusion
[7341, 7362, 0]"] %% [ProgramBodyItem { index: 24 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }] - 390["CompositeSolid Union
[7355, 7371, 0]"] + 390["CompositeSolid Union
[7418, 7434, 0]"] %% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 0 }] - 391["CompositeSolid Subtract
[7317, 7372, 0]"] + 391["CompositeSolid Subtract
[7380, 7435, 0]"] %% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit] 1 --- 2 2 --- 3 diff --git a/rust/kcl-lib/tests/subtract_regression10/ast.snap b/rust/kcl-lib/tests/subtract_regression10/ast.snap index ad168c4517..8585612015 100644 --- a/rust/kcl-lib/tests/subtract_regression10/ast.snap +++ b/rust/kcl-lib/tests/subtract_regression10/ast.snap @@ -894,13 +894,13 @@ description: Result of parsing subtract_regression10.kcl "right": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -2402,13 +2402,13 @@ description: Result of parsing subtract_regression10.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -3824,13 +3824,13 @@ description: Result of parsing subtract_regression10.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -6439,13 +6439,13 @@ description: Result of parsing subtract_regression10.kcl "right": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -6536,13 +6536,13 @@ description: Result of parsing subtract_regression10.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "45", + "raw": "45deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 45.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -6647,13 +6647,13 @@ description: Result of parsing subtract_regression10.kcl "right": { "commentStart": 0, "end": 0, - "raw": "45", + "raw": "45deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 45.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -6745,13 +6745,13 @@ description: Result of parsing subtract_regression10.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "45", + "raw": "45deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 45.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -6863,13 +6863,13 @@ description: Result of parsing subtract_regression10.kcl "right": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -7121,13 +7121,13 @@ description: Result of parsing subtract_regression10.kcl "right": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -7219,13 +7219,13 @@ description: Result of parsing subtract_regression10.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "45", + "raw": "45deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 45.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -7337,13 +7337,13 @@ description: Result of parsing subtract_regression10.kcl "right": { "commentStart": 0, "end": 0, - "raw": "45", + "raw": "45deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 45.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -7435,13 +7435,13 @@ description: Result of parsing subtract_regression10.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "45", + "raw": "45deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 45.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -7669,13 +7669,13 @@ description: Result of parsing subtract_regression10.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "45", + "raw": "45deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 45.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -7787,13 +7787,13 @@ description: Result of parsing subtract_regression10.kcl "right": { "commentStart": 0, "end": 0, - "raw": "45", + "raw": "45deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 45.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -7885,13 +7885,13 @@ description: Result of parsing subtract_regression10.kcl "argument": { "commentStart": 0, "end": 0, - "raw": "45", + "raw": "45deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 45.0, - "suffix": "None" + "suffix": "Deg" } }, "commentStart": 0, @@ -8003,13 +8003,13 @@ description: Result of parsing subtract_regression10.kcl "right": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -8287,13 +8287,13 @@ description: Result of parsing subtract_regression10.kcl "right": { "commentStart": 0, "end": 0, - "raw": "45", + "raw": "45deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 45.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -8452,13 +8452,13 @@ description: Result of parsing subtract_regression10.kcl "right": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -9499,13 +9499,13 @@ description: Result of parsing subtract_regression10.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "80", + "raw": "80deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 80.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -9678,13 +9678,13 @@ description: Result of parsing subtract_regression10.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "80", + "raw": "80deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 80.0, - "suffix": "None" + "suffix": "Deg" } } }, @@ -11229,13 +11229,13 @@ description: Result of parsing subtract_regression10.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "360", + "raw": "360deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 360.0, - "suffix": "None" + "suffix": "Deg" } } }, diff --git a/rust/kcl-lib/tests/subtract_regression10/input.kcl b/rust/kcl-lib/tests/subtract_regression10/input.kcl index 71dc6a9539..95c92c9546 100644 --- a/rust/kcl-lib/tests/subtract_regression10/input.kcl +++ b/rust/kcl-lib/tests/subtract_regression10/input.kcl @@ -24,7 +24,7 @@ startProfile(kinematicSketch, at = [0, 0]) ], tag = $seg02, ) - |> angledLine(angle = segAng(seg02) - 90, length = 1, tag = $seg03) + |> angledLine(angle = segAng(seg02) - 90deg, length = 1, tag = $seg03) // Sketch a profile with a total width equal to half the bore of the piston head. Include lands and gaps for compression rings. Then revolve the profile about the center axis to form the start of a piston head pistonBore = startSketchOn(XZ) @@ -48,7 +48,7 @@ pistonBore = startSketchOn(XZ) |> yLine(endAbsolute = profileStartY(%) - pistonHeight - 3) |> xLine(length = -8) |> yLine(endAbsolute = profileStartY(%) - 8 - (bore / 4)) - |> tangentialArc(angle = 90, radius = bore / 4) + |> tangentialArc(angle = 90deg, radius = bore / 4) |> xLine(endAbsolute = profileStartX(%)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() @@ -73,7 +73,7 @@ cutDivots = patternCircular3d( instances = 2, axis = [0, 0, 1], center = [0, 0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) @@ -119,24 +119,24 @@ connectingRodProfile = startSketchOn(XZ) segEndX(seg01) - (1.25 * crankRadius * cos(segAng(seg02))), segEndY(seg01) - (1.25 * crankRadius * sin(segAng(seg02))) ]) - |> angledLine(angle = segAng(seg02) - 90, length = crankRadius / 2) - |> tangentialArc(angle = 45, radius = 5) - |> angledLine(angle = segAng(seg02) - 45, length = crankRadius / 2) - |> tangentialArc(angle = -45, radius = 5) - |> angledLine(angle = segAng(seg02) - 90, length = crankRadius / 2) + |> angledLine(angle = segAng(seg02) - 90deg, length = crankRadius / 2) + |> tangentialArc(angle = 45deg, radius = 5) + |> angledLine(angle = segAng(seg02) - 45deg, length = crankRadius / 2) + |> tangentialArc(angle = -45deg, radius = 5) + |> angledLine(angle = segAng(seg02) - 90deg, length = crankRadius / 2) |> angledLine(angle = segAng(seg02), length = crankRadius * 1.625) - |> angledLine(angle = segAng(seg02) + 90, length = crankRadius / 2) - |> tangentialArc(angle = -45, radius = 5) - |> angledLine(angle = segAng(seg02) + 45, length = crankRadius / 2) - |> tangentialArc(angle = -45, radius = crankRadius) + |> angledLine(angle = segAng(seg02) + 90deg, length = crankRadius / 2) + |> tangentialArc(angle = -45deg, radius = 5) + |> angledLine(angle = segAng(seg02) + 45deg, length = crankRadius / 2) + |> tangentialArc(angle = -45deg, radius = crankRadius) |> angledLineThatIntersects(angle = segAng(seg02), intersectTag = seg03, offset = -crankRadius / 2) - |> tangentialArc(angle = -45, radius = 5) - |> angledLine(angle = segAng(seg02) - 45, length = crankRadius / 5) - |> tangentialArc(angle = -45, radius = 5) - |> angledLine(angle = segAng(seg02) - 90, length = crankRadius / 5) + |> tangentialArc(angle = -45deg, radius = 5) + |> angledLine(angle = segAng(seg02) - 45deg, length = crankRadius / 5) + |> tangentialArc(angle = -45deg, radius = 5) + |> angledLine(angle = segAng(seg02) - 90deg, length = crankRadius / 5) |> angledLineThatIntersects(angle = segAng(seg02), intersectTag = seg03, offset = crankRadius / 3) - |> angledLineThatIntersects(angle = segAng(seg02) + 45, intersectTag = seg03, offset = crankRadius / 2) - |> angledLineThatIntersects(%, angle = segAng(seg02) + 90, intersectTag = seg02) + |> angledLineThatIntersects(angle = segAng(seg02) + 45deg, intersectTag = seg03, offset = crankRadius / 2) + |> angledLineThatIntersects(%, angle = segAng(seg02) + 90deg, intersectTag = seg02) |> mirror2d(axis = seg02) |> close() |> extrude(length = 54, symmetric = true) @@ -160,9 +160,9 @@ connectingRodPlane = { connectingRodShape = startSketchOn(connectingRodPlane) |> startProfile(at = [crankRadius * 1.5, 0]) |> yLine(length = 4) - |> tangentialArc(angle = 80, radius = 8) + |> tangentialArc(angle = 80deg, radius = 8) |> tangentialArc(endAbsolute = [-lastSegX(%), lastSegY(%)]) - |> tangentialArc(angle = 80, radius = 8) + |> tangentialArc(angle = 80deg, radius = 8) |> yLine(endAbsolute = profileStartY(%)) |> mirror2d(axis = X) |> close() @@ -197,7 +197,7 @@ boltHoles = startSketchOn(connectingRodPlane) |> patternCircular2d( instances = 2, center = [0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) |> extrude(length = 300) diff --git a/rust/kcl-lib/tests/subtract_regression10/program_memory.snap b/rust/kcl-lib/tests/subtract_regression10/program_memory.snap index 11e6d5b35f..a760086134 100644 --- a/rust/kcl-lib/tests/subtract_regression10/program_memory.snap +++ b/rust/kcl-lib/tests/subtract_regression10/program_memory.snap @@ -5271,9 +5271,9 @@ description: Variables in memory after executing subtract_regression10.kcl "id": "[uuid]", "sourceRange": [], "tag": { - "commentStart": 2986, - "end": 2992, - "start": 2986, + "commentStart": 2995, + "end": 3001, + "start": 2995, "type": "TagDeclarator", "value": "seg04" }, @@ -5300,9 +5300,9 @@ description: Variables in memory after executing subtract_regression10.kcl ], "radius": 7.5, "tag": { - "commentStart": 2986, - "end": 2992, - "start": 2986, + "commentStart": 2995, + "end": 3001, + "start": 2995, "type": "TagDeclarator", "value": "seg04" }, diff --git a/rust/kcl-lib/tests/subtract_regression10/unparsed.snap b/rust/kcl-lib/tests/subtract_regression10/unparsed.snap index 27a00ca823..6042ca6b33 100644 --- a/rust/kcl-lib/tests/subtract_regression10/unparsed.snap +++ b/rust/kcl-lib/tests/subtract_regression10/unparsed.snap @@ -28,7 +28,7 @@ startProfile(kinematicSketch, at = [0, 0]) ], tag = $seg02, ) - |> angledLine(angle = segAng(seg02) - 90, length = 1, tag = $seg03) + |> angledLine(angle = segAng(seg02) - 90deg, length = 1, tag = $seg03) // Sketch a profile with a total width equal to half the bore of the piston head. Include lands and gaps for compression rings. Then revolve the profile about the center axis to form the start of a piston head pistonBore = startSketchOn(XZ) @@ -52,7 +52,7 @@ pistonBore = startSketchOn(XZ) |> yLine(endAbsolute = profileStartY(%) - pistonHeight - 3) |> xLine(length = -8) |> yLine(endAbsolute = profileStartY(%) - 8 - (bore / 4)) - |> tangentialArc(angle = 90, radius = bore / 4) + |> tangentialArc(angle = 90deg, radius = bore / 4) |> xLine(endAbsolute = profileStartX(%)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() @@ -77,7 +77,7 @@ cutDivots = patternCircular3d( instances = 2, axis = [0, 0, 1], center = [0, 0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) @@ -123,24 +123,24 @@ connectingRodProfile = startSketchOn(XZ) segEndX(seg01) - (1.25 * crankRadius * cos(segAng(seg02))), segEndY(seg01) - (1.25 * crankRadius * sin(segAng(seg02))) ]) - |> angledLine(angle = segAng(seg02) - 90, length = crankRadius / 2) - |> tangentialArc(angle = 45, radius = 5) - |> angledLine(angle = segAng(seg02) - 45, length = crankRadius / 2) - |> tangentialArc(angle = -45, radius = 5) - |> angledLine(angle = segAng(seg02) - 90, length = crankRadius / 2) + |> angledLine(angle = segAng(seg02) - 90deg, length = crankRadius / 2) + |> tangentialArc(angle = 45deg, radius = 5) + |> angledLine(angle = segAng(seg02) - 45deg, length = crankRadius / 2) + |> tangentialArc(angle = -45deg, radius = 5) + |> angledLine(angle = segAng(seg02) - 90deg, length = crankRadius / 2) |> angledLine(angle = segAng(seg02), length = crankRadius * 1.625) - |> angledLine(angle = segAng(seg02) + 90, length = crankRadius / 2) - |> tangentialArc(angle = -45, radius = 5) - |> angledLine(angle = segAng(seg02) + 45, length = crankRadius / 2) - |> tangentialArc(angle = -45, radius = crankRadius) + |> angledLine(angle = segAng(seg02) + 90deg, length = crankRadius / 2) + |> tangentialArc(angle = -45deg, radius = 5) + |> angledLine(angle = segAng(seg02) + 45deg, length = crankRadius / 2) + |> tangentialArc(angle = -45deg, radius = crankRadius) |> angledLineThatIntersects(angle = segAng(seg02), intersectTag = seg03, offset = -crankRadius / 2) - |> tangentialArc(angle = -45, radius = 5) - |> angledLine(angle = segAng(seg02) - 45, length = crankRadius / 5) - |> tangentialArc(angle = -45, radius = 5) - |> angledLine(angle = segAng(seg02) - 90, length = crankRadius / 5) + |> tangentialArc(angle = -45deg, radius = 5) + |> angledLine(angle = segAng(seg02) - 45deg, length = crankRadius / 5) + |> tangentialArc(angle = -45deg, radius = 5) + |> angledLine(angle = segAng(seg02) - 90deg, length = crankRadius / 5) |> angledLineThatIntersects(angle = segAng(seg02), intersectTag = seg03, offset = crankRadius / 3) - |> angledLineThatIntersects(angle = segAng(seg02) + 45, intersectTag = seg03, offset = crankRadius / 2) - |> angledLineThatIntersects(%, angle = segAng(seg02) + 90, intersectTag = seg02) + |> angledLineThatIntersects(angle = segAng(seg02) + 45deg, intersectTag = seg03, offset = crankRadius / 2) + |> angledLineThatIntersects(%, angle = segAng(seg02) + 90deg, intersectTag = seg02) |> mirror2d(axis = seg02) |> close() |> extrude(length = 54, symmetric = true) @@ -164,9 +164,9 @@ connectingRodPlane = { connectingRodShape = startSketchOn(connectingRodPlane) |> startProfile(at = [crankRadius * 1.5, 0]) |> yLine(length = 4) - |> tangentialArc(angle = 80, radius = 8) + |> tangentialArc(angle = 80deg, radius = 8) |> tangentialArc(endAbsolute = [-lastSegX(%), lastSegY(%)]) - |> tangentialArc(angle = 80, radius = 8) + |> tangentialArc(angle = 80deg, radius = 8) |> yLine(endAbsolute = profileStartY(%)) |> mirror2d(axis = X) |> close() @@ -201,7 +201,7 @@ boltHoles = startSketchOn(connectingRodPlane) |> patternCircular2d( instances = 2, center = [0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) |> extrude(length = 300) diff --git a/rust/kcl-lib/tests/tan_arc_x_line/artifact_graph_flowchart.snap.md b/rust/kcl-lib/tests/tan_arc_x_line/artifact_graph_flowchart.snap.md index 5f26d5923f..86bd87ed52 100644 --- a/rust/kcl-lib/tests/tan_arc_x_line/artifact_graph_flowchart.snap.md +++ b/rust/kcl-lib/tests/tan_arc_x_line/artifact_graph_flowchart.snap.md @@ -1,20 +1,20 @@ ```mermaid flowchart LR subgraph path2 [Path] - 2["Path
[87, 122, 0]"] + 2["Path
[93, 128, 0]"] %% [ProgramBodyItem { index: 5 }, ExpressionStatementExpr, PipeBodyItem { index: 1 }] - 3["Segment
[128, 176, 0]"] + 3["Segment
[134, 182, 0]"] %% [ProgramBodyItem { index: 5 }, ExpressionStatementExpr, PipeBodyItem { index: 2 }] - 4["Segment
[182, 241, 0]"] + 4["Segment
[188, 247, 0]"] %% [ProgramBodyItem { index: 5 }, ExpressionStatementExpr, PipeBodyItem { index: 3 }] - 5["Segment
[247, 312, 0]"] + 5["Segment
[253, 318, 0]"] %% [ProgramBodyItem { index: 5 }, ExpressionStatementExpr, PipeBodyItem { index: 4 }] - 6["Segment
[318, 384, 0]"] + 6["Segment
[324, 390, 0]"] %% [ProgramBodyItem { index: 5 }, ExpressionStatementExpr, PipeBodyItem { index: 5 }] - 7["Segment
[390, 412, 0]"] + 7["Segment
[396, 418, 0]"] %% [ProgramBodyItem { index: 5 }, ExpressionStatementExpr, PipeBodyItem { index: 6 }] end - 1["Plane
[64, 81, 0]"] + 1["Plane
[70, 87, 0]"] %% [ProgramBodyItem { index: 5 }, ExpressionStatementExpr, PipeBodyItem { index: 0 }] 1 --- 2 2 --- 3 diff --git a/rust/kcl-lib/tests/tan_arc_x_line/ast.snap b/rust/kcl-lib/tests/tan_arc_x_line/ast.snap index 0d70f4d601..e797de89bd 100644 --- a/rust/kcl-lib/tests/tan_arc_x_line/ast.snap +++ b/rust/kcl-lib/tests/tan_arc_x_line/ast.snap @@ -86,13 +86,13 @@ description: Result of parsing tan_arc_x_line.kcl "init": { "commentStart": 0, "end": 0, - "raw": "135", + "raw": "135deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 135.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, @@ -152,13 +152,13 @@ description: Result of parsing tan_arc_x_line.kcl "init": { "commentStart": 0, "end": 0, - "raw": "110", + "raw": "110deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 110.0, - "suffix": "None" + "suffix": "Deg" } }, "start": 0, diff --git a/rust/kcl-lib/tests/tan_arc_x_line/input.kcl b/rust/kcl-lib/tests/tan_arc_x_line/input.kcl index 2aeeadfd8b..6d1357cdd0 100644 --- a/rust/kcl-lib/tests/tan_arc_x_line/input.kcl +++ b/rust/kcl-lib/tests/tan_arc_x_line/input.kcl @@ -1,8 +1,8 @@ startX = 0 startY = 0 -angleOffset = 135 +angleOffset = 135deg r = 1 -angleStart = 110 +angleStart = 110deg startSketchOn(XY) |> startProfile(at = [startX, startY]) diff --git a/rust/kcl-lib/tests/tan_arc_x_line/ops.snap b/rust/kcl-lib/tests/tan_arc_x_line/ops.snap index 703599b092..7363453b66 100644 --- a/rust/kcl-lib/tests/tan_arc_x_line/ops.snap +++ b/rust/kcl-lib/tests/tan_arc_x_line/ops.snap @@ -77,13 +77,9 @@ description: Operations executed tan_arc_x_line.kcl "type": "Number", "value": 135.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", @@ -143,13 +139,9 @@ description: Operations executed tan_arc_x_line.kcl "type": "Number", "value": 110.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "visibility": "default", diff --git a/rust/kcl-lib/tests/tan_arc_x_line/program_memory.snap b/rust/kcl-lib/tests/tan_arc_x_line/program_memory.snap index 458e050ddc..c8848304d9 100644 --- a/rust/kcl-lib/tests/tan_arc_x_line/program_memory.snap +++ b/rust/kcl-lib/tests/tan_arc_x_line/program_memory.snap @@ -7,26 +7,18 @@ description: Variables in memory after executing tan_arc_x_line.kcl "type": "Number", "value": 135.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "angleStart": { "type": "Number", "value": 110.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "arc1": { diff --git a/rust/kcl-lib/tests/tan_arc_x_line/unparsed.snap b/rust/kcl-lib/tests/tan_arc_x_line/unparsed.snap index cd790a9556..36a7a25bee 100644 --- a/rust/kcl-lib/tests/tan_arc_x_line/unparsed.snap +++ b/rust/kcl-lib/tests/tan_arc_x_line/unparsed.snap @@ -4,9 +4,9 @@ description: Result of unparsing tan_arc_x_line.kcl --- startX = 0 startY = 0 -angleOffset = 135 +angleOffset = 135deg r = 1 -angleStart = 110 +angleStart = 110deg startSketchOn(XY) |> startProfile(at = [startX, startY]) diff --git a/rust/kcl-lib/tests/tangential_arc/artifact_graph_flowchart.snap.md b/rust/kcl-lib/tests/tangential_arc/artifact_graph_flowchart.snap.md index 92d6c0b4b1..92db56f633 100644 --- a/rust/kcl-lib/tests/tangential_arc/artifact_graph_flowchart.snap.md +++ b/rust/kcl-lib/tests/tangential_arc/artifact_graph_flowchart.snap.md @@ -5,14 +5,14 @@ flowchart LR %% [ProgramBodyItem { index: 0 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }] 3["Segment
[66, 85, 0]"] %% [ProgramBodyItem { index: 0 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }] - 4["Segment
[91, 128, 0]"] + 4["Segment
[91, 131, 0]"] %% [ProgramBodyItem { index: 0 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }] - 5["Segment
[134, 154, 0]"] + 5["Segment
[137, 157, 0]"] %% [ProgramBodyItem { index: 0 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }] end 1["Plane
[12, 29, 0]"] %% [ProgramBodyItem { index: 0 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] - 6["Sweep Extrusion
[160, 180, 0]"] + 6["Sweep Extrusion
[163, 183, 0]"] %% [ProgramBodyItem { index: 0 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }] 7[Wall] %% face_code_ref=Missing NodePath diff --git a/rust/kcl-lib/tests/tangential_arc/ast.snap b/rust/kcl-lib/tests/tangential_arc/ast.snap index e61d00ea4f..20edebd584 100644 --- a/rust/kcl-lib/tests/tangential_arc/ast.snap +++ b/rust/kcl-lib/tests/tangential_arc/ast.snap @@ -229,13 +229,13 @@ description: Result of parsing tangential_arc.kcl "arg": { "commentStart": 0, "end": 0, - "raw": "90", + "raw": "90deg", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, - "suffix": "None" + "suffix": "Deg" } } } diff --git a/rust/kcl-lib/tests/tangential_arc/input.kcl b/rust/kcl-lib/tests/tangential_arc/input.kcl index 0f701a5c33..73394a282f 100644 --- a/rust/kcl-lib/tests/tangential_arc/input.kcl +++ b/rust/kcl-lib/tests/tangential_arc/input.kcl @@ -1,6 +1,6 @@ boxSketch = startSketchOn(XY) |> startProfile(at = [0, 0]) |> line(end = [0, 10]) - |> tangentialArc(radius = 5, angle = 90) + |> tangentialArc(radius = 5, angle = 90deg) |> line(end = [5, -15]) |> extrude(length = 10) diff --git a/rust/kcl-lib/tests/tangential_arc/unparsed.snap b/rust/kcl-lib/tests/tangential_arc/unparsed.snap index b37e9248ea..f364d87436 100644 --- a/rust/kcl-lib/tests/tangential_arc/unparsed.snap +++ b/rust/kcl-lib/tests/tangential_arc/unparsed.snap @@ -5,6 +5,6 @@ description: Result of unparsing tangential_arc.kcl boxSketch = startSketchOn(XY) |> startProfile(at = [0, 0]) |> line(end = [0, 10]) - |> tangentialArc(radius = 5, angle = 90) + |> tangentialArc(radius = 5, angle = 90deg) |> line(end = [5, -15]) |> extrude(length = 10) diff --git a/rust/kcl-wasm-lib/src/wasm.rs b/rust/kcl-wasm-lib/src/wasm.rs index c44f8c634f..20acc57c60 100644 --- a/rust/kcl-wasm-lib/src/wasm.rs +++ b/rust/kcl-wasm-lib/src/wasm.rs @@ -289,14 +289,13 @@ pub fn kcl_settings(program_json: &str) -> Result { /// Takes a kcl string and Meta settings and changes the meta settings in the kcl string. #[wasm_bindgen] -pub fn change_default_units(code: &str, len_str: &str, angle_str: &str) -> Result { +pub fn change_default_units(code: &str, len_str: &str) -> Result { console_error_panic_hook::set_once(); let len: Option = serde_json::from_str(len_str).map_err(|e| e.to_string())?; - let angle: Option = serde_json::from_str(angle_str).map_err(|e| e.to_string())?; let program = Program::parse_no_errs(code).map_err(|e| e.to_string())?; - let new_program = program.change_default_units(len, angle).map_err(|e| e.to_string())?; + let new_program = program.change_default_units(len).map_err(|e| e.to_string())?; let formatted = new_program.recast(); diff --git a/src/components/SetAngleLengthModal.tsx b/src/components/SetAngleLengthModal.tsx index e45518b360..679ffbf929 100644 --- a/src/components/SetAngleLengthModal.tsx +++ b/src/components/SetAngleLengthModal.tsx @@ -22,7 +22,7 @@ type ModalResolve = { type ModalReject = boolean type SetAngleLengthModalProps = InstanceProps & { - value: number + value: string valueName: string shouldCreateVariable?: boolean } @@ -41,8 +41,10 @@ export const SetAngleLengthModal = ({ valueName, shouldCreateVariable: initialShouldCreateVariable = false, }: SetAngleLengthModalProps) => { - const [sign, setSign] = useState(Math.sign(Number(initialValue))) - const [value, setValue] = useState(String(initialValue * sign)) + const [sign, setSign] = useState(initialValue.startsWith('-') ? -1 : 1) + const [value, setValue] = useState( + initialValue.startsWith('-') ? initialValue.substring(1) : initialValue + ) const [shouldCreateVariable, setShouldCreateVariable] = useState( initialShouldCreateVariable ) diff --git a/src/components/SetHorVertDistanceModal.tsx b/src/components/SetHorVertDistanceModal.tsx index dd9fd406e1..9e3fa841a9 100644 --- a/src/components/SetHorVertDistanceModal.tsx +++ b/src/components/SetHorVertDistanceModal.tsx @@ -25,7 +25,7 @@ type ModalReject = boolean type GetInfoModalProps = InstanceProps & { segName: string isSegNameEditable: boolean - value?: number + value?: string initialVariableName: string } @@ -44,10 +44,12 @@ export const GetInfoModal = ({ value: initialValue, initialVariableName, }: GetInfoModalProps) => { - const [sign, setSign] = useState(Math.sign(Number(initialValue))) + const [sign, setSign] = useState(initialValue?.startsWith('-') ? -1 : 1) const [segName, setSegName] = useState(initialSegName) const [value, setValue] = useState( - initialValue === undefined ? '' : String(Math.abs(initialValue)) + initialValue?.startsWith('-') + ? initialValue.substring(1) + : initialValue || '' ) const [shouldCreateVariable, setShouldCreateVariable] = useState(false) diff --git a/src/components/Toolbar/Intersect.tsx b/src/components/Toolbar/Intersect.tsx index a1c50f45ef..3c8db63f37 100644 --- a/src/components/Toolbar/Intersect.tsx +++ b/src/components/Toolbar/Intersect.tsx @@ -171,7 +171,7 @@ export async function applyConstraintIntersect({ if ( !variableName && segName === tagInfo?.tag && - Number(value) === valueUsedInTransform + value === valueUsedInTransform ) { return { modifiedAst, diff --git a/src/components/Toolbar/SetAbsDistance.tsx b/src/components/Toolbar/SetAbsDistance.tsx index 9beac96f95..fb3653c77a 100644 --- a/src/components/Toolbar/SetAbsDistance.tsx +++ b/src/components/Toolbar/SetAbsDistance.tsx @@ -108,7 +108,7 @@ export async function applyConstraintAbsDistance({ if (err(transform1)) return Promise.reject(transform1) const { valueUsedInTransform } = transform1 - let forceVal = valueUsedInTransform || 0 + let forceVal = valueUsedInTransform || '' const { valueNode, variableName, newVariableInsertIndex, sign } = await getModalInfo({ value: forceVal, diff --git a/src/components/Toolbar/SetAngleBetween.tsx b/src/components/Toolbar/SetAngleBetween.tsx index 7bef34e6b0..b8d3628b9a 100644 --- a/src/components/Toolbar/SetAngleBetween.tsx +++ b/src/components/Toolbar/SetAngleBetween.tsx @@ -120,7 +120,7 @@ export async function applyConstraintAngleBetween({ } as any) if ( segName === tagInfo?.tag && - Number(value) === valueUsedInTransform && + value === valueUsedInTransform && !variableName ) { return { diff --git a/src/components/Toolbar/SetHorzVertDistance.tsx b/src/components/Toolbar/SetHorzVertDistance.tsx index d279064ef7..ad358f325c 100644 --- a/src/components/Toolbar/SetHorzVertDistance.tsx +++ b/src/components/Toolbar/SetHorzVertDistance.tsx @@ -127,7 +127,7 @@ export async function applyConstraintHorzVertDistance({ if ( !variableName && segName === tagInfo?.tag && - Number(value) === valueUsedInTransform + value === valueUsedInTransform ) { return { modifiedAst, diff --git a/src/components/Toolbar/setAngleLength.tsx b/src/components/Toolbar/setAngleLength.tsx index 5111b93628..f65e902bfa 100644 --- a/src/components/Toolbar/setAngleLength.tsx +++ b/src/components/Toolbar/setAngleLength.tsx @@ -122,25 +122,36 @@ export async function applyConstraintAngleLength({ const isReferencingXAxisAngle = isReferencingXAxis && angleOrLength === 'setAngle' - let forceVal = valueUsedInTransform || 0 + let forceVal = valueUsedInTransform || '' + // TODO it would be better to preserve the units, but its an edge case for now. + let degrees + if (forceVal.endsWith('rad')) { + degrees = + Number(forceVal.substring(0, forceVal.length - 3)) * (180 / Math.PI) + } else { + if (forceVal.endsWith('deg')) { + forceVal = forceVal.substring(0, forceVal.length - 3) + } + degrees = Number(forceVal) + } + let calcIdentifier = createName(['turns'], 'ZERO') if (isReferencingYAxisAngle) { calcIdentifier = createName( ['turns'], - forceVal < 0 ? 'THREE_QUARTER_TURN' : 'QUARTER_TURN' + degrees < 0 ? 'THREE_QUARTER_TURN' : 'QUARTER_TURN' ) - forceVal = normaliseAngle(forceVal + (forceVal < 0 ? 90 : -90)) + degrees = normaliseAngle(degrees + (degrees < 0 ? 90 : -90)) } else if (isReferencingXAxisAngle) { calcIdentifier = createName( ['turns'], - Math.abs(forceVal) > 90 ? 'HALF_TURN' : 'ZERO' + Math.abs(degrees) > 90 ? 'HALF_TURN' : 'ZERO' ) - forceVal = - Math.abs(forceVal) > 90 ? normaliseAngle(forceVal - 180) : forceVal + degrees = Math.abs(degrees) > 90 ? normaliseAngle(degrees - 180) : forceVal } const { valueNode, variableName, newVariableInsertIndex, sign } = await getModalInfo({ - value: forceVal, + value: String(degrees) + 'deg', valueName: angleOrLength === 'setAngle' ? 'angle' : 'length', shouldCreateVariable: true, }) diff --git a/src/components/UnitsMenu.tsx b/src/components/UnitsMenu.tsx index 77cc639be7..286e943a24 100644 --- a/src/components/UnitsMenu.tsx +++ b/src/components/UnitsMenu.tsx @@ -2,11 +2,7 @@ import { Popover } from '@headlessui/react' import { useEffect, useState } from 'react' import toast from 'react-hot-toast' -import { - changeDefaultUnits, - unitAngleToUnitAng, - unitLengthToUnitLen, -} from '@src/lang/wasm' +import { changeDefaultUnits, unitLengthToUnitLen } from '@src/lang/wasm' import { DEFAULT_DEFAULT_LENGTH_UNIT } from '@src/lib/constants' import { baseUnitLabels, baseUnitsUnion } from '@src/lib/settings/settingsTypes' import { codeManager, kclManager } from '@src/lib/singletons' @@ -48,8 +44,7 @@ export function UnitsMenu() { onClick={() => { const newCode = changeDefaultUnits( codeManager.code, - unitLengthToUnitLen(unit), - unitAngleToUnitAng(undefined) + unitLengthToUnitLen(unit) ) if (err(newCode)) { toast.error( diff --git a/src/lang/create.ts b/src/lang/create.ts index c020b4fd59..3c53876df5 100644 --- a/src/lang/create.ts +++ b/src/lang/create.ts @@ -20,7 +20,7 @@ import type { Identifier, LabeledArg, Literal, - LiteralValue, + NumericSuffix, ObjectExpression, PathToNode, PipeExpression, @@ -31,60 +31,77 @@ import type { VariableDeclaration, VariableDeclarator, } from '@src/lang/wasm' -import { formatNumberLiteral } from '@src/lang/wasm' import { err } from '@src/lib/trap' -export function createLiteral(value: number | string | boolean): Node { +export function createLiteral( + value: number | string | boolean, + suffix?: NumericSuffix +): Node { // TODO: Should we handle string escape sequences? return { type: 'Literal', start: 0, end: 0, moduleId: 0, - value: typeof value === 'number' ? { value, suffix: 'None' } : value, - raw: `${value}`, + value: + typeof value === 'number' + ? { value, suffix: suffix ? suffix : 'None' } + : value, + raw: createRawStr(value, suffix), outerAttrs: [], preComments: [], commentStart: 0, } } -/** - * Note: This depends on WASM, but it's not async. Callers are responsible for - * awaiting init of the WASM module. - */ -export function createLiteralMaybeSuffix( - value: LiteralValue -): Node | Error { - if (typeof value === 'string' || typeof value === 'boolean') { - return createLiteral(value) +function createRawStr( + value: number | string | boolean, + suffix?: NumericSuffix +): string { + if (typeof value !== 'number' || !suffix) { + return `${value}` } - let raw: string - if (typeof value.value === 'number' && value.suffix === 'None') { - // Fast path for numbers when there are no units. - raw = `${value.value}` - } else { - const formatted = formatNumberLiteral(value.value, value.suffix) - if (err(formatted)) { - return new Error( - `Invalid number literal: value=${value.value}, suffix=${value.suffix}`, - { cause: formatted } - ) - } - raw = formatted - } - return { - type: 'Literal', - start: 0, - end: 0, - moduleId: 0, - value, - raw, - outerAttrs: [], - preComments: [], - commentStart: 0, + let sufStr + switch (suffix) { + case 'None': + case 'Length': + case 'Angle': + sufStr = '' + break + case 'Count': + sufStr = '_' + break + case 'Mm': + sufStr = 'mm' + break + case 'Cm': + sufStr = 'cm' + break + case 'M': + sufStr = 'm' + break + case 'Inch': + sufStr = 'in' + break + case 'Ft': + sufStr = 'ft' + break + case 'Yd': + sufStr = 'yd' + break + case 'Deg': + sufStr = 'deg' + break + case 'Rad': + sufStr = 'rad' + break + case 'Unknown': + sufStr = '_?' + break } + + return `${value}${sufStr}` } export function createTagDeclarator(value: string): Node { diff --git a/src/lang/modifyAst.test.ts b/src/lang/modifyAst.test.ts index f65d4c6ed6..960b51386c 100644 --- a/src/lang/modifyAst.test.ts +++ b/src/lang/modifyAst.test.ts @@ -4,7 +4,6 @@ import { createArrayExpression, createIdentifier, createLiteral, - createLiteralMaybeSuffix, createObjectExpression, createPipeExpression, createPipeSubstitution, @@ -24,13 +23,12 @@ import { getNodePathFromSourceRange } from '@src/lang/queryAstNodePathUtils' import type { Artifact } from '@src/lang/std/artifactGraph' import { codeRefFromRange } from '@src/lang/std/artifactGraph' import { topLevelRange } from '@src/lang/util' -import type { Identifier, Literal, LiteralValue } from '@src/lang/wasm' +import type { Identifier, Literal } from '@src/lang/wasm' import { assertParse, recast } from '@src/lang/wasm' import { initPromise } from '@src/lang/wasmUtils' import { enginelessExecutor } from '@src/lib/testHelpers' import { err } from '@src/lib/trap' import { deleteFromSelection } from '@src/lang/modifyAst/deleteFromSelection' -import { assertNotErr } from '@src/unitTestUtils' beforeAll(async () => { await initPromise @@ -45,9 +43,7 @@ describe('Testing createLiteral', () => { expect((result as Literal).raw).toBe('5') }) it('should create a literal number with units', () => { - const lit: LiteralValue = { value: 5, suffix: 'Mm' } - const result = createLiteralMaybeSuffix(lit) - assertNotErr(result) + const result = createLiteral(5, 'Mm') expect(result.type).toBe('Literal') expect((result as any).value.value).toBe(5) expect((result as any).value.suffix).toBe('Mm') @@ -305,24 +301,24 @@ describe('Testing moveValueIntoNewVariable', () => { ` const code = `${fn('def')}${fn('jkl')}${fn('hmm')} fn ghi(@x) { - return 2 + return 2deg } -abc = 3 +abc = 3deg identifierGuy = 5 -yo = 5 + 6 +yo = 5deg + 6deg part001 = startSketchOn(XY) |> startProfile(at = [-1.2, 4.83]) |> line(end = [2.8, 0]) -|> angledLine(angle = 100 + 100, length = 3.09) +|> angledLine(angle = 100deg + 100deg, length = 3.09) |> angledLine(angle = abc, length = 3.09) |> angledLine(angle = def(yo), length = 3.09) |> angledLine(angle = ghi(%), length = 3.09) -|> angledLine(angle = jkl(yo) + 2, length = 3.09) +|> angledLine(angle = jkl(yo) + 2deg, length = 3.09) yo2 = hmm([identifierGuy + 5])` it('should move a binary expression into a new variable', async () => { const ast = assertParse(code) const execState = await enginelessExecutor(ast) - const startIndex = code.indexOf('100 + 100') + 1 + const startIndex = code.indexOf('100deg + 100deg') + 1 const { modifiedAst } = moveValueIntoNewVariable( ast, execState.variables, @@ -330,7 +326,7 @@ yo2 = hmm([identifierGuy + 5])` 'newVar' ) const newCode = recast(modifiedAst) - expect(newCode).toContain(`newVar = 100 + 100`) + expect(newCode).toContain(`newVar = 100deg + 100deg`) expect(newCode).toContain(`angledLine(angle = newVar, length = 3.09)`) }) it('should move a value into a new variable', async () => { @@ -372,7 +368,7 @@ yo2 = hmm([identifierGuy + 5])` 'newVar' ) const newCode = recast(modifiedAst) - expect(newCode).toContain(`newVar = jkl(yo) + 2`) + expect(newCode).toContain(`newVar = jkl(yo) + 2deg`) expect(newCode).toContain(`angledLine(angle = newVar, length = 3.09)`) }) it('should move a identifier into a new variable', async () => { @@ -587,7 +583,7 @@ describe('Testing deleteSegmentFromPipeExpression', () => { ) => `part001 = startSketchOn(-XZ) |> startProfile(at = [54.78, -95.91]) |> line(end = [306.21, 198.82], tag = $b) -${!replace1 ? ` |> ${line}\n` : ''} |> angledLine(angle = -65, length = ${ +${!replace1 ? ` |> ${line}\n` : ''} |> angledLine(angle = -65deg, length = ${ !replace1 ? 'segLen(a)' : replace1 }) |> line(end = [306.21, 198.87]) @@ -595,45 +591,49 @@ ${!replace1 ? ` |> ${line}\n` : ''} |> angledLine(angle = -65, length = ${ |> line(end = [-963.39, -154.67]) ` test.each([ - ['line', 'line(end = [306.21, 198.85], tag = $a)', ['365.11', '33']], + ['line', 'line(end = [306.21, 198.85], tag = $a)', ['365.11', '33deg']], [ 'lineTo', 'line(endAbsolute = [306.21, 198.85], tag = $a)', - ['110.48', '120'], + ['110.48', '120deg'], + ], + ['yLine', 'yLine(length = 198.85, tag = $a)', ['198.85', '90deg']], + ['xLine', 'xLine(length = 198.85, tag = $a)', ['198.85', '0deg']], + ['yLineTo', 'yLine(endAbsolute = 198.85, tag = $a)', ['95.94', '90deg']], + [ + 'xLineTo', + 'xLine(endAbsolute = 198.85, tag = $a)', + ['162.14', '180deg'], ], - ['yLine', 'yLine(length = 198.85, tag = $a)', ['198.85', '90']], - ['xLine', 'xLine(length = 198.85, tag = $a)', ['198.85', '0']], - ['yLineTo', 'yLine(endAbsolute = 198.85, tag = $a)', ['95.94', '90']], - ['xLineTo', 'xLine(endAbsolute = 198.85, tag = $a)', ['162.14', '180']], [ 'angledLine', - 'angledLine(angle = 45.5, length = 198.85, tag = $a)', - ['198.85', '46'], + 'angledLine(angle = 45.5deg, length = 198.85, tag = $a)', + ['198.85', '46deg'], ], [ 'angledLine', - 'angledLine(angle = 45.5, lengthX = 198.85, tag = $a)', - ['283.7', '46'], + 'angledLine(angle = 45.5deg, lengthX = 198.85, tag = $a)', + ['283.7', '46deg'], ], [ 'angledLine', - 'angledLine(angle = 45.5, lengthY = 198.85, tag = $a)', - ['278.79', '46'], + 'angledLine(angle = 45.5deg, lengthY = 198.85, tag = $a)', + ['278.79', '46deg'], ], [ 'angledLine', - 'angledLine(angle = 45.5, endAbsoluteX = 198.85, tag = $a)', - ['231.33', '-134'], + 'angledLine(angle = 45.5deg, endAbsoluteX = 198.85, tag = $a)', + ['231.33', '-134deg'], ], [ 'angledLine', - 'angledLine(angle = 45.5, endAbsoluteY = 198.85, tag = $a)', - ['134.51', '46'], + 'angledLine(angle = 45.5deg, endAbsoluteY = 198.85, tag = $a)', + ['134.51', '46deg'], ], [ 'angledLineThatIntersects', - `angledLineThatIntersects(angle = 45.5, intersectTag = b, offset = 198.85, tag = $a)`, - ['918.4', '46'], + `angledLineThatIntersects(angle = 45.5deg, intersectTag = b, offset = 198.85, tag = $a)`, + ['918.4', '46deg'], ], ])(`%s`, async (_, line, [replace1, replace2]) => { const code = makeCode(line) @@ -724,7 +724,7 @@ sketch003 = startSketchOn(XZ) // |> startProfile(at = [-12.55, 2.89]) // |> line(end = [3.02, 1.9]) // |> line(end = [1.82, -1.49], tag = $seg02) - // |> angledLine(angle = -86, length = segLen(seg02)) + // |> angledLine(angle = -86deg, length = segLen(seg02)) // |> line(end = [-3.97, -0.53]) // |> line(end = [0.3, 0.84]) // |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) @@ -749,7 +749,7 @@ sketch003 = startSketchOn(XZ) // |> startProfile(at = [-12.55, 2.89]) // |> line(end = [3.02, 1.9]) // |> line(end = [1.82, -1.49], tag = $seg02) - // |> angledLine(angle = -86, length = segLen(seg02)) + // |> angledLine(angle = -86deg, length = segLen(seg02)) // |> line(end = [-3.97, -0.53]) // |> line(end = [0.3, 0.84]) // |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) @@ -778,7 +778,7 @@ sketch003 = startSketchOn(XZ) // |> startProfile(at = [-12.55, 2.89]) // |> line(end = [3.02, 1.9]) // |> line(end = [1.82, -1.49], tag = $seg02) - // |> angledLine(angle = -86, length = segLen(seg02)) + // |> angledLine(angle = -86deg, length = segLen(seg02)) // |> line(end = [-3.97, -0.53]) // |> line(end = [0.3, 0.84]) // |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) @@ -803,7 +803,7 @@ sketch003 = startSketchOn(XZ) // |> startProfile(at = [-12.55, 2.89]) // |> line(end = [3.02, 1.9]) // |> line(end = [1.82, -1.49], tag = $seg02) - // |> angledLine(angle = -86, length = segLen(seg02)) + // |> angledLine(angle = -86deg, length = segLen(seg02)) // |> line(end = [-3.97, -0.53]) // |> line(end = [0.3, 0.84]) // |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) diff --git a/src/lang/project.ts b/src/lang/project.ts index 32530877e4..3fbd95caac 100644 --- a/src/lang/project.ts +++ b/src/lang/project.ts @@ -1,10 +1,6 @@ import type { UnitLength } from '@rust/kcl-lib/bindings/ModelingCmd' -import { - changeDefaultUnits, - unitAngleToUnitAng, - unitLengthToUnitLen, -} from '@src/lang/wasm' +import { changeDefaultUnits, unitLengthToUnitLen } from '@src/lang/wasm' import { DEFAULT_DEFAULT_LENGTH_UNIT } from '@src/lib/constants' /** @@ -26,9 +22,5 @@ export function newKclFile( return '' } - return changeDefaultUnits( - '', - unitLengthToUnitLen(defaultLengthUnit), - unitAngleToUnitAng(undefined) - ) + return changeDefaultUnits('', unitLengthToUnitLen(defaultLengthUnit)) } diff --git a/src/lang/std/sketch.test.ts b/src/lang/std/sketch.test.ts index 41376af724..534f2ae382 100644 --- a/src/lang/std/sketch.test.ts +++ b/src/lang/std/sketch.test.ts @@ -204,7 +204,7 @@ describe('testing addTagForSketchOnFace', () => { const genCode = (insertCode: string) => `sketch001 = startSketchOn(XZ) |> startProfile(at = [75.8, 317.2]) // [$startCapTag, $EndCapTag] |> angledLine(angle = 0, length = 268.43, tag = $rectangleSegmentA001) - |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 217.26, tag = $seg01) + |> angledLine(angle = segAng(rectangleSegmentA001) - 90deg, length = 217.26, tag = $seg01) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg02) |> close() @@ -281,18 +281,18 @@ describe('testing getConstraintInfo', () => { const code = `part001 = startSketchOn(-XZ) |> startProfile(at = [0,0]) |> line(end = [3, 4]) - |> angledLine(angle = 3.14, length = 3.14) + |> angledLine(angle = 3.14deg, length = 3.14) |> line(endAbsolute = [6.14, 3.14]) |> xLine(endAbsolute = 8) |> yLine(endAbsolute = 5) |> yLine(length = 3.14, tag = $a) |> xLine(length = 3.14) - |> angledLine(angle = 3.14, lengthX = 3.14) - |> angledLine(angle = 30, lengthY = 3) - |> angledLine(angle = 12.14, endAbsoluteX = 12) - |> angledLine(angle = 30, endAbsoluteY = 10.14) + |> angledLine(angle = 3.14deg, lengthX = 3.14) + |> angledLine(angle = 30deg, lengthY = 3) + |> angledLine(angle = 12.14deg, endAbsoluteX = 12) + |> angledLine(angle = 30deg, endAbsoluteY = 10.14) |> angledLineThatIntersects( - angle = 3.14, + angle = 3.14deg, intersectTag = a, offset = 0, ) @@ -327,7 +327,7 @@ describe('testing getConstraintInfo', () => { { type: 'angle', isConstrained: false, - value: '3.14', + value: '3.14deg', sourceRange: [expect.any(Number), expect.any(Number), 0], argPosition: { type: 'labeledArg', key: 'angle' }, pathToNode: expect.any(Array), @@ -473,7 +473,7 @@ describe('testing getConstraintInfo', () => { { type: 'angle', isConstrained: false, - value: '3.14', + value: '3.14deg', sourceRange: [expect.any(Number), expect.any(Number), 0], argPosition: { type: 'labeledArg', key: 'angle' }, pathToNode: expect.any(Array), @@ -496,7 +496,7 @@ describe('testing getConstraintInfo', () => { { type: 'angle', isConstrained: false, - value: '30', + value: '30deg', sourceRange: [expect.any(Number), expect.any(Number), 0], argPosition: { type: 'labeledArg', key: 'angle' }, pathToNode: expect.any(Array), @@ -519,7 +519,7 @@ describe('testing getConstraintInfo', () => { { type: 'angle', isConstrained: false, - value: '12.14', + value: '12.14deg', sourceRange: [expect.any(Number), expect.any(Number), 0], argPosition: { type: 'labeledArg', key: 'angle' }, pathToNode: expect.any(Array), @@ -542,7 +542,7 @@ describe('testing getConstraintInfo', () => { { type: 'angle', isConstrained: false, - value: '30', + value: '30deg', sourceRange: [expect.any(Number), expect.any(Number), 0], argPosition: { type: 'labeledArg', key: 'angle' }, pathToNode: expect.any(Array), @@ -565,7 +565,7 @@ describe('testing getConstraintInfo', () => { { type: 'angle', isConstrained: false, - value: '3.14', + value: '3.14deg', sourceRange: [expect.any(Number), expect.any(Number), 0], argPosition: { type: 'labeledArg', key: 'angle' }, pathToNode: expect.any(Array), @@ -658,18 +658,18 @@ describe('testing getConstraintInfo', () => { const code = `part001 = startSketchOn(-XZ) |> startProfile(at = [0, 0]) |> line(end = [3, 4]) - |> angledLine(angle = 3.14, length = 3.14) + |> angledLine(angle = 3.14deg, length = 3.14) |> line(endAbsolute = [6.14, 3.14]) |> xLine(endAbsolute = 8) |> yLine(endAbsolute = 5) |> yLine(length = 3.14, tag = $a) |> xLine(length = 3.14) - |> angledLine(angle = 3.14, lengthX = 3.14) - |> angledLine(angle = 30, lengthY = 3) - |> angledLine(angle = 12, endAbsoluteX = 12) - |> angledLine(angle = 30, endAbsoluteY = 10) + |> angledLine(angle = 3.14deg, lengthX = 3.14) + |> angledLine(angle = 30deg, lengthY = 3) + |> angledLine(angle = 12deg, endAbsoluteX = 12) + |> angledLine(angle = 30deg, endAbsoluteY = 10) |> angledLineThatIntersects( - angle = 3.14, + angle = 3.14deg, intersectTag = a, offset = 0, ) @@ -681,7 +681,7 @@ describe('testing getConstraintInfo', () => { { type: 'angle', isConstrained: false, - value: '3.14', + value: '3.14deg', sourceRange: [expect.any(Number), expect.any(Number), 0], argPosition: { type: 'labeledArg', key: 'angle' }, pathToNode: expect.any(Array), @@ -704,7 +704,7 @@ describe('testing getConstraintInfo', () => { { type: 'angle', isConstrained: false, - value: '3.14', + value: '3.14deg', sourceRange: [expect.any(Number), expect.any(Number), 0], argPosition: { type: 'labeledArg', key: 'angle' }, pathToNode: expect.any(Array), @@ -727,7 +727,7 @@ describe('testing getConstraintInfo', () => { { type: 'angle', isConstrained: false, - value: '30', + value: '30deg', sourceRange: [expect.any(Number), expect.any(Number), 0], argPosition: { type: 'labeledArg', key: 'angle' }, pathToNode: expect.any(Array), @@ -750,7 +750,7 @@ describe('testing getConstraintInfo', () => { { type: 'angle', isConstrained: false, - value: '12', + value: '12deg', sourceRange: [expect.any(Number), expect.any(Number), 0], argPosition: { type: 'labeledArg', key: 'angle' }, pathToNode: expect.any(Array), @@ -773,7 +773,7 @@ describe('testing getConstraintInfo', () => { { type: 'angle', isConstrained: false, - value: '30', + value: '30deg', sourceRange: [expect.any(Number), expect.any(Number), 0], argPosition: { type: 'labeledArg', key: 'angle' }, pathToNode: expect.any(Array), @@ -814,18 +814,18 @@ describe('testing getConstraintInfo', () => { const code = `part001 = startSketchOn(-XZ) |> startProfile(at = [0, 0]) |> line(end = [3 + 0, 4 + 0]) - |> angledLine(angle = 3.14 + 0, length = 3.14 + 0 ) + |> angledLine(angle = 3.14deg + 0, length = 3.14 + 0 ) |> line(endAbsolute = [6.14 + 0, 3.14 + 0]) |> xLine(endAbsolute = 8 + 0) |> yLine(endAbsolute = 5 + 0) |> yLine(length = 3.14 + 0, tag = $a) |> xLine(length = 3.14 + 0) - |> angledLine(angle = 3.14 + 0, lengthX = 3.14 + 0) - |> angledLine(angle = 30 + 0, lengthY = 3 + 0) - |> angledLine(angle = 12.14 + 0, endAbsoluteX = 12 + 0) - |> angledLine(angle = 30 + 0, endAbsoluteY = 10.14 + 0) + |> angledLine(angle = 3.14deg + 0, lengthX = 3.14 + 0) + |> angledLine(angle = 30deg + 0, lengthY = 3 + 0) + |> angledLine(angle = 12.14deg + 0, endAbsoluteX = 12 + 0) + |> angledLine(angle = 30deg + 0, endAbsoluteY = 10.14 + 0) |> angledLineThatIntersects( - angle = 3.14 + 0, + angle = 3.14deg + 0, intersectTag = a, offset = 0 + 0, ) @@ -860,7 +860,7 @@ describe('testing getConstraintInfo', () => { { type: 'angle', isConstrained: true, - value: '3.14 + 0', + value: '3.14deg + 0', sourceRange: [expect.any(Number), expect.any(Number), 0], argPosition: { type: 'labeledArg', key: 'angle' }, pathToNode: expect.any(Array), @@ -1006,7 +1006,7 @@ describe('testing getConstraintInfo', () => { { type: 'angle', isConstrained: true, - value: '3.14 + 0', + value: '3.14deg + 0', sourceRange: [expect.any(Number), expect.any(Number), 0], argPosition: { type: 'labeledArg', key: 'angle' }, pathToNode: expect.any(Array), @@ -1029,7 +1029,7 @@ describe('testing getConstraintInfo', () => { { type: 'angle', isConstrained: true, - value: '30 + 0', + value: '30deg + 0', sourceRange: [expect.any(Number), expect.any(Number), 0], argPosition: { type: 'labeledArg', key: 'angle' }, pathToNode: expect.any(Array), @@ -1052,7 +1052,7 @@ describe('testing getConstraintInfo', () => { { type: 'angle', isConstrained: true, - value: '12.14 + 0', + value: '12.14deg + 0', sourceRange: [expect.any(Number), expect.any(Number), 0], argPosition: { type: 'labeledArg', key: 'angle' }, pathToNode: expect.any(Array), @@ -1075,7 +1075,7 @@ describe('testing getConstraintInfo', () => { { type: 'angle', isConstrained: true, - value: '30 + 0', + value: '30deg + 0', sourceRange: [expect.any(Number), expect.any(Number), 0], argPosition: { type: 'labeledArg', key: 'angle' }, pathToNode: expect.any(Array), @@ -1098,7 +1098,7 @@ describe('testing getConstraintInfo', () => { { type: 'angle', isConstrained: true, - value: '3.14 + 0', + value: '3.14deg + 0', sourceRange: [expect.any(Number), expect.any(Number), 0], argPosition: { type: 'labeledArg', key: 'angle' }, pathToNode: expect.any(Array), diff --git a/src/lang/std/sketch.ts b/src/lang/std/sketch.ts index c0528e4215..b9dcbf4e26 100644 --- a/src/lang/std/sketch.ts +++ b/src/lang/std/sketch.ts @@ -31,7 +31,6 @@ import { createCallExpressionStdLibKw, createLabeledArg, createLiteral, - createLiteralMaybeSuffix, createLocalName, createPipeExpression, createTagDeclarator, @@ -1570,9 +1569,12 @@ export const arc: SketchLineHelperKw = { createLabeledArg('radius', createLiteral(roundOff(radius))), createLabeledArg( 'angleStart', - createLiteral(roundOff(startAngleDegrees)) + createLiteral(roundOff(startAngleDegrees), 'Deg') + ), + createLabeledArg( + 'angleEnd', + createLiteral(roundOff(endAngleDegrees), 'Deg') ), - createLabeledArg('angleEnd', createLiteral(roundOff(endAngleDegrees))), ]) if ( @@ -1623,13 +1625,13 @@ export const arc: SketchLineHelperKw = { type: 'objectProperty', key: 'angle', argType: 'angle', - expr: createLiteral(roundOff(startAngleDegrees)), + expr: createLiteral(roundOff(startAngleDegrees), 'Deg'), }, { type: 'objectProperty', key: 'angle', argType: 'angle', - expr: createLiteral(roundOff(endAngleDegrees)), + expr: createLiteral(roundOff(endAngleDegrees), 'Deg'), }, ]) if (err(result)) return result @@ -1689,8 +1691,8 @@ export const arc: SketchLineHelperKw = { const endAngleDegrees = (endAngle * 180) / Math.PI const newRadius = createLiteral(roundOff(radius)) - const newAngleStart = createLiteral(roundOff(startAngleDegrees)) - const newAngleEnd = createLiteral(roundOff(endAngleDegrees)) + const newAngleStart = createLiteral(roundOff(startAngleDegrees), 'Deg') + const newAngleEnd = createLiteral(roundOff(endAngleDegrees), 'Deg') mutateKwArg('radius', callExpression, newRadius) mutateKwArg('angleStart', callExpression, newAngleStart) mutateKwArg('angleEnd', callExpression, newAngleEnd) @@ -2409,7 +2411,7 @@ export const angledLine: SketchLineHelperKw = { createLocalName(snaps?.previousArcTag), [] ) - : createLiteral(roundOff(getAngle(from, to), 0)) + : createLiteral(roundOff(getAngle(from, to), 0), 'Deg') const newLengthVal = createLiteral(roundOff(getLength(from, to), 2)) const newLine = createCallExpressionStdLibKw('angledLine', null, [ createLabeledArg(ARG_ANGLE, newAngleVal), @@ -2463,7 +2465,7 @@ export const angledLine: SketchLineHelperKw = { const angle = roundOff(getAngle(from, to), 0) const lineLength = roundOff(getLength(from, to), 2) - const angleLit = createLiteral(angle) + const angleLit = createLiteral(angle, 'Deg') const lengthLit = createLiteral(lineLength) mutateKwArg(ARG_ANGLE, callExpression, angleLit) @@ -2520,7 +2522,7 @@ export const angledLineOfXLength: SketchLineHelperKw = { if (err(sketch)) { return sketch } - const angle = createLiteral(roundOff(getAngle(from, to), 0)) + const angle = createLiteral(roundOff(getAngle(from, to), 0), 'Deg') const xLength = createLiteral(roundOff(Math.abs(from[0] - to[0]), 2) || 0.1) let newLine: Expr if (replaceExistingCallback) { @@ -2579,7 +2581,7 @@ export const angledLineOfXLength: SketchLineHelperKw = { ? Math.abs(xLength) : xLength // todo make work for variable angle > 180 - const angleLit = createLiteral(angle) + const angleLit = createLiteral(angle, 'Deg') const lengthLit = createLiteral(adjustedXLength) removeDeterminingArgs(callExpression) @@ -2632,7 +2634,7 @@ export const angledLineOfYLength: SketchLineHelperKw = { const sketch = sketchFromKclValue(variables[variableName], variableName) if (err(sketch)) return sketch - const angle = createLiteral(roundOff(getAngle(from, to), 0)) + const angle = createLiteral(roundOff(getAngle(from, to), 0), 'Deg') const yLength = createLiteral(roundOff(Math.abs(from[1] - to[1]), 2) || 0.1) let newLine: Expr if (replaceExistingCallback) { @@ -2691,7 +2693,7 @@ export const angledLineOfYLength: SketchLineHelperKw = { ? Math.abs(yLength) : yLength // todo make work for variable angle > 180 - const angleLit = createLiteral(angle) + const angleLit = createLiteral(angle, 'Deg') const lengthLit = createLiteral(adjustedYLength) removeDeterminingArgs(callExpression) @@ -2728,7 +2730,7 @@ export const angledLineToX: SketchLineHelperKw = { if (err(nodeMeta)) return nodeMeta const { node: pipe } = nodeMeta - const angle = createLiteral(roundOff(getAngle(from, to), 0)) + const angle = createLiteral(roundOff(getAngle(from, to), 0), 'Deg') const xArg = createLiteral(roundOff(to[0], 2)) if (replaceExistingCallback) { const result = replaceExistingCallback([ @@ -2779,7 +2781,7 @@ export const angledLineToX: SketchLineHelperKw = { const adjustedXLength = xLength - const angleLit = createLiteral(angle) + const angleLit = createLiteral(angle, 'Deg') const lengthLit = createLiteral(adjustedXLength) removeDeterminingArgs(callExpression) @@ -2816,7 +2818,7 @@ export const angledLineToY: SketchLineHelperKw = { const { node: pipe } = nodeMeta - const angle = createLiteral(roundOff(getAngle(from, to), 0)) + const angle = createLiteral(roundOff(getAngle(from, to), 0), 'Deg') const yArg = createLiteral(roundOff(to[1], 2)) if (replaceExistingCallback) { @@ -2868,7 +2870,7 @@ export const angledLineToY: SketchLineHelperKw = { const adjustedXLength = xLength - const angleLit = createLiteral(angle) + const angleLit = createLiteral(angle, 'Deg') const lengthLit = createLiteral(adjustedXLength) removeDeterminingArgs(callExpression) @@ -2911,7 +2913,7 @@ export const angledLineThatIntersects: SketchLineHelperKw = { const { node: pipe } = nodeMeta - const angle = createLiteral(roundOff(getAngle(from, to), 0)) + const angle = createLiteral(roundOff(getAngle(from, to), 0), 'Deg') if (!referencedSegment) { return new Error('referencedSegment must be provided') } @@ -2994,7 +2996,7 @@ export const angledLineThatIntersects: SketchLineHelperKw = { ) } - mutateKwArg(ARG_ANGLE, callExpression, createLiteral(angle)) + mutateKwArg(ARG_ANGLE, callExpression, createLiteral(angle, 'Deg')) mutateKwArg(ARG_OFFSET, callExpression, createLiteral(offset)) return { modifiedAst: _node, @@ -3504,7 +3506,7 @@ export function replaceSketchLine({ }): | { modifiedAst: Node - valueUsedInTransform?: number + valueUsedInTransform?: string pathToNode: PathToNode } | Error { @@ -4224,13 +4226,8 @@ const tangentialArcHelpers = { callExpression, createLiteral(roundOff(radius, 2)) ) - const angleValue = createLiteralMaybeSuffix({ - value: roundOff(angle, 2), - suffix: 'Deg', - }) - if (!err(angleValue)) { - mutateKwArg(ARG_ANGLE, callExpression, angleValue) - } + const angleValue = createLiteral(roundOff(angle, 2), 'Deg') + mutateKwArg(ARG_ANGLE, callExpression, angleValue) } else { console.debug('Invalid center calculated for tangential arc') } diff --git a/src/lang/std/sketchConstraints.test.ts b/src/lang/std/sketchConstraints.test.ts index aadcdfe754..cc14295f22 100644 --- a/src/lang/std/sketchConstraints.test.ts +++ b/src/lang/std/sketchConstraints.test.ts @@ -72,22 +72,22 @@ describe('testing swapping out sketch calls with xLine/xLineTo', () => { ` |> startProfile(at = [0, 0])`, ` |> line(endAbsolute = [1, 1], tag = $abc1)`, ` |> line(end = [-2.04, -0.7], tag = $abc2)`, - ` |> angledLine(angle = 157, length = 1.69, tag = $abc3)`, - ` |> angledLine(angle = 217, lengthX = 0.86, tag = $abc4)`, - ` |> angledLine(angle = 104, lengthY = 1.58, tag = $abc5)`, - ` |> angledLine(angle = 55, endAbsoluteX = -2.89, tag = $abc6)`, - ` |> angledLine(angle = 330, endAbsoluteY = 2.53, tag = $abc7)`, + ` |> angledLine(angle = 157deg, length = 1.69, tag = $abc3)`, + ` |> angledLine(angle = 217deg, lengthX = 0.86, tag = $abc4)`, + ` |> angledLine(angle = 104deg, lengthY = 1.58, tag = $abc5)`, + ` |> angledLine(angle = 55deg, endAbsoluteX = -2.89, tag = $abc6)`, + ` |> angledLine(angle = 330deg, endAbsoluteY = 2.53, tag = $abc7)`, ` |> xLine(length = 1.47, tag = $abc8)`, ` |> yLine(length = 1.57, tag = $abc9)`, ` |> xLine(endAbsolute = 1.49, tag = $abc10)`, ` |> yLine(endAbsolute = 2.64, tag = $abc11)`, ` |> line(endAbsolute = [2.55, 3.58]) // lineTo`, ` |> line(end = [0.73, -0.75])`, - ` |> angledLine(angle = 63, length = 1.38) // angledLine`, - ` |> angledLine(angle = 319, lengthX = 1.15) // angledLineOfXLength`, - ` |> angledLine(angle = 50, lengthY = 1.35) // angledLineOfYLength`, - ` |> angledLine(angle = 291, endAbsoluteX = 6.66) // angledLineToX`, - ` |> angledLine(angle = 228, endAbsoluteY = 2.14) // angledLineToY`, + ` |> angledLine(angle = 63deg, length = 1.38) // angledLine`, + ` |> angledLine(angle = 319deg, lengthX = 1.15) // angledLineOfXLength`, + ` |> angledLine(angle = 50deg, lengthY = 1.35) // angledLineOfYLength`, + ` |> angledLine(angle = 291deg, endAbsoluteX = 6.66) // angledLineToX`, + ` |> angledLine(angle = 228deg, endAbsoluteY = 2.14) // angledLineToY`, ` |> xLine(length = -1.33)`, ` |> yLine(length = -1.07)`, ` |> xLine(endAbsolute = 3.27)`, @@ -143,7 +143,7 @@ describe('testing swapping out sketch calls with xLine/xLineTo', () => { it('angledLine with tag converts to xLine', async () => { const { newCode, originalRange } = await testingSwapSketchFnCall({ inputCode: bigExample, - callToSwap: 'angledLine(angle = 157, length = 1.69, tag = $abc3)', + callToSwap: 'angledLine(angle = 157deg, length = 1.69, tag = $abc3)', constraintType: 'horizontal', }) const expectedLine = 'xLine(length = -1.56, tag = $abc3)' @@ -154,7 +154,7 @@ describe('testing swapping out sketch calls with xLine/xLineTo', () => { it('angledLine w/o tag converts to xLine', async () => { const { newCode, originalRange } = await testingSwapSketchFnCall({ inputCode: bigExample, - callToSwap: 'angledLine(angle = 63, length = 1.38)', + callToSwap: 'angledLine(angle = 63deg, length = 1.38)', constraintType: 'horizontal', }) const expectedLine = 'xLine(length = 0.63) // angledLine' @@ -165,7 +165,7 @@ describe('testing swapping out sketch calls with xLine/xLineTo', () => { it('angledLineOfXLength with tag converts to xLine', async () => { const { newCode, originalRange } = await testingSwapSketchFnCall({ inputCode: bigExample, - callToSwap: 'angledLine(angle = 217, lengthX = 0.86, tag = $abc4)', + callToSwap: 'angledLine(angle = 217deg, lengthX = 0.86, tag = $abc4)', constraintType: 'horizontal', }) const expectedLine = 'xLine(length = -0.86, tag = $abc4)' @@ -177,7 +177,7 @@ describe('testing swapping out sketch calls with xLine/xLineTo', () => { it('angledLineOfXLength w/o tag converts to xLine', async () => { const { newCode, originalRange } = await testingSwapSketchFnCall({ inputCode: bigExample, - callToSwap: 'angledLine(angle = 319, lengthX = 1.15)', + callToSwap: 'angledLine(angle = 319deg, lengthX = 1.15)', constraintType: 'horizontal', }) const expectedLine = 'xLine(length = 1.15) // angledLineOfXLength' @@ -188,7 +188,7 @@ describe('testing swapping out sketch calls with xLine/xLineTo', () => { it('angledLineOfYLength with tag converts to yLine', async () => { const { newCode, originalRange } = await testingSwapSketchFnCall({ inputCode: bigExample, - callToSwap: 'angledLine(angle = 104, lengthY = 1.58, tag = $abc5)', + callToSwap: 'angledLine(angle = 104deg, lengthY = 1.58, tag = $abc5)', constraintType: 'vertical', }) const expectedLine = 'yLine(length = 1.58, tag = $abc5)' @@ -199,7 +199,7 @@ describe('testing swapping out sketch calls with xLine/xLineTo', () => { it('angledLineOfYLength w/o tag converts to yLine', async () => { const { newCode, originalRange } = await testingSwapSketchFnCall({ inputCode: bigExample, - callToSwap: 'angledLine(angle = 50, lengthY = 1.35)', + callToSwap: 'angledLine(angle = 50deg, lengthY = 1.35)', constraintType: 'vertical', }) const expectedLine = 'yLine(length = 1.35) // angledLineOfYLength' @@ -210,7 +210,8 @@ describe('testing swapping out sketch calls with xLine/xLineTo', () => { it('angledLineToX with tag converts to xLineTo', async () => { const { newCode, originalRange } = await testingSwapSketchFnCall({ inputCode: bigExample, - callToSwap: 'angledLine(angle = 55, endAbsoluteX = -2.89, tag = $abc6)', + callToSwap: + 'angledLine(angle = 55deg, endAbsoluteX = -2.89, tag = $abc6)', constraintType: 'horizontal', }) const expectedLine = 'xLine(endAbsolute = -2.89, tag = $abc6)' @@ -221,7 +222,7 @@ describe('testing swapping out sketch calls with xLine/xLineTo', () => { it('angledLineToX w/o tag converts to xLineTo', async () => { const { newCode, originalRange } = await testingSwapSketchFnCall({ inputCode: bigExample, - callToSwap: 'angledLine(angle = 291, endAbsoluteX = 6.66)', + callToSwap: 'angledLine(angle = 291deg, endAbsoluteX = 6.66)', constraintType: 'horizontal', }) const expectedLine = 'xLine(endAbsolute = 6.66) // angledLineToX' @@ -232,7 +233,8 @@ describe('testing swapping out sketch calls with xLine/xLineTo', () => { it('angledLineToY with tag converts to yLineTo', async () => { const { newCode, originalRange } = await testingSwapSketchFnCall({ inputCode: bigExample, - callToSwap: 'angledLine(angle = 330, endAbsoluteY = 2.53, tag = $abc7)', + callToSwap: + 'angledLine(angle = 330deg, endAbsoluteY = 2.53, tag = $abc7)', constraintType: 'vertical', }) const expectedLine = 'yLine(endAbsolute = 2.53, tag = $abc7)' @@ -243,7 +245,7 @@ describe('testing swapping out sketch calls with xLine/xLineTo', () => { it('angledLineToY w/o tag converts to yLineTo', async () => { const { newCode, originalRange } = await testingSwapSketchFnCall({ inputCode: bigExample, - callToSwap: 'angledLine(angle = 228, endAbsoluteY = 2.14)', + callToSwap: 'angledLine(angle = 228deg, endAbsoluteY = 2.14)', constraintType: 'vertical', }) const expectedLine = 'yLine(endAbsolute = 2.14) // angledLineToY' @@ -258,7 +260,7 @@ describe('testing swapping out sketch calls with xLine/xLineTo while keeping var const variablesExampleArr = [ `lineX = -1`, `lineToX = -1.3`, - `angledLineAngle = 207`, + `angledLineAngle = 207deg`, `angledLineOfXLengthX = 0.8`, `angledLineOfYLengthY = 0.89`, `angledLineToXx = -1.86`, @@ -270,10 +272,10 @@ describe('testing swapping out sketch calls with xLine/xLineTo while keeping var ` |> line(end = [lineX, 2.13])`, ` |> line(endAbsolute = [lineToX, 2.85])`, ` |> angledLine(angle = angledLineAngle, length = 1.64)`, - ` |> angledLine(angle = 329, lengthX = angledLineOfXLengthX)`, - ` |> angledLine(angle = 222, lengthY = angledLineOfYLengthY)`, - ` |> angledLine(angle = 330, endAbsoluteX = angledLineToXx)`, - ` |> angledLine(angle = 217, endAbsoluteY = angledLineToYy)`, + ` |> angledLine(angle = 329deg, lengthX = angledLineOfXLengthX)`, + ` |> angledLine(angle = 222deg, lengthY = angledLineOfYLengthY)`, + ` |> angledLine(angle = 330deg, endAbsoluteX = angledLineToXx)`, + ` |> angledLine(angle = 217deg, endAbsoluteY = angledLineToYy)`, ` |> line(end = [0.89, -0.1])`, ] const varExample = variablesExampleArr.join('\n') @@ -302,7 +304,7 @@ describe('testing swapping out sketch calls with xLine/xLineTo while keeping var it('angledLineOfXLength keeps variable when converted to xLine', async () => { const { newCode, originalRange } = await testingSwapSketchFnCall({ inputCode: varExample, - callToSwap: 'angledLine(angle = 329, lengthX = angledLineOfXLengthX)', + callToSwap: 'angledLine(angle = 329deg, lengthX = angledLineOfXLengthX)', constraintType: 'horizontal', }) const expectedLine = 'xLine(length = angledLineOfXLengthX)' @@ -313,7 +315,7 @@ describe('testing swapping out sketch calls with xLine/xLineTo while keeping var it('angledLineOfYLength keeps variable when converted to yLine', async () => { const { newCode, originalRange } = await testingSwapSketchFnCall({ inputCode: varExample, - callToSwap: 'angledLine(angle = 222, lengthY = angledLineOfYLengthY)', + callToSwap: 'angledLine(angle = 222deg, lengthY = angledLineOfYLengthY)', constraintType: 'vertical', }) const expectedLine = 'yLine(length = -angledLineOfYLengthY)' @@ -324,7 +326,7 @@ describe('testing swapping out sketch calls with xLine/xLineTo while keeping var it('angledLineToX keeps variable when converted to xLineTo', async () => { const { newCode, originalRange } = await testingSwapSketchFnCall({ inputCode: varExample, - callToSwap: 'angledLine(angle = 330, endAbsoluteX = angledLineToXx)', + callToSwap: 'angledLine(angle = 330deg, endAbsoluteX = angledLineToXx)', constraintType: 'horizontal', }) const expectedLine = 'xLine(endAbsolute = angledLineToXx)' @@ -335,7 +337,7 @@ describe('testing swapping out sketch calls with xLine/xLineTo while keeping var it('angledLineToY keeps variable when converted to yLineTo', async () => { const { newCode, originalRange } = await testingSwapSketchFnCall({ inputCode: varExample, - callToSwap: 'angledLine(angle = 217, endAbsoluteY = angledLineToYy)', + callToSwap: 'angledLine(angle = 217deg, endAbsoluteY = angledLineToYy)', constraintType: 'vertical', }) const expectedLine = 'yLine(endAbsolute = angledLineToYy)' @@ -348,7 +350,7 @@ describe('testing swapping out sketch calls with xLine/xLineTo while keeping var const illegalConvert = () => testingSwapSketchFnCall({ inputCode: varExample, - callToSwap: 'angledLine(angle = 217, endAbsoluteY = angledLineToYy)', + callToSwap: 'angledLine(angle = 217deg, endAbsoluteY = angledLineToYy)', constraintType: 'horizontal', }) await expect(illegalConvert).rejects.toThrowError('no callback helper') diff --git a/src/lang/std/sketchConstraints.ts b/src/lang/std/sketchConstraints.ts index 95305c634d..583c590614 100644 --- a/src/lang/std/sketchConstraints.ts +++ b/src/lang/std/sketchConstraints.ts @@ -99,7 +99,7 @@ export function isSketchVariablesLinked( |> line(end = [myVar, 0.38]) // ❗ <- cursor in this fn call (the primary) |> line(end = [0.41, baz]) |> xLine(length = 0.91) - |> angledLine(angle = 37, length = 2) + |> angledLine(angle = 37deg, length = 2) const yo = line(end = [myVar, 0.38], tag = part001) |> line(end = [1, 1]) const yo2 = line(end = [myVar, 0.38], tag = yo) diff --git a/src/lang/std/sketchcombos.test.ts b/src/lang/std/sketchcombos.test.ts index ed66e016a4..bd46e93ec8 100644 --- a/src/lang/std/sketchcombos.test.ts +++ b/src/lang/std/sketchcombos.test.ts @@ -42,25 +42,29 @@ describe('testing getConstraintType', () => { expect(helper(`line(endAbsolute = [myVar, 5])`)).toBe('xAbsolute') }) it('testing angledLine', () => { - expect(helper(`angledLine(angle = 5, length = myVar)`)).toBe('length') + expect(helper(`angledLine(angle = 5deg, length = myVar)`)).toBe('length') expect(helper(`angledLine(angle = myVar, length = 5)`)).toBe('angle') }) it('testing angledLineOfXLength', () => { - expect(helper(`angledLine(angle = 5, lengthX = myVar)`)).toBe('xRelative') + expect(helper(`angledLine(angle = 5deg, lengthX = myVar)`)).toBe( + 'xRelative' + ) expect(helper(`angledLine(angle = myVar, lengthX = 5)`)).toBe('angle') }) it('testing angledLineToX', () => { - expect(helper(`angledLine(angle = 5, endAbsoluteX = myVar)`)).toBe( + expect(helper(`angledLine(angle = 5deg, endAbsoluteX = myVar)`)).toBe( 'xAbsolute' ) expect(helper(`angledLine(angle = myVar, endAbsoluteX = 5)`)).toBe('angle') }) it('testing angledLineOfYLength', () => { - expect(helper(`angledLine(angle = 5, lengthY = myVar)`)).toBe('yRelative') + expect(helper(`angledLine(angle = 5deg, lengthY = myVar)`)).toBe( + 'yRelative' + ) expect(helper(`angledLine(angle = myVar, lengthY = 5)`)).toBe('angle') }) it('testing angledLineToY', () => { - expect(helper(`angledLine(angle = 5, endAbsoluteY = myVar)`)).toBe( + expect(helper(`angledLine(angle = 5deg, endAbsoluteY = myVar)`)).toBe( 'yAbsolute' ) expect(helper(`angledLine(angle = myVar, endAbsoluteY = 5)`)).toBe('angle') @@ -172,7 +176,7 @@ describe('testing transformAstForSketchLines for equal length constraint', () => const expectedModifiedScript = `sketch001 = startSketchOn(XZ) |> startProfile(at = [0, 0]) |> line(end = [5, 5], tag = $seg01) - |> angledLine(angle = 112, length = segLen(seg01)) + |> angledLine(angle = 112deg, length = segLen(seg01)) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() ` @@ -248,30 +252,30 @@ describe('testing transformAstForSketchLines for equal length constraint', () => const inputScript = `myVar = 3 myVar2 = 5 myVar3 = 6 -myAng = 40 -myAng2 = 134 +myAng = 40deg +myAng2 = 134deg part001 = startSketchOn(XY) |> startProfile(at = [0, 0]) |> line(end = [1, 3.82]) // ln-should-get-tag |> line(endAbsolute = [2, 4]) // ln-lineTo-free should become angledLine - |> angledLine(angle = 45, endAbsoluteX = 2.5) // ln-angledLineToX-free should become angledLine + |> angledLine(angle = 45deg, endAbsoluteX = 2.5) // ln-angledLineToX-free should become angledLine |> angledLine(angle = myAng, endAbsoluteX = 3) // ln-angledLineToX-angle should become angledLine - |> angledLine(angle = 135, endAbsoluteY = 5) // ln-angledLineToY-free should become angledLine + |> angledLine(angle = 135deg, endAbsoluteY = 5) // ln-angledLineToY-free should become angledLine |> angledLine(angle = myAng2, endAbsoluteY = 4) // ln-angledLineToY-angle should become angledLine |> line(end = [myVar, 1]) // ln-should use legLen for y |> line(end = [myVar, -1]) // ln-legLen but negative |> line(end = [-0.62, -1.54]) // ln-should become angledLine |> angledLine(angle = myVar, length = 1.04) // ln-use segLen for second arg - |> angledLine(angle = 45, length = 1.04) // ln-segLen again - |> angledLine(angle = 54, lengthX = 2.35) // ln-should be transformed to angledLine - |> angledLine(angle = 50, lengthX = myVar) // ln-should use legAngX to calculate angle - |> angledLine(angle = 209, lengthX = myVar) // ln-same as above but should have + 180 to match original quadrant + |> angledLine(angle = 45deg, length = 1.04) // ln-segLen again + |> angledLine(angle = 54deg, lengthX = 2.35) // ln-should be transformed to angledLine + |> angledLine(angle = 50deg, lengthX = myVar) // ln-should use legAngX to calculate angle + |> angledLine(angle = 209deg, lengthX = myVar) // ln-same as above but should have + 180 to match original quadrant |> line(end = [1, myVar]) // ln-legLen again but yRelative |> line(end = [-1, myVar]) // ln-negative legLen yRelative - |> angledLine(angle = 58, lengthY = 0.7) // ln-angledLineOfYLength-free should become angledLine + |> angledLine(angle = 58deg, lengthY = 0.7) // ln-angledLineOfYLength-free should become angledLine |> angledLine(angle = myAng, lengthY = 0.7) // ln-angledLineOfYLength-angle should become angledLine - |> angledLine(angle = 35, lengthY = myVar) // ln-angledLineOfYLength-yRelative use legAngY - |> angledLine(angle = 305, lengthY = myVar) // ln-angledLineOfYLength-yRelative with angle > 90 use binExp + |> angledLine(angle = 35deg, lengthY = myVar) // ln-angledLineOfYLength-yRelative use legAngY + |> angledLine(angle = 305deg, lengthY = myVar) // ln-angledLineOfYLength-yRelative with angle > 90 use binExp |> xLine(length = 1.03) // ln-xLine-free should sub in segLen |> yLine(length = 1.04) // ln-yLine-free should sub in segLen |> xLine(endAbsolute = 30) // ln-xLineTo-free should convert to xLine @@ -280,15 +284,15 @@ part001 = startSketchOn(XY) const expectModifiedScript = `myVar = 3 myVar2 = 5 myVar3 = 6 -myAng = 40 -myAng2 = 134 +myAng = 40deg +myAng2 = 134deg part001 = startSketchOn(XY) |> startProfile(at = [0, 0]) |> line(end = [1, 3.82], tag = $seg01) // ln-should-get-tag - |> angledLine(angle = 10, length = segLen(seg01)) // ln-lineTo-free should become angledLine - |> angledLine(angle = 45, length = segLen(seg01)) // ln-angledLineToX-free should become angledLine + |> angledLine(angle = 10deg, length = segLen(seg01)) // ln-lineTo-free should become angledLine + |> angledLine(angle = 45deg, length = segLen(seg01)) // ln-angledLineToX-free should become angledLine |> angledLine(angle = myAng, length = segLen(seg01)) // ln-angledLineToX-angle should become angledLine - |> angledLine(angle = 135, length = segLen(seg01)) // ln-angledLineToY-free should become angledLine + |> angledLine(angle = 135deg, length = segLen(seg01)) // ln-angledLineToY-free should become angledLine |> angledLine(angle = myAng2, length = segLen(seg01)) // ln-angledLineToY-angle should become angledLine |> line(end = [ min([segLen(seg01), myVar]), @@ -298,12 +302,12 @@ part001 = startSketchOn(XY) min([segLen(seg01), myVar]), -legLen(hypotenuse = segLen(seg01), leg = myVar) ]) // ln-legLen but negative - |> angledLine(angle = -112, length = segLen(seg01)) // ln-should become angledLine + |> angledLine(angle = -112deg, length = segLen(seg01)) // ln-should become angledLine |> angledLine(angle = myVar, length = segLen(seg01)) // ln-use segLen for second arg - |> angledLine(angle = 45, length = segLen(seg01)) // ln-segLen again - |> angledLine(angle = 54, length = segLen(seg01)) // ln-should be transformed to angledLine + |> angledLine(angle = 45deg, length = segLen(seg01)) // ln-segLen again + |> angledLine(angle = 54deg, length = segLen(seg01)) // ln-should be transformed to angledLine |> angledLine(angle = legAngX(hypotenuse = segLen(seg01), leg = myVar), lengthX = min([segLen(seg01), myVar])) // ln-should use legAngX to calculate angle - |> angledLine(angle = 180 + legAngX(hypotenuse = segLen(seg01), leg = myVar), lengthX = min([segLen(seg01), myVar])) // ln-same as above but should have + 180 to match original quadrant + |> angledLine(angle = 180deg + legAngX(hypotenuse = segLen(seg01), leg = myVar), lengthX = min([segLen(seg01), myVar])) // ln-same as above but should have + 180 to match original quadrant |> line(end = [ legLen(hypotenuse = segLen(seg01), leg = myVar), min([segLen(seg01), myVar]) @@ -312,10 +316,10 @@ part001 = startSketchOn(XY) -legLen(hypotenuse = segLen(seg01), leg = myVar), min([segLen(seg01), myVar]) ]) // ln-negative legLen yRelative - |> angledLine(angle = 58, length = segLen(seg01)) // ln-angledLineOfYLength-free should become angledLine + |> angledLine(angle = 58deg, length = segLen(seg01)) // ln-angledLineOfYLength-free should become angledLine |> angledLine(angle = myAng, length = segLen(seg01)) // ln-angledLineOfYLength-angle should become angledLine |> angledLine(angle = legAngY(hypotenuse = segLen(seg01), leg = myVar), lengthX = min([segLen(seg01), myVar])) // ln-angledLineOfYLength-yRelative use legAngY - |> angledLine(angle = 270 + legAngY(hypotenuse = segLen(seg01), leg = myVar), lengthX = min([segLen(seg01), myVar])) // ln-angledLineOfYLength-yRelative with angle > 90 use binExp + |> angledLine(angle = 270deg + legAngY(hypotenuse = segLen(seg01), leg = myVar), lengthX = min([segLen(seg01), myVar])) // ln-angledLineOfYLength-yRelative with angle > 90 use binExp |> xLine(length = segLen(seg01)) // ln-xLine-free should sub in segLen |> yLine(length = segLen(seg01)) // ln-yLine-free should sub in segLen |> xLine(length = segLen(seg01)) // ln-xLineTo-free should convert to xLine @@ -370,18 +374,18 @@ part001 = startSketchOn(XY) |> line(endAbsolute = [3, 11]) // select for vertical constraint 3 |> line(endAbsolute = [myVar2, 12.63]) // select for horizontal constraint 4 |> line(endAbsolute = [4.08, myVar2]) // select for vertical constraint 4 - |> angledLine(angle = 156, length = 1.34) // select for horizontal constraint 5 - |> angledLine(angle = 103, length = 1.44) // select for vertical constraint 5 - |> angledLine(angle = -178, length = myVar) // select for horizontal constraint 6 - |> angledLine(angle = 129, length = myVar) // select for vertical constraint 6 - |> angledLine(angle = 237, lengthX = 1.05) // select for horizontal constraint 7 - |> angledLine(angle = 196, lengthY = 1.11) // select for vertical constraint 7 - |> angledLine(angle = 194, lengthX = myVar) // select for horizontal constraint 8 - |> angledLine(angle = 248, lengthY = myVar) // select for vertical constraint 8 - |> angledLine(angle = 202, endAbsoluteX = -10.92) // select for horizontal constraint 9 - |> angledLine(angle = 223, endAbsoluteY = 7.68) // select for vertical constraint 9 - |> angledLine(angle = 333, endAbsoluteX = myVar3) // select for horizontal constraint 10 - |> angledLine(angle = 301, endAbsoluteY = myVar) // select for vertical constraint 10 + |> angledLine(angle = 156deg, length = 1.34) // select for horizontal constraint 5 + |> angledLine(angle = 103deg, length = 1.44) // select for vertical constraint 5 + |> angledLine(angle = -178deg, length = myVar) // select for horizontal constraint 6 + |> angledLine(angle = 129deg, length = myVar) // select for vertical constraint 6 + |> angledLine(angle = 237deg, lengthX = 1.05) // select for horizontal constraint 7 + |> angledLine(angle = 196deg, lengthY = 1.11) // select for vertical constraint 7 + |> angledLine(angle = 194deg, lengthX = myVar) // select for horizontal constraint 8 + |> angledLine(angle = 248deg, lengthY = myVar) // select for vertical constraint 8 + |> angledLine(angle = 202deg, endAbsoluteX = -10.92) // select for horizontal constraint 9 + |> angledLine(angle = 223deg, endAbsoluteY = 7.68) // select for vertical constraint 9 + |> angledLine(angle = 333deg, endAbsoluteX = myVar3) // select for horizontal constraint 10 + |> angledLine(angle = 301deg, endAbsoluteY = myVar) // select for vertical constraint 10 ` it('should transform horizontal lines the ast', async () => { const expectModifiedScript = `myVar = 2 @@ -399,17 +403,17 @@ part001 = startSketchOn(XY) |> xLine(endAbsolute = myVar2) // select for horizontal constraint 4 |> line(endAbsolute = [4.08, myVar2]) // select for vertical constraint 4 |> xLine(length = -1.22) // select for horizontal constraint 5 - |> angledLine(angle = 103, length = 1.44) // select for vertical constraint 5 + |> angledLine(angle = 103deg, length = 1.44) // select for vertical constraint 5 |> xLine(length = -myVar) // select for horizontal constraint 6 - |> angledLine(angle = 129, length = myVar) // select for vertical constraint 6 + |> angledLine(angle = 129deg, length = myVar) // select for vertical constraint 6 |> xLine(length = -1.05) // select for horizontal constraint 7 - |> angledLine(angle = 196, lengthY = 1.11) // select for vertical constraint 7 + |> angledLine(angle = 196deg, lengthY = 1.11) // select for vertical constraint 7 |> xLine(length = -myVar) // select for horizontal constraint 8 - |> angledLine(angle = 248, lengthY = myVar) // select for vertical constraint 8 + |> angledLine(angle = 248deg, lengthY = myVar) // select for vertical constraint 8 |> xLine(endAbsolute = -10.92) // select for horizontal constraint 9 - |> angledLine(angle = 223, endAbsoluteY = 7.68) // select for vertical constraint 9 + |> angledLine(angle = 223deg, endAbsoluteY = 7.68) // select for vertical constraint 9 |> xLine(endAbsolute = myVar3) // select for horizontal constraint 10 - |> angledLine(angle = 301, endAbsoluteY = myVar) // select for vertical constraint 10 + |> angledLine(angle = 301deg, endAbsoluteY = myVar) // select for vertical constraint 10 ` const ast = assertParse(inputScript) @@ -458,17 +462,17 @@ part001 = startSketchOn(XY) |> yLine(endAbsolute = 11) // select for vertical constraint 3 |> line(endAbsolute = [myVar2, 12.63]) // select for horizontal constraint 4 |> yLine(endAbsolute = myVar2) // select for vertical constraint 4 - |> angledLine(angle = 156, length = 1.34) // select for horizontal constraint 5 + |> angledLine(angle = 156deg, length = 1.34) // select for horizontal constraint 5 |> yLine(length = 1.4) // select for vertical constraint 5 - |> angledLine(angle = -178, length = myVar) // select for horizontal constraint 6 + |> angledLine(angle = -178deg, length = myVar) // select for horizontal constraint 6 |> yLine(length = myVar) // select for vertical constraint 6 - |> angledLine(angle = 237, lengthX = 1.05) // select for horizontal constraint 7 + |> angledLine(angle = 237deg, lengthX = 1.05) // select for horizontal constraint 7 |> yLine(length = -1.11) // select for vertical constraint 7 - |> angledLine(angle = 194, lengthX = myVar) // select for horizontal constraint 8 + |> angledLine(angle = 194deg, lengthX = myVar) // select for horizontal constraint 8 |> yLine(length = -myVar) // select for vertical constraint 8 - |> angledLine(angle = 202, endAbsoluteX = -10.92) // select for horizontal constraint 9 + |> angledLine(angle = 202deg, endAbsoluteX = -10.92) // select for horizontal constraint 9 |> yLine(endAbsolute = 7.68) // select for vertical constraint 9 - |> angledLine(angle = 333, endAbsoluteX = myVar3) // select for horizontal constraint 10 + |> angledLine(angle = 333deg, endAbsoluteX = myVar3) // select for horizontal constraint 10 |> yLine(endAbsolute = myVar) // select for vertical constraint 10 ` const ast = assertParse(inputScript) @@ -606,7 +610,7 @@ describe('testing getConstraintLevelFromSourceRange', () => { baseThick = 1 armThick = 0.5 totalHeight = 4 -armAngle = 60 +armAngle = 60deg totalLength = 9.74 yDatum = 0 @@ -622,12 +626,12 @@ part001 = startSketchOn(XY) |> xLine(length = 4.4) // partial |> yLine(length = -1) // partial |> xLine(length = -4.2 + 0) // full - |> angledLine(angle = segAng(seg01bing) + 180, length = 1.79) // partial + |> angledLine(angle = segAng(seg01bing) + 180deg, length = 1.79) // partial |> line(end = [1.44, -0.74]) // free |> xLine(length = 3.36) // partial |> line(end = [1.49, 1.06]) // free |> xLine(length = -3.43 + 0) // full - |> angledLine(angle = 243 + 0, lengthX = 1.2 + 0) // full` + |> angledLine(angle = 243deg + 0, lengthX = 1.2 + 0) // full` const ast = assertParse(code) const constraintLevels: ConstraintLevel[] = ['full', 'partial', 'free'] constraintLevels.forEach((constraintLevel) => { diff --git a/src/lang/std/sketchcombos.ts b/src/lang/std/sketchcombos.ts index 2be5132eea..e4760a7a46 100644 --- a/src/lang/std/sketchcombos.ts +++ b/src/lang/std/sketchcombos.ts @@ -144,7 +144,7 @@ function createCallWrapper( tooltip: ToolTip, val: [Expr, Expr] | Expr, tag?: Expr, - valueUsedInTransform?: number + valueUsedInTransform?: string ): CreatedSketchExprResult | Error { if (isArray(val)) { if (tooltip === 'line') { @@ -237,7 +237,7 @@ function createCallWrapper( console.error(fnName) return { callExp: createCallExpressionStdLibKw('', null, []), - valueUsedInTransform: 0, + valueUsedInTransform: '', } } return { @@ -270,7 +270,7 @@ function createStdlibCallExpressionKw( tool: ToolTip, labeled: LabeledArg[], tag?: Expr, - valueUsedInTransform?: number, + valueUsedInTransform?: string, unlabeled?: Expr, noncode?: NonCodeMeta ): CreatedSketchExprResult { @@ -302,7 +302,7 @@ function intersectCallWrapper({ offsetVal: Expr intersectTag: Expr tag?: Expr - valueUsedInTransform?: number + valueUsedInTransform?: string }): CreatedSketchExprResult { const args: LabeledArg[] = [ createLabeledArg(ARG_ANGLE, angleVal), @@ -335,9 +335,8 @@ const xyLineSetLength = : referenceSeg ? segRef : args[0].expr - const literalArg = asNum(args[0].expr.value) - if (err(literalArg)) return literalArg - return createCallWrapper(xOrY, lineVal, tag, literalArg) + + return createCallWrapper(xOrY, lineVal, tag, args[0].expr.raw) } type AngLenNone = 'ang' | 'len' | 'none' @@ -376,10 +375,9 @@ const basicAngledLineCreateNode = : args[1].expr const shouldForceAng = valToForce === 'ang' && forceValueUsedInTransform const shouldForceLen = valToForce === 'len' && forceValueUsedInTransform - const literalArg = asNum( - valToForce === 'ang' ? args[0].expr.value : args[1].expr.value - ) - if (err(literalArg)) return literalArg + const literalArg = + valToForce === 'ang' ? args[0].expr.raw : args[1].expr.raw + return createCallWrapper( 'angledLine', [ @@ -443,7 +441,7 @@ const getLegAng = (ang: number, legAngleVal: BinaryPart) => { const normalisedAngle = ((ang % 360) + 360) % 360 // between 0 and 360 const truncatedTo90 = Math.floor(normalisedAngle / 90) * 90 const binExp = createBinaryExpressionWithUnary([ - createLiteral(truncatedTo90), + createLiteral(truncatedTo90, 'Deg'), legAngleVal, ]) return truncatedTo90 === 0 ? legAngleVal : binExp @@ -457,7 +455,7 @@ function getClosesAngleDirection( const angDiff = Math.abs(currentAng - refAngle) const normalisedAngle = ((angDiff % 360) + 360) % 360 // between 0 and 180 return normalisedAngle > 90 - ? createBinaryExpressionWithUnary([angleVal, createLiteral(180)]) + ? createBinaryExpressionWithUnary([angleVal, createLiteral(180, 'Deg')]) : angleVal } @@ -486,7 +484,7 @@ const setHorzVertDistanceCreateNode = 'lineTo', !index ? [finalValue, args[1].expr] : [args[0].expr, finalValue], tag, - valueUsedInTransform + String(valueUsedInTransform) ) } const setHorzVertDistanceForAngleLineCreateNode = @@ -511,7 +509,7 @@ const setHorzVertDistanceForAngleLineCreateNode = xOrY === 'x' ? 'angledLineToX' : 'angledLineToY', [inputs[0].expr, binExp], tag, - valueUsedInTransform + String(valueUsedInTransform) ) } @@ -531,14 +529,14 @@ const setAbsDistanceCreateNode = xOrY === 'x' ? 'xLineTo' : 'yLineTo', val, tag, - valueUsedInTransform + String(valueUsedInTransform) ) } return createCallWrapper( 'lineTo', !index ? [val, args[1].expr] : [args[0].expr, val], tag, - valueUsedInTransform + String(valueUsedInTransform) ) } const setAbsDistanceForAngleLineCreateNode = @@ -552,7 +550,7 @@ const setAbsDistanceForAngleLineCreateNode = xOrY === 'x' ? 'angledLineToX' : 'angledLineToY', [inputs[0].expr, val], tag, - valueUsedInTransform + String(valueUsedInTransform) ) } @@ -578,7 +576,7 @@ const setHorVertDistanceForXYLines = xOrY === 'x' ? 'xLineTo' : 'yLineTo', makeBinExp, tag, - valueUsedInTransform + String(valueUsedInTransform) ) } @@ -628,14 +626,14 @@ const setAngledIntersectLineForLines: CreateStdLibSketchCallExpr = ({ } const angleVal = [0, 90, 180, 270].includes(angle) ? createName(['turns'], varNameMap[angle]) - : createLiteral(angle) + : createLiteral(angle, 'Deg') return intersectCallWrapper({ fnName: 'angledLineThatIntersects', angleVal, offsetVal: forceValueUsedInTransform || createLiteral(valueUsedInTransform), intersectTag: createLocalName(referenceSegName), tag, - valueUsedInTransform, + valueUsedInTransform: String(valueUsedInTransform), }) } @@ -655,7 +653,7 @@ const setAngledIntersectForAngledLines: CreateStdLibSketchCallExpr = ({ offsetVal: forceValueUsedInTransform || createLiteral(valueUsedInTransform), intersectTag: createLocalName(referenceSegName), tag, - valueUsedInTransform, + valueUsedInTransform: String(valueUsedInTransform), }) } @@ -686,7 +684,7 @@ const setAngleBetweenCreateNode = } const binExp = createBinaryExpressionWithUnary([ firstHalfValue, - forceValueUsedInTransform || createLiteral(valueUsedInTransform), + forceValueUsedInTransform || createLiteral(valueUsedInTransform, 'Deg'), ]) return createCallWrapper( transformToType === 'none' @@ -700,7 +698,7 @@ const setAngleBetweenCreateNode = ? [binExp, inputs[0].expr] : [binExp, inputs[1].expr], tag, - valueUsedInTransform + String(valueUsedInTransform) + 'deg' ) } @@ -883,7 +881,7 @@ const transformMap: TransformMap = { 'angledLineToY', [forceValueUsedInTransform || args[0].expr, inputs[1].expr], tag, - val + String(val) ) }, }, @@ -1155,16 +1153,17 @@ const transformMap: TransformMap = { const argVal = asNum(args[0].expr.value) if (err(argVal)) return argVal const segLen = createSegLen(referenceSegName) - if (argVal > 0) return createCallWrapper('xLine', segLen, tag, argVal) + if (argVal > 0) + return createCallWrapper('xLine', segLen, tag, String(argVal)) if (isExprBinaryPart(segLen)) return createCallWrapper( 'xLine', createUnaryExpression(segLen), tag, - argVal + String(argVal) ) // should probably return error here instead - return createCallWrapper('xLine', segLen, tag, argVal) + return createCallWrapper('xLine', segLen, tag, String(argVal)) }, }, setHorzDistance: { @@ -1194,7 +1193,7 @@ const transformMap: TransformMap = { if (err(argVal)) return argVal let segLen = createSegLen(referenceSegName) if (argVal < 0) segLen = createUnaryExpression(segLen) - return createCallWrapper('yLine', segLen, tag, argVal) + return createCallWrapper('yLine', segLen, tag, String(argVal)) }, }, setLength: { @@ -1825,7 +1824,7 @@ export function transformSecondarySketchLinesTagFirst({ }): | { modifiedAst: Node - valueUsedInTransform?: number + valueUsedInTransform?: string pathToNodeMap: PathToNodeMap tagInfo: { tag: string @@ -1904,7 +1903,7 @@ export function transformAstSketchLines({ }): | { modifiedAst: Node - valueUsedInTransform?: number + valueUsedInTransform?: string pathToNodeMap: PathToNodeMap } | Error { @@ -2090,7 +2089,7 @@ export function transformAstSketchLines({ const { modifiedAst, valueUsedInTransform, pathToNode } = replacedSketchLine node = modifiedAst pathToNodeMap[index] = pathToNode - if (typeof valueUsedInTransform === 'number') { + if (typeof valueUsedInTransform === 'string') { _valueUsedInTransform = valueUsedInTransform } } diff --git a/src/lang/std/std.test.ts b/src/lang/std/std.test.ts index ad586c776a..f87f41ff1e 100644 --- a/src/lang/std/std.test.ts +++ b/src/lang/std/std.test.ts @@ -13,7 +13,7 @@ describe('testing angledLineThatIntersects', () => { |> line(endAbsolute = [2, 2], tag = $yo) |> line(endAbsolute = [3, 1]) |> angledLineThatIntersects( - angle = 180, + angle = 180deg, intersectTag = yo, offset = ${offset}, tag = $yo2, diff --git a/src/lang/std/stdTypes.ts b/src/lang/std/stdTypes.ts index 669e6e3420..597ce6ba4c 100644 --- a/src/lang/std/stdTypes.ts +++ b/src/lang/std/stdTypes.ts @@ -250,7 +250,7 @@ export type SimplifiedArgDetails = */ export interface CreatedSketchExprResult { callExp: Expr - valueUsedInTransform?: number + valueUsedInTransform?: string } export type CreateStdLibSketchCallExpr = (args: { @@ -288,7 +288,7 @@ export interface SketchLineHelperKw { | { modifiedAst: Node pathToNode: PathToNode - valueUsedInTransform?: number + valueUsedInTransform?: string } | Error updateArgs: (a: updateArgs) => diff --git a/src/lang/wasm.ts b/src/lang/wasm.ts index 8bf410b879..5a42cefd08 100644 --- a/src/lang/wasm.ts +++ b/src/lang/wasm.ts @@ -764,11 +764,10 @@ export function kclSettings( */ export function changeDefaultUnits( kcl: string, - len: UnitLen | null, - angle: UnitAng | null + len: UnitLen | null ): string | Error { try { - return change_default_units(kcl, JSON.stringify(len), JSON.stringify(angle)) + return change_default_units(kcl, JSON.stringify(len)) } catch (e) { console.error('Caught error changing kcl settings', e) return new Error('Caught error changing kcl settings', { cause: e }) diff --git a/src/lib/constants.ts b/src/lib/constants.ts index 801b9af36e..7b64e17d7c 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -61,7 +61,7 @@ export const KCL_DEFAULT_LENGTH = `5` export const KCL_DEFAULT_TRANSFORM = `0` /** The default KCL degree expression */ -export const KCL_DEFAULT_DEGREE = `360` +export const KCL_DEFAULT_DEGREE = `360deg` /** The default KCL color expression */ export const KCL_DEFAULT_COLOR = `#3c73ff` diff --git a/src/lib/exampleKcl.ts b/src/lib/exampleKcl.ts index 64fcc6a428..52a27ab6d2 100644 --- a/src/lib/exampleKcl.ts +++ b/src/lib/exampleKcl.ts @@ -70,7 +70,7 @@ import * from "parameters.kcl" bottomFaceSketch = startSketchOn(XY) |> startProfile(at = [-fanSize / 2, -fanSize / 2]) |> angledLine(angle = 0, length = fanSize, tag = $rectangleSegmentA001) - |> angledLine(angle = segAng(rectangleSegmentA001) + 90, length = fanSize, tag = $rectangleSegmentB001) + |> angledLine(angle = segAng(rectangleSegmentA001) + 90deg, length = fanSize, tag = $rectangleSegmentB001) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $rectangleSegmentC001) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $rectangleSegmentD001) |> close() @@ -108,19 +108,19 @@ bottomFaceSketch = startSketchOn(XY) // Add large openings to the bottom face to allow airflow through the fan airflowPattern = startSketchOn(bottomFaceSketch, face = END) |> startProfile(at = [fanSize * 7 / 25, -fanSize * 9 / 25]) - |> angledLine(angle = 140, length = fanSize * 12 / 25, tag = $seg01) - |> tangentialArc(radius = fanSize * 1 / 50, angle = 90) - |> angledLine(angle = -130, length = fanSize * 8 / 25) - |> tangentialArc(radius = fanSize * 1 / 50, angle = 90) - |> angledLine(angle = segAng(seg01) + 180, length = fanSize * 2 / 25) - |> tangentialArc(radius = fanSize * 8 / 25, angle = 40) + |> angledLine(angle = 140deg, length = fanSize * 12 / 25, tag = $seg01) + |> tangentialArc(radius = fanSize * 1 / 50, angle = 90deg) + |> angledLine(angle = -130deg, length = fanSize * 8 / 25) + |> tangentialArc(radius = fanSize * 1 / 50, angle = 90deg) + |> angledLine(angle = segAng(seg01) + 180deg, length = fanSize * 2 / 25) + |> tangentialArc(radius = fanSize * 8 / 25, angle = 40deg) |> xLine(length = fanSize * 3 / 25) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() |> patternCircular2d( instances = 4, center = [0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) |> extrude(length = -4) @@ -133,13 +133,13 @@ bodyMiddle = startSketchOn(bottomFaceSketch, face = END) housingMiddleLength / 2, -housingMiddleLength / 2 - housingMiddleRadius ]) - |> tangentialArc(radius = housingMiddleRadius, angle = 90) + |> tangentialArc(radius = housingMiddleRadius, angle = 90deg) |> yLine(length = housingMiddleLength) - |> tangentialArc(radius = housingMiddleRadius, angle = 90) + |> tangentialArc(radius = housingMiddleRadius, angle = 90deg) |> xLine(length = -housingMiddleLength) - |> tangentialArc(radius = housingMiddleRadius, angle = 90) + |> tangentialArc(radius = housingMiddleRadius, angle = 90deg) |> yLine(length = -housingMiddleLength) - |> tangentialArc(radius = housingMiddleRadius, angle = 90) + |> tangentialArc(radius = housingMiddleRadius, angle = 90deg) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> extrude(length = fanHeight - 4 - 4) @@ -152,7 +152,7 @@ bodyFanHole = startSketchOn(bodyMiddle, face = END) topFaceSketch = startSketchOn(bodyMiddle, face = END) topHoles = startProfile(topFaceSketch, at = [-fanSize / 2, -fanSize / 2]) |> angledLine(angle = 0, length = fanSize, tag = $rectangleSegmentA002) - |> angledLine(angle = segAng(rectangleSegmentA002) + 90, length = fanSize, tag = $rectangleSegmentB002) + |> angledLine(angle = segAng(rectangleSegmentA002) + 90deg, length = fanSize, tag = $rectangleSegmentB002) |> angledLine(angle = segAng(rectangleSegmentA002), length = -segLen(rectangleSegmentA002), tag = $rectangleSegmentC002) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $rectangleSegmentD002) |> close() @@ -229,7 +229,7 @@ export mountingHoleSize = 4.5 bottomFaceSketch = startSketchOn(XY) |> startProfile(at = [-fanSize / 2, -fanSize / 2]) |> angledLine(angle = 0, length = fanSize, tag = $rectangleSegmentA001) - |> angledLine(angle = segAng(rectangleSegmentA001) + 90, length = fanSize, tag = $rectangleSegmentB001) + |> angledLine(angle = segAng(rectangleSegmentA001) + 90deg, length = fanSize, tag = $rectangleSegmentB001) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $rectangleSegmentC001) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $rectangleSegmentD001) |> close() @@ -267,19 +267,19 @@ bottomFaceSketch = startSketchOn(XY) // Add large openings to the bottom face to allow airflow through the fan airflowPattern = startSketchOn(bottomFaceSketch, face = END) |> startProfile(at = [fanSize * 7 / 25, -fanSize * 9 / 25]) - |> angledLine(angle = 140, length = fanSize * 12 / 25, tag = $seg01) - |> tangentialArc(radius = fanSize * 1 / 50, angle = 90) - |> angledLine(angle = -130, length = fanSize * 8 / 25) - |> tangentialArc(radius = fanSize * 1 / 50, angle = 90) - |> angledLine(angle = segAng(seg01) + 180, length = fanSize * 2 / 25) - |> tangentialArc(radius = fanSize * 8 / 25, angle = 40) + |> angledLine(angle = 140deg, length = fanSize * 12 / 25, tag = $seg01) + |> tangentialArc(radius = fanSize * 1 / 50, angle = 90deg) + |> angledLine(angle = -130deg, length = fanSize * 8 / 25) + |> tangentialArc(radius = fanSize * 1 / 50, angle = 90deg) + |> angledLine(angle = segAng(seg01) + 180deg, length = fanSize * 2 / 25) + |> tangentialArc(radius = fanSize * 8 / 25, angle = 40deg) |> xLine(length = fanSize * 3 / 25) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() |> patternCircular2d( instances = 4, center = [0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) |> extrude(length = -4) @@ -292,13 +292,13 @@ bodyMiddle = startSketchOn(bottomFaceSketch, face = END) housingMiddleLength / 2, -housingMiddleLength / 2 - housingMiddleRadius ]) - |> tangentialArc(radius = housingMiddleRadius, angle = 90) + |> tangentialArc(radius = housingMiddleRadius, angle = 90deg) |> yLine(length = housingMiddleLength) - |> tangentialArc(radius = housingMiddleRadius, angle = 90) + |> tangentialArc(radius = housingMiddleRadius, angle = 90deg) |> xLine(length = -housingMiddleLength) - |> tangentialArc(radius = housingMiddleRadius, angle = 90) + |> tangentialArc(radius = housingMiddleRadius, angle = 90deg) |> yLine(length = -housingMiddleLength) - |> tangentialArc(radius = housingMiddleRadius, angle = 90) + |> tangentialArc(radius = housingMiddleRadius, angle = 90deg) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> extrude(length = fanHeight - 4 - 4) @@ -311,7 +311,7 @@ bodyFanHole = startSketchOn(bodyMiddle, face = END) topFaceSketch = startSketchOn(bodyMiddle, face = END) topHoles = startProfile(topFaceSketch, at = [-fanSize / 2, -fanSize / 2]) |> angledLine(angle = 0, length = fanSize, tag = $rectangleSegmentA002) - |> angledLine(angle = segAng(rectangleSegmentA002) + 90, length = fanSize, tag = $rectangleSegmentB002) + |> angledLine(angle = segAng(rectangleSegmentA002) + 90deg, length = fanSize, tag = $rectangleSegmentB002) |> angledLine(angle = segAng(rectangleSegmentA002), length = -segLen(rectangleSegmentA002), tag = $rectangleSegmentC002) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $rectangleSegmentD002) |> close() @@ -387,7 +387,7 @@ export mountingHoleSize = 4.5 bottomFaceSketch = startSketchOn(XY) |> startProfile(at = [-fanSize / 2, -fanSize / 2]) |> angledLine(angle = 0, length = fanSize, tag = $rectangleSegmentA001) - |> angledLine(angle = segAng(rectangleSegmentA001) + 90, length = fanSize, tag = $rectangleSegmentB001) + |> angledLine(angle = segAng(rectangleSegmentA001) + 90deg, length = fanSize, tag = $rectangleSegmentB001) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $rectangleSegmentC001) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $rectangleSegmentD001) |> close() @@ -425,19 +425,19 @@ bottomFaceSketch = startSketchOn(XY) // Add large openings to the bottom face to allow airflow through the fan airflowPattern = startSketchOn(bottomFaceSketch, face = END) |> startProfile(at = [fanSize * 7 / 25, -fanSize * 9 / 25]) - |> angledLine(angle = 140, length = fanSize * 12 / 25, tag = $seg01) - |> tangentialArc(radius = fanSize * 1 / 50, angle = 90) - |> angledLine(angle = -130, length = fanSize * 8 / 25) - |> tangentialArc(radius = fanSize * 1 / 50, angle = 90) - |> angledLine(angle = segAng(seg01) + 180, length = fanSize * 2 / 25) - |> tangentialArc(radius = fanSize * 8 / 25, angle = 40) + |> angledLine(angle = 140deg, length = fanSize * 12 / 25, tag = $seg01) + |> tangentialArc(radius = fanSize * 1 / 50, angle = 90deg) + |> angledLine(angle = -130deg, length = fanSize * 8 / 25) + |> tangentialArc(radius = fanSize * 1 / 50, angle = 90deg) + |> angledLine(angle = segAng(seg01) + 180deg, length = fanSize * 2 / 25) + |> tangentialArc(radius = fanSize * 8 / 25, angle = 40deg) |> xLine(length = fanSize * 3 / 25) |> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() |> patternCircular2d( instances = 4, center = [0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) |> extrude(length = -4) @@ -450,13 +450,13 @@ bodyMiddle = startSketchOn(bottomFaceSketch, face = END) housingMiddleLength / 2, -housingMiddleLength / 2 - housingMiddleRadius ]) - |> tangentialArc(radius = housingMiddleRadius, angle = 90) + |> tangentialArc(radius = housingMiddleRadius, angle = 90deg) |> yLine(length = housingMiddleLength) - |> tangentialArc(radius = housingMiddleRadius, angle = 90) + |> tangentialArc(radius = housingMiddleRadius, angle = 90deg) |> xLine(length = -housingMiddleLength) - |> tangentialArc(radius = housingMiddleRadius, angle = 90) + |> tangentialArc(radius = housingMiddleRadius, angle = 90deg) |> yLine(length = -housingMiddleLength) - |> tangentialArc(radius = housingMiddleRadius, angle = 90) + |> tangentialArc(radius = housingMiddleRadius, angle = 90deg) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> extrude(length = fanHeight - 4 - 4) @@ -469,7 +469,7 @@ bodyFanHole = startSketchOn(bodyMiddle, face = END) topFaceSketch = startSketchOn(bodyMiddle, face = END) topHoles = startProfile(topFaceSketch, at = [-fanSize / 2, -fanSize / 2]) |> angledLine(angle = 0, length = fanSize, tag = $rectangleSegmentA002) - |> angledLine(angle = segAng(rectangleSegmentA002) + 90, length = fanSize, tag = $rectangleSegmentB002) + |> angledLine(angle = segAng(rectangleSegmentA002) + 90deg, length = fanSize, tag = $rectangleSegmentB002) |> angledLine(angle = segAng(rectangleSegmentA002), length = -segLen(rectangleSegmentA002), tag = $rectangleSegmentC002) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $rectangleSegmentD002) |> close() @@ -543,11 +543,11 @@ ${fanHousingBrowser} fanCenter = startSketchOn(XZ) |> startProfile(at = [-0.0001, fanHeight]) |> xLine(endAbsolute = -15 + 1.5) - |> tangentialArc(radius = 1.5, angle = 90) + |> tangentialArc(radius = 1.5, angle = 90deg) |> yLine(endAbsolute = 4.5) |> xLine(endAbsolute = -13) |> yLine(endAbsolute = profileStartY(%) - 5) - |> tangentialArc(radius = 1, angle = -90) + |> tangentialArc(radius = 1, angle = -90deg) |> xLine(endAbsolute = -1) |> yLine(length = 2) |> xLine(length = -0.15) @@ -571,32 +571,32 @@ fn fanBlade(offsetHeight, startAngle: number(deg)) { 15 * cos(startAngle), 15 * sin(startAngle) ]) - |> arc(angleStart = startAngle, angleEnd = startAngle + 14, radius = 15) + |> arc(angleStart = startAngle, angleEnd = startAngle + 14deg, radius = 15) |> arc( endAbsolute = [ - fanSize * 22 / 50 * cos(startAngle - 20), - fanSize * 22 / 50 * sin(startAngle - 20) + fanSize * 22 / 50 * cos(startAngle - 20deg), + fanSize * 22 / 50 * sin(startAngle - 20deg) ], interiorAbsolute = [ - fanSize * 11 / 50 * cos(startAngle + 3), - fanSize * 11 / 50 * sin(startAngle + 3) + fanSize * 11 / 50 * cos(startAngle + 3deg), + fanSize * 11 / 50 * sin(startAngle + 3deg) ], ) |> arc( endAbsolute = [ - fanSize * 22 / 50 * cos(startAngle - 24), - fanSize * 22 / 50 * sin(startAngle - 24) + fanSize * 22 / 50 * cos(startAngle - 24deg), + fanSize * 22 / 50 * sin(startAngle - 24deg) ], interiorAbsolute = [ - fanSize * 22 / 50 * cos(startAngle - 22), - fanSize * 22 / 50 * sin(startAngle - 22) + fanSize * 22 / 50 * cos(startAngle - 22deg), + fanSize * 22 / 50 * sin(startAngle - 22deg) ], ) |> arc( endAbsolute = [profileStartX(%), profileStartY(%)], interiorAbsolute = [ - fanSize * 11 / 50 * cos(startAngle - 5), - fanSize * 11 / 50 * sin(startAngle - 5) + fanSize * 11 / 50 * cos(startAngle - 5deg), + fanSize * 11 / 50 * sin(startAngle - 5deg) ], ) |> close() @@ -605,8 +605,8 @@ fn fanBlade(offsetHeight, startAngle: number(deg)) { // Loft the fan blade cross sections into a single blade, then pattern them about the fan center crossSections = [ - fanBlade(offsetHeight = 4.5, startAngle = 50), - fanBlade(offsetHeight = (fanHeight - 2 - 4) / 2, startAngle = 30), + fanBlade(offsetHeight = 4.5, startAngle = 50deg), + fanBlade(offsetHeight = (fanHeight - 2 - 4) / 2, startAngle = 30deg), fanBlade(offsetHeight = fanHeight - 2, startAngle = 0) ] loft(crossSections) @@ -615,7 +615,7 @@ loft(crossSections) instances = 9, axis = [0, 0, 1], center = [0, 0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) @@ -650,11 +650,11 @@ ${modifiedFanHousingBrowser} fanCenter = startSketchOn(XZ) |> startProfile(at = [-0.0001, fanHeight]) |> xLine(endAbsolute = -15 + 1.5) - |> tangentialArc(radius = 1.5, angle = 90) + |> tangentialArc(radius = 1.5, angle = 90deg) |> yLine(endAbsolute = 4.5) |> xLine(endAbsolute = -13) |> yLine(endAbsolute = profileStartY(%) - 5) - |> tangentialArc(radius = 1, angle = -90) + |> tangentialArc(radius = 1, angle = -90deg) |> xLine(endAbsolute = -1) |> yLine(length = 2) |> xLine(length = -0.15) @@ -678,32 +678,32 @@ fn fanBlade(offsetHeight, startAngle: number(deg)) { 15 * cos(startAngle), 15 * sin(startAngle) ]) - |> arc(angleStart = startAngle, angleEnd = startAngle + 14, radius = 15) + |> arc(angleStart = startAngle, angleEnd = startAngle + 14deg, radius = 15) |> arc( endAbsolute = [ - fanSize * 22 / 50 * cos(startAngle - 20), - fanSize * 22 / 50 * sin(startAngle - 20) + fanSize * 22 / 50 * cos(startAngle - 20deg), + fanSize * 22 / 50 * sin(startAngle - 20deg) ], interiorAbsolute = [ - fanSize * 11 / 50 * cos(startAngle + 3), - fanSize * 11 / 50 * sin(startAngle + 3) + fanSize * 11 / 50 * cos(startAngle + 3deg), + fanSize * 11 / 50 * sin(startAngle + 3deg) ], ) |> arc( endAbsolute = [ - fanSize * 22 / 50 * cos(startAngle - 24), - fanSize * 22 / 50 * sin(startAngle - 24) + fanSize * 22 / 50 * cos(startAngle - 24deg), + fanSize * 22 / 50 * sin(startAngle - 24deg) ], interiorAbsolute = [ - fanSize * 22 / 50 * cos(startAngle - 22), - fanSize * 22 / 50 * sin(startAngle - 22) + fanSize * 22 / 50 * cos(startAngle - 22deg), + fanSize * 22 / 50 * sin(startAngle - 22deg) ], ) |> arc( endAbsolute = [profileStartX(%), profileStartY(%)], interiorAbsolute = [ - fanSize * 11 / 50 * cos(startAngle - 5), - fanSize * 11 / 50 * sin(startAngle - 5) + fanSize * 11 / 50 * cos(startAngle - 5deg), + fanSize * 11 / 50 * sin(startAngle - 5deg) ], ) |> close() @@ -712,8 +712,8 @@ fn fanBlade(offsetHeight, startAngle: number(deg)) { // Loft the fan blade cross sections into a single blade, then pattern them about the fan center crossSections = [ - fanBlade(offsetHeight = 4.5, startAngle = 50), - fanBlade(offsetHeight = (fanHeight - 2 - 4) / 2, startAngle = 30), + fanBlade(offsetHeight = 4.5, startAngle = 50deg), + fanBlade(offsetHeight = (fanHeight - 2 - 4) / 2, startAngle = 30deg), fanBlade(offsetHeight = fanHeight - 2, startAngle = 0) ] loft(crossSections) @@ -722,7 +722,7 @@ loft(crossSections) instances = 9, axis = [0, 0, 1], center = [0, 0, 0], - arcDegrees = 360, + arcDegrees = 360deg, rotateDuplicates = true, ) diff --git a/src/lib/kclCommands.ts b/src/lib/kclCommands.ts index 9d4ee50fb8..371ec57792 100644 --- a/src/lib/kclCommands.ts +++ b/src/lib/kclCommands.ts @@ -3,11 +3,7 @@ import toast from 'react-hot-toast' import { updateModelingState } from '@src/lang/modelingWorkflows' import { addModuleImport } from '@src/lang/modifyAst' -import { - changeDefaultUnits, - unitAngleToUnitAng, - unitLengthToUnitLen, -} from '@src/lang/wasm' +import { changeDefaultUnits, unitLengthToUnitLen } from '@src/lang/wasm' import type { Command, CommandArgumentOption } from '@src/lib/commandTypes' import { DEFAULT_DEFAULT_LENGTH_UNIT, @@ -69,8 +65,7 @@ export function kclCommands(commandProps: KclCommandConfig): Command[] { if (typeof data === 'object' && 'unit' in data) { const newCode = changeDefaultUnits( codeManager.code, - unitLengthToUnitLen(data.unit), - unitAngleToUnitAng(undefined) + unitLengthToUnitLen(data.unit) ) if (err(newCode)) { toast.error(`Failed to set per-file units: ${newCode.message}`) diff --git a/src/lib/rectangleTool.test.ts b/src/lib/rectangleTool.test.ts index 176d0e32b2..c13a0f29e3 100644 --- a/src/lib/rectangleTool.test.ts +++ b/src/lib/rectangleTool.test.ts @@ -21,7 +21,7 @@ describe('library rectangleTool helper functions', () => { const sourceCode = `sketch001 = startSketchOn(XZ) profile001 = startProfile(at = [120.37, 162.76]) |> angledLine(angle = 0, length = 0, tag = $rectangleSegmentA001) -|> angledLine(angle = segAng(rectangleSegmentA001) + 90, length = 0, tag = $rectangleSegmentB001) +|> angledLine(angle = segAng(rectangleSegmentA001) + 90deg, length = 0, tag = $rectangleSegmentB001) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $rectangleSegmentC001) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() @@ -71,7 +71,7 @@ profile001 = startProfile(at = [120.37, 162.76]) const expectedSourceCode = `sketch001 = startSketchOn(XZ) profile001 = startProfile(at = [80, 120]) |> angledLine(angle = 0, length = 80, tag = $rectangleSegmentA001) - |> angledLine(angle = segAng(rectangleSegmentA001) + 90, length = 120, tag = $rectangleSegmentB001) + |> angledLine(angle = segAng(rectangleSegmentA001) + 90deg, length = 120, tag = $rectangleSegmentB001) |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $rectangleSegmentC001) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close() diff --git a/src/lib/rectangleTool.ts b/src/lib/rectangleTool.ts index 2bd2241c37..87bea7c079 100644 --- a/src/lib/rectangleTool.ts +++ b/src/lib/rectangleTool.ts @@ -54,7 +54,7 @@ function angledLine( export const getRectangleCallExpressions = (tag: string) => { return [ angledLine( - createLiteral(0), // 0 deg + createLiteral(0, 'Deg'), // 0 deg createLiteral(0), // This will be the width of the rectangle tag ), @@ -62,7 +62,7 @@ export const getRectangleCallExpressions = (tag: string) => { createBinaryExpression([ createCallExpressionStdLibKw('segAng', createLocalName(tag), []), '+', - createLiteral(90), + createLiteral(90, 'Deg'), ]), // 90 offset from the previous line createLiteral(0) // This will be the height of the rectangle ), @@ -108,7 +108,7 @@ export function updateRectangleSketch( tag: string ) { const firstEdge = pipeExpression.body[1] as CallExpressionKw - mutateKwArgOnly('angle', firstEdge, createLiteral(x >= 0 ? 0 : 180)) + mutateKwArgOnly('angle', firstEdge, createLiteral(x >= 0 ? 0 : 180, 'Deg')) mutateKwArgOnly('length', firstEdge, createLiteral(Math.abs(x))) const secondEdge = pipeExpression.body[2] as CallExpressionKw // 90 offset from the previous line @@ -118,7 +118,7 @@ export function updateRectangleSketch( createBinaryExpression([ createCallExpressionStdLibKw('segAng', createLocalName(tag), []), Math.sign(y) === Math.sign(x) ? '+' : '-', - createLiteral(90), + createLiteral(90, 'Deg'), ]) ) // This will be the height of the rectangle @@ -196,7 +196,7 @@ export function updateCenterRectangleSketch( const newAngle = createBinaryExpression([ createCallExpressionStdLibKw('segAng', createLocalName(tag), []), oldAngleOperator, - createLiteral(90), + createLiteral(90, 'Deg'), ]) // Calculate new height. diff --git a/src/machines/modelingMachine.test.ts b/src/machines/modelingMachine.test.ts index 2181d30d89..89e79209a0 100644 --- a/src/machines/modelingMachine.test.ts +++ b/src/machines/modelingMachine.test.ts @@ -376,45 +376,53 @@ p3 = [342.51, 216.38], namedConstantConstraint: [ { name: 'should constrain angledLine, angle value', - ...makeStraightSegmentSnippet('angledLine(angle = 45, length = 100)'), + ...makeStraightSegmentSnippet( + 'angledLine(angle = 45deg, length = 100)' + ), constraintIndex: 0, expectedResult: 'angledLine(angle = test_variable, length = 100)', }, { name: 'should constrain angledLine, length value', - ...makeStraightSegmentSnippet('angledLine(angle = 45, length = 100)'), + ...makeStraightSegmentSnippet( + 'angledLine(angle = 45deg, length = 100)' + ), constraintIndex: 1, - expectedResult: 'angledLine(angle = 45, length = test_variable)', + expectedResult: 'angledLine(angle = 45deg, length = test_variable)', }, { name: 'should constrain angledLine, endAbsoluteY value', ...makeStraightSegmentSnippet( - 'angledLine(angle = 45, endAbsoluteY = 5)' + 'angledLine(angle = 45deg, endAbsoluteY = 5)' ), constraintIndex: 1, expectedResult: - 'angledLine(angle = 45, endAbsoluteY = test_variable)', + 'angledLine(angle = 45deg, endAbsoluteY = test_variable)', }, { name: 'should constrain angledLine, endAbsoluteX value', ...makeStraightSegmentSnippet( - 'angledLine(angle = 45, endAbsoluteX = 5)' + 'angledLine(angle = 45deg, endAbsoluteX = 5)' ), constraintIndex: 1, expectedResult: - 'angledLine(angle = 45, endAbsoluteX = test_variable)', + 'angledLine(angle = 45deg, endAbsoluteX = test_variable)', }, { name: 'should constrain angledLine, lengthY value', - ...makeStraightSegmentSnippet('angledLine(angle = 45, lengthY = 5)'), + ...makeStraightSegmentSnippet( + 'angledLine(angle = 45deg, lengthY = 5)' + ), constraintIndex: 1, - expectedResult: 'angledLine(angle = 45, lengthY = test_variable)', + expectedResult: 'angledLine(angle = 45deg, lengthY = test_variable)', }, { name: 'should constrain angledLine, lengthX value', - ...makeStraightSegmentSnippet('angledLine(angle = 45, lengthX = 5)'), + ...makeStraightSegmentSnippet( + 'angledLine(angle = 45deg, lengthX = 5)' + ), constraintIndex: 1, - expectedResult: 'angledLine(angle = 45, lengthX = test_variable)', + expectedResult: 'angledLine(angle = 45deg, lengthX = test_variable)', }, ], removeAllConstraintsCases: [ @@ -466,7 +474,7 @@ p3 = [342.51, 216.38], 'angledLine(angle = testVar1, length = testVar2)' ), constraintIndex: 0, - expectedResult: 'angledLine(angle = 55, length = testVar2)', + expectedResult: 'angledLine(angle = 55deg, length = testVar2)', }, { name: 'should un-constrain angledLine, length value', @@ -512,27 +520,33 @@ p3 = [342.51, 216.38], deleteSegment: [ { name: 'should delete angledLine, angle length', - ...makeStraightSegmentSnippet('angledLine(angle = 45, length = 100)'), + ...makeStraightSegmentSnippet( + 'angledLine(angle = 45deg, length = 100)' + ), }, { name: 'should delete angledLine, endAbsoluteY', ...makeStraightSegmentSnippet( - 'angledLine(angle = 45, endAbsoluteY = 5)' + 'angledLine(angle = 45deg, endAbsoluteY = 5)' ), }, { name: 'should delete angledLine, endAbsoluteX', ...makeStraightSegmentSnippet( - 'angledLine(angle = 45, endAbsoluteX = 5)' + 'angledLine(angle = 45deg, endAbsoluteX = 5)' ), }, { name: 'should delete angledLine, lengthY', - ...makeStraightSegmentSnippet('angledLine(angle = 45, lengthY = 5)'), + ...makeStraightSegmentSnippet( + 'angledLine(angle = 45deg, lengthY = 5)' + ), }, { name: 'should delete angledLine, lengthX', - ...makeStraightSegmentSnippet('angledLine(angle = 45, lengthX = 5)'), + ...makeStraightSegmentSnippet( + 'angledLine(angle = 45deg, lengthX = 5)' + ), }, ], },