circle moved to kw args (#5560)
* rust side of circle args Signed-off-by: Jess Frazelle <github@jessfraz.com> * change circle in all test js files Signed-off-by: Jess Frazelle <github@jessfraz.com> * more js side Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * ud[ates Signed-off-by: Jess Frazelle <github@jessfraz.com> * ud[ates Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
2
.github/workflows/cargo-test.yml
vendored
2
.github/workflows/cargo-test.yml
vendored
@ -46,7 +46,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |-
|
run: |-
|
||||||
cd "${{ matrix.dir }}"
|
cd "${{ matrix.dir }}"
|
||||||
cargo llvm-cov nextest --workspace --lcov --output-path lcov.info --test-threads=1 --retries=2 --no-fail-fast -P ci 2>&1 | tee /tmp/github-actions.log
|
cargo llvm-cov nextest --workspace --lcov --output-path lcov.info --retries=2 --no-fail-fast -P ci 2>&1 | tee /tmp/github-actions.log
|
||||||
env:
|
env:
|
||||||
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
||||||
RUST_MIN_STACK: 10485760000
|
RUST_MIN_STACK: 10485760000
|
||||||
|
@ -53,7 +53,7 @@ example = extrude(exampleSketch, length = 5)
|
|||||||
```js
|
```js
|
||||||
// Add color to a revolved solid.
|
// Add color to a revolved solid.
|
||||||
sketch001 = startSketchOn('XY')
|
sketch001 = startSketchOn('XY')
|
||||||
|> circle({ center = [15, 0], radius = 5 }, %)
|
|> circle(center = [15, 0], radius = 5)
|
||||||
|> revolve({ angle = 360, axis = 'y' }, %)
|
|> revolve({ angle = 360, axis = 'y' }, %)
|
||||||
|> appearance(color = '#ff0000', metalness = 90, roughness = 90)
|
|> appearance(color = '#ff0000', metalness = 90, roughness = 90)
|
||||||
```
|
```
|
||||||
@ -195,10 +195,10 @@ sweepPath = startSketchOn('XZ')
|
|||||||
|> line(end = [0, 7])
|
|> line(end = [0, 7])
|
||||||
|
|
||||||
pipeHole = startSketchOn('XY')
|
pipeHole = startSketchOn('XY')
|
||||||
|> circle({ center = [0, 0], radius = 1.5 }, %)
|
|> circle(center = [0, 0], radius = 1.5)
|
||||||
|
|
||||||
sweepSketch = startSketchOn('XY')
|
sweepSketch = startSketchOn('XY')
|
||||||
|> circle({ center = [0, 0], radius = 2 }, %)
|
|> circle(center = [0, 0], radius = 2)
|
||||||
|> hole(pipeHole, %)
|
|> hole(pipeHole, %)
|
||||||
|> sweep(path = sweepPath)
|
|> sweep(path = sweepPath)
|
||||||
|> appearance(color = "#ff0000", metalness = 50, roughness = 50)
|
|> appearance(color = "#ff0000", metalness = 50, roughness = 50)
|
||||||
|
@ -10,8 +10,9 @@ the provided (x, y) origin point.
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
circle(
|
circle(
|
||||||
data: CircleData,
|
sketchOrSurface: SketchOrSurface,
|
||||||
sketchSurfaceOrGroup: SketchOrSurface,
|
center: [number],
|
||||||
|
radius: number,
|
||||||
tag?: TagDeclarator,
|
tag?: TagDeclarator,
|
||||||
) -> Sketch
|
) -> Sketch
|
||||||
```
|
```
|
||||||
@ -21,9 +22,10 @@ circle(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `data` | [`CircleData`](/docs/kcl/types/CircleData) | Data for drawing an circle | Yes |
|
| `sketchOrSurface` | [`SketchOrSurface`](/docs/kcl/types/SketchOrSurface) | Plane or surface to sketch on. | Yes |
|
||||||
| `sketchSurfaceOrGroup` | [`SketchOrSurface`](/docs/kcl/types/SketchOrSurface) | A sketch surface or a sketch. | Yes |
|
| `center` | `[number]` | The center of the circle. | Yes |
|
||||||
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | | No |
|
| `radius` | `number` | The radius of the circle. | Yes |
|
||||||
|
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | Create a new tag which refers to this circle | No |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
@ -34,7 +36,7 @@ circle(
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
exampleSketch = startSketchOn("-XZ")
|
exampleSketch = startSketchOn("-XZ")
|
||||||
|> circle({ center = [0, 0], radius = 10 }, %)
|
|> circle(center = [0, 0], radius = 10)
|
||||||
|
|
||||||
example = extrude(exampleSketch, length = 5)
|
example = extrude(exampleSketch, length = 5)
|
||||||
```
|
```
|
||||||
@ -48,7 +50,7 @@ exampleSketch = startSketchOn("XZ")
|
|||||||
|> line(end = [0, 30])
|
|> line(end = [0, 30])
|
||||||
|> line(end = [-30, 0])
|
|> line(end = [-30, 0])
|
||||||
|> close()
|
|> close()
|
||||||
|> hole(circle({ center = [0, 15], radius = 5 }, %), %)
|
|> hole(circle(center = [0, 15], radius = 5), %)
|
||||||
|
|
||||||
example = extrude(exampleSketch, length = 5)
|
example = extrude(exampleSketch, length = 5)
|
||||||
```
|
```
|
||||||
|
@ -18,7 +18,7 @@ std::math::PI: number = 3.14159265358979323846264338327950288_
|
|||||||
circumference = 70
|
circumference = 70
|
||||||
|
|
||||||
exampleSketch = startSketchOn("XZ")
|
exampleSketch = startSketchOn("XZ")
|
||||||
|> circle({ center = [0, 0], radius = circumference/ (2 * PI) }, %)
|
|> circle(center = [0, 0], radius = circumference/ (2 * PI))
|
||||||
|
|
||||||
example = extrude(exampleSketch, length = 5)
|
example = extrude(exampleSketch, length = 5)
|
||||||
```
|
```
|
||||||
|
@ -51,7 +51,7 @@ helixPath = helix(
|
|||||||
|
|
||||||
// Create a spring by sweeping around the helix path.
|
// Create a spring by sweeping around the helix path.
|
||||||
springSketch = startSketchOn('YZ')
|
springSketch = startSketchOn('YZ')
|
||||||
|> circle({ center = [0, 0], radius = 0.5 }, %)
|
|> circle(center = [0, 0], radius = 0.5)
|
||||||
|> sweep(path = helixPath)
|
|> sweep(path = helixPath)
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ helixPath = helix(
|
|||||||
|
|
||||||
// Create a spring by sweeping around the helix path.
|
// Create a spring by sweeping around the helix path.
|
||||||
springSketch = startSketchOn('XY')
|
springSketch = startSketchOn('XY')
|
||||||
|> circle({ center = [0, 0], radius = 0.5 }, %)
|
|> circle(center = [0, 0], radius = 0.5)
|
||||||
|> sweep(path = helixPath)
|
|> sweep(path = helixPath)
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ helixPath = helix(
|
|||||||
|
|
||||||
// Create a spring by sweeping around the helix path.
|
// Create a spring by sweeping around the helix path.
|
||||||
springSketch = startSketchOn('XY')
|
springSketch = startSketchOn('XY')
|
||||||
|> circle({ center = [0, 0], radius = 1 }, %)
|
|> circle(center = [0, 0], radius = 1)
|
||||||
|> sweep(path = helixPath)
|
|> sweep(path = helixPath)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ helixRevolutions(
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
part001 = startSketchOn('XY')
|
part001 = startSketchOn('XY')
|
||||||
|> circle({ center = [5, 5], radius = 10 }, %)
|
|> circle(center = [5, 5], radius = 10)
|
||||||
|> extrude(length = 10)
|
|> extrude(length = 10)
|
||||||
|> helixRevolutions({
|
|> helixRevolutions({
|
||||||
angleStart = 0,
|
angleStart = 0,
|
||||||
|
@ -37,8 +37,8 @@ exampleSketch = startSketchOn(XY)
|
|||||||
|> line(end = [5, 0])
|
|> line(end = [5, 0])
|
||||||
|> line(end = [0, -5])
|
|> line(end = [0, -5])
|
||||||
|> close()
|
|> close()
|
||||||
|> hole(circle({ center = [1, 1], radius = .25 }, %), %)
|
|> hole(circle(center = [1, 1], radius = .25), %)
|
||||||
|> hole(circle({ center = [1, 4], radius = .25 }, %), %)
|
|> hole(circle(center = [1, 4], radius = .25), %)
|
||||||
|
|
||||||
example = extrude(exampleSketch, length = 1)
|
example = extrude(exampleSketch, length = 1)
|
||||||
```
|
```
|
||||||
@ -57,7 +57,7 @@ fn squareHoleSketch() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
exampleSketch = startSketchOn(-XZ)
|
exampleSketch = startSketchOn(-XZ)
|
||||||
|> circle({ center = [0, 0], radius = 3 }, %)
|
|> circle(center = [0, 0], radius = 3)
|
||||||
|> hole(squareHoleSketch(), %)
|
|> hole(squareHoleSketch(), %)
|
||||||
example = extrude(exampleSketch, length = 1)
|
example = extrude(exampleSketch, length = 1)
|
||||||
```
|
```
|
||||||
|
@ -70,17 +70,11 @@ case = startSketchOn('-XZ')
|
|||||||
|> extrude(length = 65)
|
|> extrude(length = 65)
|
||||||
|
|
||||||
thing1 = startSketchOn(case, 'end')
|
thing1 = startSketchOn(case, 'end')
|
||||||
|> circle({
|
|> circle(center = [-size / 2, -size / 2], radius = 25)
|
||||||
center = [-size / 2, -size / 2],
|
|
||||||
radius = 25
|
|
||||||
}, %)
|
|
||||||
|> extrude(length = 50)
|
|> extrude(length = 50)
|
||||||
|
|
||||||
thing2 = startSketchOn(case, 'end')
|
thing2 = startSketchOn(case, 'end')
|
||||||
|> circle({
|
|> circle(center = [size / 2, -size / 2], radius = 25)
|
||||||
center = [size / 2, -size / 2],
|
|
||||||
radius = 25
|
|
||||||
}, %)
|
|
||||||
|> extrude(length = 50)
|
|> extrude(length = 50)
|
||||||
|
|
||||||
hollow(0.5, case)
|
hollow(0.5, case)
|
||||||
|
@ -37,7 +37,7 @@ n = int(ceil(5 / 2))
|
|||||||
assertEqual(n, 3, 0.0001, "5/2 = 2.5, rounded up makes 3")
|
assertEqual(n, 3, 0.0001, "5/2 = 2.5, rounded up makes 3")
|
||||||
// Draw n cylinders.
|
// Draw n cylinders.
|
||||||
startSketchOn('XZ')
|
startSketchOn('XZ')
|
||||||
|> circle({ center = [0, 0], radius = 2 }, %)
|
|> circle(center = [0, 0], radius = 2)
|
||||||
|> extrude(length = 5)
|
|> extrude(length = 5)
|
||||||
|> patternTransform(
|
|> patternTransform(
|
||||||
instances = n,
|
instances = n,
|
||||||
|
@ -69,10 +69,10 @@ squareSketch = startSketchOn('XY')
|
|||||||
|> close()
|
|> close()
|
||||||
|
|
||||||
circleSketch0 = startSketchOn(offsetPlane('XY', offset = 75))
|
circleSketch0 = startSketchOn(offsetPlane('XY', offset = 75))
|
||||||
|> circle({ center = [0, 100], radius = 50 }, %)
|
|> circle(center = [0, 100], radius = 50)
|
||||||
|
|
||||||
circleSketch1 = startSketchOn(offsetPlane('XY', offset = 150))
|
circleSketch1 = startSketchOn(offsetPlane('XY', offset = 150))
|
||||||
|> circle({ center = [0, 100], radius = 20 }, %)
|
|> circle(center = [0, 100], radius = 20)
|
||||||
|
|
||||||
loft([
|
loft([
|
||||||
squareSketch,
|
squareSketch,
|
||||||
@ -94,10 +94,10 @@ squareSketch = startSketchOn('XY')
|
|||||||
|> close()
|
|> close()
|
||||||
|
|
||||||
circleSketch0 = startSketchOn(offsetPlane('XY', offset = 75))
|
circleSketch0 = startSketchOn(offsetPlane('XY', offset = 75))
|
||||||
|> circle({ center = [0, 100], radius = 50 }, %)
|
|> circle(center = [0, 100], radius = 50)
|
||||||
|
|
||||||
circleSketch1 = startSketchOn(offsetPlane('XY', offset = 150))
|
circleSketch1 = startSketchOn(offsetPlane('XY', offset = 150))
|
||||||
|> circle({ center = [0, 100], radius = 20 }, %)
|
|> circle(center = [0, 100], radius = 20)
|
||||||
|
|
||||||
loft(
|
loft(
|
||||||
[
|
[
|
||||||
|
@ -34,7 +34,7 @@ map(
|
|||||||
r = 10 // radius
|
r = 10 // radius
|
||||||
fn drawCircle(id) {
|
fn drawCircle(id) {
|
||||||
return startSketchOn("XY")
|
return startSketchOn("XY")
|
||||||
|> circle({ center = [id * 2 * r, 0], radius = r }, %)
|
|> circle(center = [id * 2 * r, 0], radius = r)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call `drawCircle`, passing in each element of the array.
|
// Call `drawCircle`, passing in each element of the array.
|
||||||
@ -50,7 +50,7 @@ r = 10 // radius
|
|||||||
// Call `map`, using an anonymous function instead of a named one.
|
// Call `map`, using an anonymous function instead of a named one.
|
||||||
circles = map([1..3], fn(id) {
|
circles = map([1..3], fn(id) {
|
||||||
return startSketchOn("XY")
|
return startSketchOn("XY")
|
||||||
|> circle({ center = [id * 2 * r, 0], radius = r }, %)
|
|> circle(center = [id * 2 * r, 0], radius = r)
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ squareSketch = startSketchOn('XY')
|
|||||||
|> close()
|
|> close()
|
||||||
|
|
||||||
circleSketch = startSketchOn(offsetPlane('XY', offset = 150))
|
circleSketch = startSketchOn(offsetPlane('XY', offset = 150))
|
||||||
|> circle({ center = [0, 100], radius = 50 }, %)
|
|> circle(center = [0, 100], radius = 50)
|
||||||
|
|
||||||
loft([squareSketch, circleSketch])
|
loft([squareSketch, circleSketch])
|
||||||
```
|
```
|
||||||
@ -59,7 +59,7 @@ squareSketch = startSketchOn('XZ')
|
|||||||
|> close()
|
|> close()
|
||||||
|
|
||||||
circleSketch = startSketchOn(offsetPlane('XZ', offset = 150))
|
circleSketch = startSketchOn(offsetPlane('XZ', offset = 150))
|
||||||
|> circle({ center = [0, 100], radius = 50 }, %)
|
|> circle(center = [0, 100], radius = 50)
|
||||||
|
|
||||||
loft([squareSketch, circleSketch])
|
loft([squareSketch, circleSketch])
|
||||||
```
|
```
|
||||||
@ -77,7 +77,7 @@ squareSketch = startSketchOn('YZ')
|
|||||||
|> close()
|
|> close()
|
||||||
|
|
||||||
circleSketch = startSketchOn(offsetPlane('YZ', offset = 150))
|
circleSketch = startSketchOn(offsetPlane('YZ', offset = 150))
|
||||||
|> circle({ center = [0, 100], radius = 50 }, %)
|
|> circle(center = [0, 100], radius = 50)
|
||||||
|
|
||||||
loft([squareSketch, circleSketch])
|
loft([squareSketch, circleSketch])
|
||||||
```
|
```
|
||||||
@ -95,7 +95,7 @@ squareSketch = startSketchOn('-XZ')
|
|||||||
|> close()
|
|> close()
|
||||||
|
|
||||||
circleSketch = startSketchOn(offsetPlane('-XZ', offset = -150))
|
circleSketch = startSketchOn(offsetPlane('-XZ', offset = -150))
|
||||||
|> circle({ center = [0, 100], radius = 50 }, %)
|
|> circle(center = [0, 100], radius = 50)
|
||||||
|
|
||||||
loft([squareSketch, circleSketch])
|
loft([squareSketch, circleSketch])
|
||||||
```
|
```
|
||||||
@ -106,7 +106,7 @@ loft([squareSketch, circleSketch])
|
|||||||
// A circle on the XY plane
|
// A circle on the XY plane
|
||||||
startSketchOn("XY")
|
startSketchOn("XY")
|
||||||
|> startProfileAt([0, 0], %)
|
|> startProfileAt([0, 0], %)
|
||||||
|> circle({ radius = 10, center = [0, 0] }, %)
|
|> circle(radius = 10, center = [0, 0])
|
||||||
|
|
||||||
// Triangle on the plane 4 units above
|
// Triangle on the plane 4 units above
|
||||||
startSketchOn(offsetPlane("XY", offset = 4))
|
startSketchOn(offsetPlane("XY", offset = 4))
|
||||||
|
@ -42,7 +42,7 @@ patternCircular3d(
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
exampleSketch = startSketchOn('XZ')
|
exampleSketch = startSketchOn('XZ')
|
||||||
|> circle({ center = [0, 0], radius = 1 }, %)
|
|> circle(center = [0, 0], radius = 1)
|
||||||
|
|
||||||
example = extrude(exampleSketch, length = -5)
|
example = extrude(exampleSketch, length = -5)
|
||||||
|> patternCircular3d(
|
|> patternCircular3d(
|
||||||
|
@ -38,7 +38,7 @@ patternLinear2d(
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
exampleSketch = startSketchOn('XZ')
|
exampleSketch = startSketchOn('XZ')
|
||||||
|> circle({ center = [0, 0], radius = 1 }, %)
|
|> circle(center = [0, 0], radius = 1)
|
||||||
|> patternLinear2d(axis = [1, 0], instances = 7, distance = 4)
|
|> patternLinear2d(axis = [1, 0], instances = 7, distance = 4)
|
||||||
|
|
||||||
example = extrude(exampleSketch, length = 1)
|
example = extrude(exampleSketch, length = 1)
|
||||||
|
@ -64,17 +64,11 @@ case = startSketchOn('XY')
|
|||||||
|> extrude(length = 65)
|
|> extrude(length = 65)
|
||||||
|
|
||||||
thing1 = startSketchOn(case, 'end')
|
thing1 = startSketchOn(case, 'end')
|
||||||
|> circle({
|
|> circle(center = [-size / 2, -size / 2], radius = 25)
|
||||||
center = [-size / 2, -size / 2],
|
|
||||||
radius = 25
|
|
||||||
}, %)
|
|
||||||
|> extrude(length = 50)
|
|> extrude(length = 50)
|
||||||
|
|
||||||
thing2 = startSketchOn(case, 'end')
|
thing2 = startSketchOn(case, 'end')
|
||||||
|> circle({
|
|> circle(center = [size / 2, -size / 2], radius = 25)
|
||||||
center = [size / 2, -size / 2],
|
|
||||||
radius = 25
|
|
||||||
}, %)
|
|
||||||
|> extrude(length = 50)
|
|> extrude(length = 50)
|
||||||
|
|
||||||
// We pass in the "case" here since we want to pattern the whole sketch.
|
// We pass in the "case" here since we want to pattern the whole sketch.
|
||||||
@ -101,10 +95,7 @@ case = startSketchOn('XY')
|
|||||||
|> extrude(length = 65)
|
|> extrude(length = 65)
|
||||||
|
|
||||||
thing1 = startSketchOn(case, 'end')
|
thing1 = startSketchOn(case, 'end')
|
||||||
|> circle({
|
|> circle(center = [-size / 2, -size / 2], radius = 25)
|
||||||
center = [-size / 2, -size / 2],
|
|
||||||
radius = 25
|
|
||||||
}, %)
|
|
||||||
|> extrude(length = 50)
|
|> extrude(length = 50)
|
||||||
|
|
||||||
// We pass in `thing1` here with `useOriginal` since we want to pattern just this object on the face.
|
// We pass in `thing1` here with `useOriginal` since we want to pattern just this object on the face.
|
||||||
|
@ -68,7 +68,7 @@ fn transform(id) {
|
|||||||
|
|
||||||
// Sketch 4 cylinders.
|
// Sketch 4 cylinders.
|
||||||
sketch001 = startSketchOn('XZ')
|
sketch001 = startSketchOn('XZ')
|
||||||
|> circle({ center = [0, 0], radius = 2 }, %)
|
|> circle(center = [0, 0], radius = 2)
|
||||||
|> extrude(length = 5)
|
|> extrude(length = 5)
|
||||||
|> patternTransform(instances = 4, transform = transform)
|
|> patternTransform(instances = 4, transform = transform)
|
||||||
```
|
```
|
||||||
@ -84,7 +84,7 @@ fn transform(id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sketch001 = startSketchOn('XZ')
|
sketch001 = startSketchOn('XZ')
|
||||||
|> circle({ center = [0, 0], radius = 2 }, %)
|
|> circle(center = [0, 0], radius = 2)
|
||||||
|> extrude(length = 5)
|
|> extrude(length = 5)
|
||||||
|> patternTransform(instances = 4, transform = transform)
|
|> patternTransform(instances = 4, transform = transform)
|
||||||
```
|
```
|
||||||
@ -184,7 +184,7 @@ fn transform(replicaId) {
|
|||||||
fn layer() {
|
fn layer() {
|
||||||
return startSketchOn("XY")
|
return startSketchOn("XY")
|
||||||
// or some other plane idk
|
// or some other plane idk
|
||||||
|> circle({ center = [0, 0], radius = 1 }, %, $tag1)
|
|> circle(center = [0, 0], radius = 1, tag = $tag1)
|
||||||
|> extrude(length = h)
|
|> extrude(length = h)
|
||||||
}
|
}
|
||||||
// The vase is 100 layers tall.
|
// The vase is 100 layers tall.
|
||||||
|
@ -42,7 +42,7 @@ fn transform(id) {
|
|||||||
|
|
||||||
// Sketch 4 circles.
|
// Sketch 4 circles.
|
||||||
sketch001 = startSketchOn('XZ')
|
sketch001 = startSketchOn('XZ')
|
||||||
|> circle({ center = [0, 0], radius = 2 }, %)
|
|> circle(center = [0, 0], radius = 2)
|
||||||
|> patternTransform2d(instances = 4, transform = transform)
|
|> patternTransform2d(instances = 4, transform = transform)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -31,10 +31,7 @@ pi() -> number
|
|||||||
circumference = 70
|
circumference = 70
|
||||||
|
|
||||||
exampleSketch = startSketchOn("XZ")
|
exampleSketch = startSketchOn("XZ")
|
||||||
|> circle({
|
|> circle(center = [0, 0], radius = circumference / (2 * pi()))
|
||||||
center = [0, 0],
|
|
||||||
radius = circumference / (2 * pi())
|
|
||||||
}, %)
|
|
||||||
|
|
||||||
example = extrude(exampleSketch, length = 5)
|
example = extrude(exampleSketch, length = 5)
|
||||||
```
|
```
|
||||||
|
@ -51,7 +51,7 @@ part001 = startSketchOn('XY')
|
|||||||
```js
|
```js
|
||||||
// A donut shape.
|
// A donut shape.
|
||||||
sketch001 = startSketchOn('XY')
|
sketch001 = startSketchOn('XY')
|
||||||
|> circle({ center = [15, 0], radius = 5 }, %)
|
|> circle(center = [15, 0], radius = 5)
|
||||||
|> revolve({ angle = 360, axis = 'y' }, %)
|
|> revolve({ angle = 360, axis = 'y' }, %)
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ box = startSketchOn('XY')
|
|||||||
|> extrude(length = 20)
|
|> extrude(length = 20)
|
||||||
|
|
||||||
sketch001 = startSketchOn(box, "END")
|
sketch001 = startSketchOn(box, "END")
|
||||||
|> circle({ center = [10, 10], radius = 4 }, %)
|
|> circle(center = [10, 10], radius = 4)
|
||||||
|> revolve({ angle = -90, axis = 'y' }, %)
|
|> revolve({ angle = -90, axis = 'y' }, %)
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ box = startSketchOn('XY')
|
|||||||
|> extrude(length = 20)
|
|> extrude(length = 20)
|
||||||
|
|
||||||
sketch001 = startSketchOn(box, "END")
|
sketch001 = startSketchOn(box, "END")
|
||||||
|> circle({ center = [10, 10], radius = 4 }, %)
|
|> circle(center = [10, 10], radius = 4)
|
||||||
|> revolve({
|
|> revolve({
|
||||||
angle = 90,
|
angle = 90,
|
||||||
axis = getOppositeEdge(revolveAxis)
|
axis = getOppositeEdge(revolveAxis)
|
||||||
@ -141,7 +141,7 @@ box = startSketchOn('XY')
|
|||||||
|> extrude(length = 20)
|
|> extrude(length = 20)
|
||||||
|
|
||||||
sketch001 = startSketchOn(box, "END")
|
sketch001 = startSketchOn(box, "END")
|
||||||
|> circle({ center = [10, 10], radius = 4 }, %)
|
|> circle(center = [10, 10], radius = 4)
|
||||||
|> revolve({
|
|> revolve({
|
||||||
angle = 90,
|
angle = 90,
|
||||||
axis = getOppositeEdge(revolveAxis),
|
axis = getOppositeEdge(revolveAxis),
|
||||||
|
@ -69,10 +69,10 @@ sweepPath = startSketchOn('XZ')
|
|||||||
|
|
||||||
// Create a hole for the pipe.
|
// Create a hole for the pipe.
|
||||||
pipeHole = startSketchOn('XY')
|
pipeHole = startSketchOn('XY')
|
||||||
|> circle({ center = [0, 0], radius = 1.5 }, %)
|
|> circle(center = [0, 0], radius = 1.5)
|
||||||
|
|
||||||
sweepSketch = startSketchOn('XY')
|
sweepSketch = startSketchOn('XY')
|
||||||
|> circle({ center = [0, 0], radius = 2 }, %)
|
|> circle(center = [0, 0], radius = 2)
|
||||||
|> hole(pipeHole, %)
|
|> hole(pipeHole, %)
|
||||||
|> sweep(path = sweepPath)
|
|> sweep(path = sweepPath)
|
||||||
|> rotate(roll = 10, pitch = 10, yaw = 90)
|
|> rotate(roll = 10, pitch = 10, yaw = 90)
|
||||||
@ -95,10 +95,10 @@ sweepPath = startSketchOn('XZ')
|
|||||||
|
|
||||||
// Create a hole for the pipe.
|
// Create a hole for the pipe.
|
||||||
pipeHole = startSketchOn('XY')
|
pipeHole = startSketchOn('XY')
|
||||||
|> circle({ center = [0, 0], radius = 1.5 }, %)
|
|> circle(center = [0, 0], radius = 1.5)
|
||||||
|
|
||||||
sweepSketch = startSketchOn('XY')
|
sweepSketch = startSketchOn('XY')
|
||||||
|> circle({ center = [0, 0], radius = 2 }, %)
|
|> circle(center = [0, 0], radius = 2)
|
||||||
|> hole(pipeHole, %)
|
|> hole(pipeHole, %)
|
||||||
|> sweep(path = sweepPath)
|
|> sweep(path = sweepPath)
|
||||||
|> rotate(axis = [0, 0, 1.0], angle = 90)
|
|> rotate(axis = [0, 0, 1.0], angle = 90)
|
||||||
|
@ -49,10 +49,10 @@ sweepPath = startSketchOn('XZ')
|
|||||||
|
|
||||||
// Create a hole for the pipe.
|
// Create a hole for the pipe.
|
||||||
pipeHole = startSketchOn('XY')
|
pipeHole = startSketchOn('XY')
|
||||||
|> circle({ center = [0, 0], radius = 1.5 }, %)
|
|> circle(center = [0, 0], radius = 1.5)
|
||||||
|
|
||||||
sweepSketch = startSketchOn('XY')
|
sweepSketch = startSketchOn('XY')
|
||||||
|> circle({ center = [0, 0], radius = 2 }, %)
|
|> circle(center = [0, 0], radius = 2)
|
||||||
|> hole(pipeHole, %)
|
|> hole(pipeHole, %)
|
||||||
|> sweep(path = sweepPath)
|
|> sweep(path = sweepPath)
|
||||||
|> scale(scale = [1.0, 1.0, 2.5])
|
|> scale(scale = [1.0, 1.0, 2.5])
|
||||||
|
@ -40,10 +40,7 @@ cube = startSketchOn('XY')
|
|||||||
fn cylinder(radius, tag) {
|
fn cylinder(radius, tag) {
|
||||||
return startSketchOn('XY')
|
return startSketchOn('XY')
|
||||||
|> startProfileAt([0, 0], %)
|
|> startProfileAt([0, 0], %)
|
||||||
|> circle({
|
|> circle(radius = radius, center = segEnd(tag))
|
||||||
radius = radius,
|
|
||||||
center = segEnd(tag)
|
|
||||||
}, %)
|
|
||||||
|> extrude(length = radius)
|
|> extrude(length = radius)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,10 +40,7 @@ cube = startSketchOn('XY')
|
|||||||
fn cylinder(radius, tag) {
|
fn cylinder(radius, tag) {
|
||||||
return startSketchOn('XY')
|
return startSketchOn('XY')
|
||||||
|> startProfileAt([0, 0], %)
|
|> startProfileAt([0, 0], %)
|
||||||
|> circle({
|
|> circle(radius = radius, center = segStart(tag))
|
||||||
radius = radius,
|
|
||||||
center = segStart(tag)
|
|
||||||
}, %)
|
|
||||||
|> extrude(length = radius)
|
|> extrude(length = radius)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,17 +108,11 @@ case = startSketchOn('-XZ')
|
|||||||
|> extrude(length = 65)
|
|> extrude(length = 65)
|
||||||
|
|
||||||
thing1 = startSketchOn(case, 'end')
|
thing1 = startSketchOn(case, 'end')
|
||||||
|> circle({
|
|> circle(center = [-size / 2, -size / 2], radius = 25)
|
||||||
center = [-size / 2, -size / 2],
|
|
||||||
radius = 25
|
|
||||||
}, %)
|
|
||||||
|> extrude(length = 50)
|
|> extrude(length = 50)
|
||||||
|
|
||||||
thing2 = startSketchOn(case, 'end')
|
thing2 = startSketchOn(case, 'end')
|
||||||
|> circle({
|
|> circle(center = [size / 2, -size / 2], radius = 25)
|
||||||
center = [size / 2, -size / 2],
|
|
||||||
radius = 25
|
|
||||||
}, %)
|
|
||||||
|> extrude(length = 50)
|
|> extrude(length = 50)
|
||||||
|
|
||||||
// We put "case" in the shell function to shell the entire object.
|
// We put "case" in the shell function to shell the entire object.
|
||||||
@ -139,17 +133,11 @@ case = startSketchOn('XY')
|
|||||||
|> extrude(length = 65)
|
|> extrude(length = 65)
|
||||||
|
|
||||||
thing1 = startSketchOn(case, 'end')
|
thing1 = startSketchOn(case, 'end')
|
||||||
|> circle({
|
|> circle(center = [-size / 2, -size / 2], radius = 25)
|
||||||
center = [-size / 2, -size / 2],
|
|
||||||
radius = 25
|
|
||||||
}, %)
|
|
||||||
|> extrude(length = 50)
|
|> extrude(length = 50)
|
||||||
|
|
||||||
thing2 = startSketchOn(case, 'end')
|
thing2 = startSketchOn(case, 'end')
|
||||||
|> circle({
|
|> circle(center = [size / 2, -size / 2], radius = 25)
|
||||||
center = [size / 2, -size / 2],
|
|
||||||
radius = 25
|
|
||||||
}, %)
|
|
||||||
|> extrude(length = 50)
|
|> extrude(length = 50)
|
||||||
|
|
||||||
// We put "thing1" in the shell function to shell the end face of the object.
|
// We put "thing1" in the shell function to shell the end face of the object.
|
||||||
@ -173,17 +161,11 @@ case = startSketchOn('XY')
|
|||||||
|> extrude(length = 65)
|
|> extrude(length = 65)
|
||||||
|
|
||||||
thing1 = startSketchOn(case, 'end')
|
thing1 = startSketchOn(case, 'end')
|
||||||
|> circle({
|
|> circle(center = [-size / 2, -size / 2], radius = 25)
|
||||||
center = [-size / 2, -size / 2],
|
|
||||||
radius = 25
|
|
||||||
}, %)
|
|
||||||
|> extrude(length = 50)
|
|> extrude(length = 50)
|
||||||
|
|
||||||
thing2 = startSketchOn(case, 'end')
|
thing2 = startSketchOn(case, 'end')
|
||||||
|> circle({
|
|> circle(center = [size / 2, -size / 2], radius = 25)
|
||||||
center = [size / 2, -size / 2],
|
|
||||||
radius = 25
|
|
||||||
}, %)
|
|
||||||
|> extrude(length = 50)
|
|> extrude(length = 50)
|
||||||
|
|
||||||
// We put "thing1" and "thing2" in the shell function to shell the end face of the object.
|
// We put "thing1" and "thing2" in the shell function to shell the end face of the object.
|
||||||
|
3353
docs/kcl/std.json
3353
docs/kcl/std.json
File diff suppressed because it is too large
Load Diff
@ -49,10 +49,10 @@ sweepPath = startSketchOn('XZ')
|
|||||||
|
|
||||||
// Create a hole for the pipe.
|
// Create a hole for the pipe.
|
||||||
pipeHole = startSketchOn('XY')
|
pipeHole = startSketchOn('XY')
|
||||||
|> circle({ center = [0, 0], radius = 1.5 }, %)
|
|> circle(center = [0, 0], radius = 1.5)
|
||||||
|
|
||||||
sweepSketch = startSketchOn('XY')
|
sweepSketch = startSketchOn('XY')
|
||||||
|> circle({ center = [0, 0], radius = 2 }, %)
|
|> circle(center = [0, 0], radius = 2)
|
||||||
|> hole(pipeHole, %)
|
|> hole(pipeHole, %)
|
||||||
|> sweep(path = sweepPath)
|
|> sweep(path = sweepPath)
|
||||||
```
|
```
|
||||||
@ -75,7 +75,7 @@ helixPath = helix(
|
|||||||
|
|
||||||
// Create a spring by sweeping around the helix path.
|
// Create a spring by sweeping around the helix path.
|
||||||
springSketch = startSketchOn('YZ')
|
springSketch = startSketchOn('YZ')
|
||||||
|> circle({ center = [0, 0], radius = 1 }, %)
|
|> circle(center = [0, 0], radius = 1)
|
||||||
|> sweep(path = helixPath)
|
|> sweep(path = helixPath)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ bottom = startSketchOn("XY")
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
circSketch = startSketchOn("XY")
|
circSketch = startSketchOn("XY")
|
||||||
|> circle({ center = [0, 0], radius = 3 }, %, $circ)
|
|> circle(center = [0, 0], radius = 3, tag = $circ)
|
||||||
|
|
||||||
triangleSketch = startSketchOn("XY")
|
triangleSketch = startSketchOn("XY")
|
||||||
|> startProfileAt([-5, 0], %)
|
|> startProfileAt([-5, 0], %)
|
||||||
|
@ -47,10 +47,10 @@ sweepPath = startSketchOn('XZ')
|
|||||||
|
|
||||||
// Create a hole for the pipe.
|
// Create a hole for the pipe.
|
||||||
pipeHole = startSketchOn('XY')
|
pipeHole = startSketchOn('XY')
|
||||||
|> circle({ center = [0, 0], radius = 1.5 }, %)
|
|> circle(center = [0, 0], radius = 1.5)
|
||||||
|
|
||||||
sweepSketch = startSketchOn('XY')
|
sweepSketch = startSketchOn('XY')
|
||||||
|> circle({ center = [0, 0], radius = 2 }, %)
|
|> circle(center = [0, 0], radius = 2)
|
||||||
|> hole(pipeHole, %)
|
|> hole(pipeHole, %)
|
||||||
|> sweep(path = sweepPath)
|
|> sweep(path = sweepPath)
|
||||||
|> translate(translate = [1.0, 1.0, 2.5])
|
|> translate(translate = [1.0, 1.0, 2.5])
|
||||||
|
@ -689,7 +689,7 @@ test.describe('Editor tests', { tag: ['@skipWin'] }, () => {
|
|||||||
await page.keyboard.press('ArrowDown')
|
await page.keyboard.press('ArrowDown')
|
||||||
await page.keyboard.press('Enter')
|
await page.keyboard.press('Enter')
|
||||||
await page.keyboard.type(`extrusion = startSketchOn('XY')
|
await page.keyboard.type(`extrusion = startSketchOn('XY')
|
||||||
|> circle({ center: [0, 0], radius: dia/2 }, %)
|
|> circle(center: [0, 0], radius: dia/2)
|
||||||
|> hole(squareHole(length, width, height), %)
|
|> hole(squareHole(length, width, height), %)
|
||||||
|> extrude(length = height)`)
|
|> extrude(length = height)`)
|
||||||
|
|
||||||
|
@ -50,13 +50,13 @@ const FEATURE_TREE_SKETCH_CODE = `sketch001 = startSketchOn('XZ')
|
|||||||
|> close(%)
|
|> close(%)
|
||||||
extrude001 = extrude(sketch001, length = 10)
|
extrude001 = extrude(sketch001, length = 10)
|
||||||
sketch002 = startSketchOn(extrude001, rectangleSegmentB001)
|
sketch002 = startSketchOn(extrude001, rectangleSegmentB001)
|
||||||
|> circle({
|
|> circle(
|
||||||
center = [-1, 2],
|
center = [-1, 2],
|
||||||
radius = .5
|
radius = .5
|
||||||
}, %)
|
)
|
||||||
plane001 = offsetPlane('XZ', offset = -5)
|
plane001 = offsetPlane('XZ', offset = -5)
|
||||||
sketch003 = startSketchOn(plane001)
|
sketch003 = startSketchOn(plane001)
|
||||||
|> circle({ center = [0, 0], radius = 5 }, %)
|
|> circle(center = [0, 0], radius = 5)
|
||||||
`
|
`
|
||||||
|
|
||||||
test.describe('Feature Tree pane', () => {
|
test.describe('Feature Tree pane', () => {
|
||||||
@ -228,11 +228,11 @@ test.describe('Feature Tree pane', () => {
|
|||||||
}) => {
|
}) => {
|
||||||
const initialInput = '23'
|
const initialInput = '23'
|
||||||
const initialCode = `sketch001 = startSketchOn('XZ')
|
const initialCode = `sketch001 = startSketchOn('XZ')
|
||||||
|> circle({ center = [0, 0], radius = 5 }, %)
|
|> circle(center = [0, 0], radius = 5)
|
||||||
renamedExtrude = extrude(sketch001, length = ${initialInput})`
|
renamedExtrude = extrude(sketch001, length = ${initialInput})`
|
||||||
const newConstantName = 'distance001'
|
const newConstantName = 'distance001'
|
||||||
const expectedCode = `sketch001 = startSketchOn('XZ')
|
const expectedCode = `sketch001 = startSketchOn('XZ')
|
||||||
|> circle({ center = [0, 0], radius = 5 }, %)
|
|> circle(center = [0, 0], radius = 5)
|
||||||
${newConstantName} = 23
|
${newConstantName} = 23
|
||||||
renamedExtrude = extrude(sketch001, length = ${newConstantName})`
|
renamedExtrude = extrude(sketch001, length = ${newConstantName})`
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ export class ToolbarFixture {
|
|||||||
this.rectangleBtn = page.getByTestId('corner-rectangle')
|
this.rectangleBtn = page.getByTestId('corner-rectangle')
|
||||||
this.lengthConstraintBtn = page.getByTestId('constraint-length')
|
this.lengthConstraintBtn = page.getByTestId('constraint-length')
|
||||||
this.exitSketchBtn = page.getByTestId('sketch-exit')
|
this.exitSketchBtn = page.getByTestId('sketch-exit')
|
||||||
this.editSketchBtn = page.getByText('Edit Sketch')
|
this.editSketchBtn = page.locator('[name="Edit Sketch"]')
|
||||||
this.fileTreeBtn = page.locator('[id="files-button-holder"]')
|
this.fileTreeBtn = page.locator('[id="files-button-holder"]')
|
||||||
this.createFileBtn = page.getByTestId('create-file-button')
|
this.createFileBtn = page.getByTestId('create-file-button')
|
||||||
this.treeInputField = page.getByTestId('tree-input-field')
|
this.treeInputField = page.getByTestId('tree-input-field')
|
||||||
|
@ -42,27 +42,25 @@ test.describe('Point-and-click tests', () => {
|
|||||||
|
|
||||||
await test.step('check code model connection works and that button is still enable once circle is selected ', async () => {
|
await test.step('check code model connection works and that button is still enable once circle is selected ', async () => {
|
||||||
await moveToCircle()
|
await moveToCircle()
|
||||||
const circleSnippet =
|
const circleSnippet = 'circle(center = [318.33, 168.1], radius = 182.8)'
|
||||||
'circle({ center = [318.33, 168.1], radius = 182.8 }, %)'
|
|
||||||
await editor.expectState({
|
await editor.expectState({
|
||||||
activeLines: ["constsketch002=startSketchOn('XZ')"],
|
activeLines: ["sketch002=startSketchOn('XZ')"],
|
||||||
highlightedCode: circleSnippet,
|
highlightedCode: circleSnippet,
|
||||||
diagnostics: [],
|
diagnostics: [],
|
||||||
})
|
})
|
||||||
|
|
||||||
await test.step('check code model connection works and that button is still enable once circle is selected ', async () => {
|
await test.step('check code model connection works and that button is still enable once circle is selected ', async () => {
|
||||||
await moveToCircle()
|
await moveToCircle()
|
||||||
const circleSnippet =
|
const circleSnippet = 'circle(center = [318.33, 168.1], radius = 182.8)'
|
||||||
'circle({ center = [318.33, 168.1], radius = 182.8 }, %)'
|
|
||||||
await editor.expectState({
|
await editor.expectState({
|
||||||
activeLines: ["constsketch002=startSketchOn('XZ')"],
|
activeLines: ["sketch002=startSketchOn('XZ')"],
|
||||||
highlightedCode: circleSnippet,
|
highlightedCode: circleSnippet,
|
||||||
diagnostics: [],
|
diagnostics: [],
|
||||||
})
|
})
|
||||||
|
|
||||||
await clickCircle()
|
await clickCircle()
|
||||||
await editor.expectState({
|
await editor.expectState({
|
||||||
activeLines: [circleSnippet.slice(-5)],
|
activeLines: ['|>' + circleSnippet],
|
||||||
highlightedCode: circleSnippet,
|
highlightedCode: circleSnippet,
|
||||||
diagnostics: [],
|
diagnostics: [],
|
||||||
})
|
})
|
||||||
@ -581,7 +579,7 @@ profile001 = startProfileAt([205.96, 254.59], sketch002)
|
|||||||
const u = await getUtils(page)
|
const u = await getUtils(page)
|
||||||
|
|
||||||
const initialCode = `closedSketch = startSketchOn('XZ')
|
const initialCode = `closedSketch = startSketchOn('XZ')
|
||||||
|> circle({ center = [8, 5], radius = 2 }, %)
|
|> circle(center = [8, 5], radius = 2)
|
||||||
openSketch = startSketchOn('XY')
|
openSketch = startSketchOn('XY')
|
||||||
|> startProfileAt([-5, 0], %)
|
|> startProfileAt([-5, 0], %)
|
||||||
|> line(endAbsolute = [0, 5])
|
|> line(endAbsolute = [0, 5])
|
||||||
@ -633,8 +631,8 @@ openSketch = startSketchOn('XY')
|
|||||||
await expect(toolbar.startSketchBtn).not.toBeVisible()
|
await expect(toolbar.startSketchBtn).not.toBeVisible()
|
||||||
await expect(toolbar.exitSketchBtn).toBeVisible()
|
await expect(toolbar.exitSketchBtn).toBeVisible()
|
||||||
await editor.expectState({
|
await editor.expectState({
|
||||||
activeLines: [`|>circle({center=[8,5],radius=2},%)`],
|
activeLines: [`|>circle(center=[8,5],radius=2)`],
|
||||||
highlightedCode: 'circle({center=[8,5],radius=2},%)',
|
highlightedCode: 'circle(center=[8,5],radius=2)',
|
||||||
diagnostics: [],
|
diagnostics: [],
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -1192,10 +1190,10 @@ openSketch = startSketchOn('XY')
|
|||||||
cmdBar,
|
cmdBar,
|
||||||
}) => {
|
}) => {
|
||||||
const initialCode = `sketch001 = startSketchOn('XZ')
|
const initialCode = `sketch001 = startSketchOn('XZ')
|
||||||
|> circle({ center = [0, 0], radius = 30 }, %)
|
|> circle(center = [0, 0], radius = 30)
|
||||||
plane001 = offsetPlane('XZ', offset = 50)
|
plane001 = offsetPlane('XZ', offset = 50)
|
||||||
sketch002 = startSketchOn(plane001)
|
sketch002 = startSketchOn(plane001)
|
||||||
|> circle({ center = [0, 0], radius = 20 }, %)
|
|> circle(center = [0, 0], radius = 20)
|
||||||
`
|
`
|
||||||
await context.addInitScript((initialCode) => {
|
await context.addInitScript((initialCode) => {
|
||||||
localStorage.setItem('persistCode', initialCode)
|
localStorage.setItem('persistCode', initialCode)
|
||||||
@ -1278,10 +1276,10 @@ openSketch = startSketchOn('XY')
|
|||||||
scene,
|
scene,
|
||||||
}) => {
|
}) => {
|
||||||
const initialCode = `sketch001 = startSketchOn('XZ')
|
const initialCode = `sketch001 = startSketchOn('XZ')
|
||||||
|> circle({ center = [0, 0], radius = 30 }, %)
|
|> circle(center = [0, 0], radius = 30)
|
||||||
plane001 = offsetPlane('XZ', offset = 50)
|
plane001 = offsetPlane('XZ', offset = 50)
|
||||||
sketch002 = startSketchOn(plane001)
|
sketch002 = startSketchOn(plane001)
|
||||||
|> circle({ center = [0, 0], radius = 20 }, %)
|
|> circle(center = [0, 0], radius = 20)
|
||||||
loft001 = loft([sketch001, sketch002])
|
loft001 = loft([sketch001, sketch002])
|
||||||
`
|
`
|
||||||
await context.addInitScript((initialCode) => {
|
await context.addInitScript((initialCode) => {
|
||||||
@ -1304,7 +1302,7 @@ loft001 = loft([sketch001, sketch002])
|
|||||||
await scene.expectPixelColor([89, 89, 89], testPoint, 15)
|
await scene.expectPixelColor([89, 89, 89], testPoint, 15)
|
||||||
await clickOnSketch1()
|
await clickOnSketch1()
|
||||||
await expect(page.locator('.cm-activeLine')).toHaveText(`
|
await expect(page.locator('.cm-activeLine')).toHaveText(`
|
||||||
|> circle({ center = [0, 0], radius = 30 }, %)
|
|> circle(center = [0, 0], radius = 30)
|
||||||
`)
|
`)
|
||||||
await page.keyboard.press('Delete')
|
await page.keyboard.press('Delete')
|
||||||
// Check for sketch 1
|
// Check for sketch 1
|
||||||
@ -1315,7 +1313,7 @@ loft001 = loft([sketch001, sketch002])
|
|||||||
await page.waitForTimeout(1000)
|
await page.waitForTimeout(1000)
|
||||||
await clickOnSketch2()
|
await clickOnSketch2()
|
||||||
await expect(page.locator('.cm-activeLine')).toHaveText(`
|
await expect(page.locator('.cm-activeLine')).toHaveText(`
|
||||||
|> circle({ center = [0, 0], radius = 20 }, %)
|
|> circle(center = [0, 0], radius = 20)
|
||||||
`)
|
`)
|
||||||
await page.keyboard.press('Delete')
|
await page.keyboard.press('Delete')
|
||||||
// Check for plane001
|
// Check for plane001
|
||||||
@ -1344,10 +1342,10 @@ loft001 = loft([sketch001, sketch002])
|
|||||||
cmdBar,
|
cmdBar,
|
||||||
}) => {
|
}) => {
|
||||||
const initialCode = `sketch001 = startSketchOn('YZ')
|
const initialCode = `sketch001 = startSketchOn('YZ')
|
||||||
|> circle({
|
|> circle(
|
||||||
center = [0, 0],
|
center = [0, 0],
|
||||||
radius = 500
|
radius = 500
|
||||||
}, %)
|
)
|
||||||
sketch002 = startSketchOn('XZ')
|
sketch002 = startSketchOn('XZ')
|
||||||
|> startProfileAt([0, 0], %)
|
|> startProfileAt([0, 0], %)
|
||||||
|> xLine(-500, %)
|
|> xLine(-500, %)
|
||||||
@ -1438,10 +1436,10 @@ sketch002 = startSketchOn('XZ')
|
|||||||
cmdBar,
|
cmdBar,
|
||||||
}) => {
|
}) => {
|
||||||
const initialCode = `sketch001 = startSketchOn('YZ')
|
const initialCode = `sketch001 = startSketchOn('YZ')
|
||||||
|> circle({
|
|> circle(
|
||||||
center = [0, 0],
|
center = [0, 0],
|
||||||
radius = 500
|
radius = 500
|
||||||
}, %)
|
)
|
||||||
sketch002 = startSketchOn('XZ')
|
sketch002 = startSketchOn('XZ')
|
||||||
|> startProfileAt([0, 0], %)
|
|> startProfileAt([0, 0], %)
|
||||||
|> xLine(-500, %)
|
|> xLine(-500, %)
|
||||||
@ -2270,7 +2268,7 @@ chamfer04 = chamfer(extrude001, length = 5, tags = [getOppositeEdge(seg02)])
|
|||||||
cmdBar,
|
cmdBar,
|
||||||
}) => {
|
}) => {
|
||||||
const initialCode = `sketch001 = startSketchOn('XZ')
|
const initialCode = `sketch001 = startSketchOn('XZ')
|
||||||
|> circle({ center = [0, 0], radius = 30 }, %)
|
|> circle(center = [0, 0], radius = 30)
|
||||||
extrude001 = extrude(sketch001, length = 30)
|
extrude001 = extrude(sketch001, length = 30)
|
||||||
`
|
`
|
||||||
await context.addInitScript((initialCode) => {
|
await context.addInitScript((initialCode) => {
|
||||||
@ -2445,19 +2443,19 @@ extrude001 = extrude(sketch001, length = 40)
|
|||||||
|
|
||||||
const shellSketchOnFacesCases = [
|
const shellSketchOnFacesCases = [
|
||||||
`sketch001 = startSketchOn('XZ')
|
`sketch001 = startSketchOn('XZ')
|
||||||
|> circle({ center = [0, 0], radius = 100 }, %)
|
|> circle(center = [0, 0], radius = 100)
|
||||||
|> extrude(length = 100)
|
|> extrude(length = 100)
|
||||||
|
|
||||||
sketch002 = startSketchOn(sketch001, 'END')
|
sketch002 = startSketchOn(sketch001, 'END')
|
||||||
|> circle({ center = [0, 0], radius = 50 }, %)
|
|> circle(center = [0, 0], radius = 50)
|
||||||
|> extrude(length = 50)
|
|> extrude(length = 50)
|
||||||
`,
|
`,
|
||||||
`sketch001 = startSketchOn('XZ')
|
`sketch001 = startSketchOn('XZ')
|
||||||
|> circle({ center = [0, 0], radius = 100 }, %)
|
|> circle(center = [0, 0], radius = 100)
|
||||||
extrude001 = extrude(sketch001, length = 100)
|
extrude001 = extrude(sketch001, length = 100)
|
||||||
|
|
||||||
sketch002 = startSketchOn(extrude001, 'END')
|
sketch002 = startSketchOn(extrude001, 'END')
|
||||||
|> circle({ center = [0, 0], radius = 50 }, %)
|
|> circle(center = [0, 0], radius = 50)
|
||||||
extrude002 = extrude(sketch002, length = 50)
|
extrude002 = extrude(sketch002, length = 50)
|
||||||
`,
|
`,
|
||||||
]
|
]
|
||||||
@ -2631,10 +2629,10 @@ profile001 = startProfileAt([-20, 20], sketch001)
|
|||||||
cmdBar,
|
cmdBar,
|
||||||
}) => {
|
}) => {
|
||||||
const initialCode = `sketch001 = startSketchOn('YZ')
|
const initialCode = `sketch001 = startSketchOn('YZ')
|
||||||
|> circle({
|
|> circle(
|
||||||
center = [0, 0],
|
center = [0, 0],
|
||||||
radius = 500
|
radius = 500
|
||||||
}, %)
|
)
|
||||||
sketch002 = startSketchOn('XZ')
|
sketch002 = startSketchOn('XZ')
|
||||||
|> startProfileAt([0, 0], %)
|
|> startProfileAt([0, 0], %)
|
||||||
|> xLine(-2000, %)
|
|> xLine(-2000, %)
|
||||||
@ -2761,10 +2759,10 @@ segAng(rectangleSegmentA001),
|
|||||||
|> close()
|
|> close()
|
||||||
extrude001 = extrude(sketch001, length = 50)
|
extrude001 = extrude(sketch001, length = 50)
|
||||||
sketch002 = startSketchOn(extrude001, rectangleSegmentA001)
|
sketch002 = startSketchOn(extrude001, rectangleSegmentA001)
|
||||||
|> circle({
|
|> circle(
|
||||||
center = [-11.34, 10.0],
|
center = [-11.34, 10.0],
|
||||||
radius = 8.69
|
radius = 8.69
|
||||||
}, %)
|
)
|
||||||
`
|
`
|
||||||
await context.addInitScript((initialCode) => {
|
await context.addInitScript((initialCode) => {
|
||||||
localStorage.setItem('persistCode', initialCode)
|
localStorage.setItem('persistCode', initialCode)
|
||||||
@ -2811,10 +2809,10 @@ radius = 8.69
|
|||||||
|> close()
|
|> close()
|
||||||
extrude001 = extrude(sketch001, length = 5)
|
extrude001 = extrude(sketch001, length = 5)
|
||||||
sketch003 = startSketchOn(extrude001, 'START')
|
sketch003 = startSketchOn(extrude001, 'START')
|
||||||
|> circle({
|
|> circle(
|
||||||
center = [-0.69, 0.56],
|
center = [-0.69, 0.56],
|
||||||
radius = 0.28
|
radius = 0.28
|
||||||
}, %)
|
)
|
||||||
`
|
`
|
||||||
|
|
||||||
await context.addInitScript((initialCode) => {
|
await context.addInitScript((initialCode) => {
|
||||||
@ -2849,10 +2847,11 @@ radius = 8.69
|
|||||||
cmdBar,
|
cmdBar,
|
||||||
}) => {
|
}) => {
|
||||||
const initialCode = `sketch001 = startSketchOn('XZ')
|
const initialCode = `sketch001 = startSketchOn('XZ')
|
||||||
profile001 = circle({
|
profile001 = circle(
|
||||||
|
sketch001,
|
||||||
center = [0, 0],
|
center = [0, 0],
|
||||||
radius = 100
|
radius = 100
|
||||||
}, sketch001)
|
)
|
||||||
extrude001 = extrude(profile001, length = 100)
|
extrude001 = extrude(profile001, length = 100)
|
||||||
`
|
`
|
||||||
await context.addInitScript((initialCode) => {
|
await context.addInitScript((initialCode) => {
|
||||||
|
@ -367,7 +367,7 @@ sketch001 = startProfileAt([12.34, -12.34], sketch002)
|
|||||||
localStorage.setItem(
|
localStorage.setItem(
|
||||||
'persistCode',
|
'persistCode',
|
||||||
`sketch001 = startSketchOn('XZ')
|
`sketch001 = startSketchOn('XZ')
|
||||||
|> circle({ center = [4.61, -5.01], radius = 8 }, %)`
|
|> circle(center = [4.61, -5.01], radius = 8)`
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -403,9 +403,7 @@ sketch001 = startProfileAt([12.34, -12.34], sketch002)
|
|||||||
|
|
||||||
const dragPX = 40
|
const dragPX = 40
|
||||||
|
|
||||||
await page
|
await page.getByText('circle(center = [4.61, -5.01], radius = 8)').click()
|
||||||
.getByText('circle({ center = [4.61, -5.01], radius = 8 }, %)')
|
|
||||||
.click()
|
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole('button', { name: 'Edit Sketch' })
|
page.getByRole('button', { name: 'Edit Sketch' })
|
||||||
).toBeVisible()
|
).toBeVisible()
|
||||||
@ -444,7 +442,7 @@ sketch001 = startProfileAt([12.34, -12.34], sketch002)
|
|||||||
// expect the code to have changed
|
// expect the code to have changed
|
||||||
await editor.expectEditor.toContain(
|
await editor.expectEditor.toContain(
|
||||||
`sketch001 = startSketchOn('XZ')
|
`sketch001 = startSketchOn('XZ')
|
||||||
|> circle({ center = [7.26, -2.37], radius = 11.44 }, %)`,
|
|> circle(center = [7.26, -2.37], radius = 11.44)`,
|
||||||
{ shouldNormalise: true }
|
{ shouldNormalise: true }
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
@ -1390,12 +1388,14 @@ profile002 = startProfileAt([117.2, 56.08], sketch001)
|
|||||||
await toolbar.circleBtn.click()
|
await toolbar.circleBtn.click()
|
||||||
await page.waitForTimeout(100)
|
await page.waitForTimeout(100)
|
||||||
await circlePoint1()
|
await circlePoint1()
|
||||||
await editor.expectEditor.toContain('profile003 = circle({ center = [')
|
await editor.expectEditor.toContain(
|
||||||
|
'profile003 = circle(sketch001, center = ['
|
||||||
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
await test.step('equip line tool and verify circle code is removed', async () => {
|
await test.step('equip line tool and verify circle code is removed', async () => {
|
||||||
await toolbar.lineBtn.click()
|
await toolbar.lineBtn.click()
|
||||||
await editor.expectEditor.not.toContain('profile003 = circle({')
|
await editor.expectEditor.not.toContain('profile003 = circle(')
|
||||||
})
|
})
|
||||||
|
|
||||||
const [circle3Point1] = scene.makeMouseHelpers(650, 200)
|
const [circle3Point1] = scene.makeMouseHelpers(650, 200)
|
||||||
@ -1649,7 +1649,7 @@ profile003 = startProfileAt([206.63, -56.73], sketch001)
|
|||||||
await circle1Radius({ delay: 500 })
|
await circle1Radius({ delay: 500 })
|
||||||
await page.waitForTimeout(300)
|
await page.waitForTimeout(300)
|
||||||
await editor.expectEditor.toContain(
|
await editor.expectEditor.toContain(
|
||||||
`profile003 = circle({ center = [23.19, 6.98], radius = 2.5 }, sketch001)`
|
`profile003 = circle(sketch001, center = [23.19, 6.98], radius = 2.5)`
|
||||||
)
|
)
|
||||||
|
|
||||||
await test.step('hover in empty space to wait for overlays to get out of the way', async () => {
|
await test.step('hover in empty space to wait for overlays to get out of the way', async () => {
|
||||||
@ -1661,7 +1661,7 @@ profile003 = startProfileAt([206.63, -56.73], sketch001)
|
|||||||
await page.waitForTimeout(300)
|
await page.waitForTimeout(300)
|
||||||
await circle2Radius()
|
await circle2Radius()
|
||||||
await editor.expectEditor.toContain(
|
await editor.expectEditor.toContain(
|
||||||
`profile004 = circle({ center = [23.74, 1.9], radius = 0.72 }, sketch001)`
|
`profile004 = circle(sketch001, center = [23.74, 1.9], radius = 0.72)`
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
await test.step('create two corner rectangles in a row without unequip', async () => {
|
await test.step('create two corner rectangles in a row without unequip', async () => {
|
||||||
@ -1855,7 +1855,7 @@ profile002 = startProfileAt([11.19, 5.02], sketch001)
|
|||||||
], %)
|
], %)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
profile003 = circle({ center = [6.92, -4.2], radius = 3.16 }, sketch001)
|
profile003 = circle(sketch001, center = [6.92, -4.2], radius = 3.16)
|
||||||
profile004 = circleThreePoint(sketch001, p1 = [13.44, -6.8], p2 = [13.39, -2.07], p3 = [18.75, -4.41])
|
profile004 = circleThreePoint(sketch001, p1 = [13.44, -6.8], p2 = [13.39, -2.07], p3 = [18.75, -4.41])
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
@ -1931,7 +1931,7 @@ profile004 = circleThreePoint(sketch001, p1 = [13.44, -6.8], p2 = [13.39, -2.07]
|
|||||||
await dragCircleTo()
|
await dragCircleTo()
|
||||||
await page.mouse.up()
|
await page.mouse.up()
|
||||||
await editor.expectEditor.toContain(
|
await editor.expectEditor.toContain(
|
||||||
`profile003 = circle({ center = [6.92, -4.2], radius = 4.81 }, sketch001)`
|
`profile003 = circle(sketch001, center = [6.92, -4.2], radius = 4.81)`
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -2000,7 +2000,7 @@ profile002 = startProfileAt([11.19, 5.02], sketch001)
|
|||||||
], %)
|
], %)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
profile003 = circle({ center = [6.92, -4.2], radius = 3.16 }, sketch001)
|
profile003 = circle(sketch001, center = [6.92, -4.2], radius = 3.16)
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
@ -2108,10 +2108,11 @@ profile003 = startProfileAt([16.79, 38.24], sketch001)
|
|||||||
], %)
|
], %)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
profile004 = circle({
|
profile004 = circle(
|
||||||
|
sketch001,
|
||||||
center = [280.45, 47.57],
|
center = [280.45, 47.57],
|
||||||
radius = 55.26
|
radius = 55.26
|
||||||
}, sketch001)
|
)
|
||||||
extrude002 = extrude(profile001, length = 50)
|
extrude002 = extrude(profile001, length = 50)
|
||||||
extrude001 = extrude(profile003, length = 5)
|
extrude001 = extrude(profile003, length = 5)
|
||||||
`
|
`
|
||||||
@ -2173,10 +2174,11 @@ extrude001 = extrude(profile003, length = 5)
|
|||||||
'myVar = 5',
|
'myVar = 5',
|
||||||
`myVar = 5
|
`myVar = 5
|
||||||
sketch001 = startSketchOn('XZ')
|
sketch001 = startSketchOn('XZ')
|
||||||
profile001 = circle({
|
profile001 = circle(
|
||||||
|
sketch001,
|
||||||
center = [12.41, 3.87],
|
center = [12.41, 3.87],
|
||||||
radius = myVar
|
radius = myVar
|
||||||
}, sketch001)`
|
)`
|
||||||
)
|
)
|
||||||
|
|
||||||
await scene.expectPixelColor([255, 255, 255], { x: 633, y: 211 }, 15)
|
await scene.expectPixelColor([255, 255, 255], { x: 633, y: 211 }, 15)
|
||||||
@ -2320,7 +2322,7 @@ profile004 = startProfileAt([3.15, 9.39], sketch002)
|
|||||||
|> line(end = [-7.41, -2.85])
|
|> line(end = [-7.41, -2.85])
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
profile005 = circle({ center = [5.15, 4.34], radius = 1.66 }, sketch002)
|
profile005 = circle(sketch002, center = [5.15, 4.34], radius = 1.66)
|
||||||
profile006 = startProfileAt([9.65, 3.82], sketch002)
|
profile006 = startProfileAt([9.65, 3.82], sketch002)
|
||||||
|> line(end = [2.38, 5.62])
|
|> line(end = [2.38, 5.62])
|
||||||
|> line(end = [2.13, -5.57])
|
|> line(end = [2.13, -5.57])
|
||||||
@ -2345,10 +2347,11 @@ profile009 = startProfileAt([5.23, 1.95], sketch003)
|
|||||||
|> line(end = [7.34, -2.75])
|
|> line(end = [7.34, -2.75])
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
profile010 = circle({
|
profile010 = circle(
|
||||||
|
sketch003,
|
||||||
center = [7.18, -2.11],
|
center = [7.18, -2.11],
|
||||||
radius = 2.67
|
radius = 2.67
|
||||||
}, sketch003)
|
)
|
||||||
profile011 = startProfileAt([5.07, -6.39], sketch003)
|
profile011 = startProfileAt([5.07, -6.39], sketch003)
|
||||||
|> angledLine([0, 4.54], %, $rectangleSegmentA002)
|
|> angledLine([0, 4.54], %, $rectangleSegmentA002)
|
||||||
|> angledLine([
|
|> angledLine([
|
||||||
@ -2468,7 +2471,7 @@ extrude003 = extrude(profile011, length = 2.5)
|
|||||||
})
|
})
|
||||||
|
|
||||||
const verifyCapProfilesAreDrawn = async () =>
|
const verifyCapProfilesAreDrawn = async () =>
|
||||||
test.step('verify wall profiles are drawn', async () => {
|
test.step('verify cap profiles are drawn', async () => {
|
||||||
// open polygon
|
// open polygon
|
||||||
await scene.expectPixelColor(
|
await scene.expectPixelColor(
|
||||||
TEST_COLORS.WHITE,
|
TEST_COLORS.WHITE,
|
||||||
@ -2519,13 +2522,14 @@ extrude003 = extrude(profile011, length = 2.5)
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
await test.step('select cap profiles', async () => {
|
/* FIXME: the cap part of this test is insanely flaky, and I'm not sure
|
||||||
|
* why.
|
||||||
|
* await test.step('select cap profiles', async () => {
|
||||||
for (const { title, selectClick } of capSelectionOptions) {
|
for (const { title, selectClick } of capSelectionOptions) {
|
||||||
await test.step(title, async () => {
|
await test.step(title, async () => {
|
||||||
await camPositionForSelectingSketchOnCapProfiles()
|
await camPositionForSelectingSketchOnCapProfiles()
|
||||||
await page.waitForTimeout(100)
|
await page.waitForTimeout(100)
|
||||||
await selectClick()
|
await selectClick()
|
||||||
await page.waitForTimeout(100)
|
|
||||||
await toolbar.editSketch()
|
await toolbar.editSketch()
|
||||||
await page.waitForTimeout(600)
|
await page.waitForTimeout(600)
|
||||||
await verifyCapProfilesAreDrawn()
|
await verifyCapProfilesAreDrawn()
|
||||||
@ -2533,7 +2537,7 @@ extrude003 = extrude(profile011, length = 2.5)
|
|||||||
await page.waitForTimeout(100)
|
await page.waitForTimeout(100)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
}) */
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
test(
|
test(
|
||||||
|
@ -599,7 +599,7 @@ test(
|
|||||||
mask: [page.getByTestId('model-state-indicator')],
|
mask: [page.getByTestId('model-state-indicator')],
|
||||||
})
|
})
|
||||||
await expect(page.locator('.cm-content')).toHaveText(
|
await expect(page.locator('.cm-content')).toHaveText(
|
||||||
`sketch001 = startSketchOn('XZ')profile001 = circle({ center = [14.44, -2.44], radius = 1 }, sketch001)`
|
`sketch001 = startSketchOn('XZ')profile001 = circle(sketch001, center = [14.44, -2.44], radius = 1)`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
@ -269,10 +269,7 @@ test.describe(`Testing gizmo, fixture-based`, () => {
|
|||||||
], %)
|
], %)
|
||||||
|> close()
|
|> close()
|
||||||
const sketch001 = startSketchOn('XZ')
|
const sketch001 = startSketchOn('XZ')
|
||||||
|> circle({
|
|> circle(center = [818.33, 168.1], radius = 182.8)
|
||||||
center: [818.33, 168.1],
|
|
||||||
radius: 182.8
|
|
||||||
}, %)
|
|
||||||
|> extrude(length = 50)
|
|> extrude(length = 50)
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
@ -295,12 +292,11 @@ test.describe(`Testing gizmo, fixture-based`, () => {
|
|||||||
const [clickCircle, moveToCircle] = scene.makeMouseHelpers(582, 217)
|
const [clickCircle, moveToCircle] = scene.makeMouseHelpers(582, 217)
|
||||||
|
|
||||||
await test.step(`Select an edge of this circle`, async () => {
|
await test.step(`Select an edge of this circle`, async () => {
|
||||||
const circleSnippet =
|
const circleSnippet = 'circle(center = [818.33, 168.1], radius = 182.8)'
|
||||||
'circle({ center: [818.33, 168.1], radius: 182.8 }, %)'
|
|
||||||
await moveToCircle()
|
await moveToCircle()
|
||||||
await clickCircle()
|
await clickCircle()
|
||||||
await editor.expectState({
|
await editor.expectState({
|
||||||
activeLines: [circleSnippet.slice(-5)],
|
activeLines: ['|>' + circleSnippet],
|
||||||
highlightedCode: circleSnippet,
|
highlightedCode: circleSnippet,
|
||||||
diagnostics: [],
|
diagnostics: [],
|
||||||
})
|
})
|
||||||
|
@ -825,7 +825,7 @@ test.describe('Testing segment overlays', { tag: ['@skipWin'] }, () => {
|
|||||||
localStorage.setItem(
|
localStorage.setItem(
|
||||||
'persistCode',
|
'persistCode',
|
||||||
`part001 = startSketchOn('XZ')
|
`part001 = startSketchOn('XZ')
|
||||||
|> circle({ center = [1 + 0, 0], radius = 8 }, %)
|
|> circle(center = [1 + 0, 0], radius = 8)
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
localStorage.setItem('disableAxis', 'true')
|
localStorage.setItem('disableAxis', 'true')
|
||||||
@ -840,9 +840,7 @@ test.describe('Testing segment overlays', { tag: ['@skipWin'] }, () => {
|
|||||||
await u.expectCmdLog('[data-message-type="execution-done"]')
|
await u.expectCmdLog('[data-message-type="execution-done"]')
|
||||||
await u.closeDebugPanel()
|
await u.closeDebugPanel()
|
||||||
|
|
||||||
await page
|
await page.getByText('circle(center = [1 + 0, 0], radius = 8)').click()
|
||||||
.getByText('circle({ center = [1 + 0, 0], radius = 8 }, %)')
|
|
||||||
.click()
|
|
||||||
await page.waitForTimeout(100)
|
await page.waitForTimeout(100)
|
||||||
await page.getByRole('button', { name: 'Edit Sketch' }).click()
|
await page.getByRole('button', { name: 'Edit Sketch' }).click()
|
||||||
await page.waitForTimeout(500)
|
await page.waitForTimeout(500)
|
||||||
@ -859,11 +857,9 @@ test.describe('Testing segment overlays', { tag: ['@skipWin'] }, () => {
|
|||||||
await clickConstrained({
|
await clickConstrained({
|
||||||
hoverPos,
|
hoverPos,
|
||||||
constraintType: 'xAbsolute',
|
constraintType: 'xAbsolute',
|
||||||
expectBeforeUnconstrained:
|
expectBeforeUnconstrained: 'circle(center = [1 + 0, 0], radius = 8)',
|
||||||
'circle({ center = [1 + 0, 0], radius = 8 }, %)',
|
expectAfterUnconstrained: 'circle(center = [1, 0], radius = 8)',
|
||||||
expectAfterUnconstrained:
|
expectFinal: 'circle(center = [xAbs001, 0], radius = 8)',
|
||||||
'circle({ center = [1, 0], radius = 8 }, %)',
|
|
||||||
expectFinal: 'circle({ center = [xAbs001, 0], radius = 8 }, %)',
|
|
||||||
ang: ang + 105,
|
ang: ang + 105,
|
||||||
steps: 6,
|
steps: 6,
|
||||||
locator: '[data-overlay-toolbar-index="0"]',
|
locator: '[data-overlay-toolbar-index="0"]',
|
||||||
@ -873,10 +869,10 @@ test.describe('Testing segment overlays', { tag: ['@skipWin'] }, () => {
|
|||||||
hoverPos,
|
hoverPos,
|
||||||
constraintType: 'yAbsolute',
|
constraintType: 'yAbsolute',
|
||||||
expectBeforeUnconstrained:
|
expectBeforeUnconstrained:
|
||||||
'circle({ center = [xAbs001, 0], radius = 8 }, %)',
|
'circle(center = [xAbs001, 0], radius = 8)',
|
||||||
expectAfterUnconstrained:
|
expectAfterUnconstrained:
|
||||||
'circle({ center = [xAbs001, yAbs001], radius = 8 }, %)',
|
'circle(center = [xAbs001, yAbs001], radius = 8)',
|
||||||
expectFinal: 'circle({ center = [xAbs001, 0], radius = 8 }, %)',
|
expectFinal: 'circle(center = [xAbs001, 0], radius = 8)',
|
||||||
ang: ang + 180,
|
ang: ang + 180,
|
||||||
steps: 30,
|
steps: 30,
|
||||||
locator: '[data-overlay-toolbar-index="0"]',
|
locator: '[data-overlay-toolbar-index="0"]',
|
||||||
@ -886,10 +882,10 @@ test.describe('Testing segment overlays', { tag: ['@skipWin'] }, () => {
|
|||||||
hoverPos,
|
hoverPos,
|
||||||
constraintType: 'radius',
|
constraintType: 'radius',
|
||||||
expectBeforeUnconstrained:
|
expectBeforeUnconstrained:
|
||||||
'circle({ center = [xAbs001, 0], radius = 8 }, %)',
|
'circle(center = [xAbs001, 0], radius = 8)',
|
||||||
expectAfterUnconstrained:
|
expectAfterUnconstrained:
|
||||||
'circle({ center = [xAbs001, 0], radius = radius001 }, %)',
|
'circle(center = [xAbs001, 0], radius = radius001)',
|
||||||
expectFinal: 'circle({ center = [xAbs001, 0], radius = 8 }, %)',
|
expectFinal: 'circle(center = [xAbs001, 0], radius = 8)',
|
||||||
ang: ang + 105,
|
ang: ang + 105,
|
||||||
steps: 10,
|
steps: 10,
|
||||||
locator: '[data-overlay-toolbar-index="0"]',
|
locator: '[data-overlay-toolbar-index="0"]',
|
||||||
|
@ -320,10 +320,11 @@ part009 = startSketchOn('XY')
|
|||||||
|> close()
|
|> close()
|
||||||
rev = revolve({ axis = 'y' }, part009)
|
rev = revolve({ axis = 'y' }, part009)
|
||||||
sketch006 = startSketchOn('XY')
|
sketch006 = startSketchOn('XY')
|
||||||
profile001 = circle({
|
profile001 = circle(
|
||||||
|
sketch006,
|
||||||
center = [42.91, -70.42],
|
center = [42.91, -70.42],
|
||||||
radius = 17.96
|
radius = 17.96
|
||||||
}, sketch006)
|
)
|
||||||
profile002 = startProfileAt([86.92, -63.81], sketch006)
|
profile002 = startProfileAt([86.92, -63.81], sketch006)
|
||||||
|> angledLine([0, 63.81], %, $rectangleSegmentA001)
|
|> angledLine([0, 63.81], %, $rectangleSegmentA001)
|
||||||
|> angledLine([
|
|> angledLine([
|
||||||
|
@ -91,7 +91,7 @@
|
|||||||
"fmt-check": "prettier --check ./src *.ts *.json *.js ./e2e ./packages",
|
"fmt-check": "prettier --check ./src *.ts *.json *.js ./e2e ./packages",
|
||||||
"fetch:wasm": "./scripts/get-latest-wasm-bundle.sh",
|
"fetch:wasm": "./scripts/get-latest-wasm-bundle.sh",
|
||||||
"fetch:wasm:windows": "./scripts/get-latest-wasm-bundle.ps1",
|
"fetch:wasm:windows": "./scripts/get-latest-wasm-bundle.ps1",
|
||||||
"fetch:samples": "echo \"Fetching latest KCL samples...\" && curl -o public/kcl-samples-manifest-fallback.json https://raw.githubusercontent.com/KittyCAD/kcl-samples/next/manifest.json",
|
"fetch:samples": "echo \"Fetching latest KCL samples...\" && curl -o public/kcl-samples-manifest-fallback.json https://raw.githubusercontent.com/KittyCAD/kcl-samples/circle-kw-args/manifest.json",
|
||||||
"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:nocopy": "yarn wasm-prep && cd src/wasm-lib && wasm-pack build --release --target web --out-dir pkg && cargo test -p kcl-lib export_bindings",
|
"build:wasm:nocopy": "yarn wasm-prep && cd src/wasm-lib && wasm-pack build --release --target web --out-dir pkg && cargo test -p kcl-lib export_bindings",
|
||||||
"build:wasm": "yarn build:wasm:nocopy && cp src/wasm-lib/pkg/wasm_lib_bg.wasm public && yarn fmt",
|
"build:wasm": "yarn build:wasm:nocopy && cp src/wasm-lib/pkg/wasm_lib_bg.wasm public && yarn fmt",
|
||||||
|
@ -125,6 +125,34 @@
|
|||||||
"title": "100mm Gear Rack",
|
"title": "100mm Gear Rack",
|
||||||
"description": "A flat bar or rail that is engraved with teeth along its length. These teeth are designed to mesh with the teeth of a gear, known as a pinion. When the pinion, a small cylindrical gear, rotates, its teeth engage with the teeth on the rack, causing the rack to move linearly. Conversely, linear motion applied to the rack will cause the pinion to rotate."
|
"description": "A flat bar or rail that is engraved with teeth along its length. These teeth are designed to mesh with the teeth of a gear, known as a pinion. When the pinion, a small cylindrical gear, rotates, its teeth engage with the teeth on the rack, causing the rack to move linearly. Conversely, linear motion applied to the rack will cause the pinion to rotate."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"file": "main.kcl",
|
||||||
|
"pathFromProjectDirectoryToFirstFile": "gridfinity-baseplate/main.kcl",
|
||||||
|
"multipleFiles": false,
|
||||||
|
"title": "Gridfinity Baseplate",
|
||||||
|
"description": "Gridfinity is a system to help you work more efficiently. This is a system invented by Zack Freedman. There are two main components the baseplate and the bins. The components are comprised of a matrix of squares. Allowing easy stacking and expansion"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "main.kcl",
|
||||||
|
"pathFromProjectDirectoryToFirstFile": "gridfinity-baseplate-magnets/main.kcl",
|
||||||
|
"multipleFiles": false,
|
||||||
|
"title": "Gridfinity Baseplate With Magnets",
|
||||||
|
"description": "Gridfinity is a system to help you work more efficiently. This is a system invented by Zack Freedman. There are two main components the baseplate and the bins. The components are comprised of a matrix of squares. Allowing easy stacking and expansion. This baseplate version includes holes for magnet placement"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "main.kcl",
|
||||||
|
"pathFromProjectDirectoryToFirstFile": "gridfinity-bins/main.kcl",
|
||||||
|
"multipleFiles": false,
|
||||||
|
"title": "Gridfinity Bins",
|
||||||
|
"description": "Gridfinity is a system to help you work more efficiently. This is a system invented by Zack Freedman. There are two main components the baseplate and the bins. The components are comprised of a matrix of squares. Allowing easy stacking and expansion"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "main.kcl",
|
||||||
|
"pathFromProjectDirectoryToFirstFile": "gridfinity-bins-stacking-lip/main.kcl",
|
||||||
|
"multipleFiles": false,
|
||||||
|
"title": "Gridfinity Bins With A Stacking Lip",
|
||||||
|
"description": "Gridfinity is a system to help you work more efficiently. This is a system invented by Zack Freedman. There are two main components the baseplate and the bins. The components are comprised of a matrix of squares. Allowing easy stacking and expansion. This Gridfinity bins version includes a lip to allowable stacking Gridfinity bins"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"file": "main.kcl",
|
"file": "main.kcl",
|
||||||
"pathFromProjectDirectoryToFirstFile": "hex-nut/main.kcl",
|
"pathFromProjectDirectoryToFirstFile": "hex-nut/main.kcl",
|
||||||
|
@ -1607,15 +1607,15 @@ export class SceneEntities {
|
|||||||
const varName = findUniqueName(_ast, 'profile')
|
const varName = findUniqueName(_ast, 'profile')
|
||||||
const newExpression = createVariableDeclaration(
|
const newExpression = createVariableDeclaration(
|
||||||
varName,
|
varName,
|
||||||
createCallExpressionStdLib('circle', [
|
createCallExpressionStdLibKw('circle', varDec.node.id, [
|
||||||
createObjectExpression({
|
createLabeledArg(
|
||||||
center: createArrayExpression([
|
'center',
|
||||||
|
createArrayExpression([
|
||||||
createLiteral(roundOff(circleCenter[0])),
|
createLiteral(roundOff(circleCenter[0])),
|
||||||
createLiteral(roundOff(circleCenter[1])),
|
createLiteral(roundOff(circleCenter[1])),
|
||||||
]),
|
])
|
||||||
radius: createLiteral(1),
|
),
|
||||||
}),
|
createLabeledArg('radius', createLiteral(1)),
|
||||||
createIdentifier(varDec.node.id.name),
|
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -1666,7 +1666,7 @@ export class SceneEntities {
|
|||||||
const x = (args.intersectionPoint.twoD.x || 0) - circleCenter[0]
|
const x = (args.intersectionPoint.twoD.x || 0) - circleCenter[0]
|
||||||
const y = (args.intersectionPoint.twoD.y || 0) - circleCenter[1]
|
const y = (args.intersectionPoint.twoD.y || 0) - circleCenter[1]
|
||||||
|
|
||||||
if (sketchInit.type === 'CallExpression') {
|
if (sketchInit.type === 'CallExpressionKw') {
|
||||||
const moddedResult = changeSketchArguments(
|
const moddedResult = changeSketchArguments(
|
||||||
modded,
|
modded,
|
||||||
kclManager.variables,
|
kclManager.variables,
|
||||||
@ -1731,7 +1731,7 @@ export class SceneEntities {
|
|||||||
const sketchInit = _node.node?.declaration.init
|
const sketchInit = _node.node?.declaration.init
|
||||||
|
|
||||||
let modded = structuredClone(_ast)
|
let modded = structuredClone(_ast)
|
||||||
if (sketchInit.type === 'CallExpression') {
|
if (sketchInit.type === 'CallExpressionKw') {
|
||||||
const moddedResult = changeSketchArguments(
|
const moddedResult = changeSketchArguments(
|
||||||
modded,
|
modded,
|
||||||
kclManager.variables,
|
kclManager.variables,
|
||||||
|
@ -32,7 +32,7 @@ child_process.spawnSync('git', [
|
|||||||
'clone',
|
'clone',
|
||||||
'--single-branch',
|
'--single-branch',
|
||||||
'--branch',
|
'--branch',
|
||||||
'next',
|
'circle-kw-args',
|
||||||
URL_GIT_KCL_SAMPLES,
|
URL_GIT_KCL_SAMPLES,
|
||||||
DIR_KCL_SAMPLES,
|
DIR_KCL_SAMPLES,
|
||||||
])
|
])
|
||||||
|
@ -581,10 +581,10 @@ sketch002 = startSketchOn(extrude001, $seg01)
|
|||||||
})
|
})
|
||||||
it('finds sketch001 and sketch002 pipes to be lofted', async () => {
|
it('finds sketch001 and sketch002 pipes to be lofted', async () => {
|
||||||
const exampleCode = `sketch001 = startSketchOn('XZ')
|
const exampleCode = `sketch001 = startSketchOn('XZ')
|
||||||
|> circle({ center = [0, 0], radius = 1 }, %)
|
|> circle(center = [0, 0], radius = 1)
|
||||||
plane001 = offsetPlane('XZ', offset = 2)
|
plane001 = offsetPlane('XZ', offset = 2)
|
||||||
sketch002 = startSketchOn(plane001)
|
sketch002 = startSketchOn(plane001)
|
||||||
|> circle({ center = [0, 0], radius = 3 }, %)
|
|> circle(center = [0, 0], radius = 3)
|
||||||
`
|
`
|
||||||
const ast = assertParse(exampleCode)
|
const ast = assertParse(exampleCode)
|
||||||
const extrudable = doesSceneHaveSweepableSketch(ast, 2)
|
const extrudable = doesSceneHaveSweepableSketch(ast, 2)
|
||||||
@ -608,7 +608,7 @@ extrude001 = extrude(sketch001, length = 10)
|
|||||||
describe('Testing doesSceneHaveExtrudedSketch', () => {
|
describe('Testing doesSceneHaveExtrudedSketch', () => {
|
||||||
it('finds extruded sketch as variable', async () => {
|
it('finds extruded sketch as variable', async () => {
|
||||||
const exampleCode = `sketch001 = startSketchOn('XZ')
|
const exampleCode = `sketch001 = startSketchOn('XZ')
|
||||||
|> circle({ center = [0, 0], radius = 1 }, %)
|
|> circle(center = [0, 0], radius = 1)
|
||||||
extrude001 = extrude(sketch001, length = 1)
|
extrude001 = extrude(sketch001, length = 1)
|
||||||
`
|
`
|
||||||
const ast = assertParse(exampleCode)
|
const ast = assertParse(exampleCode)
|
||||||
@ -618,7 +618,7 @@ extrude001 = extrude(sketch001, length = 1)
|
|||||||
})
|
})
|
||||||
it('finds extruded sketch in pipe', async () => {
|
it('finds extruded sketch in pipe', async () => {
|
||||||
const exampleCode = `extrude001 = startSketchOn('XZ')
|
const exampleCode = `extrude001 = startSketchOn('XZ')
|
||||||
|> circle({ center = [0, 0], radius = 1 }, %)
|
|> circle(center = [0, 0], radius = 1)
|
||||||
|> extrude(length = 1)
|
|> extrude(length = 1)
|
||||||
`
|
`
|
||||||
const ast = assertParse(exampleCode)
|
const ast = assertParse(exampleCode)
|
||||||
@ -628,7 +628,7 @@ extrude001 = extrude(sketch001, length = 1)
|
|||||||
})
|
})
|
||||||
it('finds no extrusion with sketch only', async () => {
|
it('finds no extrusion with sketch only', async () => {
|
||||||
const exampleCode = `extrude001 = startSketchOn('XZ')
|
const exampleCode = `extrude001 = startSketchOn('XZ')
|
||||||
|> circle({ center = [0, 0], radius = 1 }, %)
|
|> circle(center = [0, 0], radius = 1)
|
||||||
`
|
`
|
||||||
const ast = assertParse(exampleCode)
|
const ast = assertParse(exampleCode)
|
||||||
if (err(ast)) throw ast
|
if (err(ast)) throw ast
|
||||||
|
@ -16,6 +16,7 @@ import {
|
|||||||
VariableMap,
|
VariableMap,
|
||||||
} from 'lang/wasm'
|
} from 'lang/wasm'
|
||||||
import {
|
import {
|
||||||
|
ARG_INDEX_FIELD,
|
||||||
getNodeFromPath,
|
getNodeFromPath,
|
||||||
getNodeFromPathCurry,
|
getNodeFromPathCurry,
|
||||||
getObjExprProperty,
|
getObjExprProperty,
|
||||||
@ -77,6 +78,8 @@ import {
|
|||||||
export const ARG_TAG = 'tag'
|
export const ARG_TAG = 'tag'
|
||||||
export const ARG_END = 'end'
|
export const ARG_END = 'end'
|
||||||
export const ARG_END_ABSOLUTE = 'endAbsolute'
|
export const ARG_END_ABSOLUTE = 'endAbsolute'
|
||||||
|
export const ARG_CIRCLE_CENTER = 'center'
|
||||||
|
export const ARG_CIRCLE_RADIUS = 'radius'
|
||||||
|
|
||||||
const STRAIGHT_SEGMENT_ERR = new Error(
|
const STRAIGHT_SEGMENT_ERR = new Error(
|
||||||
'Invalid input, expected "straight-segment"'
|
'Invalid input, expected "straight-segment"'
|
||||||
@ -1077,7 +1080,7 @@ export const tangentialArcTo: SketchLineHelper = {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
export const circle: SketchLineHelper = {
|
export const circle: SketchLineHelperKw = {
|
||||||
add: ({ node, pathToNode, segmentInput, replaceExistingCallback }) => {
|
add: ({ node, pathToNode, segmentInput, replaceExistingCallback }) => {
|
||||||
if (segmentInput.type !== 'arc-segment') return ARC_SEGMENT_ERR
|
if (segmentInput.type !== 'arc-segment') return ARC_SEGMENT_ERR
|
||||||
|
|
||||||
@ -1138,51 +1141,45 @@ export const circle: SketchLineHelper = {
|
|||||||
if (input.type !== 'arc-segment') return ARC_SEGMENT_ERR
|
if (input.type !== 'arc-segment') return ARC_SEGMENT_ERR
|
||||||
const { center, radius } = input
|
const { center, radius } = input
|
||||||
const _node = { ...node }
|
const _node = { ...node }
|
||||||
const nodeMeta = getNodeFromPath<CallExpression>(_node, pathToNode)
|
const nodeMeta = getNodeFromPath<CallExpressionKw>(_node, pathToNode)
|
||||||
if (err(nodeMeta)) return nodeMeta
|
if (err(nodeMeta)) return nodeMeta
|
||||||
|
|
||||||
const { node: callExpression, shallowPath } = nodeMeta
|
const { node: callExpression } = nodeMeta
|
||||||
|
|
||||||
const firstArg = callExpression.arguments?.[0]
|
|
||||||
const newCenter = createArrayExpression([
|
const newCenter = createArrayExpression([
|
||||||
createLiteral(roundOff(center[0])),
|
createLiteral(roundOff(center[0])),
|
||||||
createLiteral(roundOff(center[1])),
|
createLiteral(roundOff(center[1])),
|
||||||
])
|
])
|
||||||
mutateObjExpProp(firstArg, newCenter, 'center')
|
mutateKwArg(ARG_CIRCLE_CENTER, callExpression, newCenter)
|
||||||
const newRadius = createLiteral(roundOff(radius))
|
const newRadius = createLiteral(roundOff(radius))
|
||||||
mutateObjExpProp(firstArg, newRadius, 'radius')
|
mutateKwArg(ARG_CIRCLE_RADIUS, callExpression, newRadius)
|
||||||
return {
|
return {
|
||||||
modifiedAst: _node,
|
modifiedAst: _node,
|
||||||
pathToNode: shallowPath,
|
pathToNode,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getTag: getTag(),
|
getTag: getTagKwArg(),
|
||||||
addTag: addTag(),
|
addTag: addTagKw(),
|
||||||
getConstraintInfo: (callExp: CallExpression, code, pathToNode) => {
|
getConstraintInfo: (callExp: CallExpressionKw, code, pathToNode) => {
|
||||||
if (callExp.type !== 'CallExpression') return []
|
if (callExp.type !== 'CallExpressionKw') return []
|
||||||
const firstArg = callExp.arguments?.[0]
|
const firstArg = callExp.arguments?.[0]
|
||||||
if (firstArg.type !== 'ObjectExpression') return []
|
if (firstArg.type !== 'LabeledArg') return []
|
||||||
const centerDetails = getObjExprProperty(firstArg, 'center')
|
let centerInfo = findKwArgWithIndex(ARG_CIRCLE_CENTER, callExp)
|
||||||
const radiusDetails = getObjExprProperty(firstArg, 'radius')
|
let radiusInfo = findKwArgWithIndex(ARG_CIRCLE_RADIUS, callExp)
|
||||||
if (!centerDetails || !radiusDetails) return []
|
if (!centerInfo || !radiusInfo) return []
|
||||||
if (centerDetails.expr.type !== 'ArrayExpression') return []
|
if (centerInfo?.expr.type !== 'ArrayExpression') return []
|
||||||
|
|
||||||
const pathToCenterArrayExpression: PathToNode = [
|
const pathToCenterArrayExpression: PathToNode = [
|
||||||
...pathToNode,
|
...pathToNode,
|
||||||
['arguments', 'CallExpression'],
|
['arguments', 'CallExpressionKw'],
|
||||||
[0, 'index'],
|
[centerInfo.argIndex, ARG_INDEX_FIELD],
|
||||||
['properties', 'ObjectExpression'],
|
['arg', LABELED_ARG_FIELD],
|
||||||
[centerDetails.index, 'index'],
|
|
||||||
['value', 'Property'],
|
|
||||||
['elements', 'ArrayExpression'],
|
|
||||||
]
|
]
|
||||||
const pathToRadiusLiteral: PathToNode = [
|
const pathToRadiusLiteral: PathToNode = [
|
||||||
...pathToNode,
|
...pathToNode,
|
||||||
['arguments', 'CallExpression'],
|
['arguments', 'CallExpressionKw'],
|
||||||
[0, 'index'],
|
[radiusInfo.argIndex, ARG_INDEX_FIELD],
|
||||||
['properties', 'ObjectExpression'],
|
['arg', LABELED_ARG_FIELD],
|
||||||
[radiusDetails.index, 'index'],
|
|
||||||
['value', 'Property'],
|
|
||||||
]
|
]
|
||||||
const pathToXArg: PathToNode = [
|
const pathToXArg: PathToNode = [
|
||||||
...pathToCenterArrayExpression,
|
...pathToCenterArrayExpression,
|
||||||
@ -1196,27 +1193,25 @@ export const circle: SketchLineHelper = {
|
|||||||
return [
|
return [
|
||||||
constrainInfo(
|
constrainInfo(
|
||||||
'radius',
|
'radius',
|
||||||
isNotLiteralArrayOrStatic(radiusDetails.expr),
|
isNotLiteralArrayOrStatic(radiusInfo.expr),
|
||||||
code.slice(radiusDetails.expr.start, radiusDetails.expr.end),
|
code.slice(radiusInfo.expr.start, radiusInfo.expr.end),
|
||||||
'circle',
|
'circle',
|
||||||
'radius',
|
'radius',
|
||||||
topLevelRange(radiusDetails.expr.start, radiusDetails.expr.end),
|
topLevelRange(radiusInfo.expr.start, radiusInfo.expr.end),
|
||||||
pathToRadiusLiteral
|
pathToRadiusLiteral
|
||||||
),
|
),
|
||||||
{
|
{
|
||||||
stdLibFnName: 'circle',
|
stdLibFnName: 'circle',
|
||||||
type: 'xAbsolute',
|
type: 'xAbsolute',
|
||||||
isConstrained: isNotLiteralArrayOrStatic(
|
isConstrained: isNotLiteralArrayOrStatic(centerInfo.expr.elements[0]),
|
||||||
centerDetails.expr.elements[0]
|
|
||||||
),
|
|
||||||
sourceRange: topLevelRange(
|
sourceRange: topLevelRange(
|
||||||
centerDetails.expr.elements[0].start,
|
centerInfo.expr.elements[0].start,
|
||||||
centerDetails.expr.elements[0].end
|
centerInfo.expr.elements[0].end
|
||||||
),
|
),
|
||||||
pathToNode: pathToXArg,
|
pathToNode: pathToXArg,
|
||||||
value: code.slice(
|
value: code.slice(
|
||||||
centerDetails.expr.elements[0].start,
|
centerInfo.expr.elements[0].start,
|
||||||
centerDetails.expr.elements[0].end
|
centerInfo.expr.elements[0].end
|
||||||
),
|
),
|
||||||
argPosition: {
|
argPosition: {
|
||||||
type: 'arrayInObject',
|
type: 'arrayInObject',
|
||||||
@ -1227,17 +1222,15 @@ export const circle: SketchLineHelper = {
|
|||||||
{
|
{
|
||||||
stdLibFnName: 'circle',
|
stdLibFnName: 'circle',
|
||||||
type: 'yAbsolute',
|
type: 'yAbsolute',
|
||||||
isConstrained: isNotLiteralArrayOrStatic(
|
isConstrained: isNotLiteralArrayOrStatic(centerInfo.expr.elements[1]),
|
||||||
centerDetails.expr.elements[1]
|
|
||||||
),
|
|
||||||
sourceRange: topLevelRange(
|
sourceRange: topLevelRange(
|
||||||
centerDetails.expr.elements[1].start,
|
centerInfo.expr.elements[1].start,
|
||||||
centerDetails.expr.elements[1].end
|
centerInfo.expr.elements[1].end
|
||||||
),
|
),
|
||||||
pathToNode: pathToYArg,
|
pathToNode: pathToYArg,
|
||||||
value: code.slice(
|
value: code.slice(
|
||||||
centerDetails.expr.elements[1].start,
|
centerInfo.expr.elements[1].start,
|
||||||
centerDetails.expr.elements[1].end
|
centerInfo.expr.elements[1].end
|
||||||
),
|
),
|
||||||
argPosition: {
|
argPosition: {
|
||||||
type: 'arrayInObject',
|
type: 'arrayInObject',
|
||||||
@ -2295,13 +2288,13 @@ export const sketchLineHelperMap: { [key: string]: SketchLineHelper } = {
|
|||||||
angledLineToY,
|
angledLineToY,
|
||||||
angledLineThatIntersects,
|
angledLineThatIntersects,
|
||||||
tangentialArcTo,
|
tangentialArcTo,
|
||||||
circle,
|
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export const sketchLineHelperMapKw: { [key: string]: SketchLineHelperKw } = {
|
export const sketchLineHelperMapKw: { [key: string]: SketchLineHelperKw } = {
|
||||||
line,
|
line,
|
||||||
lineTo,
|
lineTo,
|
||||||
circleThreePoint,
|
circleThreePoint,
|
||||||
|
circle,
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export function changeSketchArguments(
|
export function changeSketchArguments(
|
||||||
@ -2967,8 +2960,8 @@ function getFirstArgValuesForXYLineFns(callExpression: CallExpression): {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const getCircle = (
|
export const getCircle = (
|
||||||
callExp: CallExpression
|
callExp: CallExpressionKw
|
||||||
):
|
):
|
||||||
| {
|
| {
|
||||||
val: [Expr, Expr, Expr]
|
val: [Expr, Expr, Expr]
|
||||||
@ -2976,22 +2969,24 @@ const getCircle = (
|
|||||||
}
|
}
|
||||||
| Error => {
|
| Error => {
|
||||||
const firstArg = callExp.arguments[0]
|
const firstArg = callExp.arguments[0]
|
||||||
if (firstArg.type === 'ObjectExpression') {
|
if (firstArg.type === 'LabeledArg') {
|
||||||
const centerDetails = getObjExprProperty(firstArg, 'center')
|
let centerInfo = findKwArgWithIndex(ARG_CIRCLE_CENTER, callExp)
|
||||||
const radiusDetails = getObjExprProperty(firstArg, 'radius')
|
let radiusInfo = findKwArgWithIndex(ARG_CIRCLE_RADIUS, callExp)
|
||||||
const tag = callExp.arguments[2]
|
let tagInfo = findKwArgWithIndex(ARG_TAG, callExp)
|
||||||
if (centerDetails?.expr?.type === 'ArrayExpression' && radiusDetails) {
|
if (centerInfo && radiusInfo) {
|
||||||
|
if (centerInfo.expr?.type === 'ArrayExpression' && radiusInfo.expr) {
|
||||||
return {
|
return {
|
||||||
val: [
|
val: [
|
||||||
centerDetails?.expr.elements[0],
|
centerInfo.expr?.elements[0],
|
||||||
centerDetails?.expr.elements[1],
|
centerInfo.expr?.elements[1],
|
||||||
radiusDetails.expr,
|
radiusInfo.expr,
|
||||||
],
|
],
|
||||||
tag,
|
tag: tagInfo?.expr,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new Error('expected ArrayExpression or ObjectExpression')
|
}
|
||||||
|
return new Error('expected the arguments to be for a circle')
|
||||||
}
|
}
|
||||||
const getAngledLineThatIntersects = (
|
const getAngledLineThatIntersects = (
|
||||||
callExp: CallExpression
|
callExp: CallExpression
|
||||||
@ -3050,6 +3045,10 @@ export function getArgForEnd(lineCall: CallExpressionKw):
|
|||||||
}
|
}
|
||||||
| Error {
|
| Error {
|
||||||
const name = lineCall?.callee?.name
|
const name = lineCall?.callee?.name
|
||||||
|
|
||||||
|
if (name == 'circle') {
|
||||||
|
return getCircle(lineCall)
|
||||||
|
}
|
||||||
let arg
|
let arg
|
||||||
if (name === 'line') {
|
if (name === 'line') {
|
||||||
arg = findKwArgAny([ARG_END, ARG_END_ABSOLUTE], lineCall)
|
arg = findKwArgAny([ARG_END, ARG_END_ABSOLUTE], lineCall)
|
||||||
@ -3093,8 +3092,5 @@ export function getFirstArg(callExp: CallExpression):
|
|||||||
// TODO probably needs it's own implementation
|
// TODO probably needs it's own implementation
|
||||||
return getFirstArgValuesForXYFns(callExp)
|
return getFirstArgValuesForXYFns(callExp)
|
||||||
}
|
}
|
||||||
if (name === 'circle') {
|
|
||||||
return getCircle(callExp)
|
|
||||||
}
|
|
||||||
return new Error('unexpected call expression: ' + name)
|
return new Error('unexpected call expression: ' + name)
|
||||||
}
|
}
|
||||||
|
@ -51,6 +51,7 @@ import {
|
|||||||
ARG_END_ABSOLUTE,
|
ARG_END_ABSOLUTE,
|
||||||
getConstraintInfoKw,
|
getConstraintInfoKw,
|
||||||
isAbsoluteLine,
|
isAbsoluteLine,
|
||||||
|
getCircle,
|
||||||
} from './sketch'
|
} from './sketch'
|
||||||
import {
|
import {
|
||||||
getSketchSegmentFromPathToNode,
|
getSketchSegmentFromPathToNode,
|
||||||
@ -2154,6 +2155,9 @@ export function getConstraintLevelFromSourceRange(
|
|||||||
case 'CallExpression':
|
case 'CallExpression':
|
||||||
return getFirstArg(nodeMeta.node)
|
return getFirstArg(nodeMeta.node)
|
||||||
case 'CallExpressionKw':
|
case 'CallExpressionKw':
|
||||||
|
if (name === 'circle') {
|
||||||
|
return getCircle(nodeMeta.node)
|
||||||
|
}
|
||||||
const arg = findKwArgAny([ARG_END, ARG_END_ABSOLUTE], nodeMeta.node)
|
const arg = findKwArgAny([ARG_END, ARG_END_ABSOLUTE], nodeMeta.node)
|
||||||
if (arg === undefined) {
|
if (arg === undefined) {
|
||||||
return new Error('unexpected call expression: ' + name)
|
return new Error('unexpected call expression: ' + name)
|
||||||
|
@ -47,10 +47,10 @@ sketch001 = startSketchOn('XZ')
|
|||||||
)
|
)
|
||||||
|
|
||||||
sketch002 = startSketchOn(sketch001, seg03)
|
sketch002 = startSketchOn(sketch001, seg03)
|
||||||
|> circle({
|
|> circle(
|
||||||
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,
|
||||||
@ -64,10 +64,10 @@ sketch002 = startSketchOn(sketch001, seg03)
|
|||||||
|> extrude(%, length = -thickness-.01)
|
|> extrude(%, length = -thickness-.01)
|
||||||
|
|
||||||
sketch003 = startSketchOn(sketch001, seg04)
|
sketch003 = startSketchOn(sketch001, seg04)
|
||||||
|> circle({
|
|> circle(
|
||||||
center = [1, -1],
|
center = [1, -1],
|
||||||
radius = mountingHoleDiameter / 2,
|
radius = mountingHoleDiameter / 2,
|
||||||
}, %)
|
)
|
||||||
|> patternLinear2d(
|
|> patternLinear2d(
|
||||||
instances = 2,
|
instances = 2,
|
||||||
distance = 4,
|
distance = 4,
|
||||||
|
@ -31,10 +31,10 @@ profile002 = startProfileAt([-321.34, 361.76], sketch002)
|
|||||||
|> close()
|
|> close()
|
||||||
extrude002 = extrude(profile002, length = 500)
|
extrude002 = extrude(profile002, length = 500)
|
||||||
sketch005 = startSketchOn(extrude002, 'END')
|
sketch005 = startSketchOn(extrude002, 'END')
|
||||||
profile006 = circle({
|
profile006 = circle(sketch005,
|
||||||
center = [-292.57, 302.55],
|
center = [-292.57, 302.55],
|
||||||
radius = 25.89
|
radius = 25.89
|
||||||
}, sketch005)
|
)
|
||||||
sketch004 = startSketchOn(extrude001, seg02)
|
sketch004 = startSketchOn(extrude001, seg02)
|
||||||
profile005 = startProfileAt([36.1, 174.49], sketch004)
|
profile005 = startProfileAt([36.1, 174.49], sketch004)
|
||||||
|> angledLine([0, 22.33], %, $rectangleSegmentA003)
|
|> angledLine([0, 22.33], %, $rectangleSegmentA003)
|
||||||
@ -61,10 +61,10 @@ profile003 = startProfileAt([-115.59, 439.4], sketch003)
|
|||||||
], %)
|
], %)
|
||||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close()
|
|> close()
|
||||||
profile004 = circle({
|
profile004 = circle(sketch003,
|
||||||
center = [-88.54, 209.41],
|
center = [-88.54, 209.41],
|
||||||
radius = 42.72
|
radius = 42.72
|
||||||
}, sketch003)
|
)
|
||||||
`
|
`
|
||||||
const ___artifactGraph = new Map([
|
const ___artifactGraph = new Map([
|
||||||
[
|
[
|
||||||
|
@ -3526,18 +3526,13 @@ export function isEditingExistingSketch({
|
|||||||
if (variableDeclaration.node.type !== 'VariableDeclarator') return false
|
if (variableDeclaration.node.type !== 'VariableDeclarator') return false
|
||||||
const maybePipeExpression = variableDeclaration.node.init
|
const maybePipeExpression = variableDeclaration.node.init
|
||||||
if (
|
if (
|
||||||
maybePipeExpression.type === 'CallExpression' &&
|
(maybePipeExpression.type === 'CallExpression' ||
|
||||||
|
maybePipeExpression.type === 'CallExpressionKw') &&
|
||||||
(maybePipeExpression.callee.name === 'startProfileAt' ||
|
(maybePipeExpression.callee.name === 'startProfileAt' ||
|
||||||
maybePipeExpression.callee.name === 'circle' ||
|
maybePipeExpression.callee.name === 'circle' ||
|
||||||
maybePipeExpression.callee.name === 'circleThreePoint')
|
maybePipeExpression.callee.name === 'circleThreePoint')
|
||||||
)
|
)
|
||||||
return true
|
return true
|
||||||
if (
|
|
||||||
maybePipeExpression.type === 'CallExpressionKw' &&
|
|
||||||
(maybePipeExpression.callee.name === 'startProfileAt' ||
|
|
||||||
maybePipeExpression.callee.name === 'circleThreePoint')
|
|
||||||
)
|
|
||||||
return true
|
|
||||||
if (maybePipeExpression.type !== 'PipeExpression') return false
|
if (maybePipeExpression.type !== 'PipeExpression') return false
|
||||||
const hasStartProfileAt = maybePipeExpression.body.some(
|
const hasStartProfileAt = maybePipeExpression.body.some(
|
||||||
(item) =>
|
(item) =>
|
||||||
@ -3545,7 +3540,8 @@ export function isEditingExistingSketch({
|
|||||||
)
|
)
|
||||||
const hasCircle =
|
const hasCircle =
|
||||||
maybePipeExpression.body.some(
|
maybePipeExpression.body.some(
|
||||||
(item) => item.type === 'CallExpression' && item.callee.name === 'circle'
|
(item) =>
|
||||||
|
item.type === 'CallExpressionKw' && item.callee.name === 'circle'
|
||||||
) ||
|
) ||
|
||||||
maybePipeExpression.body.some(
|
maybePipeExpression.body.some(
|
||||||
(item) =>
|
(item) =>
|
||||||
@ -3570,7 +3566,7 @@ export function pipeHasCircle({
|
|||||||
const pipeExpression = variableDeclaration.node.init
|
const pipeExpression = variableDeclaration.node.init
|
||||||
if (pipeExpression.type !== 'PipeExpression') return false
|
if (pipeExpression.type !== 'PipeExpression') return false
|
||||||
const hasCircle = pipeExpression.body.some(
|
const hasCircle = pipeExpression.body.some(
|
||||||
(item) => item.type === 'CallExpression' && item.callee.name === 'circle'
|
(item) => item.type === 'CallExpressionKw' && item.callee.name === 'circle'
|
||||||
)
|
)
|
||||||
return hasCircle
|
return hasCircle
|
||||||
}
|
}
|
||||||
@ -3608,7 +3604,7 @@ export function isClosedSketch({
|
|||||||
if (node.node?.declaration?.init?.type !== 'PipeExpression') return false
|
if (node.node?.declaration?.init?.type !== 'PipeExpression') return false
|
||||||
return node.node.declaration.init.body.some(
|
return node.node.declaration.init.body.some(
|
||||||
(node) =>
|
(node) =>
|
||||||
node.type === 'CallExpression' &&
|
(node.type === 'CallExpression' || node.type === 'CallExpressionKw') &&
|
||||||
(node.callee.name === 'close' || node.callee.name === 'circle')
|
(node.callee.name === 'close' || node.callee.name === 'circle')
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ cita := "cargo insta test --accept"
|
|||||||
|
|
||||||
# Run the same lint checks we run in CI.
|
# Run the same lint checks we run in CI.
|
||||||
lint:
|
lint:
|
||||||
cargo clippy --workspace --all-targets -- -D warnings
|
cargo clippy --workspace --all-targets --tests --all-features --examples --benches -- -D warnings
|
||||||
|
|
||||||
# Run the stdlib docs generation
|
# Run the stdlib docs generation
|
||||||
redo-kcl-stdlib-docs-no-imgs:
|
redo-kcl-stdlib-docs-no-imgs:
|
||||||
@ -42,7 +42,7 @@ overwrite-sim-test test_name:
|
|||||||
{{cita}} -p kcl-lib -- tests::{{test_name}}::kcl_test_execute
|
{{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 --no-fail-fast
|
||||||
|
|
||||||
publish-kcl version:
|
publish-kcl version:
|
||||||
git tag {{version}}
|
git tag {{version}}
|
||||||
|
@ -1014,10 +1014,7 @@ mod tests {
|
|||||||
let snippet = circle_fn.to_autocomplete_snippet().unwrap();
|
let snippet = circle_fn.to_autocomplete_snippet().unwrap();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
snippet,
|
snippet,
|
||||||
r#"circle({
|
r#"circle(${0:%}, center = [${1:3.14}, ${2:3.14}], radius = ${3:3.14})${}"#
|
||||||
center = [${0:3.14}, ${1:3.14}],
|
|
||||||
radius = ${2:3.14},
|
|
||||||
}, ${3:%})${}"#
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -886,11 +886,20 @@ impl ExecutorContext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
pub(crate) async fn parse_execute(code: &str) -> Result<(crate::Program, EnvironmentRef, ExecutorContext, ExecState)> {
|
pub(crate) async fn parse_execute(
|
||||||
|
code: &str,
|
||||||
|
) -> Result<(crate::Program, EnvironmentRef, ExecutorContext, ExecState), KclError> {
|
||||||
let program = crate::Program::parse_no_errs(code)?;
|
let program = crate::Program::parse_no_errs(code)?;
|
||||||
|
|
||||||
let ctx = ExecutorContext {
|
let ctx = ExecutorContext {
|
||||||
engine: Arc::new(Box::new(crate::engine::conn_mock::EngineConnection::new().await?)),
|
engine: Arc::new(Box::new(
|
||||||
|
crate::engine::conn_mock::EngineConnection::new().await.map_err(|err| {
|
||||||
|
KclError::Internal(crate::errors::KclErrorDetails {
|
||||||
|
message: format!("Failed to create mock engine connection: {}", err),
|
||||||
|
source_ranges: vec![SourceRange::default()],
|
||||||
|
})
|
||||||
|
})?,
|
||||||
|
)),
|
||||||
fs: Arc::new(crate::fs::FileManager::new()),
|
fs: Arc::new(crate::fs::FileManager::new()),
|
||||||
stdlib: Arc::new(crate::std::StdLib::new()),
|
stdlib: Arc::new(crate::std::StdLib::new()),
|
||||||
settings: Default::default(),
|
settings: Default::default(),
|
||||||
@ -1293,7 +1302,7 @@ const x = 5
|
|||||||
const answer = returnX()"#;
|
const answer = returnX()"#;
|
||||||
|
|
||||||
let result = parse_execute(ast).await;
|
let result = parse_execute(ast).await;
|
||||||
let err = result.unwrap_err().downcast::<KclError>().unwrap();
|
let err = result.unwrap_err();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
err,
|
err,
|
||||||
KclError::UndefinedValue(KclErrorDetails {
|
KclError::UndefinedValue(KclErrorDetails {
|
||||||
@ -1326,7 +1335,7 @@ foo
|
|||||||
"#;
|
"#;
|
||||||
|
|
||||||
let result = parse_execute(ast).await;
|
let result = parse_execute(ast).await;
|
||||||
let err = result.unwrap_err().downcast::<KclError>().unwrap();
|
let err = result.unwrap_err();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
err,
|
err,
|
||||||
KclError::Syntax(KclErrorDetails {
|
KclError::Syntax(KclErrorDetails {
|
||||||
@ -1350,7 +1359,7 @@ fn transform = (replicaId) => {
|
|||||||
|
|
||||||
fn layer = () => {
|
fn layer = () => {
|
||||||
return startSketchOn(XY)
|
return startSketchOn(XY)
|
||||||
|> circle({ center: [0, 0], radius: 1 }, %, $tag1)
|
|> circle( center= [0, 0], radius= 1 , tag =$tag1)
|
||||||
|> extrude(length = 10)
|
|> extrude(length = 10)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1361,7 +1370,7 @@ let shape = layer() |> patternTransform(instances = 10, transform = transform)
|
|||||||
"#;
|
"#;
|
||||||
|
|
||||||
let result = parse_execute(ast).await;
|
let result = parse_execute(ast).await;
|
||||||
let err = result.unwrap_err().downcast::<KclError>().unwrap();
|
let err = result.unwrap_err();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
err,
|
err,
|
||||||
KclError::UndefinedValue(KclErrorDetails {
|
KclError::UndefinedValue(KclErrorDetails {
|
||||||
@ -1512,7 +1521,7 @@ let myNull = 0 / 0
|
|||||||
let notNull = !myNull
|
let notNull = !myNull
|
||||||
"#;
|
"#;
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
parse_execute(code1).await.unwrap_err().downcast::<KclError>().unwrap(),
|
parse_execute(code1).await.unwrap_err(),
|
||||||
KclError::Semantic(KclErrorDetails {
|
KclError::Semantic(KclErrorDetails {
|
||||||
message: "Cannot apply unary operator ! to non-boolean value: number".to_owned(),
|
message: "Cannot apply unary operator ! to non-boolean value: number".to_owned(),
|
||||||
source_ranges: vec![SourceRange::new(56, 63, ModuleId::default())],
|
source_ranges: vec![SourceRange::new(56, 63, ModuleId::default())],
|
||||||
@ -1521,7 +1530,7 @@ let notNull = !myNull
|
|||||||
|
|
||||||
let code2 = "let notZero = !0";
|
let code2 = "let notZero = !0";
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
parse_execute(code2).await.unwrap_err().downcast::<KclError>().unwrap(),
|
parse_execute(code2).await.unwrap_err(),
|
||||||
KclError::Semantic(KclErrorDetails {
|
KclError::Semantic(KclErrorDetails {
|
||||||
message: "Cannot apply unary operator ! to non-boolean value: number".to_owned(),
|
message: "Cannot apply unary operator ! to non-boolean value: number".to_owned(),
|
||||||
source_ranges: vec![SourceRange::new(14, 16, ModuleId::default())],
|
source_ranges: vec![SourceRange::new(14, 16, ModuleId::default())],
|
||||||
@ -1532,7 +1541,7 @@ let notNull = !myNull
|
|||||||
let notEmptyString = !""
|
let notEmptyString = !""
|
||||||
"#;
|
"#;
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
parse_execute(code3).await.unwrap_err().downcast::<KclError>().unwrap(),
|
parse_execute(code3).await.unwrap_err(),
|
||||||
KclError::Semantic(KclErrorDetails {
|
KclError::Semantic(KclErrorDetails {
|
||||||
message: "Cannot apply unary operator ! to non-boolean value: string (text)".to_owned(),
|
message: "Cannot apply unary operator ! to non-boolean value: string (text)".to_owned(),
|
||||||
source_ranges: vec![SourceRange::new(22, 25, ModuleId::default())],
|
source_ranges: vec![SourceRange::new(22, 25, ModuleId::default())],
|
||||||
@ -1544,7 +1553,7 @@ let obj = { a: 1 }
|
|||||||
let notMember = !obj.a
|
let notMember = !obj.a
|
||||||
"#;
|
"#;
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
parse_execute(code4).await.unwrap_err().downcast::<KclError>().unwrap(),
|
parse_execute(code4).await.unwrap_err(),
|
||||||
KclError::Semantic(KclErrorDetails {
|
KclError::Semantic(KclErrorDetails {
|
||||||
message: "Cannot apply unary operator ! to non-boolean value: number".to_owned(),
|
message: "Cannot apply unary operator ! to non-boolean value: number".to_owned(),
|
||||||
source_ranges: vec![SourceRange::new(36, 42, ModuleId::default())],
|
source_ranges: vec![SourceRange::new(36, 42, ModuleId::default())],
|
||||||
@ -1555,7 +1564,7 @@ let notMember = !obj.a
|
|||||||
let a = []
|
let a = []
|
||||||
let notArray = !a";
|
let notArray = !a";
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
parse_execute(code5).await.unwrap_err().downcast::<KclError>().unwrap(),
|
parse_execute(code5).await.unwrap_err(),
|
||||||
KclError::Semantic(KclErrorDetails {
|
KclError::Semantic(KclErrorDetails {
|
||||||
message: "Cannot apply unary operator ! to non-boolean value: array (list)".to_owned(),
|
message: "Cannot apply unary operator ! to non-boolean value: array (list)".to_owned(),
|
||||||
source_ranges: vec![SourceRange::new(27, 29, ModuleId::default())],
|
source_ranges: vec![SourceRange::new(27, 29, ModuleId::default())],
|
||||||
@ -1566,7 +1575,7 @@ let notArray = !a";
|
|||||||
let x = {}
|
let x = {}
|
||||||
let notObject = !x";
|
let notObject = !x";
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
parse_execute(code6).await.unwrap_err().downcast::<KclError>().unwrap(),
|
parse_execute(code6).await.unwrap_err(),
|
||||||
KclError::Semantic(KclErrorDetails {
|
KclError::Semantic(KclErrorDetails {
|
||||||
message: "Cannot apply unary operator ! to non-boolean value: object".to_owned(),
|
message: "Cannot apply unary operator ! to non-boolean value: object".to_owned(),
|
||||||
source_ranges: vec![SourceRange::new(28, 30, ModuleId::default())],
|
source_ranges: vec![SourceRange::new(28, 30, ModuleId::default())],
|
||||||
@ -1576,7 +1585,7 @@ let notObject = !x";
|
|||||||
let code7 = "
|
let code7 = "
|
||||||
fn x = () => { return 1 }
|
fn x = () => { return 1 }
|
||||||
let notFunction = !x";
|
let notFunction = !x";
|
||||||
let fn_err = parse_execute(code7).await.unwrap_err().downcast::<KclError>().unwrap();
|
let fn_err = parse_execute(code7).await.unwrap_err();
|
||||||
// These are currently printed out as JSON objects, so we don't want to
|
// These are currently printed out as JSON objects, so we don't want to
|
||||||
// check the full error.
|
// check the full error.
|
||||||
assert!(
|
assert!(
|
||||||
@ -1590,7 +1599,7 @@ let notFunction = !x";
|
|||||||
let code8 = "
|
let code8 = "
|
||||||
let myTagDeclarator = $myTag
|
let myTagDeclarator = $myTag
|
||||||
let notTagDeclarator = !myTagDeclarator";
|
let notTagDeclarator = !myTagDeclarator";
|
||||||
let tag_declarator_err = parse_execute(code8).await.unwrap_err().downcast::<KclError>().unwrap();
|
let tag_declarator_err = parse_execute(code8).await.unwrap_err();
|
||||||
// These are currently printed out as JSON objects, so we don't want to
|
// These are currently printed out as JSON objects, so we don't want to
|
||||||
// check the full error.
|
// check the full error.
|
||||||
assert!(
|
assert!(
|
||||||
@ -1604,7 +1613,7 @@ let notTagDeclarator = !myTagDeclarator";
|
|||||||
let code9 = "
|
let code9 = "
|
||||||
let myTagDeclarator = $myTag
|
let myTagDeclarator = $myTag
|
||||||
let notTagIdentifier = !myTag";
|
let notTagIdentifier = !myTag";
|
||||||
let tag_identifier_err = parse_execute(code9).await.unwrap_err().downcast::<KclError>().unwrap();
|
let tag_identifier_err = parse_execute(code9).await.unwrap_err();
|
||||||
// These are currently printed out as JSON objects, so we don't want to
|
// These are currently printed out as JSON objects, so we don't want to
|
||||||
// check the full error.
|
// check the full error.
|
||||||
assert!(
|
assert!(
|
||||||
@ -1619,7 +1628,7 @@ let notTagIdentifier = !myTag";
|
|||||||
assert_eq!(
|
assert_eq!(
|
||||||
// TODO: We don't currently parse this, but we should. It should be
|
// TODO: We don't currently parse this, but we should. It should be
|
||||||
// a runtime error instead.
|
// a runtime error instead.
|
||||||
parse_execute(code10).await.unwrap_err().downcast::<KclError>().unwrap(),
|
parse_execute(code10).await.unwrap_err(),
|
||||||
KclError::Syntax(KclErrorDetails {
|
KclError::Syntax(KclErrorDetails {
|
||||||
message: "Unexpected token: !".to_owned(),
|
message: "Unexpected token: !".to_owned(),
|
||||||
source_ranges: vec![SourceRange::new(14, 15, ModuleId::default())],
|
source_ranges: vec![SourceRange::new(14, 15, ModuleId::default())],
|
||||||
@ -1632,7 +1641,7 @@ let notPipeSub = 1 |> identity(!%))";
|
|||||||
assert_eq!(
|
assert_eq!(
|
||||||
// TODO: We don't currently parse this, but we should. It should be
|
// TODO: We don't currently parse this, but we should. It should be
|
||||||
// a runtime error instead.
|
// a runtime error instead.
|
||||||
parse_execute(code11).await.unwrap_err().downcast::<KclError>().unwrap(),
|
parse_execute(code11).await.unwrap_err(),
|
||||||
KclError::Syntax(KclErrorDetails {
|
KclError::Syntax(KclErrorDetails {
|
||||||
message: "Unexpected token: |>".to_owned(),
|
message: "Unexpected token: |>".to_owned(),
|
||||||
source_ranges: vec![SourceRange::new(54, 56, ModuleId::default())],
|
source_ranges: vec![SourceRange::new(54, 56, ModuleId::default())],
|
||||||
|
@ -6,7 +6,7 @@ expression: actual
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 113,
|
"end": 106,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 14,
|
"end": 14,
|
||||||
"name": "cylinder",
|
"name": "cylinder",
|
||||||
@ -40,24 +40,17 @@ expression: actual
|
|||||||
{
|
{
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 81,
|
"type": "LabeledArg",
|
||||||
"properties": [
|
"label": {
|
||||||
{
|
"type": "Identifier",
|
||||||
"end": 67,
|
"name": "center"
|
||||||
"key": {
|
|
||||||
"end": 59,
|
|
||||||
"name": "center",
|
|
||||||
"start": 53,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
},
|
||||||
"start": 53,
|
"arg": {
|
||||||
"type": "ObjectProperty",
|
|
||||||
"value": {
|
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"end": 63,
|
"end": 61,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 62,
|
"start": 60,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
@ -66,9 +59,9 @@ expression: actual
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 66,
|
"end": 64,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 65,
|
"start": 63,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
@ -77,26 +70,22 @@ expression: actual
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 67,
|
"end": 65,
|
||||||
"start": 61,
|
"start": 59,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 79,
|
"type": "LabeledArg",
|
||||||
"key": {
|
"label": {
|
||||||
"end": 75,
|
"type": "Identifier",
|
||||||
"name": "radius",
|
"name": "radius"
|
||||||
"start": 69,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
},
|
||||||
"start": 69,
|
"arg": {
|
||||||
"type": "ObjectProperty",
|
"end": 77,
|
||||||
"value": {
|
|
||||||
"end": 79,
|
|
||||||
"raw": "22",
|
"raw": "22",
|
||||||
"start": 77,
|
"start": 75,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
@ -106,27 +95,17 @@ expression: actual
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"start": 51,
|
|
||||||
"type": "ObjectExpression",
|
|
||||||
"type": "ObjectExpression"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 84,
|
|
||||||
"start": 83,
|
|
||||||
"type": "PipeSubstitution",
|
|
||||||
"type": "PipeSubstitution"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 50,
|
"end": 50,
|
||||||
"name": "circle",
|
"name": "circle",
|
||||||
"start": 44,
|
"start": 44,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 85,
|
"end": 78,
|
||||||
"start": 44,
|
"start": 44,
|
||||||
"type": "CallExpression",
|
"type": "CallExpressionKw",
|
||||||
"type": "CallExpression"
|
"type": "CallExpressionKw",
|
||||||
|
"unlabeled": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"arguments": [
|
"arguments": [
|
||||||
@ -137,9 +116,9 @@ expression: actual
|
|||||||
"name": "length"
|
"name": "length"
|
||||||
},
|
},
|
||||||
"arg": {
|
"arg": {
|
||||||
"end": 112,
|
"end": 105,
|
||||||
"raw": "14",
|
"raw": "14",
|
||||||
"start": 110,
|
"start": 103,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
@ -150,19 +129,19 @@ expression: actual
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 100,
|
"end": 93,
|
||||||
"name": "extrude",
|
"name": "extrude",
|
||||||
"start": 93,
|
"start": 86,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 113,
|
"end": 106,
|
||||||
"start": 93,
|
"start": 86,
|
||||||
"type": "CallExpressionKw",
|
"type": "CallExpressionKw",
|
||||||
"type": "CallExpressionKw",
|
"type": "CallExpressionKw",
|
||||||
"unlabeled": null
|
"unlabeled": null
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 113,
|
"end": 106,
|
||||||
"start": 17,
|
"start": 17,
|
||||||
"type": "PipeExpression",
|
"type": "PipeExpression",
|
||||||
"type": "PipeExpression"
|
"type": "PipeExpression"
|
||||||
@ -170,13 +149,13 @@ expression: actual
|
|||||||
"start": 6,
|
"start": 6,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 113,
|
"end": 106,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 114,
|
"end": 107,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ pub async fn appearance(_exec_state: &mut ExecState, args: Args) -> Result<KclVa
|
|||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// // Add color to a revolved solid.
|
/// // Add color to a revolved solid.
|
||||||
/// sketch001 = startSketchOn('XY')
|
/// sketch001 = startSketchOn('XY')
|
||||||
/// |> circle({ center = [15, 0], radius = 5 }, %)
|
/// |> circle( center = [15, 0], radius = 5 )
|
||||||
/// |> revolve({ angle = 360, axis = 'y' }, %)
|
/// |> revolve({ angle = 360, axis = 'y' }, %)
|
||||||
/// |> appearance(
|
/// |> appearance(
|
||||||
/// color = '#ff0000',
|
/// color = '#ff0000',
|
||||||
@ -253,16 +253,16 @@ pub async fn appearance(_exec_state: &mut ExecState, args: Args) -> Result<KclVa
|
|||||||
/// |> line(end = [0, 7])
|
/// |> line(end = [0, 7])
|
||||||
///
|
///
|
||||||
/// pipeHole = startSketchOn('XY')
|
/// pipeHole = startSketchOn('XY')
|
||||||
/// |> circle({
|
/// |> circle(
|
||||||
/// center = [0, 0],
|
/// center = [0, 0],
|
||||||
/// radius = 1.5,
|
/// radius = 1.5,
|
||||||
/// }, %)
|
/// )
|
||||||
///
|
///
|
||||||
/// sweepSketch = startSketchOn('XY')
|
/// sweepSketch = startSketchOn('XY')
|
||||||
/// |> circle({
|
/// |> circle(
|
||||||
/// center = [0, 0],
|
/// center = [0, 0],
|
||||||
/// radius = 2,
|
/// radius = 2,
|
||||||
/// }, %)
|
/// )
|
||||||
/// |> hole(pipeHole, %)
|
/// |> hole(pipeHole, %)
|
||||||
/// |> sweep(path = sweepPath)
|
/// |> sweep(path = sweepPath)
|
||||||
/// |> appearance(
|
/// |> appearance(
|
||||||
|
@ -444,19 +444,6 @@ impl Args {
|
|||||||
Ok((a.n, b.n, ty))
|
Ok((a.n, b.n, ty))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn get_circle_args(
|
|
||||||
&self,
|
|
||||||
) -> Result<
|
|
||||||
(
|
|
||||||
crate::std::shapes::CircleData,
|
|
||||||
crate::std::shapes::SketchOrSurface,
|
|
||||||
Option<TagNode>,
|
|
||||||
),
|
|
||||||
KclError,
|
|
||||||
> {
|
|
||||||
FromArgs::from_args(self, 0)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub(crate) fn get_sketches(&self) -> Result<(SketchSet, Sketch), KclError> {
|
pub(crate) fn get_sketches(&self) -> Result<(SketchSet, Sketch), KclError> {
|
||||||
FromArgs::from_args(self, 0)
|
FromArgs::from_args(self, 0)
|
||||||
}
|
}
|
||||||
@ -1080,15 +1067,6 @@ impl<'a> FromKclValue<'a> for super::revolve::RevolveData {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> FromKclValue<'a> for super::shapes::CircleData {
|
|
||||||
fn from_kcl_val(arg: &'a KclValue) -> Option<Self> {
|
|
||||||
let obj = arg.as_object()?;
|
|
||||||
let_field_of!(obj, center);
|
|
||||||
let_field_of!(obj, radius);
|
|
||||||
Some(Self { center, radius })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'a> FromKclValue<'a> for super::sketch::TangentialArcData {
|
impl<'a> FromKclValue<'a> for super::sketch::TangentialArcData {
|
||||||
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()?;
|
||||||
|
@ -30,7 +30,7 @@ pub async fn map(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kcl
|
|||||||
/// r = 10 // radius
|
/// r = 10 // radius
|
||||||
/// fn drawCircle(id) {
|
/// fn drawCircle(id) {
|
||||||
/// return startSketchOn("XY")
|
/// return startSketchOn("XY")
|
||||||
/// |> circle({ center: [id * 2 * r, 0], radius: r}, %)
|
/// |> circle( center= [id * 2 * r, 0], radius= r)
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// // Call `drawCircle`, passing in each element of the array.
|
/// // Call `drawCircle`, passing in each element of the array.
|
||||||
@ -48,7 +48,7 @@ pub async fn map(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kcl
|
|||||||
/// [1..3],
|
/// [1..3],
|
||||||
/// fn(id) {
|
/// fn(id) {
|
||||||
/// return startSketchOn("XY")
|
/// return startSketchOn("XY")
|
||||||
/// |> circle({ center: [id * 2 * r, 0], radius: r}, %)
|
/// |> circle( center= [id * 2 * r, 0], radius= r)
|
||||||
/// }
|
/// }
|
||||||
/// )
|
/// )
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -25,7 +25,7 @@ pub async fn int(_exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
|
|||||||
/// assertEqual(n, 3, 0.0001, "5/2 = 2.5, rounded up makes 3")
|
/// assertEqual(n, 3, 0.0001, "5/2 = 2.5, rounded up makes 3")
|
||||||
/// // Draw n cylinders.
|
/// // Draw n cylinders.
|
||||||
/// startSketchOn('XZ')
|
/// startSketchOn('XZ')
|
||||||
/// |> circle({ center = [0, 0], radius = 2 }, %)
|
/// |> circle(center = [0, 0], radius = 2 )
|
||||||
/// |> extrude(length = 5)
|
/// |> extrude(length = 5)
|
||||||
/// |> patternTransform(instances = n, transform = fn(id) {
|
/// |> patternTransform(instances = n, transform = fn(id) {
|
||||||
/// return { translate = [4 * id, 0, 0] }
|
/// return { translate = [4 * id, 0, 0] }
|
||||||
|
@ -42,7 +42,7 @@ pub async fn helix(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
|
|||||||
///
|
///
|
||||||
/// // Create a spring by sweeping around the helix path.
|
/// // Create a spring by sweeping around the helix path.
|
||||||
/// springSketch = startSketchOn('YZ')
|
/// springSketch = startSketchOn('YZ')
|
||||||
/// |> circle({ center = [0, 0], radius = 0.5 }, %)
|
/// |> circle( center = [0, 0], radius = 0.5)
|
||||||
/// |> sweep(path = helixPath)
|
/// |> sweep(path = helixPath)
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
@ -63,7 +63,7 @@ pub async fn helix(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
|
|||||||
///
|
///
|
||||||
/// // Create a spring by sweeping around the helix path.
|
/// // Create a spring by sweeping around the helix path.
|
||||||
/// springSketch = startSketchOn('XY')
|
/// springSketch = startSketchOn('XY')
|
||||||
/// |> circle({ center = [0, 0], radius = 0.5 }, %)
|
/// |> circle( center = [0, 0], radius = 0.5 )
|
||||||
/// |> sweep(path = helixPath)
|
/// |> sweep(path = helixPath)
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
@ -85,7 +85,7 @@ pub async fn helix(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
|
|||||||
///
|
///
|
||||||
/// // Create a spring by sweeping around the helix path.
|
/// // Create a spring by sweeping around the helix path.
|
||||||
/// springSketch = startSketchOn('XY')
|
/// springSketch = startSketchOn('XY')
|
||||||
/// |> circle({ center = [0, 0], radius = 1 }, %)
|
/// |> circle( center = [0, 0], radius = 1 )
|
||||||
/// |> sweep(path = helixPath)
|
/// |> sweep(path = helixPath)
|
||||||
/// ```
|
/// ```
|
||||||
#[stdlib {
|
#[stdlib {
|
||||||
@ -206,7 +206,7 @@ pub async fn helix_revolutions(exec_state: &mut ExecState, args: Args) -> Result
|
|||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// part001 = startSketchOn('XY')
|
/// part001 = startSketchOn('XY')
|
||||||
/// |> circle({ center: [5, 5], radius: 10 }, %)
|
/// |> circle( center= [5, 5], radius= 10 )
|
||||||
/// |> extrude(length = 10)
|
/// |> extrude(length = 10)
|
||||||
/// |> helixRevolutions({
|
/// |> helixRevolutions({
|
||||||
/// angleStart = 0,
|
/// angleStart = 0,
|
||||||
|
@ -78,10 +78,10 @@ pub async fn loft(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
|
|||||||
/// |> close()
|
/// |> close()
|
||||||
///
|
///
|
||||||
/// circleSketch0 = startSketchOn(offsetPlane('XY', offset = 75))
|
/// circleSketch0 = startSketchOn(offsetPlane('XY', offset = 75))
|
||||||
/// |> circle({ center = [0, 100], radius = 50 }, %)
|
/// |> circle( center = [0, 100], radius = 50 )
|
||||||
///
|
///
|
||||||
/// circleSketch1 = startSketchOn(offsetPlane('XY', offset = 150))
|
/// circleSketch1 = startSketchOn(offsetPlane('XY', offset = 150))
|
||||||
/// |> circle({ center = [0, 100], radius = 20 }, %)
|
/// |> circle( center = [0, 100], radius = 20 )
|
||||||
///
|
///
|
||||||
/// loft([squareSketch, circleSketch0, circleSketch1])
|
/// loft([squareSketch, circleSketch0, circleSketch1])
|
||||||
/// ```
|
/// ```
|
||||||
@ -97,10 +97,10 @@ pub async fn loft(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
|
|||||||
/// |> close()
|
/// |> close()
|
||||||
///
|
///
|
||||||
/// circleSketch0 = startSketchOn(offsetPlane('XY', offset = 75))
|
/// circleSketch0 = startSketchOn(offsetPlane('XY', offset = 75))
|
||||||
/// |> circle({ center = [0, 100], radius = 50 }, %)
|
/// |> circle( center = [0, 100], radius = 50 )
|
||||||
///
|
///
|
||||||
/// circleSketch1 = startSketchOn(offsetPlane('XY', offset = 150))
|
/// circleSketch1 = startSketchOn(offsetPlane('XY', offset = 150))
|
||||||
/// |> circle({ center = [0, 100], radius = 20 }, %)
|
/// |> circle( center = [0, 100], radius = 20 )
|
||||||
///
|
///
|
||||||
/// loft([squareSketch, circleSketch0, circleSketch1],
|
/// loft([squareSketch, circleSketch0, circleSketch1],
|
||||||
/// baseCurveIndex = 0,
|
/// baseCurveIndex = 0,
|
||||||
|
@ -78,7 +78,7 @@ pub async fn pi(_exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kcl
|
|||||||
/// circumference = 70
|
/// circumference = 70
|
||||||
///
|
///
|
||||||
/// exampleSketch = startSketchOn("XZ")
|
/// exampleSketch = startSketchOn("XZ")
|
||||||
/// |> circle({ center = [0, 0], radius = circumference/ (2 * pi()) }, %)
|
/// |> circle( center = [0, 0], radius = circumference/ (2 * pi()) )
|
||||||
///
|
///
|
||||||
/// example = extrude(exampleSketch, length = 5)
|
/// example = extrude(exampleSketch, length = 5)
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -117,7 +117,7 @@ pub async fn pattern_transform_2d(exec_state: &mut ExecState, args: Args) -> Res
|
|||||||
///
|
///
|
||||||
/// // Sketch 4 cylinders.
|
/// // Sketch 4 cylinders.
|
||||||
/// sketch001 = startSketchOn('XZ')
|
/// sketch001 = startSketchOn('XZ')
|
||||||
/// |> circle({ center = [0, 0], radius = 2 }, %)
|
/// |> circle(center = [0, 0], radius = 2)
|
||||||
/// |> extrude(length = 5)
|
/// |> extrude(length = 5)
|
||||||
/// |> patternTransform(instances = 4, transform = transform)
|
/// |> patternTransform(instances = 4, transform = transform)
|
||||||
/// ```
|
/// ```
|
||||||
@ -130,7 +130,7 @@ pub async fn pattern_transform_2d(exec_state: &mut ExecState, args: Args) -> Res
|
|||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// sketch001 = startSketchOn('XZ')
|
/// sketch001 = startSketchOn('XZ')
|
||||||
/// |> circle({ center = [0, 0], radius = 2 }, %)
|
/// |> circle(center = [0, 0], radius = 2)
|
||||||
/// |> extrude(length = 5)
|
/// |> extrude(length = 5)
|
||||||
/// |> patternTransform(instances = 4, transform = transform)
|
/// |> patternTransform(instances = 4, transform = transform)
|
||||||
/// ```
|
/// ```
|
||||||
@ -226,7 +226,7 @@ pub async fn pattern_transform_2d(exec_state: &mut ExecState, args: Args) -> Res
|
|||||||
/// // Each layer is just a pretty thin cylinder.
|
/// // Each layer is just a pretty thin cylinder.
|
||||||
/// fn layer() {
|
/// fn layer() {
|
||||||
/// return startSketchOn("XY") // or some other plane idk
|
/// return startSketchOn("XY") // or some other plane idk
|
||||||
/// |> circle({ center = [0, 0], radius = 1 }, %, $tag1)
|
/// |> circle(center = [0, 0], radius = 1, tag = $tag1)
|
||||||
/// |> extrude(length = h)
|
/// |> extrude(length = h)
|
||||||
/// }
|
/// }
|
||||||
/// // The vase is 100 layers tall.
|
/// // The vase is 100 layers tall.
|
||||||
@ -303,7 +303,7 @@ async fn inner_pattern_transform<'a>(
|
|||||||
///
|
///
|
||||||
/// // Sketch 4 circles.
|
/// // Sketch 4 circles.
|
||||||
/// sketch001 = startSketchOn('XZ')
|
/// sketch001 = startSketchOn('XZ')
|
||||||
/// |> circle({ center: [0, 0], radius: 2 }, %)
|
/// |> circle(center= [0, 0], radius= 2)
|
||||||
/// |> patternTransform2d(instances = 4, transform = transform)
|
/// |> patternTransform2d(instances = 4, transform = transform)
|
||||||
/// ```
|
/// ```
|
||||||
#[stdlib {
|
#[stdlib {
|
||||||
@ -715,7 +715,7 @@ 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,
|
||||||
@ -821,11 +821,11 @@ pub async fn pattern_linear_3d(exec_state: &mut ExecState, args: Args) -> Result
|
|||||||
/// |> extrude(length = 65)
|
/// |> extrude(length = 65)
|
||||||
///
|
///
|
||||||
/// const thing1 = startSketchOn(case, 'end')
|
/// const thing1 = startSketchOn(case, 'end')
|
||||||
/// |> circle({center = [-size / 2, -size / 2], radius = 25}, %)
|
/// |> circle(center = [-size / 2, -size / 2], radius = 25)
|
||||||
/// |> extrude(length = 50)
|
/// |> extrude(length = 50)
|
||||||
///
|
///
|
||||||
/// const thing2 = startSketchOn(case, 'end')
|
/// const thing2 = startSketchOn(case, 'end')
|
||||||
/// |> circle({center = [size / 2, -size / 2], radius = 25}, %)
|
/// |> circle(center = [size / 2, -size / 2], radius = 25)
|
||||||
/// |> extrude(length = 50)
|
/// |> extrude(length = 50)
|
||||||
///
|
///
|
||||||
/// // We pass in the "case" here since we want to pattern the whole sketch.
|
/// // We pass in the "case" here since we want to pattern the whole sketch.
|
||||||
@ -849,7 +849,7 @@ pub async fn pattern_linear_3d(exec_state: &mut ExecState, args: Args) -> Result
|
|||||||
/// |> extrude(length = 65)
|
/// |> extrude(length = 65)
|
||||||
///
|
///
|
||||||
/// const thing1 = startSketchOn(case, 'end')
|
/// const thing1 = startSketchOn(case, 'end')
|
||||||
/// |> circle({ center =[-size / 2, -size / 2], radius = 25}, %)
|
/// |> circle(center =[-size / 2, -size / 2], radius = 25)
|
||||||
/// |> extrude(length = 50)
|
/// |> extrude(length = 50)
|
||||||
///
|
///
|
||||||
/// // We pass in `thing1` here with `useOriginal` since we want to pattern just this object on the face.
|
/// // We pass in `thing1` here with `useOriginal` since we want to pattern just this object on the face.
|
||||||
@ -1166,7 +1166,7 @@ pub async fn pattern_circular_3d(exec_state: &mut ExecState, args: Args) -> Resu
|
|||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// exampleSketch = startSketchOn('XZ')
|
/// exampleSketch = startSketchOn('XZ')
|
||||||
/// |> circle({ center = [0, 0], radius = 1 }, %)
|
/// |> circle(center = [0, 0], radius = 1)
|
||||||
///
|
///
|
||||||
/// example = extrude(exampleSketch, length = -5)
|
/// example = extrude(exampleSketch, length = -5)
|
||||||
/// |> patternCircular3d(
|
/// |> patternCircular3d(
|
||||||
|
@ -36,7 +36,7 @@ pub async fn offset_plane(exec_state: &mut ExecState, args: Args) -> Result<KclV
|
|||||||
/// |> close()
|
/// |> close()
|
||||||
///
|
///
|
||||||
/// circleSketch = startSketchOn(offsetPlane('XY', offset = 150))
|
/// circleSketch = startSketchOn(offsetPlane('XY', offset = 150))
|
||||||
/// |> circle({ center = [0, 100], radius = 50 }, %)
|
/// |> circle( center = [0, 100], radius = 50 )
|
||||||
///
|
///
|
||||||
/// loft([squareSketch, circleSketch])
|
/// loft([squareSketch, circleSketch])
|
||||||
/// ```
|
/// ```
|
||||||
@ -52,7 +52,7 @@ pub async fn offset_plane(exec_state: &mut ExecState, args: Args) -> Result<KclV
|
|||||||
/// |> close()
|
/// |> close()
|
||||||
///
|
///
|
||||||
/// circleSketch = startSketchOn(offsetPlane('XZ', offset = 150))
|
/// circleSketch = startSketchOn(offsetPlane('XZ', offset = 150))
|
||||||
/// |> circle({ center = [0, 100], radius = 50 }, %)
|
/// |> circle( center = [0, 100], radius = 50 )
|
||||||
///
|
///
|
||||||
/// loft([squareSketch, circleSketch])
|
/// loft([squareSketch, circleSketch])
|
||||||
/// ```
|
/// ```
|
||||||
@ -68,7 +68,7 @@ pub async fn offset_plane(exec_state: &mut ExecState, args: Args) -> Result<KclV
|
|||||||
/// |> close()
|
/// |> close()
|
||||||
///
|
///
|
||||||
/// circleSketch = startSketchOn(offsetPlane('YZ', offset = 150))
|
/// circleSketch = startSketchOn(offsetPlane('YZ', offset = 150))
|
||||||
/// |> circle({ center = [0, 100], radius = 50 }, %)
|
/// |> circle( center = [0, 100], radius = 50 )
|
||||||
///
|
///
|
||||||
/// loft([squareSketch, circleSketch])
|
/// loft([squareSketch, circleSketch])
|
||||||
/// ```
|
/// ```
|
||||||
@ -84,7 +84,7 @@ pub async fn offset_plane(exec_state: &mut ExecState, args: Args) -> Result<KclV
|
|||||||
/// |> close()
|
/// |> close()
|
||||||
///
|
///
|
||||||
/// circleSketch = startSketchOn(offsetPlane('-XZ', offset = -150))
|
/// circleSketch = startSketchOn(offsetPlane('-XZ', offset = -150))
|
||||||
/// |> circle({ center = [0, 100], radius = 50 }, %)
|
/// |> circle( center = [0, 100], radius = 50 )
|
||||||
///
|
///
|
||||||
/// loft([squareSketch, circleSketch])
|
/// loft([squareSketch, circleSketch])
|
||||||
/// ```
|
/// ```
|
||||||
@ -92,7 +92,7 @@ pub async fn offset_plane(exec_state: &mut ExecState, args: Args) -> Result<KclV
|
|||||||
/// // A circle on the XY plane
|
/// // A circle on the XY plane
|
||||||
/// startSketchOn("XY")
|
/// startSketchOn("XY")
|
||||||
/// |> startProfileAt([0, 0], %)
|
/// |> startProfileAt([0, 0], %)
|
||||||
/// |> circle({ radius = 10, center = [0, 0] }, %)
|
/// |> circle( radius = 10, center = [0, 0] )
|
||||||
///
|
///
|
||||||
/// // Triangle on the plane 4 units above
|
/// // Triangle on the plane 4 units above
|
||||||
/// startSketchOn(offsetPlane("XY", offset = 4))
|
/// startSketchOn(offsetPlane("XY", offset = 4))
|
||||||
|
@ -63,7 +63,7 @@ pub async fn revolve(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
|||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// // A donut shape.
|
/// // A donut shape.
|
||||||
/// sketch001 = startSketchOn('XY')
|
/// sketch001 = startSketchOn('XY')
|
||||||
/// |> circle({ center = [15, 0], radius = 5 }, %)
|
/// |> circle( center = [15, 0], radius = 5 )
|
||||||
/// |> revolve({
|
/// |> revolve({
|
||||||
/// angle = 360,
|
/// angle = 360,
|
||||||
/// axis = 'y'
|
/// axis = 'y'
|
||||||
@ -115,7 +115,7 @@ pub async fn revolve(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
|||||||
/// |> extrude(length = 20)
|
/// |> extrude(length = 20)
|
||||||
///
|
///
|
||||||
/// sketch001 = startSketchOn(box, "END")
|
/// sketch001 = startSketchOn(box, "END")
|
||||||
/// |> circle({ center = [10,10], radius = 4 }, %)
|
/// |> circle( center = [10,10], radius = 4 )
|
||||||
/// |> revolve({
|
/// |> revolve({
|
||||||
/// angle = -90,
|
/// angle = -90,
|
||||||
/// axis = 'y'
|
/// axis = 'y'
|
||||||
@ -132,7 +132,7 @@ pub async fn revolve(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
|||||||
/// |> extrude(length = 20)
|
/// |> extrude(length = 20)
|
||||||
///
|
///
|
||||||
/// sketch001 = startSketchOn(box, "END")
|
/// sketch001 = startSketchOn(box, "END")
|
||||||
/// |> circle({ center = [10,10], radius = 4 }, %)
|
/// |> circle( center = [10,10], radius = 4 )
|
||||||
/// |> revolve({
|
/// |> revolve({
|
||||||
/// angle = 90,
|
/// angle = 90,
|
||||||
/// axis = getOppositeEdge(revolveAxis)
|
/// axis = getOppositeEdge(revolveAxis)
|
||||||
@ -149,7 +149,7 @@ pub async fn revolve(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
|||||||
/// |> extrude(length = 20)
|
/// |> extrude(length = 20)
|
||||||
///
|
///
|
||||||
/// sketch001 = startSketchOn(box, "END")
|
/// sketch001 = startSketchOn(box, "END")
|
||||||
/// |> circle({ center = [10,10], radius = 4 }, %)
|
/// |> circle( center = [10,10], radius = 4 )
|
||||||
/// |> revolve({
|
/// |> revolve({
|
||||||
/// angle = 90,
|
/// angle = 90,
|
||||||
/// axis = getOppositeEdge(revolveAxis),
|
/// axis = getOppositeEdge(revolveAxis),
|
||||||
|
@ -34,7 +34,7 @@ pub async fn segment_end(exec_state: &mut ExecState, args: Args) -> Result<KclVa
|
|||||||
/// fn cylinder(radius, tag) {
|
/// fn cylinder(radius, tag) {
|
||||||
/// return startSketchOn('XY')
|
/// return startSketchOn('XY')
|
||||||
/// |> startProfileAt([0, 0], %)
|
/// |> startProfileAt([0, 0], %)
|
||||||
/// |> circle({ radius = radius, center = segEnd(tag) }, %)
|
/// |> circle(radius = radius, center = segEnd(tag) )
|
||||||
/// |> extrude(length = radius)
|
/// |> extrude(length = radius)
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
@ -170,7 +170,7 @@ pub async fn segment_start(exec_state: &mut ExecState, args: Args) -> Result<Kcl
|
|||||||
/// fn cylinder(radius, tag) {
|
/// fn cylinder(radius, tag) {
|
||||||
/// return startSketchOn('XY')
|
/// return startSketchOn('XY')
|
||||||
/// |> startProfileAt([0, 0], %)
|
/// |> startProfileAt([0, 0], %)
|
||||||
/// |> circle({ radius = radius, center = segStart(tag) }, %)
|
/// |> circle( radius = radius, center = segStart(tag) )
|
||||||
/// |> extrude(length = radius)
|
/// |> extrude(length = radius)
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
@ -536,7 +536,7 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
|
|||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// circSketch = startSketchOn("XY")
|
/// circSketch = startSketchOn("XY")
|
||||||
/// |> circle({ center: [0, 0], radius: 3 }, %, $circ)
|
/// |> circle( center= [0, 0], radius= 3 , tag= $circ)
|
||||||
///
|
///
|
||||||
/// triangleSketch = startSketchOn("XY")
|
/// triangleSketch = startSketchOn("XY")
|
||||||
/// |> startProfileAt([-5, 0], %)
|
/// |> startProfileAt([-5, 0], %)
|
||||||
|
@ -18,6 +18,7 @@ use crate::{
|
|||||||
execution::{BasePath, ExecState, GeoMeta, KclValue, Path, Sketch, SketchSurface},
|
execution::{BasePath, ExecState, GeoMeta, KclValue, Path, Sketch, SketchSurface},
|
||||||
parsing::ast::types::TagNode,
|
parsing::ast::types::TagNode,
|
||||||
std::{
|
std::{
|
||||||
|
sketch::NEW_TAG_KW,
|
||||||
utils::{calculate_circle_center, distance},
|
utils::{calculate_circle_center, distance},
|
||||||
Args,
|
Args,
|
||||||
},
|
},
|
||||||
@ -32,24 +33,14 @@ pub enum SketchOrSurface {
|
|||||||
Sketch(Box<Sketch>),
|
Sketch(Box<Sketch>),
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Data for drawing an circle
|
|
||||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
|
||||||
#[ts(export)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
// TODO: make sure the docs on the args below are correct.
|
|
||||||
pub struct CircleData {
|
|
||||||
/// The center of the circle.
|
|
||||||
pub center: [f64; 2],
|
|
||||||
/// The circle radius
|
|
||||||
pub radius: f64,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Sketch a circle.
|
/// Sketch a circle.
|
||||||
pub async fn circle(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
pub async fn circle(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
||||||
let (data, sketch_surface_or_group, tag): (CircleData, SketchOrSurface, Option<TagNode>) =
|
let sketch_or_surface = args.get_unlabeled_kw_arg("sketchOrSurface")?;
|
||||||
args.get_circle_args()?;
|
let center = args.get_kw_arg("center")?;
|
||||||
|
let radius = args.get_kw_arg("radius")?;
|
||||||
|
let tag = args.get_kw_arg_opt(NEW_TAG_KW)?;
|
||||||
|
|
||||||
let sketch = inner_circle(data, sketch_surface_or_group, tag, exec_state, args).await?;
|
let sketch = inner_circle(sketch_or_surface, center, radius, tag, exec_state, args).await?;
|
||||||
Ok(KclValue::Sketch {
|
Ok(KclValue::Sketch {
|
||||||
value: Box::new(sketch),
|
value: Box::new(sketch),
|
||||||
})
|
})
|
||||||
@ -60,7 +51,7 @@ pub async fn circle(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
|||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// exampleSketch = startSketchOn("-XZ")
|
/// exampleSketch = startSketchOn("-XZ")
|
||||||
/// |> circle({ center = [0, 0], radius = 10 }, %)
|
/// |> circle( center = [0, 0], radius = 10 )
|
||||||
///
|
///
|
||||||
/// example = extrude(exampleSketch, length = 5)
|
/// example = extrude(exampleSketch, length = 5)
|
||||||
/// ```
|
/// ```
|
||||||
@ -72,27 +63,36 @@ pub async fn circle(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
|||||||
/// |> line(end = [0, 30])
|
/// |> line(end = [0, 30])
|
||||||
/// |> line(end = [-30, 0])
|
/// |> line(end = [-30, 0])
|
||||||
/// |> close()
|
/// |> close()
|
||||||
/// |> hole(circle({ center = [0, 15], radius = 5 }, %), %)
|
/// |> hole(circle( center = [0, 15], radius = 5), %)
|
||||||
///
|
///
|
||||||
/// example = extrude(exampleSketch, length = 5)
|
/// example = extrude(exampleSketch, length = 5)
|
||||||
/// ```
|
/// ```
|
||||||
#[stdlib {
|
#[stdlib {
|
||||||
name = "circle",
|
name = "circle",
|
||||||
|
keywords = true,
|
||||||
|
unlabeled_first = true,
|
||||||
|
args = {
|
||||||
|
sketch_or_surface = {docs = "Plane or surface to sketch on."},
|
||||||
|
center = {docs = "The center of the circle."},
|
||||||
|
radius = {docs = "The radius of the circle."},
|
||||||
|
tag = { docs = "Create a new tag which refers to this circle"},
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
async fn inner_circle(
|
async fn inner_circle(
|
||||||
data: CircleData,
|
sketch_or_surface: SketchOrSurface,
|
||||||
sketch_surface_or_group: SketchOrSurface,
|
center: [f64; 2],
|
||||||
|
radius: f64,
|
||||||
tag: Option<TagNode>,
|
tag: Option<TagNode>,
|
||||||
exec_state: &mut ExecState,
|
exec_state: &mut ExecState,
|
||||||
args: Args,
|
args: Args,
|
||||||
) -> Result<Sketch, KclError> {
|
) -> Result<Sketch, KclError> {
|
||||||
let sketch_surface = match sketch_surface_or_group {
|
let sketch_surface = match sketch_or_surface {
|
||||||
SketchOrSurface::SketchSurface(surface) => surface,
|
SketchOrSurface::SketchSurface(surface) => surface,
|
||||||
SketchOrSurface::Sketch(group) => group.on,
|
SketchOrSurface::Sketch(s) => s.on,
|
||||||
};
|
};
|
||||||
let units = sketch_surface.units();
|
let units = sketch_surface.units();
|
||||||
let sketch = crate::std::sketch::inner_start_profile_at(
|
let sketch = crate::std::sketch::inner_start_profile_at(
|
||||||
[data.center[0] + data.radius, data.center[1]],
|
[center[0] + radius, center[1]],
|
||||||
sketch_surface,
|
sketch_surface,
|
||||||
None,
|
None,
|
||||||
exec_state,
|
exec_state,
|
||||||
@ -100,7 +100,7 @@ async fn inner_circle(
|
|||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
let from = [data.center[0] + data.radius, data.center[1]];
|
let from = [center[0] + radius, center[1]];
|
||||||
let angle_start = Angle::zero();
|
let angle_start = Angle::zero();
|
||||||
let angle_end = Angle::turn();
|
let angle_end = Angle::turn();
|
||||||
|
|
||||||
@ -113,8 +113,8 @@ async fn inner_circle(
|
|||||||
segment: PathSegment::Arc {
|
segment: PathSegment::Arc {
|
||||||
start: angle_start,
|
start: angle_start,
|
||||||
end: angle_end,
|
end: angle_end,
|
||||||
center: KPoint2d::from(data.center).map(LengthUnit),
|
center: KPoint2d::from(center).map(LengthUnit),
|
||||||
radius: data.radius.into(),
|
radius: radius.into(),
|
||||||
relative: false,
|
relative: false,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
@ -132,8 +132,8 @@ async fn inner_circle(
|
|||||||
metadata: args.source_range.into(),
|
metadata: args.source_range.into(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
radius: data.radius,
|
radius,
|
||||||
center: data.center,
|
center,
|
||||||
ccw: angle_start < angle_end,
|
ccw: angle_start < angle_end,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -109,11 +109,11 @@ pub async fn shell(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
|
|||||||
/// |> extrude(length = 65)
|
/// |> extrude(length = 65)
|
||||||
///
|
///
|
||||||
/// thing1 = startSketchOn(case, 'end')
|
/// thing1 = startSketchOn(case, 'end')
|
||||||
/// |> circle({ center = [-size / 2, -size / 2], radius = 25 }, %)
|
/// |> circle( center = [-size / 2, -size / 2], radius = 25 )
|
||||||
/// |> extrude(length = 50)
|
/// |> extrude(length = 50)
|
||||||
///
|
///
|
||||||
/// thing2 = startSketchOn(case, 'end')
|
/// thing2 = startSketchOn(case, 'end')
|
||||||
/// |> circle({ center = [size / 2, -size / 2], radius = 25 }, %)
|
/// |> circle( center = [size / 2, -size / 2], radius = 25 )
|
||||||
/// |> extrude(length = 50)
|
/// |> extrude(length = 50)
|
||||||
///
|
///
|
||||||
/// // We put "case" in the shell function to shell the entire object.
|
/// // We put "case" in the shell function to shell the entire object.
|
||||||
@ -132,11 +132,11 @@ pub async fn shell(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
|
|||||||
/// |> extrude(length = 65)
|
/// |> extrude(length = 65)
|
||||||
///
|
///
|
||||||
/// thing1 = startSketchOn(case, 'end')
|
/// thing1 = startSketchOn(case, 'end')
|
||||||
/// |> circle({ center = [-size / 2, -size / 2], radius = 25 }, %)
|
/// |> circle( center = [-size / 2, -size / 2], radius = 25 )
|
||||||
/// |> extrude(length = 50)
|
/// |> extrude(length = 50)
|
||||||
///
|
///
|
||||||
/// thing2 = startSketchOn(case, 'end')
|
/// thing2 = startSketchOn(case, 'end')
|
||||||
/// |> circle({ center = [size / 2, -size / 2], radius = 25 }, %)
|
/// |> circle( center = [size / 2, -size / 2], radius = 25 )
|
||||||
/// |> extrude(length = 50)
|
/// |> extrude(length = 50)
|
||||||
///
|
///
|
||||||
/// // We put "thing1" in the shell function to shell the end face of the object.
|
/// // We put "thing1" in the shell function to shell the end face of the object.
|
||||||
@ -157,11 +157,11 @@ pub async fn shell(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
|
|||||||
/// |> extrude(length = 65)
|
/// |> extrude(length = 65)
|
||||||
///
|
///
|
||||||
/// thing1 = startSketchOn(case, 'end')
|
/// thing1 = startSketchOn(case, 'end')
|
||||||
/// |> circle({ center = [-size / 2, -size / 2], radius = 25 }, %)
|
/// |> circle( center = [-size / 2, -size / 2], radius = 25 )
|
||||||
/// |> extrude(length = 50)
|
/// |> extrude(length = 50)
|
||||||
///
|
///
|
||||||
/// thing2 = startSketchOn(case, 'end')
|
/// thing2 = startSketchOn(case, 'end')
|
||||||
/// |> circle({ center = [size / 2, -size / 2], radius = 25 }, %)
|
/// |> circle( center = [size / 2, -size / 2], radius = 25)
|
||||||
/// |> extrude(length = 50)
|
/// |> extrude(length = 50)
|
||||||
///
|
///
|
||||||
/// // We put "thing1" and "thing2" in the shell function to shell the end face of the object.
|
/// // We put "thing1" and "thing2" in the shell function to shell the end face of the object.
|
||||||
@ -293,11 +293,11 @@ pub async fn hollow(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
|||||||
/// |> extrude(length = 65)
|
/// |> extrude(length = 65)
|
||||||
///
|
///
|
||||||
/// thing1 = startSketchOn(case, 'end')
|
/// thing1 = startSketchOn(case, 'end')
|
||||||
/// |> circle({ center = [-size / 2, -size / 2], radius = 25 }, %)
|
/// |> circle( center = [-size / 2, -size / 2], radius = 25 )
|
||||||
/// |> extrude(length = 50)
|
/// |> extrude(length = 50)
|
||||||
///
|
///
|
||||||
/// thing2 = startSketchOn(case, 'end')
|
/// thing2 = startSketchOn(case, 'end')
|
||||||
/// |> circle({ center = [size / 2, -size / 2], radius = 25 }, %)
|
/// |> circle( center = [size / 2, -size / 2], radius = 25 )
|
||||||
/// |> extrude(length = 50)
|
/// |> extrude(length = 50)
|
||||||
///
|
///
|
||||||
/// hollow(0.5, case)
|
/// hollow(0.5, case)
|
||||||
|
@ -2273,8 +2273,8 @@ pub async fn hole(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
|
|||||||
/// |> line(end = [5, 0])
|
/// |> line(end = [5, 0])
|
||||||
/// |> line(end = [0, -5])
|
/// |> line(end = [0, -5])
|
||||||
/// |> close()
|
/// |> close()
|
||||||
/// |> hole(circle({ center = [1, 1], radius = .25 }, %), %)
|
/// |> hole(circle( center = [1, 1], radius = .25 ), %)
|
||||||
/// |> hole(circle({ center = [1, 4], radius = .25 }, %), %)
|
/// |> hole(circle( center = [1, 4], radius = .25 ), %)
|
||||||
///
|
///
|
||||||
/// example = extrude(exampleSketch, length = 1)
|
/// example = extrude(exampleSketch, length = 1)
|
||||||
/// ```
|
/// ```
|
||||||
@ -2291,7 +2291,7 @@ pub async fn hole(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
|
|||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// exampleSketch = startSketchOn(-XZ)
|
/// exampleSketch = startSketchOn(-XZ)
|
||||||
/// |> circle({ center = [0, 0], radius = 3 }, %)
|
/// |> circle( center = [0, 0], radius = 3 )
|
||||||
/// |> hole(squareHoleSketch(), %)
|
/// |> hole(squareHoleSketch(), %)
|
||||||
/// example = extrude(exampleSketch, length = 1)
|
/// example = extrude(exampleSketch, length = 1)
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -61,16 +61,16 @@ pub async fn sweep(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
|
|||||||
///
|
///
|
||||||
/// // Create a hole for the pipe.
|
/// // Create a hole for the pipe.
|
||||||
/// pipeHole = startSketchOn('XY')
|
/// pipeHole = startSketchOn('XY')
|
||||||
/// |> circle({
|
/// |> circle(
|
||||||
/// center = [0, 0],
|
/// center = [0, 0],
|
||||||
/// radius = 1.5,
|
/// radius = 1.5,
|
||||||
/// }, %)
|
/// )
|
||||||
///
|
///
|
||||||
/// sweepSketch = startSketchOn('XY')
|
/// sweepSketch = startSketchOn('XY')
|
||||||
/// |> circle({
|
/// |> circle(
|
||||||
/// center = [0, 0],
|
/// center = [0, 0],
|
||||||
/// radius = 2,
|
/// radius = 2,
|
||||||
/// }, %)
|
/// )
|
||||||
/// |> hole(pipeHole, %)
|
/// |> hole(pipeHole, %)
|
||||||
/// |> sweep(path = sweepPath)
|
/// |> sweep(path = sweepPath)
|
||||||
/// ```
|
/// ```
|
||||||
@ -91,7 +91,7 @@ pub async fn sweep(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
|
|||||||
///
|
///
|
||||||
/// // Create a spring by sweeping around the helix path.
|
/// // Create a spring by sweeping around the helix path.
|
||||||
/// springSketch = startSketchOn('YZ')
|
/// springSketch = startSketchOn('YZ')
|
||||||
/// |> circle({ center = [0, 0], radius = 1 }, %)
|
/// |> circle( center = [0, 0], radius = 1)
|
||||||
/// |> sweep(path = helixPath)
|
/// |> sweep(path = helixPath)
|
||||||
/// ```
|
/// ```
|
||||||
#[stdlib {
|
#[stdlib {
|
||||||
|
@ -57,16 +57,16 @@ pub async fn scale(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
|
|||||||
///
|
///
|
||||||
/// // Create a hole for the pipe.
|
/// // Create a hole for the pipe.
|
||||||
/// pipeHole = startSketchOn('XY')
|
/// pipeHole = startSketchOn('XY')
|
||||||
/// |> circle({
|
/// |> circle(
|
||||||
/// center = [0, 0],
|
/// center = [0, 0],
|
||||||
/// radius = 1.5,
|
/// radius = 1.5,
|
||||||
/// }, %)
|
/// )
|
||||||
///
|
///
|
||||||
/// sweepSketch = startSketchOn('XY')
|
/// sweepSketch = startSketchOn('XY')
|
||||||
/// |> circle({
|
/// |> circle(
|
||||||
/// center = [0, 0],
|
/// center = [0, 0],
|
||||||
/// radius = 2,
|
/// radius = 2,
|
||||||
/// }, %)
|
/// )
|
||||||
/// |> hole(pipeHole, %)
|
/// |> hole(pipeHole, %)
|
||||||
/// |> sweep(path = sweepPath)
|
/// |> sweep(path = sweepPath)
|
||||||
/// |> scale(
|
/// |> scale(
|
||||||
@ -150,16 +150,16 @@ pub async fn translate(exec_state: &mut ExecState, args: Args) -> Result<KclValu
|
|||||||
///
|
///
|
||||||
/// // Create a hole for the pipe.
|
/// // Create a hole for the pipe.
|
||||||
/// pipeHole = startSketchOn('XY')
|
/// pipeHole = startSketchOn('XY')
|
||||||
/// |> circle({
|
/// |> circle(
|
||||||
/// center = [0, 0],
|
/// center = [0, 0],
|
||||||
/// radius = 1.5,
|
/// radius = 1.5,
|
||||||
/// }, %)
|
/// )
|
||||||
///
|
///
|
||||||
/// sweepSketch = startSketchOn('XY')
|
/// sweepSketch = startSketchOn('XY')
|
||||||
/// |> circle({
|
/// |> circle(
|
||||||
/// center = [0, 0],
|
/// center = [0, 0],
|
||||||
/// radius = 2,
|
/// radius = 2,
|
||||||
/// }, %)
|
/// )
|
||||||
/// |> hole(pipeHole, %)
|
/// |> hole(pipeHole, %)
|
||||||
/// |> sweep(path = sweepPath)
|
/// |> sweep(path = sweepPath)
|
||||||
/// |> translate(
|
/// |> translate(
|
||||||
@ -369,16 +369,16 @@ pub async fn rotate(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
|||||||
///
|
///
|
||||||
/// // Create a hole for the pipe.
|
/// // Create a hole for the pipe.
|
||||||
/// pipeHole = startSketchOn('XY')
|
/// pipeHole = startSketchOn('XY')
|
||||||
/// |> circle({
|
/// |> circle(
|
||||||
/// center = [0, 0],
|
/// center = [0, 0],
|
||||||
/// radius = 1.5,
|
/// radius = 1.5,
|
||||||
/// }, %)
|
/// )
|
||||||
///
|
///
|
||||||
/// sweepSketch = startSketchOn('XY')
|
/// sweepSketch = startSketchOn('XY')
|
||||||
/// |> circle({
|
/// |> circle(
|
||||||
/// center = [0, 0],
|
/// center = [0, 0],
|
||||||
/// radius = 2,
|
/// radius = 2,
|
||||||
/// }, %)
|
/// )
|
||||||
/// |> hole(pipeHole, %)
|
/// |> hole(pipeHole, %)
|
||||||
/// |> sweep(path = sweepPath)
|
/// |> sweep(path = sweepPath)
|
||||||
/// |> rotate(
|
/// |> rotate(
|
||||||
@ -408,16 +408,16 @@ pub async fn rotate(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
|||||||
///
|
///
|
||||||
/// // Create a hole for the pipe.
|
/// // Create a hole for the pipe.
|
||||||
/// pipeHole = startSketchOn('XY')
|
/// pipeHole = startSketchOn('XY')
|
||||||
/// |> circle({
|
/// |> circle(
|
||||||
/// center = [0, 0],
|
/// center = [0, 0],
|
||||||
/// radius = 1.5,
|
/// radius = 1.5,
|
||||||
/// }, %)
|
/// )
|
||||||
///
|
///
|
||||||
/// sweepSketch = startSketchOn('XY')
|
/// sweepSketch = startSketchOn('XY')
|
||||||
/// |> circle({
|
/// |> circle(
|
||||||
/// center = [0, 0],
|
/// center = [0, 0],
|
||||||
/// radius = 2,
|
/// radius = 2,
|
||||||
/// }, %)
|
/// )
|
||||||
/// |> hole(pipeHole, %)
|
/// |> hole(pipeHole, %)
|
||||||
/// |> sweep(path = sweepPath)
|
/// |> sweep(path = sweepPath)
|
||||||
/// |> rotate(
|
/// |> rotate(
|
||||||
@ -527,15 +527,15 @@ mod tests {
|
|||||||
|
|
||||||
// Create a hole for the pipe.
|
// Create a hole for the pipe.
|
||||||
pipeHole = startSketchOn('XY')
|
pipeHole = startSketchOn('XY')
|
||||||
|> circle({
|
|> circle(
|
||||||
center = [0, 0],
|
center = [0, 0],
|
||||||
radius = 1.5,
|
radius = 1.5,
|
||||||
}, %)
|
)
|
||||||
sweepSketch = startSketchOn('XY')
|
sweepSketch = startSketchOn('XY')
|
||||||
|> circle({
|
|> circle(
|
||||||
center = [0, 0],
|
center = [0, 0],
|
||||||
radius = 2,
|
radius = 2,
|
||||||
}, %)
|
)
|
||||||
|> hole(pipeHole, %)
|
|> hole(pipeHole, %)
|
||||||
|> sweep(
|
|> sweep(
|
||||||
path = sweepPath,
|
path = sweepPath,
|
||||||
@ -550,8 +550,8 @@ sweepSketch = startSketchOn('XY')
|
|||||||
let result = parse_execute(&ast).await;
|
let result = parse_execute(&ast).await;
|
||||||
assert!(result.is_err());
|
assert!(result.is_err());
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
result.unwrap_err().to_string(),
|
result.unwrap_err().message(),
|
||||||
r#"semantic: KclErrorDetails { source_ranges: [SourceRange([630, 638, 0])], message: "Expected `roll`, `pitch`, and `yaw` or `axis` and `angle` to be provided." }"#.to_string()
|
r#"Expected `roll`, `pitch`, and `yaw` or `axis` and `angle` to be provided."#.to_string()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -566,8 +566,8 @@ sweepSketch = startSketchOn('XY')
|
|||||||
let result = parse_execute(&ast).await;
|
let result = parse_execute(&ast).await;
|
||||||
assert!(result.is_err());
|
assert!(result.is_err());
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
result.unwrap_err().to_string(),
|
result.unwrap_err().message(),
|
||||||
r#"semantic: KclErrorDetails { source_ranges: [SourceRange([630, 668, 0])], message: "Expected `angle` to be provided when `axis` is provided." }"#.to_string()
|
r#"Expected `angle` to be provided when `axis` is provided."#.to_string()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -582,8 +582,8 @@ sweepSketch = startSketchOn('XY')
|
|||||||
let result = parse_execute(&ast).await;
|
let result = parse_execute(&ast).await;
|
||||||
assert!(result.is_err());
|
assert!(result.is_err());
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
result.unwrap_err().to_string(),
|
result.unwrap_err().message(),
|
||||||
r#"semantic: KclErrorDetails { source_ranges: [SourceRange([630, 659, 0])], message: "Expected `axis` to be provided when `angle` is provided." }"#.to_string()
|
r#"Expected `axis` to be provided when `angle` is provided."#.to_string()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -599,8 +599,8 @@ sweepSketch = startSketchOn('XY')
|
|||||||
let result = parse_execute(&ast).await;
|
let result = parse_execute(&ast).await;
|
||||||
assert!(result.is_err());
|
assert!(result.is_err());
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
result.unwrap_err().to_string(),
|
result.unwrap_err().message(),
|
||||||
r#"semantic: KclErrorDetails { source_ranges: [SourceRange([630, 685, 0])], message: "Expected angle to be between -360 and 360, found `900`" }"#.to_string()
|
r#"Expected angle to be between -360 and 360, found `900`"#.to_string()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -617,8 +617,8 @@ sweepSketch = startSketchOn('XY')
|
|||||||
let result = parse_execute(&ast).await;
|
let result = parse_execute(&ast).await;
|
||||||
assert!(result.is_err());
|
assert!(result.is_err());
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
result.unwrap_err().to_string(),
|
result.unwrap_err().message(),
|
||||||
r#"semantic: KclErrorDetails { source_ranges: [SourceRange([630, 697, 0])], message: "Expected `roll` to be provided when `pitch` or `yaw` is provided." }"#.to_string()
|
r#"Expected `roll` to be provided when `pitch` or `yaw` is provided."#.to_string()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -633,8 +633,8 @@ sweepSketch = startSketchOn('XY')
|
|||||||
let result = parse_execute(&ast).await;
|
let result = parse_execute(&ast).await;
|
||||||
assert!(result.is_err());
|
assert!(result.is_err());
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
result.unwrap_err().to_string(),
|
result.unwrap_err().message(),
|
||||||
r#"semantic: KclErrorDetails { source_ranges: [SourceRange([630, 657, 0])], message: "Expected `roll` to be provided when `pitch` or `yaw` is provided." }"#.to_string()
|
r#"Expected `roll` to be provided when `pitch` or `yaw` is provided."#.to_string()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -651,8 +651,8 @@ sweepSketch = startSketchOn('XY')
|
|||||||
let result = parse_execute(&ast).await;
|
let result = parse_execute(&ast).await;
|
||||||
assert!(result.is_err());
|
assert!(result.is_err());
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
result.unwrap_err().to_string(),
|
result.unwrap_err().message(),
|
||||||
r#"semantic: KclErrorDetails { source_ranges: [SourceRange([630, 689, 0])], message: "Expected yaw to be between -360 and 360, found `900`" }"#.to_string()
|
r#"Expected yaw to be between -360 and 360, found `900`"#.to_string()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -669,8 +669,8 @@ sweepSketch = startSketchOn('XY')
|
|||||||
let result = parse_execute(&ast).await;
|
let result = parse_execute(&ast).await;
|
||||||
assert!(result.is_err());
|
assert!(result.is_err());
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
result.unwrap_err().to_string(),
|
result.unwrap_err().message(),
|
||||||
r#"semantic: KclErrorDetails { source_ranges: [SourceRange([630, 689, 0])], message: "Expected roll to be between -360 and 360, found `900`" }"#.to_string()
|
r#"Expected roll to be between -360 and 360, found `900`"#.to_string()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -687,8 +687,8 @@ sweepSketch = startSketchOn('XY')
|
|||||||
let result = parse_execute(&ast).await;
|
let result = parse_execute(&ast).await;
|
||||||
assert!(result.is_err());
|
assert!(result.is_err());
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
result.unwrap_err().to_string(),
|
result.unwrap_err().message(),
|
||||||
r#"semantic: KclErrorDetails { source_ranges: [SourceRange([630, 689, 0])], message: "Expected pitch to be between -360 and 360, found `900`" }"#.to_string()
|
r#"Expected pitch to be between -360 and 360, found `900`"#.to_string()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -706,8 +706,9 @@ sweepSketch = startSketchOn('XY')
|
|||||||
let result = parse_execute(&ast).await;
|
let result = parse_execute(&ast).await;
|
||||||
assert!(result.is_err());
|
assert!(result.is_err());
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
result.unwrap_err().to_string(),
|
result.unwrap_err().message(),
|
||||||
r#"semantic: KclErrorDetails { source_ranges: [SourceRange([630, 704, 0])], message: "Expected `axis` and `angle` to not be provided when `roll`, `pitch`, and `yaw` are provided." }"#.to_string()
|
r#"Expected `axis` and `angle` to not be provided when `roll`, `pitch`, and `yaw` are provided."#
|
||||||
|
.to_string()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1481,13 +1481,13 @@ tabs_r = startSketchOn({
|
|||||||
|> line([0, -10], %)
|
|> line([0, -10], %)
|
||||||
|> line([-10, -5], %)
|
|> line([-10, -5], %)
|
||||||
|> close()
|
|> close()
|
||||||
|> hole(circle({
|
|> hole(circle(
|
||||||
center = [
|
center = [
|
||||||
width / 2 + thk + hole_diam,
|
width / 2 + thk + hole_diam,
|
||||||
length / 2 - hole_diam
|
length / 2 - hole_diam
|
||||||
],
|
],
|
||||||
radius = hole_diam / 2
|
radius = hole_diam / 2
|
||||||
}, %), %)
|
), %)
|
||||||
|> extrude(-thk, %)
|
|> extrude(-thk, %)
|
||||||
|> patternLinear3d(
|
|> patternLinear3d(
|
||||||
axis = [0, -1, 0],
|
axis = [0, -1, 0],
|
||||||
@ -1508,13 +1508,13 @@ tabs_l = startSketchOn({
|
|||||||
|> line([0, -10], %)
|
|> line([0, -10], %)
|
||||||
|> line([10, -5], %)
|
|> line([10, -5], %)
|
||||||
|> close()
|
|> close()
|
||||||
|> hole(circle({
|
|> hole(circle(
|
||||||
center = [
|
center = [
|
||||||
-width / 2 - thk - hole_diam,
|
-width / 2 - thk - hole_diam,
|
||||||
length / 2 - hole_diam
|
length / 2 - hole_diam
|
||||||
],
|
],
|
||||||
radius = hole_diam / 2
|
radius = hole_diam / 2
|
||||||
}, %), %)
|
), %)
|
||||||
|> extrude(-thk, %)
|
|> extrude(-thk, %)
|
||||||
|> patternLinear3d(axis = [0, -1, 0], repetitions = 1, distance = length - 10)
|
|> patternLinear3d(axis = [0, -1, 0], repetitions = 1, distance = length - 10)
|
||||||
"#;
|
"#;
|
||||||
@ -1602,13 +1602,13 @@ tabs_r = startSketchOn({
|
|||||||
|> line([0, -10], %)
|
|> line([0, -10], %)
|
||||||
|> line([-10, -5], %)
|
|> line([-10, -5], %)
|
||||||
|> close()
|
|> close()
|
||||||
|> hole(circle({
|
|> hole(circle(
|
||||||
center = [
|
center = [
|
||||||
width / 2 + thk + hole_diam,
|
width / 2 + thk + hole_diam,
|
||||||
length / 2 - hole_diam
|
length / 2 - hole_diam
|
||||||
],
|
],
|
||||||
radius = hole_diam / 2
|
radius = hole_diam / 2,
|
||||||
}, %), %)
|
), %)
|
||||||
|> extrude(-thk, %)
|
|> extrude(-thk, %)
|
||||||
|> patternLinear3d(axis = [0, -1, 0], repetitions = 1, distance = length - 10)
|
|> patternLinear3d(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)
|
||||||
@ -1625,13 +1625,13 @@ tabs_l = startSketchOn({
|
|||||||
|> line([0, -10], %)
|
|> line([0, -10], %)
|
||||||
|> line([10, -5], %)
|
|> line([10, -5], %)
|
||||||
|> close()
|
|> close()
|
||||||
|> hole(circle({
|
|> hole(circle(
|
||||||
center = [
|
center = [
|
||||||
-width / 2 - thk - hole_diam,
|
-width / 2 - thk - hole_diam,
|
||||||
length / 2 - hole_diam
|
length / 2 - hole_diam
|
||||||
],
|
],
|
||||||
radius = hole_diam / 2
|
radius = hole_diam / 2,
|
||||||
}, %), %)
|
), %)
|
||||||
|> extrude(-thk, %)
|
|> extrude(-thk, %)
|
||||||
|> patternLinear3d(axis = [0, -1, 0], repetitions = 1, distance = length - 10)
|
|> patternLinear3d(axis = [0, -1, 0], repetitions = 1, distance = length - 10)
|
||||||
"#
|
"#
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/// circumference = 70
|
/// circumference = 70
|
||||||
///
|
///
|
||||||
/// exampleSketch = startSketchOn("XZ")
|
/// exampleSketch = startSketchOn("XZ")
|
||||||
/// |> circle({ center = [0, 0], radius = circumference/ (2 * PI) }, %)
|
/// |> circle(center = [0, 0], radius = circumference/ (2 * PI))
|
||||||
///
|
///
|
||||||
/// example = extrude(exampleSketch, length = 5)
|
/// example = extrude(exampleSketch, length = 5)
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -338,7 +338,7 @@ description: Artifact commands assembly_non_default_units.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
197,
|
197,
|
||||||
239,
|
232,
|
||||||
3
|
3
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -358,7 +358,7 @@ description: Artifact commands assembly_non_default_units.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
197,
|
197,
|
||||||
239,
|
232,
|
||||||
3
|
3
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -369,7 +369,7 @@ description: Artifact commands assembly_non_default_units.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
197,
|
197,
|
||||||
239,
|
232,
|
||||||
3
|
3
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -386,7 +386,7 @@ description: Artifact commands assembly_non_default_units.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
197,
|
197,
|
||||||
239,
|
232,
|
||||||
3
|
3
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -415,7 +415,7 @@ description: Artifact commands assembly_non_default_units.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
197,
|
197,
|
||||||
239,
|
232,
|
||||||
3
|
3
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -468,7 +468,7 @@ description: Artifact commands assembly_non_default_units.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
114,
|
114,
|
||||||
156,
|
149,
|
||||||
4
|
4
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -488,7 +488,7 @@ description: Artifact commands assembly_non_default_units.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
114,
|
114,
|
||||||
156,
|
149,
|
||||||
4
|
4
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -499,7 +499,7 @@ description: Artifact commands assembly_non_default_units.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
114,
|
114,
|
||||||
156,
|
149,
|
||||||
4
|
4
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -516,7 +516,7 @@ description: Artifact commands assembly_non_default_units.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
114,
|
114,
|
||||||
156,
|
149,
|
||||||
4
|
4
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -545,7 +545,7 @@ description: Artifact commands assembly_non_default_units.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
114,
|
114,
|
||||||
156,
|
149,
|
||||||
4
|
4
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
```mermaid
|
```mermaid
|
||||||
flowchart LR
|
flowchart LR
|
||||||
subgraph path2 [Path]
|
subgraph path2 [Path]
|
||||||
2["Path<br>[197, 239, 3]"]
|
2["Path<br>[197, 232, 3]"]
|
||||||
3["Segment<br>[197, 239, 3]"]
|
3["Segment<br>[197, 232, 3]"]
|
||||||
4[Solid2d]
|
4[Solid2d]
|
||||||
end
|
end
|
||||||
subgraph path6 [Path]
|
subgraph path6 [Path]
|
||||||
6["Path<br>[114, 156, 4]"]
|
6["Path<br>[114, 149, 4]"]
|
||||||
7["Segment<br>[114, 156, 4]"]
|
7["Segment<br>[114, 149, 4]"]
|
||||||
8[Solid2d]
|
8[Solid2d]
|
||||||
end
|
end
|
||||||
1["Plane<br>[172, 191, 3]"]
|
1["Plane<br>[172, 191, 3]"]
|
||||||
|
@ -5,4 +5,4 @@ import radius from "globals.kcl"
|
|||||||
|
|
||||||
// Use the same units as in the main importing file.
|
// Use the same units as in the main importing file.
|
||||||
startSketchOn('XZ')
|
startSketchOn('XZ')
|
||||||
|> circle({ center = [0, 0], radius = 1 }, %)
|
|> circle(center = [0, 0], radius = 1)
|
||||||
|
@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Use the same units as in the main importing file.
|
// Use the same units as in the main importing file.
|
||||||
startSketchOn('XZ')
|
startSketchOn('XZ')
|
||||||
|> circle({ center = [0, 2], radius = 1 }, %)
|
|> circle(center = [0, 2], radius = 1)
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
source: kcl/src/simulation_tests.rs
|
source: kcl/src/simulation_tests.rs
|
||||||
description: Artifact commands fillet-and-shell.kcl
|
description: Artifact commands fillet-and-shell.kcl
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@ -927,7 +926,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1370,
|
1370,
|
||||||
1414,
|
1407,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -947,7 +946,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1370,
|
1370,
|
||||||
1414,
|
1407,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -958,7 +957,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1370,
|
1370,
|
||||||
1414,
|
1407,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -975,7 +974,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1370,
|
1370,
|
||||||
1414,
|
1407,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1004,7 +1003,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1370,
|
1370,
|
||||||
1414,
|
1407,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1015,8 +1014,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1035,8 +1034,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1046,8 +1045,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1063,8 +1062,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1092,8 +1091,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1104,8 +1103,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1422,
|
1415,
|
||||||
1476,
|
1462,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1117,8 +1116,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1422,
|
1415,
|
||||||
1476,
|
1462,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1130,8 +1129,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1150,8 +1149,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1164,8 +1163,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1175,8 +1174,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1187,8 +1186,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1200,8 +1199,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1214,8 +1213,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1228,8 +1227,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1242,8 +1241,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1334,7 +1333,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1370,
|
1370,
|
||||||
1414,
|
1407,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1354,7 +1353,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1370,
|
1370,
|
||||||
1414,
|
1407,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1365,7 +1364,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1370,
|
1370,
|
||||||
1414,
|
1407,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1382,7 +1381,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1370,
|
1370,
|
||||||
1414,
|
1407,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1411,7 +1410,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1370,
|
1370,
|
||||||
1414,
|
1407,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1422,8 +1421,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1442,8 +1441,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1453,8 +1452,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1470,8 +1469,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1499,8 +1498,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1511,8 +1510,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1422,
|
1415,
|
||||||
1476,
|
1462,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1524,8 +1523,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1422,
|
1415,
|
||||||
1476,
|
1462,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1537,8 +1536,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1557,8 +1556,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1571,8 +1570,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1582,8 +1581,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1594,8 +1593,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1607,8 +1606,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1621,8 +1620,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1635,8 +1634,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1649,8 +1648,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1741,7 +1740,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1370,
|
1370,
|
||||||
1414,
|
1407,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1761,7 +1760,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1370,
|
1370,
|
||||||
1414,
|
1407,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1772,7 +1771,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1370,
|
1370,
|
||||||
1414,
|
1407,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1789,7 +1788,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1370,
|
1370,
|
||||||
1414,
|
1407,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1818,7 +1817,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1370,
|
1370,
|
||||||
1414,
|
1407,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1829,8 +1828,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1849,8 +1848,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1860,8 +1859,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1877,8 +1876,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1906,8 +1905,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1918,8 +1917,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1422,
|
1415,
|
||||||
1476,
|
1462,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1931,8 +1930,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1422,
|
1415,
|
||||||
1476,
|
1462,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1944,8 +1943,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1964,8 +1963,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1978,8 +1977,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -1989,8 +1988,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2001,8 +2000,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2014,8 +2013,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2028,8 +2027,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2042,8 +2041,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2056,8 +2055,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2148,7 +2147,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1370,
|
1370,
|
||||||
1414,
|
1407,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2168,7 +2167,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1370,
|
1370,
|
||||||
1414,
|
1407,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2179,7 +2178,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1370,
|
1370,
|
||||||
1414,
|
1407,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2196,7 +2195,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1370,
|
1370,
|
||||||
1414,
|
1407,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2225,7 +2224,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1370,
|
1370,
|
||||||
1414,
|
1407,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2236,8 +2235,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2256,8 +2255,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2267,8 +2266,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2284,8 +2283,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2313,8 +2312,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2325,8 +2324,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1422,
|
1415,
|
||||||
1476,
|
1462,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2338,8 +2337,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1422,
|
1415,
|
||||||
1476,
|
1462,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2351,8 +2350,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2371,8 +2370,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2385,8 +2384,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2396,8 +2395,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2408,8 +2407,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2421,8 +2420,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2435,8 +2434,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2449,8 +2448,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2463,8 +2462,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -2541,8 +2540,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
2043,
|
2029,
|
||||||
2098,
|
2084,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
|
@ -20,52 +20,52 @@ flowchart LR
|
|||||||
31["Path<br>[1337, 1362, 0]"]
|
31["Path<br>[1337, 1362, 0]"]
|
||||||
end
|
end
|
||||||
subgraph path32 [Path]
|
subgraph path32 [Path]
|
||||||
32["Path<br>[1370, 1414, 0]"]
|
32["Path<br>[1370, 1407, 0]"]
|
||||||
33["Segment<br>[1370, 1414, 0]"]
|
33["Segment<br>[1370, 1407, 0]"]
|
||||||
34[Solid2d]
|
34[Solid2d]
|
||||||
end
|
end
|
||||||
subgraph path35 [Path]
|
subgraph path35 [Path]
|
||||||
35["Path<br>[1427, 1472, 0]"]
|
35["Path<br>[1420, 1458, 0]"]
|
||||||
36["Segment<br>[1427, 1472, 0]"]
|
36["Segment<br>[1420, 1458, 0]"]
|
||||||
37[Solid2d]
|
37[Solid2d]
|
||||||
end
|
end
|
||||||
subgraph path45 [Path]
|
subgraph path45 [Path]
|
||||||
45["Path<br>[1337, 1362, 0]"]
|
45["Path<br>[1337, 1362, 0]"]
|
||||||
end
|
end
|
||||||
subgraph path46 [Path]
|
subgraph path46 [Path]
|
||||||
46["Path<br>[1370, 1414, 0]"]
|
46["Path<br>[1370, 1407, 0]"]
|
||||||
47["Segment<br>[1370, 1414, 0]"]
|
47["Segment<br>[1370, 1407, 0]"]
|
||||||
48[Solid2d]
|
48[Solid2d]
|
||||||
end
|
end
|
||||||
subgraph path49 [Path]
|
subgraph path49 [Path]
|
||||||
49["Path<br>[1427, 1472, 0]"]
|
49["Path<br>[1420, 1458, 0]"]
|
||||||
50["Segment<br>[1427, 1472, 0]"]
|
50["Segment<br>[1420, 1458, 0]"]
|
||||||
51[Solid2d]
|
51[Solid2d]
|
||||||
end
|
end
|
||||||
subgraph path59 [Path]
|
subgraph path59 [Path]
|
||||||
59["Path<br>[1337, 1362, 0]"]
|
59["Path<br>[1337, 1362, 0]"]
|
||||||
end
|
end
|
||||||
subgraph path60 [Path]
|
subgraph path60 [Path]
|
||||||
60["Path<br>[1370, 1414, 0]"]
|
60["Path<br>[1370, 1407, 0]"]
|
||||||
61["Segment<br>[1370, 1414, 0]"]
|
61["Segment<br>[1370, 1407, 0]"]
|
||||||
62[Solid2d]
|
62[Solid2d]
|
||||||
end
|
end
|
||||||
subgraph path63 [Path]
|
subgraph path63 [Path]
|
||||||
63["Path<br>[1427, 1472, 0]"]
|
63["Path<br>[1420, 1458, 0]"]
|
||||||
64["Segment<br>[1427, 1472, 0]"]
|
64["Segment<br>[1420, 1458, 0]"]
|
||||||
65[Solid2d]
|
65[Solid2d]
|
||||||
end
|
end
|
||||||
subgraph path73 [Path]
|
subgraph path73 [Path]
|
||||||
73["Path<br>[1337, 1362, 0]"]
|
73["Path<br>[1337, 1362, 0]"]
|
||||||
end
|
end
|
||||||
subgraph path74 [Path]
|
subgraph path74 [Path]
|
||||||
74["Path<br>[1370, 1414, 0]"]
|
74["Path<br>[1370, 1407, 0]"]
|
||||||
75["Segment<br>[1370, 1414, 0]"]
|
75["Segment<br>[1370, 1407, 0]"]
|
||||||
76[Solid2d]
|
76[Solid2d]
|
||||||
end
|
end
|
||||||
subgraph path77 [Path]
|
subgraph path77 [Path]
|
||||||
77["Path<br>[1427, 1472, 0]"]
|
77["Path<br>[1420, 1458, 0]"]
|
||||||
78["Segment<br>[1427, 1472, 0]"]
|
78["Segment<br>[1420, 1458, 0]"]
|
||||||
79[Solid2d]
|
79[Solid2d]
|
||||||
end
|
end
|
||||||
1["Plane<br>[373, 461, 0]"]
|
1["Plane<br>[373, 461, 0]"]
|
||||||
@ -86,28 +86,28 @@ flowchart LR
|
|||||||
28["SweepEdge Opposite"]
|
28["SweepEdge Opposite"]
|
||||||
29["SweepEdge Adjacent"]
|
29["SweepEdge Adjacent"]
|
||||||
30["Plane<br>[1310, 1329, 0]"]
|
30["Plane<br>[1310, 1329, 0]"]
|
||||||
38["Sweep Extrusion<br>[1484, 1508, 0]"]
|
38["Sweep Extrusion<br>[1470, 1494, 0]"]
|
||||||
39[Wall]
|
39[Wall]
|
||||||
40["Cap Start"]
|
40["Cap Start"]
|
||||||
41["Cap End"]
|
41["Cap End"]
|
||||||
42["SweepEdge Opposite"]
|
42["SweepEdge Opposite"]
|
||||||
43["SweepEdge Adjacent"]
|
43["SweepEdge Adjacent"]
|
||||||
44["Plane<br>[1310, 1329, 0]"]
|
44["Plane<br>[1310, 1329, 0]"]
|
||||||
52["Sweep Extrusion<br>[1484, 1508, 0]"]
|
52["Sweep Extrusion<br>[1470, 1494, 0]"]
|
||||||
53[Wall]
|
53[Wall]
|
||||||
54["Cap Start"]
|
54["Cap Start"]
|
||||||
55["Cap End"]
|
55["Cap End"]
|
||||||
56["SweepEdge Opposite"]
|
56["SweepEdge Opposite"]
|
||||||
57["SweepEdge Adjacent"]
|
57["SweepEdge Adjacent"]
|
||||||
58["Plane<br>[1310, 1329, 0]"]
|
58["Plane<br>[1310, 1329, 0]"]
|
||||||
66["Sweep Extrusion<br>[1484, 1508, 0]"]
|
66["Sweep Extrusion<br>[1470, 1494, 0]"]
|
||||||
67[Wall]
|
67[Wall]
|
||||||
68["Cap Start"]
|
68["Cap Start"]
|
||||||
69["Cap End"]
|
69["Cap End"]
|
||||||
70["SweepEdge Opposite"]
|
70["SweepEdge Opposite"]
|
||||||
71["SweepEdge Adjacent"]
|
71["SweepEdge Adjacent"]
|
||||||
72["Plane<br>[1310, 1329, 0]"]
|
72["Plane<br>[1310, 1329, 0]"]
|
||||||
80["Sweep Extrusion<br>[1484, 1508, 0]"]
|
80["Sweep Extrusion<br>[1470, 1494, 0]"]
|
||||||
81[Wall]
|
81[Wall]
|
||||||
82["Cap Start"]
|
82["Cap Start"]
|
||||||
83["Cap End"]
|
83["Cap End"]
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -60,8 +60,8 @@ case = startSketchOn('XY')
|
|||||||
fn m25Screw(x, y, height) {
|
fn m25Screw(x, y, height) {
|
||||||
screw = startSketchOn("XY")
|
screw = startSketchOn("XY")
|
||||||
|> startProfileAt([0, 0], %)
|
|> startProfileAt([0, 0], %)
|
||||||
|> circle({ center = [x, y], radius = 2.5 }, %)
|
|> circle(center = [x, y], radius = 2.5)
|
||||||
|> hole(circle({ center = [x, y], radius = 1.25 }, %), %)
|
|> hole(circle(center = [x, y], radius = 1.25), %)
|
||||||
|> extrude(length = height)
|
|> extrude(length = height)
|
||||||
return screw
|
return screw
|
||||||
}
|
}
|
||||||
|
@ -147,14 +147,14 @@ description: Operations executed fillet-and-shell.kcl
|
|||||||
"name": "m25Screw",
|
"name": "m25Screw",
|
||||||
"functionSourceRange": [
|
"functionSourceRange": [
|
||||||
1283,
|
1283,
|
||||||
1525,
|
1511,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"unlabeledArg": null,
|
"unlabeledArg": null,
|
||||||
"labeledArgs": {},
|
"labeledArgs": {},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1527,
|
1513,
|
||||||
1656,
|
1642,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -191,8 +191,8 @@ description: Operations executed fillet-and-shell.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -204,16 +204,16 @@ description: Operations executed fillet-and-shell.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1474,
|
1460,
|
||||||
1475,
|
1461,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "hole",
|
"name": "hole",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1422,
|
1415,
|
||||||
1476,
|
1462,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -236,16 +236,16 @@ description: Operations executed fillet-and-shell.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1501,
|
1487,
|
||||||
1507,
|
1493,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "extrude",
|
"name": "extrude",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -271,14 +271,14 @@ description: Operations executed fillet-and-shell.kcl
|
|||||||
"name": "m25Screw",
|
"name": "m25Screw",
|
||||||
"functionSourceRange": [
|
"functionSourceRange": [
|
||||||
1283,
|
1283,
|
||||||
1525,
|
1511,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"unlabeledArg": null,
|
"unlabeledArg": null,
|
||||||
"labeledArgs": {},
|
"labeledArgs": {},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1658,
|
1644,
|
||||||
1785,
|
1771,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -315,8 +315,8 @@ description: Operations executed fillet-and-shell.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -328,16 +328,16 @@ description: Operations executed fillet-and-shell.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1474,
|
1460,
|
||||||
1475,
|
1461,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "hole",
|
"name": "hole",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1422,
|
1415,
|
||||||
1476,
|
1462,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -360,16 +360,16 @@ description: Operations executed fillet-and-shell.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1501,
|
1487,
|
||||||
1507,
|
1493,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "extrude",
|
"name": "extrude",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -395,14 +395,14 @@ description: Operations executed fillet-and-shell.kcl
|
|||||||
"name": "m25Screw",
|
"name": "m25Screw",
|
||||||
"functionSourceRange": [
|
"functionSourceRange": [
|
||||||
1283,
|
1283,
|
||||||
1525,
|
1511,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"unlabeledArg": null,
|
"unlabeledArg": null,
|
||||||
"labeledArgs": {},
|
"labeledArgs": {},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1787,
|
1773,
|
||||||
1912,
|
1898,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -439,8 +439,8 @@ description: Operations executed fillet-and-shell.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -452,16 +452,16 @@ description: Operations executed fillet-and-shell.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1474,
|
1460,
|
||||||
1475,
|
1461,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "hole",
|
"name": "hole",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1422,
|
1415,
|
||||||
1476,
|
1462,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -484,16 +484,16 @@ description: Operations executed fillet-and-shell.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1501,
|
1487,
|
||||||
1507,
|
1493,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "extrude",
|
"name": "extrude",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -519,14 +519,14 @@ description: Operations executed fillet-and-shell.kcl
|
|||||||
"name": "m25Screw",
|
"name": "m25Screw",
|
||||||
"functionSourceRange": [
|
"functionSourceRange": [
|
||||||
1283,
|
1283,
|
||||||
1525,
|
1511,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"unlabeledArg": null,
|
"unlabeledArg": null,
|
||||||
"labeledArgs": {},
|
"labeledArgs": {},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1914,
|
1900,
|
||||||
2041,
|
2027,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -563,8 +563,8 @@ description: Operations executed fillet-and-shell.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1427,
|
1420,
|
||||||
1472,
|
1458,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -576,16 +576,16 @@ description: Operations executed fillet-and-shell.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1474,
|
1460,
|
||||||
1475,
|
1461,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "hole",
|
"name": "hole",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1422,
|
1415,
|
||||||
1476,
|
1462,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -608,16 +608,16 @@ description: Operations executed fillet-and-shell.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1501,
|
1487,
|
||||||
1507,
|
1493,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "extrude",
|
"name": "extrude",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1484,
|
1470,
|
||||||
1508,
|
1494,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -651,8 +651,8 @@ description: Operations executed fillet-and-shell.kcl
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
2063,
|
2049,
|
||||||
2070,
|
2056,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -671,16 +671,16 @@ description: Operations executed fillet-and-shell.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
2084,
|
2070,
|
||||||
2097,
|
2083,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "shell",
|
"name": "shell",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
2043,
|
2029,
|
||||||
2098,
|
2084,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -692,8 +692,8 @@ description: Operations executed fillet-and-shell.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
2049,
|
2035,
|
||||||
2053,
|
2039,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -985,7 +985,7 @@ description: Variables in memory after executing fillet-and-shell.kcl
|
|||||||
{
|
{
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
1283,
|
1283,
|
||||||
1525,
|
1511,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -326,7 +326,7 @@ description: Artifact commands flush_batch_on_end.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -346,7 +346,7 @@ description: Artifact commands flush_batch_on_end.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -357,7 +357,7 @@ description: Artifact commands flush_batch_on_end.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -374,7 +374,7 @@ description: Artifact commands flush_batch_on_end.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -403,7 +403,7 @@ description: Artifact commands flush_batch_on_end.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -414,8 +414,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
428,
|
437,
|
||||||
511,
|
529,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -434,8 +434,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
428,
|
437,
|
||||||
511,
|
529,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -445,8 +445,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
428,
|
437,
|
||||||
511,
|
529,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -462,8 +462,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
428,
|
437,
|
||||||
511,
|
529,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -491,8 +491,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
428,
|
437,
|
||||||
511,
|
529,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -503,8 +503,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
601,
|
619,
|
||||||
622,
|
640,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -516,8 +516,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
601,
|
619,
|
||||||
622,
|
640,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -529,8 +529,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
678,
|
696,
|
||||||
715,
|
733,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -549,8 +549,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
678,
|
696,
|
||||||
715,
|
733,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -563,8 +563,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
678,
|
696,
|
||||||
715,
|
733,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -574,8 +574,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
678,
|
696,
|
||||||
715,
|
733,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -586,8 +586,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
678,
|
696,
|
||||||
715,
|
733,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -599,8 +599,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
678,
|
696,
|
||||||
715,
|
733,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -613,8 +613,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
678,
|
696,
|
||||||
715,
|
733,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -627,8 +627,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
678,
|
696,
|
||||||
715,
|
733,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -641,8 +641,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
678,
|
696,
|
||||||
715,
|
733,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
```mermaid
|
```mermaid
|
||||||
flowchart LR
|
flowchart LR
|
||||||
subgraph path2 [Path]
|
subgraph path2 [Path]
|
||||||
2["Path<br>[282, 365, 0]"]
|
2["Path<br>[282, 374, 0]"]
|
||||||
3["Segment<br>[282, 365, 0]"]
|
3["Segment<br>[282, 374, 0]"]
|
||||||
4[Solid2d]
|
4[Solid2d]
|
||||||
end
|
end
|
||||||
subgraph path5 [Path]
|
subgraph path5 [Path]
|
||||||
5["Path<br>[428, 511, 0]"]
|
5["Path<br>[437, 529, 0]"]
|
||||||
6["Segment<br>[428, 511, 0]"]
|
6["Segment<br>[437, 529, 0]"]
|
||||||
7[Solid2d]
|
7[Solid2d]
|
||||||
end
|
end
|
||||||
1["Plane<br>[199, 218, 0]"]
|
1["Plane<br>[199, 218, 0]"]
|
||||||
8["Sweep Extrusion<br>[678, 715, 0]"]
|
8["Sweep Extrusion<br>[696, 733, 0]"]
|
||||||
9[Wall]
|
9[Wall]
|
||||||
10["Cap Start"]
|
10["Cap Start"]
|
||||||
11["Cap End"]
|
11["Cap End"]
|
||||||
|
@ -188,7 +188,7 @@ description: Result of parsing flush_batch_on_end.kcl
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 365,
|
"end": 374,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 279,
|
"end": 279,
|
||||||
"name": "outerProfile",
|
"name": "outerProfile",
|
||||||
@ -198,24 +198,17 @@ description: Result of parsing flush_batch_on_end.kcl
|
|||||||
"init": {
|
"init": {
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 344,
|
"type": "LabeledArg",
|
||||||
"properties": [
|
"label": {
|
||||||
{
|
"type": "Identifier",
|
||||||
"end": 312,
|
"name": "center"
|
||||||
"key": {
|
|
||||||
"end": 299,
|
|
||||||
"name": "center",
|
|
||||||
"start": 293,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
},
|
||||||
"start": 293,
|
"arg": {
|
||||||
"type": "ObjectProperty",
|
|
||||||
"value": {
|
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"end": 306,
|
"end": 318,
|
||||||
"raw": "0.0",
|
"raw": "0.0",
|
||||||
"start": 303,
|
"start": 315,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
@ -224,9 +217,9 @@ description: Result of parsing flush_batch_on_end.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 311,
|
"end": 323,
|
||||||
"raw": "0.0",
|
"raw": "0.0",
|
||||||
"start": 308,
|
"start": 320,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
@ -235,36 +228,32 @@ description: Result of parsing flush_batch_on_end.kcl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 312,
|
"end": 324,
|
||||||
"start": 302,
|
"start": 314,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 342,
|
"type": "LabeledArg",
|
||||||
"key": {
|
"label": {
|
||||||
"end": 322,
|
"type": "Identifier",
|
||||||
"name": "radius",
|
"name": "radius"
|
||||||
"start": 316,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
},
|
||||||
"start": 316,
|
"arg": {
|
||||||
"type": "ObjectProperty",
|
"end": 354,
|
||||||
"value": {
|
|
||||||
"end": 342,
|
|
||||||
"left": {
|
"left": {
|
||||||
"end": 338,
|
"end": 350,
|
||||||
"name": "outerDiameter",
|
"name": "outerDiameter",
|
||||||
"start": 325,
|
"start": 337,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"operator": "/",
|
"operator": "/",
|
||||||
"right": {
|
"right": {
|
||||||
"end": 342,
|
"end": 354,
|
||||||
"raw": "2",
|
"raw": "2",
|
||||||
"start": 341,
|
"start": 353,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
@ -272,30 +261,25 @@ description: Result of parsing flush_batch_on_end.kcl
|
|||||||
"suffix": "None"
|
"suffix": "None"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"start": 325,
|
"start": 337,
|
||||||
"type": "BinaryExpression",
|
"type": "BinaryExpression",
|
||||||
"type": "BinaryExpression"
|
"type": "BinaryExpression"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
],
|
|
||||||
"start": 289,
|
|
||||||
"type": "ObjectExpression",
|
|
||||||
"type": "ObjectExpression"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 355,
|
"type": "LabeledArg",
|
||||||
"name": "sketch000",
|
"label": {
|
||||||
"start": 346,
|
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"name": "tag"
|
||||||
},
|
},
|
||||||
{
|
"arg": {
|
||||||
"end": 364,
|
"end": 371,
|
||||||
"start": 357,
|
"start": 364,
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"value": "arc000"
|
"value": "arc000"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 288,
|
"end": 288,
|
||||||
@ -303,15 +287,22 @@ description: Result of parsing flush_batch_on_end.kcl
|
|||||||
"start": 282,
|
"start": 282,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 365,
|
"end": 374,
|
||||||
"start": 282,
|
"start": 282,
|
||||||
"type": "CallExpression",
|
"type": "CallExpressionKw",
|
||||||
"type": "CallExpression"
|
"type": "CallExpressionKw",
|
||||||
|
"unlabeled": {
|
||||||
|
"end": 301,
|
||||||
|
"name": "sketch000",
|
||||||
|
"start": 292,
|
||||||
|
"type": "Identifier",
|
||||||
|
"type": "Identifier"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"start": 267,
|
"start": 267,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 365,
|
"end": 374,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 267,
|
"start": 267,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
@ -319,34 +310,27 @@ description: Result of parsing flush_batch_on_end.kcl
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 511,
|
"end": 529,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 425,
|
"end": 434,
|
||||||
"name": "innerProfile",
|
"name": "innerProfile",
|
||||||
"start": 413,
|
"start": 422,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 490,
|
"type": "LabeledArg",
|
||||||
"properties": [
|
"label": {
|
||||||
{
|
"type": "Identifier",
|
||||||
"end": 458,
|
"name": "center"
|
||||||
"key": {
|
|
||||||
"end": 445,
|
|
||||||
"name": "center",
|
|
||||||
"start": 439,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
},
|
||||||
"start": 439,
|
"arg": {
|
||||||
"type": "ObjectProperty",
|
|
||||||
"value": {
|
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"end": 452,
|
"end": 473,
|
||||||
"raw": "0.0",
|
"raw": "0.0",
|
||||||
"start": 449,
|
"start": 470,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
@ -355,9 +339,9 @@ description: Result of parsing flush_batch_on_end.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 457,
|
"end": 478,
|
||||||
"raw": "0.0",
|
"raw": "0.0",
|
||||||
"start": 454,
|
"start": 475,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
@ -366,36 +350,32 @@ description: Result of parsing flush_batch_on_end.kcl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 458,
|
"end": 479,
|
||||||
"start": 448,
|
"start": 469,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 488,
|
"type": "LabeledArg",
|
||||||
"key": {
|
"label": {
|
||||||
"end": 468,
|
"type": "Identifier",
|
||||||
"name": "radius",
|
"name": "radius"
|
||||||
"start": 462,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
},
|
||||||
"start": 462,
|
"arg": {
|
||||||
"type": "ObjectProperty",
|
"end": 509,
|
||||||
"value": {
|
|
||||||
"end": 488,
|
|
||||||
"left": {
|
"left": {
|
||||||
"end": 484,
|
"end": 505,
|
||||||
"name": "innerDiameter",
|
"name": "innerDiameter",
|
||||||
"start": 471,
|
"start": 492,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"operator": "/",
|
"operator": "/",
|
||||||
"right": {
|
"right": {
|
||||||
"end": 488,
|
"end": 509,
|
||||||
"raw": "2",
|
"raw": "2",
|
||||||
"start": 487,
|
"start": 508,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
@ -403,104 +383,106 @@ description: Result of parsing flush_batch_on_end.kcl
|
|||||||
"suffix": "None"
|
"suffix": "None"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"start": 471,
|
"start": 492,
|
||||||
"type": "BinaryExpression",
|
"type": "BinaryExpression",
|
||||||
"type": "BinaryExpression"
|
"type": "BinaryExpression"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
],
|
|
||||||
"start": 435,
|
|
||||||
"type": "ObjectExpression",
|
|
||||||
"type": "ObjectExpression"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 501,
|
"type": "LabeledArg",
|
||||||
"name": "sketch000",
|
"label": {
|
||||||
"start": 492,
|
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"name": "tag"
|
||||||
},
|
},
|
||||||
{
|
"arg": {
|
||||||
"end": 510,
|
"end": 526,
|
||||||
"start": 503,
|
"start": 519,
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"value": "arc001"
|
"value": "arc001"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 434,
|
"end": 443,
|
||||||
"name": "circle",
|
"name": "circle",
|
||||||
"start": 428,
|
"start": 437,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 511,
|
"end": 529,
|
||||||
"start": 428,
|
"start": 437,
|
||||||
"type": "CallExpression",
|
"type": "CallExpressionKw",
|
||||||
"type": "CallExpression"
|
"type": "CallExpressionKw",
|
||||||
|
"unlabeled": {
|
||||||
|
"end": 456,
|
||||||
|
"name": "sketch000",
|
||||||
|
"start": 447,
|
||||||
|
"type": "Identifier",
|
||||||
|
"type": "Identifier"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"start": 413,
|
"start": 422,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 511,
|
"end": 529,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 413,
|
"start": 422,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 670,
|
"end": 688,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 580,
|
"end": 598,
|
||||||
"name": "pipeProfile",
|
"name": "pipeProfile",
|
||||||
"start": 569,
|
"start": 587,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"end": 595,
|
"end": 613,
|
||||||
"name": "outerProfile",
|
"name": "outerProfile",
|
||||||
"start": 583,
|
"start": 601,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 618,
|
"end": 636,
|
||||||
"name": "innerProfile",
|
"name": "innerProfile",
|
||||||
"start": 606,
|
"start": 624,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 621,
|
"end": 639,
|
||||||
"start": 620,
|
"start": 638,
|
||||||
"type": "PipeSubstitution",
|
"type": "PipeSubstitution",
|
||||||
"type": "PipeSubstitution"
|
"type": "PipeSubstitution"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 605,
|
"end": 623,
|
||||||
"name": "hole",
|
"name": "hole",
|
||||||
"start": 601,
|
"start": 619,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 622,
|
"end": 640,
|
||||||
"start": 601,
|
"start": 619,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 670,
|
"end": 688,
|
||||||
"nonCodeMeta": {
|
"nonCodeMeta": {
|
||||||
"nonCodeNodes": {
|
"nonCodeNodes": {
|
||||||
"1": [
|
"1": [
|
||||||
{
|
{
|
||||||
"end": 670,
|
"end": 688,
|
||||||
"start": 622,
|
"start": 640,
|
||||||
"type": "NonCodeNode",
|
"type": "NonCodeNode",
|
||||||
"value": {
|
"value": {
|
||||||
"type": "newLineBlockComment",
|
"type": "newLineBlockComment",
|
||||||
@ -512,26 +494,26 @@ description: Result of parsing flush_batch_on_end.kcl
|
|||||||
},
|
},
|
||||||
"startNodes": []
|
"startNodes": []
|
||||||
},
|
},
|
||||||
"start": 583,
|
"start": 601,
|
||||||
"type": "PipeExpression",
|
"type": "PipeExpression",
|
||||||
"type": "PipeExpression"
|
"type": "PipeExpression"
|
||||||
},
|
},
|
||||||
"start": 569,
|
"start": 587,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 670,
|
"end": 688,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 569,
|
"start": 587,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 715,
|
"end": 733,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 675,
|
"end": 693,
|
||||||
"name": "pipe",
|
"name": "pipe",
|
||||||
"start": 671,
|
"start": 689,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"init": {
|
"init": {
|
||||||
@ -543,43 +525,43 @@ description: Result of parsing flush_batch_on_end.kcl
|
|||||||
"name": "length"
|
"name": "length"
|
||||||
},
|
},
|
||||||
"arg": {
|
"arg": {
|
||||||
"end": 714,
|
"end": 732,
|
||||||
"name": "length",
|
"name": "length",
|
||||||
"start": 708,
|
"start": 726,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 685,
|
"end": 703,
|
||||||
"name": "extrude",
|
"name": "extrude",
|
||||||
"start": 678,
|
"start": 696,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 715,
|
"end": 733,
|
||||||
"start": 678,
|
"start": 696,
|
||||||
"type": "CallExpressionKw",
|
"type": "CallExpressionKw",
|
||||||
"type": "CallExpressionKw",
|
"type": "CallExpressionKw",
|
||||||
"unlabeled": {
|
"unlabeled": {
|
||||||
"end": 697,
|
"end": 715,
|
||||||
"name": "pipeProfile",
|
"name": "pipeProfile",
|
||||||
"start": 686,
|
"start": 704,
|
||||||
"type": "Identifier",
|
"type": "Identifier",
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"start": 671,
|
"start": 689,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 715,
|
"end": 733,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 671,
|
"start": 689,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 716,
|
"end": 734,
|
||||||
"innerAttrs": [
|
"innerAttrs": [
|
||||||
{
|
{
|
||||||
"end": 33,
|
"end": 33,
|
||||||
@ -641,8 +623,8 @@ description: Result of parsing flush_batch_on_end.kcl
|
|||||||
],
|
],
|
||||||
"4": [
|
"4": [
|
||||||
{
|
{
|
||||||
"end": 412,
|
"end": 421,
|
||||||
"start": 365,
|
"start": 374,
|
||||||
"type": "NonCodeNode",
|
"type": "NonCodeNode",
|
||||||
"value": {
|
"value": {
|
||||||
"type": "newLineBlockComment",
|
"type": "newLineBlockComment",
|
||||||
@ -653,8 +635,8 @@ description: Result of parsing flush_batch_on_end.kcl
|
|||||||
],
|
],
|
||||||
"5": [
|
"5": [
|
||||||
{
|
{
|
||||||
"end": 568,
|
"end": 586,
|
||||||
"start": 511,
|
"start": 529,
|
||||||
"type": "NonCodeNode",
|
"type": "NonCodeNode",
|
||||||
"value": {
|
"value": {
|
||||||
"type": "newLineBlockComment",
|
"type": "newLineBlockComment",
|
||||||
|
@ -11,16 +11,20 @@ length = 1 + 1 / 2
|
|||||||
sketch000 = startSketchOn('XY')
|
sketch000 = startSketchOn('XY')
|
||||||
|
|
||||||
// create a profile of the outside of the pipe
|
// create a profile of the outside of the pipe
|
||||||
outerProfile = circle({
|
outerProfile = circle(
|
||||||
|
sketch000,
|
||||||
center = [0.0, 0.0],
|
center = [0.0, 0.0],
|
||||||
radius = outerDiameter / 2
|
radius = outerDiameter / 2,
|
||||||
}, sketch000, $arc000)
|
tag = $arc000,
|
||||||
|
)
|
||||||
|
|
||||||
// create a profile of the inside of the pipe
|
// create a profile of the inside of the pipe
|
||||||
innerProfile = circle({
|
innerProfile = circle(
|
||||||
|
sketch000,
|
||||||
center = [0.0, 0.0],
|
center = [0.0, 0.0],
|
||||||
radius = innerDiameter / 2
|
radius = innerDiameter / 2,
|
||||||
}, sketch000, $arc001)
|
tag = $arc001,
|
||||||
|
)
|
||||||
|
|
||||||
// create a profile with holes sketch000Profile000Holes
|
// create a profile with holes sketch000Profile000Holes
|
||||||
pipeProfile = outerProfile
|
pipeProfile = outerProfile
|
||||||
|
@ -36,8 +36,8 @@ description: Operations executed flush_batch_on_end.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
606,
|
624,
|
||||||
618,
|
636,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -49,16 +49,16 @@ description: Operations executed flush_batch_on_end.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
620,
|
638,
|
||||||
621,
|
639,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "hole",
|
"name": "hole",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
601,
|
619,
|
||||||
622,
|
640,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -75,16 +75,16 @@ description: Operations executed flush_batch_on_end.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
708,
|
726,
|
||||||
714,
|
732,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "extrude",
|
"name": "extrude",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
678,
|
696,
|
||||||
715,
|
733,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -96,8 +96,8 @@ description: Operations executed flush_batch_on_end.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
686,
|
704,
|
||||||
697,
|
715,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -31,8 +31,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
],
|
],
|
||||||
"radius": 0.2734375,
|
"radius": 0.2734375,
|
||||||
"tag": {
|
"tag": {
|
||||||
"end": 364,
|
"end": 371,
|
||||||
"start": 357,
|
"start": 364,
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"value": "arc000"
|
"value": "arc000"
|
||||||
},
|
},
|
||||||
@ -50,12 +50,12 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"tag": {
|
"tag": {
|
||||||
"end": 364,
|
"end": 371,
|
||||||
"start": 357,
|
"start": 364,
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"value": "arc000"
|
"value": "arc000"
|
||||||
},
|
},
|
||||||
@ -65,8 +65,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"__meta": [
|
"__meta": [
|
||||||
{
|
{
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
357,
|
|
||||||
364,
|
364,
|
||||||
|
371,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -84,8 +84,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"__geoMeta": {
|
"__geoMeta": {
|
||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
428,
|
437,
|
||||||
511,
|
529,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -100,8 +100,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
],
|
],
|
||||||
"radius": 0.182,
|
"radius": 0.182,
|
||||||
"tag": {
|
"tag": {
|
||||||
"end": 510,
|
"end": 526,
|
||||||
"start": 503,
|
"start": 519,
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"value": "arc001"
|
"value": "arc001"
|
||||||
},
|
},
|
||||||
@ -119,8 +119,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"__meta": [
|
"__meta": [
|
||||||
{
|
{
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
503,
|
519,
|
||||||
510,
|
526,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -158,8 +158,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"__geoMeta": {
|
"__geoMeta": {
|
||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
428,
|
437,
|
||||||
511,
|
529,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -174,8 +174,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
],
|
],
|
||||||
"radius": 0.182,
|
"radius": 0.182,
|
||||||
"tag": {
|
"tag": {
|
||||||
"end": 510,
|
"end": 526,
|
||||||
"start": 503,
|
"start": 519,
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"value": "arc001"
|
"value": "arc001"
|
||||||
},
|
},
|
||||||
@ -235,8 +235,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"__geoMeta": {
|
"__geoMeta": {
|
||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
428,
|
437,
|
||||||
511,
|
529,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -253,8 +253,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"__geoMeta": {
|
"__geoMeta": {
|
||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
428,
|
437,
|
||||||
511,
|
529,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -269,8 +269,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
],
|
],
|
||||||
"radius": 0.182,
|
"radius": 0.182,
|
||||||
"tag": {
|
"tag": {
|
||||||
"end": 510,
|
"end": 526,
|
||||||
"start": 503,
|
"start": 519,
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"value": "arc001"
|
"value": "arc001"
|
||||||
},
|
},
|
||||||
@ -288,8 +288,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"__meta": [
|
"__meta": [
|
||||||
{
|
{
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
503,
|
519,
|
||||||
510,
|
526,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -304,8 +304,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"__meta": [
|
"__meta": [
|
||||||
{
|
{
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
428,
|
437,
|
||||||
511,
|
529,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -376,7 +376,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -391,8 +391,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
],
|
],
|
||||||
"radius": 0.2734375,
|
"radius": 0.2734375,
|
||||||
"tag": {
|
"tag": {
|
||||||
"end": 364,
|
"end": 371,
|
||||||
"start": 357,
|
"start": 364,
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"value": "arc000"
|
"value": "arc000"
|
||||||
},
|
},
|
||||||
@ -453,7 +453,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -471,7 +471,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -486,8 +486,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
],
|
],
|
||||||
"radius": 0.2734375,
|
"radius": 0.2734375,
|
||||||
"tag": {
|
"tag": {
|
||||||
"end": 364,
|
"end": 371,
|
||||||
"start": 357,
|
"start": 364,
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"value": "arc000"
|
"value": "arc000"
|
||||||
},
|
},
|
||||||
@ -505,12 +505,12 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"tag": {
|
"tag": {
|
||||||
"end": 364,
|
"end": 371,
|
||||||
"start": 357,
|
"start": 364,
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"value": "arc000"
|
"value": "arc000"
|
||||||
},
|
},
|
||||||
@ -520,8 +520,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"__meta": [
|
"__meta": [
|
||||||
{
|
{
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
357,
|
|
||||||
364,
|
364,
|
||||||
|
371,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -537,7 +537,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
{
|
{
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -556,12 +556,12 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"tag": {
|
"tag": {
|
||||||
"end": 364,
|
"end": 371,
|
||||||
"start": 357,
|
"start": 364,
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"value": "arc000"
|
"value": "arc000"
|
||||||
},
|
},
|
||||||
@ -577,7 +577,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -592,8 +592,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
],
|
],
|
||||||
"radius": 0.2734375,
|
"radius": 0.2734375,
|
||||||
"tag": {
|
"tag": {
|
||||||
"end": 364,
|
"end": 371,
|
||||||
"start": 357,
|
"start": 364,
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"value": "arc000"
|
"value": "arc000"
|
||||||
},
|
},
|
||||||
@ -654,7 +654,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -672,7 +672,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -687,8 +687,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
],
|
],
|
||||||
"radius": 0.2734375,
|
"radius": 0.2734375,
|
||||||
"tag": {
|
"tag": {
|
||||||
"end": 364,
|
"end": 371,
|
||||||
"start": 357,
|
"start": 364,
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"value": "arc000"
|
"value": "arc000"
|
||||||
},
|
},
|
||||||
@ -706,12 +706,12 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"tag": {
|
"tag": {
|
||||||
"end": 364,
|
"end": 371,
|
||||||
"start": 357,
|
"start": 364,
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"value": "arc000"
|
"value": "arc000"
|
||||||
},
|
},
|
||||||
@ -721,8 +721,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"__meta": [
|
"__meta": [
|
||||||
{
|
{
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
357,
|
|
||||||
364,
|
364,
|
||||||
|
371,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -738,7 +738,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
{
|
{
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -754,7 +754,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
{
|
{
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -772,7 +772,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -787,8 +787,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
],
|
],
|
||||||
"radius": 0.2734375,
|
"radius": 0.2734375,
|
||||||
"tag": {
|
"tag": {
|
||||||
"end": 364,
|
"end": 371,
|
||||||
"start": 357,
|
"start": 364,
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"value": "arc000"
|
"value": "arc000"
|
||||||
},
|
},
|
||||||
@ -849,7 +849,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -867,7 +867,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -882,8 +882,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
],
|
],
|
||||||
"radius": 0.2734375,
|
"radius": 0.2734375,
|
||||||
"tag": {
|
"tag": {
|
||||||
"end": 364,
|
"end": 371,
|
||||||
"start": 357,
|
"start": 364,
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"value": "arc000"
|
"value": "arc000"
|
||||||
},
|
},
|
||||||
@ -901,12 +901,12 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"tag": {
|
"tag": {
|
||||||
"end": 364,
|
"end": 371,
|
||||||
"start": 357,
|
"start": 364,
|
||||||
"type": "TagDeclarator",
|
"type": "TagDeclarator",
|
||||||
"value": "arc000"
|
"value": "arc000"
|
||||||
},
|
},
|
||||||
@ -916,8 +916,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
"__meta": [
|
"__meta": [
|
||||||
{
|
{
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
357,
|
|
||||||
364,
|
364,
|
||||||
|
371,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -933,7 +933,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
|||||||
{
|
{
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
282,
|
282,
|
||||||
365,
|
374,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
source: kcl/src/simulation_tests.rs
|
source: kcl/src/simulation_tests.rs
|
||||||
description: Artifact commands helix_ccw.kcl
|
description: Artifact commands helix_ccw.kcl
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@ -315,7 +314,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
35,
|
35,
|
||||||
78,
|
71,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -335,7 +334,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
35,
|
35,
|
||||||
78,
|
71,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -346,7 +345,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
35,
|
35,
|
||||||
78,
|
71,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -363,7 +362,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
35,
|
35,
|
||||||
78,
|
71,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -392,7 +391,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
35,
|
35,
|
||||||
78,
|
71,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -403,8 +402,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
84,
|
77,
|
||||||
104,
|
97,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -423,8 +422,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
84,
|
77,
|
||||||
104,
|
97,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -437,8 +436,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
84,
|
77,
|
||||||
104,
|
97,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -448,8 +447,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
84,
|
77,
|
||||||
104,
|
97,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -460,8 +459,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
84,
|
77,
|
||||||
104,
|
97,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -473,8 +472,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
84,
|
77,
|
||||||
104,
|
97,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -487,8 +486,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
84,
|
77,
|
||||||
104,
|
97,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -501,8 +500,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
110,
|
103,
|
||||||
205,
|
198,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
```mermaid
|
```mermaid
|
||||||
flowchart LR
|
flowchart LR
|
||||||
subgraph path2 [Path]
|
subgraph path2 [Path]
|
||||||
2["Path<br>[35, 78, 0]"]
|
2["Path<br>[35, 71, 0]"]
|
||||||
3["Segment<br>[35, 78, 0]"]
|
3["Segment<br>[35, 71, 0]"]
|
||||||
4[Solid2d]
|
4[Solid2d]
|
||||||
end
|
end
|
||||||
1["Plane<br>[10, 29, 0]"]
|
1["Plane<br>[10, 29, 0]"]
|
||||||
5["Sweep Extrusion<br>[84, 104, 0]"]
|
5["Sweep Extrusion<br>[77, 97, 0]"]
|
||||||
6[Wall]
|
6[Wall]
|
||||||
7["Cap Start"]
|
7["Cap Start"]
|
||||||
8["Cap End"]
|
8["Cap End"]
|
||||||
|
@ -7,7 +7,7 @@ description: Result of parsing helix_ccw.kcl
|
|||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
"declaration": {
|
"declaration": {
|
||||||
"end": 205,
|
"end": 198,
|
||||||
"id": {
|
"id": {
|
||||||
"end": 7,
|
"end": 7,
|
||||||
"name": "part001",
|
"name": "part001",
|
||||||
@ -41,24 +41,17 @@ description: Result of parsing helix_ccw.kcl
|
|||||||
{
|
{
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 74,
|
"type": "LabeledArg",
|
||||||
"properties": [
|
"label": {
|
||||||
{
|
"type": "Identifier",
|
||||||
"end": 59,
|
"name": "center"
|
||||||
"key": {
|
|
||||||
"end": 50,
|
|
||||||
"name": "center",
|
|
||||||
"start": 44,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
},
|
||||||
"start": 44,
|
"arg": {
|
||||||
"type": "ObjectProperty",
|
|
||||||
"value": {
|
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"end": 55,
|
"end": 53,
|
||||||
"raw": "5",
|
"raw": "5",
|
||||||
"start": 54,
|
"start": 52,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
@ -67,9 +60,9 @@ description: Result of parsing helix_ccw.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 58,
|
"end": 56,
|
||||||
"raw": "5",
|
"raw": "5",
|
||||||
"start": 57,
|
"start": 55,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
@ -78,26 +71,22 @@ description: Result of parsing helix_ccw.kcl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 59,
|
"end": 57,
|
||||||
"start": 53,
|
"start": 51,
|
||||||
"type": "ArrayExpression",
|
"type": "ArrayExpression",
|
||||||
"type": "ArrayExpression"
|
"type": "ArrayExpression"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 72,
|
"type": "LabeledArg",
|
||||||
"key": {
|
"label": {
|
||||||
"end": 67,
|
"type": "Identifier",
|
||||||
"name": "radius",
|
"name": "radius"
|
||||||
"start": 61,
|
|
||||||
"type": "Identifier"
|
|
||||||
},
|
},
|
||||||
"start": 61,
|
"arg": {
|
||||||
"type": "ObjectProperty",
|
"end": 70,
|
||||||
"value": {
|
|
||||||
"end": 72,
|
|
||||||
"raw": "10",
|
"raw": "10",
|
||||||
"start": 70,
|
"start": 68,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
@ -107,27 +96,17 @@ description: Result of parsing helix_ccw.kcl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"start": 42,
|
|
||||||
"type": "ObjectExpression",
|
|
||||||
"type": "ObjectExpression"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"end": 77,
|
|
||||||
"start": 76,
|
|
||||||
"type": "PipeSubstitution",
|
|
||||||
"type": "PipeSubstitution"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 41,
|
"end": 41,
|
||||||
"name": "circle",
|
"name": "circle",
|
||||||
"start": 35,
|
"start": 35,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 78,
|
"end": 71,
|
||||||
"start": 35,
|
"start": 35,
|
||||||
"type": "CallExpression",
|
"type": "CallExpressionKw",
|
||||||
"type": "CallExpression"
|
"type": "CallExpressionKw",
|
||||||
|
"unlabeled": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"arguments": [
|
"arguments": [
|
||||||
@ -138,9 +117,9 @@ description: Result of parsing helix_ccw.kcl
|
|||||||
"name": "length"
|
"name": "length"
|
||||||
},
|
},
|
||||||
"arg": {
|
"arg": {
|
||||||
"end": 103,
|
"end": 96,
|
||||||
"raw": "10",
|
"raw": "10",
|
||||||
"start": 101,
|
"start": 94,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
@ -151,13 +130,13 @@ description: Result of parsing helix_ccw.kcl
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 91,
|
"end": 84,
|
||||||
"name": "extrude",
|
"name": "extrude",
|
||||||
"start": 84,
|
"start": 77,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 104,
|
"end": 97,
|
||||||
"start": 84,
|
"start": 77,
|
||||||
"type": "CallExpressionKw",
|
"type": "CallExpressionKw",
|
||||||
"type": "CallExpressionKw",
|
"type": "CallExpressionKw",
|
||||||
"unlabeled": null
|
"unlabeled": null
|
||||||
@ -165,22 +144,22 @@ description: Result of parsing helix_ccw.kcl
|
|||||||
{
|
{
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"end": 201,
|
"end": 194,
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
"end": 152,
|
"end": 145,
|
||||||
"key": {
|
"key": {
|
||||||
"end": 147,
|
"end": 140,
|
||||||
"name": "revolutions",
|
"name": "revolutions",
|
||||||
"start": 136,
|
"start": 129,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"start": 136,
|
"start": 129,
|
||||||
"type": "ObjectProperty",
|
"type": "ObjectProperty",
|
||||||
"value": {
|
"value": {
|
||||||
"end": 152,
|
"end": 145,
|
||||||
"raw": "16",
|
"raw": "16",
|
||||||
"start": 150,
|
"start": 143,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
@ -190,19 +169,19 @@ description: Result of parsing helix_ccw.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 175,
|
"end": 168,
|
||||||
"key": {
|
"key": {
|
||||||
"end": 171,
|
"end": 164,
|
||||||
"name": "angleStart",
|
"name": "angleStart",
|
||||||
"start": 161,
|
"start": 154,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"start": 161,
|
"start": 154,
|
||||||
"type": "ObjectProperty",
|
"type": "ObjectProperty",
|
||||||
"value": {
|
"value": {
|
||||||
"end": 175,
|
"end": 168,
|
||||||
"raw": "0",
|
"raw": "0",
|
||||||
"start": 174,
|
"start": 167,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": {
|
"value": {
|
||||||
@ -212,49 +191,49 @@ description: Result of parsing helix_ccw.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 194,
|
|
||||||
"key": {
|
|
||||||
"end": 187,
|
"end": 187,
|
||||||
|
"key": {
|
||||||
|
"end": 180,
|
||||||
"name": "ccw",
|
"name": "ccw",
|
||||||
"start": 184,
|
"start": 177,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"start": 184,
|
"start": 177,
|
||||||
"type": "ObjectProperty",
|
"type": "ObjectProperty",
|
||||||
"value": {
|
"value": {
|
||||||
"end": 194,
|
"end": 187,
|
||||||
"raw": "true",
|
"raw": "true",
|
||||||
"start": 190,
|
"start": 183,
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"value": true
|
"value": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"start": 127,
|
"start": 120,
|
||||||
"type": "ObjectExpression",
|
"type": "ObjectExpression",
|
||||||
"type": "ObjectExpression"
|
"type": "ObjectExpression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"end": 204,
|
"end": 197,
|
||||||
"start": 203,
|
"start": 196,
|
||||||
"type": "PipeSubstitution",
|
"type": "PipeSubstitution",
|
||||||
"type": "PipeSubstitution"
|
"type": "PipeSubstitution"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"callee": {
|
"callee": {
|
||||||
"end": 126,
|
"end": 119,
|
||||||
"name": "helixRevolutions",
|
"name": "helixRevolutions",
|
||||||
"start": 110,
|
"start": 103,
|
||||||
"type": "Identifier"
|
"type": "Identifier"
|
||||||
},
|
},
|
||||||
"end": 205,
|
"end": 198,
|
||||||
"start": 110,
|
"start": 103,
|
||||||
"type": "CallExpression",
|
"type": "CallExpression",
|
||||||
"type": "CallExpression"
|
"type": "CallExpression"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 205,
|
"end": 198,
|
||||||
"start": 10,
|
"start": 10,
|
||||||
"type": "PipeExpression",
|
"type": "PipeExpression",
|
||||||
"type": "PipeExpression"
|
"type": "PipeExpression"
|
||||||
@ -262,14 +241,14 @@ description: Result of parsing helix_ccw.kcl
|
|||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclarator"
|
"type": "VariableDeclarator"
|
||||||
},
|
},
|
||||||
"end": 205,
|
"end": 198,
|
||||||
"kind": "const",
|
"kind": "const",
|
||||||
"start": 0,
|
"start": 0,
|
||||||
"type": "VariableDeclaration",
|
"type": "VariableDeclaration",
|
||||||
"type": "VariableDeclaration"
|
"type": "VariableDeclaration"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"end": 206,
|
"end": 199,
|
||||||
"start": 0
|
"start": 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
part001 = startSketchOn('XY')
|
part001 = startSketchOn('XY')
|
||||||
|> circle({ center = [5, 5], radius = 10 }, %)
|
|> circle(center = [5, 5], radius = 10)
|
||||||
|> extrude(length = 10)
|
|> extrude(length = 10)
|
||||||
|> helixRevolutions({
|
|> helixRevolutions({
|
||||||
revolutions = 16,
|
revolutions = 16,
|
||||||
|
@ -43,16 +43,16 @@ description: Operations executed helix_ccw.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
101,
|
94,
|
||||||
103,
|
96,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "extrude",
|
"name": "extrude",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
84,
|
77,
|
||||||
104,
|
97,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
@ -109,8 +109,8 @@ description: Operations executed helix_ccw.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
127,
|
120,
|
||||||
201,
|
194,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -122,16 +122,16 @@ description: Operations executed helix_ccw.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
203,
|
196,
|
||||||
204,
|
197,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "helixRevolutions",
|
"name": "helixRevolutions",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
110,
|
103,
|
||||||
205,
|
198,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
|
@ -15,7 +15,7 @@ description: Variables in memory after executing helix_ccw.kcl
|
|||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
35,
|
35,
|
||||||
78,
|
71,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"tag": null,
|
"tag": null,
|
||||||
@ -31,7 +31,7 @@ description: Variables in memory after executing helix_ccw.kcl
|
|||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
35,
|
35,
|
||||||
78,
|
71,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -103,7 +103,7 @@ description: Variables in memory after executing helix_ccw.kcl
|
|||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
35,
|
35,
|
||||||
78,
|
71,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -117,7 +117,7 @@ description: Variables in memory after executing helix_ccw.kcl
|
|||||||
{
|
{
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
35,
|
35,
|
||||||
78,
|
71,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -133,7 +133,7 @@ description: Variables in memory after executing helix_ccw.kcl
|
|||||||
{
|
{
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
35,
|
35,
|
||||||
78,
|
71,
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -2,4 +2,4 @@ export fn foo = () => { return 0 }
|
|||||||
|
|
||||||
// This interacts with the engine.
|
// This interacts with the engine.
|
||||||
part001 = startSketchOn('XY')
|
part001 = startSketchOn('XY')
|
||||||
|> circle({ center = [0, 0], radius = 10 }, %)
|
|> circle(center = [0, 0], radius = 10)
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
source: kcl/src/simulation_tests.rs
|
source: kcl/src/simulation_tests.rs
|
||||||
description: Artifact commands import_whole.kcl
|
description: Artifact commands import_whole.kcl
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@ -327,7 +326,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
61,
|
61,
|
||||||
104,
|
97,
|
||||||
3
|
3
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -347,7 +346,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
61,
|
61,
|
||||||
104,
|
97,
|
||||||
3
|
3
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -358,7 +357,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
61,
|
61,
|
||||||
104,
|
97,
|
||||||
3
|
3
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -375,7 +374,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
61,
|
61,
|
||||||
104,
|
97,
|
||||||
3
|
3
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -404,7 +403,7 @@ snapshot_kind: text
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
61,
|
61,
|
||||||
104,
|
97,
|
||||||
3
|
3
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -415,8 +414,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
110,
|
103,
|
||||||
130,
|
123,
|
||||||
3
|
3
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -435,8 +434,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
110,
|
103,
|
||||||
130,
|
123,
|
||||||
3
|
3
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -449,8 +448,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
110,
|
103,
|
||||||
130,
|
123,
|
||||||
3
|
3
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -460,8 +459,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
110,
|
103,
|
||||||
130,
|
123,
|
||||||
3
|
3
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -472,8 +471,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
110,
|
103,
|
||||||
130,
|
123,
|
||||||
3
|
3
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -485,8 +484,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
110,
|
103,
|
||||||
130,
|
123,
|
||||||
3
|
3
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -499,8 +498,8 @@ snapshot_kind: text
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
110,
|
103,
|
||||||
130,
|
123,
|
||||||
3
|
3
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
source: kcl/src/simulation_tests.rs
|
source: kcl/src/simulation_tests.rs
|
||||||
assertion_line: 188
|
|
||||||
description: Artifact graph flowchart import_whole.kcl
|
description: Artifact graph flowchart import_whole.kcl
|
||||||
extension: md
|
extension: md
|
||||||
snapshot_kind: binary
|
snapshot_kind: binary
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
```mermaid
|
```mermaid
|
||||||
flowchart LR
|
flowchart LR
|
||||||
subgraph path2 [Path]
|
subgraph path2 [Path]
|
||||||
2["Path<br>[61, 104, 3]"]
|
2["Path<br>[61, 97, 3]"]
|
||||||
3["Segment<br>[61, 104, 3]"]
|
3["Segment<br>[61, 97, 3]"]
|
||||||
4[Solid2d]
|
4[Solid2d]
|
||||||
end
|
end
|
||||||
1["Plane<br>[36, 55, 3]"]
|
1["Plane<br>[36, 55, 3]"]
|
||||||
5["Sweep Extrusion<br>[110, 130, 3]"]
|
5["Sweep Extrusion<br>[103, 123, 3]"]
|
||||||
6[Wall]
|
6[Wall]
|
||||||
7["Cap Start"]
|
7["Cap Start"]
|
||||||
8["Cap End"]
|
8["Cap End"]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
@settings(defaultLengthUnit = inch)
|
@settings(defaultLengthUnit = inch)
|
||||||
startSketchOn('XY')
|
startSketchOn('XY')
|
||||||
|> circle({ center = [5, 5], radius = 10 }, %)
|
|> circle(center = [5, 5], radius = 10)
|
||||||
|> extrude(length = 10)
|
|> extrude(length = 10)
|
||||||
|
@ -43,16 +43,16 @@ description: Operations executed import_whole.kcl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
127,
|
120,
|
||||||
129,
|
122,
|
||||||
3
|
3
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "extrude",
|
"name": "extrude",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
110,
|
103,
|
||||||
130,
|
123,
|
||||||
3
|
3
|
||||||
],
|
],
|
||||||
"type": "StdLibCall",
|
"type": "StdLibCall",
|
||||||
|
@ -15,7 +15,7 @@ description: Variables in memory after executing import_whole.kcl
|
|||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
61,
|
61,
|
||||||
104,
|
97,
|
||||||
3
|
3
|
||||||
],
|
],
|
||||||
"tag": null,
|
"tag": null,
|
||||||
@ -31,7 +31,7 @@ description: Variables in memory after executing import_whole.kcl
|
|||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
61,
|
61,
|
||||||
104,
|
97,
|
||||||
3
|
3
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -103,7 +103,7 @@ description: Variables in memory after executing import_whole.kcl
|
|||||||
"id": "[uuid]",
|
"id": "[uuid]",
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
61,
|
61,
|
||||||
104,
|
97,
|
||||||
3
|
3
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -117,7 +117,7 @@ description: Variables in memory after executing import_whole.kcl
|
|||||||
{
|
{
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
61,
|
61,
|
||||||
104,
|
97,
|
||||||
3
|
3
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -133,7 +133,7 @@ description: Variables in memory after executing import_whole.kcl
|
|||||||
{
|
{
|
||||||
"sourceRange": [
|
"sourceRange": [
|
||||||
61,
|
61,
|
||||||
104,
|
97,
|
||||||
3
|
3
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -412,7 +412,7 @@ description: Artifact commands revolve_about_edge.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
145,
|
145,
|
||||||
190,
|
183,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -432,7 +432,7 @@ description: Artifact commands revolve_about_edge.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
145,
|
145,
|
||||||
190,
|
183,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -443,7 +443,7 @@ description: Artifact commands revolve_about_edge.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
145,
|
145,
|
||||||
190,
|
183,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -460,7 +460,7 @@ description: Artifact commands revolve_about_edge.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
145,
|
145,
|
||||||
190,
|
183,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -489,7 +489,7 @@ description: Artifact commands revolve_about_edge.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
145,
|
145,
|
||||||
190,
|
183,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -500,8 +500,8 @@ description: Artifact commands revolve_about_edge.kcl
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
196,
|
189,
|
||||||
270,
|
263,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -518,8 +518,8 @@ description: Artifact commands revolve_about_edge.kcl
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
196,
|
189,
|
||||||
270,
|
263,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -530,8 +530,8 @@ description: Artifact commands revolve_about_edge.kcl
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
196,
|
189,
|
||||||
270,
|
263,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -543,8 +543,8 @@ description: Artifact commands revolve_about_edge.kcl
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
196,
|
189,
|
||||||
270,
|
263,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
@ -557,8 +557,8 @@ description: Artifact commands revolve_about_edge.kcl
|
|||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [
|
"range": [
|
||||||
196,
|
189,
|
||||||
270,
|
263,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"command": {
|
"command": {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user