Compare commits
57 Commits
jtran/plus
...
achalmers/
Author | SHA1 | Date | |
---|---|---|---|
de74c4eae0 | |||
8972ddb640 | |||
8a62869d1d | |||
033687924a | |||
92ed9e445d | |||
2c2974c082 | |||
999897102c | |||
ac69b1263f | |||
026e45895e | |||
220a49b52b | |||
e9862e7677 | |||
99cb8d3eb0 | |||
4e2a200bdf | |||
d95d4d7f66 | |||
5edfae961e | |||
6075aa1d07 | |||
75f996e0ef | |||
d29d2d4a11 | |||
33287d540d | |||
66fe3c7892 | |||
3085b0c2c7 | |||
ff884153db | |||
bcd52a43ca | |||
83ee6511be | |||
c1ff258bf9 | |||
1469c685c0 | |||
b2fea24fc4 | |||
1829c1047a | |||
d5c7a1cef3 | |||
23ea59cf58 | |||
3d6fb4e6e6 | |||
157ee93032 | |||
6c4c59ced9 | |||
925cc892a7 | |||
08ae896b65 | |||
2073df8a3f | |||
743732ba15 | |||
b8525ccd61 | |||
0188d6c065 | |||
ddc7d5b20a | |||
81c2be78bb | |||
0f85e85c57 | |||
55a302bd75 | |||
21e710ee41 | |||
bb51c8d269 | |||
d9d970b436 | |||
1e9a2e3a1a | |||
e9ca2469c5 | |||
1248623922 | |||
49ba5d31c7 | |||
af7d0e6b66 | |||
004898e0c7 | |||
e7457dac0d | |||
a8d76950d0 | |||
2ac836c0b8 | |||
25c73aae6c | |||
65682e755a |
File diff suppressed because one or more lines are too long
@ -33,7 +33,14 @@ helix(revolutions: number, angle_start: number, ccw?: bool, radius: number, axis
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
// Create a helix around the Z axis.
|
// Create a helix around the Z axis.
|
||||||
helixPath = helix(angleStart = 0, ccw = true, revolutions = 5, length = 10, radius = 5, axis = 'Z')
|
helixPath = helix(
|
||||||
|
angleStart = 0,
|
||||||
|
ccw = true,
|
||||||
|
revolutions = 5,
|
||||||
|
length = 10,
|
||||||
|
radius = 5,
|
||||||
|
axis = 'Z',
|
||||||
|
)
|
||||||
|
|
||||||
// Create a spring by sweeping around the helix path.
|
// Create a spring by sweeping around the helix path.
|
||||||
springSketch = startSketchOn('YZ')
|
springSketch = startSketchOn('YZ')
|
||||||
@ -49,7 +56,14 @@ helper001 = startSketchOn('XZ')
|
|||||||
|> startProfileAt([0, 0], %)
|
|> startProfileAt([0, 0], %)
|
||||||
|> line(end = [0, 10], tag = $edge001)
|
|> line(end = [0, 10], tag = $edge001)
|
||||||
|
|
||||||
helixPath = helix(angleStart = 0, ccw = true, revolutions = 5, length = 10, radius = 5, axis = edge001)
|
helixPath = helix(
|
||||||
|
angleStart = 0,
|
||||||
|
ccw = true,
|
||||||
|
revolutions = 5,
|
||||||
|
length = 10,
|
||||||
|
radius = 5,
|
||||||
|
axis = edge001,
|
||||||
|
)
|
||||||
|
|
||||||
// Create a spring by sweeping around the helix path.
|
// Create a spring by sweeping around the helix path.
|
||||||
springSketch = startSketchOn('XY')
|
springSketch = startSketchOn('XY')
|
||||||
@ -61,12 +75,19 @@ springSketch = startSketchOn('XY')
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
// Create a helix around a custom axis.
|
// Create a helix around a custom axis.
|
||||||
helixPath = helix(angleStart = 0, ccw = true, revolutions = 5, length = 10, radius = 5, axis = {
|
helixPath = helix(
|
||||||
|
angleStart = 0,
|
||||||
|
ccw = true,
|
||||||
|
revolutions = 5,
|
||||||
|
length = 10,
|
||||||
|
radius = 5,
|
||||||
|
axis = {
|
||||||
custom = {
|
custom = {
|
||||||
axis = [0, 0, 1.0],
|
axis = [0, 0, 1.0],
|
||||||
origin = [0, 0.25, 0]
|
origin = [0, 0.25, 0]
|
||||||
}
|
}
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
|
||||||
// Create a spring by sweeping around the helix path.
|
// Create a spring by sweeping around the helix path.
|
||||||
springSketch = startSketchOn('XY')
|
springSketch = startSketchOn('XY')
|
||||||
|
File diff suppressed because one or more lines are too long
@ -9,7 +9,7 @@ Repeat a 2-dimensional sketch some number of times along a partial or
|
|||||||
complete circle some specified number of times. Each object may additionally be rotated along the circle, ensuring orentation of the solid with respect to the center of the circle is maintained.
|
complete circle some specified number of times. Each object may additionally be rotated along the circle, ensuring orentation of the solid with respect to the center of the circle is maintained.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
patternCircular2d(data: CircularPattern2dData, sketch_set: SketchSet) -> [Sketch]
|
patternCircular2d(sketch_set: SketchSet, instances: integer, center: [number], arc_degrees: number, rotate_duplicates: bool, use_original?: bool) -> [Sketch]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -17,8 +17,12 @@ patternCircular2d(data: CircularPattern2dData, sketch_set: SketchSet) -> [Sketch
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `data` | [`CircularPattern2dData`](/docs/kcl/types/CircularPattern2dData) | Data for a circular pattern on a 2D sketch. | Yes |
|
| `sketch_set` | [`SketchSet`](/docs/kcl/types/SketchSet) | Which sketch(es) to pattern | Yes |
|
||||||
| `sketch_set` | [`SketchSet`](/docs/kcl/types/SketchSet) | A sketch or a group of sketches. | Yes |
|
| `instances` | `integer` | The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect. | Yes |
|
||||||
|
| `center` | `[number]` | The center about which to make the pattern. This is a 2D vector. | Yes |
|
||||||
|
| `arc_degrees` | `number` | The arc angle (in degrees) to place the repetitions. Must be greater than 0. | Yes |
|
||||||
|
| `rotate_duplicates` | `bool` | Whether or not to rotate the duplicates as they are copied. | Yes |
|
||||||
|
| `use_original` | `bool` | If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false. | No |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
@ -34,12 +38,12 @@ exampleSketch = startSketchOn('XZ')
|
|||||||
|> line(end = [-1, 0])
|
|> line(end = [-1, 0])
|
||||||
|> line(end = [0, -5])
|
|> line(end = [0, -5])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternCircular2d({
|
|> patternCircular2d(
|
||||||
center = [0, 0],
|
center = [0, 0],
|
||||||
instances = 13,
|
instances = 13,
|
||||||
arcDegrees = 360,
|
arcDegrees = 360,
|
||||||
rotateDuplicates = true
|
rotateDuplicates = true,
|
||||||
}, %)
|
)
|
||||||
|
|
||||||
example = extrude(exampleSketch, length = 1)
|
example = extrude(exampleSketch, length = 1)
|
||||||
```
|
```
|
||||||
|
File diff suppressed because one or more lines are too long
@ -9,7 +9,7 @@ Repeat a 2-dimensional sketch along some dimension, with a dynamic amount
|
|||||||
of distance between each repetition, some specified number of times.
|
of distance between each repetition, some specified number of times.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
patternLinear2d(data: LinearPattern2dData, sketch_set: SketchSet, use_original?: bool) -> [Sketch]
|
patternLinear2d(sketch_set: SketchSet, instances: integer, distance: number, axis: [number], use_original?: bool) -> [Sketch]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -17,9 +17,11 @@ patternLinear2d(data: LinearPattern2dData, sketch_set: SketchSet, use_original?:
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `data` | [`LinearPattern2dData`](/docs/kcl/types/LinearPattern2dData) | Data for a linear pattern on a 2D sketch. | Yes |
|
| `sketch_set` | [`SketchSet`](/docs/kcl/types/SketchSet) | The sketch(es) to duplicate | Yes |
|
||||||
| `sketch_set` | [`SketchSet`](/docs/kcl/types/SketchSet) | A sketch or a group of sketches. | Yes |
|
| `instances` | `integer` | The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect. | Yes |
|
||||||
| `use_original` | `bool` | | No |
|
| `distance` | `number` | Distance between each repetition. Also known as 'spacing'. | Yes |
|
||||||
|
| `axis` | `[number]` | The axis of the pattern. A 2D vector. | Yes |
|
||||||
|
| `use_original` | `bool` | If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false. | No |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
@ -31,11 +33,7 @@ patternLinear2d(data: LinearPattern2dData, sketch_set: SketchSet, use_original?:
|
|||||||
```js
|
```js
|
||||||
exampleSketch = startSketchOn('XZ')
|
exampleSketch = startSketchOn('XZ')
|
||||||
|> circle({ center = [0, 0], radius = 1 }, %)
|
|> circle({ center = [0, 0], radius = 1 }, %)
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(axis = [1, 0], instances = 7, distance = 4)
|
||||||
axis = [1, 0],
|
|
||||||
instances = 7,
|
|
||||||
distance = 4
|
|
||||||
}, %)
|
|
||||||
|
|
||||||
example = extrude(exampleSketch, length = 1)
|
example = extrude(exampleSketch, length = 1)
|
||||||
```
|
```
|
||||||
|
File diff suppressed because one or more lines are too long
25286
docs/kcl/std.json
25286
docs/kcl/std.json
File diff suppressed because it is too large
Load Diff
@ -59,7 +59,14 @@ sweepSketch = startSketchOn('XY')
|
|||||||
|
|
||||||
|
|
||||||
// Create a helix around the Z axis.
|
// Create a helix around the Z axis.
|
||||||
helixPath = helix(angleStart = 0, ccw = true, revolutions = 4, length = 10, radius = 5, axis = 'Z')
|
helixPath = helix(
|
||||||
|
angleStart = 0,
|
||||||
|
ccw = true,
|
||||||
|
revolutions = 4,
|
||||||
|
length = 10,
|
||||||
|
radius = 5,
|
||||||
|
axis = 'Z',
|
||||||
|
)
|
||||||
|
|
||||||
// Create a spring by sweeping around the helix path.
|
// Create a spring by sweeping around the helix path.
|
||||||
springSketch = startSketchOn('YZ')
|
springSketch = startSketchOn('YZ')
|
||||||
|
@ -19,6 +19,8 @@ test.describe(
|
|||||||
await page.setBodyDimensions({ width: 1200, height: 500 })
|
await page.setBodyDimensions({ width: 1200, height: 500 })
|
||||||
|
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
// FIXME: Cannot use scene.waitForExecutionDone() since there is no KCL code
|
||||||
|
await page.waitForTimeout(10000)
|
||||||
await u.openDebugPanel()
|
await u.openDebugPanel()
|
||||||
|
|
||||||
const coord =
|
const coord =
|
||||||
|
@ -10,6 +10,7 @@ test.describe('Code pane and errors', { tag: ['@skipWin'] }, () => {
|
|||||||
test('Typing KCL errors induces a badge on the code pane button', async ({
|
test('Typing KCL errors induces a badge on the code pane button', async ({
|
||||||
page,
|
page,
|
||||||
homePage,
|
homePage,
|
||||||
|
scene,
|
||||||
}) => {
|
}) => {
|
||||||
const u = await getUtils(page)
|
const u = await getUtils(page)
|
||||||
|
|
||||||
@ -30,11 +31,7 @@ test.describe('Code pane and errors', { tag: ['@skipWin'] }, () => {
|
|||||||
|
|
||||||
await page.setBodyDimensions({ width: 1200, height: 500 })
|
await page.setBodyDimensions({ width: 1200, height: 500 })
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
await scene.waitForExecutionDone()
|
||||||
// wait for execution done
|
|
||||||
await u.openDebugPanel()
|
|
||||||
await u.expectCmdLog('[data-message-type="execution-done"]')
|
|
||||||
await u.closeDebugPanel()
|
|
||||||
|
|
||||||
// Ensure no badge is present
|
// Ensure no badge is present
|
||||||
const codePaneButtonHolder = page.locator('#code-button-holder')
|
const codePaneButtonHolder = page.locator('#code-button-holder')
|
||||||
@ -175,7 +172,9 @@ test.describe('Code pane and errors', { tag: ['@skipWin'] }, () => {
|
|||||||
await page.setBodyDimensions({ width: 1200, height: 500 })
|
await page.setBodyDimensions({ width: 1200, height: 500 })
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
|
||||||
await page.waitForTimeout(1000)
|
// FIXME: await scene.waitForExecutionDone() does not work. It still fails.
|
||||||
|
// I needed to increase this timeout to get this to pass.
|
||||||
|
await page.waitForTimeout(10000)
|
||||||
|
|
||||||
// Ensure badge is present
|
// Ensure badge is present
|
||||||
const codePaneButtonHolder = page.locator('#code-button-holder')
|
const codePaneButtonHolder = page.locator('#code-button-holder')
|
||||||
@ -187,7 +186,7 @@ test.describe('Code pane and errors', { tag: ['@skipWin'] }, () => {
|
|||||||
// click in the editor to focus it
|
// click in the editor to focus it
|
||||||
await page.locator('.cm-content').click()
|
await page.locator('.cm-content').click()
|
||||||
|
|
||||||
await page.waitForTimeout(500)
|
await page.waitForTimeout(2000)
|
||||||
|
|
||||||
// go to the start of the editor and enter more text which will trigger
|
// go to the start of the editor and enter more text which will trigger
|
||||||
// a lint error.
|
// a lint error.
|
||||||
@ -204,8 +203,9 @@ test.describe('Code pane and errors', { tag: ['@skipWin'] }, () => {
|
|||||||
await page.keyboard.press('ArrowUp')
|
await page.keyboard.press('ArrowUp')
|
||||||
await page.keyboard.press('Home')
|
await page.keyboard.press('Home')
|
||||||
await page.keyboard.type('foo_bar = 1')
|
await page.keyboard.type('foo_bar = 1')
|
||||||
await page.waitForTimeout(500)
|
await page.waitForTimeout(2000)
|
||||||
await page.keyboard.press('Enter')
|
await page.keyboard.press('Enter')
|
||||||
|
await page.waitForTimeout(2000)
|
||||||
|
|
||||||
// ensure we have a lint error
|
// ensure we have a lint error
|
||||||
await expect(page.locator('.cm-lint-marker-info').first()).toBeVisible()
|
await expect(page.locator('.cm-lint-marker-info').first()).toBeVisible()
|
||||||
|
@ -174,6 +174,9 @@ test.describe('Command bar tests', { tag: ['@skipWin'] }, () => {
|
|||||||
await page.setBodyDimensions({ width: 1200, height: 500 })
|
await page.setBodyDimensions({ width: 1200, height: 500 })
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
|
||||||
|
// FIXME: No KCL code, unable to wait for engine execution
|
||||||
|
await page.waitForTimeout(10000)
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole('button', { name: 'Start Sketch' })
|
page.getByRole('button', { name: 'Start Sketch' })
|
||||||
).not.toBeDisabled()
|
).not.toBeDisabled()
|
||||||
|
@ -9,8 +9,8 @@ import fsp from 'fs/promises'
|
|||||||
|
|
||||||
test(
|
test(
|
||||||
'export works on the first try',
|
'export works on the first try',
|
||||||
{ tag: '@electron' },
|
{ tag: ['@electron', '@skipLocalEngine'] },
|
||||||
async ({ page, context }, testInfo) => {
|
async ({ page, context, scene }, testInfo) => {
|
||||||
await context.folderSetupFn(async (dir) => {
|
await context.folderSetupFn(async (dir) => {
|
||||||
const bracketDir = path.join(dir, 'bracket')
|
const bracketDir = path.join(dir, 'bracket')
|
||||||
await Promise.all([fsp.mkdir(bracketDir, { recursive: true })])
|
await Promise.all([fsp.mkdir(bracketDir, { recursive: true })])
|
||||||
@ -118,8 +118,9 @@ test(
|
|||||||
// Close the file pane
|
// Close the file pane
|
||||||
await u.closeFilePanel()
|
await u.closeFilePanel()
|
||||||
|
|
||||||
// wait for it to finish executing (todo: make this more robust)
|
// FIXME: await scene.waitForExecutionDone() does not work. The modeling indicator stays in -receive-reliable and not execution done
|
||||||
await page.waitForTimeout(1000)
|
await page.waitForTimeout(10000)
|
||||||
|
|
||||||
// expect zero errors in guter
|
// expect zero errors in guter
|
||||||
await expect(page.locator('.cm-lint-marker-error')).not.toBeVisible()
|
await expect(page.locator('.cm-lint-marker-error')).not.toBeVisible()
|
||||||
|
|
||||||
|
@ -490,6 +490,11 @@ test.describe('Editor tests', { tag: ['@skipWin'] }, () => {
|
|||||||
await page.keyboard.press('ArrowLeft')
|
await page.keyboard.press('ArrowLeft')
|
||||||
await page.keyboard.press('ArrowRight')
|
await page.keyboard.press('ArrowRight')
|
||||||
|
|
||||||
|
// FIXME: lsp errors do not propagate to the frontend until engine is connected and code is executed
|
||||||
|
// This timeout is to wait for engine connection. LSP and code execution errors should be handled differently
|
||||||
|
// LSP can emit errors as fast as it waits and show them in the editor
|
||||||
|
await page.waitForTimeout(10000)
|
||||||
|
|
||||||
// error in guter
|
// error in guter
|
||||||
await expect(page.locator('.cm-lint-marker-info').first()).toBeVisible()
|
await expect(page.locator('.cm-lint-marker-info').first()).toBeVisible()
|
||||||
|
|
||||||
@ -641,7 +646,7 @@ test.describe('Editor tests', { tag: ['@skipWin'] }, () => {
|
|||||||
width = 0.500
|
width = 0.500
|
||||||
height = 0.500
|
height = 0.500
|
||||||
dia = 4
|
dia = 4
|
||||||
|
|
||||||
fn squareHole = (l, w) => {
|
fn squareHole = (l, w) => {
|
||||||
squareHoleSketch = startSketchOn('XY')
|
squareHoleSketch = startSketchOn('XY')
|
||||||
|> startProfileAt([-width / 2, -length / 2], %)
|
|> startProfileAt([-width / 2, -length / 2], %)
|
||||||
@ -714,7 +719,7 @@ test.describe('Editor tests', { tag: ['@skipWin'] }, () => {
|
|||||||
|> line(end = [0, -10], tag = $revolveAxis)
|
|> line(end = [0, -10], tag = $revolveAxis)
|
||||||
|> close()
|
|> close()
|
||||||
|> extrude(length = 10)
|
|> extrude(length = 10)
|
||||||
|
|
||||||
sketch001 = startSketchOn(box, revolveAxis)
|
sketch001 = startSketchOn(box, revolveAxis)
|
||||||
|> startProfileAt([5, 10], %)
|
|> startProfileAt([5, 10], %)
|
||||||
|> line(end = [0, -10])
|
|> line(end = [0, -10])
|
||||||
|
@ -112,6 +112,9 @@ export class CmdBarFixture {
|
|||||||
* and assumes we are past the `pickCommand` step.
|
* and assumes we are past the `pickCommand` step.
|
||||||
*/
|
*/
|
||||||
progressCmdBar = async (shouldFuzzProgressMethod = true) => {
|
progressCmdBar = async (shouldFuzzProgressMethod = true) => {
|
||||||
|
// FIXME: Progressing the command bar is a race condition. We have an async useEffect that reports the final state via useCalculateKclExpression. If this does not run quickly enough, it will not "fail" the continue because you can press continue if the state is not ready. E2E tests do not know this.
|
||||||
|
// Wait 1250ms to assume the await executeAst of the KCL input field is finished
|
||||||
|
await this.page.waitForTimeout(1250)
|
||||||
if (shouldFuzzProgressMethod || Math.random() > 0.5) {
|
if (shouldFuzzProgressMethod || Math.random() > 0.5) {
|
||||||
const arrowButton = this.page.getByRole('button', {
|
const arrowButton = this.page.getByRole('button', {
|
||||||
name: 'arrow right Continue',
|
name: 'arrow right Continue',
|
||||||
@ -128,6 +131,23 @@ export class CmdBarFixture {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Added data-testid to the command bar buttons
|
||||||
|
// command-bar-continue are the buttons to go to the next step
|
||||||
|
// does not include the submit which is the final button press
|
||||||
|
// aka the right arrow button
|
||||||
|
continue = async () => {
|
||||||
|
const continueButton = this.page.getByTestId('command-bar-continue')
|
||||||
|
await continueButton.click()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Added data-testid to the command bar buttons
|
||||||
|
// command-bar-submit is the button for the final step to submit
|
||||||
|
// the command bar flow aka the checkmark button.
|
||||||
|
submit = async () => {
|
||||||
|
const submitButton = this.page.getByTestId('command-bar-submit')
|
||||||
|
await submitButton.click()
|
||||||
|
}
|
||||||
|
|
||||||
openCmdBar = async (selectCmd?: 'promptToEdit') => {
|
openCmdBar = async (selectCmd?: 'promptToEdit') => {
|
||||||
// TODO why does this button not work in electron tests?
|
// TODO why does this button not work in electron tests?
|
||||||
// await this.cmdBarOpenBtn.click()
|
// await this.cmdBarOpenBtn.click()
|
||||||
|
@ -29,11 +29,13 @@ test.describe('Point-and-click tests', { tag: ['@skipWin'] }, () => {
|
|||||||
localStorage.setItem('persistCode', file)
|
localStorage.setItem('persistCode', file)
|
||||||
}, file)
|
}, file)
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
await scene.waitForExecutionDone()
|
||||||
|
|
||||||
const [clickCircle, moveToCircle] = scene.makeMouseHelpers(582, 217)
|
const [clickCircle, moveToCircle] = scene.makeMouseHelpers(582, 217)
|
||||||
|
|
||||||
await test.step('because there is sweepable geometry, verify extrude is enable when nothing is selected', async () => {
|
await test.step('because there is sweepable geometry, verify extrude is enable when nothing is selected', async () => {
|
||||||
await scene.clickNoWhere()
|
// FIXME: Do not click, clicking removes the activeLines in future checks
|
||||||
|
// await scene.clickNoWhere()
|
||||||
await expect(toolbar.extrudeButton).toBeEnabled()
|
await expect(toolbar.extrudeButton).toBeEnabled()
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -199,6 +201,7 @@ test.describe('Point-and-click tests', { tag: ['@skipWin'] }, () => {
|
|||||||
}, file)
|
}, file)
|
||||||
await page.setBodyDimensions({ width: 1000, height: 500 })
|
await page.setBodyDimensions({ width: 1000, height: 500 })
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
await scene.waitForExecutionDone()
|
||||||
|
|
||||||
const sketchOnAChamfer = _sketchOnAChamfer(page, editor, toolbar, scene)
|
const sketchOnAChamfer = _sketchOnAChamfer(page, editor, toolbar, scene)
|
||||||
|
|
||||||
@ -422,6 +425,7 @@ test.describe('Point-and-click tests', { tag: ['@skipWin'] }, () => {
|
|||||||
}, file)
|
}, file)
|
||||||
await page.setBodyDimensions({ width: 1000, height: 500 })
|
await page.setBodyDimensions({ width: 1000, height: 500 })
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
await scene.waitForExecutionDone()
|
||||||
|
|
||||||
const sketchOnAChamfer = _sketchOnAChamfer(page, editor, toolbar, scene)
|
const sketchOnAChamfer = _sketchOnAChamfer(page, editor, toolbar, scene)
|
||||||
|
|
||||||
@ -727,6 +731,9 @@ openSketch = startSketchOn('XY')
|
|||||||
const expectedOutput = `plane001 = offsetPlane('XZ', 5)`
|
const expectedOutput = `plane001 = offsetPlane('XZ', 5)`
|
||||||
|
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
// FIXME: Since there is no KCL code loaded. We need to wait for the scene to load before we continue.
|
||||||
|
// The engine may not be connected
|
||||||
|
await page.waitForTimeout(15000)
|
||||||
|
|
||||||
await test.step(`Look for the blue of the XZ plane`, async () => {
|
await test.step(`Look for the blue of the XZ plane`, async () => {
|
||||||
await scene.expectPixelColor([50, 51, 96], testPoint, 15)
|
await scene.expectPixelColor([50, 51, 96], testPoint, 15)
|
||||||
@ -952,6 +959,7 @@ loft001 = loft([sketch001, sketch002])
|
|||||||
}, initialCode)
|
}, initialCode)
|
||||||
await page.setBodyDimensions({ width: 1000, height: 500 })
|
await page.setBodyDimensions({ width: 1000, height: 500 })
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
await scene.waitForExecutionDone()
|
||||||
|
|
||||||
// One dumb hardcoded screen pixel value
|
// One dumb hardcoded screen pixel value
|
||||||
const testPoint = { x: 575, y: 200 }
|
const testPoint = { x: 575, y: 200 }
|
||||||
@ -1594,16 +1602,7 @@ extrude001 = extrude(sketch001, length = -12)
|
|||||||
}, initialCode)
|
}, initialCode)
|
||||||
await page.setBodyDimensions({ width: 1000, height: 500 })
|
await page.setBodyDimensions({ width: 1000, height: 500 })
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
await scene.waitForExecutionDone()
|
||||||
// verify modeling scene is loaded
|
|
||||||
await scene.expectPixelColor(
|
|
||||||
backgroundColor,
|
|
||||||
secondEdgeLocation,
|
|
||||||
lowTolerance
|
|
||||||
)
|
|
||||||
|
|
||||||
// wait for stream to load
|
|
||||||
await scene.expectPixelColor(bodyColor, bodyLocation, highTolerance)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// Test 1: Command bar flow with preselected edges
|
// Test 1: Command bar flow with preselected edges
|
||||||
@ -1828,6 +1827,7 @@ chamfer04 = chamfer({ length = 5, tags = [getOppositeEdge(seg02)]}, extrude001
|
|||||||
}, initialCode)
|
}, initialCode)
|
||||||
await page.setBodyDimensions({ width: 1000, height: 500 })
|
await page.setBodyDimensions({ width: 1000, height: 500 })
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
await scene.waitForExecutionDone()
|
||||||
|
|
||||||
// verify modeling scene is loaded
|
// verify modeling scene is loaded
|
||||||
await scene.expectPixelColor(
|
await scene.expectPixelColor(
|
||||||
@ -1950,6 +1950,7 @@ chamfer04 = chamfer({ length = 5, tags = [getOppositeEdge(seg02)]}, extrude001
|
|||||||
}, initialCode)
|
}, initialCode)
|
||||||
await page.setBodyDimensions({ width: 1000, height: 500 })
|
await page.setBodyDimensions({ width: 1000, height: 500 })
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
await scene.waitForExecutionDone()
|
||||||
|
|
||||||
// One dumb hardcoded screen pixel value
|
// One dumb hardcoded screen pixel value
|
||||||
const testPoint = { x: 575, y: 200 }
|
const testPoint = { x: 575, y: 200 }
|
||||||
@ -2048,6 +2049,7 @@ extrude001 = extrude(sketch001, length = 40)
|
|||||||
}, initialCode)
|
}, initialCode)
|
||||||
await page.setBodyDimensions({ width: 1000, height: 500 })
|
await page.setBodyDimensions({ width: 1000, height: 500 })
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
await scene.waitForExecutionDone()
|
||||||
|
|
||||||
// One dumb hardcoded screen pixel value
|
// One dumb hardcoded screen pixel value
|
||||||
const testPoint = { x: 580, y: 180 }
|
const testPoint = { x: 580, y: 180 }
|
||||||
|
@ -455,7 +455,7 @@ test.describe('Can export from electron app', () => {
|
|||||||
for (const method of exportMethods) {
|
for (const method of exportMethods) {
|
||||||
test(
|
test(
|
||||||
`Can export using ${method}`,
|
`Can export using ${method}`,
|
||||||
{ tag: '@electron' },
|
{ tag: ['@electron', '@skipLocalEngine'] },
|
||||||
async ({ context, page }, testInfo) => {
|
async ({ context, page }, testInfo) => {
|
||||||
await context.folderSetupFn(async (dir) => {
|
await context.folderSetupFn(async (dir) => {
|
||||||
const bracketDir = path.join(dir, 'bracket')
|
const bracketDir = path.join(dir, 'bracket')
|
||||||
|
@ -60,6 +60,7 @@ test.describe('Prompt-to-edit tests', { tag: '@skipWin' }, () => {
|
|||||||
localStorage.setItem('persistCode', file)
|
localStorage.setItem('persistCode', file)
|
||||||
}, file)
|
}, file)
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
await scene.waitForExecutionDone()
|
||||||
|
|
||||||
const body1CapCoords = { x: 571, y: 351 }
|
const body1CapCoords = { x: 571, y: 351 }
|
||||||
const greenCheckCoords = { x: 565, y: 345 }
|
const greenCheckCoords = { x: 565, y: 345 }
|
||||||
@ -76,7 +77,9 @@ test.describe('Prompt-to-edit tests', { tag: '@skipWin' }, () => {
|
|||||||
'Submitting to Text-to-CAD API...'
|
'Submitting to Text-to-CAD API...'
|
||||||
)
|
)
|
||||||
const successToast = page.getByText('Prompt to edit successful')
|
const successToast = page.getByText('Prompt to edit successful')
|
||||||
const acceptBtn = page.getByRole('button', { name: 'checkmark Accept' })
|
const acceptBtn = page.getByRole('button', {
|
||||||
|
name: 'checkmark Accept',
|
||||||
|
})
|
||||||
const rejectBtn = page.getByRole('button', { name: 'close Reject' })
|
const rejectBtn = page.getByRole('button', { name: 'close Reject' })
|
||||||
|
|
||||||
await test.step('wait for scene to load select body and check selection came through', async () => {
|
await test.step('wait for scene to load select body and check selection came through', async () => {
|
||||||
@ -99,7 +102,9 @@ test.describe('Prompt-to-edit tests', { tag: '@skipWin' }, () => {
|
|||||||
await page.waitForTimeout(100)
|
await page.waitForTimeout(100)
|
||||||
await cmdBar.progressCmdBar()
|
await cmdBar.progressCmdBar()
|
||||||
await expect(submittingToast).toBeVisible()
|
await expect(submittingToast).toBeVisible()
|
||||||
await expect(submittingToast).not.toBeVisible({ timeout: 2 * 60_000 }) // can take a while
|
await expect(submittingToast).not.toBeVisible({
|
||||||
|
timeout: 2 * 60_000,
|
||||||
|
}) // can take a while
|
||||||
await expect(successToast).toBeVisible()
|
await expect(successToast).toBeVisible()
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -150,6 +155,7 @@ test.describe('Prompt-to-edit tests', { tag: '@skipWin' }, () => {
|
|||||||
localStorage.setItem('persistCode', file)
|
localStorage.setItem('persistCode', file)
|
||||||
}, file)
|
}, file)
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
await scene.waitForExecutionDone()
|
||||||
|
|
||||||
const body1CapCoords = { x: 571, y: 351 }
|
const body1CapCoords = { x: 571, y: 351 }
|
||||||
const [clickBody1Cap] = scene.makeMouseHelpers(
|
const [clickBody1Cap] = scene.makeMouseHelpers(
|
||||||
|
@ -192,11 +192,11 @@ extrude001 = extrude(sketch001, length = 50)
|
|||||||
|> line(end = [0, -1])
|
|> line(end = [0, -1])
|
||||||
|> close()
|
|> close()
|
||||||
|> extrude(length = 1)
|
|> extrude(length = 1)
|
||||||
|> patternLinear3d({
|
|> patternLinear3d(
|
||||||
axis: [1, 0, 1],
|
axis = [1, 0, 1],
|
||||||
repetitions: 3,
|
repetitions = 3,
|
||||||
distance: 6
|
distance = 6,
|
||||||
}, %)`
|
)`
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
await page.setBodyDimensions({ width: 1000, height: 500 })
|
await page.setBodyDimensions({ width: 1000, height: 500 })
|
||||||
@ -251,7 +251,7 @@ extrude001 = extrude(sketch001, length = 50)
|
|||||||
|> yLineTo(0, %)
|
|> yLineTo(0, %)
|
||||||
|> close()
|
|> close()
|
||||||
|>
|
|>
|
||||||
|
|
||||||
example = extrude(exampleSketch, length = 5)
|
example = extrude(exampleSketch, length = 5)
|
||||||
shell(exampleSketch, faces = ['end'], thickness = 0.25)`
|
shell(exampleSketch, faces = ['end'], thickness = 0.25)`
|
||||||
)
|
)
|
||||||
@ -306,113 +306,113 @@ extrude001 = extrude(sketch001, length = 50)
|
|||||||
|> angledLine({ angle: 50, length: 45 }, %)
|
|> angledLine({ angle: 50, length: 45 }, %)
|
||||||
|> yLineTo(0, %)
|
|> yLineTo(0, %)
|
||||||
|> close()
|
|> close()
|
||||||
|
|
||||||
thing: "blah"`)
|
thing: "blah"`)
|
||||||
|
|
||||||
await expect(page.locator('.cm-lint-marker-error')).toBeVisible()
|
await expect(page.locator('.cm-lint-marker-error')).toBeVisible()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
test('when engine fails export we handle the failure and alert the user', async ({
|
test(
|
||||||
scene,
|
'when engine fails export we handle the failure and alert the user',
|
||||||
page,
|
{ tag: '@skipLocalEngine' },
|
||||||
homePage,
|
async ({ scene, page, homePage }) => {
|
||||||
}) => {
|
const u = await getUtils(page)
|
||||||
const u = await getUtils(page)
|
await page.addInitScript(
|
||||||
await page.addInitScript(
|
async ({ code }) => {
|
||||||
async ({ code }) => {
|
localStorage.setItem('persistCode', code)
|
||||||
localStorage.setItem('persistCode', code)
|
;(window as any).playwrightSkipFilePicker = true
|
||||||
;(window as any).playwrightSkipFilePicker = true
|
},
|
||||||
},
|
{ code: TEST_CODE_TRIGGER_ENGINE_EXPORT_ERROR }
|
||||||
{ code: TEST_CODE_TRIGGER_ENGINE_EXPORT_ERROR }
|
)
|
||||||
)
|
|
||||||
|
|
||||||
await page.setBodyDimensions({ width: 1000, height: 500 })
|
await page.setBodyDimensions({ width: 1000, height: 500 })
|
||||||
|
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
await u.waitForPageLoad()
|
await u.waitForPageLoad()
|
||||||
|
|
||||||
// wait for execution done
|
// wait for execution done
|
||||||
await u.openDebugPanel()
|
await u.openDebugPanel()
|
||||||
await u.expectCmdLog('[data-message-type="execution-done"]')
|
await u.expectCmdLog('[data-message-type="execution-done"]')
|
||||||
await u.closeDebugPanel()
|
await u.closeDebugPanel()
|
||||||
|
|
||||||
// expect zero errors in guter
|
// expect zero errors in guter
|
||||||
await expect(page.locator('.cm-lint-marker-error')).not.toBeVisible()
|
await expect(page.locator('.cm-lint-marker-error')).not.toBeVisible()
|
||||||
|
|
||||||
// export the model
|
// export the model
|
||||||
const exportButton = page.getByTestId('export-pane-button')
|
const exportButton = page.getByTestId('export-pane-button')
|
||||||
await expect(exportButton).toBeVisible()
|
await expect(exportButton).toBeVisible()
|
||||||
|
|
||||||
// Click the export button
|
// Click the export button
|
||||||
await exportButton.click()
|
await exportButton.click()
|
||||||
|
|
||||||
// Click the stl.
|
// Click the stl.
|
||||||
const stlOption = page.getByText('glTF')
|
const stlOption = page.getByText('glTF')
|
||||||
await expect(stlOption).toBeVisible()
|
await expect(stlOption).toBeVisible()
|
||||||
|
|
||||||
await page.keyboard.press('Enter')
|
await page.keyboard.press('Enter')
|
||||||
|
|
||||||
// Click the checkbox
|
// Click the checkbox
|
||||||
const submitButton = page.getByText('Confirm Export')
|
const submitButton = page.getByText('Confirm Export')
|
||||||
await expect(submitButton).toBeVisible()
|
await expect(submitButton).toBeVisible()
|
||||||
|
|
||||||
await page.keyboard.press('Enter')
|
await page.keyboard.press('Enter')
|
||||||
|
|
||||||
// Find the toast.
|
// Find the toast.
|
||||||
// Look out for the toast message
|
// Look out for the toast message
|
||||||
const exportingToastMessage = page.getByText(`Exporting...`)
|
const exportingToastMessage = page.getByText(`Exporting...`)
|
||||||
const errorToastMessage = page.getByText(`Error while exporting`)
|
const errorToastMessage = page.getByText(`Error while exporting`)
|
||||||
|
|
||||||
const engineErrorToastMessage = page.getByText(`Nothing to export`)
|
const engineErrorToastMessage = page.getByText(`Nothing to export`)
|
||||||
await expect(engineErrorToastMessage).toBeVisible()
|
await expect(engineErrorToastMessage).toBeVisible()
|
||||||
|
|
||||||
// Make sure the exporting toast is gone
|
// Make sure the exporting toast is gone
|
||||||
await expect(exportingToastMessage).not.toBeVisible()
|
await expect(exportingToastMessage).not.toBeVisible()
|
||||||
|
|
||||||
// Click the code editor
|
// Click the code editor
|
||||||
await page.locator('.cm-content').click()
|
await page.locator('.cm-content').click()
|
||||||
|
|
||||||
await page.waitForTimeout(2000)
|
await page.waitForTimeout(2000)
|
||||||
|
|
||||||
// Expect the toast to be gone
|
// Expect the toast to be gone
|
||||||
await expect(errorToastMessage).not.toBeVisible()
|
await expect(errorToastMessage).not.toBeVisible()
|
||||||
await expect(engineErrorToastMessage).not.toBeVisible()
|
await expect(engineErrorToastMessage).not.toBeVisible()
|
||||||
|
|
||||||
// Now add in code that works.
|
// Now add in code that works.
|
||||||
await page.locator('.cm-content').fill(bracket)
|
await page.locator('.cm-content').fill(bracket)
|
||||||
await page.keyboard.press('End')
|
await page.keyboard.press('End')
|
||||||
await page.keyboard.press('Enter')
|
await page.keyboard.press('Enter')
|
||||||
|
|
||||||
await scene.waitForExecutionDone()
|
await scene.waitForExecutionDone()
|
||||||
|
|
||||||
// Now try exporting
|
// Now try exporting
|
||||||
|
|
||||||
// Click the export button
|
// Click the export button
|
||||||
await exportButton.click()
|
await exportButton.click()
|
||||||
|
|
||||||
// Click the stl.
|
// Click the stl.
|
||||||
await expect(stlOption).toBeVisible()
|
await expect(stlOption).toBeVisible()
|
||||||
|
|
||||||
await page.keyboard.press('Enter')
|
await page.keyboard.press('Enter')
|
||||||
|
|
||||||
// Click the checkbox
|
// Click the checkbox
|
||||||
await expect(submitButton).toBeVisible()
|
await expect(submitButton).toBeVisible()
|
||||||
|
|
||||||
await page.keyboard.press('Enter')
|
await page.keyboard.press('Enter')
|
||||||
|
|
||||||
// Find the toast.
|
// Find the toast.
|
||||||
// Look out for the toast message
|
// Look out for the toast message
|
||||||
await expect(exportingToastMessage).toBeVisible()
|
await expect(exportingToastMessage).toBeVisible()
|
||||||
|
|
||||||
// Expect it to succeed.
|
// Expect it to succeed.
|
||||||
await expect(exportingToastMessage).not.toBeVisible({ timeout: 15_000 })
|
await expect(exportingToastMessage).not.toBeVisible({ timeout: 15_000 })
|
||||||
await expect(errorToastMessage).not.toBeVisible()
|
await expect(errorToastMessage).not.toBeVisible()
|
||||||
await expect(engineErrorToastMessage).not.toBeVisible()
|
await expect(engineErrorToastMessage).not.toBeVisible()
|
||||||
|
|
||||||
const successToastMessage = page.getByText(`Exported successfully`)
|
const successToastMessage = page.getByText(`Exported successfully`)
|
||||||
await expect(successToastMessage).toBeVisible()
|
await expect(successToastMessage).toBeVisible()
|
||||||
})
|
}
|
||||||
|
)
|
||||||
test(
|
test(
|
||||||
'ensure you can not export while an export is already going',
|
'ensure you can not export while an export is already going',
|
||||||
{ tag: ['@skipLinux', '@skipWin'] },
|
{ tag: ['@skipLinux', '@skipWin'] },
|
||||||
|
@ -9,6 +9,7 @@ import {
|
|||||||
PERSIST_MODELING_CONTEXT,
|
PERSIST_MODELING_CONTEXT,
|
||||||
} from './test-utils'
|
} from './test-utils'
|
||||||
import { uuidv4, roundOff } from 'lib/utils'
|
import { uuidv4, roundOff } from 'lib/utils'
|
||||||
|
import { SceneFixture } from './fixtures/sceneFixture'
|
||||||
|
|
||||||
test.describe('Sketch tests', { tag: ['@skipWin'] }, () => {
|
test.describe('Sketch tests', { tag: ['@skipWin'] }, () => {
|
||||||
test('multi-sketch file shows multiple Edit Sketch buttons', async ({
|
test('multi-sketch file shows multiple Edit Sketch buttons', async ({
|
||||||
@ -184,7 +185,8 @@ test.describe('Sketch tests', { tag: ['@skipWin'] }, () => {
|
|||||||
const doEditSegmentsByDraggingHandle = async (
|
const doEditSegmentsByDraggingHandle = async (
|
||||||
page: Page,
|
page: Page,
|
||||||
homePage: HomePageFixture,
|
homePage: HomePageFixture,
|
||||||
openPanes: string[]
|
openPanes: string[],
|
||||||
|
scene: SceneFixture
|
||||||
) => {
|
) => {
|
||||||
// Load the app with the code panes
|
// Load the app with the code panes
|
||||||
await page.addInitScript(async () => {
|
await page.addInitScript(async () => {
|
||||||
@ -200,6 +202,7 @@ test.describe('Sketch tests', { tag: ['@skipWin'] }, () => {
|
|||||||
|
|
||||||
const u = await getUtils(page)
|
const u = await getUtils(page)
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
await scene.waitForExecutionDone()
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole('button', { name: 'Start Sketch' })
|
page.getByRole('button', { name: 'Start Sketch' })
|
||||||
@ -317,7 +320,7 @@ test.describe('Sketch tests', { tag: ['@skipWin'] }, () => {
|
|||||||
test(
|
test(
|
||||||
'code pane open at start-handles',
|
'code pane open at start-handles',
|
||||||
{ tag: ['@skipWin'] },
|
{ tag: ['@skipWin'] },
|
||||||
async ({ page, homePage }) => {
|
async ({ page, homePage, scene }) => {
|
||||||
// Load the app with the code panes
|
// Load the app with the code panes
|
||||||
await page.addInitScript(async () => {
|
await page.addInitScript(async () => {
|
||||||
localStorage.setItem(
|
localStorage.setItem(
|
||||||
@ -330,14 +333,14 @@ test.describe('Sketch tests', { tag: ['@skipWin'] }, () => {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
await doEditSegmentsByDraggingHandle(page, homePage, ['code'])
|
await doEditSegmentsByDraggingHandle(page, homePage, ['code'], scene)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
test(
|
test(
|
||||||
'code pane closed at start-handles',
|
'code pane closed at start-handles',
|
||||||
{ tag: ['@skipWin'] },
|
{ tag: ['@skipWin'] },
|
||||||
async ({ page, homePage }) => {
|
async ({ page, homePage, scene }) => {
|
||||||
// Load the app with the code panes
|
// Load the app with the code panes
|
||||||
await page.addInitScript(async (persistModelingContext) => {
|
await page.addInitScript(async (persistModelingContext) => {
|
||||||
localStorage.setItem(
|
localStorage.setItem(
|
||||||
@ -345,7 +348,7 @@ test.describe('Sketch tests', { tag: ['@skipWin'] }, () => {
|
|||||||
JSON.stringify({ openPanes: [] })
|
JSON.stringify({ openPanes: [] })
|
||||||
)
|
)
|
||||||
}, PERSIST_MODELING_CONTEXT)
|
}, PERSIST_MODELING_CONTEXT)
|
||||||
await doEditSegmentsByDraggingHandle(page, homePage, [])
|
await doEditSegmentsByDraggingHandle(page, homePage, [], scene)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
@ -547,6 +550,7 @@ test.describe('Sketch tests', { tag: ['@skipWin'] }, () => {
|
|||||||
test('Can edit a sketch that has been revolved in the same pipe', async ({
|
test('Can edit a sketch that has been revolved in the same pipe', async ({
|
||||||
page,
|
page,
|
||||||
homePage,
|
homePage,
|
||||||
|
scene,
|
||||||
}) => {
|
}) => {
|
||||||
const u = await getUtils(page)
|
const u = await getUtils(page)
|
||||||
await page.addInitScript(async () => {
|
await page.addInitScript(async () => {
|
||||||
@ -562,6 +566,7 @@ test.describe('Sketch tests', { tag: ['@skipWin'] }, () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
await scene.waitForExecutionDone()
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole('button', { name: 'Start Sketch' })
|
page.getByRole('button', { name: 'Start Sketch' })
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 54 KiB |
@ -3,199 +3,200 @@ import { test, expect } from './zoo-test'
|
|||||||
import { commonPoints, getUtils } from './test-utils'
|
import { commonPoints, getUtils } from './test-utils'
|
||||||
|
|
||||||
test.describe('Test network and connection issues', () => {
|
test.describe('Test network and connection issues', () => {
|
||||||
test('simulate network down and network little widget', async ({
|
test(
|
||||||
page,
|
'simulate network down and network little widget',
|
||||||
homePage,
|
{ tag: '@skipLocalEngine' },
|
||||||
}) => {
|
async ({ page, homePage }) => {
|
||||||
const u = await getUtils(page)
|
const u = await getUtils(page)
|
||||||
await page.setBodyDimensions({ width: 1200, height: 500 })
|
await page.setBodyDimensions({ width: 1200, height: 500 })
|
||||||
|
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
|
||||||
const networkToggle = page.getByTestId('network-toggle')
|
const networkToggle = page.getByTestId('network-toggle')
|
||||||
|
|
||||||
// This is how we wait until the stream is online
|
// This is how we wait until the stream is online
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole('button', { name: 'Start Sketch' })
|
page.getByRole('button', { name: 'Start Sketch' })
|
||||||
).not.toBeDisabled({ timeout: 15000 })
|
).not.toBeDisabled({ timeout: 15000 })
|
||||||
|
|
||||||
const networkWidget = page.locator('[data-testid="network-toggle"]')
|
const networkWidget = page.locator('[data-testid="network-toggle"]')
|
||||||
await expect(networkWidget).toBeVisible()
|
await expect(networkWidget).toBeVisible()
|
||||||
await networkWidget.hover()
|
await networkWidget.hover()
|
||||||
|
|
||||||
const networkPopover = page.locator('[data-testid="network-popover"]')
|
const networkPopover = page.locator('[data-testid="network-popover"]')
|
||||||
await expect(networkPopover).not.toBeVisible()
|
await expect(networkPopover).not.toBeVisible()
|
||||||
|
|
||||||
// (First check) Expect the network to be up
|
// (First check) Expect the network to be up
|
||||||
await expect(networkToggle).toContainText('Connected')
|
await expect(networkToggle).toContainText('Connected')
|
||||||
|
|
||||||
// Click the network widget
|
// Click the network widget
|
||||||
await networkWidget.click()
|
await networkWidget.click()
|
||||||
|
|
||||||
// Check the modal opened.
|
// Check the modal opened.
|
||||||
await expect(networkPopover).toBeVisible()
|
await expect(networkPopover).toBeVisible()
|
||||||
|
|
||||||
// Click off the modal.
|
// Click off the modal.
|
||||||
await page.mouse.click(100, 100)
|
await page.mouse.click(100, 100)
|
||||||
await expect(networkPopover).not.toBeVisible()
|
await expect(networkPopover).not.toBeVisible()
|
||||||
|
|
||||||
// Turn off the network
|
// Turn off the network
|
||||||
await u.emulateNetworkConditions({
|
await u.emulateNetworkConditions({
|
||||||
offline: true,
|
offline: true,
|
||||||
// values of 0 remove any active throttling. crbug.com/456324#c9
|
// values of 0 remove any active throttling. crbug.com/456324#c9
|
||||||
latency: 0,
|
latency: 0,
|
||||||
downloadThroughput: -1,
|
downloadThroughput: -1,
|
||||||
uploadThroughput: -1,
|
uploadThroughput: -1,
|
||||||
})
|
})
|
||||||
|
|
||||||
// Expect the network to be down
|
// Expect the network to be down
|
||||||
await expect(networkToggle).toContainText('Problem')
|
await expect(networkToggle).toContainText('Problem')
|
||||||
|
|
||||||
// Click the network widget
|
// Click the network widget
|
||||||
await networkWidget.click()
|
await networkWidget.click()
|
||||||
|
|
||||||
// Check the modal opened.
|
// Check the modal opened.
|
||||||
await expect(networkPopover).toBeVisible()
|
await expect(networkPopover).toBeVisible()
|
||||||
|
|
||||||
// Click off the modal.
|
// Click off the modal.
|
||||||
await page.mouse.click(0, 0)
|
await page.mouse.click(0, 0)
|
||||||
await expect(networkPopover).not.toBeVisible()
|
await expect(networkPopover).not.toBeVisible()
|
||||||
|
|
||||||
// Turn back on the network
|
// Turn back on the network
|
||||||
await u.emulateNetworkConditions({
|
await u.emulateNetworkConditions({
|
||||||
offline: false,
|
offline: false,
|
||||||
// values of 0 remove any active throttling. crbug.com/456324#c9
|
// values of 0 remove any active throttling. crbug.com/456324#c9
|
||||||
latency: 0,
|
latency: 0,
|
||||||
downloadThroughput: -1,
|
downloadThroughput: -1,
|
||||||
uploadThroughput: -1,
|
uploadThroughput: -1,
|
||||||
})
|
})
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole('button', { name: 'Start Sketch' })
|
page.getByRole('button', { name: 'Start Sketch' })
|
||||||
).not.toBeDisabled({ timeout: 15000 })
|
).not.toBeDisabled({ timeout: 15000 })
|
||||||
|
|
||||||
// (Second check) expect the network to be up
|
// (Second check) expect the network to be up
|
||||||
await expect(networkToggle).toContainText('Connected')
|
await expect(networkToggle).toContainText('Connected')
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
||||||
test('Engine disconnect & reconnect in sketch mode', async ({
|
test(
|
||||||
page,
|
'Engine disconnect & reconnect in sketch mode',
|
||||||
homePage,
|
{ tag: '@skipLocalEngine' },
|
||||||
}) => {
|
async ({ page, homePage }) => {
|
||||||
// TODO: Don't skip Mac for these. After `window.tearDown` is working in Safari, these should work on webkit
|
// TODO: Don't skip Mac for these. After `window.tearDown` is working in Safari, these should work on webkit
|
||||||
const networkToggle = page.getByTestId('network-toggle')
|
const networkToggle = page.getByTestId('network-toggle')
|
||||||
|
|
||||||
const u = await getUtils(page)
|
const u = await getUtils(page)
|
||||||
await page.setBodyDimensions({ width: 1200, height: 500 })
|
await page.setBodyDimensions({ width: 1200, height: 500 })
|
||||||
const PUR = 400 / 37.5 //pixeltoUnitRatio
|
const PUR = 400 / 37.5 //pixeltoUnitRatio
|
||||||
|
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
await u.waitForPageLoad()
|
await u.waitForPageLoad()
|
||||||
|
|
||||||
await u.openDebugPanel()
|
await u.openDebugPanel()
|
||||||
// click on "Start Sketch" button
|
// click on "Start Sketch" button
|
||||||
await u.clearCommandLogs()
|
await u.clearCommandLogs()
|
||||||
await page.getByRole('button', { name: 'Start Sketch' }).click()
|
await page.getByRole('button', { name: 'Start Sketch' }).click()
|
||||||
await page.waitForTimeout(100)
|
await page.waitForTimeout(100)
|
||||||
|
|
||||||
// select a plane
|
// select a plane
|
||||||
await page.mouse.click(700, 200)
|
await page.mouse.click(700, 200)
|
||||||
|
|
||||||
await expect(page.locator('.cm-content')).toHaveText(
|
await expect(page.locator('.cm-content')).toHaveText(
|
||||||
`sketch001 = startSketchOn('XZ')`
|
`sketch001 = startSketchOn('XZ')`
|
||||||
)
|
)
|
||||||
await u.closeDebugPanel()
|
await u.closeDebugPanel()
|
||||||
|
|
||||||
await page.waitForTimeout(500) // TODO detect animation ending, or disable animation
|
await page.waitForTimeout(500) // TODO detect animation ending, or disable animation
|
||||||
|
|
||||||
const startXPx = 600
|
const startXPx = 600
|
||||||
await page.mouse.click(startXPx + PUR * 10, 500 - PUR * 10)
|
await page.mouse.click(startXPx + PUR * 10, 500 - PUR * 10)
|
||||||
await expect(page.locator('.cm-content'))
|
await expect(page.locator('.cm-content'))
|
||||||
.toHaveText(`sketch001 = startSketchOn('XZ')
|
.toHaveText(`sketch001 = startSketchOn('XZ')
|
||||||
|> startProfileAt(${commonPoints.startAt}, %)`)
|
|> startProfileAt(${commonPoints.startAt}, %)`)
|
||||||
await page.waitForTimeout(100)
|
await page.waitForTimeout(100)
|
||||||
|
|
||||||
await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10)
|
await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10)
|
||||||
await page.waitForTimeout(100)
|
await page.waitForTimeout(100)
|
||||||
|
|
||||||
await expect(page.locator('.cm-content'))
|
await expect(page.locator('.cm-content'))
|
||||||
.toHaveText(`sketch001 = startSketchOn('XZ')
|
.toHaveText(`sketch001 = startSketchOn('XZ')
|
||||||
|> startProfileAt(${commonPoints.startAt}, %)
|
|> startProfileAt(${commonPoints.startAt}, %)
|
||||||
|> xLine(${commonPoints.num1}, %)`)
|
|> xLine(${commonPoints.num1}, %)`)
|
||||||
|
|
||||||
// Expect the network to be up
|
// Expect the network to be up
|
||||||
await expect(networkToggle).toContainText('Connected')
|
await expect(networkToggle).toContainText('Connected')
|
||||||
|
|
||||||
// simulate network down
|
// simulate network down
|
||||||
await u.emulateNetworkConditions({
|
await u.emulateNetworkConditions({
|
||||||
offline: true,
|
offline: true,
|
||||||
// values of 0 remove any active throttling. crbug.com/456324#c9
|
// values of 0 remove any active throttling. crbug.com/456324#c9
|
||||||
latency: 0,
|
latency: 0,
|
||||||
downloadThroughput: -1,
|
downloadThroughput: -1,
|
||||||
uploadThroughput: -1,
|
uploadThroughput: -1,
|
||||||
})
|
})
|
||||||
|
|
||||||
// Expect the network to be down
|
// Expect the network to be down
|
||||||
await expect(networkToggle).toContainText('Problem')
|
await expect(networkToggle).toContainText('Problem')
|
||||||
|
|
||||||
// Ensure we are not in sketch mode
|
// Ensure we are not in sketch mode
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole('button', { name: 'Exit Sketch' })
|
page.getByRole('button', { name: 'Exit Sketch' })
|
||||||
).not.toBeVisible()
|
).not.toBeVisible()
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole('button', { name: 'Start Sketch' })
|
page.getByRole('button', { name: 'Start Sketch' })
|
||||||
).toBeVisible()
|
).toBeVisible()
|
||||||
|
|
||||||
// simulate network up
|
// simulate network up
|
||||||
await u.emulateNetworkConditions({
|
await u.emulateNetworkConditions({
|
||||||
offline: false,
|
offline: false,
|
||||||
// values of 0 remove any active throttling. crbug.com/456324#c9
|
// values of 0 remove any active throttling. crbug.com/456324#c9
|
||||||
latency: 0,
|
latency: 0,
|
||||||
downloadThroughput: -1,
|
downloadThroughput: -1,
|
||||||
uploadThroughput: -1,
|
uploadThroughput: -1,
|
||||||
})
|
})
|
||||||
|
|
||||||
// Wait for the app to be ready for use
|
// Wait for the app to be ready for use
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole('button', { name: 'Start Sketch' })
|
page.getByRole('button', { name: 'Start Sketch' })
|
||||||
).not.toBeDisabled({ timeout: 15000 })
|
).not.toBeDisabled({ timeout: 15000 })
|
||||||
|
|
||||||
// Expect the network to be up
|
// Expect the network to be up
|
||||||
await expect(networkToggle).toContainText('Connected')
|
await expect(networkToggle).toContainText('Connected')
|
||||||
await expect(page.getByTestId('loading-stream')).not.toBeAttached()
|
await expect(page.getByTestId('loading-stream')).not.toBeAttached()
|
||||||
|
|
||||||
// Click off the code pane.
|
// Click off the code pane.
|
||||||
await page.mouse.click(100, 100)
|
await page.mouse.click(100, 100)
|
||||||
|
|
||||||
// select a line
|
// select a line
|
||||||
await page.getByText(`startProfileAt(${commonPoints.startAt}, %)`).click()
|
await page.getByText(`startProfileAt(${commonPoints.startAt}, %)`).click()
|
||||||
|
|
||||||
// enter sketch again
|
// enter sketch again
|
||||||
await u.doAndWaitForCmd(
|
await u.doAndWaitForCmd(
|
||||||
() => page.getByRole('button', { name: 'Edit Sketch' }).click(),
|
() => page.getByRole('button', { name: 'Edit Sketch' }).click(),
|
||||||
'default_camera_get_settings'
|
'default_camera_get_settings'
|
||||||
)
|
)
|
||||||
await page.waitForTimeout(150)
|
await page.waitForTimeout(150)
|
||||||
|
|
||||||
// Click the line tool
|
// Click the line tool
|
||||||
await page.getByRole('button', { name: 'line Line', exact: true }).click()
|
await page.getByRole('button', { name: 'line Line', exact: true }).click()
|
||||||
|
|
||||||
await page.waitForTimeout(150)
|
await page.waitForTimeout(150)
|
||||||
|
|
||||||
// Ensure we can continue sketching
|
// Ensure we can continue sketching
|
||||||
await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 20)
|
await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 20)
|
||||||
await expect.poll(u.normalisedEditorCode)
|
await expect.poll(u.normalisedEditorCode)
|
||||||
.toBe(`sketch001 = startSketchOn('XZ')
|
.toBe(`sketch001 = startSketchOn('XZ')
|
||||||
|> startProfileAt([12.34, -12.34], %)
|
|> startProfileAt([12.34, -12.34], %)
|
||||||
|> xLine(12.34, %)
|
|> xLine(12.34, %)
|
||||||
|> line(end = [-12.34, 12.34])
|
|> line(end = [-12.34, 12.34])
|
||||||
|
|
||||||
`)
|
`)
|
||||||
await page.waitForTimeout(100)
|
await page.waitForTimeout(100)
|
||||||
await page.mouse.click(startXPx, 500 - PUR * 20)
|
await page.mouse.click(startXPx, 500 - PUR * 20)
|
||||||
|
|
||||||
await expect.poll(u.normalisedEditorCode)
|
await expect.poll(u.normalisedEditorCode)
|
||||||
.toBe(`sketch001 = startSketchOn('XZ')
|
.toBe(`sketch001 = startSketchOn('XZ')
|
||||||
|> startProfileAt([12.34, -12.34], %)
|
|> startProfileAt([12.34, -12.34], %)
|
||||||
|> xLine(12.34, %)
|
|> xLine(12.34, %)
|
||||||
|> line(end = [-12.34, 12.34])
|
|> line(end = [-12.34, 12.34])
|
||||||
@ -203,20 +204,21 @@ test.describe('Test network and connection issues', () => {
|
|||||||
|
|
||||||
`)
|
`)
|
||||||
|
|
||||||
// Unequip line tool
|
// Unequip line tool
|
||||||
await page.keyboard.press('Escape')
|
await page.keyboard.press('Escape')
|
||||||
// Make sure we didn't pop out of sketch mode.
|
// Make sure we didn't pop out of sketch mode.
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole('button', { name: 'Exit Sketch' })
|
page.getByRole('button', { name: 'Exit Sketch' })
|
||||||
).toBeVisible()
|
).toBeVisible()
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole('button', { name: 'line Line', exact: true })
|
page.getByRole('button', { name: 'line Line', exact: true })
|
||||||
).not.toHaveAttribute('aria-pressed', 'true')
|
).not.toHaveAttribute('aria-pressed', 'true')
|
||||||
|
|
||||||
// Exit sketch
|
// Exit sketch
|
||||||
await page.keyboard.press('Escape')
|
await page.keyboard.press('Escape')
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole('button', { name: 'Exit Sketch' })
|
page.getByRole('button', { name: 'Exit Sketch' })
|
||||||
).not.toBeVisible()
|
).not.toBeVisible()
|
||||||
})
|
}
|
||||||
|
)
|
||||||
})
|
})
|
||||||
|
@ -109,7 +109,8 @@ test.describe('Testing Camera Movement', { tag: ['@skipWin'] }, () => {
|
|||||||
await page.keyboard.down('Shift')
|
await page.keyboard.down('Shift')
|
||||||
await page.mouse.move(600, 200)
|
await page.mouse.move(600, 200)
|
||||||
await page.mouse.down({ button: 'right' })
|
await page.mouse.down({ button: 'right' })
|
||||||
await page.mouse.move(700, 200, { steps: 2 })
|
// Gotcha: remove steps:2 from this 700,200 mouse move. This bricked the test on local host engine.
|
||||||
|
await page.mouse.move(700, 200)
|
||||||
await page.mouse.up({ button: 'right' })
|
await page.mouse.up({ button: 'right' })
|
||||||
await page.keyboard.up('Shift')
|
await page.keyboard.up('Shift')
|
||||||
}, [-19, -85, -85])
|
}, [-19, -85, -85])
|
||||||
|
@ -248,7 +248,11 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
test('Solids should be select and deletable', async ({ page, homePage }) => {
|
test('Solids should be select and deletable', async ({
|
||||||
|
page,
|
||||||
|
homePage,
|
||||||
|
scene,
|
||||||
|
}) => {
|
||||||
test.setTimeout(90_000)
|
test.setTimeout(90_000)
|
||||||
const u = await getUtils(page)
|
const u = await getUtils(page)
|
||||||
await page.addInitScript(async () => {
|
await page.addInitScript(async () => {
|
||||||
@ -320,10 +324,7 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
|
|||||||
await page.setBodyDimensions({ width: 1000, height: 500 })
|
await page.setBodyDimensions({ width: 1000, height: 500 })
|
||||||
|
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
await scene.waitForExecutionDone()
|
||||||
await u.openDebugPanel()
|
|
||||||
await u.expectCmdLog('[data-message-type="execution-done"]')
|
|
||||||
await u.closeDebugPanel()
|
|
||||||
|
|
||||||
await u.openAndClearDebugPanel()
|
await u.openAndClearDebugPanel()
|
||||||
await u.sendCustomCmd({
|
await u.sendCustomCmd({
|
||||||
@ -902,6 +903,7 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
|
|||||||
test('Testing selections (and hovers) work on sketches when NOT in sketch mode', async ({
|
test('Testing selections (and hovers) work on sketches when NOT in sketch mode', async ({
|
||||||
page,
|
page,
|
||||||
homePage,
|
homePage,
|
||||||
|
scene,
|
||||||
}) => {
|
}) => {
|
||||||
const cases = [
|
const cases = [
|
||||||
{
|
{
|
||||||
@ -937,6 +939,7 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
|
|||||||
await page.setBodyDimensions({ width: 1200, height: 500 })
|
await page.setBodyDimensions({ width: 1200, height: 500 })
|
||||||
|
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
await scene.waitForExecutionDone()
|
||||||
await u.openAndClearDebugPanel()
|
await u.openAndClearDebugPanel()
|
||||||
|
|
||||||
await u.sendCustomCmd({
|
await u.sendCustomCmd({
|
||||||
@ -970,6 +973,7 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
|
|||||||
test("Hovering and selection of extruded faces works, and is not overridden shortly after user's click", async ({
|
test("Hovering and selection of extruded faces works, and is not overridden shortly after user's click", async ({
|
||||||
page,
|
page,
|
||||||
homePage,
|
homePage,
|
||||||
|
scene,
|
||||||
}) => {
|
}) => {
|
||||||
await page.addInitScript(async () => {
|
await page.addInitScript(async () => {
|
||||||
localStorage.setItem(
|
localStorage.setItem(
|
||||||
@ -988,6 +992,7 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
|
|||||||
await page.setBodyDimensions({ width: 1200, height: 500 })
|
await page.setBodyDimensions({ width: 1200, height: 500 })
|
||||||
|
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
await scene.waitForExecutionDone()
|
||||||
await u.openAndClearDebugPanel()
|
await u.openAndClearDebugPanel()
|
||||||
|
|
||||||
await u.sendCustomCmd({
|
await u.sendCustomCmd({
|
||||||
@ -1021,19 +1026,19 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
|
|||||||
.poll(() => u.getGreatestPixDiff(extrudeWall, noHoverColor))
|
.poll(() => u.getGreatestPixDiff(extrudeWall, noHoverColor))
|
||||||
.toBeLessThan(15)
|
.toBeLessThan(15)
|
||||||
await page.mouse.move(nothing.x, nothing.y)
|
await page.mouse.move(nothing.x, nothing.y)
|
||||||
await page.waitForTimeout(100)
|
await page.waitForTimeout(1000)
|
||||||
await page.mouse.move(extrudeWall.x, extrudeWall.y)
|
await page.mouse.move(extrudeWall.x, extrudeWall.y)
|
||||||
await expect(page.getByTestId('hover-highlight').first()).toBeVisible()
|
await expect(page.getByTestId('hover-highlight').first()).toBeVisible()
|
||||||
await expect(page.getByTestId('hover-highlight').first()).toContainText(
|
await expect(page.getByTestId('hover-highlight').first()).toContainText(
|
||||||
removeAfterFirstParenthesis(extrudeText)
|
removeAfterFirstParenthesis(extrudeText)
|
||||||
)
|
)
|
||||||
await page.waitForTimeout(200)
|
await page.waitForTimeout(1000)
|
||||||
await expect(
|
await expect(
|
||||||
await u.getGreatestPixDiff(extrudeWall, hoverColor)
|
await u.getGreatestPixDiff(extrudeWall, hoverColor)
|
||||||
).toBeLessThan(15)
|
).toBeLessThan(15)
|
||||||
await page.mouse.click(extrudeWall.x, extrudeWall.y)
|
await page.mouse.click(extrudeWall.x, extrudeWall.y)
|
||||||
await expect(page.locator('.cm-activeLine')).toHaveText(`|> ${extrudeText}`)
|
await expect(page.locator('.cm-activeLine')).toHaveText(`|> ${extrudeText}`)
|
||||||
await page.waitForTimeout(200)
|
await page.waitForTimeout(1000)
|
||||||
await expect(
|
await expect(
|
||||||
await u.getGreatestPixDiff(extrudeWall, selectColor)
|
await u.getGreatestPixDiff(extrudeWall, selectColor)
|
||||||
).toBeLessThan(15)
|
).toBeLessThan(15)
|
||||||
@ -1044,7 +1049,7 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
|
|||||||
).toBeLessThan(15)
|
).toBeLessThan(15)
|
||||||
|
|
||||||
await page.mouse.move(nothing.x, nothing.y)
|
await page.mouse.move(nothing.x, nothing.y)
|
||||||
await page.waitForTimeout(300)
|
await page.waitForTimeout(1000)
|
||||||
await expect(page.getByTestId('hover-highlight')).not.toBeVisible()
|
await expect(page.getByTestId('hover-highlight')).not.toBeVisible()
|
||||||
|
|
||||||
// because of shading, color is not exact everywhere on the face
|
// because of shading, color is not exact everywhere on the face
|
||||||
@ -1058,11 +1063,11 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
|
|||||||
await expect(page.getByTestId('hover-highlight').first()).toContainText(
|
await expect(page.getByTestId('hover-highlight').first()).toContainText(
|
||||||
removeAfterFirstParenthesis(capText)
|
removeAfterFirstParenthesis(capText)
|
||||||
)
|
)
|
||||||
await page.waitForTimeout(200)
|
await page.waitForTimeout(1000)
|
||||||
await expect(await u.getGreatestPixDiff(cap, hoverColor)).toBeLessThan(15)
|
await expect(await u.getGreatestPixDiff(cap, hoverColor)).toBeLessThan(15)
|
||||||
await page.mouse.click(cap.x, cap.y)
|
await page.mouse.click(cap.x, cap.y)
|
||||||
await expect(page.locator('.cm-activeLine')).toHaveText(`|> ${capText}`)
|
await expect(page.locator('.cm-activeLine')).toHaveText(`|> ${capText}`)
|
||||||
await page.waitForTimeout(200)
|
await page.waitForTimeout(1000)
|
||||||
await expect(await u.getGreatestPixDiff(cap, selectColor)).toBeLessThan(15)
|
await expect(await u.getGreatestPixDiff(cap, selectColor)).toBeLessThan(15)
|
||||||
await page.waitForTimeout(1000)
|
await page.waitForTimeout(1000)
|
||||||
// check color stays there, i.e. not overridden (this was a bug previously)
|
// check color stays there, i.e. not overridden (this was a bug previously)
|
||||||
@ -1109,7 +1114,7 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
|
|||||||
|> line(end = [4.95, -8])
|
|> line(end = [4.95, -8])
|
||||||
|> line(end = [-20.38, -10.12])
|
|> line(end = [-20.38, -10.12])
|
||||||
|> line(end = [-15.79, 17.08])
|
|> line(end = [-15.79, 17.08])
|
||||||
|
|
||||||
fn yohey = (pos) => {
|
fn yohey = (pos) => {
|
||||||
sketch004 = startSketchOn('XZ')
|
sketch004 = startSketchOn('XZ')
|
||||||
${extrudeAndEditBlockedInFunction}
|
${extrudeAndEditBlockedInFunction}
|
||||||
@ -1119,7 +1124,7 @@ test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
|
|||||||
|> line(end = [-15.79, 17.08])
|
|> line(end = [-15.79, 17.08])
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
|
||||||
yohey([15.79, -34.6])
|
yohey([15.79, -34.6])
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
|
@ -32,15 +32,18 @@ test.fixme('Units menu', async ({ page, homePage }) => {
|
|||||||
await expect(unitsMenuButton).toContainText('mm')
|
await expect(unitsMenuButton).toContainText('mm')
|
||||||
})
|
})
|
||||||
|
|
||||||
test('Successful export shows a success toast', async ({ page, homePage }) => {
|
test(
|
||||||
// FYI this test doesn't work with only engine running locally
|
'Successful export shows a success toast',
|
||||||
// And you will need to have the KittyCAD CLI installed
|
{ tag: '@skipLocalEngine' },
|
||||||
const u = await getUtils(page)
|
async ({ page, homePage }) => {
|
||||||
await page.addInitScript(async () => {
|
// FYI this test doesn't work with only engine running locally
|
||||||
;(window as any).playwrightSkipFilePicker = true
|
// And you will need to have the KittyCAD CLI installed
|
||||||
localStorage.setItem(
|
const u = await getUtils(page)
|
||||||
'persistCode',
|
await page.addInitScript(async () => {
|
||||||
`topAng = 25
|
;(window as any).playwrightSkipFilePicker = true
|
||||||
|
localStorage.setItem(
|
||||||
|
'persistCode',
|
||||||
|
`topAng = 25
|
||||||
bottomAng = 35
|
bottomAng = 35
|
||||||
baseLen = 3.5
|
baseLen = 3.5
|
||||||
baseHeight = 1
|
baseHeight = 1
|
||||||
@ -78,26 +81,27 @@ part001 = startSketchOn('-XZ')
|
|||||||
|> xLineTo(ZERO, %)
|
|> xLineTo(ZERO, %)
|
||||||
|> close()
|
|> close()
|
||||||
|> extrude(length = 4)`
|
|> extrude(length = 4)`
|
||||||
|
)
|
||||||
|
})
|
||||||
|
await page.setBodyDimensions({ width: 1200, height: 500 })
|
||||||
|
|
||||||
|
await homePage.goToModelingScene()
|
||||||
|
await u.openDebugPanel()
|
||||||
|
await u.expectCmdLog('[data-message-type="execution-done"]')
|
||||||
|
await u.waitForCmdReceive('extrude')
|
||||||
|
await page.waitForTimeout(1000)
|
||||||
|
await u.clearAndCloseDebugPanel()
|
||||||
|
|
||||||
|
await doExport(
|
||||||
|
{
|
||||||
|
type: 'gltf',
|
||||||
|
storage: 'embedded',
|
||||||
|
presentation: 'pretty',
|
||||||
|
},
|
||||||
|
page
|
||||||
)
|
)
|
||||||
})
|
}
|
||||||
await page.setBodyDimensions({ width: 1200, height: 500 })
|
)
|
||||||
|
|
||||||
await homePage.goToModelingScene()
|
|
||||||
await u.openDebugPanel()
|
|
||||||
await u.expectCmdLog('[data-message-type="execution-done"]')
|
|
||||||
await u.waitForCmdReceive('extrude')
|
|
||||||
await page.waitForTimeout(1000)
|
|
||||||
await u.clearAndCloseDebugPanel()
|
|
||||||
|
|
||||||
await doExport(
|
|
||||||
{
|
|
||||||
type: 'gltf',
|
|
||||||
storage: 'embedded',
|
|
||||||
presentation: 'pretty',
|
|
||||||
},
|
|
||||||
page
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
test('Paste should not work unless an input is focused', async ({
|
test('Paste should not work unless an input is focused', async ({
|
||||||
page,
|
page,
|
||||||
@ -444,7 +448,7 @@ test('Delete key does not navigate back', async ({ page, homePage }) => {
|
|||||||
await expect.poll(() => page.url()).not.toContain('/settings')
|
await expect.poll(() => page.url()).not.toContain('/settings')
|
||||||
})
|
})
|
||||||
|
|
||||||
test('Sketch on face', async ({ page, homePage }) => {
|
test('Sketch on face', async ({ page, homePage, scene, cmdBar }) => {
|
||||||
test.setTimeout(90_000)
|
test.setTimeout(90_000)
|
||||||
const u = await getUtils(page)
|
const u = await getUtils(page)
|
||||||
await page.addInitScript(async () => {
|
await page.addInitScript(async () => {
|
||||||
@ -470,11 +474,7 @@ extrude001 = extrude(sketch001, length = 5 + 7)`
|
|||||||
await page.setBodyDimensions({ width: 1200, height: 500 })
|
await page.setBodyDimensions({ width: 1200, height: 500 })
|
||||||
|
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
await scene.waitForExecutionDone()
|
||||||
// wait for execution done
|
|
||||||
await u.openDebugPanel()
|
|
||||||
await u.expectCmdLog('[data-message-type="execution-done"]')
|
|
||||||
await u.closeDebugPanel()
|
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole('button', { name: 'Start Sketch' })
|
page.getByRole('button', { name: 'Start Sketch' })
|
||||||
@ -579,10 +579,9 @@ extrude001 = extrude(sketch001, length = 5 + 7)`
|
|||||||
await expect(page.getByTestId('command-bar')).toBeVisible()
|
await expect(page.getByTestId('command-bar')).toBeVisible()
|
||||||
await page.waitForTimeout(100)
|
await page.waitForTimeout(100)
|
||||||
|
|
||||||
await page.getByRole('button', { name: 'arrow right Continue' }).click()
|
await cmdBar.progressCmdBar()
|
||||||
await page.waitForTimeout(100)
|
|
||||||
await expect(page.getByText('Confirm Extrude')).toBeVisible()
|
await expect(page.getByText('Confirm Extrude')).toBeVisible()
|
||||||
await page.getByRole('button', { name: 'checkmark Submit command' }).click()
|
await cmdBar.progressCmdBar()
|
||||||
|
|
||||||
const result2 = result.genNext`
|
const result2 = result.genNext`
|
||||||
const sketch002 = extrude(sketch002, length = ${[5, 5]} + 7)`
|
const sketch002 = extrude(sketch002, length = ${[5, 5]} + 7)`
|
||||||
|
@ -85,7 +85,7 @@
|
|||||||
"fmt": "prettier --write ./src *.ts *.json *.js ./e2e ./packages",
|
"fmt": "prettier --write ./src *.ts *.json *.js ./e2e ./packages",
|
||||||
"fmt-check": "prettier --check ./src *.ts *.json *.js ./e2e ./packages",
|
"fmt-check": "prettier --check ./src *.ts *.json *.js ./e2e ./packages",
|
||||||
"fetch:wasm": "./get-latest-wasm-bundle.sh",
|
"fetch:wasm": "./get-latest-wasm-bundle.sh",
|
||||||
"fetch:samples": "echo \"Fetching latest KCL samples...\" && curl -o public/kcl-samples-manifest-fallback.json https://raw.githubusercontent.com/KittyCAD/kcl-samples/achalmers/kw-appearance/manifest.json",
|
"fetch:samples": "echo \"Fetching latest KCL samples...\" && curl -o public/kcl-samples-manifest-fallback.json https://raw.githubusercontent.com/KittyCAD/kcl-samples/achalmers/kw-pattern/manifest.json",
|
||||||
"isomorphic-copy-wasm": "(copy src/wasm-lib/pkg/wasm_lib_bg.wasm public || cp src/wasm-lib/pkg/wasm_lib_bg.wasm public)",
|
"isomorphic-copy-wasm": "(copy src/wasm-lib/pkg/wasm_lib_bg.wasm public || cp src/wasm-lib/pkg/wasm_lib_bg.wasm public)",
|
||||||
"build:wasm-dev": "yarn wasm-prep && (cd src/wasm-lib && wasm-pack build --dev --target web --out-dir pkg && cargo test -p kcl-lib export_bindings) && yarn isomorphic-copy-wasm && yarn fmt",
|
"build:wasm-dev": "yarn wasm-prep && (cd src/wasm-lib && wasm-pack build --dev --target web --out-dir pkg && cargo test -p kcl-lib export_bindings) && yarn isomorphic-copy-wasm && yarn fmt",
|
||||||
"build:wasm": "yarn wasm-prep && cd src/wasm-lib && wasm-pack build --release --target web --out-dir pkg && cargo test -p kcl-lib export_bindings && cd ../.. && yarn isomorphic-copy-wasm && yarn fmt",
|
"build:wasm": "yarn wasm-prep && cd src/wasm-lib && wasm-pack build --release --target web --out-dir pkg && cargo test -p kcl-lib export_bindings && cd ../.. && yarn isomorphic-copy-wasm && yarn fmt",
|
||||||
@ -120,6 +120,7 @@
|
|||||||
"test:playwright:electron:windows:local": "yarn tronb:vite:dev && set NODE_ENV='development' && playwright test --config=playwright.electron.config.ts --grep-invert=\"@skipWin|@snapshot\"",
|
"test:playwright:electron:windows:local": "yarn tronb:vite:dev && set NODE_ENV='development' && playwright test --config=playwright.electron.config.ts --grep-invert=\"@skipWin|@snapshot\"",
|
||||||
"test:playwright:electron:macos:local": "yarn tronb:vite:dev && NODE_ENV=development playwright test --config=playwright.electron.config.ts --grep-invert='@skipMacos|@snapshot'",
|
"test:playwright:electron:macos:local": "yarn tronb:vite:dev && NODE_ENV=development playwright test --config=playwright.electron.config.ts --grep-invert='@skipMacos|@snapshot'",
|
||||||
"test:playwright:electron:ubuntu:local": "yarn tronb:vite:dev && NODE_ENV=development playwright test --config=playwright.electron.config.ts --grep-invert='@skipLinux|@snapshot'",
|
"test:playwright:electron:ubuntu:local": "yarn tronb:vite:dev && NODE_ENV=development playwright test --config=playwright.electron.config.ts --grep-invert='@skipLinux|@snapshot'",
|
||||||
|
"test:playwright:electron:ubuntu:engine:local": "yarn tronb:vite:dev && NODE_ENV=development playwright test --config=playwright.electron.config.ts --grep-invert='@skipLinux|@snapshot|@skipLocalEngine'",
|
||||||
"test:unit:local": "yarn simpleserver:bg && yarn test:unit; kill-port 3000",
|
"test:unit:local": "yarn simpleserver:bg && yarn test:unit; kill-port 3000",
|
||||||
"test:unit:kcl-samples:local": "yarn simpleserver:bg && yarn test:unit:kcl-samples; kill-port 3000"
|
"test:unit:kcl-samples:local": "yarn simpleserver:bg && yarn test:unit:kcl-samples; kill-port 3000"
|
||||||
},
|
},
|
||||||
|
@ -196,6 +196,7 @@ function ReviewingButton() {
|
|||||||
type="submit"
|
type="submit"
|
||||||
form="review-form"
|
form="review-form"
|
||||||
className="w-fit !p-0 rounded-sm hover:shadow"
|
className="w-fit !p-0 rounded-sm hover:shadow"
|
||||||
|
data-testid="command-bar-submit"
|
||||||
iconStart={{
|
iconStart={{
|
||||||
icon: 'checkmark',
|
icon: 'checkmark',
|
||||||
bgClassName: 'p-1 rounded-sm !bg-primary hover:brightness-110',
|
bgClassName: 'p-1 rounded-sm !bg-primary hover:brightness-110',
|
||||||
@ -214,6 +215,7 @@ function GatheringArgsButton() {
|
|||||||
type="submit"
|
type="submit"
|
||||||
form="arg-form"
|
form="arg-form"
|
||||||
className="w-fit !p-0 rounded-sm hover:shadow"
|
className="w-fit !p-0 rounded-sm hover:shadow"
|
||||||
|
data-testid="command-bar-continue"
|
||||||
iconStart={{
|
iconStart={{
|
||||||
icon: 'arrowRight',
|
icon: 'arrowRight',
|
||||||
bgClassName: 'p-1 rounded-sm !bg-primary hover:brightness-110',
|
bgClassName: 'p-1 rounded-sm !bg-primary hover:brightness-110',
|
||||||
|
@ -20,6 +20,7 @@ import { createIdentifier, createVariableDeclaration } from 'lang/modifyAst'
|
|||||||
import { useCodeMirror } from 'components/ModelingSidebar/ModelingPanes/CodeEditor'
|
import { useCodeMirror } from 'components/ModelingSidebar/ModelingPanes/CodeEditor'
|
||||||
import { useSelector } from '@xstate/react'
|
import { useSelector } from '@xstate/react'
|
||||||
import { commandBarActor, useCommandBarState } from 'machines/commandBarMachine'
|
import { commandBarActor, useCommandBarState } from 'machines/commandBarMachine'
|
||||||
|
import toast from 'react-hot-toast'
|
||||||
|
|
||||||
const machineContextSelector = (snapshot?: {
|
const machineContextSelector = (snapshot?: {
|
||||||
context: Record<string, unknown>
|
context: Record<string, unknown>
|
||||||
@ -97,6 +98,7 @@ function CommandBarKclInput({
|
|||||||
value,
|
value,
|
||||||
initialVariableName,
|
initialVariableName,
|
||||||
})
|
})
|
||||||
|
|
||||||
const varMentionData: Completion[] = prevVariables.map((v) => ({
|
const varMentionData: Completion[] = prevVariables.map((v) => ({
|
||||||
label: v.key,
|
label: v.key,
|
||||||
detail: String(roundOff(v.value as number)),
|
detail: String(roundOff(v.value as number)),
|
||||||
@ -170,7 +172,15 @@ function CommandBarKclInput({
|
|||||||
|
|
||||||
function handleSubmit(e?: React.FormEvent<HTMLFormElement>) {
|
function handleSubmit(e?: React.FormEvent<HTMLFormElement>) {
|
||||||
e?.preventDefault()
|
e?.preventDefault()
|
||||||
if (!canSubmit || valueNode === null) return
|
if (!canSubmit || valueNode === null) {
|
||||||
|
// Gotcha: Our application can attempt to submit a command value before the command bar kcl input is ready. Notify the scene and user.
|
||||||
|
if (!canSubmit) {
|
||||||
|
toast.error('Unable to submit command')
|
||||||
|
} else if (valueNode === null) {
|
||||||
|
toast.error('Unable to submit undefined command value')
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
onSubmit(
|
onSubmit(
|
||||||
createNewVariable
|
createNewVariable
|
||||||
|
@ -25,6 +25,18 @@ export class KclPlugin implements PluginValue {
|
|||||||
|
|
||||||
constructor(client: LanguageServerClient) {
|
constructor(client: LanguageServerClient) {
|
||||||
this.client = client
|
this.client = client
|
||||||
|
|
||||||
|
// Gotcha: Code can be written into the CodeMirror editor but not propagated to codeManager.code
|
||||||
|
// because the update function has not run. We need to initialize the codeManager.code when lsp initializes
|
||||||
|
// because new code could have been written into the editor before the update callback is initialized.
|
||||||
|
// There appears to be limited ways to safely get the current doc content. This appears to be sync and safe.
|
||||||
|
const kclLspPlugin = this.client.plugins.find((plugin) => {
|
||||||
|
return plugin.client.name === 'kcl'
|
||||||
|
})
|
||||||
|
if (kclLspPlugin) {
|
||||||
|
// @ts-ignore Ignoring this private dereference of .view on the plugin. I do not have another helper method that can give me doc string
|
||||||
|
codeManager.code = kclLspPlugin.view.state.doc.toString()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// When a doc update needs to be sent to the server, this holds the
|
// When a doc update needs to be sent to the server, this holds the
|
||||||
|
@ -32,7 +32,7 @@ child_process.spawnSync('git', [
|
|||||||
'clone',
|
'clone',
|
||||||
'--single-branch',
|
'--single-branch',
|
||||||
'--branch',
|
'--branch',
|
||||||
'achalmers/kw-appearance',
|
'achalmers/kw-pattern',
|
||||||
URL_GIT_KCL_SAMPLES,
|
URL_GIT_KCL_SAMPLES,
|
||||||
DIR_KCL_SAMPLES,
|
DIR_KCL_SAMPLES,
|
||||||
])
|
])
|
||||||
|
@ -289,7 +289,10 @@ describe('testing addTagForSketchOnFace', () => {
|
|||||||
segAng(rectangleSegmentA001),
|
segAng(rectangleSegmentA001),
|
||||||
-segLen(rectangleSegmentA001)
|
-segLen(rectangleSegmentA001)
|
||||||
], %)
|
], %)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg02)
|
|> line(
|
||||||
|
endAbsolute = [profileStartX(%), profileStartY(%)],
|
||||||
|
tag = $seg02,
|
||||||
|
)
|
||||||
|> close()
|
|> close()
|
||||||
extrude001 = extrude(sketch001, length = 100)
|
extrude001 = extrude(sketch001, length = 100)
|
||||||
${insertCode}
|
${insertCode}
|
||||||
|
@ -51,16 +51,16 @@ sketch002 = startSketchOn(sketch001, seg03)
|
|||||||
center = [-1.25, 1],
|
center = [-1.25, 1],
|
||||||
radius = mountingHoleDiameter / 2,
|
radius = mountingHoleDiameter / 2,
|
||||||
}, %)
|
}, %)
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
instances = 2,
|
instances = 2,
|
||||||
distance = 2.5,
|
distance = 2.5,
|
||||||
axis = [-1, 0],
|
axis = [-1, 0],
|
||||||
}, %)
|
)
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
instances = 2,
|
instances = 2,
|
||||||
distance = 4,
|
distance = 4,
|
||||||
axis = [0, 1],
|
axis = [0, 1],
|
||||||
}, %)
|
)
|
||||||
|> extrude(%, length = -thickness-.01)
|
|> extrude(%, length = -thickness-.01)
|
||||||
|
|
||||||
sketch003 = startSketchOn(sketch001, seg04)
|
sketch003 = startSketchOn(sketch001, seg04)
|
||||||
@ -68,11 +68,11 @@ sketch003 = startSketchOn(sketch001, seg04)
|
|||||||
center = [1, -1],
|
center = [1, -1],
|
||||||
radius = mountingHoleDiameter / 2,
|
radius = mountingHoleDiameter / 2,
|
||||||
}, %)
|
}, %)
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
instances = 2,
|
instances = 2,
|
||||||
distance = 4,
|
distance = 4,
|
||||||
axis = [1, 0],
|
axis = [1, 0],
|
||||||
}, %)
|
)
|
||||||
|> extrude(%, length = -thickness-0.1)
|
|> extrude(%, length = -thickness-0.1)
|
||||||
`
|
`
|
||||||
|
|
||||||
|
@ -9,6 +9,8 @@ import {
|
|||||||
getCalculatedKclExpressionValue,
|
getCalculatedKclExpressionValue,
|
||||||
programMemoryFromVariables,
|
programMemoryFromVariables,
|
||||||
} from './kclHelpers'
|
} from './kclHelpers'
|
||||||
|
import { parse, resultIsOk } from 'lang/wasm'
|
||||||
|
import { err } from 'lib/trap'
|
||||||
|
|
||||||
const isValidVariableName = (name: string) =>
|
const isValidVariableName = (name: string) =>
|
||||||
/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(name)
|
/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(name)
|
||||||
@ -50,7 +52,20 @@ export function useCalculateKclExpression({
|
|||||||
bodyPath: [],
|
bodyPath: [],
|
||||||
})
|
})
|
||||||
const [valueNode, setValueNode] = useState<Expr | null>(null)
|
const [valueNode, setValueNode] = useState<Expr | null>(null)
|
||||||
const [calcResult, setCalcResult] = useState('NAN')
|
// Gotcha: If we do not attempt to parse numeric literals instantly it means that there is an async action to verify
|
||||||
|
// the value is good. This means all E2E tests have a race condition on when they can hit "next" in the command bar.
|
||||||
|
// Most scenarios automatically pass a numeric literal. We can try to parse that first, otherwise make it go through the slow
|
||||||
|
// async method.
|
||||||
|
// If we pass in numeric literals, we should instantly parse them, they have nothing to do with application memory
|
||||||
|
const _code_value = `const __result__ = ${value}`
|
||||||
|
const codeValueParseResult = parse(_code_value)
|
||||||
|
let isValueParsable = true
|
||||||
|
if (err(codeValueParseResult) || !resultIsOk(codeValueParseResult)) {
|
||||||
|
isValueParsable = false
|
||||||
|
}
|
||||||
|
const initialCalcResult: number | string =
|
||||||
|
Number.isNaN(Number(value)) || !isValueParsable ? 'NAN' : value
|
||||||
|
const [calcResult, setCalcResult] = useState(initialCalcResult)
|
||||||
const [newVariableName, setNewVariableName] = useState('')
|
const [newVariableName, setNewVariableName] = useState('')
|
||||||
const [isNewVariableNameUnique, setIsNewVariableNameUnique] = useState(true)
|
const [isNewVariableNameUnique, setIsNewVariableNameUnique] = useState(true)
|
||||||
|
|
||||||
|
@ -36,5 +36,11 @@ run-sim-test test_name:
|
|||||||
{{cita}} -p kcl-lib -- simulation_tests::{{test_name}}::unparse
|
{{cita}} -p kcl-lib -- simulation_tests::{{test_name}}::unparse
|
||||||
TWENTY_TWENTY=overwrite {{cita}} -p kcl-lib -- tests::{{test_name}}::kcl_test_execute
|
TWENTY_TWENTY=overwrite {{cita}} -p kcl-lib -- tests::{{test_name}}::kcl_test_execute
|
||||||
|
|
||||||
|
overwrite-sim-test test_name:
|
||||||
|
EXPECTORATE=overwrite {{cita}} -p kcl-lib -- simulation_tests::{{test_name}}::parse
|
||||||
|
EXPECTORATE=overwrite {{cita}} -p kcl-lib -- simulation_tests::{{test_name}}::unparse
|
||||||
|
{{cita}} -p kcl-lib -- tests::{{test_name}}::kcl_test_execute
|
||||||
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
export RUST_BRACKTRACE="full" && cargo nextest run --workspace --test-threads=1
|
export RUST_BRACKTRACE="full" && cargo nextest run --workspace --test-threads=1
|
||||||
|
@ -944,13 +944,7 @@ mod tests {
|
|||||||
let snippet = pattern_fn.to_autocomplete_snippet().unwrap();
|
let snippet = pattern_fn.to_autocomplete_snippet().unwrap();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
snippet,
|
snippet,
|
||||||
r#"patternCircular3d({
|
r#"patternCircular3d(${0:%}, instances = ${1:10}, axis = [${2:3.14}, ${3:3.14}, ${4:3.14}], center = [${5:3.14}, ${6:3.14}, ${7:3.14}], arc_degrees = ${8:3.14}, rotate_duplicates = ${9:false})${}"#
|
||||||
instances = ${0:10},
|
|
||||||
axis = [${1:3.14}, ${2:3.14}, ${3:3.14}],
|
|
||||||
center = [${4:3.14}, ${5:3.14}, ${6:3.14}],
|
|
||||||
arcDegrees = ${7:3.14},
|
|
||||||
rotateDuplicates = ${8:false},
|
|
||||||
}, ${9:%})${}"#
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1006,11 +1000,7 @@ mod tests {
|
|||||||
let snippet = pattern_fn.to_autocomplete_snippet().unwrap();
|
let snippet = pattern_fn.to_autocomplete_snippet().unwrap();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
snippet,
|
snippet,
|
||||||
r#"patternLinear2d({
|
r#"patternLinear2d(${0:%}, instances = ${1:10}, distance = ${2:3.14}, axis = [${3:3.14}, ${4:3.14}])${}"#
|
||||||
instances = ${0:10},
|
|
||||||
distance = ${1:3.14},
|
|
||||||
axis = [${2:3.14}, ${3:3.14}],
|
|
||||||
}, ${4:%})${}"#
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1543,13 +1543,13 @@ sphere = startSketchOn('XZ')
|
|||||||
}, %)
|
}, %)
|
||||||
|> close()
|
|> close()
|
||||||
|> revolve({ axis: 'x' }, %)
|
|> revolve({ axis: 'x' }, %)
|
||||||
|> patternCircular3d({
|
|> patternCircular3d(
|
||||||
axis: [0, 0, 1],
|
axis = [0, 0, 1],
|
||||||
center: [0, 0, 0],
|
center = [0, 0, 0],
|
||||||
repetitions: 10,
|
repetitions = 10,
|
||||||
arcDegrees: 360,
|
arcDegrees = 360,
|
||||||
rotateDuplicates: true
|
rotateDuplicates = true,
|
||||||
}, %)
|
)
|
||||||
|
|
||||||
// Sketch and revolve the outside bearing
|
// Sketch and revolve the outside bearing
|
||||||
outsideRevolve = startSketchOn('XZ')
|
outsideRevolve = startSketchOn('XZ')
|
||||||
@ -1644,13 +1644,13 @@ sphere = startSketchOn('XZ')
|
|||||||
}, %)
|
}, %)
|
||||||
|> close()
|
|> close()
|
||||||
|> revolve({ axis = 'x' }, %)
|
|> revolve({ axis = 'x' }, %)
|
||||||
|> patternCircular3d({
|
|> patternCircular3d(
|
||||||
axis = [0, 0, 1],
|
axis = [0, 0, 1],
|
||||||
center = [0, 0, 0],
|
center = [0, 0, 0],
|
||||||
repetitions = 10,
|
repetitions = 10,
|
||||||
arcDegrees = 360,
|
arcDegrees = 360,
|
||||||
rotateDuplicates = true
|
rotateDuplicates = true,
|
||||||
}, %)
|
)
|
||||||
|
|
||||||
// Sketch and revolve the outside bearing
|
// Sketch and revolve the outside bearing
|
||||||
outsideRevolve = startSketchOn('XZ')
|
outsideRevolve = startSketchOn('XZ')
|
||||||
|
@ -180,12 +180,12 @@ pub async fn appearance(_exec_state: &mut ExecState, args: Args) -> Result<KclVa
|
|||||||
/// color = '#ff0000',
|
/// color = '#ff0000',
|
||||||
/// metalness = 90,
|
/// metalness = 90,
|
||||||
/// roughness = 90
|
/// roughness = 90
|
||||||
/// )
|
/// )
|
||||||
/// |> patternLinear3d({
|
/// |> patternLinear3d(
|
||||||
/// axis = [1, 0, 1],
|
/// axis = [1, 0, 1],
|
||||||
/// instances = 7,
|
/// instances = 7,
|
||||||
/// distance = 6
|
/// distance = 6
|
||||||
/// }, %)
|
/// )
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
@ -199,16 +199,16 @@ pub async fn appearance(_exec_state: &mut ExecState, args: Args) -> Result<KclVa
|
|||||||
/// |> close()
|
/// |> close()
|
||||||
///
|
///
|
||||||
/// example = extrude(exampleSketch, length = 1)
|
/// example = extrude(exampleSketch, length = 1)
|
||||||
/// |> patternLinear3d({
|
/// |> patternLinear3d(
|
||||||
/// axis = [1, 0, 1],
|
/// axis = [1, 0, 1],
|
||||||
/// instances = 7,
|
/// instances = 7,
|
||||||
/// distance = 6
|
/// distance = 6
|
||||||
/// }, %)
|
/// )
|
||||||
/// |> appearance(
|
/// |> appearance(
|
||||||
/// color = '#ff0000',
|
/// color = '#ff0000',
|
||||||
/// metalness = 90,
|
/// metalness = 90,
|
||||||
/// roughness = 90
|
/// roughness = 90
|
||||||
/// )
|
/// )
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
@ -219,12 +219,12 @@ pub async fn appearance(_exec_state: &mut ExecState, args: Args) -> Result<KclVa
|
|||||||
/// |> line(end = [-1, 0])
|
/// |> line(end = [-1, 0])
|
||||||
/// |> line(end = [0, -5])
|
/// |> line(end = [0, -5])
|
||||||
/// |> close()
|
/// |> close()
|
||||||
/// |> patternCircular2d({
|
/// |> patternCircular2d(
|
||||||
/// center = [0, 0],
|
/// center = [0, 0],
|
||||||
/// instances = 13,
|
/// instances = 13,
|
||||||
/// arcDegrees = 360,
|
/// arcDegrees = 360,
|
||||||
/// rotateDuplicates = true
|
/// rotateDuplicates = true
|
||||||
/// }, %)
|
/// )
|
||||||
///
|
///
|
||||||
/// example = extrude(exampleSketch, length = 1)
|
/// example = extrude(exampleSketch, length = 1)
|
||||||
/// |> appearance(
|
/// |> appearance(
|
||||||
|
@ -440,13 +440,6 @@ impl Args {
|
|||||||
FromArgs::from_args(self, 0)
|
FromArgs::from_args(self, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn get_data_and_solid_set<'a, T>(&'a self) -> Result<(T, SolidSet), KclError>
|
|
||||||
where
|
|
||||||
T: serde::de::DeserializeOwned + FromKclValue<'a> + Sized,
|
|
||||||
{
|
|
||||||
FromArgs::from_args(self, 0)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub(crate) fn get_data_and_solid<'a, T>(&'a self) -> Result<(T, Box<Solid>), KclError>
|
pub(crate) fn get_data_and_solid<'a, T>(&'a self) -> Result<(T, Box<Solid>), KclError>
|
||||||
where
|
where
|
||||||
T: serde::de::DeserializeOwned + FromKclValue<'a> + Sized,
|
T: serde::de::DeserializeOwned + FromKclValue<'a> + Sized,
|
||||||
@ -943,72 +936,6 @@ impl<'a> FromKclValue<'a> for kittycad_modeling_cmds::coord::Direction {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> FromKclValue<'a> for super::patterns::CircularPattern3dData {
|
|
||||||
fn from_kcl_val(arg: &'a KclValue) -> Option<Self> {
|
|
||||||
let obj = arg.as_object()?;
|
|
||||||
let_field_of!(obj, instances);
|
|
||||||
let_field_of!(obj, arc_degrees "arcDegrees");
|
|
||||||
let_field_of!(obj, rotate_duplicates "rotateDuplicates");
|
|
||||||
let_field_of!(obj, axis);
|
|
||||||
let_field_of!(obj, center);
|
|
||||||
let_field_of!(obj, use_original? "useOriginal");
|
|
||||||
Some(Self {
|
|
||||||
instances,
|
|
||||||
axis,
|
|
||||||
center,
|
|
||||||
arc_degrees,
|
|
||||||
rotate_duplicates,
|
|
||||||
use_original,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'a> FromKclValue<'a> for super::patterns::CircularPattern2dData {
|
|
||||||
fn from_kcl_val(arg: &'a KclValue) -> Option<Self> {
|
|
||||||
let obj = arg.as_object()?;
|
|
||||||
let_field_of!(obj, instances);
|
|
||||||
let_field_of!(obj, arc_degrees "arcDegrees");
|
|
||||||
let_field_of!(obj, rotate_duplicates "rotateDuplicates");
|
|
||||||
let_field_of!(obj, center);
|
|
||||||
let_field_of!(obj, use_original? "useOriginal");
|
|
||||||
Some(Self {
|
|
||||||
instances,
|
|
||||||
center,
|
|
||||||
arc_degrees,
|
|
||||||
rotate_duplicates,
|
|
||||||
use_original,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'a> FromKclValue<'a> for super::patterns::LinearPattern3dData {
|
|
||||||
fn from_kcl_val(arg: &'a KclValue) -> Option<Self> {
|
|
||||||
let obj = arg.as_object()?;
|
|
||||||
let_field_of!(obj, distance);
|
|
||||||
let_field_of!(obj, instances);
|
|
||||||
let_field_of!(obj, axis);
|
|
||||||
Some(Self {
|
|
||||||
instances,
|
|
||||||
distance,
|
|
||||||
axis,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'a> FromKclValue<'a> for super::patterns::LinearPattern2dData {
|
|
||||||
fn from_kcl_val(arg: &'a KclValue) -> Option<Self> {
|
|
||||||
let obj = arg.as_object()?;
|
|
||||||
let_field_of!(obj, distance);
|
|
||||||
let_field_of!(obj, instances);
|
|
||||||
let_field_of!(obj, axis);
|
|
||||||
Some(Self {
|
|
||||||
instances,
|
|
||||||
distance,
|
|
||||||
axis,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'a> FromKclValue<'a> for super::sketch::BezierData {
|
impl<'a> FromKclValue<'a> for super::sketch::BezierData {
|
||||||
fn from_kcl_val(arg: &'a KclValue) -> Option<Self> {
|
fn from_kcl_val(arg: &'a KclValue) -> Option<Self> {
|
||||||
let obj = arg.as_object()?;
|
let obj = arg.as_object()?;
|
||||||
|
@ -29,22 +29,6 @@ use crate::{
|
|||||||
|
|
||||||
const MUST_HAVE_ONE_INSTANCE: &str = "There must be at least 1 instance of your geometry";
|
const MUST_HAVE_ONE_INSTANCE: &str = "There must be at least 1 instance of your geometry";
|
||||||
|
|
||||||
/// Data for a linear pattern on a 2D sketch.
|
|
||||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
|
||||||
#[ts(export)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
pub struct LinearPattern2dData {
|
|
||||||
/// The number of total instances. Must be greater than or equal to 1.
|
|
||||||
/// This includes the original entity. For example, if instances is 2,
|
|
||||||
/// there will be two copies -- the original, and one new copy.
|
|
||||||
/// If instances is 1, this has no effect.
|
|
||||||
pub instances: u32,
|
|
||||||
/// The distance between each repetition. This can also be referred to as spacing.
|
|
||||||
pub distance: f64,
|
|
||||||
/// The axis of the pattern. This is a 2D vector.
|
|
||||||
pub axis: [f64; 2],
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Data for a linear pattern on a 3D model.
|
/// Data for a linear pattern on a 3D model.
|
||||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
||||||
#[ts(export)]
|
#[ts(export)]
|
||||||
@ -689,10 +673,13 @@ mod tests {
|
|||||||
|
|
||||||
/// A linear pattern on a 2D sketch.
|
/// A linear pattern on a 2D sketch.
|
||||||
pub async fn pattern_linear_2d(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
pub async fn pattern_linear_2d(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
||||||
let (data, sketch_set, use_original): (LinearPattern2dData, SketchSet, Option<bool>) =
|
let sketch_set: SketchSet = args.get_unlabeled_kw_arg("sketchSet")?;
|
||||||
super::args::FromArgs::from_args(&args, 0)?;
|
let instances: u32 = args.get_kw_arg("instances")?;
|
||||||
|
let distance: f64 = args.get_kw_arg("distance")?;
|
||||||
|
let axis: [f64; 2] = args.get_kw_arg("axis")?;
|
||||||
|
let use_original: Option<bool> = args.get_kw_arg_opt("useOriginal")?;
|
||||||
|
|
||||||
if data.axis == [0.0, 0.0] {
|
if axis == [0.0, 0.0] {
|
||||||
return Err(KclError::Semantic(KclErrorDetails {
|
return Err(KclError::Semantic(KclErrorDetails {
|
||||||
message:
|
message:
|
||||||
"The axis of the linear pattern cannot be the zero vector. Otherwise they will just duplicate in place."
|
"The axis of the linear pattern cannot be the zero vector. Otherwise they will just duplicate in place."
|
||||||
@ -701,7 +688,8 @@ pub async fn pattern_linear_2d(exec_state: &mut ExecState, args: Args) -> Result
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
let sketches = inner_pattern_linear_2d(data, sketch_set, use_original, exec_state, args).await?;
|
let sketches =
|
||||||
|
inner_pattern_linear_2d(sketch_set, instances, distance, axis, use_original, exec_state, args).await?;
|
||||||
Ok(sketches.into())
|
Ok(sketches.into())
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -711,31 +699,41 @@ pub async fn pattern_linear_2d(exec_state: &mut ExecState, args: Args) -> Result
|
|||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// exampleSketch = startSketchOn('XZ')
|
/// exampleSketch = startSketchOn('XZ')
|
||||||
/// |> circle({ center = [0, 0], radius = 1 }, %)
|
/// |> circle({ center = [0, 0], radius = 1 }, %)
|
||||||
/// |> patternLinear2d({
|
/// |> patternLinear2d(
|
||||||
/// axis = [1, 0],
|
/// axis = [1, 0],
|
||||||
/// instances = 7,
|
/// instances = 7,
|
||||||
/// distance = 4
|
/// distance = 4
|
||||||
/// }, %)
|
/// )
|
||||||
///
|
///
|
||||||
/// example = extrude(exampleSketch, length = 1)
|
/// example = extrude(exampleSketch, length = 1)
|
||||||
/// ```
|
/// ```
|
||||||
#[stdlib {
|
#[stdlib {
|
||||||
name = "patternLinear2d",
|
name = "patternLinear2d",
|
||||||
|
keywords = true,
|
||||||
|
unlabeled_first = true,
|
||||||
|
args = {
|
||||||
|
sketch_set = { docs = "The sketch(es) to duplicate" },
|
||||||
|
instances = { docs = "The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect." },
|
||||||
|
distance = { docs = "Distance between each repetition. Also known as 'spacing'."},
|
||||||
|
axis = { docs = "The axis of the pattern. A 2D vector." },
|
||||||
|
use_original = { docs = "If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false." },
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
async fn inner_pattern_linear_2d(
|
async fn inner_pattern_linear_2d(
|
||||||
data: LinearPattern2dData,
|
|
||||||
sketch_set: SketchSet,
|
sketch_set: SketchSet,
|
||||||
|
instances: u32,
|
||||||
|
distance: f64,
|
||||||
|
axis: [f64; 2],
|
||||||
use_original: Option<bool>,
|
use_original: Option<bool>,
|
||||||
exec_state: &mut ExecState,
|
exec_state: &mut ExecState,
|
||||||
args: Args,
|
args: Args,
|
||||||
) -> Result<Vec<Box<Sketch>>, KclError> {
|
) -> Result<Vec<Box<Sketch>>, KclError> {
|
||||||
let axis = data.axis;
|
|
||||||
let [x, y] = axis;
|
let [x, y] = axis;
|
||||||
let axis_len = f64::sqrt(x * x + y * y);
|
let axis_len = f64::sqrt(x * x + y * y);
|
||||||
let normalized_axis = kcmc::shared::Point2d::from([x / axis_len, y / axis_len]);
|
let normalized_axis = kcmc::shared::Point2d::from([x / axis_len, y / axis_len]);
|
||||||
let transforms: Vec<_> = (1..data.instances)
|
let transforms: Vec<_> = (1..instances)
|
||||||
.map(|i| {
|
.map(|i| {
|
||||||
let d = data.distance * (i as f64);
|
let d = distance * (i as f64);
|
||||||
let translate = (normalized_axis * d).with_z(0.0).map(LengthUnit);
|
let translate = (normalized_axis * d).with_z(0.0).map(LengthUnit);
|
||||||
vec![Transform {
|
vec![Transform {
|
||||||
translate,
|
translate,
|
||||||
@ -755,10 +753,13 @@ async fn inner_pattern_linear_2d(
|
|||||||
|
|
||||||
/// A linear pattern on a 3D model.
|
/// A linear pattern on a 3D model.
|
||||||
pub async fn pattern_linear_3d(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
pub async fn pattern_linear_3d(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
||||||
let (data, solid_set, use_original): (LinearPattern3dData, SolidSet, Option<bool>) =
|
let solid_set: SolidSet = args.get_unlabeled_kw_arg("solidSet")?;
|
||||||
super::args::FromArgs::from_args(&args, 0)?;
|
let instances: u32 = args.get_kw_arg("instances")?;
|
||||||
|
let distance: f64 = args.get_kw_arg("distance")?;
|
||||||
|
let axis: [f64; 3] = args.get_kw_arg("axis")?;
|
||||||
|
let use_original: Option<bool> = args.get_kw_arg_opt("useOriginal")?;
|
||||||
|
|
||||||
if data.axis == [0.0, 0.0, 0.0] {
|
if axis == [0.0, 0.0, 0.0] {
|
||||||
return Err(KclError::Semantic(KclErrorDetails {
|
return Err(KclError::Semantic(KclErrorDetails {
|
||||||
message:
|
message:
|
||||||
"The axis of the linear pattern cannot be the zero vector. Otherwise they will just duplicate in place."
|
"The axis of the linear pattern cannot be the zero vector. Otherwise they will just duplicate in place."
|
||||||
@ -767,7 +768,7 @@ pub async fn pattern_linear_3d(exec_state: &mut ExecState, args: Args) -> Result
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
let solids = inner_pattern_linear_3d(data, solid_set, use_original, exec_state, args).await?;
|
let solids = inner_pattern_linear_3d(solid_set, instances, distance, axis, use_original, exec_state, args).await?;
|
||||||
Ok(solids.into())
|
Ok(solids.into())
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -783,30 +784,40 @@ pub async fn pattern_linear_3d(exec_state: &mut ExecState, args: Args) -> Result
|
|||||||
/// |> close()
|
/// |> close()
|
||||||
///
|
///
|
||||||
/// example = extrude(exampleSketch, length = 1)
|
/// example = extrude(exampleSketch, length = 1)
|
||||||
/// |> patternLinear3d({
|
/// |> patternLinear3d(
|
||||||
/// axis = [1, 0, 1],
|
/// axis = [1, 0, 1],
|
||||||
/// instances = 7,
|
/// instances = 7,
|
||||||
/// distance = 6
|
/// distance = 6
|
||||||
/// }, %)
|
/// )
|
||||||
/// ```
|
/// ```
|
||||||
#[stdlib {
|
#[stdlib {
|
||||||
name = "patternLinear3d",
|
name = "patternLinear3d",
|
||||||
feature_tree_operation = true,
|
feature_tree_operation = true,
|
||||||
|
keywords = true,
|
||||||
|
unlabeled_first = true,
|
||||||
|
args = {
|
||||||
|
solid_set = { docs = "The solid(s) to duplicate" },
|
||||||
|
instances = { docs = "The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect." },
|
||||||
|
distance = { docs = "Distance between each repetition. Also known as 'spacing'."},
|
||||||
|
axis = { docs = "The axis of the pattern. A 2D vector." },
|
||||||
|
use_original = { docs = "If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false." },
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
async fn inner_pattern_linear_3d(
|
async fn inner_pattern_linear_3d(
|
||||||
data: LinearPattern3dData,
|
|
||||||
solid_set: SolidSet,
|
solid_set: SolidSet,
|
||||||
|
instances: u32,
|
||||||
|
distance: f64,
|
||||||
|
axis: [f64; 3],
|
||||||
use_original: Option<bool>,
|
use_original: Option<bool>,
|
||||||
exec_state: &mut ExecState,
|
exec_state: &mut ExecState,
|
||||||
args: Args,
|
args: Args,
|
||||||
) -> Result<Vec<Box<Solid>>, KclError> {
|
) -> Result<Vec<Box<Solid>>, KclError> {
|
||||||
let axis = data.axis;
|
|
||||||
let [x, y, z] = axis;
|
let [x, y, z] = axis;
|
||||||
let axis_len = f64::sqrt(x * x + y * y + z * z);
|
let axis_len = f64::sqrt(x * x + y * y + z * z);
|
||||||
let normalized_axis = kcmc::shared::Point3d::from([x / axis_len, y / axis_len, z / axis_len]);
|
let normalized_axis = kcmc::shared::Point3d::from([x / axis_len, y / axis_len, z / axis_len]);
|
||||||
let transforms: Vec<_> = (1..data.instances)
|
let transforms: Vec<_> = (1..instances)
|
||||||
.map(|i| {
|
.map(|i| {
|
||||||
let d = data.distance * (i as f64);
|
let d = distance * (i as f64);
|
||||||
let translate = (normalized_axis * d).map(LengthUnit);
|
let translate = (normalized_axis * d).map(LengthUnit);
|
||||||
vec![Transform {
|
vec![Transform {
|
||||||
translate,
|
translate,
|
||||||
@ -828,7 +839,7 @@ async fn inner_pattern_linear_3d(
|
|||||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
||||||
#[ts(export)]
|
#[ts(export)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct CircularPattern2dData {
|
struct CircularPattern2dData {
|
||||||
/// The number of total instances. Must be greater than or equal to 1.
|
/// The number of total instances. Must be greater than or equal to 1.
|
||||||
/// This includes the original entity. For example, if instances is 2,
|
/// This includes the original entity. For example, if instances is 2,
|
||||||
/// there will be two copies -- the original, and one new copy.
|
/// there will be two copies -- the original, and one new copy.
|
||||||
@ -870,7 +881,7 @@ pub struct CircularPattern3dData {
|
|||||||
pub use_original: Option<bool>,
|
pub use_original: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum CircularPattern {
|
enum CircularPattern {
|
||||||
ThreeD(CircularPattern3dData),
|
ThreeD(CircularPattern3dData),
|
||||||
TwoD(CircularPattern2dData),
|
TwoD(CircularPattern2dData),
|
||||||
}
|
}
|
||||||
@ -941,9 +952,24 @@ impl CircularPattern {
|
|||||||
|
|
||||||
/// A circular pattern on a 2D sketch.
|
/// A circular pattern on a 2D sketch.
|
||||||
pub async fn pattern_circular_2d(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
pub async fn pattern_circular_2d(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
||||||
let (data, sketch_set): (CircularPattern2dData, SketchSet) = args.get_data_and_sketch_set()?;
|
let sketch_set: SketchSet = args.get_unlabeled_kw_arg("sketchSet")?;
|
||||||
|
let instances: u32 = args.get_kw_arg("instances")?;
|
||||||
|
let center: [f64; 2] = args.get_kw_arg("center")?;
|
||||||
|
let arc_degrees: f64 = args.get_kw_arg("arcDegrees")?;
|
||||||
|
let rotate_duplicates: bool = args.get_kw_arg("rotateDuplicates")?;
|
||||||
|
let use_original: Option<bool> = args.get_kw_arg_opt("useOriginal")?;
|
||||||
|
|
||||||
let sketches = inner_pattern_circular_2d(data, sketch_set, exec_state, args).await?;
|
let sketches = inner_pattern_circular_2d(
|
||||||
|
sketch_set,
|
||||||
|
instances,
|
||||||
|
center,
|
||||||
|
arc_degrees,
|
||||||
|
rotate_duplicates,
|
||||||
|
use_original,
|
||||||
|
exec_state,
|
||||||
|
args,
|
||||||
|
)
|
||||||
|
.await?;
|
||||||
Ok(sketches.into())
|
Ok(sketches.into())
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -959,21 +985,36 @@ pub async fn pattern_circular_2d(exec_state: &mut ExecState, args: Args) -> Resu
|
|||||||
/// |> line(end = [-1, 0])
|
/// |> line(end = [-1, 0])
|
||||||
/// |> line(end = [0, -5])
|
/// |> line(end = [0, -5])
|
||||||
/// |> close()
|
/// |> close()
|
||||||
/// |> patternCircular2d({
|
/// |> patternCircular2d(
|
||||||
/// center = [0, 0],
|
/// center = [0, 0],
|
||||||
/// instances = 13,
|
/// instances = 13,
|
||||||
/// arcDegrees = 360,
|
/// arcDegrees = 360,
|
||||||
/// rotateDuplicates = true
|
/// rotateDuplicates = true
|
||||||
/// }, %)
|
/// )
|
||||||
///
|
///
|
||||||
/// example = extrude(exampleSketch, length = 1)
|
/// example = extrude(exampleSketch, length = 1)
|
||||||
/// ```
|
/// ```
|
||||||
#[stdlib {
|
#[stdlib {
|
||||||
name = "patternCircular2d",
|
name = "patternCircular2d",
|
||||||
|
keywords = true,
|
||||||
|
unlabeled_first = true,
|
||||||
|
args = {
|
||||||
|
sketch_set = { docs = "Which sketch(es) to pattern" },
|
||||||
|
instances = { docs = "The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect."},
|
||||||
|
center = { docs = "The center about which to make the pattern. This is a 2D vector."},
|
||||||
|
arc_degrees = { docs = "The arc angle (in degrees) to place the repetitions. Must be greater than 0."},
|
||||||
|
rotate_duplicates= { docs = "Whether or not to rotate the duplicates as they are copied."},
|
||||||
|
use_original= { docs = "If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false."},
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
async fn inner_pattern_circular_2d(
|
async fn inner_pattern_circular_2d(
|
||||||
data: CircularPattern2dData,
|
|
||||||
sketch_set: SketchSet,
|
sketch_set: SketchSet,
|
||||||
|
instances: u32,
|
||||||
|
center: [f64; 2],
|
||||||
|
arc_degrees: f64,
|
||||||
|
rotate_duplicates: bool,
|
||||||
|
use_original: Option<bool>,
|
||||||
exec_state: &mut ExecState,
|
exec_state: &mut ExecState,
|
||||||
args: Args,
|
args: Args,
|
||||||
) -> Result<Vec<Box<Sketch>>, KclError> {
|
) -> Result<Vec<Box<Sketch>>, KclError> {
|
||||||
@ -982,6 +1023,13 @@ async fn inner_pattern_circular_2d(
|
|||||||
if args.ctx.context_type == crate::execution::ContextType::Mock {
|
if args.ctx.context_type == crate::execution::ContextType::Mock {
|
||||||
return Ok(starting_sketches);
|
return Ok(starting_sketches);
|
||||||
}
|
}
|
||||||
|
let data = CircularPattern2dData {
|
||||||
|
instances,
|
||||||
|
center,
|
||||||
|
arc_degrees,
|
||||||
|
rotate_duplicates,
|
||||||
|
use_original,
|
||||||
|
};
|
||||||
|
|
||||||
let mut sketches = Vec::new();
|
let mut sketches = Vec::new();
|
||||||
for sketch in starting_sketches.iter() {
|
for sketch in starting_sketches.iter() {
|
||||||
@ -1008,9 +1056,36 @@ async fn inner_pattern_circular_2d(
|
|||||||
|
|
||||||
/// A circular pattern on a 3D model.
|
/// A circular pattern on a 3D model.
|
||||||
pub async fn pattern_circular_3d(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
pub async fn pattern_circular_3d(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
||||||
let (data, solid_set): (CircularPattern3dData, SolidSet) = args.get_data_and_solid_set()?;
|
let solid_set: SolidSet = args.get_unlabeled_kw_arg("solidSet")?;
|
||||||
|
// The number of total instances. Must be greater than or equal to 1.
|
||||||
|
// This includes the original entity. For example, if instances is 2,
|
||||||
|
// there will be two copies -- the original, and one new copy.
|
||||||
|
// If instances is 1, this has no effect.
|
||||||
|
let instances: u32 = args.get_kw_arg("instances")?;
|
||||||
|
// The axis around which to make the pattern. This is a 3D vector.
|
||||||
|
let axis: [f64; 3] = args.get_kw_arg("axis")?;
|
||||||
|
// The center about which to make the pattern. This is a 3D vector.
|
||||||
|
let center: [f64; 3] = args.get_kw_arg("center")?;
|
||||||
|
// The arc angle (in degrees) to place the repetitions. Must be greater than 0.
|
||||||
|
let arc_degrees: f64 = args.get_kw_arg("arcDegrees")?;
|
||||||
|
// Whether or not to rotate the duplicates as they are copied.
|
||||||
|
let rotate_duplicates: bool = args.get_kw_arg("rotateDuplicates")?;
|
||||||
|
// If the target being patterned is itself a pattern, then, should you use the original solid,
|
||||||
|
// or the pattern?
|
||||||
|
let use_original: Option<bool> = args.get_kw_arg_opt("useOriginal")?;
|
||||||
|
|
||||||
let solids = inner_pattern_circular_3d(data, solid_set, exec_state, args).await?;
|
let solids = inner_pattern_circular_3d(
|
||||||
|
solid_set,
|
||||||
|
instances,
|
||||||
|
axis,
|
||||||
|
center,
|
||||||
|
arc_degrees,
|
||||||
|
rotate_duplicates,
|
||||||
|
use_original,
|
||||||
|
exec_state,
|
||||||
|
args,
|
||||||
|
)
|
||||||
|
.await?;
|
||||||
Ok(solids.into())
|
Ok(solids.into())
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1024,21 +1099,38 @@ pub async fn pattern_circular_3d(exec_state: &mut ExecState, args: Args) -> Resu
|
|||||||
/// |> circle({ center = [0, 0], radius = 1 }, %)
|
/// |> circle({ center = [0, 0], radius = 1 }, %)
|
||||||
///
|
///
|
||||||
/// example = extrude(exampleSketch, length = -5)
|
/// example = extrude(exampleSketch, length = -5)
|
||||||
/// |> patternCircular3d({
|
/// |> patternCircular3d(
|
||||||
/// axis = [1, -1, 0],
|
/// axis = [1, -1, 0],
|
||||||
/// center = [10, -20, 0],
|
/// center = [10, -20, 0],
|
||||||
/// instances = 11,
|
/// instances = 11,
|
||||||
/// arcDegrees = 360,
|
/// arcDegrees = 360,
|
||||||
/// rotateDuplicates = true
|
/// rotateDuplicates = true
|
||||||
/// }, %)
|
/// )
|
||||||
/// ```
|
/// ```
|
||||||
#[stdlib {
|
#[stdlib {
|
||||||
name = "patternCircular3d",
|
name = "patternCircular3d",
|
||||||
feature_tree_operation = true,
|
feature_tree_operation = true,
|
||||||
|
keywords = true,
|
||||||
|
unlabeled_first = true,
|
||||||
|
args = {
|
||||||
|
solid_set = { docs = "Which solid(s) to pattern" },
|
||||||
|
instances = { docs = "The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect."},
|
||||||
|
axis = { docs = "The axis around which to make the pattern. This is a 3D vector"},
|
||||||
|
center = { docs = "The center about which to make the pattern. This is a 3D vector."},
|
||||||
|
arc_degrees = { docs = "The arc angle (in degrees) to place the repetitions. Must be greater than 0."},
|
||||||
|
rotate_duplicates= { docs = "Whether or not to rotate the duplicates as they are copied."},
|
||||||
|
use_original= { docs = "If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false."},
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
async fn inner_pattern_circular_3d(
|
async fn inner_pattern_circular_3d(
|
||||||
data: CircularPattern3dData,
|
|
||||||
solid_set: SolidSet,
|
solid_set: SolidSet,
|
||||||
|
instances: u32,
|
||||||
|
axis: [f64; 3],
|
||||||
|
center: [f64; 3],
|
||||||
|
arc_degrees: f64,
|
||||||
|
rotate_duplicates: bool,
|
||||||
|
use_original: Option<bool>,
|
||||||
exec_state: &mut ExecState,
|
exec_state: &mut ExecState,
|
||||||
args: Args,
|
args: Args,
|
||||||
) -> Result<Vec<Box<Solid>>, KclError> {
|
) -> Result<Vec<Box<Solid>>, KclError> {
|
||||||
@ -1055,6 +1147,14 @@ async fn inner_pattern_circular_3d(
|
|||||||
}
|
}
|
||||||
|
|
||||||
let mut solids = Vec::new();
|
let mut solids = Vec::new();
|
||||||
|
let data = CircularPattern3dData {
|
||||||
|
instances,
|
||||||
|
axis,
|
||||||
|
center,
|
||||||
|
arc_degrees,
|
||||||
|
rotate_duplicates,
|
||||||
|
use_original,
|
||||||
|
};
|
||||||
for solid in starting_solids.iter() {
|
for solid in starting_solids.iter() {
|
||||||
let geometries = pattern_circular(
|
let geometries = pattern_circular(
|
||||||
CircularPattern::ThreeD(data.clone()),
|
CircularPattern::ThreeD(data.clone()),
|
||||||
|
@ -334,8 +334,25 @@ impl CallExpressionKw {
|
|||||||
.iter()
|
.iter()
|
||||||
.map(|arg| arg.recast(options, indentation_level, ctxt)),
|
.map(|arg| arg.recast(options, indentation_level, ctxt)),
|
||||||
);
|
);
|
||||||
let args = arg_list.join(", ");
|
let args = arg_list.clone().join(", ");
|
||||||
format!("{indent}{name}({args})")
|
if arg_list.len() >= 4 {
|
||||||
|
let inner_indentation = if ctxt == ExprContext::Pipe {
|
||||||
|
options.get_indentation_offset_pipe(indentation_level + 1)
|
||||||
|
} else {
|
||||||
|
options.get_indentation(indentation_level + 1)
|
||||||
|
};
|
||||||
|
let mut args = arg_list.join(&format!(",\n{inner_indentation}"));
|
||||||
|
args.push(',');
|
||||||
|
let args = args;
|
||||||
|
let end_indent = if ctxt == ExprContext::Pipe {
|
||||||
|
options.get_indentation_offset_pipe(indentation_level)
|
||||||
|
} else {
|
||||||
|
options.get_indentation(indentation_level)
|
||||||
|
};
|
||||||
|
format!("{indent}{name}(\n{inner_indentation}{args}\n{end_indent})")
|
||||||
|
} else {
|
||||||
|
format!("{indent}{name}({args})")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1031,13 +1048,13 @@ sphere = startSketchOn('XZ')
|
|||||||
}, %)
|
}, %)
|
||||||
|> close()
|
|> close()
|
||||||
|> revolve({ axis: 'x' }, %)
|
|> revolve({ axis: 'x' }, %)
|
||||||
|> patternCircular3d({
|
|> patternCircular3d(
|
||||||
axis = [0, 0, 1],
|
axis = [0, 0, 1],
|
||||||
center = [0, 0, 0],
|
center = [0, 0, 0],
|
||||||
repetitions = 10,
|
repetitions = 10,
|
||||||
arcDegrees = 360,
|
arcDegrees = 360,
|
||||||
rotateDuplicates = true
|
rotateDuplicates = true
|
||||||
}, %)
|
)
|
||||||
|
|
||||||
// Sketch and revolve the outside bearing
|
// Sketch and revolve the outside bearing
|
||||||
outsideRevolve = startSketchOn('XZ')
|
outsideRevolve = startSketchOn('XZ')
|
||||||
@ -1098,13 +1115,13 @@ sphere = startSketchOn('XZ')
|
|||||||
}, %)
|
}, %)
|
||||||
|> close()
|
|> close()
|
||||||
|> revolve({ axis = 'x' }, %)
|
|> revolve({ axis = 'x' }, %)
|
||||||
|> patternCircular3d({
|
|> patternCircular3d(
|
||||||
axis = [0, 0, 1],
|
axis = [0, 0, 1],
|
||||||
center = [0, 0, 0],
|
center = [0, 0, 0],
|
||||||
repetitions = 10,
|
repetitions = 10,
|
||||||
arcDegrees = 360,
|
arcDegrees = 360,
|
||||||
rotateDuplicates = true
|
rotateDuplicates = true,
|
||||||
}, %)
|
)
|
||||||
|
|
||||||
// Sketch and revolve the outside bearing
|
// Sketch and revolve the outside bearing
|
||||||
outsideRevolve = startSketchOn('XZ')
|
outsideRevolve = startSketchOn('XZ')
|
||||||
@ -1417,11 +1434,11 @@ tabs_r = startSketchOn({
|
|||||||
radius = hole_diam / 2
|
radius = hole_diam / 2
|
||||||
}, %), %)
|
}, %), %)
|
||||||
|> extrude(-thk, %)
|
|> extrude(-thk, %)
|
||||||
|> patternLinear3d({
|
|> patternLinear3d(
|
||||||
axis = [0, -1, 0],
|
axis = [0, -1, 0],
|
||||||
repetitions = 1,
|
repetitions = 1,
|
||||||
distance = length - 10
|
distance = length - 10
|
||||||
}, %)
|
)
|
||||||
// build the tabs of the mounting bracket (left side)
|
// build the tabs of the mounting bracket (left side)
|
||||||
tabs_l = startSketchOn({
|
tabs_l = startSketchOn({
|
||||||
plane: {
|
plane: {
|
||||||
@ -1444,11 +1461,7 @@ tabs_l = startSketchOn({
|
|||||||
radius = hole_diam / 2
|
radius = hole_diam / 2
|
||||||
}, %), %)
|
}, %), %)
|
||||||
|> extrude(-thk, %)
|
|> extrude(-thk, %)
|
||||||
|> patternLinear3d({
|
|> patternLinear3d(axis = [0, -1, 0], repetitions = 1, distance = length - 10)
|
||||||
axis = [0, -1, 0],
|
|
||||||
repetitions = 1,
|
|
||||||
distance = length - 10
|
|
||||||
}, %)
|
|
||||||
"#;
|
"#;
|
||||||
let program = crate::parsing::top_level_parse(some_program_string).unwrap();
|
let program = crate::parsing::top_level_parse(some_program_string).unwrap();
|
||||||
|
|
||||||
@ -1542,11 +1555,7 @@ tabs_r = startSketchOn({
|
|||||||
radius = hole_diam / 2
|
radius = hole_diam / 2
|
||||||
}, %), %)
|
}, %), %)
|
||||||
|> extrude(-thk, %)
|
|> extrude(-thk, %)
|
||||||
|> patternLinear3d({
|
|> patternLinear3d(axis = [0, -1, 0], repetitions = 1, distance = length - 10)
|
||||||
axis = [0, -1, 0],
|
|
||||||
repetitions = 1,
|
|
||||||
distance = length - 10
|
|
||||||
}, %)
|
|
||||||
// build the tabs of the mounting bracket (left side)
|
// build the tabs of the mounting bracket (left side)
|
||||||
tabs_l = startSketchOn({
|
tabs_l = startSketchOn({
|
||||||
plane = {
|
plane = {
|
||||||
@ -1569,11 +1578,7 @@ tabs_l = startSketchOn({
|
|||||||
radius = hole_diam / 2
|
radius = hole_diam / 2
|
||||||
}, %), %)
|
}, %), %)
|
||||||
|> extrude(-thk, %)
|
|> extrude(-thk, %)
|
||||||
|> patternLinear3d({
|
|> patternLinear3d(axis = [0, -1, 0], repetitions = 1, distance = length - 10)
|
||||||
axis = [0, -1, 0],
|
|
||||||
repetitions = 1,
|
|
||||||
distance = length - 10
|
|
||||||
}, %)
|
|
||||||
"#
|
"#
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
source: kcl/src/simulation_tests.rs
|
source: kcl/src/simulation_tests.rs
|
||||||
description: Result of parsing big_number_angle_to_match_length_x.kcl
|
description: Result of parsing big_number_angle_to_match_length_x.kcl
|
||||||
|
snapshot_kind: text
|
||||||
---
|
---
|
||||||
{
|
{
|
||||||
"Ok": {
|
"Ok": {
|
||||||
|
@ -631,7 +631,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
189,
|
189,
|
||||||
276,
|
277,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -819,8 +819,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
287,
|
288,
|
||||||
430,
|
432,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -844,8 +844,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
287,
|
288,
|
||||||
430,
|
432,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -869,8 +869,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
287,
|
288,
|
||||||
430,
|
432,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -894,8 +894,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
287,
|
288,
|
||||||
430,
|
432,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -919,8 +919,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
287,
|
288,
|
||||||
430,
|
432,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -944,8 +944,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
287,
|
288,
|
||||||
430,
|
432,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -969,8 +969,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
287,
|
288,
|
||||||
430,
|
432,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
source: kcl/src/simulation_tests.rs
|
source: kcl/src/simulation_tests.rs
|
||||||
description: Result of parsing circular_pattern3d_a_pattern.kcl
|
description: Result of parsing circular_pattern3d_a_pattern.kcl
|
||||||
|
snapshot_kind: text
|
||||||
---
|
---
|
||||||
{
|
{
|
||||||
"Ok": {
|
"Ok": {
|
||||||
@ -321,7 +322,7 @@ description: Result of parsing circular_pattern3d_a_pattern.kcl
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 276,
|
"end": 277,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 186,
|
"end": 186,
|
||||||
"name": "pattn1",
|
"name": "pattn1",
|
||||||
@ -331,115 +332,88 @@ description: Result of parsing circular_pattern3d_a_pattern.kcl
|
|||||||
"init": {
|
"init": {
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 260,
|
"type": "LabeledArg",
|
||||||
"properties": [
|
"label": {
|
||||||
{
|
"type": "Identifier",
|
||||||
"end": 225,
|
"name": "axis"
|
||||||
"key": {
|
},
|
||||||
"end": 213,
|
"arg": {
|
||||||
"name": "axis",
|
"elements": [
|
||||||
"start": 209,
|
{
|
||||||
"type": "Identifier"
|
"end": 234,
|
||||||
},
|
"raw": "1",
|
||||||
"start": 209,
|
"start": 233,
|
||||||
"type": "ObjectProperty",
|
|
||||||
"value": {
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"end": 218,
|
|
||||||
"raw": "1",
|
|
||||||
"start": 217,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": {
|
|
||||||
"value": 1.0,
|
|
||||||
"suffix": "None"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 221,
|
|
||||||
"raw": "0",
|
|
||||||
"start": 220,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": {
|
|
||||||
"value": 0.0,
|
|
||||||
"suffix": "None"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 224,
|
|
||||||
"raw": "0",
|
|
||||||
"start": 223,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": {
|
|
||||||
"value": 0.0,
|
|
||||||
"suffix": "None"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"end": 225,
|
|
||||||
"start": 216,
|
|
||||||
"type": "ArrayExpression",
|
|
||||||
"type": "ArrayExpression"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 242,
|
|
||||||
"key": {
|
|
||||||
"end": 238,
|
|
||||||
"name": "instances",
|
|
||||||
"start": 229,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
|
||||||
"start": 229,
|
|
||||||
"type": "ObjectProperty",
|
|
||||||
"value": {
|
|
||||||
"end": 242,
|
|
||||||
"raw": "7",
|
|
||||||
"start": 241,
|
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
"value": 7.0,
|
"value": 1.0,
|
||||||
"suffix": "None"
|
"suffix": "None"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 258,
|
|
||||||
"key": {
|
|
||||||
"end": 254,
|
|
||||||
"name": "distance",
|
|
||||||
"start": 246,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
},
|
||||||
"start": 246,
|
{
|
||||||
"type": "ObjectProperty",
|
"end": 237,
|
||||||
"value": {
|
"raw": "0",
|
||||||
"end": 258,
|
"start": 236,
|
||||||
"raw": "6",
|
|
||||||
"start": 257,
|
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
"value": 6.0,
|
"value": 0.0,
|
||||||
|
"suffix": "None"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"end": 240,
|
||||||
|
"raw": "0",
|
||||||
|
"start": 239,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": {
|
||||||
|
"value": 0.0,
|
||||||
"suffix": "None"
|
"suffix": "None"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
],
|
||||||
],
|
"end": 241,
|
||||||
"start": 205,
|
"start": 232,
|
||||||
"type": "ObjectExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ObjectExpression"
|
"type": "ArrayExpression"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 275,
|
"type": "LabeledArg",
|
||||||
"name": "exampleSketch",
|
"label": {
|
||||||
"start": 262,
|
"type": "Identifier",
|
||||||
"type": "Identifier",
|
"name": "instances"
|
||||||
"type": "Identifier"
|
},
|
||||||
|
"arg": {
|
||||||
|
"end": 258,
|
||||||
|
"raw": "7",
|
||||||
|
"start": 257,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": {
|
||||||
|
"value": 7.0,
|
||||||
|
"suffix": "None"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "LabeledArg",
|
||||||
|
"label": {
|
||||||
|
"type": "Identifier",
|
||||||
|
"name": "distance"
|
||||||
|
},
|
||||||
|
"arg": {
|
||||||
|
"end": 274,
|
||||||
|
"raw": "6",
|
||||||
|
"start": 273,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": {
|
||||||
|
"value": 6.0,
|
||||||
|
"suffix": "None"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
@ -448,15 +422,22 @@ description: Result of parsing circular_pattern3d_a_pattern.kcl
|
|||||||
"start": 189,
|
"start": 189,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 276,
|
"end": 277,
|
||||||
"start": 189,
|
"start": 189,
|
||||||
"type": "CallExpression",
|
"type": "CallExpressionKw",
|
||||||
"type": "CallExpression"
|
"type": "CallExpressionKw",
|
||||||
|
"unlabeled": {
|
||||||
|
"end": 221,
|
||||||
|
"name": "exampleSketch",
|
||||||
|
"start": 208,
|
||||||
|
"type": "Identifier",
|
||||||
|
"type": "Identifier"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"start": 180,
|
"start": 180,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 276,
|
"end": 277,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 180,
|
"start": 180,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
@ -464,241 +445,213 @@ description: Result of parsing circular_pattern3d_a_pattern.kcl
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 430,
|
"end": 432,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 284,
|
"end": 285,
|
||||||
"name": "pattn2",
|
"name": "pattn2",
|
||||||
"start": 278,
|
"start": 279,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 421,
|
"type": "LabeledArg",
|
||||||
"properties": [
|
"label": {
|
||||||
{
|
"type": "Identifier",
|
||||||
"end": 325,
|
"name": "axis"
|
||||||
"key": {
|
},
|
||||||
"end": 313,
|
"arg": {
|
||||||
"name": "axis",
|
"elements": [
|
||||||
"start": 309,
|
{
|
||||||
"type": "Identifier"
|
"end": 328,
|
||||||
},
|
"raw": "0",
|
||||||
"start": 309,
|
"start": 327,
|
||||||
"type": "ObjectProperty",
|
|
||||||
"value": {
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"end": 318,
|
|
||||||
"raw": "0",
|
|
||||||
"start": 317,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": {
|
|
||||||
"value": 0.0,
|
|
||||||
"suffix": "None"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 321,
|
|
||||||
"raw": "0",
|
|
||||||
"start": 320,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": {
|
|
||||||
"value": 0.0,
|
|
||||||
"suffix": "None"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 324,
|
|
||||||
"raw": "1",
|
|
||||||
"start": 323,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": {
|
|
||||||
"value": 1.0,
|
|
||||||
"suffix": "None"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"end": 325,
|
|
||||||
"start": 316,
|
|
||||||
"type": "ArrayExpression",
|
|
||||||
"type": "ArrayExpression"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 353,
|
|
||||||
"key": {
|
|
||||||
"end": 335,
|
|
||||||
"name": "center",
|
|
||||||
"start": 329,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
|
||||||
"start": 329,
|
|
||||||
"type": "ObjectProperty",
|
|
||||||
"value": {
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"argument": {
|
|
||||||
"end": 342,
|
|
||||||
"raw": "20",
|
|
||||||
"start": 340,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": {
|
|
||||||
"value": 20.0,
|
|
||||||
"suffix": "None"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"end": 342,
|
|
||||||
"operator": "-",
|
|
||||||
"start": 339,
|
|
||||||
"type": "UnaryExpression",
|
|
||||||
"type": "UnaryExpression"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"argument": {
|
|
||||||
"end": 347,
|
|
||||||
"raw": "20",
|
|
||||||
"start": 345,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": {
|
|
||||||
"value": 20.0,
|
|
||||||
"suffix": "None"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"end": 347,
|
|
||||||
"operator": "-",
|
|
||||||
"start": 344,
|
|
||||||
"type": "UnaryExpression",
|
|
||||||
"type": "UnaryExpression"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"argument": {
|
|
||||||
"end": 352,
|
|
||||||
"raw": "20",
|
|
||||||
"start": 350,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": {
|
|
||||||
"value": 20.0,
|
|
||||||
"suffix": "None"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"end": 352,
|
|
||||||
"operator": "-",
|
|
||||||
"start": 349,
|
|
||||||
"type": "UnaryExpression",
|
|
||||||
"type": "UnaryExpression"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"end": 353,
|
|
||||||
"start": 338,
|
|
||||||
"type": "ArrayExpression",
|
|
||||||
"type": "ArrayExpression"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 371,
|
|
||||||
"key": {
|
|
||||||
"end": 366,
|
|
||||||
"name": "instances",
|
|
||||||
"start": 357,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
|
||||||
"start": 357,
|
|
||||||
"type": "ObjectProperty",
|
|
||||||
"value": {
|
|
||||||
"end": 371,
|
|
||||||
"raw": "41",
|
|
||||||
"start": 369,
|
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
"value": 41.0,
|
"value": 0.0,
|
||||||
"suffix": "None"
|
"suffix": "None"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 391,
|
|
||||||
"key": {
|
|
||||||
"end": 385,
|
|
||||||
"name": "arcDegrees",
|
|
||||||
"start": 375,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
},
|
||||||
"start": 375,
|
{
|
||||||
"type": "ObjectProperty",
|
"end": 331,
|
||||||
"value": {
|
"raw": "0",
|
||||||
"end": 391,
|
"start": 330,
|
||||||
"raw": "360",
|
|
||||||
"start": 388,
|
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
"value": 360.0,
|
"value": 0.0,
|
||||||
|
"suffix": "None"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"end": 334,
|
||||||
|
"raw": "1",
|
||||||
|
"start": 333,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": {
|
||||||
|
"value": 1.0,
|
||||||
"suffix": "None"
|
"suffix": "None"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
],
|
||||||
{
|
"end": 335,
|
||||||
"end": 419,
|
"start": 326,
|
||||||
"key": {
|
"type": "ArrayExpression",
|
||||||
"end": 411,
|
"type": "ArrayExpression"
|
||||||
"name": "rotateDuplicates",
|
}
|
||||||
"start": 395,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
|
||||||
"start": 395,
|
|
||||||
"type": "ObjectProperty",
|
|
||||||
"value": {
|
|
||||||
"end": 419,
|
|
||||||
"raw": "false",
|
|
||||||
"start": 414,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"start": 305,
|
|
||||||
"type": "ObjectExpression",
|
|
||||||
"type": "ObjectExpression"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 429,
|
"type": "LabeledArg",
|
||||||
"name": "pattn1",
|
"label": {
|
||||||
"start": 423,
|
"type": "Identifier",
|
||||||
"type": "Identifier",
|
"name": "center"
|
||||||
"type": "Identifier"
|
},
|
||||||
|
"arg": {
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"argument": {
|
||||||
|
"end": 352,
|
||||||
|
"raw": "20",
|
||||||
|
"start": 350,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": {
|
||||||
|
"value": 20.0,
|
||||||
|
"suffix": "None"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"end": 352,
|
||||||
|
"operator": "-",
|
||||||
|
"start": 349,
|
||||||
|
"type": "UnaryExpression",
|
||||||
|
"type": "UnaryExpression"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"argument": {
|
||||||
|
"end": 357,
|
||||||
|
"raw": "20",
|
||||||
|
"start": 355,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": {
|
||||||
|
"value": 20.0,
|
||||||
|
"suffix": "None"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"end": 357,
|
||||||
|
"operator": "-",
|
||||||
|
"start": 354,
|
||||||
|
"type": "UnaryExpression",
|
||||||
|
"type": "UnaryExpression"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"argument": {
|
||||||
|
"end": 362,
|
||||||
|
"raw": "20",
|
||||||
|
"start": 360,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": {
|
||||||
|
"value": 20.0,
|
||||||
|
"suffix": "None"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"end": 362,
|
||||||
|
"operator": "-",
|
||||||
|
"start": 359,
|
||||||
|
"type": "UnaryExpression",
|
||||||
|
"type": "UnaryExpression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"end": 363,
|
||||||
|
"start": 348,
|
||||||
|
"type": "ArrayExpression",
|
||||||
|
"type": "ArrayExpression"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "LabeledArg",
|
||||||
|
"label": {
|
||||||
|
"type": "Identifier",
|
||||||
|
"name": "instances"
|
||||||
|
},
|
||||||
|
"arg": {
|
||||||
|
"end": 381,
|
||||||
|
"raw": "41",
|
||||||
|
"start": 379,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": {
|
||||||
|
"value": 41.0,
|
||||||
|
"suffix": "None"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "LabeledArg",
|
||||||
|
"label": {
|
||||||
|
"type": "Identifier",
|
||||||
|
"name": "arcDegrees"
|
||||||
|
},
|
||||||
|
"arg": {
|
||||||
|
"end": 401,
|
||||||
|
"raw": "360",
|
||||||
|
"start": 398,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": {
|
||||||
|
"value": 360.0,
|
||||||
|
"suffix": "None"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "LabeledArg",
|
||||||
|
"label": {
|
||||||
|
"type": "Identifier",
|
||||||
|
"name": "rotateDuplicates"
|
||||||
|
},
|
||||||
|
"arg": {
|
||||||
|
"end": 429,
|
||||||
|
"raw": "false",
|
||||||
|
"start": 424,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 304,
|
"end": 305,
|
||||||
"name": "patternCircular3d",
|
"name": "patternCircular3d",
|
||||||
"start": 287,
|
"start": 288,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 430,
|
"end": 432,
|
||||||
"start": 287,
|
"start": 288,
|
||||||
"type": "CallExpression",
|
"type": "CallExpressionKw",
|
||||||
"type": "CallExpression"
|
"type": "CallExpressionKw",
|
||||||
|
"unlabeled": {
|
||||||
|
"end": 315,
|
||||||
|
"name": "pattn1",
|
||||||
|
"start": 309,
|
||||||
|
"type": "Identifier",
|
||||||
|
"type": "Identifier"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"start": 278,
|
"start": 279,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 430,
|
"end": 432,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 278,
|
"start": 279,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 431,
|
"end": 433,
|
||||||
"nonCodeMeta": {
|
"nonCodeMeta": {
|
||||||
"nonCodeNodes": {
|
"nonCodeNodes": {
|
||||||
"0": [
|
"0": [
|
||||||
@ -713,8 +666,8 @@ description: Result of parsing circular_pattern3d_a_pattern.kcl
|
|||||||
],
|
],
|
||||||
"1": [
|
"1": [
|
||||||
{
|
{
|
||||||
"end": 278,
|
"end": 279,
|
||||||
"start": 276,
|
"start": 277,
|
||||||
"type": "NonCodeNode",
|
"type": "NonCodeNode",
|
||||||
"value": {
|
"value": {
|
||||||
"type": "newLine"
|
"type": "newLine"
|
||||||
|
@ -6,16 +6,18 @@ exampleSketch = startSketchOn('XZ')
|
|||||||
|> close(%)
|
|> close(%)
|
||||||
|> extrude(length = 1)
|
|> extrude(length = 1)
|
||||||
|
|
||||||
pattn1 = patternLinear3d({
|
pattn1 = patternLinear3d(
|
||||||
|
exampleSketch,
|
||||||
axis = [1, 0, 0],
|
axis = [1, 0, 0],
|
||||||
instances = 7,
|
instances = 7,
|
||||||
distance = 6
|
distance = 6,
|
||||||
}, exampleSketch)
|
)
|
||||||
|
|
||||||
pattn2 = patternCircular3d({
|
pattn2 = patternCircular3d(
|
||||||
|
pattn1,
|
||||||
axis = [0, 0, 1],
|
axis = [0, 0, 1],
|
||||||
center = [-20, -20, -20],
|
center = [-20, -20, -20],
|
||||||
instances = 41,
|
instances = 41,
|
||||||
arcDegrees = 360,
|
arcDegrees = 360,
|
||||||
rotateDuplicates = false
|
rotateDuplicates = false,
|
||||||
}, pattn1)
|
)
|
||||||
|
@ -44,17 +44,24 @@ snapshot_kind: text
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"labeledArgs": {
|
"labeledArgs": {
|
||||||
"data": {
|
"axis": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
205,
|
232,
|
||||||
260,
|
241,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"solid_set": {
|
"distance": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
262,
|
273,
|
||||||
275,
|
274,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"instances": {
|
||||||
|
"sourceRange": [
|
||||||
|
257,
|
||||||
|
258,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -62,24 +69,51 @@ snapshot_kind: text
|
|||||||
"name": "patternLinear3d",
|
"name": "patternLinear3d",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
189,
|
189,
|
||||||
276,
|
277,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
"unlabeledArg": null
|
"unlabeledArg": {
|
||||||
|
"sourceRange": [
|
||||||
|
208,
|
||||||
|
221,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"labeledArgs": {
|
"labeledArgs": {
|
||||||
"data": {
|
"arcDegrees": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
305,
|
398,
|
||||||
421,
|
401,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"solid_set": {
|
"axis": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
423,
|
326,
|
||||||
|
335,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"center": {
|
||||||
|
"sourceRange": [
|
||||||
|
348,
|
||||||
|
363,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"instances": {
|
||||||
|
"sourceRange": [
|
||||||
|
379,
|
||||||
|
381,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"rotateDuplicates": {
|
||||||
|
"sourceRange": [
|
||||||
|
424,
|
||||||
429,
|
429,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
@ -87,11 +121,17 @@ snapshot_kind: text
|
|||||||
},
|
},
|
||||||
"name": "patternCircular3d",
|
"name": "patternCircular3d",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
287,
|
288,
|
||||||
430,
|
432,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
"unlabeledArg": null
|
"unlabeledArg": {
|
||||||
|
"sourceRange": [
|
||||||
|
309,
|
||||||
|
315,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
source: kcl/src/simulation_tests.rs
|
source: kcl/src/simulation_tests.rs
|
||||||
description: Artifact commands helix_simple.kcl
|
description: Artifact commands helix_simple.kcl
|
||||||
|
snapshot_kind: text
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@ -383,7 +384,7 @@ description: Artifact commands helix_simple.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
151,
|
151,
|
||||||
242,
|
257,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
|
@ -5,7 +5,7 @@ flowchart LR
|
|||||||
3["Segment<br>[102, 137, 0]"]
|
3["Segment<br>[102, 137, 0]"]
|
||||||
end
|
end
|
||||||
1["Plane<br>[46, 65, 0]"]
|
1["Plane<br>[46, 65, 0]"]
|
||||||
4["Helix<br>[151, 242, 0]"]
|
4["Helix<br>[151, 257, 0]"]
|
||||||
1 --- 2
|
1 --- 2
|
||||||
2 --- 3
|
2 --- 3
|
||||||
3 <--x 4
|
3 <--x 4
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
source: kcl/src/simulation_tests.rs
|
source: kcl/src/simulation_tests.rs
|
||||||
description: Result of parsing helix_simple.kcl
|
description: Result of parsing helix_simple.kcl
|
||||||
|
snapshot_kind: text
|
||||||
---
|
---
|
||||||
{
|
{
|
||||||
"Ok": {
|
"Ok": {
|
||||||
@ -171,7 +172,7 @@ description: Result of parsing helix_simple.kcl
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 242,
|
"end": 257,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 148,
|
"end": 148,
|
||||||
"name": "helixPath",
|
"name": "helixPath",
|
||||||
@ -187,9 +188,9 @@ description: Result of parsing helix_simple.kcl
|
|||||||
"name": "angleStart"
|
"name": "angleStart"
|
||||||
},
|
},
|
||||||
"arg": {
|
"arg": {
|
||||||
"end": 171,
|
"end": 174,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 170,
|
"start": 173,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
@ -205,9 +206,9 @@ description: Result of parsing helix_simple.kcl
|
|||||||
"name": "ccw"
|
"name": "ccw"
|
||||||
},
|
},
|
||||||
"arg": {
|
"arg": {
|
||||||
"end": 183,
|
"end": 188,
|
||||||
"raw": "true",
|
"raw": "true",
|
||||||
"start": 179,
|
"start": 184,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": true
|
"value": true
|
||||||
@ -220,9 +221,9 @@ description: Result of parsing helix_simple.kcl
|
|||||||
"name": "revolutions"
|
"name": "revolutions"
|
||||||
},
|
},
|
||||||
"arg": {
|
"arg": {
|
||||||
"end": 200,
|
"end": 207,
|
||||||
"raw": "5",
|
"raw": "5",
|
||||||
"start": 199,
|
"start": 206,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
@ -238,9 +239,9 @@ description: Result of parsing helix_simple.kcl
|
|||||||
"name": "length"
|
"name": "length"
|
||||||
},
|
},
|
||||||
"arg": {
|
"arg": {
|
||||||
"end": 213,
|
"end": 222,
|
||||||
"raw": "10",
|
"raw": "10",
|
||||||
"start": 211,
|
"start": 220,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
@ -256,9 +257,9 @@ description: Result of parsing helix_simple.kcl
|
|||||||
"name": "radius"
|
"name": "radius"
|
||||||
},
|
},
|
||||||
"arg": {
|
"arg": {
|
||||||
"end": 225,
|
"end": 236,
|
||||||
"raw": "5",
|
"raw": "5",
|
||||||
"start": 224,
|
"start": 235,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
@ -274,9 +275,9 @@ description: Result of parsing helix_simple.kcl
|
|||||||
"name": "axis"
|
"name": "axis"
|
||||||
},
|
},
|
||||||
"arg": {
|
"arg": {
|
||||||
"end": 241,
|
"end": 254,
|
||||||
"name": "edge001",
|
"name": "edge001",
|
||||||
"start": 234,
|
"start": 247,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
}
|
}
|
||||||
@ -288,7 +289,7 @@ description: Result of parsing helix_simple.kcl
|
|||||||
"start": 151,
|
"start": 151,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 242,
|
"end": 257,
|
||||||
"start": 151,
|
"start": 151,
|
||||||
"type": "CallExpressionKw",
|
"type": "CallExpressionKw",
|
||||||
"type": "CallExpressionKw",
|
"type": "CallExpressionKw",
|
||||||
@ -297,14 +298,14 @@ description: Result of parsing helix_simple.kcl
|
|||||||
"start": 139,
|
"start": 139,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 242,
|
"end": 257,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 139,
|
"start": 139,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 243,
|
"end": 258,
|
||||||
"nonCodeMeta": {
|
"nonCodeMeta": {
|
||||||
"nonCodeNodes": {
|
"nonCodeNodes": {
|
||||||
"0": [
|
"0": [
|
||||||
|
@ -3,4 +3,11 @@ helper001 = startSketchOn('XZ')
|
|||||||
|> startProfileAt([0, 0], %)
|
|> startProfileAt([0, 0], %)
|
||||||
|> line(end = [0, 10], tag = $edge001)
|
|> line(end = [0, 10], tag = $edge001)
|
||||||
|
|
||||||
helixPath = helix(angleStart = 0, ccw = true, revolutions = 5, length = 10, radius = 5, axis = edge001)
|
helixPath = helix(
|
||||||
|
angleStart = 0,
|
||||||
|
ccw = true,
|
||||||
|
revolutions = 5,
|
||||||
|
length = 10,
|
||||||
|
radius = 5,
|
||||||
|
axis = edge001,
|
||||||
|
)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
source: kcl/src/simulation_tests.rs
|
source: kcl/src/simulation_tests.rs
|
||||||
description: Operations executed helix_simple.kcl
|
description: Operations executed helix_simple.kcl
|
||||||
|
snapshot_kind: text
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@ -26,43 +27,43 @@ description: Operations executed helix_simple.kcl
|
|||||||
"labeledArgs": {
|
"labeledArgs": {
|
||||||
"angleStart": {
|
"angleStart": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
170,
|
173,
|
||||||
171,
|
174,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"axis": {
|
"axis": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
234,
|
247,
|
||||||
241,
|
254,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"ccw": {
|
"ccw": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
179,
|
184,
|
||||||
183,
|
188,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"length": {
|
"length": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
211,
|
220,
|
||||||
213,
|
222,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"radius": {
|
"radius": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
224,
|
235,
|
||||||
225,
|
236,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"revolutions": {
|
"revolutions": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
199,
|
206,
|
||||||
200,
|
207,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -70,7 +71,7 @@ description: Operations executed helix_simple.kcl
|
|||||||
"name": "helix",
|
"name": "helix",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
151,
|
151,
|
||||||
242,
|
257,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
source: kcl/src/simulation_tests.rs
|
source: kcl/src/simulation_tests.rs
|
||||||
description: Program memory after executing helix_simple.kcl
|
description: Program memory after executing helix_simple.kcl
|
||||||
|
snapshot_kind: text
|
||||||
---
|
---
|
||||||
{
|
{
|
||||||
"environments": [
|
"environments": [
|
||||||
@ -86,7 +87,7 @@ description: Program memory after executing helix_simple.kcl
|
|||||||
{
|
{
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
151,
|
151,
|
||||||
242,
|
257,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -631,7 +631,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
189,
|
189,
|
||||||
276,
|
277,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -819,8 +819,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
287,
|
288,
|
||||||
367,
|
369,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1008,8 +1008,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
287,
|
288,
|
||||||
367,
|
369,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1197,8 +1197,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
287,
|
288,
|
||||||
367,
|
369,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1386,8 +1386,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
287,
|
288,
|
||||||
367,
|
369,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1575,8 +1575,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
287,
|
288,
|
||||||
367,
|
369,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1764,8 +1764,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
287,
|
288,
|
||||||
367,
|
369,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1953,8 +1953,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
287,
|
288,
|
||||||
367,
|
369,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
source: kcl/src/simulation_tests.rs
|
source: kcl/src/simulation_tests.rs
|
||||||
description: Result of parsing linear_pattern3d_a_pattern.kcl
|
description: Result of parsing linear_pattern3d_a_pattern.kcl
|
||||||
|
snapshot_kind: text
|
||||||
---
|
---
|
||||||
{
|
{
|
||||||
"Ok": {
|
"Ok": {
|
||||||
@ -321,7 +322,7 @@ description: Result of parsing linear_pattern3d_a_pattern.kcl
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 276,
|
"end": 277,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 186,
|
"end": 186,
|
||||||
"name": "pattn1",
|
"name": "pattn1",
|
||||||
@ -331,115 +332,88 @@ description: Result of parsing linear_pattern3d_a_pattern.kcl
|
|||||||
"init": {
|
"init": {
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 260,
|
"type": "LabeledArg",
|
||||||
"properties": [
|
"label": {
|
||||||
{
|
"type": "Identifier",
|
||||||
"end": 225,
|
"name": "axis"
|
||||||
"key": {
|
},
|
||||||
"end": 213,
|
"arg": {
|
||||||
"name": "axis",
|
"elements": [
|
||||||
"start": 209,
|
{
|
||||||
"type": "Identifier"
|
"end": 234,
|
||||||
},
|
"raw": "1",
|
||||||
"start": 209,
|
"start": 233,
|
||||||
"type": "ObjectProperty",
|
|
||||||
"value": {
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"end": 218,
|
|
||||||
"raw": "1",
|
|
||||||
"start": 217,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": {
|
|
||||||
"value": 1.0,
|
|
||||||
"suffix": "None"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 221,
|
|
||||||
"raw": "0",
|
|
||||||
"start": 220,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": {
|
|
||||||
"value": 0.0,
|
|
||||||
"suffix": "None"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 224,
|
|
||||||
"raw": "0",
|
|
||||||
"start": 223,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": {
|
|
||||||
"value": 0.0,
|
|
||||||
"suffix": "None"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"end": 225,
|
|
||||||
"start": 216,
|
|
||||||
"type": "ArrayExpression",
|
|
||||||
"type": "ArrayExpression"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 242,
|
|
||||||
"key": {
|
|
||||||
"end": 238,
|
|
||||||
"name": "instances",
|
|
||||||
"start": 229,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
|
||||||
"start": 229,
|
|
||||||
"type": "ObjectProperty",
|
|
||||||
"value": {
|
|
||||||
"end": 242,
|
|
||||||
"raw": "7",
|
|
||||||
"start": 241,
|
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
"value": 7.0,
|
"value": 1.0,
|
||||||
"suffix": "None"
|
"suffix": "None"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 258,
|
|
||||||
"key": {
|
|
||||||
"end": 254,
|
|
||||||
"name": "distance",
|
|
||||||
"start": 246,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
},
|
||||||
"start": 246,
|
{
|
||||||
"type": "ObjectProperty",
|
"end": 237,
|
||||||
"value": {
|
"raw": "0",
|
||||||
"end": 258,
|
"start": 236,
|
||||||
"raw": "6",
|
|
||||||
"start": 257,
|
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
"value": 6.0,
|
"value": 0.0,
|
||||||
|
"suffix": "None"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"end": 240,
|
||||||
|
"raw": "0",
|
||||||
|
"start": 239,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": {
|
||||||
|
"value": 0.0,
|
||||||
"suffix": "None"
|
"suffix": "None"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
],
|
||||||
],
|
"end": 241,
|
||||||
"start": 205,
|
"start": 232,
|
||||||
"type": "ObjectExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ObjectExpression"
|
"type": "ArrayExpression"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 275,
|
"type": "LabeledArg",
|
||||||
"name": "exampleSketch",
|
"label": {
|
||||||
"start": 262,
|
"type": "Identifier",
|
||||||
"type": "Identifier",
|
"name": "instances"
|
||||||
"type": "Identifier"
|
},
|
||||||
|
"arg": {
|
||||||
|
"end": 258,
|
||||||
|
"raw": "7",
|
||||||
|
"start": 257,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": {
|
||||||
|
"value": 7.0,
|
||||||
|
"suffix": "None"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "LabeledArg",
|
||||||
|
"label": {
|
||||||
|
"type": "Identifier",
|
||||||
|
"name": "distance"
|
||||||
|
},
|
||||||
|
"arg": {
|
||||||
|
"end": 274,
|
||||||
|
"raw": "6",
|
||||||
|
"start": 273,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": {
|
||||||
|
"value": 6.0,
|
||||||
|
"suffix": "None"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
@ -448,15 +422,22 @@ description: Result of parsing linear_pattern3d_a_pattern.kcl
|
|||||||
"start": 189,
|
"start": 189,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 276,
|
"end": 277,
|
||||||
"start": 189,
|
"start": 189,
|
||||||
"type": "CallExpression",
|
"type": "CallExpressionKw",
|
||||||
"type": "CallExpression"
|
"type": "CallExpressionKw",
|
||||||
|
"unlabeled": {
|
||||||
|
"end": 221,
|
||||||
|
"name": "exampleSketch",
|
||||||
|
"start": 208,
|
||||||
|
"type": "Identifier",
|
||||||
|
"type": "Identifier"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"start": 180,
|
"start": 180,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 276,
|
"end": 277,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 180,
|
"start": 180,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
@ -464,84 +445,49 @@ description: Result of parsing linear_pattern3d_a_pattern.kcl
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 367,
|
"end": 369,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 284,
|
"end": 285,
|
||||||
"name": "pattn2",
|
"name": "pattn2",
|
||||||
"start": 278,
|
"start": 279,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 358,
|
"type": "LabeledArg",
|
||||||
"properties": [
|
"label": {
|
||||||
{
|
"type": "Identifier",
|
||||||
"end": 323,
|
"name": "axis"
|
||||||
"key": {
|
},
|
||||||
"end": 311,
|
"arg": {
|
||||||
"name": "axis",
|
"elements": [
|
||||||
"start": 307,
|
{
|
||||||
"type": "Identifier"
|
"end": 326,
|
||||||
|
"raw": "0",
|
||||||
|
"start": 325,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": {
|
||||||
|
"value": 0.0,
|
||||||
|
"suffix": "None"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"start": 307,
|
{
|
||||||
"type": "ObjectProperty",
|
"end": 329,
|
||||||
"value": {
|
"raw": "0",
|
||||||
"elements": [
|
"start": 328,
|
||||||
{
|
"type": "Literal",
|
||||||
"end": 316,
|
"type": "Literal",
|
||||||
"raw": "0",
|
"value": {
|
||||||
"start": 315,
|
"value": 0.0,
|
||||||
"type": "Literal",
|
"suffix": "None"
|
||||||
"type": "Literal",
|
}
|
||||||
"value": {
|
|
||||||
"value": 0.0,
|
|
||||||
"suffix": "None"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 319,
|
|
||||||
"raw": "0",
|
|
||||||
"start": 318,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": {
|
|
||||||
"value": 0.0,
|
|
||||||
"suffix": "None"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 322,
|
|
||||||
"raw": "1",
|
|
||||||
"start": 321,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": {
|
|
||||||
"value": 1.0,
|
|
||||||
"suffix": "None"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"end": 323,
|
|
||||||
"start": 314,
|
|
||||||
"type": "ArrayExpression",
|
|
||||||
"type": "ArrayExpression"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 339,
|
|
||||||
"key": {
|
|
||||||
"end": 335,
|
|
||||||
"name": "distance",
|
|
||||||
"start": 327,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
},
|
||||||
"start": 327,
|
{
|
||||||
"type": "ObjectProperty",
|
"end": 332,
|
||||||
"value": {
|
|
||||||
"end": 339,
|
|
||||||
"raw": "1",
|
"raw": "1",
|
||||||
"start": 338,
|
"start": 331,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
@ -549,64 +495,79 @@ description: Result of parsing linear_pattern3d_a_pattern.kcl
|
|||||||
"suffix": "None"
|
"suffix": "None"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
],
|
||||||
{
|
"end": 333,
|
||||||
"end": 356,
|
"start": 324,
|
||||||
"key": {
|
"type": "ArrayExpression",
|
||||||
"end": 352,
|
"type": "ArrayExpression"
|
||||||
"name": "instances",
|
}
|
||||||
"start": 343,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
|
||||||
"start": 343,
|
|
||||||
"type": "ObjectProperty",
|
|
||||||
"value": {
|
|
||||||
"end": 356,
|
|
||||||
"raw": "7",
|
|
||||||
"start": 355,
|
|
||||||
"type": "Literal",
|
|
||||||
"type": "Literal",
|
|
||||||
"value": {
|
|
||||||
"value": 7.0,
|
|
||||||
"suffix": "None"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"start": 303,
|
|
||||||
"type": "ObjectExpression",
|
|
||||||
"type": "ObjectExpression"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 366,
|
"type": "LabeledArg",
|
||||||
"name": "pattn1",
|
"label": {
|
||||||
"start": 360,
|
"type": "Identifier",
|
||||||
"type": "Identifier",
|
"name": "distance"
|
||||||
"type": "Identifier"
|
},
|
||||||
|
"arg": {
|
||||||
|
"end": 349,
|
||||||
|
"raw": "1",
|
||||||
|
"start": 348,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": {
|
||||||
|
"value": 1.0,
|
||||||
|
"suffix": "None"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "LabeledArg",
|
||||||
|
"label": {
|
||||||
|
"type": "Identifier",
|
||||||
|
"name": "instances"
|
||||||
|
},
|
||||||
|
"arg": {
|
||||||
|
"end": 366,
|
||||||
|
"raw": "7",
|
||||||
|
"start": 365,
|
||||||
|
"type": "Literal",
|
||||||
|
"type": "Literal",
|
||||||
|
"value": {
|
||||||
|
"value": 7.0,
|
||||||
|
"suffix": "None"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 302,
|
"end": 303,
|
||||||
"name": "patternLinear3d",
|
"name": "patternLinear3d",
|
||||||
"start": 287,
|
"start": 288,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 367,
|
"end": 369,
|
||||||
"start": 287,
|
"start": 288,
|
||||||
"type": "CallExpression",
|
"type": "CallExpressionKw",
|
||||||
"type": "CallExpression"
|
"type": "CallExpressionKw",
|
||||||
|
"unlabeled": {
|
||||||
|
"end": 313,
|
||||||
|
"name": "pattn1",
|
||||||
|
"start": 307,
|
||||||
|
"type": "Identifier",
|
||||||
|
"type": "Identifier"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"start": 278,
|
"start": 279,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 367,
|
"end": 369,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 278,
|
"start": 279,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 368,
|
"end": 370,
|
||||||
"nonCodeMeta": {
|
"nonCodeMeta": {
|
||||||
"nonCodeNodes": {
|
"nonCodeNodes": {
|
||||||
"0": [
|
"0": [
|
||||||
@ -621,8 +582,8 @@ description: Result of parsing linear_pattern3d_a_pattern.kcl
|
|||||||
],
|
],
|
||||||
"1": [
|
"1": [
|
||||||
{
|
{
|
||||||
"end": 278,
|
"end": 279,
|
||||||
"start": 276,
|
"start": 277,
|
||||||
"type": "NonCodeNode",
|
"type": "NonCodeNode",
|
||||||
"value": {
|
"value": {
|
||||||
"type": "newLine"
|
"type": "newLine"
|
||||||
|
@ -6,14 +6,16 @@ exampleSketch = startSketchOn('XZ')
|
|||||||
|> close(%)
|
|> close(%)
|
||||||
|> extrude(length = 1)
|
|> extrude(length = 1)
|
||||||
|
|
||||||
pattn1 = patternLinear3d({
|
pattn1 = patternLinear3d(
|
||||||
|
exampleSketch,
|
||||||
axis = [1, 0, 0],
|
axis = [1, 0, 0],
|
||||||
instances = 7,
|
instances = 7,
|
||||||
distance = 6
|
distance = 6,
|
||||||
}, exampleSketch)
|
)
|
||||||
|
|
||||||
pattn2 = patternLinear3d({
|
pattn2 = patternLinear3d(
|
||||||
|
pattn1,
|
||||||
axis = [0, 0, 1],
|
axis = [0, 0, 1],
|
||||||
distance = 1,
|
distance = 1,
|
||||||
instances = 7
|
instances = 7,
|
||||||
}, pattn1)
|
)
|
||||||
|
@ -44,17 +44,24 @@ snapshot_kind: text
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"labeledArgs": {
|
"labeledArgs": {
|
||||||
"data": {
|
"axis": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
205,
|
232,
|
||||||
260,
|
241,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"solid_set": {
|
"distance": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
262,
|
273,
|
||||||
275,
|
274,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"instances": {
|
||||||
|
"sourceRange": [
|
||||||
|
257,
|
||||||
|
258,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -62,24 +69,37 @@ snapshot_kind: text
|
|||||||
"name": "patternLinear3d",
|
"name": "patternLinear3d",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
189,
|
189,
|
||||||
276,
|
277,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
"unlabeledArg": null
|
"unlabeledArg": {
|
||||||
|
"sourceRange": [
|
||||||
|
208,
|
||||||
|
221,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"labeledArgs": {
|
"labeledArgs": {
|
||||||
"data": {
|
"axis": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
303,
|
324,
|
||||||
358,
|
333,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"solid_set": {
|
"distance": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
360,
|
348,
|
||||||
|
349,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"instances": {
|
||||||
|
"sourceRange": [
|
||||||
|
365,
|
||||||
366,
|
366,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
@ -87,11 +107,17 @@ snapshot_kind: text
|
|||||||
},
|
},
|
||||||
"name": "patternLinear3d",
|
"name": "patternLinear3d",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
287,
|
288,
|
||||||
367,
|
369,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
"unlabeledArg": null
|
"unlabeledArg": {
|
||||||
|
"sourceRange": [
|
||||||
|
307,
|
||||||
|
313,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -426,7 +426,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
356,
|
356,
|
||||||
426,
|
448,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -446,8 +446,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
432,
|
454,
|
||||||
440,
|
462,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -458,8 +458,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
432,
|
454,
|
||||||
440,
|
462,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -469,8 +469,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -489,8 +489,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -503,8 +503,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -514,8 +514,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -526,8 +526,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -539,8 +539,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -553,8 +553,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -567,8 +567,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -581,8 +581,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -595,8 +595,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -609,8 +609,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -623,8 +623,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -637,8 +637,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -651,8 +651,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
585,
|
|
||||||
607,
|
607,
|
||||||
|
629,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -665,8 +665,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
492,
|
514,
|
||||||
534,
|
556,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -681,8 +681,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
540,
|
562,
|
||||||
627,
|
649,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -697,8 +697,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
633,
|
655,
|
||||||
684,
|
706,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -713,8 +713,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
736,
|
758,
|
||||||
770,
|
792,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -729,8 +729,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
736,
|
758,
|
||||||
770,
|
792,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -740,8 +740,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
736,
|
758,
|
||||||
770,
|
792,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -757,8 +757,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
776,
|
798,
|
||||||
824,
|
846,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -778,8 +778,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
830,
|
852,
|
||||||
931,
|
953,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -799,8 +799,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
937,
|
959,
|
||||||
1057,
|
1079,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -820,8 +820,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1063,
|
1085,
|
||||||
1119,
|
1141,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -841,8 +841,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1125,
|
1147,
|
||||||
1133,
|
1155,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -853,8 +853,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1184,
|
1206,
|
||||||
1219,
|
1241,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -869,8 +869,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1184,
|
1206,
|
||||||
1219,
|
1241,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -880,8 +880,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1184,
|
1206,
|
||||||
1219,
|
1241,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -897,8 +897,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1225,
|
1247,
|
||||||
1273,
|
1295,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -918,8 +918,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1279,
|
1301,
|
||||||
1381,
|
1403,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -939,8 +939,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1387,
|
1409,
|
||||||
1507,
|
1529,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -960,8 +960,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1513,
|
1535,
|
||||||
1569,
|
1591,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -981,8 +981,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1575,
|
1597,
|
||||||
1583,
|
1605,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -993,8 +993,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1009,8 +1009,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1023,8 +1023,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1034,8 +1034,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1046,8 +1046,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1059,8 +1059,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1073,8 +1073,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1087,8 +1087,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1101,8 +1101,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1115,8 +1115,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1129,8 +1129,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1143,8 +1143,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1157,8 +1157,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
|
@ -5,30 +5,30 @@ flowchart LR
|
|||||||
3["Segment<br>[105, 154, 0]"]
|
3["Segment<br>[105, 154, 0]"]
|
||||||
4["Segment<br>[160, 247, 0]"]
|
4["Segment<br>[160, 247, 0]"]
|
||||||
5["Segment<br>[253, 350, 0]"]
|
5["Segment<br>[253, 350, 0]"]
|
||||||
6["Segment<br>[356, 426, 0]"]
|
6["Segment<br>[356, 448, 0]"]
|
||||||
7["Segment<br>[432, 440, 0]"]
|
7["Segment<br>[454, 462, 0]"]
|
||||||
8[Solid2d]
|
8[Solid2d]
|
||||||
end
|
end
|
||||||
subgraph path27 [Path]
|
subgraph path27 [Path]
|
||||||
27["Path<br>[736, 770, 0]"]
|
27["Path<br>[758, 792, 0]"]
|
||||||
28["Segment<br>[776, 824, 0]"]
|
28["Segment<br>[798, 846, 0]"]
|
||||||
29["Segment<br>[830, 931, 0]"]
|
29["Segment<br>[852, 953, 0]"]
|
||||||
30["Segment<br>[937, 1057, 0]"]
|
30["Segment<br>[959, 1079, 0]"]
|
||||||
31["Segment<br>[1063, 1119, 0]"]
|
31["Segment<br>[1085, 1141, 0]"]
|
||||||
32["Segment<br>[1125, 1133, 0]"]
|
32["Segment<br>[1147, 1155, 0]"]
|
||||||
33[Solid2d]
|
33[Solid2d]
|
||||||
end
|
end
|
||||||
subgraph path34 [Path]
|
subgraph path34 [Path]
|
||||||
34["Path<br>[1184, 1219, 0]"]
|
34["Path<br>[1206, 1241, 0]"]
|
||||||
35["Segment<br>[1225, 1273, 0]"]
|
35["Segment<br>[1247, 1295, 0]"]
|
||||||
36["Segment<br>[1279, 1381, 0]"]
|
36["Segment<br>[1301, 1403, 0]"]
|
||||||
37["Segment<br>[1387, 1507, 0]"]
|
37["Segment<br>[1409, 1529, 0]"]
|
||||||
38["Segment<br>[1513, 1569, 0]"]
|
38["Segment<br>[1535, 1591, 0]"]
|
||||||
39["Segment<br>[1575, 1583, 0]"]
|
39["Segment<br>[1597, 1605, 0]"]
|
||||||
40[Solid2d]
|
40[Solid2d]
|
||||||
end
|
end
|
||||||
1["Plane<br>[12, 31, 0]"]
|
1["Plane<br>[12, 31, 0]"]
|
||||||
9["Sweep Extrusion<br>[454, 486, 0]"]
|
9["Sweep Extrusion<br>[476, 508, 0]"]
|
||||||
10[Wall]
|
10[Wall]
|
||||||
11[Wall]
|
11[Wall]
|
||||||
12[Wall]
|
12[Wall]
|
||||||
@ -43,10 +43,10 @@ flowchart LR
|
|||||||
21["SweepEdge Adjacent"]
|
21["SweepEdge Adjacent"]
|
||||||
22["SweepEdge Opposite"]
|
22["SweepEdge Opposite"]
|
||||||
23["SweepEdge Adjacent"]
|
23["SweepEdge Adjacent"]
|
||||||
24["EdgeCut Fillet<br>[492, 534, 0]"]
|
24["EdgeCut Fillet<br>[514, 556, 0]"]
|
||||||
25["Plane<br>[1184, 1219, 0]"]
|
25["Plane<br>[1206, 1241, 0]"]
|
||||||
26["Plane<br>[736, 770, 0]"]
|
26["Plane<br>[758, 792, 0]"]
|
||||||
41["Sweep Extrusion<br>[1597, 1628, 0]"]
|
41["Sweep Extrusion<br>[1619, 1650, 0]"]
|
||||||
42[Wall]
|
42[Wall]
|
||||||
43[Wall]
|
43[Wall]
|
||||||
44[Wall]
|
44[Wall]
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -27,23 +27,23 @@ snapshot_kind: text
|
|||||||
"labeledArgs": {
|
"labeledArgs": {
|
||||||
"length": {
|
"length": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
482,
|
504,
|
||||||
485,
|
507,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "extrude",
|
"name": "extrude",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
"unlabeledArg": {
|
"unlabeledArg": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
462,
|
484,
|
||||||
471,
|
493,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -52,23 +52,23 @@ snapshot_kind: text
|
|||||||
"labeledArgs": {
|
"labeledArgs": {
|
||||||
"data": {
|
"data": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
499,
|
521,
|
||||||
530,
|
552,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"solid": {
|
"solid": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
532,
|
554,
|
||||||
533,
|
555,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "fillet",
|
"name": "fillet",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
492,
|
514,
|
||||||
534,
|
556,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -78,30 +78,30 @@ snapshot_kind: text
|
|||||||
"labeledArgs": {
|
"labeledArgs": {
|
||||||
"data": {
|
"data": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
548,
|
570,
|
||||||
615,
|
637,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"solid": {
|
"solid": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
617,
|
639,
|
||||||
618,
|
640,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"tag": {
|
"tag": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
620,
|
642,
|
||||||
626,
|
648,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "chamfer",
|
"name": "chamfer",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
540,
|
562,
|
||||||
627,
|
649,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -111,30 +111,30 @@ snapshot_kind: text
|
|||||||
"labeledArgs": {
|
"labeledArgs": {
|
||||||
"data": {
|
"data": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
641,
|
663,
|
||||||
672,
|
694,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"solid": {
|
"solid": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
674,
|
696,
|
||||||
675,
|
697,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"tag": {
|
"tag": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
677,
|
699,
|
||||||
683,
|
705,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "chamfer",
|
"name": "chamfer",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
633,
|
655,
|
||||||
684,
|
706,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -144,23 +144,23 @@ snapshot_kind: text
|
|||||||
"labeledArgs": {
|
"labeledArgs": {
|
||||||
"data": {
|
"data": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
712,
|
734,
|
||||||
722,
|
744,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"tag": {
|
"tag": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
724,
|
746,
|
||||||
729,
|
751,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "startSketchOn",
|
"name": "startSketchOn",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
698,
|
720,
|
||||||
730,
|
752,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -170,23 +170,23 @@ snapshot_kind: text
|
|||||||
"labeledArgs": {
|
"labeledArgs": {
|
||||||
"data": {
|
"data": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1160,
|
1182,
|
||||||
1170,
|
1192,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"tag": {
|
"tag": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1172,
|
1194,
|
||||||
1177,
|
1199,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "startSketchOn",
|
"name": "startSketchOn",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1146,
|
1168,
|
||||||
1178,
|
1200,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -196,23 +196,23 @@ snapshot_kind: text
|
|||||||
"labeledArgs": {
|
"labeledArgs": {
|
||||||
"length": {
|
"length": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1625,
|
1647,
|
||||||
1627,
|
1649,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "extrude",
|
"name": "extrude",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
"unlabeledArg": {
|
"unlabeledArg": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1605,
|
1627,
|
||||||
1614,
|
1636,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -426,7 +426,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
356,
|
356,
|
||||||
426,
|
448,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -446,8 +446,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
432,
|
454,
|
||||||
440,
|
462,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -458,8 +458,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
432,
|
454,
|
||||||
440,
|
462,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -469,8 +469,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -489,8 +489,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -503,8 +503,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -514,8 +514,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -526,8 +526,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -539,8 +539,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -553,8 +553,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -567,8 +567,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -581,8 +581,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -595,8 +595,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -609,8 +609,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -623,8 +623,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -637,8 +637,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -651,8 +651,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
642,
|
|
||||||
664,
|
664,
|
||||||
|
686,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -665,8 +665,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
492,
|
514,
|
||||||
534,
|
556,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -681,8 +681,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
540,
|
562,
|
||||||
591,
|
613,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -697,8 +697,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
597,
|
619,
|
||||||
684,
|
706,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -713,8 +713,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
736,
|
758,
|
||||||
770,
|
792,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -729,8 +729,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
736,
|
758,
|
||||||
770,
|
792,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -740,8 +740,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
736,
|
758,
|
||||||
770,
|
792,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -757,8 +757,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
776,
|
798,
|
||||||
824,
|
846,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -778,8 +778,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
830,
|
852,
|
||||||
931,
|
953,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -799,8 +799,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
937,
|
959,
|
||||||
1057,
|
1079,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -820,8 +820,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1063,
|
1085,
|
||||||
1119,
|
1141,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -841,8 +841,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1125,
|
1147,
|
||||||
1133,
|
1155,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -853,8 +853,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1184,
|
1206,
|
||||||
1219,
|
1241,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -869,8 +869,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1184,
|
1206,
|
||||||
1219,
|
1241,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -880,8 +880,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1184,
|
1206,
|
||||||
1219,
|
1241,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -897,8 +897,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1225,
|
1247,
|
||||||
1273,
|
1295,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -918,8 +918,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1279,
|
1301,
|
||||||
1381,
|
1403,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -939,8 +939,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1387,
|
1409,
|
||||||
1507,
|
1529,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -960,8 +960,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1513,
|
1535,
|
||||||
1569,
|
1591,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -981,8 +981,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1575,
|
1597,
|
||||||
1583,
|
1605,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -993,8 +993,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1009,8 +1009,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1023,8 +1023,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1034,8 +1034,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1046,8 +1046,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1059,8 +1059,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1073,8 +1073,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1087,8 +1087,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1101,8 +1101,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1115,8 +1115,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1129,8 +1129,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1143,8 +1143,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1157,8 +1157,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
|
@ -5,30 +5,30 @@ flowchart LR
|
|||||||
3["Segment<br>[105, 154, 0]"]
|
3["Segment<br>[105, 154, 0]"]
|
||||||
4["Segment<br>[160, 247, 0]"]
|
4["Segment<br>[160, 247, 0]"]
|
||||||
5["Segment<br>[253, 350, 0]"]
|
5["Segment<br>[253, 350, 0]"]
|
||||||
6["Segment<br>[356, 426, 0]"]
|
6["Segment<br>[356, 448, 0]"]
|
||||||
7["Segment<br>[432, 440, 0]"]
|
7["Segment<br>[454, 462, 0]"]
|
||||||
8[Solid2d]
|
8[Solid2d]
|
||||||
end
|
end
|
||||||
subgraph path27 [Path]
|
subgraph path27 [Path]
|
||||||
27["Path<br>[736, 770, 0]"]
|
27["Path<br>[758, 792, 0]"]
|
||||||
28["Segment<br>[776, 824, 0]"]
|
28["Segment<br>[798, 846, 0]"]
|
||||||
29["Segment<br>[830, 931, 0]"]
|
29["Segment<br>[852, 953, 0]"]
|
||||||
30["Segment<br>[937, 1057, 0]"]
|
30["Segment<br>[959, 1079, 0]"]
|
||||||
31["Segment<br>[1063, 1119, 0]"]
|
31["Segment<br>[1085, 1141, 0]"]
|
||||||
32["Segment<br>[1125, 1133, 0]"]
|
32["Segment<br>[1147, 1155, 0]"]
|
||||||
33[Solid2d]
|
33[Solid2d]
|
||||||
end
|
end
|
||||||
subgraph path34 [Path]
|
subgraph path34 [Path]
|
||||||
34["Path<br>[1184, 1219, 0]"]
|
34["Path<br>[1206, 1241, 0]"]
|
||||||
35["Segment<br>[1225, 1273, 0]"]
|
35["Segment<br>[1247, 1295, 0]"]
|
||||||
36["Segment<br>[1279, 1381, 0]"]
|
36["Segment<br>[1301, 1403, 0]"]
|
||||||
37["Segment<br>[1387, 1507, 0]"]
|
37["Segment<br>[1409, 1529, 0]"]
|
||||||
38["Segment<br>[1513, 1569, 0]"]
|
38["Segment<br>[1535, 1591, 0]"]
|
||||||
39["Segment<br>[1575, 1583, 0]"]
|
39["Segment<br>[1597, 1605, 0]"]
|
||||||
40[Solid2d]
|
40[Solid2d]
|
||||||
end
|
end
|
||||||
1["Plane<br>[12, 31, 0]"]
|
1["Plane<br>[12, 31, 0]"]
|
||||||
9["Sweep Extrusion<br>[454, 486, 0]"]
|
9["Sweep Extrusion<br>[476, 508, 0]"]
|
||||||
10[Wall]
|
10[Wall]
|
||||||
11[Wall]
|
11[Wall]
|
||||||
12[Wall]
|
12[Wall]
|
||||||
@ -43,10 +43,10 @@ flowchart LR
|
|||||||
21["SweepEdge Adjacent"]
|
21["SweepEdge Adjacent"]
|
||||||
22["SweepEdge Opposite"]
|
22["SweepEdge Opposite"]
|
||||||
23["SweepEdge Adjacent"]
|
23["SweepEdge Adjacent"]
|
||||||
24["EdgeCut Fillet<br>[492, 534, 0]"]
|
24["EdgeCut Fillet<br>[514, 556, 0]"]
|
||||||
25["Plane<br>[736, 770, 0]"]
|
25["Plane<br>[758, 792, 0]"]
|
||||||
26["Plane<br>[1184, 1219, 0]"]
|
26["Plane<br>[1206, 1241, 0]"]
|
||||||
41["Sweep Extrusion<br>[1597, 1628, 0]"]
|
41["Sweep Extrusion<br>[1619, 1650, 0]"]
|
||||||
42[Wall]
|
42[Wall]
|
||||||
43[Wall]
|
43[Wall]
|
||||||
44[Wall]
|
44[Wall]
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -27,23 +27,23 @@ snapshot_kind: text
|
|||||||
"labeledArgs": {
|
"labeledArgs": {
|
||||||
"length": {
|
"length": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
482,
|
504,
|
||||||
485,
|
507,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "extrude",
|
"name": "extrude",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
454,
|
476,
|
||||||
486,
|
508,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
"unlabeledArg": {
|
"unlabeledArg": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
462,
|
484,
|
||||||
471,
|
493,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -52,23 +52,23 @@ snapshot_kind: text
|
|||||||
"labeledArgs": {
|
"labeledArgs": {
|
||||||
"data": {
|
"data": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
499,
|
521,
|
||||||
530,
|
552,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"solid": {
|
"solid": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
532,
|
554,
|
||||||
533,
|
555,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "fillet",
|
"name": "fillet",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
492,
|
514,
|
||||||
534,
|
556,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -78,30 +78,30 @@ snapshot_kind: text
|
|||||||
"labeledArgs": {
|
"labeledArgs": {
|
||||||
"data": {
|
"data": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
548,
|
570,
|
||||||
579,
|
601,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"solid": {
|
"solid": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
581,
|
603,
|
||||||
582,
|
604,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"tag": {
|
"tag": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
584,
|
606,
|
||||||
590,
|
612,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "chamfer",
|
"name": "chamfer",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
540,
|
562,
|
||||||
591,
|
613,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -111,30 +111,30 @@ snapshot_kind: text
|
|||||||
"labeledArgs": {
|
"labeledArgs": {
|
||||||
"data": {
|
"data": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
605,
|
627,
|
||||||
672,
|
694,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"solid": {
|
"solid": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
674,
|
696,
|
||||||
675,
|
697,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"tag": {
|
"tag": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
677,
|
699,
|
||||||
683,
|
705,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "chamfer",
|
"name": "chamfer",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
597,
|
619,
|
||||||
684,
|
706,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -144,23 +144,23 @@ snapshot_kind: text
|
|||||||
"labeledArgs": {
|
"labeledArgs": {
|
||||||
"data": {
|
"data": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
712,
|
734,
|
||||||
722,
|
744,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"tag": {
|
"tag": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
724,
|
746,
|
||||||
729,
|
751,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "startSketchOn",
|
"name": "startSketchOn",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
698,
|
720,
|
||||||
730,
|
752,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -170,23 +170,23 @@ snapshot_kind: text
|
|||||||
"labeledArgs": {
|
"labeledArgs": {
|
||||||
"data": {
|
"data": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1160,
|
1182,
|
||||||
1170,
|
1192,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"tag": {
|
"tag": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1172,
|
1194,
|
||||||
1177,
|
1199,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "startSketchOn",
|
"name": "startSketchOn",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1146,
|
1168,
|
||||||
1178,
|
1200,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -196,23 +196,23 @@ snapshot_kind: text
|
|||||||
"labeledArgs": {
|
"labeledArgs": {
|
||||||
"length": {
|
"length": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1625,
|
1647,
|
||||||
1627,
|
1649,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "extrude",
|
"name": "extrude",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1597,
|
1619,
|
||||||
1628,
|
1650,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
"unlabeledArg": {
|
"unlabeledArg": {
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1605,
|
1627,
|
||||||
1614,
|
1636,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
source: kcl/src/simulation_tests.rs
|
source: kcl/src/simulation_tests.rs
|
||||||
description: Result of parsing sketch_on_face_after_fillets_referencing_face.kcl
|
description: Result of parsing sketch_on_face_after_fillets_referencing_face.kcl
|
||||||
|
snapshot_kind: text
|
||||||
---
|
---
|
||||||
{
|
{
|
||||||
"Ok": {
|
"Ok": {
|
||||||
|
@ -6,10 +6,18 @@ exampleSketch = startSketchOn('XZ')
|
|||||||
|> close()
|
|> close()
|
||||||
|> extrude(length = 1)
|
|> extrude(length = 1)
|
||||||
|
|
||||||
pattn1 = patternLinear3d({
|
pattn1 = patternLinear3d(
|
||||||
axis: [1, 0, 0],
|
exampleSketch,
|
||||||
instances: 7,
|
axis = [1, 0, 0],
|
||||||
distance: 6
|
instances = 7,
|
||||||
}, exampleSketch)
|
distance = 6,
|
||||||
|
)
|
||||||
|
|
||||||
pattn2 = patternCircular3d({axis: [0,0, 1], center: [-20, -20, -20], instances: 41, arcDegrees: 360, rotateDuplicates: false}, pattn1)
|
pattn2 = patternCircular3d(
|
||||||
|
pattn1,
|
||||||
|
axis = [0,0, 1],
|
||||||
|
center = [-20, -20, -20],
|
||||||
|
instances = 41,
|
||||||
|
arcDegrees = 360,
|
||||||
|
rotateDuplicates = false,
|
||||||
|
)
|
||||||
|
@ -95,11 +95,11 @@ const tabsR = startSketchOn(tabPlane)
|
|||||||
getNextAdjacentEdge(edge13)
|
getNextAdjacentEdge(edge13)
|
||||||
]
|
]
|
||||||
}, %)
|
}, %)
|
||||||
|> patternLinear3d({
|
|> patternLinear3d(
|
||||||
axis: [0, -1, 0],
|
axis = [0, -1, 0],
|
||||||
instances: 2,
|
instances = 2,
|
||||||
distance: length + 2 * thk - (tabLength * 4 / 3)
|
distance = length + 2 * thk - (tabLength * 4 / 3)
|
||||||
}, %)
|
)
|
||||||
|
|
||||||
// build the tabs of the mounting bracket (left side)
|
// build the tabs of the mounting bracket (left side)
|
||||||
const tabsL = startSketchOn(tabPlane)
|
const tabsL = startSketchOn(tabPlane)
|
||||||
@ -123,11 +123,11 @@ const tabsL = startSketchOn(tabPlane)
|
|||||||
getNextAdjacentEdge(edge22)
|
getNextAdjacentEdge(edge22)
|
||||||
]
|
]
|
||||||
}, %)
|
}, %)
|
||||||
|> patternLinear3d({
|
|> patternLinear3d(
|
||||||
axis: [0, -1, 0],
|
axis = [0, -1, 0],
|
||||||
instances: 2,
|
instances = 2,
|
||||||
distance: length + 2 * thk - (tabLength * 4 / 3)
|
distance = length + 2 * thk - (tabLength * 4 / 3)
|
||||||
}, %)
|
)
|
||||||
|
|
||||||
// define a plane for retention bumps
|
// define a plane for retention bumps
|
||||||
const retPlane = {
|
const retPlane = {
|
||||||
|
@ -95,11 +95,11 @@ const tabsR = startSketchOn(tabPlane)
|
|||||||
getNextAdjacentEdge(edge11)
|
getNextAdjacentEdge(edge11)
|
||||||
]
|
]
|
||||||
}, %)
|
}, %)
|
||||||
|> patternLinear3d({
|
|> patternLinear3d(
|
||||||
axis: [0, -1, 0],
|
axis = [0, -1, 0],
|
||||||
instances: 2,
|
instances = 2,
|
||||||
distance: length + 2 * thk - (tabLength * 4 / 3)
|
distance = length + 2 * thk - (tabLength * 4 / 3)
|
||||||
}, %)
|
)
|
||||||
|
|
||||||
// build the tabs of the mounting bracket (left side)
|
// build the tabs of the mounting bracket (left side)
|
||||||
const tabsL = startSketchOn(tabPlane)
|
const tabsL = startSketchOn(tabPlane)
|
||||||
@ -123,11 +123,11 @@ const tabsL = startSketchOn(tabPlane)
|
|||||||
getNextAdjacentEdge(edge22)
|
getNextAdjacentEdge(edge22)
|
||||||
]
|
]
|
||||||
}, %)
|
}, %)
|
||||||
|> patternLinear3d({
|
|> patternLinear3d(
|
||||||
axis: [0, -1, 0],
|
axis = [0, -1, 0],
|
||||||
instances: 2,
|
instances = 2,
|
||||||
distance: length + 2 * thk - (tabLength * 4 / 3)
|
distance = length + 2 * thk - (tabLength * 4 / 3)
|
||||||
}, %)
|
)
|
||||||
|
|
||||||
// define a plane for retention bumps
|
// define a plane for retention bumps
|
||||||
const retPlane = {
|
const retPlane = {
|
||||||
|
@ -43,14 +43,14 @@ const peg = startSketchOn(s, "end")
|
|||||||
-(total_width / 2 - wSegments),
|
-(total_width / 2 - wSegments),
|
||||||
-(total_length / 2 - lSegments)
|
-(total_length / 2 - lSegments)
|
||||||
], radius: bumpDiam / 2 }, %)
|
], radius: bumpDiam / 2 }, %)
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [1, 0],
|
axis = [1, 0],
|
||||||
instances: 6,
|
instances = 6,
|
||||||
distance: 7
|
distance = 7
|
||||||
}, %)
|
)
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: 10,
|
instances = 10,
|
||||||
distance: 7
|
distance = 7
|
||||||
}, %)
|
)
|
||||||
|> extrude(length = bumpHeight)
|
|> extrude(length = bumpHeight)
|
||||||
|
@ -6,14 +6,16 @@ exampleSketch = startSketchOn('XZ')
|
|||||||
|> close()
|
|> close()
|
||||||
|> extrude(length = 1)
|
|> extrude(length = 1)
|
||||||
|
|
||||||
pattn1 = patternLinear3d({
|
pattn1 = patternLinear3d(
|
||||||
axis: [1, 0, 0],
|
exampleSketch,
|
||||||
instances: 7,
|
axis = [1, 0, 0],
|
||||||
distance: 6
|
instances = 7,
|
||||||
}, exampleSketch)
|
distance = 6
|
||||||
|
)
|
||||||
|
|
||||||
pattn2 = patternLinear3d({
|
pattn2 = patternLinear3d(
|
||||||
axis: [0, 0, 1],
|
pattn1,
|
||||||
distance: 1,
|
axis = [0, 0, 1],
|
||||||
instances: 7
|
distance = 1,
|
||||||
}, pattn1)
|
instances = 7
|
||||||
|
)
|
||||||
|
@ -710,11 +710,11 @@ const sketch004fl = startSketchOn(extrude002fl, 'START')
|
|||||||
], %, $rectangleSegmentC003fl)
|
], %, $rectangleSegmentC003fl)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude004fl = extrude(sketch004fl, length = -thickness)
|
const extrude004fl = extrude(sketch004fl, length = -thickness)
|
||||||
|
|
||||||
// EIA-310-D standard hole pattern
|
// EIA-310-D standard hole pattern
|
||||||
@ -731,11 +731,11 @@ const sketch005fl = startSketchOn(extrude002fl, 'START')
|
|||||||
], %, $rectangleSegmentC004fl)
|
], %, $rectangleSegmentC004fl)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude005fl = extrude(sketch005fl, length = -thickness)
|
const extrude005fl = extrude(sketch005fl, length = -thickness)
|
||||||
|
|
||||||
// EIA-310-D standard hole pattern
|
// EIA-310-D standard hole pattern
|
||||||
@ -755,11 +755,11 @@ const sketch006fl = startSketchOn(extrude002fl, 'START')
|
|||||||
], %, $rectangleSegmentC005fl)
|
], %, $rectangleSegmentC005fl)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude006fl = extrude(sketch006fl, length = -thickness)
|
const extrude006fl = extrude(sketch006fl, length = -thickness)
|
||||||
|
|
||||||
// EIA-310-D standard hole pattern
|
// EIA-310-D standard hole pattern
|
||||||
@ -776,11 +776,11 @@ const sketch007fl = startSketchOn(extrude001fl, 'START')
|
|||||||
], %, $rectangleSegmentC006fl)
|
], %, $rectangleSegmentC006fl)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude007fl = extrude(sketch007fl, length = -thickness)
|
const extrude007fl = extrude(sketch007fl, length = -thickness)
|
||||||
|
|
||||||
// EIA-310-D standard hole pattern
|
// EIA-310-D standard hole pattern
|
||||||
@ -797,11 +797,11 @@ const sketch008fl = startSketchOn(extrude001fl, 'START')
|
|||||||
], %, $rectangleSegmentC007fl)
|
], %, $rectangleSegmentC007fl)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude008fl = extrude(sketch008fl, length = -thickness)
|
const extrude008fl = extrude(sketch008fl, length = -thickness)
|
||||||
|
|
||||||
// EIA-310-D standard hole pattern
|
// EIA-310-D standard hole pattern
|
||||||
@ -821,11 +821,11 @@ const sketch009fl = startSketchOn(extrude001fl, 'START')
|
|||||||
], %, $rectangleSegmentC008fl)
|
], %, $rectangleSegmentC008fl)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude009fl = extrude(sketch009fl, length = -thickness)
|
const extrude009fl = extrude(sketch009fl, length = -thickness)
|
||||||
|
|
||||||
// define slots
|
// define slots
|
||||||
@ -839,11 +839,11 @@ const sketch010fl = startSketchOn(extrude001fl, 'START')
|
|||||||
|> xLine(-0.75 + .438, %)
|
|> xLine(-0.75 + .438, %)
|
||||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: 2,
|
instances = 2,
|
||||||
distance: 1.22
|
distance = 1.22
|
||||||
}, %)
|
)
|
||||||
const extrude010fl = extrude(sketch010fl, length = -thickness)
|
const extrude010fl = extrude(sketch010fl, length = -thickness)
|
||||||
|
|
||||||
// define slots
|
// define slots
|
||||||
@ -877,11 +877,11 @@ const sketch012fl = startSketchOn(extrude001fl, 'START')
|
|||||||
|> xLine(-0.75 + .438, %)
|
|> xLine(-0.75 + .438, %)
|
||||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, -1],
|
axis = [0, -1],
|
||||||
instances: 2,
|
instances = 2,
|
||||||
distance: 1.22
|
distance = 1.22
|
||||||
}, %)
|
)
|
||||||
const extrude012fl = extrude(sketch012fl, length = -thickness)
|
const extrude012fl = extrude(sketch012fl, length = -thickness)
|
||||||
|
|
||||||
// FRONT RIGHT VERTICAL RAIL
|
// FRONT RIGHT VERTICAL RAIL
|
||||||
@ -992,11 +992,11 @@ const sketch004fr = startSketchOn(extrude002fr, 'START')
|
|||||||
], %, $rectangleSegmentC003fr)
|
], %, $rectangleSegmentC003fr)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude004fr = extrude(sketch004fr, length = -thickness)
|
const extrude004fr = extrude(sketch004fr, length = -thickness)
|
||||||
|
|
||||||
// EIA-310-D standard hole pattern
|
// EIA-310-D standard hole pattern
|
||||||
@ -1016,11 +1016,11 @@ const sketch005fr = startSketchOn(extrude002fr, 'START')
|
|||||||
], %, $rectangleSegmentC004fr)
|
], %, $rectangleSegmentC004fr)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude005fr = extrude(sketch005fr, length = -thickness)
|
const extrude005fr = extrude(sketch005fr, length = -thickness)
|
||||||
|
|
||||||
// EIA-310-D standard hole pattern
|
// EIA-310-D standard hole pattern
|
||||||
@ -1040,11 +1040,11 @@ const sketch006fr = startSketchOn(extrude002fr, 'START')
|
|||||||
], %, $rectangleSegmentC005fr)
|
], %, $rectangleSegmentC005fr)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude006fr = extrude(sketch006fr, length = -thickness)
|
const extrude006fr = extrude(sketch006fr, length = -thickness)
|
||||||
|
|
||||||
// EIA-310-D standard hole pattern
|
// EIA-310-D standard hole pattern
|
||||||
@ -1064,11 +1064,11 @@ const sketch007fr = startSketchOn(extrude001fr, 'START')
|
|||||||
], %, $rectangleSegmentC006fr)
|
], %, $rectangleSegmentC006fr)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude007fr = extrude(sketch007fr, length = -thickness)
|
const extrude007fr = extrude(sketch007fr, length = -thickness)
|
||||||
|
|
||||||
// EIA-310-D standard hole pattern
|
// EIA-310-D standard hole pattern
|
||||||
@ -1088,11 +1088,11 @@ const sketch008fr = startSketchOn(extrude001fr, 'START')
|
|||||||
], %, $rectangleSegmentC007fr)
|
], %, $rectangleSegmentC007fr)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude008fr = extrude(sketch008fr, length = -thickness)
|
const extrude008fr = extrude(sketch008fr, length = -thickness)
|
||||||
|
|
||||||
// EIA-310-D standard hole pattern
|
// EIA-310-D standard hole pattern
|
||||||
@ -1112,11 +1112,11 @@ const sketch009fr = startSketchOn(extrude001fr, 'START')
|
|||||||
], %, $rectangleSegmentC008fr)
|
], %, $rectangleSegmentC008fr)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude009fr = extrude(sketch009fr, length = -thickness)
|
const extrude009fr = extrude(sketch009fr, length = -thickness)
|
||||||
|
|
||||||
// define slots
|
// define slots
|
||||||
@ -1133,11 +1133,11 @@ const sketch010fr = startSketchOn(extrude001fr, 'START')
|
|||||||
|> xLine(-0.75 + .438, %)
|
|> xLine(-0.75 + .438, %)
|
||||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: 2,
|
instances = 2,
|
||||||
distance: 1.22
|
distance = 1.22
|
||||||
}, %)
|
)
|
||||||
const extrude010fr = extrude(sketch010fr, length = -thickness)
|
const extrude010fr = extrude(sketch010fr, length = -thickness)
|
||||||
|
|
||||||
// define slots
|
// define slots
|
||||||
@ -1171,11 +1171,11 @@ const sketch012fr = startSketchOn(extrude001fr, 'START')
|
|||||||
|> xLine(-0.75 + .438, %)
|
|> xLine(-0.75 + .438, %)
|
||||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, -1],
|
axis = [0, -1],
|
||||||
instances: 2,
|
instances = 2,
|
||||||
distance: 1.22
|
distance = 1.22
|
||||||
}, %)
|
)
|
||||||
const extrude012fr = extrude(sketch012fr, length = -thickness)
|
const extrude012fr = extrude(sketch012fr, length = -thickness)
|
||||||
|
|
||||||
// RIGHT REAR VERTICAL RAIL
|
// RIGHT REAR VERTICAL RAIL
|
||||||
@ -1286,11 +1286,11 @@ const sketch004rr = startSketchOn(extrude002rr, 'START')
|
|||||||
], %, $rectangleSegmentC003rr)
|
], %, $rectangleSegmentC003rr)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude004rr = extrude(sketch004rr, length = -thickness)
|
const extrude004rr = extrude(sketch004rr, length = -thickness)
|
||||||
|
|
||||||
// EIA-310-D standard hole pattern
|
// EIA-310-D standard hole pattern
|
||||||
@ -1310,11 +1310,11 @@ const sketch005rr = startSketchOn(extrude002rr, 'START')
|
|||||||
], %, $rectangleSegmentC004rr)
|
], %, $rectangleSegmentC004rr)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude005rr = extrude(sketch005rr, length = -thickness)
|
const extrude005rr = extrude(sketch005rr, length = -thickness)
|
||||||
|
|
||||||
// EIA-310-D standard hole pattern
|
// EIA-310-D standard hole pattern
|
||||||
@ -1334,11 +1334,11 @@ const sketch006rr = startSketchOn(extrude002rr, 'START')
|
|||||||
], %, $rectangleSegmentC005rr)
|
], %, $rectangleSegmentC005rr)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude006rr = extrude(sketch006rr, length = -thickness)
|
const extrude006rr = extrude(sketch006rr, length = -thickness)
|
||||||
|
|
||||||
// EIA-310-D standard hole pattern
|
// EIA-310-D standard hole pattern
|
||||||
@ -1358,11 +1358,11 @@ const sketch007rr = startSketchOn(extrude001rr, 'START')
|
|||||||
], %, $rectangleSegmentC006rr)
|
], %, $rectangleSegmentC006rr)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude007rr = extrude(sketch007rr, length = -thickness)
|
const extrude007rr = extrude(sketch007rr, length = -thickness)
|
||||||
|
|
||||||
// EIA-310-D standard hole pattern
|
// EIA-310-D standard hole pattern
|
||||||
@ -1382,11 +1382,11 @@ const sketch008rr = startSketchOn(extrude001rr, 'START')
|
|||||||
], %, $rectangleSegmentC007rr)
|
], %, $rectangleSegmentC007rr)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude008rr = extrude(sketch008rr, length = -thickness)
|
const extrude008rr = extrude(sketch008rr, length = -thickness)
|
||||||
|
|
||||||
// EIA-310-D standard hole pattern
|
// EIA-310-D standard hole pattern
|
||||||
@ -1406,11 +1406,11 @@ const sketch009rr = startSketchOn(extrude001rr, 'START')
|
|||||||
], %, $rectangleSegmentC008rr)
|
], %, $rectangleSegmentC008rr)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude009rr = extrude(sketch009rr, length = -thickness)
|
const extrude009rr = extrude(sketch009rr, length = -thickness)
|
||||||
|
|
||||||
// define slots
|
// define slots
|
||||||
@ -1427,11 +1427,11 @@ const sketch010rr = startSketchOn(extrude001rr, 'START')
|
|||||||
|> xLine(-0.75 + .438, %)
|
|> xLine(-0.75 + .438, %)
|
||||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: 2,
|
instances = 2,
|
||||||
distance: 1.22
|
distance = 1.22
|
||||||
}, %)
|
)
|
||||||
const extrude010rr = extrude(sketch010rr, length = -thickness)
|
const extrude010rr = extrude(sketch010rr, length = -thickness)
|
||||||
|
|
||||||
// define slots
|
// define slots
|
||||||
@ -1465,11 +1465,11 @@ const sketch012rr = startSketchOn(extrude001rr, 'START')
|
|||||||
|> xLine(-0.75 + .438, %)
|
|> xLine(-0.75 + .438, %)
|
||||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, -1],
|
axis = [0, -1],
|
||||||
instances: 2,
|
instances = 2,
|
||||||
distance: 1.22
|
distance = 1.22
|
||||||
}, %)
|
)
|
||||||
const extrude012rr = extrude(sketch012rr, length = -thickness)
|
const extrude012rr = extrude(sketch012rr, length = -thickness)
|
||||||
|
|
||||||
// REAR LEFT VETCIAL RAIL
|
// REAR LEFT VETCIAL RAIL
|
||||||
@ -1579,11 +1579,11 @@ const sketch004rl = startSketchOn(extrude002rl, 'START')
|
|||||||
], %, $rectangleSegmentC003rl)
|
], %, $rectangleSegmentC003rl)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude004rl = extrude(sketch004rl, length = -thickness)
|
const extrude004rl = extrude(sketch004rl, length = -thickness)
|
||||||
|
|
||||||
// EIA-310-D standard hole pattern
|
// EIA-310-D standard hole pattern
|
||||||
@ -1603,11 +1603,11 @@ const sketch005rl = startSketchOn(extrude002rl, 'START')
|
|||||||
], %, $rectangleSegmentC004rl)
|
], %, $rectangleSegmentC004rl)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude005rl = extrude(sketch005rl, length = -thickness)
|
const extrude005rl = extrude(sketch005rl, length = -thickness)
|
||||||
|
|
||||||
// EIA-310-D standard hole pattern
|
// EIA-310-D standard hole pattern
|
||||||
@ -1627,11 +1627,11 @@ const sketch006rl = startSketchOn(extrude002rl, 'START')
|
|||||||
], %, $rectangleSegmentC005rl)
|
], %, $rectangleSegmentC005rl)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude006rl = extrude(sketch006rl, length = -thickness)
|
const extrude006rl = extrude(sketch006rl, length = -thickness)
|
||||||
|
|
||||||
// EIA-310-D standard hole pattern
|
// EIA-310-D standard hole pattern
|
||||||
@ -1651,11 +1651,11 @@ const sketch007rl = startSketchOn(extrude001rl, 'START')
|
|||||||
], %, $rectangleSegmentC006rl)
|
], %, $rectangleSegmentC006rl)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude007rl = extrude(sketch007rl, length = -thickness)
|
const extrude007rl = extrude(sketch007rl, length = -thickness)
|
||||||
|
|
||||||
// EIA-310-D standard hole pattern
|
// EIA-310-D standard hole pattern
|
||||||
@ -1675,11 +1675,11 @@ const sketch008rl = startSketchOn(extrude001rl, 'START')
|
|||||||
], %, $rectangleSegmentC007rl)
|
], %, $rectangleSegmentC007rl)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude008rl = extrude(sketch008rl, length = -thickness)
|
const extrude008rl = extrude(sketch008rl, length = -thickness)
|
||||||
|
|
||||||
// EIA-310-D standard hole pattern
|
// EIA-310-D standard hole pattern
|
||||||
@ -1699,11 +1699,11 @@ const sketch009rl = startSketchOn(extrude001rl, 'START')
|
|||||||
], %, $rectangleSegmentC008rl)
|
], %, $rectangleSegmentC008rl)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: railHeight,
|
instances = railHeight,
|
||||||
distance: 0.62 + 0.62 + 0.5
|
distance = 0.62 + 0.62 + 0.5
|
||||||
}, %)
|
)
|
||||||
const extrude009rl = extrude(sketch009rl, length = -thickness)
|
const extrude009rl = extrude(sketch009rl, length = -thickness)
|
||||||
|
|
||||||
// define slots
|
// define slots
|
||||||
@ -1720,11 +1720,11 @@ const sketch010rl = startSketchOn(extrude001rl, 'START')
|
|||||||
|> xLine(-0.75 + .438, %)
|
|> xLine(-0.75 + .438, %)
|
||||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: 2,
|
instances = 2,
|
||||||
distance: 1.22
|
distance = 1.22
|
||||||
}, %)
|
)
|
||||||
const extrude010rl = extrude(sketch010rl, length = -thickness)
|
const extrude010rl = extrude(sketch010rl, length = -thickness)
|
||||||
|
|
||||||
// define slots
|
// define slots
|
||||||
@ -1758,11 +1758,11 @@ const sketch012rl = startSketchOn(extrude001rl, 'START')
|
|||||||
|> xLine(-0.75 + .438, %)
|
|> xLine(-0.75 + .438, %)
|
||||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, -1],
|
axis = [0, -1],
|
||||||
instances: 2,
|
instances = 2,
|
||||||
distance: 1.22
|
distance = 1.22
|
||||||
}, %)
|
)
|
||||||
const extrude012rl = extrude(sketch012rl, length = -thickness)
|
const extrude012rl = extrude(sketch012rl, length = -thickness)
|
||||||
|
|
||||||
// GENERATE SERVER MODELS
|
// GENERATE SERVER MODELS
|
||||||
|
@ -719,11 +719,11 @@ const sketch010fl = startSketchOn(extrude001fl, 'START')
|
|||||||
|> xLine(-0.75 + .438, %)
|
|> xLine(-0.75 + .438, %)
|
||||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: 2,
|
instances = 2,
|
||||||
distance: 1.22
|
distance = 1.22
|
||||||
}, %)
|
)
|
||||||
const extrude010fl = extrude(sketch010fl, length = -thickness)
|
const extrude010fl = extrude(sketch010fl, length = -thickness)
|
||||||
|
|
||||||
// define slots
|
// define slots
|
||||||
@ -757,11 +757,11 @@ const sketch012fl = startSketchOn(extrude001fl, 'START')
|
|||||||
|> xLine(-0.75 + .438, %)
|
|> xLine(-0.75 + .438, %)
|
||||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, -1],
|
axis = [0, -1],
|
||||||
instances: 2,
|
instances = 2,
|
||||||
distance: 1.22
|
distance = 1.22
|
||||||
}, %)
|
)
|
||||||
const extrude012fl = extrude(sketch012fl, length = -thickness)
|
const extrude012fl = extrude(sketch012fl, length = -thickness)
|
||||||
|
|
||||||
// FRONT RIGHT VERTICAL RAIL
|
// FRONT RIGHT VERTICAL RAIL
|
||||||
@ -869,11 +869,11 @@ const sketch010fr = startSketchOn(extrude001fr, 'START')
|
|||||||
|> xLine(-0.75 + .438, %)
|
|> xLine(-0.75 + .438, %)
|
||||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: 2,
|
instances = 2,
|
||||||
distance: 1.22
|
distance = 1.22
|
||||||
}, %)
|
)
|
||||||
const extrude010fr = extrude(sketch010fr, length = -thickness)
|
const extrude010fr = extrude(sketch010fr, length = -thickness)
|
||||||
|
|
||||||
// define slots
|
// define slots
|
||||||
@ -907,11 +907,11 @@ const sketch012fr = startSketchOn(extrude001fr, 'START')
|
|||||||
|> xLine(-0.75 + .438, %)
|
|> xLine(-0.75 + .438, %)
|
||||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, -1],
|
axis = [0, -1],
|
||||||
instances: 2,
|
instances = 2,
|
||||||
distance: 1.22
|
distance = 1.22
|
||||||
}, %)
|
)
|
||||||
const extrude012fr = extrude(sketch012fr, length = -thickness)
|
const extrude012fr = extrude(sketch012fr, length = -thickness)
|
||||||
|
|
||||||
// RIGHT REAR VERTICAL RAIL
|
// RIGHT REAR VERTICAL RAIL
|
||||||
@ -1019,11 +1019,11 @@ const sketch010rr = startSketchOn(extrude001rr, 'START')
|
|||||||
|> xLine(-0.75 + .438, %)
|
|> xLine(-0.75 + .438, %)
|
||||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: 2,
|
instances = 2,
|
||||||
distance: 1.22
|
distance = 1.22
|
||||||
}, %)
|
)
|
||||||
const extrude010rr = extrude(sketch010rr, length = -thickness)
|
const extrude010rr = extrude(sketch010rr, length = -thickness)
|
||||||
|
|
||||||
// define slots
|
// define slots
|
||||||
@ -1057,11 +1057,11 @@ const sketch012rr = startSketchOn(extrude001rr, 'START')
|
|||||||
|> xLine(-0.75 + .438, %)
|
|> xLine(-0.75 + .438, %)
|
||||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, -1],
|
axis = [0, -1],
|
||||||
instances: 2,
|
instances = 2,
|
||||||
distance: 1.22
|
distance = 1.22
|
||||||
}, %)
|
)
|
||||||
const extrude012rr = extrude(sketch012rr, length = -thickness)
|
const extrude012rr = extrude(sketch012rr, length = -thickness)
|
||||||
|
|
||||||
// REAR LEFT VETCIAL RAIL
|
// REAR LEFT VETCIAL RAIL
|
||||||
@ -1168,11 +1168,11 @@ const sketch010rl = startSketchOn(extrude001rl, 'START')
|
|||||||
|> xLine(-0.75 + .438, %)
|
|> xLine(-0.75 + .438, %)
|
||||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: 2,
|
instances = 2,
|
||||||
distance: 1.22
|
distance = 1.22
|
||||||
}, %)
|
)
|
||||||
const extrude010rl = extrude(sketch010rl, length = -thickness)
|
const extrude010rl = extrude(sketch010rl, length = -thickness)
|
||||||
|
|
||||||
// define slots
|
// define slots
|
||||||
@ -1206,11 +1206,11 @@ const sketch012rl = startSketchOn(extrude001rl, 'START')
|
|||||||
|> xLine(-0.75 + .438, %)
|
|> xLine(-0.75 + .438, %)
|
||||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||||
|> close()
|
|> close()
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, -1],
|
axis = [0, -1],
|
||||||
instances: 2,
|
instances = 2,
|
||||||
distance: 1.22
|
distance = 1.22
|
||||||
}, %)
|
)
|
||||||
const extrude012rl = extrude(sketch012rl, length = -thickness)
|
const extrude012rl = extrude(sketch012rl, length = -thickness)
|
||||||
|
|
||||||
// Define planes so the server can be moved
|
// Define planes so the server can be moved
|
||||||
|
@ -66,16 +66,16 @@ const peg = startSketchOn(s, 'end')
|
|||||||
-(pitch*(wbumps-1)/2),
|
-(pitch*(wbumps-1)/2),
|
||||||
-(pitch*(lbumps-1)/2)
|
-(pitch*(lbumps-1)/2)
|
||||||
], radius: bumpDiam / 2 }, %)
|
], radius: bumpDiam / 2 }, %)
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [1, 0],
|
axis = [1, 0],
|
||||||
instances: wbumps,
|
instances = wbumps,
|
||||||
distance: pitch
|
distance = pitch
|
||||||
}, %)
|
)
|
||||||
|> patternLinear2d({
|
|> patternLinear2d(
|
||||||
axis: [0, 1],
|
axis = [0, 1],
|
||||||
instances: lbumps,
|
instances = lbumps,
|
||||||
distance: pitch
|
distance = pitch
|
||||||
}, %)
|
)
|
||||||
|> extrude(bumpHeight, %)
|
|> extrude(bumpHeight, %)
|
||||||
// |> patternTransform(int(totalBumps-1), tr, %)
|
// |> patternTransform(int(totalBumps-1), tr, %)
|
||||||
|
|
||||||
|
@ -348,7 +348,7 @@ async fn kcl_test_patterns_linear_basic_with_math() {
|
|||||||
distance = 5
|
distance = 5
|
||||||
part = startSketchOn('XY')
|
part = startSketchOn('XY')
|
||||||
|> circle({ center: [0,0], radius: 2 }, %)
|
|> circle({ center: [0,0], radius: 2 }, %)
|
||||||
|> patternLinear2d({axis: [0,1], instances: num, distance: distance - 1}, %)
|
|> patternLinear2d(axis = [0,1], instances = num, distance = distance - 1)
|
||||||
|> extrude(length = 1)
|
|> extrude(length = 1)
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
@ -360,7 +360,7 @@ part = startSketchOn('XY')
|
|||||||
async fn kcl_test_patterns_linear_basic() {
|
async fn kcl_test_patterns_linear_basic() {
|
||||||
let code = r#"part = startSketchOn('XY')
|
let code = r#"part = startSketchOn('XY')
|
||||||
|> circle({ center: [0,0], radius: 2 }, %)
|
|> circle({ center: [0,0], radius: 2 }, %)
|
||||||
|> patternLinear2d({axis: [0,1], instances: 13, distance: 4}, %)
|
|> patternLinear2d(axis = [0,1], instances = 13, distance = 4)
|
||||||
|> extrude(length = 1)
|
|> extrude(length = 1)
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
@ -377,7 +377,7 @@ async fn kcl_test_patterns_linear_basic_3d() {
|
|||||||
|> line(end = [0, -1])
|
|> line(end = [0, -1])
|
||||||
|> close()
|
|> close()
|
||||||
|> extrude(length = 1)
|
|> extrude(length = 1)
|
||||||
|> patternLinear3d({axis: [1, 0, 1], instances: 4, distance: 6}, %)
|
|> patternLinear3d(axis = [1, 0, 1], instances = 4, distance = 6)
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
let result = execute_and_snapshot(code, UnitLength::Mm, None).await.unwrap();
|
let result = execute_and_snapshot(code, UnitLength::Mm, None).await.unwrap();
|
||||||
@ -388,7 +388,7 @@ async fn kcl_test_patterns_linear_basic_3d() {
|
|||||||
async fn kcl_test_patterns_linear_basic_negative_distance() {
|
async fn kcl_test_patterns_linear_basic_negative_distance() {
|
||||||
let code = r#"part = startSketchOn('XY')
|
let code = r#"part = startSketchOn('XY')
|
||||||
|> circle({ center: [0,0], radius: 2 }, %)
|
|> circle({ center: [0,0], radius: 2 }, %)
|
||||||
|> patternLinear2d({axis: [0,1], instances: 13, distance: -2}, %)
|
|> patternLinear2d(axis = [0,1], instances = 13, distance = -2)
|
||||||
|> extrude(length = 1)
|
|> extrude(length = 1)
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
@ -400,7 +400,7 @@ async fn kcl_test_patterns_linear_basic_negative_distance() {
|
|||||||
async fn kcl_test_patterns_linear_basic_negative_axis() {
|
async fn kcl_test_patterns_linear_basic_negative_axis() {
|
||||||
let code = r#"part = startSketchOn('XY')
|
let code = r#"part = startSketchOn('XY')
|
||||||
|> circle({ center: [0,0], radius: 2 }, %)
|
|> circle({ center: [0,0], radius: 2 }, %)
|
||||||
|> patternLinear2d({axis: [0,-1], instances: 13, distance: 2}, %)
|
|> patternLinear2d(axis = [0,-1], instances = 13, distance = 2)
|
||||||
|> extrude(length = 1)
|
|> extrude(length = 1)
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
@ -412,7 +412,7 @@ async fn kcl_test_patterns_linear_basic_negative_axis() {
|
|||||||
async fn kcl_test_patterns_linear_basic_holes() {
|
async fn kcl_test_patterns_linear_basic_holes() {
|
||||||
let code = r#"circles = startSketchOn('XY')
|
let code = r#"circles = startSketchOn('XY')
|
||||||
|> circle({ center: [5, 5], radius: 1 }, %)
|
|> circle({ center: [5, 5], radius: 1 }, %)
|
||||||
|> patternLinear2d({axis: [1,1], instances: 13, distance: 3}, %)
|
|> patternLinear2d(axis = [1,1], instances = 13, distance = 3)
|
||||||
|
|
||||||
rectangle = startSketchOn('XY')
|
rectangle = startSketchOn('XY')
|
||||||
|> startProfileAt([0, 0], %)
|
|> startProfileAt([0, 0], %)
|
||||||
@ -433,7 +433,7 @@ rectangle = startSketchOn('XY')
|
|||||||
async fn kcl_test_patterns_circular_basic_2d() {
|
async fn kcl_test_patterns_circular_basic_2d() {
|
||||||
let code = r#"part = startSketchOn('XY')
|
let code = r#"part = startSketchOn('XY')
|
||||||
|> circle({ center: [0,0], radius: 2 }, %)
|
|> circle({ center: [0,0], radius: 2 }, %)
|
||||||
|> patternCircular2d({center: [20, 20], instances: 13, arcDegrees: 210, rotateDuplicates: true}, %)
|
|> patternCircular2d(center = [20, 20], instances = 13, arcDegrees = 210, rotateDuplicates = true)
|
||||||
|> extrude(length = 1)
|
|> extrude(length = 1)
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
@ -450,7 +450,7 @@ async fn kcl_test_patterns_circular_basic_3d() {
|
|||||||
|> line(end = [0, -1])
|
|> line(end = [0, -1])
|
||||||
|> close()
|
|> close()
|
||||||
|> extrude(length = 1)
|
|> extrude(length = 1)
|
||||||
|> patternCircular3d({axis: [0,0, 1], center: [-20, -20, -20], instances: 41, arcDegrees: 360, rotateDuplicates: false}, %)
|
|> patternCircular3d(axis = [0,0, 1], center = [-20, -20, -20], instances = 41, arcDegrees = 360, rotateDuplicates = false)
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
let result = execute_and_snapshot(code, UnitLength::Mm, None).await.unwrap();
|
let result = execute_and_snapshot(code, UnitLength::Mm, None).await.unwrap();
|
||||||
@ -466,7 +466,7 @@ async fn kcl_test_patterns_circular_3d_tilted_axis() {
|
|||||||
|> line(end = [0, -1])
|
|> line(end = [0, -1])
|
||||||
|> close()
|
|> close()
|
||||||
|> extrude(length = 1)
|
|> extrude(length = 1)
|
||||||
|> patternCircular3d({axis: [1,1,0], center: [10, 0, 10], instances: 11, arcDegrees: 360, rotateDuplicates: true}, %)
|
|> patternCircular3d(axis = [1,1,0], center = [10, 0, 10], instances = 11, arcDegrees = 360, rotateDuplicates = true)
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
let result = execute_and_snapshot(code, UnitLength::Mm, None).await.unwrap();
|
let result = execute_and_snapshot(code, UnitLength::Mm, None).await.unwrap();
|
||||||
@ -1417,11 +1417,12 @@ sketch002 = plane001
|
|||||||
|
|
||||||
let extrudes = [sketch001, sketch002]
|
let extrudes = [sketch001, sketch002]
|
||||||
|
|
||||||
pattn1 = patternLinear3d({
|
pattn1 = patternLinear3d(
|
||||||
axis: [0, 1, 0],
|
extrudes,
|
||||||
instances: 3,
|
axis = [0, 1, 0],
|
||||||
distance: 20
|
instances = 3,
|
||||||
}, extrudes)
|
distance = 20
|
||||||
|
)
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
let result = execute_and_snapshot(code, UnitLength::Mm, None).await.unwrap();
|
let result = execute_and_snapshot(code, UnitLength::Mm, None).await.unwrap();
|
||||||
@ -1558,17 +1559,17 @@ async fn kcl_test_linear_pattern3d_filleted_sketch() {
|
|||||||
part001 = cube([0,0], 20)
|
part001 = cube([0,0], 20)
|
||||||
|> close(tag = $line1)
|
|> close(tag = $line1)
|
||||||
|> extrude(length = 20)
|
|> extrude(length = 20)
|
||||||
|> fillet({
|
|> fillet({
|
||||||
radius: 10,
|
radius: 10,
|
||||||
tags: [getOppositeEdge(line1)]
|
tags: [getOppositeEdge(line1)]
|
||||||
}, %)
|
}, %)
|
||||||
|
|
||||||
pattn1 = patternLinear3d({
|
|
||||||
axis: [1, 0, 0],
|
|
||||||
instances: 4,
|
|
||||||
distance: 40
|
|
||||||
}, part001)
|
|
||||||
|
|
||||||
|
pattn1 = patternLinear3d(
|
||||||
|
part001,
|
||||||
|
axis = [1, 0, 0],
|
||||||
|
instances = 4,
|
||||||
|
distance = 40
|
||||||
|
)
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
let result = execute_and_snapshot(code, UnitLength::Mm, None).await.unwrap();
|
let result = execute_and_snapshot(code, UnitLength::Mm, None).await.unwrap();
|
||||||
@ -1594,7 +1595,7 @@ part001 = cube([0,0], 20)
|
|||||||
tags: [getOppositeEdge(line1)]
|
tags: [getOppositeEdge(line1)]
|
||||||
}, %)
|
}, %)
|
||||||
|
|
||||||
pattn2 = patternCircular3d({axis: [0,0, 1], center: [-20, -20, -20], instances: 5, arcDegrees: 360, rotateDuplicates: false}, part001)
|
pattn2 = patternCircular3d(part001, axis = [0,0, 1], center = [-20, -20, -20], instances = 5, arcDegrees = 360, rotateDuplicates = false)
|
||||||
|
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
@ -1621,8 +1622,7 @@ part001 = cube([0,0], 20)
|
|||||||
tags: [getOppositeEdge(line1)]
|
tags: [getOppositeEdge(line1)]
|
||||||
}, %)
|
}, %)
|
||||||
|
|
||||||
pattn2 = patternCircular3d({axis: [0,0, 1], center: [-20, -20, -20], instances: 5, arcDegrees: 360, rotateDuplicates: false}, part001)
|
pattn2 = patternCircular3d(part001, axis = [0,0, 1], center = [-20, -20, -20], instances = 5, arcDegrees = 360, rotateDuplicates = false)
|
||||||
|
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
let result = execute_and_snapshot(code, UnitLength::Mm, None).await.unwrap();
|
let result = execute_and_snapshot(code, UnitLength::Mm, None).await.unwrap();
|
||||||
@ -1748,12 +1748,12 @@ async fn kcl_test_arc_error_same_start_end() {
|
|||||||
radius: 1.5
|
radius: 1.5
|
||||||
}, %)
|
}, %)
|
||||||
|> close()
|
|> close()
|
||||||
|> patternCircular2d({
|
|> patternCircular2d(
|
||||||
arcDegrees: 360,
|
arcDegrees = 360,
|
||||||
center: [0, 0],
|
center = [0, 0],
|
||||||
instances: 6,
|
instances = 6,
|
||||||
rotateDuplicates: true
|
rotateDuplicates = true
|
||||||
}, %)
|
)
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
let result = execute_and_snapshot(code, UnitLength::Mm, None).await;
|
let result = execute_and_snapshot(code, UnitLength::Mm, None).await;
|
||||||
|
Reference in New Issue
Block a user