Compare commits
17 Commits
nested_dir
...
kcl-76
Author | SHA1 | Date | |
---|---|---|---|
3df02e02fa | |||
35f5c62633 | |||
0f0fc39d07 | |||
a13b6b2b70 | |||
4212b95232 | |||
38a73a603b | |||
c48d9fd4d7 | |||
0753987b5a | |||
815ff7dc2b | |||
46684d420d | |||
eca09984a3 | |||
ce63c6423e | |||
09699afe82 | |||
36c8ad439d | |||
5dc77ceed5 | |||
c7baa26b2d | |||
4d0454abcd |
@ -11,7 +11,8 @@ layout: manual
|
||||
circle(
|
||||
@sketch_or_surface: Sketch | Plane | Face,
|
||||
center: Point2d,
|
||||
radius: number(Length),
|
||||
radius?: number(Length),
|
||||
diameter?: number(Length),
|
||||
tag?: tag,
|
||||
): Sketch
|
||||
```
|
||||
@ -25,7 +26,8 @@ the provided (x, y) origin point.
|
||||
|----------|------|-------------|----------|
|
||||
| `sketch_or_surface` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) or [`Plane`](/docs/kcl-std/types/std-types-Plane) or [`Face`](/docs/kcl-std/types/std-types-Face) | Sketch to extend, or plane or surface to sketch on. | Yes |
|
||||
| `center` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | The center of the circle. | Yes |
|
||||
| `radius` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The radius of the circle. | Yes |
|
||||
| `radius` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The radius of the circle. Incompatible with `diameter`. | No |
|
||||
| `diameter` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The diameter of the circle. Incompatible with `radius`. | No |
|
||||
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | Create a new tag which refers to this circle. | No |
|
||||
|
||||
### Returns
|
||||
@ -51,7 +53,7 @@ exampleSketch = startSketchOn(XZ)
|
||||
|> line(end = [0, 30])
|
||||
|> line(end = [-30, 0])
|
||||
|> close()
|
||||
|> subtract2d(tool = circle(center = [0, 15], radius = 5))
|
||||
|> subtract2d(tool = circle(center = [0, 15], diameter = 10))
|
||||
|
||||
example = extrude(exampleSketch, length = 5)
|
||||
```
|
||||
|
@ -45,15 +45,16 @@ test.describe('Command bar tests', () => {
|
||||
await cmdBar.expectState({
|
||||
stage: 'arguments',
|
||||
commandName: 'Extrude',
|
||||
currentArgKey: 'length',
|
||||
currentArgValue: '5',
|
||||
currentArgKey: 'sketches',
|
||||
currentArgValue: '',
|
||||
headerArguments: {
|
||||
Profiles: '1 profile',
|
||||
Profiles: '',
|
||||
Length: '',
|
||||
},
|
||||
highlightedHeaderArg: 'length',
|
||||
highlightedHeaderArg: 'Profiles',
|
||||
})
|
||||
await cmdBar.progressCmdBar()
|
||||
await cmdBar.progressCmdBar()
|
||||
await cmdBar.expectState({
|
||||
stage: 'review',
|
||||
commandName: 'Extrude',
|
||||
|
@ -1134,6 +1134,7 @@ sketch001 = startSketchOn(XZ)
|
||||
// Wait for the selection to register (TODO: we need a definitive way to wait for this)
|
||||
await page.waitForTimeout(200)
|
||||
await toolbar.extrudeButton.click()
|
||||
await cmdBar.progressCmdBar()
|
||||
await cmdBar.expectState({
|
||||
stage: 'arguments',
|
||||
currentArgKey: 'length',
|
||||
@ -1355,9 +1356,7 @@ sketch001 = startSketchOn(XZ)
|
||||
const u = await getUtils(page)
|
||||
const projectLink = page.getByRole('link', { name: 'cube' })
|
||||
const gizmo = page.locator('[aria-label*=gizmo]')
|
||||
const resetCameraButton = page.getByRole('button', {
|
||||
name: 'Reset view',
|
||||
})
|
||||
const resetCameraButton = page.getByRole('button', { name: 'Reset view' })
|
||||
const locationToHaveColor = async (
|
||||
position: { x: number; y: number },
|
||||
color: [number, number, number]
|
||||
|
@ -70,22 +70,28 @@ test.describe('Point-and-click assemblies tests', () => {
|
||||
await test.step('Setup parts and expect empty assembly scene', async () => {
|
||||
const projectName = 'assembly'
|
||||
await context.folderSetupFn(async (dir) => {
|
||||
const bracketDir = path.join(dir, projectName)
|
||||
await fsp.mkdir(bracketDir, { recursive: true })
|
||||
const projDir = path.join(dir, projectName)
|
||||
const nestedProjDir = path.join(dir, projectName, 'nested', 'twice')
|
||||
await fsp.mkdir(projDir, { recursive: true })
|
||||
await fsp.mkdir(nestedProjDir, { recursive: true })
|
||||
await Promise.all([
|
||||
fsp.copyFile(
|
||||
executorInputPath('cylinder.kcl'),
|
||||
path.join(bracketDir, 'cylinder.kcl')
|
||||
path.join(projDir, 'cylinder.kcl')
|
||||
),
|
||||
fsp.copyFile(
|
||||
executorInputPath('cylinder.kcl'),
|
||||
path.join(nestedProjDir, 'main.kcl')
|
||||
),
|
||||
fsp.copyFile(
|
||||
executorInputPath('e2e-can-sketch-on-chamfer.kcl'),
|
||||
path.join(bracketDir, 'bracket.kcl')
|
||||
path.join(projDir, 'bracket.kcl')
|
||||
),
|
||||
fsp.copyFile(
|
||||
testsInputPath('cube.step'),
|
||||
path.join(bracketDir, 'cube.step')
|
||||
path.join(projDir, 'cube.step')
|
||||
),
|
||||
fsp.writeFile(path.join(bracketDir, 'main.kcl'), ''),
|
||||
fsp.writeFile(path.join(projDir, 'main.kcl'), ''),
|
||||
])
|
||||
})
|
||||
await page.setBodyDimensions({ width: 1000, height: 500 })
|
||||
@ -167,6 +173,25 @@ test.describe('Point-and-click assemblies tests', () => {
|
||||
await expect(
|
||||
page.getByText('This file is already imported')
|
||||
).toBeVisible()
|
||||
await cmdBar.closeCmdBar()
|
||||
})
|
||||
|
||||
await test.step('Insert a nested kcl part', async () => {
|
||||
await insertPartIntoAssembly(
|
||||
'nested/twice/main.kcl',
|
||||
'main',
|
||||
toolbar,
|
||||
cmdBar,
|
||||
page
|
||||
)
|
||||
await toolbar.openPane('code')
|
||||
await page.waitForTimeout(10000)
|
||||
await editor.expectEditor.toContain(
|
||||
`
|
||||
import "nested/twice/main.kcl" as main
|
||||
`,
|
||||
{ shouldNormalise: true }
|
||||
)
|
||||
})
|
||||
}
|
||||
)
|
||||
|
@ -74,6 +74,15 @@ test.describe('Point-and-click tests', () => {
|
||||
|
||||
await test.step('do extrude flow and check extrude code is added to editor', async () => {
|
||||
await toolbar.extrudeButton.click()
|
||||
await cmdBar.expectState({
|
||||
stage: 'arguments',
|
||||
currentArgKey: 'sketches',
|
||||
currentArgValue: '',
|
||||
headerArguments: { Profiles: '', Length: '' },
|
||||
highlightedHeaderArg: 'Profiles',
|
||||
commandName: 'Extrude',
|
||||
})
|
||||
await cmdBar.progressCmdBar()
|
||||
await cmdBar.expectState({
|
||||
stage: 'arguments',
|
||||
currentArgKey: 'length',
|
||||
@ -1645,6 +1654,15 @@ sketch002 = startSketchOn(plane001)
|
||||
|
||||
await test.step(`Go through the command bar flow with preselected sketches`, async () => {
|
||||
await toolbar.loftButton.click()
|
||||
await cmdBar.expectState({
|
||||
stage: 'arguments',
|
||||
currentArgKey: 'sketches',
|
||||
currentArgValue: '',
|
||||
headerArguments: { Profiles: '' },
|
||||
highlightedHeaderArg: 'Profiles',
|
||||
commandName: 'Loft',
|
||||
})
|
||||
await cmdBar.progressCmdBar()
|
||||
await cmdBar.expectState({
|
||||
stage: 'review',
|
||||
headerArguments: { Profiles: '2 profiles' },
|
||||
@ -2092,6 +2110,18 @@ extrude001 = extrude(sketch001, length = -12)
|
||||
await test.step(`Apply fillet to the preselected edge`, async () => {
|
||||
await page.waitForTimeout(100)
|
||||
await toolbar.filletButton.click()
|
||||
await cmdBar.expectState({
|
||||
commandName: 'Fillet',
|
||||
highlightedHeaderArg: 'selection',
|
||||
currentArgKey: 'selection',
|
||||
currentArgValue: '',
|
||||
headerArguments: {
|
||||
Selection: '',
|
||||
Radius: '',
|
||||
},
|
||||
stage: 'arguments',
|
||||
})
|
||||
await cmdBar.progressCmdBar()
|
||||
await cmdBar.expectState({
|
||||
commandName: 'Fillet',
|
||||
highlightedHeaderArg: 'radius',
|
||||
@ -2621,6 +2651,18 @@ extrude001 = extrude(profile001, length = 5)
|
||||
await test.step(`Apply fillet`, async () => {
|
||||
await page.waitForTimeout(100)
|
||||
await toolbar.filletButton.click()
|
||||
await cmdBar.expectState({
|
||||
commandName: 'Fillet',
|
||||
highlightedHeaderArg: 'selection',
|
||||
currentArgKey: 'selection',
|
||||
currentArgValue: '',
|
||||
headerArguments: {
|
||||
Selection: '',
|
||||
Radius: '',
|
||||
},
|
||||
stage: 'arguments',
|
||||
})
|
||||
await cmdBar.progressCmdBar()
|
||||
await cmdBar.expectState({
|
||||
commandName: 'Fillet',
|
||||
highlightedHeaderArg: 'radius',
|
||||
@ -2726,6 +2768,19 @@ extrude001 = extrude(sketch001, length = -12)
|
||||
await test.step(`Apply chamfer to the preselected edge`, async () => {
|
||||
await page.waitForTimeout(100)
|
||||
await toolbar.chamferButton.click()
|
||||
await cmdBar.expectState({
|
||||
commandName: 'Chamfer',
|
||||
highlightedHeaderArg: 'selection',
|
||||
currentArgKey: 'selection',
|
||||
currentArgValue: '',
|
||||
headerArguments: {
|
||||
Selection: '',
|
||||
Length: '',
|
||||
},
|
||||
stage: 'arguments',
|
||||
})
|
||||
await cmdBar.progressCmdBar()
|
||||
await page.waitForTimeout(1000)
|
||||
await cmdBar.expectState({
|
||||
commandName: 'Chamfer',
|
||||
highlightedHeaderArg: 'length',
|
||||
@ -3209,6 +3264,8 @@ extrude001 = extrude(sketch001, length = 30)
|
||||
await test.step(`Go through the command bar flow with a preselected face (cap)`, async () => {
|
||||
await toolbar.shellButton.click()
|
||||
await cmdBar.progressCmdBar()
|
||||
await page.waitForTimeout(500)
|
||||
await cmdBar.progressCmdBar()
|
||||
await cmdBar.expectState({
|
||||
stage: 'review',
|
||||
headerArguments: {
|
||||
@ -3642,13 +3699,12 @@ tag=$rectangleSegmentC002,
|
||||
// revolve
|
||||
await editor.scrollToText(codeToSelection)
|
||||
await page.getByText(codeToSelection).click()
|
||||
// Wait for the selection to register (TODO: we need a definitive way to wait for this)
|
||||
await page.waitForTimeout(200)
|
||||
await toolbar.revolveButton.click()
|
||||
await cmdBar.progressCmdBar()
|
||||
await cmdBar.progressCmdBar()
|
||||
await cmdBar.progressCmdBar()
|
||||
await cmdBar.progressCmdBar()
|
||||
await cmdBar.progressCmdBar()
|
||||
|
||||
const newCodeToFind = `revolve001 = revolve(sketch002, angle = 360, axis = X)`
|
||||
expect(editor.expectEditor.toContain(newCodeToFind)).toBeTruthy()
|
||||
@ -4577,6 +4633,18 @@ path001 = startProfile(sketch001, at = [0, 0])
|
||||
|
||||
await test.step('Go through command bar flow', async () => {
|
||||
await toolbar.extrudeButton.click()
|
||||
await cmdBar.expectState({
|
||||
stage: 'arguments',
|
||||
currentArgKey: 'sketches',
|
||||
currentArgValue: '',
|
||||
headerArguments: {
|
||||
Profiles: '',
|
||||
Length: '',
|
||||
},
|
||||
highlightedHeaderArg: 'Profiles',
|
||||
commandName: 'Extrude',
|
||||
})
|
||||
await cmdBar.progressCmdBar()
|
||||
await cmdBar.expectState({
|
||||
stage: 'arguments',
|
||||
currentArgKey: 'length',
|
||||
@ -4659,6 +4727,19 @@ path001 = startProfile(sketch001, at = [0, 0])
|
||||
|
||||
await test.step('Go through command bar flow', async () => {
|
||||
await toolbar.sweepButton.click()
|
||||
await cmdBar.expectState({
|
||||
stage: 'arguments',
|
||||
currentArgKey: 'sketches',
|
||||
currentArgValue: '',
|
||||
headerArguments: {
|
||||
Profiles: '',
|
||||
Path: '',
|
||||
Sectional: '',
|
||||
},
|
||||
highlightedHeaderArg: 'Profiles',
|
||||
commandName: 'Sweep',
|
||||
})
|
||||
await cmdBar.progressCmdBar()
|
||||
await cmdBar.expectState({
|
||||
stage: 'arguments',
|
||||
currentArgKey: 'path',
|
||||
@ -4743,6 +4824,19 @@ path001 = startProfile(sketch001, at = [0, 0])
|
||||
await test.step('Go through command bar flow', async () => {
|
||||
await toolbar.closePane('code')
|
||||
await toolbar.revolveButton.click()
|
||||
await cmdBar.expectState({
|
||||
stage: 'arguments',
|
||||
currentArgKey: 'sketches',
|
||||
currentArgValue: '',
|
||||
headerArguments: {
|
||||
Profiles: '',
|
||||
AxisOrEdge: '',
|
||||
Angle: '',
|
||||
},
|
||||
highlightedHeaderArg: 'Profiles',
|
||||
commandName: 'Revolve',
|
||||
})
|
||||
await cmdBar.progressCmdBar()
|
||||
await cmdBar.expectState({
|
||||
stage: 'arguments',
|
||||
currentArgKey: 'axisOrEdge',
|
||||
|
@ -11,6 +11,7 @@ import {
|
||||
getPlaywrightDownloadDir,
|
||||
getUtils,
|
||||
isOutOfViewInScrollContainer,
|
||||
runningOnWindows,
|
||||
} from '@e2e/playwright/test-utils'
|
||||
import { expect, test } from '@e2e/playwright/zoo-test'
|
||||
|
||||
@ -1979,7 +1980,6 @@ test(
|
||||
}
|
||||
)
|
||||
|
||||
// Flaky
|
||||
test(
|
||||
'Original project name persist after onboarding',
|
||||
{ tag: '@electron' },
|
||||
@ -2066,13 +2066,9 @@ test(
|
||||
)
|
||||
|
||||
test(
|
||||
'nested dir import works on windows',
|
||||
{ tag: ['@electron', '@windows'] },
|
||||
async ({ scene, cmdBar, context, page }, testInfo) => {
|
||||
// Skip if on non-windows
|
||||
if (process.platform !== 'win32') {
|
||||
test.skip()
|
||||
}
|
||||
'import from nested directory',
|
||||
{ tag: ['@electron', '@windows', '@macos'] },
|
||||
async ({ scene, cmdBar, context, page }) => {
|
||||
await context.folderSetupFn(async (dir) => {
|
||||
const bracketDir = path.join(dir, 'bracket')
|
||||
await fsp.mkdir(bracketDir, { recursive: true })
|
||||
@ -2085,9 +2081,9 @@ test(
|
||||
)
|
||||
await fsp.writeFile(
|
||||
path.join(bracketDir, 'main.kcl'),
|
||||
`import 'nested\\main.kcl' as thing
|
||||
|
||||
thing`
|
||||
runningOnWindows()
|
||||
? `import 'nested\\main.kcl' as thing\n\nthing`
|
||||
: `import 'nested/main.kcl' as thing\n\nthing`
|
||||
)
|
||||
})
|
||||
|
||||
|
@ -1016,6 +1016,7 @@ profile001 = startProfile(sketch001, at = [${roundOff(scale * 69.6)}, ${roundOff
|
||||
|
||||
// sketch selection should already have been made.
|
||||
// otherwise the cmdbar would be waiting for a selection.
|
||||
await cmdBar.progressCmdBar()
|
||||
await cmdBar.expectState({
|
||||
stage: 'arguments',
|
||||
currentArgKey: 'length',
|
||||
|
@ -103,6 +103,8 @@ test.describe('Testing loading external models', () => {
|
||||
file: 'ball-bearing' + FILE_EXT,
|
||||
title: 'Ball Bearing',
|
||||
file1: 'ball-bearing-1' + FILE_EXT,
|
||||
folderName: 'ball-bearing',
|
||||
folderName1: 'ball-bearing-1',
|
||||
}
|
||||
const projectCard = page.getByRole('link', { name: 'bracket' })
|
||||
const overwriteWarning = page.getByText(
|
||||
@ -154,8 +156,10 @@ test.describe('Testing loading external models', () => {
|
||||
|
||||
await test.step(`Ensure we made and opened a new file`, async () => {
|
||||
await editor.expectEditor.toContain('// ' + sampleOne.title)
|
||||
await expect(newlyCreatedFile(sampleOne.file)).toBeVisible()
|
||||
await expect(projectMenuButton).toContainText(sampleOne.file)
|
||||
await expect(
|
||||
page.getByTestId('file-tree-item').getByText(sampleOne.folderName)
|
||||
).toBeVisible()
|
||||
await expect(projectMenuButton).toContainText('main.kcl')
|
||||
})
|
||||
|
||||
await test.step(`Load a KCL sample with the command palette`, async () => {
|
||||
@ -169,8 +173,10 @@ test.describe('Testing loading external models', () => {
|
||||
|
||||
await test.step(`Ensure we made and opened a new file with a unique name`, async () => {
|
||||
await editor.expectEditor.toContain('// ' + sampleOne.title)
|
||||
await expect(newlyCreatedFile(sampleOne.file1)).toBeVisible()
|
||||
await expect(projectMenuButton).toContainText(sampleOne.file1)
|
||||
await expect(
|
||||
page.getByTestId('file-tree-item').getByText(sampleOne.folderName1)
|
||||
).toBeVisible()
|
||||
await expect(projectMenuButton).toContainText('main.kcl')
|
||||
})
|
||||
}
|
||||
)
|
||||
|
@ -984,12 +984,12 @@ test.describe('Mocked Text-to-CAD API tests', { tag: ['@skipWin'] }, () => {
|
||||
)
|
||||
await expect(page.getByTestId('app-header-file-name')).toBeVisible()
|
||||
await expect(page.getByTestId('app-header-file-name')).toContainText(
|
||||
'2x2x2-cube.kcl'
|
||||
'main.kcl'
|
||||
)
|
||||
|
||||
await u.openFilePanel()
|
||||
await expect(
|
||||
page.getByTestId('file-tree-item').getByText('2x2x2-cube.kcl')
|
||||
page.getByTestId('file-tree-item').getByText('2x2x2-cube')
|
||||
).toBeVisible()
|
||||
}
|
||||
)
|
||||
@ -1184,13 +1184,13 @@ test.describe('Mocked Text-to-CAD API tests', { tag: ['@skipWin'] }, () => {
|
||||
)
|
||||
await expect(page.getByTestId('app-header-file-name')).toBeVisible()
|
||||
await expect(page.getByTestId('app-header-file-name')).toContainText(
|
||||
'2x2x2-cube.kcl'
|
||||
'main.kcl'
|
||||
)
|
||||
|
||||
// Check file is created
|
||||
await u.openFilePanel()
|
||||
await expect(
|
||||
page.getByTestId('file-tree-item').getByText('2x2x2-cube.kcl')
|
||||
page.getByTestId('file-tree-item').getByText('2x2x2-cube')
|
||||
).toBeVisible()
|
||||
}
|
||||
)
|
||||
@ -1476,13 +1476,13 @@ test.describe('Mocked Text-to-CAD API tests', { tag: ['@skipWin'] }, () => {
|
||||
)
|
||||
await expect(page.getByTestId('app-header-file-name')).toBeVisible()
|
||||
await expect(page.getByTestId('app-header-file-name')).toContainText(
|
||||
'2x2x2-cube.kcl'
|
||||
'main.kcl'
|
||||
)
|
||||
|
||||
// Check file is created
|
||||
await u.openFilePanel()
|
||||
await expect(
|
||||
page.getByTestId('file-tree-item').getByText('2x2x2-cube.kcl')
|
||||
page.getByTestId('file-tree-item').getByText('2x2x2-cube')
|
||||
).toBeVisible()
|
||||
await expect(
|
||||
page.getByTestId('file-tree-item').getByText('main.kcl')
|
||||
|
@ -573,6 +573,7 @@ profile001 = startProfile(sketch002, at = [-12.34, 12.34])
|
||||
await expect(page.getByTestId('command-bar')).toBeVisible()
|
||||
await page.waitForTimeout(100)
|
||||
|
||||
await cmdBar.progressCmdBar()
|
||||
await cmdBar.progressCmdBar()
|
||||
await expect(page.getByText('Confirm Extrude')).toBeVisible()
|
||||
await cmdBar.progressCmdBar()
|
||||
|
@ -33,14 +33,9 @@ stemLoftProfile2 = startSketchOn(offsetPlane(XY, offset = 75))
|
||||
// Draw the third profile for the lofted femur
|
||||
p3Z = 110
|
||||
p3A = 25
|
||||
plane003 = {
|
||||
origin = [0, 0.0, p3Z],
|
||||
xAxis = [cos(p3A), 0, sin(p3A)],
|
||||
yAxis = [0.0, 1.0, 0.0]
|
||||
}
|
||||
l3 = 32
|
||||
r3 = 4
|
||||
stemLoftProfile3 = startSketchOn(plane003)
|
||||
stemLoftProfile3 = startSketchOn(XY)
|
||||
|> startProfile(at = [-15.5, -l3 / 2])
|
||||
|> yLine(length = l3, tag = $seg03)
|
||||
|> tangentialArc(angle = -120, radius = r3)
|
||||
@ -49,18 +44,14 @@ stemLoftProfile3 = startSketchOn(plane003)
|
||||
|> angledLine(angle = 30, length = -segLen(seg03))
|
||||
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|
||||
|> translate(z = p3Z)
|
||||
|> rotate(pitch = -p3A)
|
||||
// Draw the fourth profile for the lofted femur
|
||||
p4Z = 130
|
||||
p4A = 36.5
|
||||
plane004 = {
|
||||
origin = [0, 0.0, p4Z],
|
||||
xAxis = [cos(p4A), 0, sin(p4A)],
|
||||
yAxis = [0.0, 1.0, 0.0]
|
||||
}
|
||||
l4 = 16
|
||||
r4 = 5
|
||||
stemLoftProfile4 = startSketchOn(plane004)
|
||||
stemLoftProfile4 = startSketchOn(XY)
|
||||
|> startProfile(at = [-23, -l4 / 2])
|
||||
|> yLine(length = l4, tag = $seg04)
|
||||
|> tangentialArc(angle = -120, radius = r4)
|
||||
@ -69,18 +60,14 @@ stemLoftProfile4 = startSketchOn(plane004)
|
||||
|> angledLine(angle = 30, length = -segLen(seg04))
|
||||
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|
||||
|> translate(z = p4Z)
|
||||
|> rotate(pitch = -p4A)
|
||||
// Draw the first profile for the femoral stem
|
||||
p5Z = 140
|
||||
p5A = 36.5
|
||||
plane005 = {
|
||||
origin = [0, 0.0, p5Z],
|
||||
xAxis = [cos(p5A), 0, sin(p5A)],
|
||||
yAxis = [0.0, 1.0, 0.0]
|
||||
}
|
||||
l5 = 1.6
|
||||
r5 = 1.6
|
||||
stemLoftProfile5 = startSketchOn(plane005)
|
||||
stemLoftProfile5 = startSketchOn(XY)
|
||||
|> startProfile(at = [-19.5, -l5 / 2])
|
||||
|> yLine(length = l5, tag = $seg05)
|
||||
|> tangentialArc(angle = -120, radius = r5)
|
||||
@ -89,18 +76,14 @@ stemLoftProfile5 = startSketchOn(plane005)
|
||||
|> angledLine(angle = 30, length = -segLen(seg05))
|
||||
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|
||||
|> translate(z = p5Z)
|
||||
|> rotate(pitch = -p5A)
|
||||
// Draw the second profile for the femoral stem
|
||||
p6Z = 145
|
||||
p6A = 36.5
|
||||
plane006 = {
|
||||
origin = [0, 0.0, p6Z],
|
||||
xAxis = [cos(p6A), 0, sin(p6A)],
|
||||
yAxis = [0.0, 1.0, 0.0]
|
||||
}
|
||||
l6 = 1
|
||||
r6 = 3
|
||||
stemLoftProfile6 = startSketchOn(plane006)
|
||||
stemLoftProfile6 = startSketchOn(XY)
|
||||
|> startProfile(at = [-23.4, -l6 / 2])
|
||||
|> yLine(length = l6, tag = $seg06)
|
||||
|> tangentialArc(angle = -120, radius = r6)
|
||||
@ -109,27 +92,24 @@ stemLoftProfile6 = startSketchOn(plane006)
|
||||
|> angledLine(angle = 30, length = -segLen(seg06))
|
||||
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|
||||
// Draw the third profile for the femoral stem
|
||||
stemTab = clone(stemLoftProfile6)
|
||||
|> extrude(%, length = 6)
|
||||
|
||||
|> translate(z = p6Z)
|
||||
|> rotate(pitch = -p6A)
|
||||
// Loft the femur using all profiles in sequence
|
||||
|
||||
femur = loft([
|
||||
stemLoftProfile1,
|
||||
stemLoftProfile2,
|
||||
stemLoftProfile3,
|
||||
stemLoftProfile4
|
||||
])
|
||||
|
||||
// Loft the femoral stem
|
||||
femoralStem = loft([
|
||||
clone(stemLoftProfile4),
|
||||
stemLoftProfile5,
|
||||
stemLoftProfile6
|
||||
clone(stemLoftProfile6)
|
||||
])
|
||||
|
||||
// Draw the third profile for the femoral stem
|
||||
stemTab = stemLoftProfile6
|
||||
|> extrude(length = 6)
|
||||
// Revolve a hollow socket to represent the femoral head
|
||||
femoralHead = startSketchOn(XZ)
|
||||
|> startProfile(at = [4, 0])
|
||||
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 13 KiB |
20
rust/Cargo.lock
generated
@ -1815,7 +1815,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-bumper"
|
||||
version = "0.1.75"
|
||||
version = "0.1.76"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
@ -1826,7 +1826,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-derive-docs"
|
||||
version = "0.1.75"
|
||||
version = "0.1.76"
|
||||
dependencies = [
|
||||
"Inflector",
|
||||
"anyhow",
|
||||
@ -1845,7 +1845,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-directory-test-macro"
|
||||
version = "0.1.75"
|
||||
version = "0.1.76"
|
||||
dependencies = [
|
||||
"convert_case",
|
||||
"proc-macro2",
|
||||
@ -1855,7 +1855,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-language-server"
|
||||
version = "0.2.75"
|
||||
version = "0.2.76"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
@ -1876,7 +1876,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-language-server-release"
|
||||
version = "0.1.75"
|
||||
version = "0.1.76"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
@ -1896,7 +1896,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-lib"
|
||||
version = "0.2.75"
|
||||
version = "0.2.76"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"approx 0.5.1",
|
||||
@ -1973,7 +1973,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-python-bindings"
|
||||
version = "0.3.75"
|
||||
version = "0.3.76"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"kcl-lib",
|
||||
@ -1988,7 +1988,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-test-server"
|
||||
version = "0.1.75"
|
||||
version = "0.1.76"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"hyper 0.14.32",
|
||||
@ -2001,7 +2001,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-to-core"
|
||||
version = "0.1.75"
|
||||
version = "0.1.76"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -2015,7 +2015,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-wasm-lib"
|
||||
version = "0.1.75"
|
||||
version = "0.1.76"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bson",
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
[package]
|
||||
name = "kcl-bumper"
|
||||
version = "0.1.75"
|
||||
version = "0.1.76"
|
||||
edition = "2021"
|
||||
repository = "https://github.com/KittyCAD/modeling-api"
|
||||
rust-version = "1.76"
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "kcl-derive-docs"
|
||||
description = "A tool for generating documentation from Rust derive macros"
|
||||
version = "0.1.75"
|
||||
version = "0.1.76"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
repository = "https://github.com/KittyCAD/modeling-app"
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "kcl-directory-test-macro"
|
||||
description = "A tool for generating tests from a directory of kcl files"
|
||||
version = "0.1.75"
|
||||
version = "0.1.76"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
repository = "https://github.com/KittyCAD/modeling-app"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "kcl-language-server-release"
|
||||
version = "0.1.75"
|
||||
version = "0.1.76"
|
||||
edition = "2021"
|
||||
authors = ["KittyCAD Inc <kcl@kittycad.io>"]
|
||||
publish = false
|
||||
|
@ -2,7 +2,7 @@
|
||||
name = "kcl-language-server"
|
||||
description = "A language server for KCL."
|
||||
authors = ["KittyCAD Inc <kcl@kittycad.io>"]
|
||||
version = "0.2.75"
|
||||
version = "0.2.76"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "kcl-lib"
|
||||
description = "KittyCAD Language implementation and tools"
|
||||
version = "0.2.75"
|
||||
version = "0.2.76"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
repository = "https://github.com/KittyCAD/modeling-app"
|
||||
|
@ -631,6 +631,8 @@ impl FnData {
|
||||
return "clone(${0:part001})".to_owned();
|
||||
} else if self.name == "hole" {
|
||||
return "hole(${0:holeSketch}, ${1:%})".to_owned();
|
||||
} else if self.name == "circle" {
|
||||
return "circle(center = [${0:3.14}, ${1:3.14}], diameter = ${2:3.14})".to_owned();
|
||||
}
|
||||
let mut args = Vec::new();
|
||||
let mut index = 0;
|
||||
|
@ -1018,7 +1018,7 @@ mod tests {
|
||||
let snippet = circle_fn.to_autocomplete_snippet();
|
||||
assert_eq!(
|
||||
snippet,
|
||||
r#"circle(center = [${0:3.14}, ${1:3.14}], radius = ${2:3.14})"#
|
||||
r#"circle(center = [${0:3.14}, ${1:3.14}], diameter = ${2:3.14})"#
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ impl ExecutorContext {
|
||||
) -> Result<(Option<KclValue>, EnvironmentRef, Vec<String>), KclError> {
|
||||
crate::log::log(format!("enter module {path} {}", exec_state.stack()));
|
||||
|
||||
let mut local_state = ModuleState::new(path.std_path(), exec_state.stack().memory.clone(), Some(module_id));
|
||||
let mut local_state = ModuleState::new(path.clone(), exec_state.stack().memory.clone(), Some(module_id));
|
||||
if !preserve_mem {
|
||||
std::mem::swap(&mut exec_state.mod_local, &mut local_state);
|
||||
}
|
||||
@ -139,8 +139,13 @@ impl ExecutorContext {
|
||||
|
||||
let source_range = SourceRange::from(import_stmt);
|
||||
let attrs = &import_stmt.outer_attrs;
|
||||
let module_path = ModulePath::from_import_path(
|
||||
&import_stmt.path,
|
||||
&self.settings.project_directory,
|
||||
&exec_state.mod_local.path,
|
||||
)?;
|
||||
let module_id = self
|
||||
.open_module(&import_stmt.path, attrs, exec_state, source_range)
|
||||
.open_module(&import_stmt.path, attrs, &module_path, exec_state, source_range)
|
||||
.await?;
|
||||
|
||||
match &import_stmt.selector {
|
||||
@ -298,9 +303,9 @@ impl ExecutorContext {
|
||||
let impl_kind = annotations::get_impl(&ty.outer_attrs, metadata.source_range)?.unwrap_or_default();
|
||||
match impl_kind {
|
||||
annotations::Impl::Rust => {
|
||||
let std_path = match &exec_state.mod_local.std_path {
|
||||
Some(p) => p,
|
||||
None => {
|
||||
let std_path = match &exec_state.mod_local.path {
|
||||
ModulePath::Std { value } => value,
|
||||
ModulePath::Local { .. } | ModulePath::Main => {
|
||||
return Err(KclError::Semantic(KclErrorDetails::new(
|
||||
"User-defined types are not yet supported.".to_owned(),
|
||||
vec![metadata.source_range],
|
||||
@ -420,16 +425,15 @@ impl ExecutorContext {
|
||||
&self,
|
||||
path: &ImportPath,
|
||||
attrs: &[Node<Annotation>],
|
||||
resolved_path: &ModulePath,
|
||||
exec_state: &mut ExecState,
|
||||
source_range: SourceRange,
|
||||
) -> Result<ModuleId, KclError> {
|
||||
let resolved_path = ModulePath::from_import_path(path, &self.settings.project_directory);
|
||||
|
||||
match path {
|
||||
ImportPath::Kcl { .. } => {
|
||||
exec_state.global.mod_loader.cycle_check(&resolved_path, source_range)?;
|
||||
exec_state.global.mod_loader.cycle_check(resolved_path, source_range)?;
|
||||
|
||||
if let Some(id) = exec_state.id_for_module(&resolved_path) {
|
||||
if let Some(id) = exec_state.id_for_module(resolved_path) {
|
||||
return Ok(id);
|
||||
}
|
||||
|
||||
@ -440,12 +444,12 @@ impl ExecutorContext {
|
||||
exec_state.add_id_to_source(id, source.clone());
|
||||
// TODO handle parsing errors properly
|
||||
let parsed = crate::parsing::parse_str(&source.source, id).parse_errs_as_err()?;
|
||||
exec_state.add_module(id, resolved_path, ModuleRepr::Kcl(parsed, None));
|
||||
exec_state.add_module(id, resolved_path.clone(), ModuleRepr::Kcl(parsed, None));
|
||||
|
||||
Ok(id)
|
||||
}
|
||||
ImportPath::Foreign { .. } => {
|
||||
if let Some(id) = exec_state.id_for_module(&resolved_path) {
|
||||
if let Some(id) = exec_state.id_for_module(resolved_path) {
|
||||
return Ok(id);
|
||||
}
|
||||
|
||||
@ -455,11 +459,11 @@ impl ExecutorContext {
|
||||
exec_state.add_path_to_source_id(resolved_path.clone(), id);
|
||||
let format = super::import::format_from_annotations(attrs, path, source_range)?;
|
||||
let geom = super::import::import_foreign(path, format, exec_state, self, source_range).await?;
|
||||
exec_state.add_module(id, resolved_path, ModuleRepr::Foreign(geom, None));
|
||||
exec_state.add_module(id, resolved_path.clone(), ModuleRepr::Foreign(geom, None));
|
||||
Ok(id)
|
||||
}
|
||||
ImportPath::Std { .. } => {
|
||||
if let Some(id) = exec_state.id_for_module(&resolved_path) {
|
||||
if let Some(id) = exec_state.id_for_module(resolved_path) {
|
||||
return Ok(id);
|
||||
}
|
||||
|
||||
@ -471,7 +475,7 @@ impl ExecutorContext {
|
||||
let parsed = crate::parsing::parse_str(&source.source, id)
|
||||
.parse_errs_as_err()
|
||||
.unwrap();
|
||||
exec_state.add_module(id, resolved_path, ModuleRepr::Kcl(parsed, None));
|
||||
exec_state.add_module(id, resolved_path.clone(), ModuleRepr::Kcl(parsed, None));
|
||||
Ok(id)
|
||||
}
|
||||
}
|
||||
@ -632,7 +636,7 @@ impl ExecutorContext {
|
||||
.unwrap_or(false);
|
||||
|
||||
if rust_impl {
|
||||
if let Some(std_path) = &exec_state.mod_local.std_path {
|
||||
if let ModulePath::Std { value: std_path } = &exec_state.mod_local.path {
|
||||
let (func, props) = crate::std::std_fn(std_path, statement_kind.expect_name());
|
||||
KclValue::Function {
|
||||
value: FunctionSource::Std {
|
||||
@ -755,7 +759,7 @@ fn apply_ascription(
|
||||
};
|
||||
KclError::Semantic(KclErrorDetails::new(
|
||||
format!(
|
||||
"could not coerce {} value to type {ty}{suggestion}",
|
||||
"could not coerce value of type {} to type {ty}{suggestion}",
|
||||
value.human_friendly_type()
|
||||
),
|
||||
vec![source_range],
|
||||
@ -1648,7 +1652,7 @@ a = 42: string
|
||||
let err = result.unwrap_err();
|
||||
assert!(
|
||||
err.to_string()
|
||||
.contains("could not coerce number(default units) value to type string"),
|
||||
.contains("could not coerce value of type number(default units) to type string"),
|
||||
"Expected error but found {err:?}"
|
||||
);
|
||||
|
||||
@ -1659,7 +1663,7 @@ a = 42: Plane
|
||||
let err = result.unwrap_err();
|
||||
assert!(
|
||||
err.to_string()
|
||||
.contains("could not coerce number(default units) value to type Plane"),
|
||||
.contains("could not coerce value of type number(default units) to type Plane"),
|
||||
"Expected error but found {err:?}"
|
||||
);
|
||||
|
||||
@ -1669,8 +1673,9 @@ arr = [0]: [string]
|
||||
let result = parse_execute(program).await;
|
||||
let err = result.unwrap_err();
|
||||
assert!(
|
||||
err.to_string()
|
||||
.contains("could not coerce [any; 1] value to type [string]"),
|
||||
err.to_string().contains(
|
||||
"could not coerce value of type array of number(default units) with 1 value to type [string]"
|
||||
),
|
||||
"Expected error but found {err:?}"
|
||||
);
|
||||
|
||||
@ -1681,7 +1686,7 @@ mixedArr = [0, "a"]: [number(mm)]
|
||||
let err = result.unwrap_err();
|
||||
assert!(
|
||||
err.to_string()
|
||||
.contains("could not coerce [any; 2] value to type [number(mm)]"),
|
||||
.contains("could not coerce value of type array of number(default units), string with 2 values to type [number(mm)]"),
|
||||
"Expected error but found {err:?}"
|
||||
);
|
||||
}
|
||||
|
@ -281,8 +281,34 @@ impl KclValue {
|
||||
/// Human readable type name used in error messages. Should not be relied
|
||||
/// on for program logic.
|
||||
pub(crate) fn human_friendly_type(&self) -> String {
|
||||
if let Some(t) = self.principal_type() {
|
||||
return t.to_string();
|
||||
self.inner_human_friendly_type(1)
|
||||
}
|
||||
|
||||
fn inner_human_friendly_type(&self, max_depth: usize) -> String {
|
||||
if let Some(pt) = self.principal_type() {
|
||||
if max_depth > 0 {
|
||||
// The principal type of an array uses the array's element type,
|
||||
// which is oftentimes `any`, and that's not a helpful message. So
|
||||
// we show the actual elements.
|
||||
if let Some(elements) = self.as_array() {
|
||||
// If it's empty, we want to show the type of the array.
|
||||
if !elements.is_empty() {
|
||||
// A max of 3 is good because it's common to use 3D points.
|
||||
let max = 3;
|
||||
let len = elements.len();
|
||||
let ellipsis = if len > max { ", ..." } else { "" };
|
||||
let element_label = if len == 1 { "value" } else { "values" };
|
||||
let element_tys = elements
|
||||
.iter()
|
||||
.take(max)
|
||||
.map(|elem| elem.inner_human_friendly_type(max_depth - 1))
|
||||
.collect::<Vec<_>>()
|
||||
.join(", ");
|
||||
return format!("array of {element_tys}{ellipsis} with {len} {element_label}");
|
||||
}
|
||||
}
|
||||
}
|
||||
return pt.to_string();
|
||||
}
|
||||
match self {
|
||||
KclValue::Uuid { .. } => "Unique ID (uuid)",
|
||||
@ -644,3 +670,88 @@ impl From<GeometryWithImportedGeometry> for KclValue {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_human_friendly_type() {
|
||||
let len = KclValue::Number {
|
||||
value: 1.0,
|
||||
ty: NumericType::Known(UnitType::Length(UnitLen::Unknown)),
|
||||
meta: vec![],
|
||||
};
|
||||
assert_eq!(len.human_friendly_type(), "number(Length)".to_string());
|
||||
|
||||
let unknown = KclValue::Number {
|
||||
value: 1.0,
|
||||
ty: NumericType::Unknown,
|
||||
meta: vec![],
|
||||
};
|
||||
assert_eq!(unknown.human_friendly_type(), "number(unknown units)".to_string());
|
||||
|
||||
let mm = KclValue::Number {
|
||||
value: 1.0,
|
||||
ty: NumericType::Known(UnitType::Length(UnitLen::Mm)),
|
||||
meta: vec![],
|
||||
};
|
||||
assert_eq!(mm.human_friendly_type(), "number(mm)".to_string());
|
||||
|
||||
let array1_mm = KclValue::HomArray {
|
||||
value: vec![mm.clone()],
|
||||
ty: RuntimeType::any(),
|
||||
};
|
||||
assert_eq!(
|
||||
array1_mm.human_friendly_type(),
|
||||
"array of number(mm) with 1 value".to_string()
|
||||
);
|
||||
|
||||
let array2_mm = KclValue::HomArray {
|
||||
value: vec![mm.clone(), mm.clone()],
|
||||
ty: RuntimeType::any(),
|
||||
};
|
||||
assert_eq!(
|
||||
array2_mm.human_friendly_type(),
|
||||
"array of number(mm), number(mm) with 2 values".to_string()
|
||||
);
|
||||
|
||||
let array3_mm = KclValue::HomArray {
|
||||
value: vec![mm.clone(), mm.clone(), mm.clone()],
|
||||
ty: RuntimeType::any(),
|
||||
};
|
||||
assert_eq!(
|
||||
array3_mm.human_friendly_type(),
|
||||
"array of number(mm), number(mm), number(mm) with 3 values".to_string()
|
||||
);
|
||||
|
||||
let inches = KclValue::Number {
|
||||
value: 1.0,
|
||||
ty: NumericType::Known(UnitType::Length(UnitLen::Inches)),
|
||||
meta: vec![],
|
||||
};
|
||||
let array4 = KclValue::HomArray {
|
||||
value: vec![mm.clone(), mm.clone(), inches.clone(), mm.clone()],
|
||||
ty: RuntimeType::any(),
|
||||
};
|
||||
assert_eq!(
|
||||
array4.human_friendly_type(),
|
||||
"array of number(mm), number(mm), number(in), ... with 4 values".to_string()
|
||||
);
|
||||
|
||||
let empty_array = KclValue::HomArray {
|
||||
value: vec![],
|
||||
ty: RuntimeType::any(),
|
||||
};
|
||||
assert_eq!(empty_array.human_friendly_type(), "[any; 0]".to_string());
|
||||
|
||||
let array_nested = KclValue::HomArray {
|
||||
value: vec![array2_mm.clone()],
|
||||
ty: RuntimeType::any(),
|
||||
};
|
||||
assert_eq!(
|
||||
array_nested.human_friendly_type(),
|
||||
"array of [any; 2] with 1 value".to_string()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1044,6 +1044,7 @@ impl ExecutorContext {
|
||||
|
||||
let root_imports = crate::walk::import_universe(
|
||||
self,
|
||||
&ModulePath::Main,
|
||||
&ModuleRepr::Kcl(program.ast.clone(), None),
|
||||
&mut universe,
|
||||
exec_state,
|
||||
@ -1211,15 +1212,10 @@ impl ExecutorContext {
|
||||
/// SAFETY: the current thread must have sole access to the memory referenced in exec_state.
|
||||
async fn eval_prelude(&self, exec_state: &mut ExecState, source_range: SourceRange) -> Result<(), KclError> {
|
||||
if exec_state.stack().memory.requires_std() {
|
||||
let path = vec!["std".to_owned(), "prelude".to_owned()];
|
||||
let resolved_path = ModulePath::from_std_import_path(&path)?;
|
||||
let id = self
|
||||
.open_module(
|
||||
&ImportPath::Std {
|
||||
path: vec!["std".to_owned(), "prelude".to_owned()],
|
||||
},
|
||||
&[],
|
||||
exec_state,
|
||||
source_range,
|
||||
)
|
||||
.open_module(&ImportPath::Std { path }, &[], &resolved_path, exec_state, source_range)
|
||||
.await?;
|
||||
let (module_memory, _) = self.exec_module_for_items(id, exec_state, source_range).await?;
|
||||
|
||||
|
@ -85,14 +85,14 @@ pub(super) struct ModuleState {
|
||||
/// Settings specified from annotations.
|
||||
pub settings: MetaSettings,
|
||||
pub(super) explicit_length_units: bool,
|
||||
pub(super) std_path: Option<String>,
|
||||
pub(super) path: ModulePath,
|
||||
}
|
||||
|
||||
impl ExecState {
|
||||
pub fn new(exec_context: &super::ExecutorContext) -> Self {
|
||||
ExecState {
|
||||
global: GlobalState::new(&exec_context.settings),
|
||||
mod_local: ModuleState::new(None, ProgramMemory::new(), Default::default()),
|
||||
mod_local: ModuleState::new(ModulePath::Main, ProgramMemory::new(), Default::default()),
|
||||
exec_context: Some(exec_context.clone()),
|
||||
}
|
||||
}
|
||||
@ -102,7 +102,7 @@ impl ExecState {
|
||||
|
||||
*self = ExecState {
|
||||
global,
|
||||
mod_local: ModuleState::new(None, ProgramMemory::new(), Default::default()),
|
||||
mod_local: ModuleState::new(self.mod_local.path.clone(), ProgramMemory::new(), Default::default()),
|
||||
exec_context: Some(exec_context.clone()),
|
||||
};
|
||||
}
|
||||
@ -337,14 +337,14 @@ impl GlobalState {
|
||||
}
|
||||
|
||||
impl ModuleState {
|
||||
pub(super) fn new(std_path: Option<String>, memory: Arc<ProgramMemory>, module_id: Option<ModuleId>) -> Self {
|
||||
pub(super) fn new(path: ModulePath, memory: Arc<ProgramMemory>, module_id: Option<ModuleId>) -> Self {
|
||||
ModuleState {
|
||||
id_generator: IdGenerator::new(module_id),
|
||||
stack: memory.new_stack(),
|
||||
pipe_value: Default::default(),
|
||||
module_exports: Default::default(),
|
||||
explicit_length_units: false,
|
||||
std_path,
|
||||
path,
|
||||
settings: MetaSettings {
|
||||
default_length_units: Default::default(),
|
||||
default_angle_units: Default::default(),
|
||||
|
@ -153,13 +153,6 @@ impl ModulePath {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn std_path(&self) -> Option<String> {
|
||||
match self {
|
||||
ModulePath::Std { value: p } => Some(p.clone()),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) async fn source(&self, fs: &FileManager, source_range: SourceRange) -> Result<ModuleSource, KclError> {
|
||||
match self {
|
||||
ModulePath::Local { value: p } => Ok(ModuleSource {
|
||||
@ -181,25 +174,53 @@ impl ModulePath {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn from_import_path(path: &ImportPath, project_directory: &Option<TypedPath>) -> Self {
|
||||
pub(crate) fn from_import_path(
|
||||
path: &ImportPath,
|
||||
project_directory: &Option<TypedPath>,
|
||||
import_from: &ModulePath,
|
||||
) -> Result<Self, KclError> {
|
||||
match path {
|
||||
ImportPath::Kcl { filename: path } | ImportPath::Foreign { path } => {
|
||||
let resolved_path = if let Some(project_dir) = project_directory {
|
||||
project_dir.join_typed(path)
|
||||
} else {
|
||||
path.clone()
|
||||
let resolved_path = match import_from {
|
||||
ModulePath::Main => {
|
||||
if let Some(project_dir) = project_directory {
|
||||
project_dir.join_typed(path)
|
||||
} else {
|
||||
path.clone()
|
||||
}
|
||||
}
|
||||
ModulePath::Local { value } => {
|
||||
let import_from_dir = value.parent();
|
||||
let base = import_from_dir.as_ref().or(project_directory.as_ref());
|
||||
if let Some(dir) = base {
|
||||
dir.join_typed(path)
|
||||
} else {
|
||||
path.clone()
|
||||
}
|
||||
}
|
||||
ModulePath::Std { .. } => {
|
||||
let message = format!("Cannot import a non-std KCL file from std: {path}.");
|
||||
debug_assert!(false, "{}", &message);
|
||||
return Err(KclError::Internal(KclErrorDetails::new(message, vec![])));
|
||||
}
|
||||
};
|
||||
ModulePath::Local { value: resolved_path }
|
||||
}
|
||||
ImportPath::Std { path } => {
|
||||
// For now we only support importing from singly-nested modules inside std.
|
||||
assert_eq!(path.len(), 2);
|
||||
assert_eq!(&path[0], "std");
|
||||
|
||||
ModulePath::Std { value: path[1].clone() }
|
||||
Ok(ModulePath::Local { value: resolved_path })
|
||||
}
|
||||
ImportPath::Std { path } => Self::from_std_import_path(path),
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn from_std_import_path(path: &[String]) -> Result<Self, KclError> {
|
||||
// For now we only support importing from singly-nested modules inside std.
|
||||
if path.len() != 2 || path[0] != "std" {
|
||||
let message = format!("Invalid std import path: {path:?}.");
|
||||
debug_assert!(false, "{}", &message);
|
||||
return Err(KclError::Internal(KclErrorDetails::new(message, vec![])));
|
||||
}
|
||||
|
||||
Ok(ModulePath::Std { value: path[1].clone() })
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for ModulePath {
|
||||
|
@ -384,6 +384,27 @@ mod any_type {
|
||||
super::execute(TEST_NAME, false).await
|
||||
}
|
||||
}
|
||||
mod error_with_point_shows_numeric_units {
|
||||
const TEST_NAME: &str = "error_with_point_shows_numeric_units";
|
||||
|
||||
/// Test parsing KCL.
|
||||
#[test]
|
||||
fn parse() {
|
||||
super::parse(TEST_NAME)
|
||||
}
|
||||
|
||||
/// Test that parsing and unparsing KCL produces the original KCL input.
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn unparse() {
|
||||
super::unparse(TEST_NAME).await
|
||||
}
|
||||
|
||||
/// Test that KCL is executed correctly.
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn kcl_test_execute() {
|
||||
super::execute(TEST_NAME, true).await
|
||||
}
|
||||
}
|
||||
mod artifact_graph_example_code1 {
|
||||
const TEST_NAME: &str = "artifact_graph_example_code1";
|
||||
|
||||
@ -3360,3 +3381,66 @@ mod nested_windows_main_kcl {
|
||||
super::execute(TEST_NAME, true).await
|
||||
}
|
||||
}
|
||||
mod nested_assembly {
|
||||
const TEST_NAME: &str = "nested_assembly";
|
||||
|
||||
/// Test parsing KCL.
|
||||
#[test]
|
||||
fn parse() {
|
||||
super::parse(TEST_NAME)
|
||||
}
|
||||
|
||||
/// Test that parsing and unparsing KCL produces the original KCL input.
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn unparse() {
|
||||
super::unparse(TEST_NAME).await
|
||||
}
|
||||
|
||||
/// Test that KCL is executed correctly.
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn kcl_test_execute() {
|
||||
super::execute(TEST_NAME, true).await
|
||||
}
|
||||
}
|
||||
mod subtract_regression11 {
|
||||
const TEST_NAME: &str = "subtract_regression11";
|
||||
|
||||
/// Test parsing KCL.
|
||||
#[test]
|
||||
fn parse() {
|
||||
super::parse(TEST_NAME)
|
||||
}
|
||||
|
||||
/// Test that parsing and unparsing KCL produces the original KCL input.
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn unparse() {
|
||||
super::unparse(TEST_NAME).await
|
||||
}
|
||||
|
||||
/// Test that KCL is executed correctly.
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn kcl_test_execute() {
|
||||
super::execute(TEST_NAME, true).await
|
||||
}
|
||||
}
|
||||
mod subtract_regression12 {
|
||||
const TEST_NAME: &str = "subtract_regression12";
|
||||
|
||||
/// Test parsing KCL.
|
||||
#[test]
|
||||
fn parse() {
|
||||
super::parse(TEST_NAME)
|
||||
}
|
||||
|
||||
/// Test that parsing and unparsing KCL produces the original KCL input.
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn unparse() {
|
||||
super::unparse(TEST_NAME).await
|
||||
}
|
||||
|
||||
/// Test that KCL is executed correctly.
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn kcl_test_execute() {
|
||||
super::execute(TEST_NAME, true).await
|
||||
}
|
||||
}
|
||||
|
@ -44,10 +44,11 @@ pub enum SketchOrSurface {
|
||||
pub async fn circle(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
||||
let sketch_or_surface = args.get_unlabeled_kw_arg("sketchOrSurface")?;
|
||||
let center = args.get_kw_arg_typed("center", &RuntimeType::point2d(), exec_state)?;
|
||||
let radius: TyF64 = args.get_kw_arg_typed("radius", &RuntimeType::length(), exec_state)?;
|
||||
let radius: Option<TyF64> = args.get_kw_arg_opt_typed("radius", &RuntimeType::length(), exec_state)?;
|
||||
let diameter: Option<TyF64> = args.get_kw_arg_opt_typed("diameter", &RuntimeType::length(), exec_state)?;
|
||||
let tag = args.get_kw_arg_opt(NEW_TAG_KW)?;
|
||||
|
||||
let sketch = inner_circle(sketch_or_surface, center, radius, tag, exec_state, args).await?;
|
||||
let sketch = inner_circle(sketch_or_surface, center, radius, diameter, tag, exec_state, args).await?;
|
||||
Ok(KclValue::Sketch {
|
||||
value: Box::new(sketch),
|
||||
})
|
||||
@ -56,7 +57,8 @@ pub async fn circle(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
async fn inner_circle(
|
||||
sketch_or_surface: SketchOrSurface,
|
||||
center: [TyF64; 2],
|
||||
radius: TyF64,
|
||||
radius: Option<TyF64>,
|
||||
diameter: Option<TyF64>,
|
||||
tag: Option<TagNode>,
|
||||
exec_state: &mut ExecState,
|
||||
args: Args,
|
||||
@ -68,6 +70,25 @@ async fn inner_circle(
|
||||
let (center_u, ty) = untype_point(center.clone());
|
||||
let units = ty.expect_length();
|
||||
|
||||
let radius = match (radius, diameter) {
|
||||
(Some(radius), None) => radius,
|
||||
(None, Some(mut diameter)) => {
|
||||
diameter.n /= 2.0;
|
||||
diameter
|
||||
}
|
||||
(None, None) => {
|
||||
return Err(KclError::Type(KclErrorDetails::new(
|
||||
"This function needs either `diameter` or `radius`".to_string(),
|
||||
vec![args.source_range],
|
||||
)))
|
||||
}
|
||||
(Some(_), Some(_)) => {
|
||||
return Err(KclError::Type(KclErrorDetails::new(
|
||||
"You cannot specify both `diameter` and `radius`, please remove one".to_string(),
|
||||
vec![args.source_range],
|
||||
)))
|
||||
}
|
||||
};
|
||||
let from = [center_u[0] + radius.to_length_units(units), center_u[1]];
|
||||
let from_t = [TyF64::new(from[0], ty.clone()), TyF64::new(from[1], ty)];
|
||||
|
||||
|
@ -34,9 +34,9 @@ pub(crate) type Universe = HashMap<String, DependencyInfo>;
|
||||
pub fn import_graph(progs: &Universe, ctx: &ExecutorContext) -> Result<Vec<Vec<String>>, KclError> {
|
||||
let mut graph = Graph::new();
|
||||
|
||||
for (name, (_, _, _, repr)) in progs.iter() {
|
||||
for (name, (_, _, path, repr)) in progs.iter() {
|
||||
graph.extend(
|
||||
import_dependencies(repr, ctx)?
|
||||
import_dependencies(path, repr, ctx)?
|
||||
.into_iter()
|
||||
.map(|(dependency, _, _)| (name.clone(), dependency))
|
||||
.collect::<Vec<_>>(),
|
||||
@ -120,17 +120,26 @@ fn topsort(all_modules: &[&str], graph: Graph) -> Result<Vec<Vec<String>>, KclEr
|
||||
|
||||
type ImportDependencies = Vec<(String, AstNode<ImportStatement>, ModulePath)>;
|
||||
|
||||
pub(crate) fn import_dependencies(repr: &ModuleRepr, ctx: &ExecutorContext) -> Result<ImportDependencies, KclError> {
|
||||
pub(crate) fn import_dependencies(
|
||||
path: &ModulePath,
|
||||
repr: &ModuleRepr,
|
||||
ctx: &ExecutorContext,
|
||||
) -> Result<ImportDependencies, KclError> {
|
||||
let ModuleRepr::Kcl(prog, _) = repr else {
|
||||
// It has no dependencies, so return an empty list.
|
||||
return Ok(vec![]);
|
||||
};
|
||||
|
||||
let ret = Arc::new(Mutex::new(vec![]));
|
||||
fn walk(ret: Arc<Mutex<ImportDependencies>>, node: Node<'_>, ctx: &ExecutorContext) -> Result<(), KclError> {
|
||||
fn walk(
|
||||
ret: Arc<Mutex<ImportDependencies>>,
|
||||
node: Node<'_>,
|
||||
import_from: &ModulePath,
|
||||
ctx: &ExecutorContext,
|
||||
) -> Result<(), KclError> {
|
||||
if let Node::ImportStatement(is) = node {
|
||||
// We only care about Kcl and Foreign imports for now.
|
||||
let resolved_path = ModulePath::from_import_path(&is.path, &ctx.settings.project_directory);
|
||||
let resolved_path = ModulePath::from_import_path(&is.path, &ctx.settings.project_directory, import_from)?;
|
||||
match &is.path {
|
||||
ImportPath::Kcl { filename } => {
|
||||
// We need to lock the mutex to push the dependency.
|
||||
@ -160,13 +169,13 @@ pub(crate) fn import_dependencies(repr: &ModuleRepr, ctx: &ExecutorContext) -> R
|
||||
}
|
||||
|
||||
for child in node.children().iter() {
|
||||
walk(ret.clone(), *child, ctx)?;
|
||||
walk(ret.clone(), *child, import_from, ctx)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
walk(ret.clone(), prog.into(), ctx)?;
|
||||
walk(ret.clone(), prog.into(), path, ctx)?;
|
||||
|
||||
let ret = ret.lock().map_err(|err| {
|
||||
KclError::Internal(KclErrorDetails::new(
|
||||
@ -182,11 +191,12 @@ pub(crate) fn import_dependencies(repr: &ModuleRepr, ctx: &ExecutorContext) -> R
|
||||
/// only `repr`'s non-transitive imports.
|
||||
pub(crate) async fn import_universe(
|
||||
ctx: &ExecutorContext,
|
||||
path: &ModulePath,
|
||||
repr: &ModuleRepr,
|
||||
out: &mut Universe,
|
||||
exec_state: &mut ExecState,
|
||||
) -> Result<UniverseMap, KclError> {
|
||||
let modules = import_dependencies(repr, ctx)?;
|
||||
let modules = import_dependencies(path, repr, ctx)?;
|
||||
let mut module_imports = HashMap::new();
|
||||
for (filename, import_stmt, module_path) in modules {
|
||||
match &module_path {
|
||||
@ -208,7 +218,7 @@ pub(crate) async fn import_universe(
|
||||
let source_range = SourceRange::from(&import_stmt);
|
||||
let attrs = &import_stmt.outer_attrs;
|
||||
let module_id = ctx
|
||||
.open_module(&import_stmt.path, attrs, exec_state, source_range)
|
||||
.open_module(&import_stmt.path, attrs, &module_path, exec_state, source_range)
|
||||
.await?;
|
||||
|
||||
let repr = {
|
||||
@ -221,8 +231,8 @@ pub(crate) async fn import_universe(
|
||||
module_info.repr.clone()
|
||||
};
|
||||
|
||||
out.insert(filename, (import_stmt, module_id, module_path, repr.clone()));
|
||||
Box::pin(import_universe(ctx, &repr, out, exec_state)).await?;
|
||||
out.insert(filename, (import_stmt, module_id, module_path.clone(), repr.clone()));
|
||||
Box::pin(import_universe(ctx, &module_path, &repr, out, exec_state)).await?;
|
||||
}
|
||||
|
||||
Ok(module_imports)
|
||||
|
@ -24,7 +24,7 @@
|
||||
/// |> line(end = [0, 30])
|
||||
/// |> line(end = [-30, 0])
|
||||
/// |> close()
|
||||
/// |> subtract2d(tool = circle(center = [0, 15], radius = 5))
|
||||
/// |> subtract2d(tool = circle(center = [0, 15], diameter = 10))
|
||||
///
|
||||
/// example = extrude(exampleSketch, length = 5)
|
||||
/// ```
|
||||
@ -34,8 +34,10 @@ export fn circle(
|
||||
@sketch_or_surface: Sketch | Plane | Face,
|
||||
/// The center of the circle.
|
||||
center: Point2d,
|
||||
/// The radius of the circle.
|
||||
radius: number(Length),
|
||||
/// The radius of the circle. Incompatible with `diameter`.
|
||||
radius?: number(Length),
|
||||
/// The diameter of the circle. Incompatible with `radius`.
|
||||
diameter?: number(Length),
|
||||
/// Create a new tag which refers to this circle.
|
||||
tag?: tag,
|
||||
): Sketch {}
|
||||
|
@ -4,7 +4,8 @@ description: Error from executing argument_error.kcl
|
||||
---
|
||||
KCL Semantic error
|
||||
|
||||
× semantic: f requires a value with type `fn(any): any`, but found [any; 2]
|
||||
× semantic: f requires a value with type `fn(any): any`, but found array of
|
||||
│ number(default units), number(default units) with 2 values
|
||||
╭─[5:1]
|
||||
4 │
|
||||
5 │ map(f, f = [0, 1])
|
||||
@ -15,7 +16,7 @@ KCL Semantic error
|
||||
╰─▶ KCL Semantic error
|
||||
|
||||
× semantic: f requires a value with type `fn(any): any`, but found
|
||||
│ [any; 2]
|
||||
│ array of number(default units), number(default units) with 2 values
|
||||
╭─[5:12]
|
||||
4 │
|
||||
5 │ map(f, f = [0, 1])
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Error from executing array_elem_pop_fail.kcl
|
||||
---
|
||||
KCL UndefinedValue error
|
||||
|
@ -0,0 +1,57 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Artifact commands error_with_point_shows_numeric_units.kcl
|
||||
---
|
||||
[
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "edge_lines_visible",
|
||||
"hidden": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_visible",
|
||||
"object_id": "[uuid]",
|
||||
"hidden": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_visible",
|
||||
"object_id": "[uuid]",
|
||||
"hidden": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "make_plane",
|
||||
"origin": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"x_axis": {
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"y_axis": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 1.0
|
||||
},
|
||||
"size": 60.0,
|
||||
"clobber": false,
|
||||
"hide": true
|
||||
}
|
||||
}
|
||||
]
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Artifact graph flowchart error_with_point_shows_numeric_units.kcl
|
||||
extension: md
|
||||
snapshot_kind: binary
|
||||
---
|
@ -0,0 +1,5 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
1["Plane<br>[0, 17, 0]"]
|
||||
%% [ProgramBodyItem { index: 0 }, ExpressionStatementExpr, PipeBodyItem { index: 0 }]
|
||||
```
|
201
rust/kcl-lib/tests/error_with_point_shows_numeric_units/ast.snap
Normal file
@ -0,0 +1,201 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Result of parsing error_with_point_shows_numeric_units.kcl
|
||||
---
|
||||
{
|
||||
"Ok": {
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"expression": {
|
||||
"body": [
|
||||
{
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "startSketchOn",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "XZ",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "center",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 0,
|
||||
"elements": [
|
||||
{
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "sin",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "66.6deg",
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 66.6,
|
||||
"suffix": "Deg"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "cos",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "66.6deg",
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 66.6,
|
||||
"suffix": "Deg"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "radius",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "1",
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 1.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "circle",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "PipeExpression",
|
||||
"type": "PipeExpression"
|
||||
},
|
||||
"start": 0,
|
||||
"type": "ExpressionStatement",
|
||||
"type": "ExpressionStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"start": 0
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Error from executing error_with_point_shows_numeric_units.kcl
|
||||
---
|
||||
KCL Semantic error
|
||||
|
||||
× semantic: center requires a value with type `Point2d`, but found array of
|
||||
│ number(Count), number(Count) with 2 values
|
||||
╭─[2:6]
|
||||
1 │ startSketchOn(XZ)
|
||||
2 │ ╭──▶ |> circle(center = [
|
||||
3 │ ││ sin(66.6deg),
|
||||
4 │ ││ cos(66.6deg)
|
||||
5 │ ├──▶ ], radius = 1)
|
||||
· ╰───── tests/error_with_point_shows_numeric_units/input.kcl
|
||||
· ╰───── tests/error_with_point_shows_numeric_units/input.kcl
|
||||
╰────
|
||||
╰─▶ KCL Semantic error
|
||||
|
||||
× semantic: center requires a value with type `Point2d`, but found
|
||||
│ array of number(Count), number(Count) with 2 values
|
||||
╭─[2:22]
|
||||
1 │ startSketchOn(XZ)
|
||||
2 │ ╭─▶ |> circle(center = [
|
||||
3 │ │ sin(66.6deg),
|
||||
4 │ │ cos(66.6deg)
|
||||
5 │ ├─▶ ], radius = 1)
|
||||
· ╰──── tests/error_with_point_shows_numeric_units/input.kcl
|
||||
╰────
|
@ -0,0 +1,5 @@
|
||||
startSketchOn(XZ)
|
||||
|> circle(center = [
|
||||
sin(66.6deg),
|
||||
cos(66.6deg)
|
||||
], radius = 1)
|
@ -0,0 +1,19 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Operations executed error_with_point_shows_numeric_units.kcl
|
||||
---
|
||||
[
|
||||
{
|
||||
"type": "StdLibCall",
|
||||
"name": "startSketchOn",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {},
|
||||
"sourceRange": []
|
||||
}
|
||||
]
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Result of unparsing error_with_point_shows_numeric_units.kcl
|
||||
---
|
||||
startSketchOn(XZ)
|
||||
|> circle(center = [sin(66.6deg), cos(66.6deg)], radius = 1)
|
@ -185,21 +185,20 @@ flowchart LR
|
||||
%% face_code_ref=Missing NodePath
|
||||
86["Cap Start"]
|
||||
%% face_code_ref=Missing NodePath
|
||||
87["Cap Start"]
|
||||
87["Cap End"]
|
||||
%% face_code_ref=Missing NodePath
|
||||
88["Cap End"]
|
||||
%% face_code_ref=Missing NodePath
|
||||
89["Cap End"]
|
||||
%% face_code_ref=Missing NodePath
|
||||
90["Cap End"]
|
||||
%% face_code_ref=Missing NodePath
|
||||
90["SweepEdge Opposite"]
|
||||
91["SweepEdge Opposite"]
|
||||
92["SweepEdge Opposite"]
|
||||
93["SweepEdge Opposite"]
|
||||
94["SweepEdge Opposite"]
|
||||
95["SweepEdge Opposite"]
|
||||
96["SweepEdge Opposite"]
|
||||
97["SweepEdge Opposite"]
|
||||
97["SweepEdge Adjacent"]
|
||||
98["SweepEdge Adjacent"]
|
||||
99["SweepEdge Adjacent"]
|
||||
100["SweepEdge Adjacent"]
|
||||
@ -214,15 +213,14 @@ flowchart LR
|
||||
109["SweepEdge Adjacent"]
|
||||
110["SweepEdge Adjacent"]
|
||||
111["SweepEdge Adjacent"]
|
||||
112["SweepEdge Adjacent"]
|
||||
112["EdgeCut Fillet<br>[2999, 3289, 0]"]
|
||||
%% [ProgramBodyItem { index: 26 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
113["EdgeCut Fillet<br>[2999, 3289, 0]"]
|
||||
%% [ProgramBodyItem { index: 26 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
114["EdgeCut Fillet<br>[2999, 3289, 0]"]
|
||||
%% [ProgramBodyItem { index: 26 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
115["EdgeCut Fillet<br>[2999, 3289, 0]"]
|
||||
%% [ProgramBodyItem { index: 26 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
116["EdgeCut Fillet<br>[2999, 3289, 0]"]
|
||||
%% [ProgramBodyItem { index: 26 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
1 --- 8
|
||||
1 --- 9
|
||||
1 --- 13
|
||||
@ -283,84 +281,84 @@ flowchart LR
|
||||
20 ---- 64
|
||||
82 --- 20
|
||||
27 --- 83
|
||||
27 x--> 87
|
||||
27 --- 97
|
||||
27 --- 112
|
||||
27 x--> 86
|
||||
27 --- 96
|
||||
27 --- 111
|
||||
28 --- 68
|
||||
28 x--> 85
|
||||
28 --- 91
|
||||
28 --- 98
|
||||
28 --- 90
|
||||
28 --- 97
|
||||
31 --- 70
|
||||
31 x--> 84
|
||||
31 --- 95
|
||||
31 --- 102
|
||||
31 --- 94
|
||||
31 --- 101
|
||||
32 --- 71
|
||||
32 x--> 84
|
||||
32 --- 94
|
||||
32 --- 101
|
||||
32 --- 93
|
||||
32 --- 100
|
||||
33 --- 69
|
||||
33 x--> 84
|
||||
33 --- 93
|
||||
33 --- 100
|
||||
33 --- 92
|
||||
33 --- 99
|
||||
34 --- 72
|
||||
34 x--> 84
|
||||
34 --- 92
|
||||
34 --- 99
|
||||
34 --- 91
|
||||
34 --- 98
|
||||
62 <--x 36
|
||||
36 --- 78
|
||||
36 x--> 104
|
||||
36 x--> 103
|
||||
62 <--x 37
|
||||
37 --- 77
|
||||
37 --- 104
|
||||
37 --- 103
|
||||
62 <--x 38
|
||||
38 --- 82
|
||||
38 --- 105
|
||||
38 --- 104
|
||||
62 <--x 39
|
||||
39 --- 79
|
||||
39 --- 106
|
||||
39 --- 105
|
||||
62 <--x 40
|
||||
40 --- 74
|
||||
40 --- 107
|
||||
40 --- 106
|
||||
62 <--x 41
|
||||
41 --- 81
|
||||
41 --- 108
|
||||
41 --- 107
|
||||
62 <--x 42
|
||||
42 --- 76
|
||||
42 --- 109
|
||||
42 --- 108
|
||||
62 <--x 43
|
||||
43 --- 75
|
||||
43 --- 110
|
||||
43 --- 109
|
||||
62 <--x 44
|
||||
44 --- 80
|
||||
44 --- 111
|
||||
44 --- 110
|
||||
45 --- 73
|
||||
45 x--> 82
|
||||
45 --- 96
|
||||
45 --- 103
|
||||
45 --- 95
|
||||
45 --- 102
|
||||
59 --- 68
|
||||
59 --- 85
|
||||
59 --- 89
|
||||
59 --- 91
|
||||
59 --- 98
|
||||
59 --- 88
|
||||
59 --- 90
|
||||
59 --- 97
|
||||
60 --- 83
|
||||
60 --- 87
|
||||
60 --- 90
|
||||
60 --- 97
|
||||
60 --- 112
|
||||
60 --- 86
|
||||
60 --- 89
|
||||
60 --- 96
|
||||
60 --- 111
|
||||
61 --- 69
|
||||
61 --- 70
|
||||
61 --- 71
|
||||
61 --- 72
|
||||
61 --- 84
|
||||
61 --- 88
|
||||
61 --- 87
|
||||
61 --- 91
|
||||
61 --- 92
|
||||
61 --- 93
|
||||
61 --- 94
|
||||
61 --- 95
|
||||
61 --- 98
|
||||
61 --- 99
|
||||
61 --- 100
|
||||
61 --- 101
|
||||
61 --- 102
|
||||
62 --- 74
|
||||
62 --- 75
|
||||
62 --- 76
|
||||
@ -370,6 +368,7 @@ flowchart LR
|
||||
62 --- 80
|
||||
62 --- 81
|
||||
62 --- 82
|
||||
62 --- 103
|
||||
62 --- 104
|
||||
62 --- 105
|
||||
62 --- 106
|
||||
@ -377,54 +376,52 @@ flowchart LR
|
||||
62 --- 108
|
||||
62 --- 109
|
||||
62 --- 110
|
||||
62 --- 111
|
||||
64 --- 73
|
||||
64 --- 86
|
||||
64 --- 96
|
||||
64 --- 103
|
||||
68 --- 91
|
||||
68 --- 98
|
||||
69 --- 93
|
||||
69 --- 100
|
||||
101 <--x 69
|
||||
70 --- 95
|
||||
99 <--x 70
|
||||
70 --- 102
|
||||
71 --- 94
|
||||
71 --- 101
|
||||
102 <--x 71
|
||||
72 --- 92
|
||||
72 --- 99
|
||||
100 <--x 72
|
||||
73 --- 96
|
||||
73 --- 103
|
||||
106 <--x 74
|
||||
74 --- 107
|
||||
109 <--x 75
|
||||
75 --- 110
|
||||
108 <--x 76
|
||||
76 --- 109
|
||||
77 --- 104
|
||||
78 --- 104
|
||||
111 <--x 78
|
||||
105 <--x 79
|
||||
79 --- 106
|
||||
110 <--x 80
|
||||
80 --- 111
|
||||
107 <--x 81
|
||||
81 --- 108
|
||||
82 --- 105
|
||||
83 --- 97
|
||||
83 --- 112
|
||||
96 <--x 86
|
||||
92 <--x 88
|
||||
93 <--x 88
|
||||
94 <--x 88
|
||||
95 <--x 88
|
||||
91 <--x 89
|
||||
97 <--x 90
|
||||
99 <--x 114
|
||||
100 <--x 113
|
||||
101 <--x 116
|
||||
102 <--x 115
|
||||
64 --- 95
|
||||
64 --- 102
|
||||
68 --- 90
|
||||
68 --- 97
|
||||
69 --- 92
|
||||
69 --- 99
|
||||
100 <--x 69
|
||||
70 --- 94
|
||||
98 <--x 70
|
||||
70 --- 101
|
||||
71 --- 93
|
||||
71 --- 100
|
||||
101 <--x 71
|
||||
72 --- 91
|
||||
72 --- 98
|
||||
99 <--x 72
|
||||
73 --- 95
|
||||
73 --- 102
|
||||
95 <--x 74
|
||||
105 <--x 74
|
||||
74 --- 106
|
||||
108 <--x 75
|
||||
75 --- 109
|
||||
107 <--x 76
|
||||
76 --- 108
|
||||
77 --- 103
|
||||
78 --- 103
|
||||
110 <--x 78
|
||||
104 <--x 79
|
||||
79 --- 105
|
||||
109 <--x 80
|
||||
80 --- 110
|
||||
106 <--x 81
|
||||
81 --- 107
|
||||
82 --- 104
|
||||
83 --- 96
|
||||
83 --- 111
|
||||
91 <--x 87
|
||||
92 <--x 87
|
||||
93 <--x 87
|
||||
94 <--x 87
|
||||
90 <--x 88
|
||||
96 <--x 89
|
||||
98 <--x 113
|
||||
99 <--x 112
|
||||
100 <--x 115
|
||||
101 <--x 114
|
||||
```
|
||||
|
@ -1172,7 +1172,7 @@ description: Variables in memory after executing brake-rotor.kcl
|
||||
}
|
||||
},
|
||||
"height": -7.0,
|
||||
"startCapId": "[uuid]",
|
||||
"startCapId": null,
|
||||
"endCapId": null,
|
||||
"units": {
|
||||
"type": "Mm"
|
||||
@ -1606,7 +1606,7 @@ description: Variables in memory after executing brake-rotor.kcl
|
||||
}
|
||||
},
|
||||
"height": -7.0,
|
||||
"startCapId": "[uuid]",
|
||||
"startCapId": null,
|
||||
"endCapId": null,
|
||||
"units": {
|
||||
"type": "Mm"
|
||||
@ -2040,7 +2040,7 @@ description: Variables in memory after executing brake-rotor.kcl
|
||||
}
|
||||
},
|
||||
"height": -7.0,
|
||||
"startCapId": "[uuid]",
|
||||
"startCapId": null,
|
||||
"endCapId": null,
|
||||
"units": {
|
||||
"type": "Mm"
|
||||
@ -2474,7 +2474,7 @@ description: Variables in memory after executing brake-rotor.kcl
|
||||
}
|
||||
},
|
||||
"height": -7.0,
|
||||
"startCapId": "[uuid]",
|
||||
"startCapId": null,
|
||||
"endCapId": null,
|
||||
"units": {
|
||||
"type": "Mm"
|
||||
@ -2908,7 +2908,7 @@ description: Variables in memory after executing brake-rotor.kcl
|
||||
}
|
||||
},
|
||||
"height": -7.0,
|
||||
"startCapId": "[uuid]",
|
||||
"startCapId": null,
|
||||
"endCapId": null,
|
||||
"units": {
|
||||
"type": "Mm"
|
||||
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 81 KiB |
@ -412,12 +412,12 @@ description: Artifact commands prosthetic-hip.kcl
|
||||
"origin": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 110.0
|
||||
"z": 0.0
|
||||
},
|
||||
"x_axis": {
|
||||
"x": 0.9063,
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.4226
|
||||
"z": 0.0
|
||||
},
|
||||
"y_axis": {
|
||||
"x": 0.0,
|
||||
@ -439,9 +439,9 @@ description: Artifact commands prosthetic-hip.kcl
|
||||
"animated": false,
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": -0.4226,
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.9063
|
||||
"z": 1.0
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -458,15 +458,6 @@ description: Artifact commands prosthetic-hip.kcl
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_visible",
|
||||
"object_id": "[uuid]",
|
||||
"hidden": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
@ -589,6 +580,54 @@ description: Artifact commands prosthetic-hip.kcl
|
||||
"path_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "set_object_transform",
|
||||
"object_id": "[uuid]",
|
||||
"transforms": [
|
||||
{
|
||||
"translate": {
|
||||
"property": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 110.0
|
||||
},
|
||||
"set": false,
|
||||
"is_local": true
|
||||
},
|
||||
"rotate_rpy": null,
|
||||
"rotate_angle_axis": null,
|
||||
"scale": null
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "set_object_transform",
|
||||
"object_id": "[uuid]",
|
||||
"transforms": [
|
||||
{
|
||||
"translate": null,
|
||||
"rotate_rpy": {
|
||||
"property": {
|
||||
"x": 0.0,
|
||||
"y": -25.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"set": false,
|
||||
"is_local": true
|
||||
},
|
||||
"rotate_angle_axis": null,
|
||||
"scale": null
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
@ -597,12 +636,12 @@ description: Artifact commands prosthetic-hip.kcl
|
||||
"origin": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 130.0
|
||||
"z": 0.0
|
||||
},
|
||||
"x_axis": {
|
||||
"x": 0.8039,
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.5948
|
||||
"z": 0.0
|
||||
},
|
||||
"y_axis": {
|
||||
"x": 0.0,
|
||||
@ -624,9 +663,9 @@ description: Artifact commands prosthetic-hip.kcl
|
||||
"animated": false,
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": -0.5948,
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.8039
|
||||
"z": 1.0
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -643,15 +682,6 @@ description: Artifact commands prosthetic-hip.kcl
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_visible",
|
||||
"object_id": "[uuid]",
|
||||
"hidden": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
@ -774,6 +804,54 @@ description: Artifact commands prosthetic-hip.kcl
|
||||
"path_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "set_object_transform",
|
||||
"object_id": "[uuid]",
|
||||
"transforms": [
|
||||
{
|
||||
"translate": {
|
||||
"property": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 130.0
|
||||
},
|
||||
"set": false,
|
||||
"is_local": true
|
||||
},
|
||||
"rotate_rpy": null,
|
||||
"rotate_angle_axis": null,
|
||||
"scale": null
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "set_object_transform",
|
||||
"object_id": "[uuid]",
|
||||
"transforms": [
|
||||
{
|
||||
"translate": null,
|
||||
"rotate_rpy": {
|
||||
"property": {
|
||||
"x": 0.0,
|
||||
"y": -36.5,
|
||||
"z": 0.0
|
||||
},
|
||||
"set": false,
|
||||
"is_local": true
|
||||
},
|
||||
"rotate_angle_axis": null,
|
||||
"scale": null
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
@ -782,12 +860,12 @@ description: Artifact commands prosthetic-hip.kcl
|
||||
"origin": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 140.0
|
||||
"z": 0.0
|
||||
},
|
||||
"x_axis": {
|
||||
"x": 0.8039,
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.5948
|
||||
"z": 0.0
|
||||
},
|
||||
"y_axis": {
|
||||
"x": 0.0,
|
||||
@ -809,9 +887,9 @@ description: Artifact commands prosthetic-hip.kcl
|
||||
"animated": false,
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": -0.5948,
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.8039
|
||||
"z": 1.0
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -828,15 +906,6 @@ description: Artifact commands prosthetic-hip.kcl
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_visible",
|
||||
"object_id": "[uuid]",
|
||||
"hidden": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
@ -959,6 +1028,54 @@ description: Artifact commands prosthetic-hip.kcl
|
||||
"path_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "set_object_transform",
|
||||
"object_id": "[uuid]",
|
||||
"transforms": [
|
||||
{
|
||||
"translate": {
|
||||
"property": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 140.0
|
||||
},
|
||||
"set": false,
|
||||
"is_local": true
|
||||
},
|
||||
"rotate_rpy": null,
|
||||
"rotate_angle_axis": null,
|
||||
"scale": null
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "set_object_transform",
|
||||
"object_id": "[uuid]",
|
||||
"transforms": [
|
||||
{
|
||||
"translate": null,
|
||||
"rotate_rpy": {
|
||||
"property": {
|
||||
"x": 0.0,
|
||||
"y": -36.5,
|
||||
"z": 0.0
|
||||
},
|
||||
"set": false,
|
||||
"is_local": true
|
||||
},
|
||||
"rotate_angle_axis": null,
|
||||
"scale": null
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
@ -967,12 +1084,12 @@ description: Artifact commands prosthetic-hip.kcl
|
||||
"origin": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 145.0
|
||||
"z": 0.0
|
||||
},
|
||||
"x_axis": {
|
||||
"x": 0.8039,
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.5948
|
||||
"z": 0.0
|
||||
},
|
||||
"y_axis": {
|
||||
"x": 0.0,
|
||||
@ -994,9 +1111,9 @@ description: Artifact commands prosthetic-hip.kcl
|
||||
"animated": false,
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": -0.5948,
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.8039
|
||||
"z": 1.0
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -1013,15 +1130,6 @@ description: Artifact commands prosthetic-hip.kcl
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_visible",
|
||||
"object_id": "[uuid]",
|
||||
"hidden": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
@ -1144,6 +1252,163 @@ description: Artifact commands prosthetic-hip.kcl
|
||||
"path_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "set_object_transform",
|
||||
"object_id": "[uuid]",
|
||||
"transforms": [
|
||||
{
|
||||
"translate": {
|
||||
"property": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 145.0
|
||||
},
|
||||
"set": false,
|
||||
"is_local": true
|
||||
},
|
||||
"rotate_rpy": null,
|
||||
"rotate_angle_axis": null,
|
||||
"scale": null
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "set_object_transform",
|
||||
"object_id": "[uuid]",
|
||||
"transforms": [
|
||||
{
|
||||
"translate": null,
|
||||
"rotate_rpy": {
|
||||
"property": {
|
||||
"x": 0.0,
|
||||
"y": -36.5,
|
||||
"z": 0.0
|
||||
},
|
||||
"set": false,
|
||||
"is_local": true
|
||||
},
|
||||
"rotate_angle_axis": null,
|
||||
"scale": null
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "loft",
|
||||
"section_ids": [
|
||||
"[uuid]",
|
||||
"[uuid]",
|
||||
"[uuid]",
|
||||
"[uuid]"
|
||||
],
|
||||
"v_degree": 2,
|
||||
"bez_approximate_rational": false,
|
||||
"base_curve_index": null,
|
||||
"tolerance": 0.0000001
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_bring_to_front",
|
||||
"object_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "solid3d_get_adjacency_info",
|
||||
"object_id": "[uuid]",
|
||||
"edge_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "solid3d_get_extrusion_face_info",
|
||||
"object_id": "[uuid]",
|
||||
"edge_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "loft",
|
||||
"section_ids": [
|
||||
"[uuid]",
|
||||
"[uuid]",
|
||||
"[uuid]"
|
||||
],
|
||||
"v_degree": 2,
|
||||
"bez_approximate_rational": false,
|
||||
"base_curve_index": null,
|
||||
"tolerance": 0.0000001
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_bring_to_front",
|
||||
"object_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "solid3d_get_adjacency_info",
|
||||
"object_id": "[uuid]",
|
||||
"edge_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "solid3d_get_extrusion_face_info",
|
||||
"object_id": "[uuid]",
|
||||
"edge_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "entity_clone",
|
||||
"entity_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "entity_get_all_child_uuids",
|
||||
"entity_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "entity_get_all_child_uuids",
|
||||
"entity_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
@ -1178,9 +1443,9 @@ description: Artifact commands prosthetic-hip.kcl
|
||||
"animated": false,
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": -0.5948,
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.8039
|
||||
"z": 1.0
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -1228,115 +1493,6 @@ description: Artifact commands prosthetic-hip.kcl
|
||||
"edge_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "loft",
|
||||
"section_ids": [
|
||||
"[uuid]",
|
||||
"[uuid]",
|
||||
"[uuid]",
|
||||
"[uuid]"
|
||||
],
|
||||
"v_degree": 2,
|
||||
"bez_approximate_rational": false,
|
||||
"base_curve_index": null,
|
||||
"tolerance": 0.0000001
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_bring_to_front",
|
||||
"object_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "solid3d_get_adjacency_info",
|
||||
"object_id": "[uuid]",
|
||||
"edge_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "solid3d_get_extrusion_face_info",
|
||||
"object_id": "[uuid]",
|
||||
"edge_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "loft",
|
||||
"section_ids": [
|
||||
"[uuid]",
|
||||
"[uuid]",
|
||||
"[uuid]"
|
||||
],
|
||||
"v_degree": 2,
|
||||
"bez_approximate_rational": false,
|
||||
"base_curve_index": null,
|
||||
"tolerance": 0.0000001
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_bring_to_front",
|
||||
"object_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "solid3d_get_adjacency_info",
|
||||
"object_id": "[uuid]",
|
||||
"edge_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "solid3d_get_extrusion_face_info",
|
||||
"object_id": "[uuid]",
|
||||
"edge_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "entity_clone",
|
||||
"entity_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "entity_get_all_child_uuids",
|
||||
"entity_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "entity_get_all_child_uuids",
|
||||
"entity_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
|
@ -17,7 +17,7 @@ flowchart LR
|
||||
%% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }]
|
||||
26["Segment<br>[676, 683, 0]"]
|
||||
%% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 8 }]
|
||||
80[Solid2d]
|
||||
79[Solid2d]
|
||||
end
|
||||
subgraph path12 [Path]
|
||||
12["Path<br>[816, 848, 0]"]
|
||||
@ -36,161 +36,161 @@ flowchart LR
|
||||
%% [ProgramBodyItem { index: 5 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }]
|
||||
33["Segment<br>[1161, 1168, 0]"]
|
||||
%% [ProgramBodyItem { index: 5 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 8 }]
|
||||
84[Solid2d]
|
||||
end
|
||||
subgraph path13 [Path]
|
||||
13["Path<br>[1401, 1436, 0]"]
|
||||
%% [ProgramBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
34["Segment<br>[1442, 1474, 0]"]
|
||||
%% [ProgramBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }]
|
||||
35["Segment<br>[1480, 1520, 0]"]
|
||||
%% [ProgramBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }]
|
||||
36["Segment<br>[1526, 1573, 0]"]
|
||||
%% [ProgramBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }]
|
||||
37["Segment<br>[1579, 1619, 0]"]
|
||||
%% [ProgramBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }]
|
||||
38["Segment<br>[1625, 1672, 0]"]
|
||||
%% [ProgramBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }]
|
||||
39["Segment<br>[1678, 1743, 0]"]
|
||||
%% [ProgramBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }]
|
||||
40["Segment<br>[1749, 1756, 0]"]
|
||||
%% [ProgramBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 8 }]
|
||||
77[Solid2d]
|
||||
end
|
||||
subgraph path14 [Path]
|
||||
14["Path<br>[1992, 2025, 0]"]
|
||||
%% [ProgramBodyItem { index: 17 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
41["Segment<br>[2338, 2345, 0]"]
|
||||
%% [ProgramBodyItem { index: 17 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 8 }]
|
||||
85[Solid2d]
|
||||
end
|
||||
subgraph path15 [Path]
|
||||
15["Path<br>[2583, 2618, 0]"]
|
||||
%% [ProgramBodyItem { index: 23 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
42["Segment<br>[2624, 2656, 0]"]
|
||||
%% [ProgramBodyItem { index: 23 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }]
|
||||
43["Segment<br>[2662, 2702, 0]"]
|
||||
%% [ProgramBodyItem { index: 23 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }]
|
||||
44["Segment<br>[2708, 2755, 0]"]
|
||||
%% [ProgramBodyItem { index: 23 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }]
|
||||
45["Segment<br>[2761, 2801, 0]"]
|
||||
%% [ProgramBodyItem { index: 23 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }]
|
||||
46["Segment<br>[2807, 2854, 0]"]
|
||||
%% [ProgramBodyItem { index: 23 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }]
|
||||
47["Segment<br>[2860, 2925, 0]"]
|
||||
%% [ProgramBodyItem { index: 23 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }]
|
||||
48["Segment<br>[2931, 2938, 0]"]
|
||||
%% [ProgramBodyItem { index: 23 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 8 }]
|
||||
79[Solid2d]
|
||||
end
|
||||
subgraph path16 [Path]
|
||||
16["Path<br>[3173, 3208, 0]"]
|
||||
%% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
49["Segment<br>[3214, 3246, 0]"]
|
||||
%% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }]
|
||||
50["Segment<br>[3252, 3292, 0]"]
|
||||
%% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }]
|
||||
51["Segment<br>[3298, 3345, 0]"]
|
||||
%% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }]
|
||||
52["Segment<br>[3351, 3391, 0]"]
|
||||
%% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }]
|
||||
53["Segment<br>[3397, 3444, 0]"]
|
||||
%% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }]
|
||||
54["Segment<br>[3450, 3515, 0]"]
|
||||
%% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }]
|
||||
55["Segment<br>[3521, 3528, 0]"]
|
||||
%% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 8 }]
|
||||
subgraph path13 [Path]
|
||||
13["Path<br>[1293, 1328, 0]"]
|
||||
%% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
34["Segment<br>[1334, 1366, 0]"]
|
||||
%% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }]
|
||||
35["Segment<br>[1372, 1412, 0]"]
|
||||
%% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }]
|
||||
36["Segment<br>[1418, 1465, 0]"]
|
||||
%% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }]
|
||||
37["Segment<br>[1471, 1511, 0]"]
|
||||
%% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }]
|
||||
38["Segment<br>[1517, 1564, 0]"]
|
||||
%% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }]
|
||||
39["Segment<br>[1570, 1635, 0]"]
|
||||
%% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }]
|
||||
40["Segment<br>[1641, 1648, 0]"]
|
||||
%% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 8 }]
|
||||
78[Solid2d]
|
||||
end
|
||||
subgraph path14 [Path]
|
||||
14["Path<br>[1825, 1858, 0]"]
|
||||
%% [ProgramBodyItem { index: 15 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
41["Segment<br>[2171, 2178, 0]"]
|
||||
%% [ProgramBodyItem { index: 15 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 8 }]
|
||||
80[Solid2d]
|
||||
end
|
||||
subgraph path15 [Path]
|
||||
15["Path<br>[2357, 2392, 0]"]
|
||||
%% [ProgramBodyItem { index: 20 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
42["Segment<br>[2398, 2430, 0]"]
|
||||
%% [ProgramBodyItem { index: 20 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }]
|
||||
43["Segment<br>[2436, 2476, 0]"]
|
||||
%% [ProgramBodyItem { index: 20 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }]
|
||||
44["Segment<br>[2482, 2529, 0]"]
|
||||
%% [ProgramBodyItem { index: 20 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }]
|
||||
45["Segment<br>[2535, 2575, 0]"]
|
||||
%% [ProgramBodyItem { index: 20 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }]
|
||||
46["Segment<br>[2581, 2628, 0]"]
|
||||
%% [ProgramBodyItem { index: 20 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }]
|
||||
47["Segment<br>[2634, 2699, 0]"]
|
||||
%% [ProgramBodyItem { index: 20 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }]
|
||||
48["Segment<br>[2705, 2712, 0]"]
|
||||
%% [ProgramBodyItem { index: 20 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 8 }]
|
||||
84[Solid2d]
|
||||
end
|
||||
subgraph path16 [Path]
|
||||
16["Path<br>[2888, 2923, 0]"]
|
||||
%% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
49["Segment<br>[2929, 2961, 0]"]
|
||||
%% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }]
|
||||
50["Segment<br>[2967, 3007, 0]"]
|
||||
%% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }]
|
||||
51["Segment<br>[3013, 3060, 0]"]
|
||||
%% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }]
|
||||
52["Segment<br>[3066, 3106, 0]"]
|
||||
%% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }]
|
||||
53["Segment<br>[3112, 3159, 0]"]
|
||||
%% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }]
|
||||
54["Segment<br>[3165, 3230, 0]"]
|
||||
%% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }]
|
||||
55["Segment<br>[3236, 3243, 0]"]
|
||||
%% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 8 }]
|
||||
77[Solid2d]
|
||||
end
|
||||
subgraph path17 [Path]
|
||||
17["Path<br>[3998, 4023, 0]"]
|
||||
%% [ProgramBodyItem { index: 33 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
56["Segment<br>[4029, 4048, 0]"]
|
||||
%% [ProgramBodyItem { index: 33 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }]
|
||||
57["Segment<br>[4054, 4091, 0]"]
|
||||
%% [ProgramBodyItem { index: 33 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }]
|
||||
58["Segment<br>[4097, 4134, 0]"]
|
||||
%% [ProgramBodyItem { index: 33 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }]
|
||||
59["Segment<br>[4140, 4158, 0]"]
|
||||
%% [ProgramBodyItem { index: 33 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }]
|
||||
60["Segment<br>[4164, 4202, 0]"]
|
||||
%% [ProgramBodyItem { index: 33 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }]
|
||||
61["Segment<br>[4208, 4273, 0]"]
|
||||
%% [ProgramBodyItem { index: 33 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }]
|
||||
62["Segment<br>[4279, 4286, 0]"]
|
||||
%% [ProgramBodyItem { index: 33 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 8 }]
|
||||
17["Path<br>[3755, 3780, 0]"]
|
||||
%% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
56["Segment<br>[3786, 3805, 0]"]
|
||||
%% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }]
|
||||
57["Segment<br>[3811, 3848, 0]"]
|
||||
%% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }]
|
||||
58["Segment<br>[3854, 3891, 0]"]
|
||||
%% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }]
|
||||
59["Segment<br>[3897, 3915, 0]"]
|
||||
%% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }]
|
||||
60["Segment<br>[3921, 3959, 0]"]
|
||||
%% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }]
|
||||
61["Segment<br>[3965, 4030, 0]"]
|
||||
%% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }]
|
||||
62["Segment<br>[4036, 4043, 0]"]
|
||||
%% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 8 }]
|
||||
81[Solid2d]
|
||||
end
|
||||
subgraph path18 [Path]
|
||||
18["Path<br>[4515, 4543, 0]"]
|
||||
%% [ProgramBodyItem { index: 34 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
63["Segment<br>[4549, 4568, 0]"]
|
||||
%% [ProgramBodyItem { index: 34 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }]
|
||||
64["Segment<br>[4574, 4592, 0]"]
|
||||
%% [ProgramBodyItem { index: 34 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }]
|
||||
65["Segment<br>[4598, 4639, 0]"]
|
||||
%% [ProgramBodyItem { index: 34 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }]
|
||||
66["Segment<br>[4645, 4666, 0]"]
|
||||
%% [ProgramBodyItem { index: 34 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }]
|
||||
67["Segment<br>[4672, 4692, 0]"]
|
||||
%% [ProgramBodyItem { index: 34 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }]
|
||||
68["Segment<br>[4698, 4763, 0]"]
|
||||
%% [ProgramBodyItem { index: 34 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }]
|
||||
69["Segment<br>[4769, 4776, 0]"]
|
||||
%% [ProgramBodyItem { index: 34 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 8 }]
|
||||
18["Path<br>[4272, 4300, 0]"]
|
||||
%% [ProgramBodyItem { index: 30 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
63["Segment<br>[4306, 4325, 0]"]
|
||||
%% [ProgramBodyItem { index: 30 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }]
|
||||
64["Segment<br>[4331, 4349, 0]"]
|
||||
%% [ProgramBodyItem { index: 30 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }]
|
||||
65["Segment<br>[4355, 4396, 0]"]
|
||||
%% [ProgramBodyItem { index: 30 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }]
|
||||
66["Segment<br>[4402, 4423, 0]"]
|
||||
%% [ProgramBodyItem { index: 30 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }]
|
||||
67["Segment<br>[4429, 4449, 0]"]
|
||||
%% [ProgramBodyItem { index: 30 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }]
|
||||
68["Segment<br>[4455, 4520, 0]"]
|
||||
%% [ProgramBodyItem { index: 30 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }]
|
||||
69["Segment<br>[4526, 4533, 0]"]
|
||||
%% [ProgramBodyItem { index: 30 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 8 }]
|
||||
82[Solid2d]
|
||||
end
|
||||
subgraph path19 [Path]
|
||||
19["Path<br>[4999, 5029, 0]"]
|
||||
%% [ProgramBodyItem { index: 35 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
70["Segment<br>[5035, 5052, 0]"]
|
||||
%% [ProgramBodyItem { index: 35 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }]
|
||||
71["Segment<br>[5058, 5076, 0]"]
|
||||
%% [ProgramBodyItem { index: 35 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }]
|
||||
72["Segment<br>[5082, 5120, 0]"]
|
||||
%% [ProgramBodyItem { index: 35 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }]
|
||||
73["Segment<br>[5126, 5152, 0]"]
|
||||
%% [ProgramBodyItem { index: 35 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }]
|
||||
74["Segment<br>[5158, 5177, 0]"]
|
||||
%% [ProgramBodyItem { index: 35 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }]
|
||||
75["Segment<br>[5183, 5248, 0]"]
|
||||
%% [ProgramBodyItem { index: 35 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }]
|
||||
76["Segment<br>[5254, 5261, 0]"]
|
||||
%% [ProgramBodyItem { index: 35 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 8 }]
|
||||
19["Path<br>[4756, 4786, 0]"]
|
||||
%% [ProgramBodyItem { index: 31 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
70["Segment<br>[4792, 4809, 0]"]
|
||||
%% [ProgramBodyItem { index: 31 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }]
|
||||
71["Segment<br>[4815, 4833, 0]"]
|
||||
%% [ProgramBodyItem { index: 31 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }]
|
||||
72["Segment<br>[4839, 4877, 0]"]
|
||||
%% [ProgramBodyItem { index: 31 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }]
|
||||
73["Segment<br>[4883, 4909, 0]"]
|
||||
%% [ProgramBodyItem { index: 31 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }]
|
||||
74["Segment<br>[4915, 4934, 0]"]
|
||||
%% [ProgramBodyItem { index: 31 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }]
|
||||
75["Segment<br>[4940, 5005, 0]"]
|
||||
%% [ProgramBodyItem { index: 31 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }]
|
||||
76["Segment<br>[5011, 5018, 0]"]
|
||||
%% [ProgramBodyItem { index: 31 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 8 }]
|
||||
83[Solid2d]
|
||||
end
|
||||
1["Plane<br>[308, 325, 0]"]
|
||||
%% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
|
||||
2["Plane<br>[781, 809, 0]"]
|
||||
%% [ProgramBodyItem { index: 5 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }, CallKwUnlabeledArg]
|
||||
3["Plane<br>[1372, 1395, 0]"]
|
||||
%% [ProgramBodyItem { index: 11 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
|
||||
4["Plane<br>[1963, 1986, 0]"]
|
||||
%% [ProgramBodyItem { index: 17 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
|
||||
5["Plane<br>[2554, 2577, 0]"]
|
||||
%% [ProgramBodyItem { index: 23 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
|
||||
6["Plane<br>[3144, 3167, 0]"]
|
||||
3["Plane<br>[1270, 1287, 0]"]
|
||||
%% [ProgramBodyItem { index: 10 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
|
||||
4["Plane<br>[1802, 1819, 0]"]
|
||||
%% [ProgramBodyItem { index: 15 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
|
||||
5["Plane<br>[2334, 2351, 0]"]
|
||||
%% [ProgramBodyItem { index: 20 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
|
||||
6["Plane<br>[2865, 2882, 0]"]
|
||||
%% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
|
||||
7["Plane<br>[3732, 3749, 0]"]
|
||||
%% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
|
||||
7["Plane<br>[3975, 3992, 0]"]
|
||||
%% [ProgramBodyItem { index: 33 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
|
||||
8["Plane<br>[4492, 4509, 0]"]
|
||||
%% [ProgramBodyItem { index: 34 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
|
||||
9["Plane<br>[4976, 4993, 0]"]
|
||||
%% [ProgramBodyItem { index: 35 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
|
||||
8["Plane<br>[4249, 4266, 0]"]
|
||||
%% [ProgramBodyItem { index: 30 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
|
||||
9["Plane<br>[4733, 4750, 0]"]
|
||||
%% [ProgramBodyItem { index: 31 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
|
||||
10["StartSketchOnPlane<br>[767, 810, 0]"]
|
||||
%% [ProgramBodyItem { index: 5 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
|
||||
86["Sweep Extrusion<br>[3616, 3638, 0]"]
|
||||
%% [ProgramBodyItem { index: 30 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
87["Sweep Loft<br>[3698, 3786, 0]"]
|
||||
%% [ProgramBodyItem { index: 31 }, VariableDeclarationDeclaration, VariableDeclarationInit]
|
||||
88["Sweep Loft<br>[3827, 3902, 0]"]
|
||||
%% [ProgramBodyItem { index: 32 }, VariableDeclarationDeclaration, VariableDeclarationInit]
|
||||
89["Sweep Revolve<br>[4292, 4322, 0]"]
|
||||
%% [ProgramBodyItem { index: 33 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 9 }]
|
||||
90["Sweep Revolve<br>[4782, 4812, 0]"]
|
||||
%% [ProgramBodyItem { index: 34 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 9 }]
|
||||
91["Sweep Revolve<br>[5267, 5297, 0]"]
|
||||
%% [ProgramBodyItem { index: 35 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 9 }]
|
||||
86["Sweep Loft<br>[3351, 3439, 0]"]
|
||||
%% [ProgramBodyItem { index: 26 }, VariableDeclarationDeclaration, VariableDeclarationInit]
|
||||
87["Sweep Loft<br>[3479, 3561, 0]"]
|
||||
%% [ProgramBodyItem { index: 27 }, VariableDeclarationDeclaration, VariableDeclarationInit]
|
||||
88["Sweep Extrusion<br>[3641, 3660, 0]"]
|
||||
%% [ProgramBodyItem { index: 28 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
89["Sweep Revolve<br>[4049, 4079, 0]"]
|
||||
%% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 9 }]
|
||||
90["Sweep Revolve<br>[4539, 4569, 0]"]
|
||||
%% [ProgramBodyItem { index: 30 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 9 }]
|
||||
91["Sweep Revolve<br>[5024, 5054, 0]"]
|
||||
%% [ProgramBodyItem { index: 31 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 9 }]
|
||||
92[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
93[Wall]
|
||||
@ -239,30 +239,38 @@ flowchart LR
|
||||
%% face_code_ref=Missing NodePath
|
||||
115[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
116["Cap Start"]
|
||||
116[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
117["Cap End"]
|
||||
117[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
118["SweepEdge Opposite"]
|
||||
119["SweepEdge Opposite"]
|
||||
120["SweepEdge Opposite"]
|
||||
121["SweepEdge Opposite"]
|
||||
122["SweepEdge Opposite"]
|
||||
123["SweepEdge Opposite"]
|
||||
124["SweepEdge Adjacent"]
|
||||
125["SweepEdge Adjacent"]
|
||||
126["SweepEdge Adjacent"]
|
||||
127["SweepEdge Adjacent"]
|
||||
128["SweepEdge Adjacent"]
|
||||
129["SweepEdge Adjacent"]
|
||||
130["SweepEdge Adjacent"]
|
||||
131["SweepEdge Adjacent"]
|
||||
132["SweepEdge Adjacent"]
|
||||
133["SweepEdge Adjacent"]
|
||||
134["SweepEdge Adjacent"]
|
||||
135["SweepEdge Adjacent"]
|
||||
136["SweepEdge Adjacent"]
|
||||
137["SweepEdge Adjacent"]
|
||||
118[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
119[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
120[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
121[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
122["Cap Start"]
|
||||
%% face_code_ref=Missing NodePath
|
||||
123["Cap Start"]
|
||||
%% face_code_ref=Missing NodePath
|
||||
124["Cap End"]
|
||||
%% face_code_ref=Missing NodePath
|
||||
125["Cap End"]
|
||||
%% face_code_ref=Missing NodePath
|
||||
126["SweepEdge Opposite"]
|
||||
127["SweepEdge Opposite"]
|
||||
128["SweepEdge Opposite"]
|
||||
129["SweepEdge Opposite"]
|
||||
130["SweepEdge Opposite"]
|
||||
131["SweepEdge Opposite"]
|
||||
132["SweepEdge Opposite"]
|
||||
133["SweepEdge Opposite"]
|
||||
134["SweepEdge Opposite"]
|
||||
135["SweepEdge Opposite"]
|
||||
136["SweepEdge Opposite"]
|
||||
137["SweepEdge Opposite"]
|
||||
138["SweepEdge Adjacent"]
|
||||
139["SweepEdge Adjacent"]
|
||||
140["SweepEdge Adjacent"]
|
||||
@ -272,6 +280,26 @@ flowchart LR
|
||||
144["SweepEdge Adjacent"]
|
||||
145["SweepEdge Adjacent"]
|
||||
146["SweepEdge Adjacent"]
|
||||
147["SweepEdge Adjacent"]
|
||||
148["SweepEdge Adjacent"]
|
||||
149["SweepEdge Adjacent"]
|
||||
150["SweepEdge Adjacent"]
|
||||
151["SweepEdge Adjacent"]
|
||||
152["SweepEdge Adjacent"]
|
||||
153["SweepEdge Adjacent"]
|
||||
154["SweepEdge Adjacent"]
|
||||
155["SweepEdge Adjacent"]
|
||||
156["SweepEdge Adjacent"]
|
||||
157["SweepEdge Adjacent"]
|
||||
158["SweepEdge Adjacent"]
|
||||
159["SweepEdge Adjacent"]
|
||||
160["SweepEdge Adjacent"]
|
||||
161["SweepEdge Adjacent"]
|
||||
162["SweepEdge Adjacent"]
|
||||
163["SweepEdge Adjacent"]
|
||||
164["SweepEdge Adjacent"]
|
||||
165["SweepEdge Adjacent"]
|
||||
166["SweepEdge Adjacent"]
|
||||
1 --- 11
|
||||
2 <--x 10
|
||||
2 --- 12
|
||||
@ -289,8 +317,8 @@ flowchart LR
|
||||
11 --- 24
|
||||
11 --- 25
|
||||
11 --- 26
|
||||
11 --- 80
|
||||
11 ---- 87
|
||||
11 --- 79
|
||||
11 ---- 86
|
||||
12 --- 27
|
||||
12 --- 28
|
||||
12 --- 29
|
||||
@ -298,8 +326,8 @@ flowchart LR
|
||||
12 --- 31
|
||||
12 --- 32
|
||||
12 --- 33
|
||||
12 --- 84
|
||||
12 x---> 87
|
||||
12 --- 85
|
||||
12 x---> 86
|
||||
13 --- 34
|
||||
13 --- 35
|
||||
13 --- 36
|
||||
@ -307,17 +335,17 @@ flowchart LR
|
||||
13 --- 38
|
||||
13 --- 39
|
||||
13 --- 40
|
||||
13 --- 77
|
||||
13 x---> 87
|
||||
13 --- 78
|
||||
13 x---> 86
|
||||
14 --- 41
|
||||
14 --- 85
|
||||
14 x---> 87
|
||||
14 x--> 118
|
||||
14 x--> 119
|
||||
14 x--> 120
|
||||
14 x--> 121
|
||||
14 x--> 122
|
||||
14 x--> 123
|
||||
14 --- 80
|
||||
14 x---> 86
|
||||
14 x--> 132
|
||||
14 x--> 133
|
||||
14 x--> 134
|
||||
14 x--> 135
|
||||
14 x--> 136
|
||||
14 x--> 137
|
||||
15 --- 42
|
||||
15 --- 43
|
||||
15 --- 44
|
||||
@ -325,8 +353,8 @@ flowchart LR
|
||||
15 --- 46
|
||||
15 --- 47
|
||||
15 --- 48
|
||||
15 --- 79
|
||||
15 x---> 88
|
||||
15 --- 84
|
||||
15 x---> 87
|
||||
16 --- 49
|
||||
16 --- 50
|
||||
16 --- 51
|
||||
@ -334,8 +362,8 @@ flowchart LR
|
||||
16 --- 53
|
||||
16 --- 54
|
||||
16 --- 55
|
||||
16 --- 78
|
||||
16 x---> 88
|
||||
16 --- 77
|
||||
16 ---- 88
|
||||
17 --- 56
|
||||
17 --- 57
|
||||
17 --- 58
|
||||
@ -363,195 +391,263 @@ flowchart LR
|
||||
19 --- 76
|
||||
19 --- 83
|
||||
19 ---- 91
|
||||
20 --- 103
|
||||
20 x--> 116
|
||||
20 --- 118
|
||||
20 --- 130
|
||||
21 --- 101
|
||||
21 x--> 116
|
||||
21 --- 119
|
||||
21 --- 131
|
||||
22 --- 100
|
||||
22 x--> 116
|
||||
22 --- 120
|
||||
22 --- 132
|
||||
23 --- 102
|
||||
23 x--> 116
|
||||
23 --- 121
|
||||
23 --- 133
|
||||
24 --- 99
|
||||
24 x--> 116
|
||||
24 --- 122
|
||||
24 --- 134
|
||||
25 --- 98
|
||||
25 x--> 116
|
||||
25 --- 123
|
||||
25 --- 135
|
||||
20 --- 109
|
||||
20 x--> 122
|
||||
20 --- 132
|
||||
20 --- 150
|
||||
21 --- 107
|
||||
21 x--> 122
|
||||
21 --- 133
|
||||
21 --- 151
|
||||
22 --- 106
|
||||
22 x--> 122
|
||||
22 --- 134
|
||||
22 --- 152
|
||||
23 --- 108
|
||||
23 x--> 122
|
||||
23 --- 135
|
||||
23 --- 153
|
||||
24 --- 105
|
||||
24 x--> 122
|
||||
24 --- 136
|
||||
24 --- 154
|
||||
25 --- 104
|
||||
25 x--> 122
|
||||
25 --- 137
|
||||
25 --- 155
|
||||
49 --- 94
|
||||
49 x--> 123
|
||||
49 --- 131
|
||||
49 --- 143
|
||||
50 --- 95
|
||||
50 x--> 123
|
||||
50 --- 130
|
||||
50 --- 142
|
||||
51 --- 96
|
||||
51 x--> 123
|
||||
51 --- 129
|
||||
51 --- 141
|
||||
52 --- 97
|
||||
52 x--> 123
|
||||
52 --- 128
|
||||
52 --- 140
|
||||
53 --- 92
|
||||
53 x--> 123
|
||||
53 --- 127
|
||||
53 --- 139
|
||||
54 --- 93
|
||||
54 x--> 123
|
||||
54 --- 126
|
||||
54 --- 138
|
||||
89 <--x 56
|
||||
56 --- 109
|
||||
56 x--> 136
|
||||
56 --- 115
|
||||
56 x--> 156
|
||||
89 <--x 57
|
||||
57 --- 108
|
||||
57 --- 136
|
||||
57 --- 114
|
||||
57 --- 156
|
||||
89 <--x 58
|
||||
58 --- 104
|
||||
58 --- 137
|
||||
58 --- 110
|
||||
58 --- 157
|
||||
89 <--x 59
|
||||
59 --- 107
|
||||
59 --- 138
|
||||
59 --- 113
|
||||
59 --- 158
|
||||
89 <--x 60
|
||||
60 --- 106
|
||||
60 --- 139
|
||||
60 --- 112
|
||||
60 --- 159
|
||||
89 <--x 61
|
||||
61 --- 105
|
||||
61 --- 140
|
||||
61 --- 111
|
||||
61 --- 160
|
||||
90 <--x 63
|
||||
63 --- 96
|
||||
63 --- 124
|
||||
63 --- 102
|
||||
63 --- 144
|
||||
90 <--x 64
|
||||
64 --- 92
|
||||
64 --- 125
|
||||
64 --- 98
|
||||
64 --- 145
|
||||
90 <--x 65
|
||||
65 --- 93
|
||||
65 --- 126
|
||||
65 --- 99
|
||||
65 --- 146
|
||||
90 <--x 66
|
||||
66 --- 97
|
||||
66 --- 127
|
||||
66 --- 103
|
||||
66 --- 147
|
||||
90 <--x 67
|
||||
67 --- 95
|
||||
67 --- 128
|
||||
67 --- 101
|
||||
67 --- 148
|
||||
90 <--x 68
|
||||
68 --- 94
|
||||
68 --- 129
|
||||
68 --- 100
|
||||
68 --- 149
|
||||
91 <--x 70
|
||||
70 --- 112
|
||||
70 --- 141
|
||||
70 --- 118
|
||||
70 --- 161
|
||||
91 <--x 71
|
||||
71 --- 115
|
||||
71 --- 142
|
||||
71 --- 121
|
||||
71 --- 162
|
||||
91 <--x 72
|
||||
72 --- 114
|
||||
72 --- 143
|
||||
72 --- 120
|
||||
72 --- 163
|
||||
91 <--x 73
|
||||
73 --- 110
|
||||
73 --- 144
|
||||
73 --- 116
|
||||
73 --- 164
|
||||
91 <--x 74
|
||||
74 --- 113
|
||||
74 --- 145
|
||||
74 --- 119
|
||||
74 --- 165
|
||||
91 <--x 75
|
||||
75 --- 111
|
||||
75 --- 146
|
||||
87 --- 98
|
||||
87 --- 99
|
||||
87 --- 100
|
||||
87 --- 101
|
||||
87 --- 102
|
||||
87 --- 103
|
||||
87 --- 116
|
||||
87 --- 117
|
||||
87 --- 118
|
||||
87 --- 119
|
||||
87 --- 120
|
||||
87 --- 121
|
||||
87 --- 122
|
||||
87 --- 123
|
||||
87 --- 130
|
||||
87 --- 131
|
||||
87 --- 132
|
||||
87 --- 133
|
||||
87 --- 134
|
||||
87 --- 135
|
||||
89 --- 104
|
||||
89 --- 105
|
||||
89 --- 106
|
||||
89 --- 107
|
||||
89 --- 108
|
||||
89 --- 109
|
||||
89 --- 136
|
||||
89 --- 137
|
||||
89 --- 138
|
||||
89 --- 139
|
||||
89 --- 140
|
||||
90 --- 92
|
||||
90 --- 93
|
||||
90 --- 94
|
||||
90 --- 95
|
||||
90 --- 96
|
||||
90 --- 97
|
||||
90 --- 124
|
||||
90 --- 125
|
||||
90 --- 126
|
||||
90 --- 127
|
||||
90 --- 128
|
||||
90 --- 129
|
||||
91 --- 110
|
||||
91 --- 111
|
||||
91 --- 112
|
||||
91 --- 113
|
||||
91 --- 114
|
||||
91 --- 115
|
||||
91 --- 141
|
||||
91 --- 142
|
||||
91 --- 143
|
||||
91 --- 144
|
||||
91 --- 145
|
||||
91 --- 146
|
||||
124 <--x 92
|
||||
92 --- 125
|
||||
125 <--x 93
|
||||
75 --- 117
|
||||
75 --- 166
|
||||
86 --- 104
|
||||
86 --- 105
|
||||
86 --- 106
|
||||
86 --- 107
|
||||
86 --- 108
|
||||
86 --- 109
|
||||
86 --- 122
|
||||
86 --- 124
|
||||
86 --- 132
|
||||
86 --- 133
|
||||
86 --- 134
|
||||
86 --- 135
|
||||
86 --- 136
|
||||
86 --- 137
|
||||
86 --- 150
|
||||
86 --- 151
|
||||
86 --- 152
|
||||
86 --- 153
|
||||
86 --- 154
|
||||
86 --- 155
|
||||
88 --- 92
|
||||
88 --- 93
|
||||
88 --- 94
|
||||
88 --- 95
|
||||
88 --- 96
|
||||
88 --- 97
|
||||
88 --- 123
|
||||
88 --- 125
|
||||
88 --- 126
|
||||
88 --- 127
|
||||
88 --- 128
|
||||
88 --- 129
|
||||
88 --- 130
|
||||
88 --- 131
|
||||
88 --- 138
|
||||
88 --- 139
|
||||
88 --- 140
|
||||
88 --- 141
|
||||
88 --- 142
|
||||
88 --- 143
|
||||
89 --- 110
|
||||
89 --- 111
|
||||
89 --- 112
|
||||
89 --- 113
|
||||
89 --- 114
|
||||
89 --- 115
|
||||
89 --- 156
|
||||
89 --- 157
|
||||
89 --- 158
|
||||
89 --- 159
|
||||
89 --- 160
|
||||
90 --- 98
|
||||
90 --- 99
|
||||
90 --- 100
|
||||
90 --- 101
|
||||
90 --- 102
|
||||
90 --- 103
|
||||
90 --- 144
|
||||
90 --- 145
|
||||
90 --- 146
|
||||
90 --- 147
|
||||
90 --- 148
|
||||
90 --- 149
|
||||
91 --- 116
|
||||
91 --- 117
|
||||
91 --- 118
|
||||
91 --- 119
|
||||
91 --- 120
|
||||
91 --- 121
|
||||
91 --- 161
|
||||
91 --- 162
|
||||
91 --- 163
|
||||
91 --- 164
|
||||
91 --- 165
|
||||
91 --- 166
|
||||
92 --- 127
|
||||
92 --- 139
|
||||
140 <--x 92
|
||||
93 --- 126
|
||||
128 <--x 94
|
||||
94 --- 129
|
||||
127 <--x 95
|
||||
95 --- 128
|
||||
96 --- 124
|
||||
129 <--x 96
|
||||
126 <--x 97
|
||||
97 --- 127
|
||||
98 --- 123
|
||||
130 <--x 98
|
||||
98 --- 135
|
||||
99 --- 122
|
||||
99 --- 134
|
||||
135 <--x 99
|
||||
100 --- 120
|
||||
100 --- 132
|
||||
133 <--x 100
|
||||
101 --- 119
|
||||
101 --- 131
|
||||
132 <--x 101
|
||||
102 --- 121
|
||||
102 --- 133
|
||||
134 <--x 102
|
||||
103 --- 118
|
||||
103 --- 130
|
||||
131 <--x 103
|
||||
93 --- 138
|
||||
139 <--x 93
|
||||
94 --- 131
|
||||
138 <--x 94
|
||||
94 --- 143
|
||||
95 --- 130
|
||||
95 --- 142
|
||||
143 <--x 95
|
||||
96 --- 129
|
||||
96 --- 141
|
||||
142 <--x 96
|
||||
97 --- 128
|
||||
97 --- 140
|
||||
141 <--x 97
|
||||
144 <--x 98
|
||||
98 --- 145
|
||||
145 <--x 99
|
||||
99 --- 146
|
||||
148 <--x 100
|
||||
100 --- 149
|
||||
147 <--x 101
|
||||
101 --- 148
|
||||
102 --- 144
|
||||
149 <--x 102
|
||||
146 <--x 103
|
||||
103 --- 147
|
||||
104 --- 137
|
||||
139 <--x 105
|
||||
105 --- 140
|
||||
138 <--x 106
|
||||
106 --- 139
|
||||
137 <--x 107
|
||||
107 --- 138
|
||||
108 --- 136
|
||||
109 --- 136
|
||||
140 <--x 109
|
||||
143 <--x 110
|
||||
110 --- 144
|
||||
145 <--x 111
|
||||
111 --- 146
|
||||
112 --- 141
|
||||
146 <--x 112
|
||||
144 <--x 113
|
||||
113 --- 145
|
||||
142 <--x 114
|
||||
114 --- 143
|
||||
141 <--x 115
|
||||
115 --- 142
|
||||
118 <--x 117
|
||||
119 <--x 117
|
||||
120 <--x 117
|
||||
121 <--x 117
|
||||
122 <--x 117
|
||||
123 <--x 117
|
||||
150 <--x 104
|
||||
104 --- 155
|
||||
105 --- 136
|
||||
105 --- 154
|
||||
155 <--x 105
|
||||
106 --- 134
|
||||
106 --- 152
|
||||
153 <--x 106
|
||||
107 --- 133
|
||||
107 --- 151
|
||||
152 <--x 107
|
||||
108 --- 135
|
||||
108 --- 153
|
||||
154 <--x 108
|
||||
109 --- 132
|
||||
109 --- 150
|
||||
151 <--x 109
|
||||
110 --- 157
|
||||
159 <--x 111
|
||||
111 --- 160
|
||||
158 <--x 112
|
||||
112 --- 159
|
||||
157 <--x 113
|
||||
113 --- 158
|
||||
114 --- 156
|
||||
115 --- 156
|
||||
160 <--x 115
|
||||
163 <--x 116
|
||||
116 --- 164
|
||||
165 <--x 117
|
||||
117 --- 166
|
||||
118 --- 161
|
||||
166 <--x 118
|
||||
164 <--x 119
|
||||
119 --- 165
|
||||
162 <--x 120
|
||||
120 --- 163
|
||||
161 <--x 121
|
||||
121 --- 162
|
||||
132 <--x 124
|
||||
133 <--x 124
|
||||
134 <--x 124
|
||||
135 <--x 124
|
||||
136 <--x 124
|
||||
137 <--x 124
|
||||
126 <--x 125
|
||||
127 <--x 125
|
||||
128 <--x 125
|
||||
129 <--x 125
|
||||
130 <--x 125
|
||||
131 <--x 125
|
||||
```
|
||||
|
@ -64,131 +64,8 @@ description: Operations executed prosthetic-hip.kcl
|
||||
"name": "startSketchOn",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Object",
|
||||
"value": {
|
||||
"origin": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 110.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"xAxis": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.9063077870366499,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.42261826174069944,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"yAxis": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 1.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
@ -200,131 +77,8 @@ description: Operations executed prosthetic-hip.kcl
|
||||
"name": "startSketchOn",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Object",
|
||||
"value": {
|
||||
"origin": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 130.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"xAxis": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.8038568606172173,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.5948227867513413,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"yAxis": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 1.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
@ -336,131 +90,8 @@ description: Operations executed prosthetic-hip.kcl
|
||||
"name": "startSketchOn",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Object",
|
||||
"value": {
|
||||
"origin": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 140.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"xAxis": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.8038568606172173,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.5948227867513413,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"yAxis": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 1.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
@ -472,130 +103,92 @@ description: Operations executed prosthetic-hip.kcl
|
||||
"name": "startSketchOn",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Object",
|
||||
"value": {
|
||||
"origin": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 145.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "StdLibCall",
|
||||
"name": "loft",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
},
|
||||
"xAxis": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.8038568606172173,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.5948227867513413,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
}
|
||||
}
|
||||
]
|
||||
{
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
},
|
||||
"yAxis": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 1.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
{
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "StdLibCall",
|
||||
"name": "loft",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "StdLibCall",
|
||||
"name": "clone",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
@ -650,91 +243,6 @@ description: Operations executed prosthetic-hip.kcl
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "StdLibCall",
|
||||
"name": "loft",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "StdLibCall",
|
||||
"name": "loft",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "StdLibCall",
|
||||
"name": "clone",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "StdLibCall",
|
||||
"name": "startSketchOn",
|
||||
|
@ -556,9 +556,9 @@ description: Variables in memory after executing prosthetic-hip.kcl
|
||||
-8.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 2056,
|
||||
"end": 2062,
|
||||
"start": 2056,
|
||||
"commentStart": 1889,
|
||||
"end": 1895,
|
||||
"start": 1889,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg04"
|
||||
},
|
||||
@ -707,17 +707,17 @@ description: Variables in memory after executing prosthetic-hip.kcl
|
||||
"origin": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 130.0,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
"type": "Mm"
|
||||
}
|
||||
},
|
||||
"type": "plane",
|
||||
"value": "Custom",
|
||||
"value": "XY",
|
||||
"xAxis": {
|
||||
"x": 0.8038568606172174,
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.5948227867513414,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
"type": "Unknown"
|
||||
}
|
||||
@ -1236,514 +1236,6 @@ description: Variables in memory after executing prosthetic-hip.kcl
|
||||
}
|
||||
}
|
||||
},
|
||||
"plane003": {
|
||||
"type": "Object",
|
||||
"value": {
|
||||
"origin": {
|
||||
"type": "HomArray",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 110.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"xAxis": {
|
||||
"type": "HomArray",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.9063,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.4226,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"yAxis": {
|
||||
"type": "HomArray",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 1.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"plane004": {
|
||||
"type": "Object",
|
||||
"value": {
|
||||
"origin": {
|
||||
"type": "HomArray",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 130.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"xAxis": {
|
||||
"type": "HomArray",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.8039,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.5948,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"yAxis": {
|
||||
"type": "HomArray",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 1.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"plane005": {
|
||||
"type": "Object",
|
||||
"value": {
|
||||
"origin": {
|
||||
"type": "HomArray",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 140.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"xAxis": {
|
||||
"type": "HomArray",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.8039,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.5948,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"yAxis": {
|
||||
"type": "HomArray",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 1.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"plane006": {
|
||||
"type": "Object",
|
||||
"value": {
|
||||
"origin": {
|
||||
"type": "HomArray",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 145.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"xAxis": {
|
||||
"type": "HomArray",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.8039,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.5948,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"yAxis": {
|
||||
"type": "HomArray",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 1.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"polyethyleneInsert": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -2573,9 +2065,9 @@ description: Variables in memory after executing prosthetic-hip.kcl
|
||||
-16.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 1467,
|
||||
"end": 1473,
|
||||
"start": 1467,
|
||||
"commentStart": 1359,
|
||||
"end": 1365,
|
||||
"start": 1359,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg03"
|
||||
},
|
||||
@ -2724,17 +2216,17 @@ description: Variables in memory after executing prosthetic-hip.kcl
|
||||
"origin": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 110.0,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
"type": "Mm"
|
||||
}
|
||||
},
|
||||
"type": "plane",
|
||||
"value": "Custom",
|
||||
"value": "XY",
|
||||
"xAxis": {
|
||||
"x": 0.9063077870366499,
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.42261826174069944,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
"type": "Unknown"
|
||||
}
|
||||
@ -2795,9 +2287,9 @@ description: Variables in memory after executing prosthetic-hip.kcl
|
||||
-8.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 2056,
|
||||
"end": 2062,
|
||||
"start": 2056,
|
||||
"commentStart": 1889,
|
||||
"end": 1895,
|
||||
"start": 1889,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg04"
|
||||
},
|
||||
@ -2946,17 +2438,17 @@ description: Variables in memory after executing prosthetic-hip.kcl
|
||||
"origin": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 130.0,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
"type": "Mm"
|
||||
}
|
||||
},
|
||||
"type": "plane",
|
||||
"value": "Custom",
|
||||
"value": "XY",
|
||||
"xAxis": {
|
||||
"x": 0.8038568606172174,
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.5948227867513414,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
"type": "Unknown"
|
||||
}
|
||||
@ -3017,9 +2509,9 @@ description: Variables in memory after executing prosthetic-hip.kcl
|
||||
-0.8
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 2649,
|
||||
"end": 2655,
|
||||
"start": 2649,
|
||||
"commentStart": 2423,
|
||||
"end": 2429,
|
||||
"start": 2423,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg05"
|
||||
},
|
||||
@ -3168,17 +2660,17 @@ description: Variables in memory after executing prosthetic-hip.kcl
|
||||
"origin": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 140.0,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
"type": "Mm"
|
||||
}
|
||||
},
|
||||
"type": "plane",
|
||||
"value": "Custom",
|
||||
"value": "XY",
|
||||
"xAxis": {
|
||||
"x": 0.8038568606172174,
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.5948227867513414,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
"type": "Unknown"
|
||||
}
|
||||
@ -3239,9 +2731,9 @@ description: Variables in memory after executing prosthetic-hip.kcl
|
||||
-0.5
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 3239,
|
||||
"end": 3245,
|
||||
"start": 3239,
|
||||
"commentStart": 2954,
|
||||
"end": 2960,
|
||||
"start": 2954,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg06"
|
||||
},
|
||||
@ -3390,17 +2882,17 @@ description: Variables in memory after executing prosthetic-hip.kcl
|
||||
"origin": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 145.0,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
"type": "Mm"
|
||||
}
|
||||
},
|
||||
"type": "plane",
|
||||
"value": "Custom",
|
||||
"value": "XY",
|
||||
"xAxis": {
|
||||
"x": 0.8038568606172174,
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.5948227867513414,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
"type": "Unknown"
|
||||
}
|
||||
@ -3457,9 +2949,9 @@ description: Variables in memory after executing prosthetic-hip.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 3239,
|
||||
"end": 3245,
|
||||
"start": 3239,
|
||||
"commentStart": 2954,
|
||||
"end": 2960,
|
||||
"start": 2954,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg06"
|
||||
},
|
||||
@ -3515,9 +3007,9 @@ description: Variables in memory after executing prosthetic-hip.kcl
|
||||
-0.5
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 3239,
|
||||
"end": 3245,
|
||||
"start": 3239,
|
||||
"commentStart": 2954,
|
||||
"end": 2960,
|
||||
"start": 2954,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg06"
|
||||
},
|
||||
@ -3666,17 +3158,17 @@ description: Variables in memory after executing prosthetic-hip.kcl
|
||||
"origin": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 145.0,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
"type": "Mm"
|
||||
}
|
||||
},
|
||||
"type": "plane",
|
||||
"value": "Custom",
|
||||
"value": "XY",
|
||||
"xAxis": {
|
||||
"x": 0.8038568606172174,
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.5948227867513414,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
"type": "Unknown"
|
||||
}
|
||||
|
184
rust/kcl-lib/tests/nested_assembly/artifact_commands.snap
Normal file
@ -0,0 +1,184 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Artifact commands nested_main_kcl.kcl
|
||||
---
|
||||
[
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "edge_lines_visible",
|
||||
"hidden": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_visible",
|
||||
"object_id": "[uuid]",
|
||||
"hidden": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_visible",
|
||||
"object_id": "[uuid]",
|
||||
"hidden": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "make_plane",
|
||||
"origin": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"x_axis": {
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"y_axis": {
|
||||
"x": 0.0,
|
||||
"y": 1.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"size": 60.0,
|
||||
"clobber": false,
|
||||
"hide": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "close_path",
|
||||
"path_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "enable_sketch_mode",
|
||||
"entity_id": "[uuid]",
|
||||
"ortho": false,
|
||||
"animated": false,
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 1.0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
"segment": {
|
||||
"type": "arc",
|
||||
"center": {
|
||||
"x": 15.0,
|
||||
"y": 0.0
|
||||
},
|
||||
"radius": 5.0,
|
||||
"start": {
|
||||
"unit": "degrees",
|
||||
"value": 0.0
|
||||
},
|
||||
"end": {
|
||||
"unit": "degrees",
|
||||
"value": 360.0
|
||||
},
|
||||
"relative": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "move_path_pen",
|
||||
"path": "[uuid]",
|
||||
"to": {
|
||||
"x": 20.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "sketch_mode_disable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "start_path"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_bring_to_front",
|
||||
"object_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "revolve",
|
||||
"target": "[uuid]",
|
||||
"origin": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"axis": {
|
||||
"x": 0.0,
|
||||
"y": 1.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"axis_is_2d": true,
|
||||
"angle": {
|
||||
"unit": "degrees",
|
||||
"value": 360.0
|
||||
},
|
||||
"tolerance": 0.0000001,
|
||||
"opposite": "None"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "solid3d_get_adjacency_info",
|
||||
"object_id": "[uuid]",
|
||||
"edge_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "solid3d_get_extrusion_face_info",
|
||||
"object_id": "[uuid]",
|
||||
"edge_id": "[uuid]"
|
||||
}
|
||||
}
|
||||
]
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Artifact graph flowchart nested_assembly.kcl
|
||||
extension: md
|
||||
snapshot_kind: binary
|
||||
---
|
@ -0,0 +1,23 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph path2 [Path]
|
||||
2["Path<br>[43, 81, 2]"]
|
||||
3["Segment<br>[43, 81, 2]"]
|
||||
4[Solid2d]
|
||||
end
|
||||
1["Plane<br>[18, 35, 2]"]
|
||||
5["Sweep Revolve<br>[89, 142, 2]"]
|
||||
6[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
7["SweepEdge Adjacent"]
|
||||
1 --- 2
|
||||
2 --- 3
|
||||
2 --- 4
|
||||
2 ---- 5
|
||||
5 <--x 3
|
||||
3 --- 6
|
||||
3 --- 7
|
||||
5 --- 6
|
||||
5 --- 7
|
||||
6 --- 7
|
||||
```
|
73
rust/kcl-lib/tests/nested_assembly/ast.snap
Normal file
@ -0,0 +1,73 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Result of parsing nested_main_kcl.kcl
|
||||
---
|
||||
{
|
||||
"Ok": {
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"path": {
|
||||
"type": "Kcl",
|
||||
"filename": "nested/foo/bar/main.kcl"
|
||||
},
|
||||
"selector": {
|
||||
"type": "None",
|
||||
"alias": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "bar",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
}
|
||||
},
|
||||
"start": 0,
|
||||
"type": "ImportStatement",
|
||||
"type": "ImportStatement"
|
||||
},
|
||||
{
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"expression": {
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "bar",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
},
|
||||
"start": 0,
|
||||
"type": "ExpressionStatement",
|
||||
"type": "ExpressionStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {
|
||||
"0": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "NonCodeNode",
|
||||
"value": {
|
||||
"type": "newLine"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"startNodes": []
|
||||
},
|
||||
"start": 0
|
||||
}
|
||||
}
|
3
rust/kcl-lib/tests/nested_assembly/input.kcl
Normal file
@ -0,0 +1,3 @@
|
||||
import "nested/foo/bar/main.kcl" as bar
|
||||
|
||||
bar
|
@ -0,0 +1,7 @@
|
||||
// A donut shape.
|
||||
startSketchOn(XY)
|
||||
|> circle( center = [15, 0], radius = 5 )
|
||||
|> revolve(
|
||||
angle = 360,
|
||||
axis = Y,
|
||||
)
|
@ -0,0 +1,3 @@
|
||||
import "imported.kcl" as imported
|
||||
|
||||
imported
|
18
rust/kcl-lib/tests/nested_assembly/ops.snap
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Operations executed nested_main_kcl.kcl
|
||||
---
|
||||
[
|
||||
{
|
||||
"type": "GroupBegin",
|
||||
"group": {
|
||||
"type": "ModuleInstance",
|
||||
"name": "main.kcl",
|
||||
"moduleId": 0
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "GroupEnd"
|
||||
}
|
||||
]
|
10
rust/kcl-lib/tests/nested_assembly/program_memory.snap
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Variables in memory after executing nested_main_kcl.kcl
|
||||
---
|
||||
{
|
||||
"bar": {
|
||||
"type": "Module",
|
||||
"value": 1
|
||||
}
|
||||
}
|
BIN
rust/kcl-lib/tests/nested_assembly/rendered_model.png
Normal file
After Width: | Height: | Size: 150 KiB |
7
rust/kcl-lib/tests/nested_assembly/unparsed.snap
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Result of unparsing nested_main_kcl.kcl
|
||||
---
|
||||
import "nested/foo/bar/main.kcl" as bar
|
||||
|
||||
bar
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Result of unparsing tests/nested_assembly/nested/foo/bar/imported.kcl
|
||||
---
|
||||
// A donut shape.
|
||||
startSketchOn(XY)
|
||||
|> circle(center = [15, 0], radius = 5)
|
||||
|> revolve(angle = 360, axis = Y)
|
@ -0,0 +1,7 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Result of unparsing tests/nested_assembly/nested/foo/bar/main.kcl
|
||||
---
|
||||
import "imported.kcl" as imported
|
||||
|
||||
imported
|
481
rust/kcl-lib/tests/subtract_regression11/artifact_commands.snap
Normal file
@ -0,0 +1,481 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Artifact commands subtract_regression11.kcl
|
||||
---
|
||||
[
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "edge_lines_visible",
|
||||
"hidden": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_visible",
|
||||
"object_id": "[uuid]",
|
||||
"hidden": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_visible",
|
||||
"object_id": "[uuid]",
|
||||
"hidden": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "make_plane",
|
||||
"origin": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"x_axis": {
|
||||
"x": 0.0,
|
||||
"y": 1.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"y_axis": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 1.0
|
||||
},
|
||||
"size": 60.0,
|
||||
"clobber": false,
|
||||
"hide": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "enable_sketch_mode",
|
||||
"entity_id": "[uuid]",
|
||||
"ortho": false,
|
||||
"animated": false,
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "move_path_pen",
|
||||
"path": "[uuid]",
|
||||
"to": {
|
||||
"x": 0.0,
|
||||
"y": 20.0,
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "sketch_mode_disable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "start_path"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": 2.25,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": 0.75,
|
||||
"y": -0.75,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": 0.0,
|
||||
"y": -38.5,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": -0.75,
|
||||
"y": -0.75,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": -2.25,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": 0.0,
|
||||
"y": 40.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "close_path",
|
||||
"path_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_bring_to_front",
|
||||
"object_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "revolve",
|
||||
"target": "[uuid]",
|
||||
"origin": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"axis": {
|
||||
"x": 0.0,
|
||||
"y": 1.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"axis_is_2d": true,
|
||||
"angle": {
|
||||
"unit": "degrees",
|
||||
"value": 360.0
|
||||
},
|
||||
"tolerance": 0.0000001,
|
||||
"opposite": "None"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "solid3d_get_adjacency_info",
|
||||
"object_id": "[uuid]",
|
||||
"edge_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "solid3d_get_extrusion_face_info",
|
||||
"object_id": "[uuid]",
|
||||
"edge_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "make_plane",
|
||||
"origin": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"x_axis": {
|
||||
"x": 0.0,
|
||||
"y": 1.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"y_axis": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 1.0
|
||||
},
|
||||
"size": 60.0,
|
||||
"clobber": false,
|
||||
"hide": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "enable_sketch_mode",
|
||||
"entity_id": "[uuid]",
|
||||
"ortho": false,
|
||||
"animated": false,
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "move_path_pen",
|
||||
"path": "[uuid]",
|
||||
"to": {
|
||||
"x": 0.65,
|
||||
"y": 20.1,
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "sketch_mode_disable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "start_path"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": 0.0,
|
||||
"y": -1.5,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": -1.1,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": 0.0,
|
||||
"y": 1.5,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": 1.1,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "close_path",
|
||||
"path_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "enable_sketch_mode",
|
||||
"entity_id": "[uuid]",
|
||||
"ortho": false,
|
||||
"animated": false,
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extrude",
|
||||
"target": "[uuid]",
|
||||
"distance": 10.0,
|
||||
"faces": null,
|
||||
"opposite": {
|
||||
"Other": 10.0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_bring_to_front",
|
||||
"object_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "sketch_mode_disable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "solid3d_get_adjacency_info",
|
||||
"object_id": "[uuid]",
|
||||
"edge_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "solid3d_get_extrusion_face_info",
|
||||
"object_id": "[uuid]",
|
||||
"edge_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "boolean_subtract",
|
||||
"target_ids": [
|
||||
"[uuid]"
|
||||
],
|
||||
"tool_ids": [
|
||||
"[uuid]"
|
||||
],
|
||||
"tolerance": 0.0000001
|
||||
}
|
||||
}
|
||||
]
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Artifact graph flowchart subtract_regression11.kcl
|
||||
extension: md
|
||||
snapshot_kind: binary
|
||||
---
|
@ -0,0 +1,178 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph path3 [Path]
|
||||
3["Path<br>[88, 127, 0]"]
|
||||
%% [ProgramBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
|
||||
5["Segment<br>[133, 153, 0]"]
|
||||
%% [ProgramBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
6["Segment<br>[159, 184, 0]"]
|
||||
%% [ProgramBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }]
|
||||
7["Segment<br>[190, 211, 0]"]
|
||||
%% [ProgramBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }]
|
||||
8["Segment<br>[217, 243, 0]"]
|
||||
%% [ProgramBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }]
|
||||
9["Segment<br>[249, 270, 0]"]
|
||||
%% [ProgramBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }]
|
||||
10["Segment<br>[276, 294, 0]"]
|
||||
%% [ProgramBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }]
|
||||
11["Segment<br>[300, 307, 0]"]
|
||||
%% [ProgramBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }]
|
||||
18[Solid2d]
|
||||
end
|
||||
subgraph path4 [Path]
|
||||
4["Path<br>[428, 470, 0]"]
|
||||
%% [ProgramBodyItem { index: 4 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
|
||||
12["Segment<br>[476, 496, 0]"]
|
||||
%% [ProgramBodyItem { index: 4 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
13["Segment<br>[502, 522, 0]"]
|
||||
%% [ProgramBodyItem { index: 4 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }]
|
||||
14["Segment<br>[528, 547, 0]"]
|
||||
%% [ProgramBodyItem { index: 4 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }]
|
||||
15["Segment<br>[553, 572, 0]"]
|
||||
%% [ProgramBodyItem { index: 4 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }]
|
||||
16["Segment<br>[578, 585, 0]"]
|
||||
%% [ProgramBodyItem { index: 4 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }]
|
||||
17[Solid2d]
|
||||
end
|
||||
1["Plane<br>[47, 64, 0]"]
|
||||
%% [ProgramBodyItem { index: 0 }, VariableDeclarationDeclaration, VariableDeclarationInit]
|
||||
2["Plane<br>[387, 404, 0]"]
|
||||
%% [ProgramBodyItem { index: 3 }, VariableDeclarationDeclaration, VariableDeclarationInit]
|
||||
19["Sweep Revolve<br>[322, 373, 0]"]
|
||||
%% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit]
|
||||
20["Sweep Extrusion<br>[603, 672, 0]"]
|
||||
%% [ProgramBodyItem { index: 5 }, VariableDeclarationDeclaration, VariableDeclarationInit]
|
||||
21["CompositeSolid Subtract<br>[683, 726, 0]"]
|
||||
%% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit]
|
||||
22[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
23[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
24[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
25[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
26[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
27[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
28[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
29[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
30[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
31["Cap Start"]
|
||||
%% face_code_ref=Missing NodePath
|
||||
32["Cap End"]
|
||||
%% face_code_ref=Missing NodePath
|
||||
33["SweepEdge Opposite"]
|
||||
34["SweepEdge Opposite"]
|
||||
35["SweepEdge Opposite"]
|
||||
36["SweepEdge Opposite"]
|
||||
37["SweepEdge Adjacent"]
|
||||
38["SweepEdge Adjacent"]
|
||||
39["SweepEdge Adjacent"]
|
||||
40["SweepEdge Adjacent"]
|
||||
41["SweepEdge Adjacent"]
|
||||
42["SweepEdge Adjacent"]
|
||||
43["SweepEdge Adjacent"]
|
||||
44["SweepEdge Adjacent"]
|
||||
1 --- 3
|
||||
2 --- 4
|
||||
3 --- 5
|
||||
3 --- 6
|
||||
3 --- 7
|
||||
3 --- 8
|
||||
3 --- 9
|
||||
3 --- 10
|
||||
3 --- 11
|
||||
3 --- 18
|
||||
3 ---- 19
|
||||
3 --- 21
|
||||
4 --- 12
|
||||
4 --- 13
|
||||
4 --- 14
|
||||
4 --- 15
|
||||
4 --- 16
|
||||
4 --- 17
|
||||
4 ---- 20
|
||||
4 --- 21
|
||||
19 <--x 5
|
||||
5 --- 30
|
||||
5 --- 41
|
||||
19 <--x 6
|
||||
6 --- 28
|
||||
6 --- 42
|
||||
19 <--x 7
|
||||
7 --- 27
|
||||
7 --- 43
|
||||
19 <--x 8
|
||||
8 --- 29
|
||||
8 --- 44
|
||||
19 <--x 9
|
||||
9 --- 26
|
||||
12 --- 23
|
||||
12 x--> 31
|
||||
12 --- 36
|
||||
12 --- 40
|
||||
13 --- 25
|
||||
13 x--> 31
|
||||
13 --- 35
|
||||
13 --- 39
|
||||
14 --- 22
|
||||
14 x--> 31
|
||||
14 --- 34
|
||||
14 --- 38
|
||||
15 --- 24
|
||||
15 x--> 31
|
||||
15 --- 33
|
||||
15 --- 37
|
||||
19 --- 26
|
||||
19 --- 27
|
||||
19 --- 28
|
||||
19 --- 29
|
||||
19 --- 30
|
||||
19 --- 41
|
||||
19 --- 42
|
||||
19 --- 43
|
||||
19 --- 44
|
||||
20 --- 22
|
||||
20 --- 23
|
||||
20 --- 24
|
||||
20 --- 25
|
||||
20 --- 31
|
||||
20 --- 32
|
||||
20 --- 33
|
||||
20 --- 34
|
||||
20 --- 35
|
||||
20 --- 36
|
||||
20 --- 37
|
||||
20 --- 38
|
||||
20 --- 39
|
||||
20 --- 40
|
||||
22 --- 34
|
||||
37 <--x 22
|
||||
22 --- 38
|
||||
23 --- 36
|
||||
39 <--x 23
|
||||
23 --- 40
|
||||
24 --- 33
|
||||
24 --- 37
|
||||
40 <--x 24
|
||||
25 --- 35
|
||||
38 <--x 25
|
||||
25 --- 39
|
||||
44 <--x 26
|
||||
42 <--x 27
|
||||
27 --- 43
|
||||
41 <--x 28
|
||||
28 --- 42
|
||||
43 <--x 29
|
||||
29 --- 44
|
||||
30 --- 41
|
||||
33 <--x 32
|
||||
34 <--x 32
|
||||
35 <--x 32
|
||||
36 <--x 32
|
||||
```
|
1408
rust/kcl-lib/tests/subtract_regression11/ast.snap
Normal file
27
rust/kcl-lib/tests/subtract_regression11/input.kcl
Normal file
@ -0,0 +1,27 @@
|
||||
@settings(defaultLengthUnit = mm)
|
||||
|
||||
sketch001 = startSketchOn(YZ)
|
||||
|
||||
sketch001Profile000 = startProfile(sketch001, at = [0.0, 20])
|
||||
|> xLine(length = 2.25)
|
||||
|> line(end = [0.75, -0.75])
|
||||
|> yLine(length = -38.5)
|
||||
|> line(end = [-0.75, -0.75])
|
||||
|> xLine(length = -2.25)
|
||||
|> yLine(length = 40)
|
||||
|> close()
|
||||
|
||||
revolve000 = revolve(sketch001Profile000, axis = Y, angle = 360)
|
||||
|
||||
sketch003 = startSketchOn(YZ)
|
||||
|
||||
sketch003Profile000 = startProfile(sketch003, at = [0.65, 20.1])
|
||||
|> yLine(length = -1.5)
|
||||
|> xLine(length = -1.1)
|
||||
|> yLine(length = 1.5)
|
||||
|> xLine(length = 1.1)
|
||||
|> close()
|
||||
|
||||
cut000Extrude = extrude([sketch003Profile000], length = 10, bidirectionalLength = 10)
|
||||
|
||||
cut000 = subtract(revolve000, tools = cut000Extrude)
|
217
rust/kcl-lib/tests/subtract_regression11/ops.snap
Normal file
@ -0,0 +1,217 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Operations executed subtract_regression11.kcl
|
||||
---
|
||||
[
|
||||
{
|
||||
"type": "StdLibCall",
|
||||
"name": "startSketchOn",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "StdLibCall",
|
||||
"name": "revolve",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"angle": {
|
||||
"value": {
|
||||
"type": "Number",
|
||||
"value": 360.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"axis": {
|
||||
"value": {
|
||||
"type": "Object",
|
||||
"value": {
|
||||
"direction": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 1.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"origin": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "StdLibCall",
|
||||
"name": "startSketchOn",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "StdLibCall",
|
||||
"name": "extrude",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"bidirectionalLength": {
|
||||
"value": {
|
||||
"type": "Number",
|
||||
"value": 10.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"length": {
|
||||
"value": {
|
||||
"type": "Number",
|
||||
"value": 10.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "StdLibCall",
|
||||
"name": "subtract",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"tools": {
|
||||
"value": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
]
|
1109
rust/kcl-lib/tests/subtract_regression11/program_memory.snap
Normal file
BIN
rust/kcl-lib/tests/subtract_regression11/rendered_model.png
Normal file
After Width: | Height: | Size: 39 KiB |
31
rust/kcl-lib/tests/subtract_regression11/unparsed.snap
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Result of unparsing subtract_regression11.kcl
|
||||
---
|
||||
@settings(defaultLengthUnit = mm)
|
||||
|
||||
sketch001 = startSketchOn(YZ)
|
||||
|
||||
sketch001Profile000 = startProfile(sketch001, at = [0.0, 20])
|
||||
|> xLine(length = 2.25)
|
||||
|> line(end = [0.75, -0.75])
|
||||
|> yLine(length = -38.5)
|
||||
|> line(end = [-0.75, -0.75])
|
||||
|> xLine(length = -2.25)
|
||||
|> yLine(length = 40)
|
||||
|> close()
|
||||
|
||||
revolve000 = revolve(sketch001Profile000, axis = Y, angle = 360)
|
||||
|
||||
sketch003 = startSketchOn(YZ)
|
||||
|
||||
sketch003Profile000 = startProfile(sketch003, at = [0.65, 20.1])
|
||||
|> yLine(length = -1.5)
|
||||
|> xLine(length = -1.1)
|
||||
|> yLine(length = 1.5)
|
||||
|> xLine(length = 1.1)
|
||||
|> close()
|
||||
|
||||
cut000Extrude = extrude([sketch003Profile000], length = 10, bidirectionalLength = 10)
|
||||
|
||||
cut000 = subtract(revolve000, tools = cut000Extrude)
|
481
rust/kcl-lib/tests/subtract_regression12/artifact_commands.snap
Normal file
@ -0,0 +1,481 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Artifact commands subtract_regression12.kcl
|
||||
---
|
||||
[
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "edge_lines_visible",
|
||||
"hidden": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_visible",
|
||||
"object_id": "[uuid]",
|
||||
"hidden": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_visible",
|
||||
"object_id": "[uuid]",
|
||||
"hidden": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "make_plane",
|
||||
"origin": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"x_axis": {
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"y_axis": {
|
||||
"x": 0.0,
|
||||
"y": 1.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"size": 60.0,
|
||||
"clobber": false,
|
||||
"hide": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "enable_sketch_mode",
|
||||
"entity_id": "[uuid]",
|
||||
"ortho": false,
|
||||
"animated": false,
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 1.0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "move_path_pen",
|
||||
"path": "[uuid]",
|
||||
"to": {
|
||||
"x": 5.588,
|
||||
"y": 12.7,
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "sketch_mode_disable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "start_path"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": -5.588,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": 0.0,
|
||||
"y": -25.4,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": 2.54,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": 0.635,
|
||||
"y": 2.54,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": 0.0,
|
||||
"y": 20.0406,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": 2.413,
|
||||
"y": 2.8194,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "close_path",
|
||||
"path_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_bring_to_front",
|
||||
"object_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "revolve",
|
||||
"target": "[uuid]",
|
||||
"origin": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"axis": {
|
||||
"x": 0.0,
|
||||
"y": 1.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"axis_is_2d": true,
|
||||
"angle": {
|
||||
"unit": "degrees",
|
||||
"value": 360.0
|
||||
},
|
||||
"tolerance": 0.0000001,
|
||||
"opposite": "None"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "solid3d_get_adjacency_info",
|
||||
"object_id": "[uuid]",
|
||||
"edge_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "solid3d_get_extrusion_face_info",
|
||||
"object_id": "[uuid]",
|
||||
"edge_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "make_plane",
|
||||
"origin": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"x_axis": {
|
||||
"x": 0.0,
|
||||
"y": 1.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"y_axis": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 1.0
|
||||
},
|
||||
"size": 60.0,
|
||||
"clobber": false,
|
||||
"hide": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "enable_sketch_mode",
|
||||
"entity_id": "[uuid]",
|
||||
"ortho": false,
|
||||
"animated": false,
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "move_path_pen",
|
||||
"path": "[uuid]",
|
||||
"to": {
|
||||
"x": -15.24,
|
||||
"y": 0.508,
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "sketch_mode_disable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "start_path"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": 0.0,
|
||||
"y": -1.016,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": 22.86,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": 0.0,
|
||||
"y": 1.016,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": -22.86,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "close_path",
|
||||
"path_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "enable_sketch_mode",
|
||||
"entity_id": "[uuid]",
|
||||
"ortho": false,
|
||||
"animated": false,
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extrude",
|
||||
"target": "[uuid]",
|
||||
"distance": 5.08,
|
||||
"faces": null,
|
||||
"opposite": {
|
||||
"Other": 5.08
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_bring_to_front",
|
||||
"object_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "sketch_mode_disable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "solid3d_get_adjacency_info",
|
||||
"object_id": "[uuid]",
|
||||
"edge_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "solid3d_get_extrusion_face_info",
|
||||
"object_id": "[uuid]",
|
||||
"edge_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "boolean_subtract",
|
||||
"target_ids": [
|
||||
"[uuid]"
|
||||
],
|
||||
"tool_ids": [
|
||||
"[uuid]"
|
||||
],
|
||||
"tolerance": 0.0000001
|
||||
}
|
||||
}
|
||||
]
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Artifact graph flowchart subtract_regression12.kcl
|
||||
extension: md
|
||||
snapshot_kind: binary
|
||||
---
|
@ -0,0 +1,180 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph path3 [Path]
|
||||
3["Path<br>[88, 129, 0]"]
|
||||
%% [ProgramBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
|
||||
5["Segment<br>[135, 156, 0]"]
|
||||
%% [ProgramBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
6["Segment<br>[162, 180, 0]"]
|
||||
%% [ProgramBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }]
|
||||
7["Segment<br>[186, 205, 0]"]
|
||||
%% [ProgramBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }]
|
||||
8["Segment<br>[211, 235, 0]"]
|
||||
%% [ProgramBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }]
|
||||
9["Segment<br>[241, 262, 0]"]
|
||||
%% [ProgramBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }]
|
||||
10["Segment<br>[268, 294, 0]"]
|
||||
%% [ProgramBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }]
|
||||
11["Segment<br>[300, 307, 0]"]
|
||||
%% [ProgramBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }]
|
||||
18[Solid2d]
|
||||
end
|
||||
subgraph path4 [Path]
|
||||
4["Path<br>[428, 470, 0]"]
|
||||
%% [ProgramBodyItem { index: 4 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }]
|
||||
12["Segment<br>[476, 497, 0]"]
|
||||
%% [ProgramBodyItem { index: 4 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }]
|
||||
13["Segment<br>[503, 522, 0]"]
|
||||
%% [ProgramBodyItem { index: 4 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }]
|
||||
14["Segment<br>[528, 548, 0]"]
|
||||
%% [ProgramBodyItem { index: 4 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }]
|
||||
15["Segment<br>[554, 574, 0]"]
|
||||
%% [ProgramBodyItem { index: 4 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }]
|
||||
16["Segment<br>[580, 587, 0]"]
|
||||
%% [ProgramBodyItem { index: 4 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }]
|
||||
17[Solid2d]
|
||||
end
|
||||
1["Plane<br>[47, 64, 0]"]
|
||||
%% [ProgramBodyItem { index: 0 }, VariableDeclarationDeclaration, VariableDeclarationInit]
|
||||
2["Plane<br>[387, 404, 0]"]
|
||||
%% [ProgramBodyItem { index: 3 }, VariableDeclarationDeclaration, VariableDeclarationInit]
|
||||
19["Sweep Revolve<br>[322, 373, 0]"]
|
||||
%% [ProgramBodyItem { index: 2 }, VariableDeclarationDeclaration, VariableDeclarationInit]
|
||||
20["Sweep Extrusion<br>[605, 676, 0]"]
|
||||
%% [ProgramBodyItem { index: 5 }, VariableDeclarationDeclaration, VariableDeclarationInit]
|
||||
21["CompositeSolid Subtract<br>[687, 730, 0]"]
|
||||
%% [ProgramBodyItem { index: 6 }, VariableDeclarationDeclaration, VariableDeclarationInit]
|
||||
22[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
23[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
24[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
25[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
26[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
27[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
28[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
29[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
30[Wall]
|
||||
%% face_code_ref=Missing NodePath
|
||||
31["Cap Start"]
|
||||
%% face_code_ref=Missing NodePath
|
||||
32["Cap End"]
|
||||
%% face_code_ref=Missing NodePath
|
||||
33["SweepEdge Opposite"]
|
||||
34["SweepEdge Opposite"]
|
||||
35["SweepEdge Opposite"]
|
||||
36["SweepEdge Opposite"]
|
||||
37["SweepEdge Adjacent"]
|
||||
38["SweepEdge Adjacent"]
|
||||
39["SweepEdge Adjacent"]
|
||||
40["SweepEdge Adjacent"]
|
||||
41["SweepEdge Adjacent"]
|
||||
42["SweepEdge Adjacent"]
|
||||
43["SweepEdge Adjacent"]
|
||||
44["SweepEdge Adjacent"]
|
||||
1 --- 3
|
||||
2 --- 4
|
||||
3 --- 5
|
||||
3 --- 6
|
||||
3 --- 7
|
||||
3 --- 8
|
||||
3 --- 9
|
||||
3 --- 10
|
||||
3 --- 11
|
||||
3 --- 18
|
||||
3 ---- 19
|
||||
3 --- 21
|
||||
4 --- 12
|
||||
4 --- 13
|
||||
4 --- 14
|
||||
4 --- 15
|
||||
4 --- 16
|
||||
4 --- 17
|
||||
4 ---- 20
|
||||
4 --- 21
|
||||
19 <--x 5
|
||||
5 --- 30
|
||||
19 <--x 7
|
||||
7 --- 28
|
||||
7 --- 41
|
||||
19 <--x 8
|
||||
8 --- 29
|
||||
8 --- 42
|
||||
19 <--x 9
|
||||
9 --- 27
|
||||
9 --- 43
|
||||
19 <--x 10
|
||||
10 --- 26
|
||||
10 --- 44
|
||||
12 --- 23
|
||||
12 x--> 31
|
||||
12 --- 33
|
||||
12 --- 37
|
||||
13 --- 25
|
||||
13 x--> 31
|
||||
13 --- 34
|
||||
13 --- 38
|
||||
14 --- 22
|
||||
14 x--> 31
|
||||
14 --- 35
|
||||
14 --- 39
|
||||
15 --- 24
|
||||
15 x--> 31
|
||||
15 --- 36
|
||||
15 --- 40
|
||||
19 --- 26
|
||||
19 --- 27
|
||||
19 --- 28
|
||||
19 --- 29
|
||||
19 --- 30
|
||||
19 --- 41
|
||||
19 --- 42
|
||||
19 --- 43
|
||||
19 --- 44
|
||||
20 --- 22
|
||||
20 --- 23
|
||||
20 --- 24
|
||||
20 --- 25
|
||||
20 --- 31
|
||||
20 --- 32
|
||||
20 --- 33
|
||||
20 --- 34
|
||||
20 --- 35
|
||||
20 --- 36
|
||||
20 --- 37
|
||||
20 --- 38
|
||||
20 --- 39
|
||||
20 --- 40
|
||||
22 --- 35
|
||||
38 <--x 22
|
||||
22 --- 39
|
||||
23 --- 33
|
||||
23 --- 37
|
||||
40 <--x 23
|
||||
24 --- 36
|
||||
39 <--x 24
|
||||
24 --- 40
|
||||
25 --- 34
|
||||
37 <--x 25
|
||||
25 --- 38
|
||||
42 <--x 26
|
||||
43 <--x 26
|
||||
26 x--> 44
|
||||
41 <--x 27
|
||||
42 <--x 27
|
||||
27 x--> 43
|
||||
28 x--> 41
|
||||
41 <--x 29
|
||||
29 x--> 42
|
||||
43 <--x 30
|
||||
33 <--x 32
|
||||
34 <--x 32
|
||||
35 <--x 32
|
||||
36 <--x 32
|
||||
```
|
1392
rust/kcl-lib/tests/subtract_regression12/ast.snap
Normal file
27
rust/kcl-lib/tests/subtract_regression12/input.kcl
Normal file
@ -0,0 +1,27 @@
|
||||
@settings(defaultLengthUnit = in)
|
||||
|
||||
sketch000 = startSketchOn(XY)
|
||||
|
||||
sketch000Profile000 = startProfile(sketch000, at = [0.22, 0.5])
|
||||
|> xLine(length = -0.22)
|
||||
|> yLine(length = -1)
|
||||
|> xLine(length = 0.1)
|
||||
|> line(end = [0.025, 0.1])
|
||||
|> yLine(length = 0.789)
|
||||
|> line(end = [0.095, 0.111])
|
||||
|> close()
|
||||
|
||||
revolve000 = revolve(sketch000Profile000, axis = Y, angle = 360)
|
||||
|
||||
sketch002 = startSketchOn(YZ)
|
||||
|
||||
sketch002Profile000 = startProfile(sketch002, at = [-0.6, 0.02])
|
||||
|> yLine(length = -0.04)
|
||||
|> xLine(length = 0.9)
|
||||
|> yLine(length = 0.04)
|
||||
|> xLine(length = -0.9)
|
||||
|> close()
|
||||
|
||||
cut000Extrude = extrude([sketch002Profile000], length = 0.2, bidirectionalLength = 0.2)
|
||||
|
||||
cut000 = subtract(revolve000, tools = cut000Extrude)
|
217
rust/kcl-lib/tests/subtract_regression12/ops.snap
Normal file
@ -0,0 +1,217 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Operations executed subtract_regression12.kcl
|
||||
---
|
||||
[
|
||||
{
|
||||
"type": "StdLibCall",
|
||||
"name": "startSketchOn",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "StdLibCall",
|
||||
"name": "revolve",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"angle": {
|
||||
"value": {
|
||||
"type": "Number",
|
||||
"value": 360.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Inches"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"axis": {
|
||||
"value": {
|
||||
"type": "Object",
|
||||
"value": {
|
||||
"direction": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 1.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"origin": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "StdLibCall",
|
||||
"name": "startSketchOn",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "StdLibCall",
|
||||
"name": "extrude",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
{
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"bidirectionalLength": {
|
||||
"value": {
|
||||
"type": "Number",
|
||||
"value": 0.2,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Inches"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"length": {
|
||||
"value": {
|
||||
"type": "Number",
|
||||
"value": 0.2,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Inches"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "StdLibCall",
|
||||
"name": "subtract",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"tools": {
|
||||
"value": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
]
|
1109
rust/kcl-lib/tests/subtract_regression12/program_memory.snap
Normal file
BIN
rust/kcl-lib/tests/subtract_regression12/rendered_model.png
Normal file
After Width: | Height: | Size: 60 KiB |
31
rust/kcl-lib/tests/subtract_regression12/unparsed.snap
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Result of unparsing subtract_regression12.kcl
|
||||
---
|
||||
@settings(defaultLengthUnit = in)
|
||||
|
||||
sketch000 = startSketchOn(XY)
|
||||
|
||||
sketch000Profile000 = startProfile(sketch000, at = [0.22, 0.5])
|
||||
|> xLine(length = -0.22)
|
||||
|> yLine(length = -1)
|
||||
|> xLine(length = 0.1)
|
||||
|> line(end = [0.025, 0.1])
|
||||
|> yLine(length = 0.789)
|
||||
|> line(end = [0.095, 0.111])
|
||||
|> close()
|
||||
|
||||
revolve000 = revolve(sketch000Profile000, axis = Y, angle = 360)
|
||||
|
||||
sketch002 = startSketchOn(YZ)
|
||||
|
||||
sketch002Profile000 = startProfile(sketch002, at = [-0.6, 0.02])
|
||||
|> yLine(length = -0.04)
|
||||
|> xLine(length = 0.9)
|
||||
|> yLine(length = 0.04)
|
||||
|> xLine(length = -0.9)
|
||||
|> close()
|
||||
|
||||
cut000Extrude = extrude([sketch002Profile000], length = 0.2, bidirectionalLength = 0.2)
|
||||
|
||||
cut000 = subtract(revolve000, tools = cut000Extrude)
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "kcl-python-bindings"
|
||||
version = "0.3.75"
|
||||
version = "0.3.76"
|
||||
edition = "2021"
|
||||
repository = "https://github.com/kittycad/modeling-app"
|
||||
exclude = ["tests/*", "files/*", "venv/*"]
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "kcl-test-server"
|
||||
description = "A test server for KCL"
|
||||
version = "0.1.75"
|
||||
version = "0.1.76"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "kcl-to-core"
|
||||
description = "Utility methods to convert kcl to engine core executable tests"
|
||||
version = "0.1.75"
|
||||
version = "0.1.76"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
repository = "https://github.com/KittyCAD/modeling-app"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "kcl-wasm-lib"
|
||||
version = "0.1.75"
|
||||
version = "0.1.76"
|
||||
edition = "2021"
|
||||
repository = "https://github.com/KittyCAD/modeling-app"
|
||||
rust-version = "1.83"
|
||||
|
@ -139,8 +139,8 @@ function CommandBarSelectionInput({
|
||||
data: {
|
||||
selectionType: 'singleCodeCursor',
|
||||
},
|
||||
})
|
||||
setHasClearedSelection(true)
|
||||
}) &&
|
||||
setHasClearedSelection(true)
|
||||
}, [arg])
|
||||
|
||||
// Watch for outside teardowns of this component
|
||||
|
@ -406,11 +406,17 @@ export const EngineStream = (props: {
|
||||
|
||||
// On various inputs save the camera state, in case we get disconnected.
|
||||
useEffect(() => {
|
||||
// Only start saving after we are playing the stream (which means
|
||||
// the scene is ready.)
|
||||
// Also prevents us from stepping on the toes of the camera restoration.
|
||||
if (engineStreamState.value !== EngineStreamState.Playing) return
|
||||
|
||||
const onInput = () => {
|
||||
// Save the remote camera state to restore on stream restore.
|
||||
// Fire-and-forget because we don't know when a camera movement is
|
||||
// completed on the engine side (there are no responses to data channel
|
||||
// mouse movements.)
|
||||
|
||||
sceneInfra.camControls.saveRemoteCameraState().catch(trap)
|
||||
}
|
||||
|
||||
@ -426,7 +432,7 @@ export const EngineStream = (props: {
|
||||
window.document.removeEventListener('scroll', onInput)
|
||||
window.document.removeEventListener('touchend', onInput)
|
||||
}
|
||||
}, [])
|
||||
}, [engineStreamState.value])
|
||||
|
||||
const isNetworkOkay =
|
||||
overallState === NetworkHealthState.Ok ||
|
||||
|
@ -441,39 +441,46 @@ export const FileMachineProvider = ({
|
||||
)
|
||||
useMenuListener(cb)
|
||||
|
||||
const kclCommandMemo = useMemo(
|
||||
() =>
|
||||
kclCommands({
|
||||
authToken: token ?? '',
|
||||
projectData,
|
||||
settings: {
|
||||
defaultUnit:
|
||||
settings.modeling.defaultUnit.current ??
|
||||
DEFAULT_DEFAULT_LENGTH_UNIT,
|
||||
},
|
||||
specialPropsForInsertCommand: {
|
||||
providedOptions: (isDesktop() && project?.children
|
||||
? project.children
|
||||
: []
|
||||
).flatMap((v) => {
|
||||
// TODO: add support for full tree traversal when KCL support subdir imports
|
||||
const relativeFilePath = v.path.replace(
|
||||
project?.path + window.electron.sep,
|
||||
''
|
||||
)
|
||||
const isDirectory = v.children
|
||||
const isCurrentFile = v.path === file?.path
|
||||
return isDirectory || isCurrentFile
|
||||
? []
|
||||
: {
|
||||
name: relativeFilePath,
|
||||
value: relativeFilePath,
|
||||
}
|
||||
}),
|
||||
},
|
||||
}),
|
||||
[codeManager, kclManager, send, project, file]
|
||||
)
|
||||
const kclCommandMemo = useMemo(() => {
|
||||
const providedOptions = []
|
||||
if (isDesktop() && project?.children && file?.path) {
|
||||
const projectPath = project.path
|
||||
const filePath = file.path
|
||||
let children = project.children
|
||||
while (children.length > 0) {
|
||||
const v = children.pop()
|
||||
if (!v) {
|
||||
continue
|
||||
}
|
||||
|
||||
if (v.children) {
|
||||
children.push(...v.children)
|
||||
continue
|
||||
}
|
||||
|
||||
const relativeFilePath = v.path.replace(
|
||||
projectPath + window.electron.sep,
|
||||
''
|
||||
)
|
||||
const isCurrentFile = v.path === filePath
|
||||
if (!isCurrentFile) {
|
||||
providedOptions.push({
|
||||
name: relativeFilePath.replaceAll(window.electron.sep, '/'),
|
||||
value: relativeFilePath.replaceAll(window.electron.sep, '/'),
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
return kclCommands({
|
||||
authToken: token ?? '',
|
||||
projectData,
|
||||
settings: {
|
||||
defaultUnit:
|
||||
settings.modeling.defaultUnit.current ?? DEFAULT_DEFAULT_LENGTH_UNIT,
|
||||
},
|
||||
specialPropsForInsertCommand: { providedOptions },
|
||||
})
|
||||
}, [codeManager, kclManager, send, project, file])
|
||||
|
||||
useEffect(() => {
|
||||
commandBarActor.send({
|
||||
|
@ -161,40 +161,6 @@ export const ModelingMachineProvider = ({
|
||||
'enable copilot': () => {
|
||||
editorManager.setCopilotEnabled(true)
|
||||
},
|
||||
'sketch exit execute': ({ context: { store } }) => {
|
||||
// TODO: Remove this async callback. For some reason eslint wouldn't
|
||||
// let me disable @typescript-eslint/no-misused-promises for the line.
|
||||
;(async () => {
|
||||
// When cancelling the sketch mode we should disable sketch mode within the engine.
|
||||
await engineCommandManager.sendSceneCommand({
|
||||
type: 'modeling_cmd_req',
|
||||
cmd_id: uuidv4(),
|
||||
cmd: { type: 'sketch_mode_disable' },
|
||||
})
|
||||
|
||||
sceneInfra.camControls.syncDirection = 'clientToEngine'
|
||||
|
||||
if (cameraProjection.current === 'perspective') {
|
||||
await sceneInfra.camControls.snapToPerspectiveBeforeHandingBackControlToEngine()
|
||||
}
|
||||
|
||||
sceneInfra.camControls.syncDirection = 'engineToClient'
|
||||
|
||||
// TODO: Re-evaluate if this pause/play logic is needed.
|
||||
store.videoElement?.pause()
|
||||
|
||||
return kclManager
|
||||
.executeCode()
|
||||
.then(() => {
|
||||
if (engineCommandManager.idleMode) return
|
||||
|
||||
store.videoElement?.play().catch((e) => {
|
||||
console.warn('Video playing was prevented', e)
|
||||
})
|
||||
})
|
||||
.catch(reportRejection)
|
||||
})().catch(reportRejection)
|
||||
},
|
||||
'Set mouse state': assign(({ context, event }) => {
|
||||
if (event.type !== 'Set mouse state') return {}
|
||||
const nextSegmentHoverMap = () => {
|
||||
@ -1278,12 +1244,12 @@ export const ModelingMachineProvider = ({
|
||||
)
|
||||
}
|
||||
}
|
||||
let filePath = file?.path
|
||||
// When prompt to edit finishes, try to route to the file they were in otherwise go to main.kcl
|
||||
if (filePath) {
|
||||
filePath = window.electron.path.relative(basePath, filePath)
|
||||
} else {
|
||||
filePath = PROJECT_ENTRYPOINT
|
||||
// route to main.kcl by default for web and desktop
|
||||
let filePath: string = PROJECT_ENTRYPOINT
|
||||
const possibleFileName = file?.path
|
||||
if (possibleFileName && isDesktop()) {
|
||||
// When prompt to edit finishes, try to route to the file they were in otherwise go to main.kcl
|
||||
filePath = window.electron.path.relative(basePath, possibleFileName)
|
||||
}
|
||||
return await promptToEditFlow({
|
||||
projectFiles,
|
||||
@ -1303,6 +1269,7 @@ export const ModelingMachineProvider = ({
|
||||
store: {
|
||||
...modelingMachineDefaultContext.store,
|
||||
...persistedContext,
|
||||
cameraProjection,
|
||||
},
|
||||
machineManager,
|
||||
},
|
||||
|
@ -9,9 +9,11 @@ import {
|
||||
ZOO_STUDIO_PROTOCOL,
|
||||
} from '@src/lib/constants'
|
||||
import { isDesktop } from '@src/lib/isDesktop'
|
||||
import { Themes, getSystemTheme } from '@src/lib/theme'
|
||||
import { Themes, darkModeMatcher, setThemeClass } from '@src/lib/theme'
|
||||
import toast from 'react-hot-toast'
|
||||
import { platform } from '@src/lib/utils'
|
||||
import { Logo } from '@src/components/Logo'
|
||||
import { useEffect } from 'react'
|
||||
|
||||
/**
|
||||
* This component is a handler that checks if a certain query parameter
|
||||
@ -19,17 +21,23 @@ import { platform } from '@src/lib/utils'
|
||||
* want to open the current page in the desktop app.
|
||||
*/
|
||||
export const OpenInDesktopAppHandler = (props: React.PropsWithChildren) => {
|
||||
const theme = getSystemTheme()
|
||||
const buttonClasses =
|
||||
'bg-transparent flex-0 hover:bg-primary/10 dark:hover:bg-primary/10'
|
||||
const pathLogomarkSvg = `${isDesktop() ? '.' : ''}/zma-logomark${
|
||||
theme === Themes.Light ? '-dark' : ''
|
||||
}.svg`
|
||||
const [searchParams, setSearchParams] = useSearchParams()
|
||||
// We also ignore this param on desktop, as it is redundant
|
||||
const hasAskToOpenParam =
|
||||
!isDesktop() && searchParams.has(ASK_TO_OPEN_QUERY_PARAM)
|
||||
|
||||
// Watch the system theme for changes
|
||||
useEffect(() => {
|
||||
const listener = (e: MediaQueryListEvent) => {
|
||||
setThemeClass(e.matches ? Themes.Dark : Themes.Light)
|
||||
}
|
||||
|
||||
darkModeMatcher?.addEventListener('change', listener)
|
||||
return () => darkModeMatcher?.removeEventListener('change', listener)
|
||||
}, [])
|
||||
|
||||
/**
|
||||
* This function removes the query param to ask to open in desktop app
|
||||
* and then navigates to the same route but with our custom protocol
|
||||
@ -73,17 +81,12 @@ export const OpenInDesktopAppHandler = (props: React.PropsWithChildren) => {
|
||||
appear
|
||||
show={true}
|
||||
as="div"
|
||||
className={
|
||||
theme +
|
||||
` fixed inset-0 grid p-4 place-content-center ${
|
||||
theme === Themes.Dark ? '!bg-chalkboard-110 text-chalkboard-20' : ''
|
||||
}`
|
||||
}
|
||||
className="fixed inset-0 grid p-4 place-content-center bg-chalkboard-10 dark:bg-chalkboard-110"
|
||||
>
|
||||
<Transition.Child
|
||||
as="div"
|
||||
className={`max-w-3xl py-6 px-10 flex flex-col items-center gap-8
|
||||
mx-auto border rounded-lg shadow-lg dark:bg-chalkboard-100`}
|
||||
className={`max-w-3xl py-6 px-10 flex flex-col items-center gap-12
|
||||
mx-auto border rounded-lg shadow-lg bg-chalkboard-10 dark:bg-chalkboard-100`}
|
||||
enter="ease-out duration-300"
|
||||
enterFrom="opacity-0 scale-95"
|
||||
enterTo="opacity-100 scale-100"
|
||||
@ -92,50 +95,47 @@ export const OpenInDesktopAppHandler = (props: React.PropsWithChildren) => {
|
||||
leaveTo="opacity-0 scale-95"
|
||||
style={{ zIndex: 10 }}
|
||||
>
|
||||
<div>
|
||||
<h1 className="text-2xl">
|
||||
Launching{' '}
|
||||
<img
|
||||
src={pathLogomarkSvg}
|
||||
className="w-48"
|
||||
alt="Zoo Design Studio"
|
||||
/>
|
||||
</h1>
|
||||
</div>
|
||||
<p className="text-primary flex items-center gap-2">
|
||||
Choose where to open this link...
|
||||
</p>
|
||||
<div className="flex flex-col md:flex-row items-start justify-between gap-4 xl:gap-8">
|
||||
<div className="flex flex-col gap-2">
|
||||
<h1 className="text-2xl text-center ">
|
||||
<div className="mb-4">Launching </div>
|
||||
<div className="flex items-center gap-4 flex-wrap text-4xl">
|
||||
<Logo className="w-40" aria-label="Zoo" />
|
||||
<span>Design Studio</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div className="flex flex-col gap-4 items-center">
|
||||
<p className="text-primary">Choose where to open this link...</p>
|
||||
<div className="flex flex-col md:flex-row items-start justify-between gap-4 xl:gap-8">
|
||||
<div className="flex flex-col gap-2">
|
||||
<ActionButton
|
||||
Element="button"
|
||||
className={buttonClasses + ' !text-base'}
|
||||
onClick={onOpenInDesktopApp}
|
||||
iconEnd={{ icon: 'arrowRight' }}
|
||||
>
|
||||
Open in desktop app
|
||||
</ActionButton>
|
||||
<ActionButton
|
||||
Element="externalLink"
|
||||
className={
|
||||
buttonClasses +
|
||||
' text-sm border-transparent justify-center dark:bg-transparent'
|
||||
}
|
||||
to={`${VITE_KC_SITE_BASE_URL}/${APP_DOWNLOAD_PATH}`}
|
||||
iconEnd={{ icon: 'link', bgClassName: '!bg-transparent' }}
|
||||
>
|
||||
Download desktop app
|
||||
</ActionButton>
|
||||
</div>
|
||||
<ActionButton
|
||||
Element="button"
|
||||
className={buttonClasses + ' !text-base'}
|
||||
onClick={onOpenInDesktopApp}
|
||||
iconEnd={{ icon: 'arrowRight' }}
|
||||
className={buttonClasses + ' -order-1 !text-base'}
|
||||
onClick={continueToWebApp}
|
||||
iconStart={{ icon: 'arrowLeft' }}
|
||||
data-testid="continue-to-web-app-button"
|
||||
>
|
||||
Open in desktop app
|
||||
</ActionButton>
|
||||
<ActionButton
|
||||
Element="externalLink"
|
||||
className={
|
||||
buttonClasses +
|
||||
' text-sm border-transparent justify-center dark:bg-transparent'
|
||||
}
|
||||
to={`${VITE_KC_SITE_BASE_URL}/${APP_DOWNLOAD_PATH}`}
|
||||
iconEnd={{ icon: 'link', bgClassName: '!bg-transparent' }}
|
||||
>
|
||||
Download desktop app
|
||||
Continue to web app
|
||||
</ActionButton>
|
||||
</div>
|
||||
<ActionButton
|
||||
Element="button"
|
||||
className={buttonClasses + ' -order-1 !text-base'}
|
||||
onClick={continueToWebApp}
|
||||
iconStart={{ icon: 'arrowLeft' }}
|
||||
data-testid="continue-to-web-app-button"
|
||||
>
|
||||
Continue to web app
|
||||
</ActionButton>
|
||||
</div>
|
||||
</Transition.Child>
|
||||
</Transition>
|
||||
|
@ -159,6 +159,7 @@ export function ToastTextToCadSuccess({
|
||||
projectName,
|
||||
fileName,
|
||||
isProjectNew,
|
||||
rootProjectName,
|
||||
}: {
|
||||
toastId: string
|
||||
data: TextToCad_type & { fileName: string }
|
||||
@ -170,6 +171,7 @@ export function ToastTextToCadSuccess({
|
||||
projectName: string
|
||||
fileName: string
|
||||
isProjectNew: boolean
|
||||
rootProjectName: string
|
||||
}) {
|
||||
const wrapperRef = useRef<HTMLDivElement | null>(null)
|
||||
const canvasRef = useRef<HTMLCanvasElement | null>(null)
|
||||
@ -361,26 +363,23 @@ export function ToastTextToCadSuccess({
|
||||
if (isDesktop()) {
|
||||
// Delete the file from the project
|
||||
|
||||
if (projectName && fileName) {
|
||||
// You are in the new workflow for text to cad at the global application level
|
||||
if (isProjectNew) {
|
||||
// Delete the entire project if it was newly created from text to CAD
|
||||
systemIOActor.send({
|
||||
type: SystemIOMachineEvents.deleteProject,
|
||||
data: {
|
||||
requestedProjectName: projectName,
|
||||
},
|
||||
})
|
||||
} else {
|
||||
// Only delete the file if the project was preexisting
|
||||
systemIOActor.send({
|
||||
type: SystemIOMachineEvents.deleteKCLFile,
|
||||
data: {
|
||||
requestedProjectName: projectName,
|
||||
requestedFileName: fileName,
|
||||
},
|
||||
})
|
||||
}
|
||||
if (isProjectNew) {
|
||||
// Delete the entire project if it was newly created from text to CAD
|
||||
systemIOActor.send({
|
||||
type: SystemIOMachineEvents.deleteProject,
|
||||
data: {
|
||||
requestedProjectName: rootProjectName,
|
||||
},
|
||||
})
|
||||
} else if (projectName && fileName) {
|
||||
// deletes the folder when inside the modeling page
|
||||
// The TTC Create will make a subdir, delete that dir with the main.kcl as well
|
||||
systemIOActor.send({
|
||||
type: SystemIOMachineEvents.deleteProject,
|
||||
data: {
|
||||
requestedProjectName: projectName,
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -924,7 +924,7 @@ class EngineConnection extends EventTarget {
|
||||
},
|
||||
}
|
||||
|
||||
// This is required for when KCMA is running stand-alone / within desktop app.
|
||||
// This is required for when the app is running stand-alone / within desktop app.
|
||||
// Otherwise when run in a browser, the token is sent implicitly via
|
||||
// the Cookie header.
|
||||
if (this.token) {
|
||||
|
@ -10,12 +10,16 @@ import {
|
||||
kclSamplesManifestWithNoMultipleFiles,
|
||||
} from '@src/lib/kclSamples'
|
||||
import { getUniqueProjectName } from '@src/lib/desktopFS'
|
||||
import { IS_ML_EXPERIMENTAL, PROJECT_ENTRYPOINT } from '@src/lib/constants'
|
||||
import { IS_ML_EXPERIMENTAL } from '@src/lib/constants'
|
||||
import toast from 'react-hot-toast'
|
||||
import { reportRejection } from '@src/lib/trap'
|
||||
import { relevantFileExtensions } from '@src/lang/wasmUtils'
|
||||
import { getStringAfterLastSeparator, webSafePathSplit } from '@src/lib/paths'
|
||||
import { FILE_EXT } from '@src/lib/constants'
|
||||
import {
|
||||
getStringAfterLastSeparator,
|
||||
joinOSPaths,
|
||||
webSafePathSplit,
|
||||
} from '@src/lib/paths'
|
||||
import { getAllSubDirectoriesAtProjectRoot } from '@src/machines/systemIO/snapshotContext'
|
||||
|
||||
function onSubmitKCLSampleCreation({
|
||||
sample,
|
||||
@ -69,20 +73,32 @@ function onSubmitKCLSampleCreation({
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* When adding assemblies to an existing project create the assembly into a unique sub directory
|
||||
*/
|
||||
if (!isProjectNew) {
|
||||
requestedFiles.forEach((requestedFile) => {
|
||||
const subDirectoryName = projectPathPart
|
||||
const firstLevelDirectories = getAllSubDirectoriesAtProjectRoot({
|
||||
projectFolderName: requestedFile.requestedProjectName,
|
||||
})
|
||||
const uniqueSubDirectoryName = getUniqueProjectName(
|
||||
subDirectoryName,
|
||||
firstLevelDirectories
|
||||
)
|
||||
requestedFile.requestedProjectName = joinOSPaths(
|
||||
requestedFile.requestedProjectName,
|
||||
uniqueSubDirectoryName
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
if (requestedFiles.length === 1) {
|
||||
/**
|
||||
* Navigates to the single file that could be renamed on disk for duplicates
|
||||
*/
|
||||
const folderNameBecomesKCLFileName = projectPathPart + FILE_EXT
|
||||
// If the project is new create the single file as main.kcl
|
||||
const requestedFileNameWithExtension = isProjectNew
|
||||
? PROJECT_ENTRYPOINT
|
||||
: folderNameBecomesKCLFileName
|
||||
systemIOActor.send({
|
||||
type: SystemIOMachineEvents.importFileFromURL,
|
||||
data: {
|
||||
requestedProjectName: requestedFiles[0].requestedProjectName,
|
||||
requestedFileNameWithExtension: requestedFileNameWithExtension,
|
||||
requestedFileNameWithExtension: requestedFiles[0].requestedFileName,
|
||||
requestedCode: requestedFiles[0].requestedCode,
|
||||
},
|
||||
})
|
||||
@ -278,10 +294,9 @@ export function createApplicationCommands({
|
||||
return value
|
||||
},
|
||||
options: ({ argumentsToSubmit }) => {
|
||||
const samples =
|
||||
isDesktop() && argumentsToSubmit.method !== 'existingProject'
|
||||
? everyKclSample
|
||||
: kclSamplesManifestWithNoMultipleFiles
|
||||
const samples = isDesktop()
|
||||
? everyKclSample
|
||||
: kclSamplesManifestWithNoMultipleFiles
|
||||
return samples.map((sample) => {
|
||||
return {
|
||||
value: sample.pathFromProjectDirectoryToFirstFile,
|
||||
@ -296,17 +311,10 @@ export function createApplicationCommands({
|
||||
skip: true,
|
||||
options: ({ argumentsToSubmit }, _) => {
|
||||
if (isDesktop() && typeof argumentsToSubmit.sample === 'string') {
|
||||
const kclSample = findKclSample(argumentsToSubmit.sample)
|
||||
if (kclSample && kclSample.files.length > 1) {
|
||||
return [
|
||||
{ name: 'New project', value: 'newProject', isCurrent: true },
|
||||
]
|
||||
} else {
|
||||
return [
|
||||
{ name: 'New project', value: 'newProject', isCurrent: true },
|
||||
{ name: 'Existing project', value: 'existingProject' },
|
||||
]
|
||||
}
|
||||
return [
|
||||
{ name: 'New project', value: 'newProject', isCurrent: true },
|
||||
{ name: 'Existing project', value: 'existingProject' },
|
||||
]
|
||||
} else {
|
||||
return [{ name: 'Overwrite', value: 'existingProject' }]
|
||||
}
|
||||
@ -325,6 +333,7 @@ export function createApplicationCommands({
|
||||
isDesktop() &&
|
||||
commandsContext.argumentsToSubmit.method === 'existingProject',
|
||||
skip: true,
|
||||
defaultValue: isDesktop() ? undefined : 'browser',
|
||||
options: (_, _context) => {
|
||||
const { folders } = systemIOActor.getSnapshot().context
|
||||
const options: CommandArgumentOption<string>[] = []
|
||||
|
@ -478,7 +478,7 @@ export const modelingMachineCommandConfig: StateMachineCommandSetConfig<
|
||||
required: true,
|
||||
defaultValue: 'Axis',
|
||||
options: [
|
||||
{ name: 'Axis', isCurrent: true, value: 'Axis' },
|
||||
{ name: 'Sketch Axis', isCurrent: true, value: 'Axis' },
|
||||
{ name: 'Edge', isCurrent: false, value: 'Edge' },
|
||||
],
|
||||
hidden: (context) => Boolean(context.argumentsToSubmit.nodeToEdit),
|
||||
@ -489,6 +489,7 @@ export const modelingMachineCommandConfig: StateMachineCommandSetConfig<
|
||||
commandContext.argumentsToSubmit.axisOrEdge as string
|
||||
),
|
||||
inputType: 'options',
|
||||
displayName: 'Sketch Axis',
|
||||
options: [
|
||||
{ name: 'X Axis', isCurrent: true, value: 'X' },
|
||||
{ name: 'Y Axis', isCurrent: false, value: 'Y' },
|
||||
|
@ -6,9 +6,9 @@ import {
|
||||
ToastTextToCadError,
|
||||
ToastTextToCadSuccess,
|
||||
} from '@src/components/ToastTextToCad'
|
||||
import { FILE_EXT, PROJECT_ENTRYPOINT } from '@src/lib/constants'
|
||||
import { PROJECT_ENTRYPOINT } from '@src/lib/constants'
|
||||
import crossPlatformFetch from '@src/lib/crossPlatformFetch'
|
||||
import { getNextFileName } from '@src/lib/desktopFS'
|
||||
import { getUniqueProjectName } from '@src/lib/desktopFS'
|
||||
import { isDesktop } from '@src/lib/isDesktop'
|
||||
import { kclManager, systemIOActor } from '@src/lib/singletons'
|
||||
import {
|
||||
@ -17,6 +17,8 @@ import {
|
||||
} from '@src/machines/systemIO/utils'
|
||||
import { reportRejection } from '@src/lib/trap'
|
||||
import { toSync } from '@src/lib/utils'
|
||||
import { getAllSubDirectoriesAtProjectRoot } from '@src/machines/systemIO/snapshotContext'
|
||||
import { joinOSPaths } from '@src/lib/paths'
|
||||
|
||||
export async function submitTextToCadPrompt(
|
||||
prompt: string,
|
||||
@ -173,7 +175,8 @@ export async function submitAndAwaitTextToKclSystemIO({
|
||||
}
|
||||
)
|
||||
|
||||
let newFileName = ''
|
||||
let newFileName = PROJECT_ENTRYPOINT
|
||||
let uniqueProjectName = projectName
|
||||
|
||||
const textToCadOutputCreated = await textToCadComplete
|
||||
.catch((e) => {
|
||||
@ -197,30 +200,28 @@ export async function submitAndAwaitTextToKclSystemIO({
|
||||
|
||||
const TRUNCATED_PROMPT_LENGTH = 24
|
||||
// Only add the prompt name if it is a preexisting project
|
||||
newFileName = `${value.prompt
|
||||
const subDirectoryAsPromptName = `${value.prompt
|
||||
.slice(0, TRUNCATED_PROMPT_LENGTH)
|
||||
.replace(/\s/gi, '-')
|
||||
.replace(/\W/gi, '-')
|
||||
.toLowerCase()}${FILE_EXT}`
|
||||
|
||||
// If the project is new generate a main.kcl
|
||||
if (isProjectNew) {
|
||||
newFileName = PROJECT_ENTRYPOINT
|
||||
}
|
||||
.toLowerCase()}`
|
||||
|
||||
if (isDesktop()) {
|
||||
// We have to preemptively run our unique file name logic,
|
||||
// so that we can pass the unique file name to the toast,
|
||||
// and by extension the file-deletion-on-reject logic.
|
||||
newFileName = getNextFileName({
|
||||
entryName: newFileName,
|
||||
baseDir: projectName,
|
||||
}).name
|
||||
|
||||
if (!isProjectNew) {
|
||||
// If the project is new, use a sub dir
|
||||
const firstLevelDirectories = getAllSubDirectoriesAtProjectRoot({
|
||||
projectFolderName: projectName,
|
||||
})
|
||||
const uniqueSubDirectoryName = getUniqueProjectName(
|
||||
subDirectoryAsPromptName,
|
||||
firstLevelDirectories
|
||||
)
|
||||
uniqueProjectName = joinOSPaths(projectName, uniqueSubDirectoryName)
|
||||
}
|
||||
systemIOActor.send({
|
||||
type: SystemIOMachineEvents.createKCLFile,
|
||||
data: {
|
||||
requestedProjectName: projectName,
|
||||
requestedProjectName: uniqueProjectName,
|
||||
requestedCode: value.code,
|
||||
requestedFileNameWithExtension: newFileName,
|
||||
},
|
||||
@ -251,11 +252,14 @@ export async function submitAndAwaitTextToKclSystemIO({
|
||||
toastId,
|
||||
data: textToCadOutputCreated,
|
||||
token,
|
||||
projectName: projectName,
|
||||
// This can be a subdir within the rootProjectName
|
||||
projectName: uniqueProjectName,
|
||||
fileName: newFileName,
|
||||
navigate,
|
||||
isProjectNew,
|
||||
settings,
|
||||
// This is always the root project name, no subdir
|
||||
rootProjectName: projectName,
|
||||
}),
|
||||
{
|
||||
id: toastId,
|
||||
|
@ -9,6 +9,8 @@ import {
|
||||
orthoScale,
|
||||
quaternionFromUpNForward,
|
||||
} from '@src/clientSideScene/helpers'
|
||||
import type { Setting } from '@src/lib/settings/initialSettings'
|
||||
import type { CameraProjectionType } from '@rust/kcl-lib/bindings/CameraProjectionType'
|
||||
import { DRAFT_DASHED_LINE } from '@src/clientSideScene/sceneConstants'
|
||||
import { DRAFT_POINT } from '@src/clientSideScene/sceneUtils'
|
||||
import { createProfileStartHandle } from '@src/clientSideScene/segments'
|
||||
@ -299,6 +301,7 @@ export type SegmentOverlayPayload =
|
||||
export interface Store {
|
||||
videoElement?: HTMLVideoElement
|
||||
openPanes: SidebarType[]
|
||||
cameraProjection?: Setting<CameraProjectionType>
|
||||
}
|
||||
|
||||
export type SketchTool =
|
||||
@ -333,7 +336,6 @@ export type ModelingMachineEvent =
|
||||
}
|
||||
| { type: 'Sketch no face' }
|
||||
| { type: 'Cancel'; cleanup?: () => void }
|
||||
| { type: 'CancelSketch' }
|
||||
| {
|
||||
type: 'Add start point' | 'Continue existing profile'
|
||||
data: {
|
||||
@ -856,10 +858,6 @@ export const modelingMachine = setup({
|
||||
sketchDetails: event.output,
|
||||
}
|
||||
}),
|
||||
'tear down client sketch': () => {
|
||||
sceneEntitiesManager.tearDownSketch({ removeAxis: false })
|
||||
},
|
||||
'remove sketch grid': () => sceneEntitiesManager.removeSketchGrid(),
|
||||
'set up draft line': assign(({ context: { sketchDetails }, event }) => {
|
||||
if (!sketchDetails) return {}
|
||||
if (event.type !== 'Add start point') return {}
|
||||
@ -1200,9 +1198,6 @@ export const modelingMachine = setup({
|
||||
'clientToEngine cam sync direction': () => {
|
||||
sceneInfra.camControls.syncDirection = 'clientToEngine'
|
||||
},
|
||||
'engineToClient cam sync direction': () => {
|
||||
sceneInfra.camControls.syncDirection = 'engineToClient'
|
||||
},
|
||||
/** TODO: this action is hiding unawaited asynchronous code */
|
||||
'set selection filter to faces only': () => {
|
||||
kclManager.setSelectionFilter(['face', 'object'])
|
||||
@ -1223,7 +1218,6 @@ export const modelingMachine = setup({
|
||||
return codeManager.updateEditorWithAstAndWriteToFile(kclManager.ast)
|
||||
})
|
||||
},
|
||||
'Reset Segment Overlays': () => sceneEntitiesManager.resetOverlays(),
|
||||
'Set context': assign({
|
||||
store: ({ context: { store }, event }) => {
|
||||
if (event.type !== 'Set context') return store
|
||||
@ -1542,7 +1536,6 @@ export const modelingMachine = setup({
|
||||
'Center camera on selection': () => {},
|
||||
'Submit to Text-to-CAD API': () => {},
|
||||
'Set sketchDetails': () => {},
|
||||
'sketch exit execute': () => {},
|
||||
'debug-action': (data) => {
|
||||
console.log('re-eval debug-action', data)
|
||||
},
|
||||
@ -1610,6 +1603,45 @@ export const modelingMachine = setup({
|
||||
},
|
||||
// end actions
|
||||
actors: {
|
||||
sketchExit: fromPromise(
|
||||
async (args: { input: { context: { store: Store } } }) => {
|
||||
const store = args.input.context.store
|
||||
|
||||
// When cancelling the sketch mode we should disable sketch mode within the engine.
|
||||
await engineCommandManager.sendSceneCommand({
|
||||
type: 'modeling_cmd_req',
|
||||
cmd_id: uuidv4(),
|
||||
cmd: { type: 'sketch_mode_disable' },
|
||||
})
|
||||
|
||||
sceneInfra.camControls.syncDirection = 'clientToEngine'
|
||||
|
||||
if (store.cameraProjection?.current === 'perspective') {
|
||||
await sceneInfra.camControls.snapToPerspectiveBeforeHandingBackControlToEngine()
|
||||
}
|
||||
|
||||
sceneInfra.camControls.syncDirection = 'engineToClient'
|
||||
|
||||
// TODO: Re-evaluate if this pause/play logic is needed.
|
||||
store.videoElement?.pause()
|
||||
|
||||
await kclManager
|
||||
.executeCode()
|
||||
.then(() => {
|
||||
if (engineCommandManager.idleMode) return
|
||||
|
||||
store.videoElement?.play().catch((e: Error) => {
|
||||
console.warn('Video playing was prevented', e)
|
||||
})
|
||||
})
|
||||
.catch(reportRejection)
|
||||
|
||||
sceneEntitiesManager.tearDownSketch({ removeAxis: false })
|
||||
sceneEntitiesManager.removeSketchGrid()
|
||||
sceneInfra.camControls.syncDirection = 'engineToClient'
|
||||
sceneEntitiesManager.resetOverlays()
|
||||
}
|
||||
),
|
||||
/* Below are all the do-constrain sketch actors,
|
||||
* which aren't using updateModelingState and don't have the 'no kcl errors' guard yet */
|
||||
'do-constrain-remove-constraint': fromPromise(
|
||||
@ -4194,22 +4226,29 @@ export const modelingMachine = setup({
|
||||
},
|
||||
|
||||
'undo startSketchOn': {
|
||||
invoke: {
|
||||
src: 'AST-undo-startSketchOn',
|
||||
id: 'AST-undo-startSketchOn',
|
||||
input: ({ context: { sketchDetails } }) => ({ sketchDetails }),
|
||||
|
||||
onDone: {
|
||||
target: '#Modeling.idle',
|
||||
actions: 'enter modeling mode',
|
||||
reenter: true,
|
||||
invoke: [
|
||||
{
|
||||
id: 'sketchExit',
|
||||
src: 'sketchExit',
|
||||
input: ({ context }) => ({ context }),
|
||||
},
|
||||
{
|
||||
src: 'AST-undo-startSketchOn',
|
||||
id: 'AST-undo-startSketchOn',
|
||||
input: ({ context: { sketchDetails } }) => ({ sketchDetails }),
|
||||
|
||||
onError: {
|
||||
target: '#Modeling.idle',
|
||||
reenter: true,
|
||||
onDone: {
|
||||
target: '#Modeling.idle',
|
||||
actions: 'enter modeling mode',
|
||||
reenter: true,
|
||||
},
|
||||
|
||||
onError: {
|
||||
target: '#Modeling.idle',
|
||||
reenter: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
'Rectangle tool': {
|
||||
@ -4927,7 +4966,6 @@ export const modelingMachine = setup({
|
||||
|
||||
on: {
|
||||
Cancel: '.undo startSketchOn',
|
||||
CancelSketch: '.SketchIdle',
|
||||
|
||||
'Delete segment': {
|
||||
reenter: false,
|
||||
@ -4940,14 +4978,7 @@ export const modelingMachine = setup({
|
||||
},
|
||||
},
|
||||
|
||||
exit: [
|
||||
'sketch exit execute',
|
||||
'tear down client sketch',
|
||||
'remove sketch grid',
|
||||
'engineToClient cam sync direction',
|
||||
'Reset Segment Overlays',
|
||||
'enable copilot',
|
||||
],
|
||||
exit: ['enable copilot'],
|
||||
|
||||
entry: ['add axis n grid', 'clientToEngine cam sync direction'],
|
||||
},
|
||||
|