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
|
||||
run: |-
|
||||
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:
|
||||
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
||||
RUST_MIN_STACK: 10485760000
|
||||
|
@ -53,7 +53,7 @@ example = extrude(exampleSketch, length = 5)
|
||||
```js
|
||||
// Add color to a revolved solid.
|
||||
sketch001 = startSketchOn('XY')
|
||||
|> circle({ center = [15, 0], radius = 5 }, %)
|
||||
|> circle(center = [15, 0], radius = 5)
|
||||
|> revolve({ angle = 360, axis = 'y' }, %)
|
||||
|> appearance(color = '#ff0000', metalness = 90, roughness = 90)
|
||||
```
|
||||
@ -195,10 +195,10 @@ sweepPath = startSketchOn('XZ')
|
||||
|> line(end = [0, 7])
|
||||
|
||||
pipeHole = startSketchOn('XY')
|
||||
|> circle({ center = [0, 0], radius = 1.5 }, %)
|
||||
|> circle(center = [0, 0], radius = 1.5)
|
||||
|
||||
sweepSketch = startSketchOn('XY')
|
||||
|> circle({ center = [0, 0], radius = 2 }, %)
|
||||
|> circle(center = [0, 0], radius = 2)
|
||||
|> hole(pipeHole, %)
|
||||
|> sweep(path = sweepPath)
|
||||
|> appearance(color = "#ff0000", metalness = 50, roughness = 50)
|
||||
|
@ -10,8 +10,9 @@ the provided (x, y) origin point.
|
||||
|
||||
```js
|
||||
circle(
|
||||
data: CircleData,
|
||||
sketchSurfaceOrGroup: SketchOrSurface,
|
||||
sketchOrSurface: SketchOrSurface,
|
||||
center: [number],
|
||||
radius: number,
|
||||
tag?: TagDeclarator,
|
||||
) -> Sketch
|
||||
```
|
||||
@ -21,9 +22,10 @@ circle(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `data` | [`CircleData`](/docs/kcl/types/CircleData) | Data for drawing an circle | Yes |
|
||||
| `sketchSurfaceOrGroup` | [`SketchOrSurface`](/docs/kcl/types/SketchOrSurface) | A sketch surface or a sketch. | Yes |
|
||||
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | | No |
|
||||
| `sketchOrSurface` | [`SketchOrSurface`](/docs/kcl/types/SketchOrSurface) | Plane or surface to sketch on. | Yes |
|
||||
| `center` | `[number]` | The center of the circle. | Yes |
|
||||
| `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
|
||||
|
||||
@ -34,7 +36,7 @@ circle(
|
||||
|
||||
```js
|
||||
exampleSketch = startSketchOn("-XZ")
|
||||
|> circle({ center = [0, 0], radius = 10 }, %)
|
||||
|> circle(center = [0, 0], radius = 10)
|
||||
|
||||
example = extrude(exampleSketch, length = 5)
|
||||
```
|
||||
@ -48,7 +50,7 @@ exampleSketch = startSketchOn("XZ")
|
||||
|> line(end = [0, 30])
|
||||
|> line(end = [-30, 0])
|
||||
|> close()
|
||||
|> hole(circle({ center = [0, 15], radius = 5 }, %), %)
|
||||
|> hole(circle(center = [0, 15], radius = 5), %)
|
||||
|
||||
example = extrude(exampleSketch, length = 5)
|
||||
```
|
||||
|
@ -18,7 +18,7 @@ std::math::PI: number = 3.14159265358979323846264338327950288_
|
||||
circumference = 70
|
||||
|
||||
exampleSketch = startSketchOn("XZ")
|
||||
|> circle({ center = [0, 0], radius = circumference/ (2 * PI) }, %)
|
||||
|> circle(center = [0, 0], radius = circumference/ (2 * PI))
|
||||
|
||||
example = extrude(exampleSketch, length = 5)
|
||||
```
|
||||
|
@ -51,7 +51,7 @@ helixPath = helix(
|
||||
|
||||
// Create a spring by sweeping around the helix path.
|
||||
springSketch = startSketchOn('YZ')
|
||||
|> circle({ center = [0, 0], radius = 0.5 }, %)
|
||||
|> circle(center = [0, 0], radius = 0.5)
|
||||
|> sweep(path = helixPath)
|
||||
```
|
||||
|
||||
@ -74,7 +74,7 @@ helixPath = helix(
|
||||
|
||||
// Create a spring by sweeping around the helix path.
|
||||
springSketch = startSketchOn('XY')
|
||||
|> circle({ center = [0, 0], radius = 0.5 }, %)
|
||||
|> circle(center = [0, 0], radius = 0.5)
|
||||
|> sweep(path = helixPath)
|
||||
```
|
||||
|
||||
@ -98,7 +98,7 @@ helixPath = helix(
|
||||
|
||||
// Create a spring by sweeping around the helix path.
|
||||
springSketch = startSketchOn('XY')
|
||||
|> circle({ center = [0, 0], radius = 1 }, %)
|
||||
|> circle(center = [0, 0], radius = 1)
|
||||
|> sweep(path = helixPath)
|
||||
```
|
||||
|
||||
|
@ -32,7 +32,7 @@ helixRevolutions(
|
||||
|
||||
```js
|
||||
part001 = startSketchOn('XY')
|
||||
|> circle({ center = [5, 5], radius = 10 }, %)
|
||||
|> circle(center = [5, 5], radius = 10)
|
||||
|> extrude(length = 10)
|
||||
|> helixRevolutions({
|
||||
angleStart = 0,
|
||||
|
@ -37,8 +37,8 @@ exampleSketch = startSketchOn(XY)
|
||||
|> line(end = [5, 0])
|
||||
|> line(end = [0, -5])
|
||||
|> close()
|
||||
|> hole(circle({ center = [1, 1], radius = .25 }, %), %)
|
||||
|> hole(circle({ center = [1, 4], radius = .25 }, %), %)
|
||||
|> hole(circle(center = [1, 1], radius = .25), %)
|
||||
|> hole(circle(center = [1, 4], radius = .25), %)
|
||||
|
||||
example = extrude(exampleSketch, length = 1)
|
||||
```
|
||||
@ -57,7 +57,7 @@ fn squareHoleSketch() {
|
||||
}
|
||||
|
||||
exampleSketch = startSketchOn(-XZ)
|
||||
|> circle({ center = [0, 0], radius = 3 }, %)
|
||||
|> circle(center = [0, 0], radius = 3)
|
||||
|> hole(squareHoleSketch(), %)
|
||||
example = extrude(exampleSketch, length = 1)
|
||||
```
|
||||
|
@ -70,17 +70,11 @@ case = startSketchOn('-XZ')
|
||||
|> extrude(length = 65)
|
||||
|
||||
thing1 = startSketchOn(case, 'end')
|
||||
|> circle({
|
||||
center = [-size / 2, -size / 2],
|
||||
radius = 25
|
||||
}, %)
|
||||
|> circle(center = [-size / 2, -size / 2], radius = 25)
|
||||
|> extrude(length = 50)
|
||||
|
||||
thing2 = startSketchOn(case, 'end')
|
||||
|> circle({
|
||||
center = [size / 2, -size / 2],
|
||||
radius = 25
|
||||
}, %)
|
||||
|> circle(center = [size / 2, -size / 2], radius = 25)
|
||||
|> extrude(length = 50)
|
||||
|
||||
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")
|
||||
// Draw n cylinders.
|
||||
startSketchOn('XZ')
|
||||
|> circle({ center = [0, 0], radius = 2 }, %)
|
||||
|> circle(center = [0, 0], radius = 2)
|
||||
|> extrude(length = 5)
|
||||
|> patternTransform(
|
||||
instances = n,
|
||||
|
@ -69,10 +69,10 @@ squareSketch = startSketchOn('XY')
|
||||
|> close()
|
||||
|
||||
circleSketch0 = startSketchOn(offsetPlane('XY', offset = 75))
|
||||
|> circle({ center = [0, 100], radius = 50 }, %)
|
||||
|> circle(center = [0, 100], radius = 50)
|
||||
|
||||
circleSketch1 = startSketchOn(offsetPlane('XY', offset = 150))
|
||||
|> circle({ center = [0, 100], radius = 20 }, %)
|
||||
|> circle(center = [0, 100], radius = 20)
|
||||
|
||||
loft([
|
||||
squareSketch,
|
||||
@ -94,10 +94,10 @@ squareSketch = startSketchOn('XY')
|
||||
|> close()
|
||||
|
||||
circleSketch0 = startSketchOn(offsetPlane('XY', offset = 75))
|
||||
|> circle({ center = [0, 100], radius = 50 }, %)
|
||||
|> circle(center = [0, 100], radius = 50)
|
||||
|
||||
circleSketch1 = startSketchOn(offsetPlane('XY', offset = 150))
|
||||
|> circle({ center = [0, 100], radius = 20 }, %)
|
||||
|> circle(center = [0, 100], radius = 20)
|
||||
|
||||
loft(
|
||||
[
|
||||
|
@ -34,7 +34,7 @@ map(
|
||||
r = 10 // radius
|
||||
fn drawCircle(id) {
|
||||
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.
|
||||
@ -50,7 +50,7 @@ r = 10 // radius
|
||||
// Call `map`, using an anonymous function instead of a named one.
|
||||
circles = map([1..3], fn(id) {
|
||||
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()
|
||||
|
||||
circleSketch = startSketchOn(offsetPlane('XY', offset = 150))
|
||||
|> circle({ center = [0, 100], radius = 50 }, %)
|
||||
|> circle(center = [0, 100], radius = 50)
|
||||
|
||||
loft([squareSketch, circleSketch])
|
||||
```
|
||||
@ -59,7 +59,7 @@ squareSketch = startSketchOn('XZ')
|
||||
|> close()
|
||||
|
||||
circleSketch = startSketchOn(offsetPlane('XZ', offset = 150))
|
||||
|> circle({ center = [0, 100], radius = 50 }, %)
|
||||
|> circle(center = [0, 100], radius = 50)
|
||||
|
||||
loft([squareSketch, circleSketch])
|
||||
```
|
||||
@ -77,7 +77,7 @@ squareSketch = startSketchOn('YZ')
|
||||
|> close()
|
||||
|
||||
circleSketch = startSketchOn(offsetPlane('YZ', offset = 150))
|
||||
|> circle({ center = [0, 100], radius = 50 }, %)
|
||||
|> circle(center = [0, 100], radius = 50)
|
||||
|
||||
loft([squareSketch, circleSketch])
|
||||
```
|
||||
@ -95,7 +95,7 @@ squareSketch = startSketchOn('-XZ')
|
||||
|> close()
|
||||
|
||||
circleSketch = startSketchOn(offsetPlane('-XZ', offset = -150))
|
||||
|> circle({ center = [0, 100], radius = 50 }, %)
|
||||
|> circle(center = [0, 100], radius = 50)
|
||||
|
||||
loft([squareSketch, circleSketch])
|
||||
```
|
||||
@ -106,7 +106,7 @@ loft([squareSketch, circleSketch])
|
||||
// A circle on the XY plane
|
||||
startSketchOn("XY")
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> circle({ radius = 10, center = [0, 0] }, %)
|
||||
|> circle(radius = 10, center = [0, 0])
|
||||
|
||||
// Triangle on the plane 4 units above
|
||||
startSketchOn(offsetPlane("XY", offset = 4))
|
||||
|
@ -42,7 +42,7 @@ patternCircular3d(
|
||||
|
||||
```js
|
||||
exampleSketch = startSketchOn('XZ')
|
||||
|> circle({ center = [0, 0], radius = 1 }, %)
|
||||
|> circle(center = [0, 0], radius = 1)
|
||||
|
||||
example = extrude(exampleSketch, length = -5)
|
||||
|> patternCircular3d(
|
||||
|
@ -38,7 +38,7 @@ patternLinear2d(
|
||||
|
||||
```js
|
||||
exampleSketch = startSketchOn('XZ')
|
||||
|> circle({ center = [0, 0], radius = 1 }, %)
|
||||
|> circle(center = [0, 0], radius = 1)
|
||||
|> patternLinear2d(axis = [1, 0], instances = 7, distance = 4)
|
||||
|
||||
example = extrude(exampleSketch, length = 1)
|
||||
|
@ -64,17 +64,11 @@ case = startSketchOn('XY')
|
||||
|> extrude(length = 65)
|
||||
|
||||
thing1 = startSketchOn(case, 'end')
|
||||
|> circle({
|
||||
center = [-size / 2, -size / 2],
|
||||
radius = 25
|
||||
}, %)
|
||||
|> circle(center = [-size / 2, -size / 2], radius = 25)
|
||||
|> extrude(length = 50)
|
||||
|
||||
thing2 = startSketchOn(case, 'end')
|
||||
|> circle({
|
||||
center = [size / 2, -size / 2],
|
||||
radius = 25
|
||||
}, %)
|
||||
|> circle(center = [size / 2, -size / 2], radius = 25)
|
||||
|> extrude(length = 50)
|
||||
|
||||
// We pass in the "case" here since we want to pattern the whole sketch.
|
||||
@ -101,10 +95,7 @@ case = startSketchOn('XY')
|
||||
|> extrude(length = 65)
|
||||
|
||||
thing1 = startSketchOn(case, 'end')
|
||||
|> circle({
|
||||
center = [-size / 2, -size / 2],
|
||||
radius = 25
|
||||
}, %)
|
||||
|> circle(center = [-size / 2, -size / 2], radius = 25)
|
||||
|> extrude(length = 50)
|
||||
|
||||
// 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.
|
||||
sketch001 = startSketchOn('XZ')
|
||||
|> circle({ center = [0, 0], radius = 2 }, %)
|
||||
|> circle(center = [0, 0], radius = 2)
|
||||
|> extrude(length = 5)
|
||||
|> patternTransform(instances = 4, transform = transform)
|
||||
```
|
||||
@ -84,7 +84,7 @@ fn transform(id) {
|
||||
}
|
||||
|
||||
sketch001 = startSketchOn('XZ')
|
||||
|> circle({ center = [0, 0], radius = 2 }, %)
|
||||
|> circle(center = [0, 0], radius = 2)
|
||||
|> extrude(length = 5)
|
||||
|> patternTransform(instances = 4, transform = transform)
|
||||
```
|
||||
@ -184,7 +184,7 @@ fn transform(replicaId) {
|
||||
fn layer() {
|
||||
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)
|
||||
}
|
||||
// The vase is 100 layers tall.
|
||||
|
@ -42,7 +42,7 @@ fn transform(id) {
|
||||
|
||||
// Sketch 4 circles.
|
||||
sketch001 = startSketchOn('XZ')
|
||||
|> circle({ center = [0, 0], radius = 2 }, %)
|
||||
|> circle(center = [0, 0], radius = 2)
|
||||
|> patternTransform2d(instances = 4, transform = transform)
|
||||
```
|
||||
|
||||
|
@ -31,10 +31,7 @@ pi() -> number
|
||||
circumference = 70
|
||||
|
||||
exampleSketch = startSketchOn("XZ")
|
||||
|> circle({
|
||||
center = [0, 0],
|
||||
radius = circumference / (2 * pi())
|
||||
}, %)
|
||||
|> circle(center = [0, 0], radius = circumference / (2 * pi()))
|
||||
|
||||
example = extrude(exampleSketch, length = 5)
|
||||
```
|
||||
|
@ -51,7 +51,7 @@ part001 = startSketchOn('XY')
|
||||
```js
|
||||
// A donut shape.
|
||||
sketch001 = startSketchOn('XY')
|
||||
|> circle({ center = [15, 0], radius = 5 }, %)
|
||||
|> circle(center = [15, 0], radius = 5)
|
||||
|> revolve({ angle = 360, axis = 'y' }, %)
|
||||
```
|
||||
|
||||
@ -106,7 +106,7 @@ box = startSketchOn('XY')
|
||||
|> extrude(length = 20)
|
||||
|
||||
sketch001 = startSketchOn(box, "END")
|
||||
|> circle({ center = [10, 10], radius = 4 }, %)
|
||||
|> circle(center = [10, 10], radius = 4)
|
||||
|> revolve({ angle = -90, axis = 'y' }, %)
|
||||
```
|
||||
|
||||
@ -122,7 +122,7 @@ box = startSketchOn('XY')
|
||||
|> extrude(length = 20)
|
||||
|
||||
sketch001 = startSketchOn(box, "END")
|
||||
|> circle({ center = [10, 10], radius = 4 }, %)
|
||||
|> circle(center = [10, 10], radius = 4)
|
||||
|> revolve({
|
||||
angle = 90,
|
||||
axis = getOppositeEdge(revolveAxis)
|
||||
@ -141,7 +141,7 @@ box = startSketchOn('XY')
|
||||
|> extrude(length = 20)
|
||||
|
||||
sketch001 = startSketchOn(box, "END")
|
||||
|> circle({ center = [10, 10], radius = 4 }, %)
|
||||
|> circle(center = [10, 10], radius = 4)
|
||||
|> revolve({
|
||||
angle = 90,
|
||||
axis = getOppositeEdge(revolveAxis),
|
||||
|
@ -69,10 +69,10 @@ sweepPath = startSketchOn('XZ')
|
||||
|
||||
// Create a hole for the pipe.
|
||||
pipeHole = startSketchOn('XY')
|
||||
|> circle({ center = [0, 0], radius = 1.5 }, %)
|
||||
|> circle(center = [0, 0], radius = 1.5)
|
||||
|
||||
sweepSketch = startSketchOn('XY')
|
||||
|> circle({ center = [0, 0], radius = 2 }, %)
|
||||
|> circle(center = [0, 0], radius = 2)
|
||||
|> hole(pipeHole, %)
|
||||
|> sweep(path = sweepPath)
|
||||
|> rotate(roll = 10, pitch = 10, yaw = 90)
|
||||
@ -95,10 +95,10 @@ sweepPath = startSketchOn('XZ')
|
||||
|
||||
// Create a hole for the pipe.
|
||||
pipeHole = startSketchOn('XY')
|
||||
|> circle({ center = [0, 0], radius = 1.5 }, %)
|
||||
|> circle(center = [0, 0], radius = 1.5)
|
||||
|
||||
sweepSketch = startSketchOn('XY')
|
||||
|> circle({ center = [0, 0], radius = 2 }, %)
|
||||
|> circle(center = [0, 0], radius = 2)
|
||||
|> hole(pipeHole, %)
|
||||
|> sweep(path = sweepPath)
|
||||
|> rotate(axis = [0, 0, 1.0], angle = 90)
|
||||
|
@ -49,10 +49,10 @@ sweepPath = startSketchOn('XZ')
|
||||
|
||||
// Create a hole for the pipe.
|
||||
pipeHole = startSketchOn('XY')
|
||||
|> circle({ center = [0, 0], radius = 1.5 }, %)
|
||||
|> circle(center = [0, 0], radius = 1.5)
|
||||
|
||||
sweepSketch = startSketchOn('XY')
|
||||
|> circle({ center = [0, 0], radius = 2 }, %)
|
||||
|> circle(center = [0, 0], radius = 2)
|
||||
|> hole(pipeHole, %)
|
||||
|> sweep(path = sweepPath)
|
||||
|> scale(scale = [1.0, 1.0, 2.5])
|
||||
|
@ -40,10 +40,7 @@ cube = startSketchOn('XY')
|
||||
fn cylinder(radius, tag) {
|
||||
return startSketchOn('XY')
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> circle({
|
||||
radius = radius,
|
||||
center = segEnd(tag)
|
||||
}, %)
|
||||
|> circle(radius = radius, center = segEnd(tag))
|
||||
|> extrude(length = radius)
|
||||
}
|
||||
|
||||
|
@ -40,10 +40,7 @@ cube = startSketchOn('XY')
|
||||
fn cylinder(radius, tag) {
|
||||
return startSketchOn('XY')
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> circle({
|
||||
radius = radius,
|
||||
center = segStart(tag)
|
||||
}, %)
|
||||
|> circle(radius = radius, center = segStart(tag))
|
||||
|> extrude(length = radius)
|
||||
}
|
||||
|
||||
|
@ -108,17 +108,11 @@ case = startSketchOn('-XZ')
|
||||
|> extrude(length = 65)
|
||||
|
||||
thing1 = startSketchOn(case, 'end')
|
||||
|> circle({
|
||||
center = [-size / 2, -size / 2],
|
||||
radius = 25
|
||||
}, %)
|
||||
|> circle(center = [-size / 2, -size / 2], radius = 25)
|
||||
|> extrude(length = 50)
|
||||
|
||||
thing2 = startSketchOn(case, 'end')
|
||||
|> circle({
|
||||
center = [size / 2, -size / 2],
|
||||
radius = 25
|
||||
}, %)
|
||||
|> circle(center = [size / 2, -size / 2], radius = 25)
|
||||
|> extrude(length = 50)
|
||||
|
||||
// We put "case" in the shell function to shell the entire object.
|
||||
@ -139,17 +133,11 @@ case = startSketchOn('XY')
|
||||
|> extrude(length = 65)
|
||||
|
||||
thing1 = startSketchOn(case, 'end')
|
||||
|> circle({
|
||||
center = [-size / 2, -size / 2],
|
||||
radius = 25
|
||||
}, %)
|
||||
|> circle(center = [-size / 2, -size / 2], radius = 25)
|
||||
|> extrude(length = 50)
|
||||
|
||||
thing2 = startSketchOn(case, 'end')
|
||||
|> circle({
|
||||
center = [size / 2, -size / 2],
|
||||
radius = 25
|
||||
}, %)
|
||||
|> circle(center = [size / 2, -size / 2], radius = 25)
|
||||
|> extrude(length = 50)
|
||||
|
||||
// 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)
|
||||
|
||||
thing1 = startSketchOn(case, 'end')
|
||||
|> circle({
|
||||
center = [-size / 2, -size / 2],
|
||||
radius = 25
|
||||
}, %)
|
||||
|> circle(center = [-size / 2, -size / 2], radius = 25)
|
||||
|> extrude(length = 50)
|
||||
|
||||
thing2 = startSketchOn(case, 'end')
|
||||
|> circle({
|
||||
center = [size / 2, -size / 2],
|
||||
radius = 25
|
||||
}, %)
|
||||
|> circle(center = [size / 2, -size / 2], radius = 25)
|
||||
|> extrude(length = 50)
|
||||
|
||||
// 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.
|
||||
pipeHole = startSketchOn('XY')
|
||||
|> circle({ center = [0, 0], radius = 1.5 }, %)
|
||||
|> circle(center = [0, 0], radius = 1.5)
|
||||
|
||||
sweepSketch = startSketchOn('XY')
|
||||
|> circle({ center = [0, 0], radius = 2 }, %)
|
||||
|> circle(center = [0, 0], radius = 2)
|
||||
|> hole(pipeHole, %)
|
||||
|> sweep(path = sweepPath)
|
||||
```
|
||||
@ -75,7 +75,7 @@ helixPath = helix(
|
||||
|
||||
// Create a spring by sweeping around the helix path.
|
||||
springSketch = startSketchOn('YZ')
|
||||
|> circle({ center = [0, 0], radius = 1 }, %)
|
||||
|> circle(center = [0, 0], radius = 1)
|
||||
|> sweep(path = helixPath)
|
||||
```
|
||||
|
||||
|
@ -91,7 +91,7 @@ bottom = startSketchOn("XY")
|
||||
|
||||
```js
|
||||
circSketch = startSketchOn("XY")
|
||||
|> circle({ center = [0, 0], radius = 3 }, %, $circ)
|
||||
|> circle(center = [0, 0], radius = 3, tag = $circ)
|
||||
|
||||
triangleSketch = startSketchOn("XY")
|
||||
|> startProfileAt([-5, 0], %)
|
||||
|
@ -47,10 +47,10 @@ sweepPath = startSketchOn('XZ')
|
||||
|
||||
// Create a hole for the pipe.
|
||||
pipeHole = startSketchOn('XY')
|
||||
|> circle({ center = [0, 0], radius = 1.5 }, %)
|
||||
|> circle(center = [0, 0], radius = 1.5)
|
||||
|
||||
sweepSketch = startSketchOn('XY')
|
||||
|> circle({ center = [0, 0], radius = 2 }, %)
|
||||
|> circle(center = [0, 0], radius = 2)
|
||||
|> hole(pipeHole, %)
|
||||
|> sweep(path = sweepPath)
|
||||
|> 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('Enter')
|
||||
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), %)
|
||||
|> extrude(length = height)`)
|
||||
|
||||
|
@ -50,13 +50,13 @@ const FEATURE_TREE_SKETCH_CODE = `sketch001 = startSketchOn('XZ')
|
||||
|> close(%)
|
||||
extrude001 = extrude(sketch001, length = 10)
|
||||
sketch002 = startSketchOn(extrude001, rectangleSegmentB001)
|
||||
|> circle({
|
||||
|> circle(
|
||||
center = [-1, 2],
|
||||
radius = .5
|
||||
}, %)
|
||||
)
|
||||
plane001 = offsetPlane('XZ', offset = -5)
|
||||
sketch003 = startSketchOn(plane001)
|
||||
|> circle({ center = [0, 0], radius = 5 }, %)
|
||||
|> circle(center = [0, 0], radius = 5)
|
||||
`
|
||||
|
||||
test.describe('Feature Tree pane', () => {
|
||||
@ -228,11 +228,11 @@ test.describe('Feature Tree pane', () => {
|
||||
}) => {
|
||||
const initialInput = '23'
|
||||
const initialCode = `sketch001 = startSketchOn('XZ')
|
||||
|> circle({ center = [0, 0], radius = 5 }, %)
|
||||
|> circle(center = [0, 0], radius = 5)
|
||||
renamedExtrude = extrude(sketch001, length = ${initialInput})`
|
||||
const newConstantName = 'distance001'
|
||||
const expectedCode = `sketch001 = startSketchOn('XZ')
|
||||
|> circle({ center = [0, 0], radius = 5 }, %)
|
||||
|> circle(center = [0, 0], radius = 5)
|
||||
${newConstantName} = 23
|
||||
renamedExtrude = extrude(sketch001, length = ${newConstantName})`
|
||||
|
||||
|
@ -61,7 +61,7 @@ export class ToolbarFixture {
|
||||
this.rectangleBtn = page.getByTestId('corner-rectangle')
|
||||
this.lengthConstraintBtn = page.getByTestId('constraint-length')
|
||||
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.createFileBtn = page.getByTestId('create-file-button')
|
||||
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 moveToCircle()
|
||||
const circleSnippet =
|
||||
'circle({ center = [318.33, 168.1], radius = 182.8 }, %)'
|
||||
const circleSnippet = 'circle(center = [318.33, 168.1], radius = 182.8)'
|
||||
await editor.expectState({
|
||||
activeLines: ["constsketch002=startSketchOn('XZ')"],
|
||||
activeLines: ["sketch002=startSketchOn('XZ')"],
|
||||
highlightedCode: circleSnippet,
|
||||
diagnostics: [],
|
||||
})
|
||||
|
||||
await test.step('check code model connection works and that button is still enable once circle is selected ', async () => {
|
||||
await moveToCircle()
|
||||
const circleSnippet =
|
||||
'circle({ center = [318.33, 168.1], radius = 182.8 }, %)'
|
||||
const circleSnippet = 'circle(center = [318.33, 168.1], radius = 182.8)'
|
||||
await editor.expectState({
|
||||
activeLines: ["constsketch002=startSketchOn('XZ')"],
|
||||
activeLines: ["sketch002=startSketchOn('XZ')"],
|
||||
highlightedCode: circleSnippet,
|
||||
diagnostics: [],
|
||||
})
|
||||
|
||||
await clickCircle()
|
||||
await editor.expectState({
|
||||
activeLines: [circleSnippet.slice(-5)],
|
||||
activeLines: ['|>' + circleSnippet],
|
||||
highlightedCode: circleSnippet,
|
||||
diagnostics: [],
|
||||
})
|
||||
@ -581,7 +579,7 @@ profile001 = startProfileAt([205.96, 254.59], sketch002)
|
||||
const u = await getUtils(page)
|
||||
|
||||
const initialCode = `closedSketch = startSketchOn('XZ')
|
||||
|> circle({ center = [8, 5], radius = 2 }, %)
|
||||
|> circle(center = [8, 5], radius = 2)
|
||||
openSketch = startSketchOn('XY')
|
||||
|> startProfileAt([-5, 0], %)
|
||||
|> line(endAbsolute = [0, 5])
|
||||
@ -633,8 +631,8 @@ openSketch = startSketchOn('XY')
|
||||
await expect(toolbar.startSketchBtn).not.toBeVisible()
|
||||
await expect(toolbar.exitSketchBtn).toBeVisible()
|
||||
await editor.expectState({
|
||||
activeLines: [`|>circle({center=[8,5],radius=2},%)`],
|
||||
highlightedCode: 'circle({center=[8,5],radius=2},%)',
|
||||
activeLines: [`|>circle(center=[8,5],radius=2)`],
|
||||
highlightedCode: 'circle(center=[8,5],radius=2)',
|
||||
diagnostics: [],
|
||||
})
|
||||
})
|
||||
@ -1192,10 +1190,10 @@ openSketch = startSketchOn('XY')
|
||||
cmdBar,
|
||||
}) => {
|
||||
const initialCode = `sketch001 = startSketchOn('XZ')
|
||||
|> circle({ center = [0, 0], radius = 30 }, %)
|
||||
|> circle(center = [0, 0], radius = 30)
|
||||
plane001 = offsetPlane('XZ', offset = 50)
|
||||
sketch002 = startSketchOn(plane001)
|
||||
|> circle({ center = [0, 0], radius = 20 }, %)
|
||||
|> circle(center = [0, 0], radius = 20)
|
||||
`
|
||||
await context.addInitScript((initialCode) => {
|
||||
localStorage.setItem('persistCode', initialCode)
|
||||
@ -1278,10 +1276,10 @@ openSketch = startSketchOn('XY')
|
||||
scene,
|
||||
}) => {
|
||||
const initialCode = `sketch001 = startSketchOn('XZ')
|
||||
|> circle({ center = [0, 0], radius = 30 }, %)
|
||||
|> circle(center = [0, 0], radius = 30)
|
||||
plane001 = offsetPlane('XZ', offset = 50)
|
||||
sketch002 = startSketchOn(plane001)
|
||||
|> circle({ center = [0, 0], radius = 20 }, %)
|
||||
|> circle(center = [0, 0], radius = 20)
|
||||
loft001 = loft([sketch001, sketch002])
|
||||
`
|
||||
await context.addInitScript((initialCode) => {
|
||||
@ -1304,7 +1302,7 @@ loft001 = loft([sketch001, sketch002])
|
||||
await scene.expectPixelColor([89, 89, 89], testPoint, 15)
|
||||
await clickOnSketch1()
|
||||
await expect(page.locator('.cm-activeLine')).toHaveText(`
|
||||
|> circle({ center = [0, 0], radius = 30 }, %)
|
||||
|> circle(center = [0, 0], radius = 30)
|
||||
`)
|
||||
await page.keyboard.press('Delete')
|
||||
// Check for sketch 1
|
||||
@ -1315,7 +1313,7 @@ loft001 = loft([sketch001, sketch002])
|
||||
await page.waitForTimeout(1000)
|
||||
await clickOnSketch2()
|
||||
await expect(page.locator('.cm-activeLine')).toHaveText(`
|
||||
|> circle({ center = [0, 0], radius = 20 }, %)
|
||||
|> circle(center = [0, 0], radius = 20)
|
||||
`)
|
||||
await page.keyboard.press('Delete')
|
||||
// Check for plane001
|
||||
@ -1344,10 +1342,10 @@ loft001 = loft([sketch001, sketch002])
|
||||
cmdBar,
|
||||
}) => {
|
||||
const initialCode = `sketch001 = startSketchOn('YZ')
|
||||
|> circle({
|
||||
|> circle(
|
||||
center = [0, 0],
|
||||
radius = 500
|
||||
}, %)
|
||||
)
|
||||
sketch002 = startSketchOn('XZ')
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> xLine(-500, %)
|
||||
@ -1438,10 +1436,10 @@ sketch002 = startSketchOn('XZ')
|
||||
cmdBar,
|
||||
}) => {
|
||||
const initialCode = `sketch001 = startSketchOn('YZ')
|
||||
|> circle({
|
||||
|> circle(
|
||||
center = [0, 0],
|
||||
radius = 500
|
||||
}, %)
|
||||
)
|
||||
sketch002 = startSketchOn('XZ')
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> xLine(-500, %)
|
||||
@ -2270,7 +2268,7 @@ chamfer04 = chamfer(extrude001, length = 5, tags = [getOppositeEdge(seg02)])
|
||||
cmdBar,
|
||||
}) => {
|
||||
const initialCode = `sketch001 = startSketchOn('XZ')
|
||||
|> circle({ center = [0, 0], radius = 30 }, %)
|
||||
|> circle(center = [0, 0], radius = 30)
|
||||
extrude001 = extrude(sketch001, length = 30)
|
||||
`
|
||||
await context.addInitScript((initialCode) => {
|
||||
@ -2445,19 +2443,19 @@ extrude001 = extrude(sketch001, length = 40)
|
||||
|
||||
const shellSketchOnFacesCases = [
|
||||
`sketch001 = startSketchOn('XZ')
|
||||
|> circle({ center = [0, 0], radius = 100 }, %)
|
||||
|> circle(center = [0, 0], radius = 100)
|
||||
|> extrude(length = 100)
|
||||
|
||||
sketch002 = startSketchOn(sketch001, 'END')
|
||||
|> circle({ center = [0, 0], radius = 50 }, %)
|
||||
|> circle(center = [0, 0], radius = 50)
|
||||
|> extrude(length = 50)
|
||||
`,
|
||||
`sketch001 = startSketchOn('XZ')
|
||||
|> circle({ center = [0, 0], radius = 100 }, %)
|
||||
|> circle(center = [0, 0], radius = 100)
|
||||
extrude001 = extrude(sketch001, length = 100)
|
||||
|
||||
sketch002 = startSketchOn(extrude001, 'END')
|
||||
|> circle({ center = [0, 0], radius = 50 }, %)
|
||||
|> circle(center = [0, 0], radius = 50)
|
||||
extrude002 = extrude(sketch002, length = 50)
|
||||
`,
|
||||
]
|
||||
@ -2631,10 +2629,10 @@ profile001 = startProfileAt([-20, 20], sketch001)
|
||||
cmdBar,
|
||||
}) => {
|
||||
const initialCode = `sketch001 = startSketchOn('YZ')
|
||||
|> circle({
|
||||
|> circle(
|
||||
center = [0, 0],
|
||||
radius = 500
|
||||
}, %)
|
||||
)
|
||||
sketch002 = startSketchOn('XZ')
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> xLine(-2000, %)
|
||||
@ -2761,10 +2759,10 @@ segAng(rectangleSegmentA001),
|
||||
|> close()
|
||||
extrude001 = extrude(sketch001, length = 50)
|
||||
sketch002 = startSketchOn(extrude001, rectangleSegmentA001)
|
||||
|> circle({
|
||||
|> circle(
|
||||
center = [-11.34, 10.0],
|
||||
radius = 8.69
|
||||
}, %)
|
||||
)
|
||||
`
|
||||
await context.addInitScript((initialCode) => {
|
||||
localStorage.setItem('persistCode', initialCode)
|
||||
@ -2811,10 +2809,10 @@ radius = 8.69
|
||||
|> close()
|
||||
extrude001 = extrude(sketch001, length = 5)
|
||||
sketch003 = startSketchOn(extrude001, 'START')
|
||||
|> circle({
|
||||
|> circle(
|
||||
center = [-0.69, 0.56],
|
||||
radius = 0.28
|
||||
}, %)
|
||||
)
|
||||
`
|
||||
|
||||
await context.addInitScript((initialCode) => {
|
||||
@ -2849,10 +2847,11 @@ radius = 8.69
|
||||
cmdBar,
|
||||
}) => {
|
||||
const initialCode = `sketch001 = startSketchOn('XZ')
|
||||
profile001 = circle({
|
||||
profile001 = circle(
|
||||
sketch001,
|
||||
center = [0, 0],
|
||||
radius = 100
|
||||
}, sketch001)
|
||||
)
|
||||
extrude001 = extrude(profile001, length = 100)
|
||||
`
|
||||
await context.addInitScript((initialCode) => {
|
||||
|
@ -367,7 +367,7 @@ sketch001 = startProfileAt([12.34, -12.34], sketch002)
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
`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
|
||||
|
||||
await page
|
||||
.getByText('circle({ center = [4.61, -5.01], radius = 8 }, %)')
|
||||
.click()
|
||||
await page.getByText('circle(center = [4.61, -5.01], radius = 8)').click()
|
||||
await expect(
|
||||
page.getByRole('button', { name: 'Edit Sketch' })
|
||||
).toBeVisible()
|
||||
@ -444,7 +442,7 @@ sketch001 = startProfileAt([12.34, -12.34], sketch002)
|
||||
// expect the code to have changed
|
||||
await editor.expectEditor.toContain(
|
||||
`sketch001 = startSketchOn('XZ')
|
||||
|> circle({ center = [7.26, -2.37], radius = 11.44 }, %)`,
|
||||
|> circle(center = [7.26, -2.37], radius = 11.44)`,
|
||||
{ shouldNormalise: true }
|
||||
)
|
||||
})
|
||||
@ -1390,12 +1388,14 @@ profile002 = startProfileAt([117.2, 56.08], sketch001)
|
||||
await toolbar.circleBtn.click()
|
||||
await page.waitForTimeout(100)
|
||||
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 toolbar.lineBtn.click()
|
||||
await editor.expectEditor.not.toContain('profile003 = circle({')
|
||||
await editor.expectEditor.not.toContain('profile003 = circle(')
|
||||
})
|
||||
|
||||
const [circle3Point1] = scene.makeMouseHelpers(650, 200)
|
||||
@ -1649,7 +1649,7 @@ profile003 = startProfileAt([206.63, -56.73], sketch001)
|
||||
await circle1Radius({ delay: 500 })
|
||||
await page.waitForTimeout(300)
|
||||
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 () => {
|
||||
@ -1661,7 +1661,7 @@ profile003 = startProfileAt([206.63, -56.73], sketch001)
|
||||
await page.waitForTimeout(300)
|
||||
await circle2Radius()
|
||||
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 () => {
|
||||
@ -1855,7 +1855,7 @@ profile002 = startProfileAt([11.19, 5.02], sketch001)
|
||||
], %)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> 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])
|
||||
`
|
||||
)
|
||||
@ -1931,7 +1931,7 @@ profile004 = circleThreePoint(sketch001, p1 = [13.44, -6.8], p2 = [13.39, -2.07]
|
||||
await dragCircleTo()
|
||||
await page.mouse.up()
|
||||
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(%)])
|
||||
|> 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(%)])
|
||||
|> close()
|
||||
profile004 = circle({
|
||||
profile004 = circle(
|
||||
sketch001,
|
||||
center = [280.45, 47.57],
|
||||
radius = 55.26
|
||||
}, sketch001)
|
||||
)
|
||||
extrude002 = extrude(profile001, length = 50)
|
||||
extrude001 = extrude(profile003, length = 5)
|
||||
`
|
||||
@ -2173,10 +2174,11 @@ extrude001 = extrude(profile003, length = 5)
|
||||
'myVar = 5',
|
||||
`myVar = 5
|
||||
sketch001 = startSketchOn('XZ')
|
||||
profile001 = circle({
|
||||
profile001 = circle(
|
||||
sketch001,
|
||||
center = [12.41, 3.87],
|
||||
radius = myVar
|
||||
}, sketch001)`
|
||||
)`
|
||||
)
|
||||
|
||||
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(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> 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)
|
||||
|> line(end = [2.38, 5.62])
|
||||
|> line(end = [2.13, -5.57])
|
||||
@ -2345,10 +2347,11 @@ profile009 = startProfileAt([5.23, 1.95], sketch003)
|
||||
|> line(end = [7.34, -2.75])
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
profile010 = circle({
|
||||
profile010 = circle(
|
||||
sketch003,
|
||||
center = [7.18, -2.11],
|
||||
radius = 2.67
|
||||
}, sketch003)
|
||||
)
|
||||
profile011 = startProfileAt([5.07, -6.39], sketch003)
|
||||
|> angledLine([0, 4.54], %, $rectangleSegmentA002)
|
||||
|> angledLine([
|
||||
@ -2468,7 +2471,7 @@ extrude003 = extrude(profile011, length = 2.5)
|
||||
})
|
||||
|
||||
const verifyCapProfilesAreDrawn = async () =>
|
||||
test.step('verify wall profiles are drawn', async () => {
|
||||
test.step('verify cap profiles are drawn', async () => {
|
||||
// open polygon
|
||||
await scene.expectPixelColor(
|
||||
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) {
|
||||
await test.step(title, async () => {
|
||||
await camPositionForSelectingSketchOnCapProfiles()
|
||||
await page.waitForTimeout(100)
|
||||
await selectClick()
|
||||
await page.waitForTimeout(100)
|
||||
await toolbar.editSketch()
|
||||
await page.waitForTimeout(600)
|
||||
await verifyCapProfilesAreDrawn()
|
||||
@ -2533,7 +2537,7 @@ extrude003 = extrude(profile011, length = 2.5)
|
||||
await page.waitForTimeout(100)
|
||||
})
|
||||
}
|
||||
})
|
||||
}) */
|
||||
}
|
||||
)
|
||||
test(
|
||||
|
@ -599,7 +599,7 @@ test(
|
||||
mask: [page.getByTestId('model-state-indicator')],
|
||||
})
|
||||
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()
|
||||
const sketch001 = startSketchOn('XZ')
|
||||
|> circle({
|
||||
center: [818.33, 168.1],
|
||||
radius: 182.8
|
||||
}, %)
|
||||
|> circle(center = [818.33, 168.1], radius = 182.8)
|
||||
|> extrude(length = 50)
|
||||
`
|
||||
)
|
||||
@ -295,12 +292,11 @@ test.describe(`Testing gizmo, fixture-based`, () => {
|
||||
const [clickCircle, moveToCircle] = scene.makeMouseHelpers(582, 217)
|
||||
|
||||
await test.step(`Select an edge of this circle`, async () => {
|
||||
const circleSnippet =
|
||||
'circle({ center: [818.33, 168.1], radius: 182.8 }, %)'
|
||||
const circleSnippet = 'circle(center = [818.33, 168.1], radius = 182.8)'
|
||||
await moveToCircle()
|
||||
await clickCircle()
|
||||
await editor.expectState({
|
||||
activeLines: [circleSnippet.slice(-5)],
|
||||
activeLines: ['|>' + circleSnippet],
|
||||
highlightedCode: circleSnippet,
|
||||
diagnostics: [],
|
||||
})
|
||||
|
@ -825,7 +825,7 @@ test.describe('Testing segment overlays', { tag: ['@skipWin'] }, () => {
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
`part001 = startSketchOn('XZ')
|
||||
|> circle({ center = [1 + 0, 0], radius = 8 }, %)
|
||||
|> circle(center = [1 + 0, 0], radius = 8)
|
||||
`
|
||||
)
|
||||
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.closeDebugPanel()
|
||||
|
||||
await page
|
||||
.getByText('circle({ center = [1 + 0, 0], radius = 8 }, %)')
|
||||
.click()
|
||||
await page.getByText('circle(center = [1 + 0, 0], radius = 8)').click()
|
||||
await page.waitForTimeout(100)
|
||||
await page.getByRole('button', { name: 'Edit Sketch' }).click()
|
||||
await page.waitForTimeout(500)
|
||||
@ -859,11 +857,9 @@ test.describe('Testing segment overlays', { tag: ['@skipWin'] }, () => {
|
||||
await clickConstrained({
|
||||
hoverPos,
|
||||
constraintType: 'xAbsolute',
|
||||
expectBeforeUnconstrained:
|
||||
'circle({ center = [1 + 0, 0], radius = 8 }, %)',
|
||||
expectAfterUnconstrained:
|
||||
'circle({ center = [1, 0], radius = 8 }, %)',
|
||||
expectFinal: 'circle({ center = [xAbs001, 0], radius = 8 }, %)',
|
||||
expectBeforeUnconstrained: 'circle(center = [1 + 0, 0], radius = 8)',
|
||||
expectAfterUnconstrained: 'circle(center = [1, 0], radius = 8)',
|
||||
expectFinal: 'circle(center = [xAbs001, 0], radius = 8)',
|
||||
ang: ang + 105,
|
||||
steps: 6,
|
||||
locator: '[data-overlay-toolbar-index="0"]',
|
||||
@ -873,10 +869,10 @@ test.describe('Testing segment overlays', { tag: ['@skipWin'] }, () => {
|
||||
hoverPos,
|
||||
constraintType: 'yAbsolute',
|
||||
expectBeforeUnconstrained:
|
||||
'circle({ center = [xAbs001, 0], radius = 8 }, %)',
|
||||
'circle(center = [xAbs001, 0], radius = 8)',
|
||||
expectAfterUnconstrained:
|
||||
'circle({ center = [xAbs001, yAbs001], radius = 8 }, %)',
|
||||
expectFinal: 'circle({ center = [xAbs001, 0], radius = 8 }, %)',
|
||||
'circle(center = [xAbs001, yAbs001], radius = 8)',
|
||||
expectFinal: 'circle(center = [xAbs001, 0], radius = 8)',
|
||||
ang: ang + 180,
|
||||
steps: 30,
|
||||
locator: '[data-overlay-toolbar-index="0"]',
|
||||
@ -886,10 +882,10 @@ test.describe('Testing segment overlays', { tag: ['@skipWin'] }, () => {
|
||||
hoverPos,
|
||||
constraintType: 'radius',
|
||||
expectBeforeUnconstrained:
|
||||
'circle({ center = [xAbs001, 0], radius = 8 }, %)',
|
||||
'circle(center = [xAbs001, 0], radius = 8)',
|
||||
expectAfterUnconstrained:
|
||||
'circle({ center = [xAbs001, 0], radius = radius001 }, %)',
|
||||
expectFinal: 'circle({ center = [xAbs001, 0], radius = 8 }, %)',
|
||||
'circle(center = [xAbs001, 0], radius = radius001)',
|
||||
expectFinal: 'circle(center = [xAbs001, 0], radius = 8)',
|
||||
ang: ang + 105,
|
||||
steps: 10,
|
||||
locator: '[data-overlay-toolbar-index="0"]',
|
||||
|
@ -320,10 +320,11 @@ part009 = startSketchOn('XY')
|
||||
|> close()
|
||||
rev = revolve({ axis = 'y' }, part009)
|
||||
sketch006 = startSketchOn('XY')
|
||||
profile001 = circle({
|
||||
profile001 = circle(
|
||||
sketch006,
|
||||
center = [42.91, -70.42],
|
||||
radius = 17.96
|
||||
}, sketch006)
|
||||
)
|
||||
profile002 = startProfileAt([86.92, -63.81], sketch006)
|
||||
|> angledLine([0, 63.81], %, $rectangleSegmentA001)
|
||||
|> angledLine([
|
||||
|
@ -91,7 +91,7 @@
|
||||
"fmt-check": "prettier --check ./src *.ts *.json *.js ./e2e ./packages",
|
||||
"fetch:wasm": "./scripts/get-latest-wasm-bundle.sh",
|
||||
"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: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",
|
||||
|
@ -125,6 +125,34 @@
|
||||
"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."
|
||||
},
|
||||
{
|
||||
"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",
|
||||
"pathFromProjectDirectoryToFirstFile": "hex-nut/main.kcl",
|
||||
|
@ -1607,15 +1607,15 @@ export class SceneEntities {
|
||||
const varName = findUniqueName(_ast, 'profile')
|
||||
const newExpression = createVariableDeclaration(
|
||||
varName,
|
||||
createCallExpressionStdLib('circle', [
|
||||
createObjectExpression({
|
||||
center: createArrayExpression([
|
||||
createCallExpressionStdLibKw('circle', varDec.node.id, [
|
||||
createLabeledArg(
|
||||
'center',
|
||||
createArrayExpression([
|
||||
createLiteral(roundOff(circleCenter[0])),
|
||||
createLiteral(roundOff(circleCenter[1])),
|
||||
]),
|
||||
radius: createLiteral(1),
|
||||
}),
|
||||
createIdentifier(varDec.node.id.name),
|
||||
])
|
||||
),
|
||||
createLabeledArg('radius', createLiteral(1)),
|
||||
])
|
||||
)
|
||||
|
||||
@ -1666,7 +1666,7 @@ export class SceneEntities {
|
||||
const x = (args.intersectionPoint.twoD.x || 0) - circleCenter[0]
|
||||
const y = (args.intersectionPoint.twoD.y || 0) - circleCenter[1]
|
||||
|
||||
if (sketchInit.type === 'CallExpression') {
|
||||
if (sketchInit.type === 'CallExpressionKw') {
|
||||
const moddedResult = changeSketchArguments(
|
||||
modded,
|
||||
kclManager.variables,
|
||||
@ -1731,7 +1731,7 @@ export class SceneEntities {
|
||||
const sketchInit = _node.node?.declaration.init
|
||||
|
||||
let modded = structuredClone(_ast)
|
||||
if (sketchInit.type === 'CallExpression') {
|
||||
if (sketchInit.type === 'CallExpressionKw') {
|
||||
const moddedResult = changeSketchArguments(
|
||||
modded,
|
||||
kclManager.variables,
|
||||
|
@ -32,7 +32,7 @@ child_process.spawnSync('git', [
|
||||
'clone',
|
||||
'--single-branch',
|
||||
'--branch',
|
||||
'next',
|
||||
'circle-kw-args',
|
||||
URL_GIT_KCL_SAMPLES,
|
||||
DIR_KCL_SAMPLES,
|
||||
])
|
||||
|
@ -581,10 +581,10 @@ sketch002 = startSketchOn(extrude001, $seg01)
|
||||
})
|
||||
it('finds sketch001 and sketch002 pipes to be lofted', async () => {
|
||||
const exampleCode = `sketch001 = startSketchOn('XZ')
|
||||
|> circle({ center = [0, 0], radius = 1 }, %)
|
||||
|> circle(center = [0, 0], radius = 1)
|
||||
plane001 = offsetPlane('XZ', offset = 2)
|
||||
sketch002 = startSketchOn(plane001)
|
||||
|> circle({ center = [0, 0], radius = 3 }, %)
|
||||
|> circle(center = [0, 0], radius = 3)
|
||||
`
|
||||
const ast = assertParse(exampleCode)
|
||||
const extrudable = doesSceneHaveSweepableSketch(ast, 2)
|
||||
@ -608,7 +608,7 @@ extrude001 = extrude(sketch001, length = 10)
|
||||
describe('Testing doesSceneHaveExtrudedSketch', () => {
|
||||
it('finds extruded sketch as variable', async () => {
|
||||
const exampleCode = `sketch001 = startSketchOn('XZ')
|
||||
|> circle({ center = [0, 0], radius = 1 }, %)
|
||||
|> circle(center = [0, 0], radius = 1)
|
||||
extrude001 = extrude(sketch001, length = 1)
|
||||
`
|
||||
const ast = assertParse(exampleCode)
|
||||
@ -618,7 +618,7 @@ extrude001 = extrude(sketch001, length = 1)
|
||||
})
|
||||
it('finds extruded sketch in pipe', async () => {
|
||||
const exampleCode = `extrude001 = startSketchOn('XZ')
|
||||
|> circle({ center = [0, 0], radius = 1 }, %)
|
||||
|> circle(center = [0, 0], radius = 1)
|
||||
|> extrude(length = 1)
|
||||
`
|
||||
const ast = assertParse(exampleCode)
|
||||
@ -628,7 +628,7 @@ extrude001 = extrude(sketch001, length = 1)
|
||||
})
|
||||
it('finds no extrusion with sketch only', async () => {
|
||||
const exampleCode = `extrude001 = startSketchOn('XZ')
|
||||
|> circle({ center = [0, 0], radius = 1 }, %)
|
||||
|> circle(center = [0, 0], radius = 1)
|
||||
`
|
||||
const ast = assertParse(exampleCode)
|
||||
if (err(ast)) throw ast
|
||||
|
@ -16,6 +16,7 @@ import {
|
||||
VariableMap,
|
||||
} from 'lang/wasm'
|
||||
import {
|
||||
ARG_INDEX_FIELD,
|
||||
getNodeFromPath,
|
||||
getNodeFromPathCurry,
|
||||
getObjExprProperty,
|
||||
@ -77,6 +78,8 @@ import {
|
||||
export const ARG_TAG = 'tag'
|
||||
export const ARG_END = 'end'
|
||||
export const ARG_END_ABSOLUTE = 'endAbsolute'
|
||||
export const ARG_CIRCLE_CENTER = 'center'
|
||||
export const ARG_CIRCLE_RADIUS = 'radius'
|
||||
|
||||
const STRAIGHT_SEGMENT_ERR = new Error(
|
||||
'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 }) => {
|
||||
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
|
||||
const { center, radius } = input
|
||||
const _node = { ...node }
|
||||
const nodeMeta = getNodeFromPath<CallExpression>(_node, pathToNode)
|
||||
const nodeMeta = getNodeFromPath<CallExpressionKw>(_node, pathToNode)
|
||||
if (err(nodeMeta)) return nodeMeta
|
||||
|
||||
const { node: callExpression, shallowPath } = nodeMeta
|
||||
const { node: callExpression } = nodeMeta
|
||||
|
||||
const firstArg = callExpression.arguments?.[0]
|
||||
const newCenter = createArrayExpression([
|
||||
createLiteral(roundOff(center[0])),
|
||||
createLiteral(roundOff(center[1])),
|
||||
])
|
||||
mutateObjExpProp(firstArg, newCenter, 'center')
|
||||
mutateKwArg(ARG_CIRCLE_CENTER, callExpression, newCenter)
|
||||
const newRadius = createLiteral(roundOff(radius))
|
||||
mutateObjExpProp(firstArg, newRadius, 'radius')
|
||||
mutateKwArg(ARG_CIRCLE_RADIUS, callExpression, newRadius)
|
||||
return {
|
||||
modifiedAst: _node,
|
||||
pathToNode: shallowPath,
|
||||
pathToNode,
|
||||
}
|
||||
},
|
||||
getTag: getTag(),
|
||||
addTag: addTag(),
|
||||
getConstraintInfo: (callExp: CallExpression, code, pathToNode) => {
|
||||
if (callExp.type !== 'CallExpression') return []
|
||||
getTag: getTagKwArg(),
|
||||
addTag: addTagKw(),
|
||||
getConstraintInfo: (callExp: CallExpressionKw, code, pathToNode) => {
|
||||
if (callExp.type !== 'CallExpressionKw') return []
|
||||
const firstArg = callExp.arguments?.[0]
|
||||
if (firstArg.type !== 'ObjectExpression') return []
|
||||
const centerDetails = getObjExprProperty(firstArg, 'center')
|
||||
const radiusDetails = getObjExprProperty(firstArg, 'radius')
|
||||
if (!centerDetails || !radiusDetails) return []
|
||||
if (centerDetails.expr.type !== 'ArrayExpression') return []
|
||||
if (firstArg.type !== 'LabeledArg') return []
|
||||
let centerInfo = findKwArgWithIndex(ARG_CIRCLE_CENTER, callExp)
|
||||
let radiusInfo = findKwArgWithIndex(ARG_CIRCLE_RADIUS, callExp)
|
||||
if (!centerInfo || !radiusInfo) return []
|
||||
if (centerInfo?.expr.type !== 'ArrayExpression') return []
|
||||
|
||||
const pathToCenterArrayExpression: PathToNode = [
|
||||
...pathToNode,
|
||||
['arguments', 'CallExpression'],
|
||||
[0, 'index'],
|
||||
['properties', 'ObjectExpression'],
|
||||
[centerDetails.index, 'index'],
|
||||
['value', 'Property'],
|
||||
['elements', 'ArrayExpression'],
|
||||
['arguments', 'CallExpressionKw'],
|
||||
[centerInfo.argIndex, ARG_INDEX_FIELD],
|
||||
['arg', LABELED_ARG_FIELD],
|
||||
]
|
||||
const pathToRadiusLiteral: PathToNode = [
|
||||
...pathToNode,
|
||||
['arguments', 'CallExpression'],
|
||||
[0, 'index'],
|
||||
['properties', 'ObjectExpression'],
|
||||
[radiusDetails.index, 'index'],
|
||||
['value', 'Property'],
|
||||
['arguments', 'CallExpressionKw'],
|
||||
[radiusInfo.argIndex, ARG_INDEX_FIELD],
|
||||
['arg', LABELED_ARG_FIELD],
|
||||
]
|
||||
const pathToXArg: PathToNode = [
|
||||
...pathToCenterArrayExpression,
|
||||
@ -1196,27 +1193,25 @@ export const circle: SketchLineHelper = {
|
||||
return [
|
||||
constrainInfo(
|
||||
'radius',
|
||||
isNotLiteralArrayOrStatic(radiusDetails.expr),
|
||||
code.slice(radiusDetails.expr.start, radiusDetails.expr.end),
|
||||
isNotLiteralArrayOrStatic(radiusInfo.expr),
|
||||
code.slice(radiusInfo.expr.start, radiusInfo.expr.end),
|
||||
'circle',
|
||||
'radius',
|
||||
topLevelRange(radiusDetails.expr.start, radiusDetails.expr.end),
|
||||
topLevelRange(radiusInfo.expr.start, radiusInfo.expr.end),
|
||||
pathToRadiusLiteral
|
||||
),
|
||||
{
|
||||
stdLibFnName: 'circle',
|
||||
type: 'xAbsolute',
|
||||
isConstrained: isNotLiteralArrayOrStatic(
|
||||
centerDetails.expr.elements[0]
|
||||
),
|
||||
isConstrained: isNotLiteralArrayOrStatic(centerInfo.expr.elements[0]),
|
||||
sourceRange: topLevelRange(
|
||||
centerDetails.expr.elements[0].start,
|
||||
centerDetails.expr.elements[0].end
|
||||
centerInfo.expr.elements[0].start,
|
||||
centerInfo.expr.elements[0].end
|
||||
),
|
||||
pathToNode: pathToXArg,
|
||||
value: code.slice(
|
||||
centerDetails.expr.elements[0].start,
|
||||
centerDetails.expr.elements[0].end
|
||||
centerInfo.expr.elements[0].start,
|
||||
centerInfo.expr.elements[0].end
|
||||
),
|
||||
argPosition: {
|
||||
type: 'arrayInObject',
|
||||
@ -1227,17 +1222,15 @@ export const circle: SketchLineHelper = {
|
||||
{
|
||||
stdLibFnName: 'circle',
|
||||
type: 'yAbsolute',
|
||||
isConstrained: isNotLiteralArrayOrStatic(
|
||||
centerDetails.expr.elements[1]
|
||||
),
|
||||
isConstrained: isNotLiteralArrayOrStatic(centerInfo.expr.elements[1]),
|
||||
sourceRange: topLevelRange(
|
||||
centerDetails.expr.elements[1].start,
|
||||
centerDetails.expr.elements[1].end
|
||||
centerInfo.expr.elements[1].start,
|
||||
centerInfo.expr.elements[1].end
|
||||
),
|
||||
pathToNode: pathToYArg,
|
||||
value: code.slice(
|
||||
centerDetails.expr.elements[1].start,
|
||||
centerDetails.expr.elements[1].end
|
||||
centerInfo.expr.elements[1].start,
|
||||
centerInfo.expr.elements[1].end
|
||||
),
|
||||
argPosition: {
|
||||
type: 'arrayInObject',
|
||||
@ -2295,13 +2288,13 @@ export const sketchLineHelperMap: { [key: string]: SketchLineHelper } = {
|
||||
angledLineToY,
|
||||
angledLineThatIntersects,
|
||||
tangentialArcTo,
|
||||
circle,
|
||||
} as const
|
||||
|
||||
export const sketchLineHelperMapKw: { [key: string]: SketchLineHelperKw } = {
|
||||
line,
|
||||
lineTo,
|
||||
circleThreePoint,
|
||||
circle,
|
||||
} as const
|
||||
|
||||
export function changeSketchArguments(
|
||||
@ -2967,8 +2960,8 @@ function getFirstArgValuesForXYLineFns(callExpression: CallExpression): {
|
||||
}
|
||||
}
|
||||
|
||||
const getCircle = (
|
||||
callExp: CallExpression
|
||||
export const getCircle = (
|
||||
callExp: CallExpressionKw
|
||||
):
|
||||
| {
|
||||
val: [Expr, Expr, Expr]
|
||||
@ -2976,22 +2969,24 @@ const getCircle = (
|
||||
}
|
||||
| Error => {
|
||||
const firstArg = callExp.arguments[0]
|
||||
if (firstArg.type === 'ObjectExpression') {
|
||||
const centerDetails = getObjExprProperty(firstArg, 'center')
|
||||
const radiusDetails = getObjExprProperty(firstArg, 'radius')
|
||||
const tag = callExp.arguments[2]
|
||||
if (centerDetails?.expr?.type === 'ArrayExpression' && radiusDetails) {
|
||||
if (firstArg.type === 'LabeledArg') {
|
||||
let centerInfo = findKwArgWithIndex(ARG_CIRCLE_CENTER, callExp)
|
||||
let radiusInfo = findKwArgWithIndex(ARG_CIRCLE_RADIUS, callExp)
|
||||
let tagInfo = findKwArgWithIndex(ARG_TAG, callExp)
|
||||
if (centerInfo && radiusInfo) {
|
||||
if (centerInfo.expr?.type === 'ArrayExpression' && radiusInfo.expr) {
|
||||
return {
|
||||
val: [
|
||||
centerDetails?.expr.elements[0],
|
||||
centerDetails?.expr.elements[1],
|
||||
radiusDetails.expr,
|
||||
centerInfo.expr?.elements[0],
|
||||
centerInfo.expr?.elements[1],
|
||||
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 = (
|
||||
callExp: CallExpression
|
||||
@ -3050,6 +3045,10 @@ export function getArgForEnd(lineCall: CallExpressionKw):
|
||||
}
|
||||
| Error {
|
||||
const name = lineCall?.callee?.name
|
||||
|
||||
if (name == 'circle') {
|
||||
return getCircle(lineCall)
|
||||
}
|
||||
let arg
|
||||
if (name === 'line') {
|
||||
arg = findKwArgAny([ARG_END, ARG_END_ABSOLUTE], lineCall)
|
||||
@ -3093,8 +3092,5 @@ export function getFirstArg(callExp: CallExpression):
|
||||
// TODO probably needs it's own implementation
|
||||
return getFirstArgValuesForXYFns(callExp)
|
||||
}
|
||||
if (name === 'circle') {
|
||||
return getCircle(callExp)
|
||||
}
|
||||
return new Error('unexpected call expression: ' + name)
|
||||
}
|
||||
|
@ -51,6 +51,7 @@ import {
|
||||
ARG_END_ABSOLUTE,
|
||||
getConstraintInfoKw,
|
||||
isAbsoluteLine,
|
||||
getCircle,
|
||||
} from './sketch'
|
||||
import {
|
||||
getSketchSegmentFromPathToNode,
|
||||
@ -2154,6 +2155,9 @@ export function getConstraintLevelFromSourceRange(
|
||||
case 'CallExpression':
|
||||
return getFirstArg(nodeMeta.node)
|
||||
case 'CallExpressionKw':
|
||||
if (name === 'circle') {
|
||||
return getCircle(nodeMeta.node)
|
||||
}
|
||||
const arg = findKwArgAny([ARG_END, ARG_END_ABSOLUTE], nodeMeta.node)
|
||||
if (arg === undefined) {
|
||||
return new Error('unexpected call expression: ' + name)
|
||||
|
@ -47,10 +47,10 @@ sketch001 = startSketchOn('XZ')
|
||||
)
|
||||
|
||||
sketch002 = startSketchOn(sketch001, seg03)
|
||||
|> circle({
|
||||
|> circle(
|
||||
center = [-1.25, 1],
|
||||
radius = mountingHoleDiameter / 2,
|
||||
}, %)
|
||||
)
|
||||
|> patternLinear2d(
|
||||
instances = 2,
|
||||
distance = 2.5,
|
||||
@ -64,10 +64,10 @@ sketch002 = startSketchOn(sketch001, seg03)
|
||||
|> extrude(%, length = -thickness-.01)
|
||||
|
||||
sketch003 = startSketchOn(sketch001, seg04)
|
||||
|> circle({
|
||||
|> circle(
|
||||
center = [1, -1],
|
||||
radius = mountingHoleDiameter / 2,
|
||||
}, %)
|
||||
)
|
||||
|> patternLinear2d(
|
||||
instances = 2,
|
||||
distance = 4,
|
||||
|
@ -31,10 +31,10 @@ profile002 = startProfileAt([-321.34, 361.76], sketch002)
|
||||
|> close()
|
||||
extrude002 = extrude(profile002, length = 500)
|
||||
sketch005 = startSketchOn(extrude002, 'END')
|
||||
profile006 = circle({
|
||||
profile006 = circle(sketch005,
|
||||
center = [-292.57, 302.55],
|
||||
radius = 25.89
|
||||
}, sketch005)
|
||||
)
|
||||
sketch004 = startSketchOn(extrude001, seg02)
|
||||
profile005 = startProfileAt([36.1, 174.49], sketch004)
|
||||
|> angledLine([0, 22.33], %, $rectangleSegmentA003)
|
||||
@ -61,10 +61,10 @@ profile003 = startProfileAt([-115.59, 439.4], sketch003)
|
||||
], %)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
profile004 = circle({
|
||||
profile004 = circle(sketch003,
|
||||
center = [-88.54, 209.41],
|
||||
radius = 42.72
|
||||
}, sketch003)
|
||||
)
|
||||
`
|
||||
const ___artifactGraph = new Map([
|
||||
[
|
||||
|
@ -3526,18 +3526,13 @@ export function isEditingExistingSketch({
|
||||
if (variableDeclaration.node.type !== 'VariableDeclarator') return false
|
||||
const maybePipeExpression = variableDeclaration.node.init
|
||||
if (
|
||||
maybePipeExpression.type === 'CallExpression' &&
|
||||
(maybePipeExpression.type === 'CallExpression' ||
|
||||
maybePipeExpression.type === 'CallExpressionKw') &&
|
||||
(maybePipeExpression.callee.name === 'startProfileAt' ||
|
||||
maybePipeExpression.callee.name === 'circle' ||
|
||||
maybePipeExpression.callee.name === 'circleThreePoint')
|
||||
)
|
||||
return true
|
||||
if (
|
||||
maybePipeExpression.type === 'CallExpressionKw' &&
|
||||
(maybePipeExpression.callee.name === 'startProfileAt' ||
|
||||
maybePipeExpression.callee.name === 'circleThreePoint')
|
||||
)
|
||||
return true
|
||||
if (maybePipeExpression.type !== 'PipeExpression') return false
|
||||
const hasStartProfileAt = maybePipeExpression.body.some(
|
||||
(item) =>
|
||||
@ -3545,7 +3540,8 @@ export function isEditingExistingSketch({
|
||||
)
|
||||
const hasCircle =
|
||||
maybePipeExpression.body.some(
|
||||
(item) => item.type === 'CallExpression' && item.callee.name === 'circle'
|
||||
(item) =>
|
||||
item.type === 'CallExpressionKw' && item.callee.name === 'circle'
|
||||
) ||
|
||||
maybePipeExpression.body.some(
|
||||
(item) =>
|
||||
@ -3570,7 +3566,7 @@ export function pipeHasCircle({
|
||||
const pipeExpression = variableDeclaration.node.init
|
||||
if (pipeExpression.type !== 'PipeExpression') return false
|
||||
const hasCircle = pipeExpression.body.some(
|
||||
(item) => item.type === 'CallExpression' && item.callee.name === 'circle'
|
||||
(item) => item.type === 'CallExpressionKw' && item.callee.name === 'circle'
|
||||
)
|
||||
return hasCircle
|
||||
}
|
||||
@ -3608,7 +3604,7 @@ export function isClosedSketch({
|
||||
if (node.node?.declaration?.init?.type !== 'PipeExpression') return false
|
||||
return node.node.declaration.init.body.some(
|
||||
(node) =>
|
||||
node.type === 'CallExpression' &&
|
||||
(node.type === 'CallExpression' || node.type === 'CallExpressionKw') &&
|
||||
(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.
|
||||
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
|
||||
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
|
||||
|
||||
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:
|
||||
git tag {{version}}
|
||||
|
@ -1014,10 +1014,7 @@ mod tests {
|
||||
let snippet = circle_fn.to_autocomplete_snippet().unwrap();
|
||||
assert_eq!(
|
||||
snippet,
|
||||
r#"circle({
|
||||
center = [${0:3.14}, ${1:3.14}],
|
||||
radius = ${2:3.14},
|
||||
}, ${3:%})${}"#
|
||||
r#"circle(${0:%}, center = [${1:3.14}, ${2:3.14}], radius = ${3:3.14})${}"#
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -886,11 +886,20 @@ impl ExecutorContext {
|
||||
}
|
||||
|
||||
#[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 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()),
|
||||
stdlib: Arc::new(crate::std::StdLib::new()),
|
||||
settings: Default::default(),
|
||||
@ -1293,7 +1302,7 @@ const x = 5
|
||||
const answer = returnX()"#;
|
||||
|
||||
let result = parse_execute(ast).await;
|
||||
let err = result.unwrap_err().downcast::<KclError>().unwrap();
|
||||
let err = result.unwrap_err();
|
||||
assert_eq!(
|
||||
err,
|
||||
KclError::UndefinedValue(KclErrorDetails {
|
||||
@ -1326,7 +1335,7 @@ foo
|
||||
"#;
|
||||
|
||||
let result = parse_execute(ast).await;
|
||||
let err = result.unwrap_err().downcast::<KclError>().unwrap();
|
||||
let err = result.unwrap_err();
|
||||
assert_eq!(
|
||||
err,
|
||||
KclError::Syntax(KclErrorDetails {
|
||||
@ -1350,7 +1359,7 @@ fn transform = (replicaId) => {
|
||||
|
||||
fn layer = () => {
|
||||
return startSketchOn(XY)
|
||||
|> circle({ center: [0, 0], radius: 1 }, %, $tag1)
|
||||
|> circle( center= [0, 0], radius= 1 , tag =$tag1)
|
||||
|> extrude(length = 10)
|
||||
}
|
||||
|
||||
@ -1361,7 +1370,7 @@ let shape = layer() |> patternTransform(instances = 10, transform = transform)
|
||||
"#;
|
||||
|
||||
let result = parse_execute(ast).await;
|
||||
let err = result.unwrap_err().downcast::<KclError>().unwrap();
|
||||
let err = result.unwrap_err();
|
||||
assert_eq!(
|
||||
err,
|
||||
KclError::UndefinedValue(KclErrorDetails {
|
||||
@ -1512,7 +1521,7 @@ let myNull = 0 / 0
|
||||
let notNull = !myNull
|
||||
"#;
|
||||
assert_eq!(
|
||||
parse_execute(code1).await.unwrap_err().downcast::<KclError>().unwrap(),
|
||||
parse_execute(code1).await.unwrap_err(),
|
||||
KclError::Semantic(KclErrorDetails {
|
||||
message: "Cannot apply unary operator ! to non-boolean value: number".to_owned(),
|
||||
source_ranges: vec![SourceRange::new(56, 63, ModuleId::default())],
|
||||
@ -1521,7 +1530,7 @@ let notNull = !myNull
|
||||
|
||||
let code2 = "let notZero = !0";
|
||||
assert_eq!(
|
||||
parse_execute(code2).await.unwrap_err().downcast::<KclError>().unwrap(),
|
||||
parse_execute(code2).await.unwrap_err(),
|
||||
KclError::Semantic(KclErrorDetails {
|
||||
message: "Cannot apply unary operator ! to non-boolean value: number".to_owned(),
|
||||
source_ranges: vec![SourceRange::new(14, 16, ModuleId::default())],
|
||||
@ -1532,7 +1541,7 @@ let notNull = !myNull
|
||||
let notEmptyString = !""
|
||||
"#;
|
||||
assert_eq!(
|
||||
parse_execute(code3).await.unwrap_err().downcast::<KclError>().unwrap(),
|
||||
parse_execute(code3).await.unwrap_err(),
|
||||
KclError::Semantic(KclErrorDetails {
|
||||
message: "Cannot apply unary operator ! to non-boolean value: string (text)".to_owned(),
|
||||
source_ranges: vec![SourceRange::new(22, 25, ModuleId::default())],
|
||||
@ -1544,7 +1553,7 @@ let obj = { a: 1 }
|
||||
let notMember = !obj.a
|
||||
"#;
|
||||
assert_eq!(
|
||||
parse_execute(code4).await.unwrap_err().downcast::<KclError>().unwrap(),
|
||||
parse_execute(code4).await.unwrap_err(),
|
||||
KclError::Semantic(KclErrorDetails {
|
||||
message: "Cannot apply unary operator ! to non-boolean value: number".to_owned(),
|
||||
source_ranges: vec![SourceRange::new(36, 42, ModuleId::default())],
|
||||
@ -1555,7 +1564,7 @@ let notMember = !obj.a
|
||||
let a = []
|
||||
let notArray = !a";
|
||||
assert_eq!(
|
||||
parse_execute(code5).await.unwrap_err().downcast::<KclError>().unwrap(),
|
||||
parse_execute(code5).await.unwrap_err(),
|
||||
KclError::Semantic(KclErrorDetails {
|
||||
message: "Cannot apply unary operator ! to non-boolean value: array (list)".to_owned(),
|
||||
source_ranges: vec![SourceRange::new(27, 29, ModuleId::default())],
|
||||
@ -1566,7 +1575,7 @@ let notArray = !a";
|
||||
let x = {}
|
||||
let notObject = !x";
|
||||
assert_eq!(
|
||||
parse_execute(code6).await.unwrap_err().downcast::<KclError>().unwrap(),
|
||||
parse_execute(code6).await.unwrap_err(),
|
||||
KclError::Semantic(KclErrorDetails {
|
||||
message: "Cannot apply unary operator ! to non-boolean value: object".to_owned(),
|
||||
source_ranges: vec![SourceRange::new(28, 30, ModuleId::default())],
|
||||
@ -1576,7 +1585,7 @@ let notObject = !x";
|
||||
let code7 = "
|
||||
fn x = () => { return 1 }
|
||||
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
|
||||
// check the full error.
|
||||
assert!(
|
||||
@ -1590,7 +1599,7 @@ let notFunction = !x";
|
||||
let code8 = "
|
||||
let myTagDeclarator = $myTag
|
||||
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
|
||||
// check the full error.
|
||||
assert!(
|
||||
@ -1604,7 +1613,7 @@ let notTagDeclarator = !myTagDeclarator";
|
||||
let code9 = "
|
||||
let myTagDeclarator = $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
|
||||
// check the full error.
|
||||
assert!(
|
||||
@ -1619,7 +1628,7 @@ let notTagIdentifier = !myTag";
|
||||
assert_eq!(
|
||||
// TODO: We don't currently parse this, but we should. It should be
|
||||
// a runtime error instead.
|
||||
parse_execute(code10).await.unwrap_err().downcast::<KclError>().unwrap(),
|
||||
parse_execute(code10).await.unwrap_err(),
|
||||
KclError::Syntax(KclErrorDetails {
|
||||
message: "Unexpected token: !".to_owned(),
|
||||
source_ranges: vec![SourceRange::new(14, 15, ModuleId::default())],
|
||||
@ -1632,7 +1641,7 @@ let notPipeSub = 1 |> identity(!%))";
|
||||
assert_eq!(
|
||||
// TODO: We don't currently parse this, but we should. It should be
|
||||
// a runtime error instead.
|
||||
parse_execute(code11).await.unwrap_err().downcast::<KclError>().unwrap(),
|
||||
parse_execute(code11).await.unwrap_err(),
|
||||
KclError::Syntax(KclErrorDetails {
|
||||
message: "Unexpected token: |>".to_owned(),
|
||||
source_ranges: vec![SourceRange::new(54, 56, ModuleId::default())],
|
||||
|
@ -6,7 +6,7 @@ expression: actual
|
||||
"body": [
|
||||
{
|
||||
"declaration": {
|
||||
"end": 113,
|
||||
"end": 106,
|
||||
"id": {
|
||||
"end": 14,
|
||||
"name": "cylinder",
|
||||
@ -40,24 +40,17 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"end": 81,
|
||||
"properties": [
|
||||
{
|
||||
"end": 67,
|
||||
"key": {
|
||||
"end": 59,
|
||||
"name": "center",
|
||||
"start": 53,
|
||||
"type": "Identifier"
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"name": "center"
|
||||
},
|
||||
"start": 53,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"arg": {
|
||||
"elements": [
|
||||
{
|
||||
"end": 63,
|
||||
"end": 61,
|
||||
"raw": "0",
|
||||
"start": 62,
|
||||
"start": 60,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -66,9 +59,9 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"end": 66,
|
||||
"end": 64,
|
||||
"raw": "0",
|
||||
"start": 65,
|
||||
"start": 63,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -77,26 +70,22 @@ expression: actual
|
||||
}
|
||||
}
|
||||
],
|
||||
"end": 67,
|
||||
"start": 61,
|
||||
"end": 65,
|
||||
"start": 59,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
},
|
||||
{
|
||||
"end": 79,
|
||||
"key": {
|
||||
"end": 75,
|
||||
"name": "radius",
|
||||
"start": 69,
|
||||
"type": "Identifier"
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"name": "radius"
|
||||
},
|
||||
"start": 69,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"end": 79,
|
||||
"arg": {
|
||||
"end": 77,
|
||||
"raw": "22",
|
||||
"start": 77,
|
||||
"start": 75,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -106,27 +95,17 @@ expression: actual
|
||||
}
|
||||
}
|
||||
],
|
||||
"start": 51,
|
||||
"type": "ObjectExpression",
|
||||
"type": "ObjectExpression"
|
||||
},
|
||||
{
|
||||
"end": 84,
|
||||
"start": 83,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 50,
|
||||
"name": "circle",
|
||||
"start": 44,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 85,
|
||||
"end": 78,
|
||||
"start": 44,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
@ -137,9 +116,9 @@ expression: actual
|
||||
"name": "length"
|
||||
},
|
||||
"arg": {
|
||||
"end": 112,
|
||||
"end": 105,
|
||||
"raw": "14",
|
||||
"start": 110,
|
||||
"start": 103,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -150,19 +129,19 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 100,
|
||||
"end": 93,
|
||||
"name": "extrude",
|
||||
"start": 93,
|
||||
"start": 86,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 113,
|
||||
"start": 93,
|
||||
"end": 106,
|
||||
"start": 86,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
}
|
||||
],
|
||||
"end": 113,
|
||||
"end": 106,
|
||||
"start": 17,
|
||||
"type": "PipeExpression",
|
||||
"type": "PipeExpression"
|
||||
@ -170,13 +149,13 @@ expression: actual
|
||||
"start": 6,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 113,
|
||||
"end": 106,
|
||||
"kind": "const",
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"end": 114,
|
||||
"end": 107,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ pub async fn appearance(_exec_state: &mut ExecState, args: Args) -> Result<KclVa
|
||||
/// ```no_run
|
||||
/// // Add color to a revolved solid.
|
||||
/// sketch001 = startSketchOn('XY')
|
||||
/// |> circle({ center = [15, 0], radius = 5 }, %)
|
||||
/// |> circle( center = [15, 0], radius = 5 )
|
||||
/// |> revolve({ angle = 360, axis = 'y' }, %)
|
||||
/// |> appearance(
|
||||
/// color = '#ff0000',
|
||||
@ -253,16 +253,16 @@ pub async fn appearance(_exec_state: &mut ExecState, args: Args) -> Result<KclVa
|
||||
/// |> line(end = [0, 7])
|
||||
///
|
||||
/// pipeHole = startSketchOn('XY')
|
||||
/// |> circle({
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 1.5,
|
||||
/// }, %)
|
||||
/// )
|
||||
///
|
||||
/// sweepSketch = startSketchOn('XY')
|
||||
/// |> circle({
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 2,
|
||||
/// }, %)
|
||||
/// )
|
||||
/// |> hole(pipeHole, %)
|
||||
/// |> sweep(path = sweepPath)
|
||||
/// |> appearance(
|
||||
|
@ -444,19 +444,6 @@ impl Args {
|
||||
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> {
|
||||
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 {
|
||||
fn from_kcl_val(arg: &'a KclValue) -> Option<Self> {
|
||||
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
|
||||
/// fn drawCircle(id) {
|
||||
/// 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.
|
||||
@ -48,7 +48,7 @@ pub async fn map(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kcl
|
||||
/// [1..3],
|
||||
/// fn(id) {
|
||||
/// 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")
|
||||
/// // Draw n cylinders.
|
||||
/// startSketchOn('XZ')
|
||||
/// |> circle({ center = [0, 0], radius = 2 }, %)
|
||||
/// |> circle(center = [0, 0], radius = 2 )
|
||||
/// |> extrude(length = 5)
|
||||
/// |> patternTransform(instances = n, transform = fn(id) {
|
||||
/// 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.
|
||||
/// springSketch = startSketchOn('YZ')
|
||||
/// |> circle({ center = [0, 0], radius = 0.5 }, %)
|
||||
/// |> circle( center = [0, 0], radius = 0.5)
|
||||
/// |> 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.
|
||||
/// springSketch = startSketchOn('XY')
|
||||
/// |> circle({ center = [0, 0], radius = 0.5 }, %)
|
||||
/// |> circle( center = [0, 0], radius = 0.5 )
|
||||
/// |> 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.
|
||||
/// springSketch = startSketchOn('XY')
|
||||
/// |> circle({ center = [0, 0], radius = 1 }, %)
|
||||
/// |> circle( center = [0, 0], radius = 1 )
|
||||
/// |> sweep(path = helixPath)
|
||||
/// ```
|
||||
#[stdlib {
|
||||
@ -206,7 +206,7 @@ pub async fn helix_revolutions(exec_state: &mut ExecState, args: Args) -> Result
|
||||
///
|
||||
/// ```no_run
|
||||
/// part001 = startSketchOn('XY')
|
||||
/// |> circle({ center: [5, 5], radius: 10 }, %)
|
||||
/// |> circle( center= [5, 5], radius= 10 )
|
||||
/// |> extrude(length = 10)
|
||||
/// |> helixRevolutions({
|
||||
/// angleStart = 0,
|
||||
|
@ -78,10 +78,10 @@ pub async fn loft(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
|
||||
/// |> close()
|
||||
///
|
||||
/// circleSketch0 = startSketchOn(offsetPlane('XY', offset = 75))
|
||||
/// |> circle({ center = [0, 100], radius = 50 }, %)
|
||||
/// |> circle( center = [0, 100], radius = 50 )
|
||||
///
|
||||
/// circleSketch1 = startSketchOn(offsetPlane('XY', offset = 150))
|
||||
/// |> circle({ center = [0, 100], radius = 20 }, %)
|
||||
/// |> circle( center = [0, 100], radius = 20 )
|
||||
///
|
||||
/// loft([squareSketch, circleSketch0, circleSketch1])
|
||||
/// ```
|
||||
@ -97,10 +97,10 @@ pub async fn loft(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
|
||||
/// |> close()
|
||||
///
|
||||
/// circleSketch0 = startSketchOn(offsetPlane('XY', offset = 75))
|
||||
/// |> circle({ center = [0, 100], radius = 50 }, %)
|
||||
/// |> circle( center = [0, 100], radius = 50 )
|
||||
///
|
||||
/// circleSketch1 = startSketchOn(offsetPlane('XY', offset = 150))
|
||||
/// |> circle({ center = [0, 100], radius = 20 }, %)
|
||||
/// |> circle( center = [0, 100], radius = 20 )
|
||||
///
|
||||
/// loft([squareSketch, circleSketch0, circleSketch1],
|
||||
/// baseCurveIndex = 0,
|
||||
|
@ -78,7 +78,7 @@ pub async fn pi(_exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kcl
|
||||
/// circumference = 70
|
||||
///
|
||||
/// exampleSketch = startSketchOn("XZ")
|
||||
/// |> circle({ center = [0, 0], radius = circumference/ (2 * pi()) }, %)
|
||||
/// |> circle( center = [0, 0], radius = circumference/ (2 * pi()) )
|
||||
///
|
||||
/// 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.
|
||||
/// sketch001 = startSketchOn('XZ')
|
||||
/// |> circle({ center = [0, 0], radius = 2 }, %)
|
||||
/// |> circle(center = [0, 0], radius = 2)
|
||||
/// |> extrude(length = 5)
|
||||
/// |> 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')
|
||||
/// |> circle({ center = [0, 0], radius = 2 }, %)
|
||||
/// |> circle(center = [0, 0], radius = 2)
|
||||
/// |> extrude(length = 5)
|
||||
/// |> 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.
|
||||
/// fn layer() {
|
||||
/// 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)
|
||||
/// }
|
||||
/// // The vase is 100 layers tall.
|
||||
@ -303,7 +303,7 @@ async fn inner_pattern_transform<'a>(
|
||||
///
|
||||
/// // Sketch 4 circles.
|
||||
/// sketch001 = startSketchOn('XZ')
|
||||
/// |> circle({ center: [0, 0], radius: 2 }, %)
|
||||
/// |> circle(center= [0, 0], radius= 2)
|
||||
/// |> patternTransform2d(instances = 4, transform = transform)
|
||||
/// ```
|
||||
#[stdlib {
|
||||
@ -715,7 +715,7 @@ pub async fn pattern_linear_2d(exec_state: &mut ExecState, args: Args) -> Result
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn('XZ')
|
||||
/// |> circle({ center = [0, 0], radius = 1 }, %)
|
||||
/// |> circle(center = [0, 0], radius = 1)
|
||||
/// |> patternLinear2d(
|
||||
/// axis = [1, 0],
|
||||
/// instances = 7,
|
||||
@ -821,11 +821,11 @@ pub async fn pattern_linear_3d(exec_state: &mut ExecState, args: Args) -> Result
|
||||
/// |> extrude(length = 65)
|
||||
///
|
||||
/// const thing1 = startSketchOn(case, 'end')
|
||||
/// |> circle({center = [-size / 2, -size / 2], radius = 25}, %)
|
||||
/// |> circle(center = [-size / 2, -size / 2], radius = 25)
|
||||
/// |> extrude(length = 50)
|
||||
///
|
||||
/// const thing2 = startSketchOn(case, 'end')
|
||||
/// |> circle({center = [size / 2, -size / 2], radius = 25}, %)
|
||||
/// |> circle(center = [size / 2, -size / 2], radius = 25)
|
||||
/// |> extrude(length = 50)
|
||||
///
|
||||
/// // 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)
|
||||
///
|
||||
/// const thing1 = startSketchOn(case, 'end')
|
||||
/// |> circle({ center =[-size / 2, -size / 2], radius = 25}, %)
|
||||
/// |> circle(center =[-size / 2, -size / 2], radius = 25)
|
||||
/// |> extrude(length = 50)
|
||||
///
|
||||
/// // 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
|
||||
/// exampleSketch = startSketchOn('XZ')
|
||||
/// |> circle({ center = [0, 0], radius = 1 }, %)
|
||||
/// |> circle(center = [0, 0], radius = 1)
|
||||
///
|
||||
/// example = extrude(exampleSketch, length = -5)
|
||||
/// |> patternCircular3d(
|
||||
|
@ -36,7 +36,7 @@ pub async fn offset_plane(exec_state: &mut ExecState, args: Args) -> Result<KclV
|
||||
/// |> close()
|
||||
///
|
||||
/// circleSketch = startSketchOn(offsetPlane('XY', offset = 150))
|
||||
/// |> circle({ center = [0, 100], radius = 50 }, %)
|
||||
/// |> circle( center = [0, 100], radius = 50 )
|
||||
///
|
||||
/// loft([squareSketch, circleSketch])
|
||||
/// ```
|
||||
@ -52,7 +52,7 @@ pub async fn offset_plane(exec_state: &mut ExecState, args: Args) -> Result<KclV
|
||||
/// |> close()
|
||||
///
|
||||
/// circleSketch = startSketchOn(offsetPlane('XZ', offset = 150))
|
||||
/// |> circle({ center = [0, 100], radius = 50 }, %)
|
||||
/// |> circle( center = [0, 100], radius = 50 )
|
||||
///
|
||||
/// loft([squareSketch, circleSketch])
|
||||
/// ```
|
||||
@ -68,7 +68,7 @@ pub async fn offset_plane(exec_state: &mut ExecState, args: Args) -> Result<KclV
|
||||
/// |> close()
|
||||
///
|
||||
/// circleSketch = startSketchOn(offsetPlane('YZ', offset = 150))
|
||||
/// |> circle({ center = [0, 100], radius = 50 }, %)
|
||||
/// |> circle( center = [0, 100], radius = 50 )
|
||||
///
|
||||
/// loft([squareSketch, circleSketch])
|
||||
/// ```
|
||||
@ -84,7 +84,7 @@ pub async fn offset_plane(exec_state: &mut ExecState, args: Args) -> Result<KclV
|
||||
/// |> close()
|
||||
///
|
||||
/// circleSketch = startSketchOn(offsetPlane('-XZ', offset = -150))
|
||||
/// |> circle({ center = [0, 100], radius = 50 }, %)
|
||||
/// |> circle( center = [0, 100], radius = 50 )
|
||||
///
|
||||
/// 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
|
||||
/// startSketchOn("XY")
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> circle({ radius = 10, center = [0, 0] }, %)
|
||||
/// |> circle( radius = 10, center = [0, 0] )
|
||||
///
|
||||
/// // Triangle on the plane 4 units above
|
||||
/// startSketchOn(offsetPlane("XY", offset = 4))
|
||||
|
@ -63,7 +63,7 @@ pub async fn revolve(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
/// ```no_run
|
||||
/// // A donut shape.
|
||||
/// sketch001 = startSketchOn('XY')
|
||||
/// |> circle({ center = [15, 0], radius = 5 }, %)
|
||||
/// |> circle( center = [15, 0], radius = 5 )
|
||||
/// |> revolve({
|
||||
/// angle = 360,
|
||||
/// axis = 'y'
|
||||
@ -115,7 +115,7 @@ pub async fn revolve(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
/// |> extrude(length = 20)
|
||||
///
|
||||
/// sketch001 = startSketchOn(box, "END")
|
||||
/// |> circle({ center = [10,10], radius = 4 }, %)
|
||||
/// |> circle( center = [10,10], radius = 4 )
|
||||
/// |> revolve({
|
||||
/// angle = -90,
|
||||
/// axis = 'y'
|
||||
@ -132,7 +132,7 @@ pub async fn revolve(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
/// |> extrude(length = 20)
|
||||
///
|
||||
/// sketch001 = startSketchOn(box, "END")
|
||||
/// |> circle({ center = [10,10], radius = 4 }, %)
|
||||
/// |> circle( center = [10,10], radius = 4 )
|
||||
/// |> revolve({
|
||||
/// angle = 90,
|
||||
/// axis = getOppositeEdge(revolveAxis)
|
||||
@ -149,7 +149,7 @@ pub async fn revolve(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
/// |> extrude(length = 20)
|
||||
///
|
||||
/// sketch001 = startSketchOn(box, "END")
|
||||
/// |> circle({ center = [10,10], radius = 4 }, %)
|
||||
/// |> circle( center = [10,10], radius = 4 )
|
||||
/// |> revolve({
|
||||
/// angle = 90,
|
||||
/// axis = getOppositeEdge(revolveAxis),
|
||||
|
@ -34,7 +34,7 @@ pub async fn segment_end(exec_state: &mut ExecState, args: Args) -> Result<KclVa
|
||||
/// fn cylinder(radius, tag) {
|
||||
/// return startSketchOn('XY')
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> circle({ radius = radius, center = segEnd(tag) }, %)
|
||||
/// |> circle(radius = radius, center = segEnd(tag) )
|
||||
/// |> extrude(length = radius)
|
||||
/// }
|
||||
///
|
||||
@ -170,7 +170,7 @@ pub async fn segment_start(exec_state: &mut ExecState, args: Args) -> Result<Kcl
|
||||
/// fn cylinder(radius, tag) {
|
||||
/// return startSketchOn('XY')
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> circle({ radius = radius, center = segStart(tag) }, %)
|
||||
/// |> circle( radius = radius, center = segStart(tag) )
|
||||
/// |> extrude(length = radius)
|
||||
/// }
|
||||
///
|
||||
@ -536,7 +536,7 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
|
||||
///
|
||||
/// ```no_run
|
||||
/// circSketch = startSketchOn("XY")
|
||||
/// |> circle({ center: [0, 0], radius: 3 }, %, $circ)
|
||||
/// |> circle( center= [0, 0], radius= 3 , tag= $circ)
|
||||
///
|
||||
/// triangleSketch = startSketchOn("XY")
|
||||
/// |> startProfileAt([-5, 0], %)
|
||||
|
@ -18,6 +18,7 @@ use crate::{
|
||||
execution::{BasePath, ExecState, GeoMeta, KclValue, Path, Sketch, SketchSurface},
|
||||
parsing::ast::types::TagNode,
|
||||
std::{
|
||||
sketch::NEW_TAG_KW,
|
||||
utils::{calculate_circle_center, distance},
|
||||
Args,
|
||||
},
|
||||
@ -32,24 +33,14 @@ pub enum SketchOrSurface {
|
||||
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.
|
||||
pub async fn circle(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
||||
let (data, sketch_surface_or_group, tag): (CircleData, SketchOrSurface, Option<TagNode>) =
|
||||
args.get_circle_args()?;
|
||||
let sketch_or_surface = args.get_unlabeled_kw_arg("sketchOrSurface")?;
|
||||
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 {
|
||||
value: Box::new(sketch),
|
||||
})
|
||||
@ -60,7 +51,7 @@ pub async fn circle(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn("-XZ")
|
||||
/// |> circle({ center = [0, 0], radius = 10 }, %)
|
||||
/// |> circle( center = [0, 0], radius = 10 )
|
||||
///
|
||||
/// 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 = [-30, 0])
|
||||
/// |> close()
|
||||
/// |> hole(circle({ center = [0, 15], radius = 5 }, %), %)
|
||||
/// |> hole(circle( center = [0, 15], radius = 5), %)
|
||||
///
|
||||
/// example = extrude(exampleSketch, length = 5)
|
||||
/// ```
|
||||
#[stdlib {
|
||||
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(
|
||||
data: CircleData,
|
||||
sketch_surface_or_group: SketchOrSurface,
|
||||
sketch_or_surface: SketchOrSurface,
|
||||
center: [f64; 2],
|
||||
radius: f64,
|
||||
tag: Option<TagNode>,
|
||||
exec_state: &mut ExecState,
|
||||
args: Args,
|
||||
) -> Result<Sketch, KclError> {
|
||||
let sketch_surface = match sketch_surface_or_group {
|
||||
let sketch_surface = match sketch_or_surface {
|
||||
SketchOrSurface::SketchSurface(surface) => surface,
|
||||
SketchOrSurface::Sketch(group) => group.on,
|
||||
SketchOrSurface::Sketch(s) => s.on,
|
||||
};
|
||||
let units = sketch_surface.units();
|
||||
let sketch = crate::std::sketch::inner_start_profile_at(
|
||||
[data.center[0] + data.radius, data.center[1]],
|
||||
[center[0] + radius, center[1]],
|
||||
sketch_surface,
|
||||
None,
|
||||
exec_state,
|
||||
@ -100,7 +100,7 @@ async fn inner_circle(
|
||||
)
|
||||
.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_end = Angle::turn();
|
||||
|
||||
@ -113,8 +113,8 @@ async fn inner_circle(
|
||||
segment: PathSegment::Arc {
|
||||
start: angle_start,
|
||||
end: angle_end,
|
||||
center: KPoint2d::from(data.center).map(LengthUnit),
|
||||
radius: data.radius.into(),
|
||||
center: KPoint2d::from(center).map(LengthUnit),
|
||||
radius: radius.into(),
|
||||
relative: false,
|
||||
},
|
||||
}),
|
||||
@ -132,8 +132,8 @@ async fn inner_circle(
|
||||
metadata: args.source_range.into(),
|
||||
},
|
||||
},
|
||||
radius: data.radius,
|
||||
center: data.center,
|
||||
radius,
|
||||
center,
|
||||
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)
|
||||
///
|
||||
/// thing1 = startSketchOn(case, 'end')
|
||||
/// |> circle({ center = [-size / 2, -size / 2], radius = 25 }, %)
|
||||
/// |> circle( center = [-size / 2, -size / 2], radius = 25 )
|
||||
/// |> extrude(length = 50)
|
||||
///
|
||||
/// thing2 = startSketchOn(case, 'end')
|
||||
/// |> circle({ center = [size / 2, -size / 2], radius = 25 }, %)
|
||||
/// |> circle( center = [size / 2, -size / 2], radius = 25 )
|
||||
/// |> extrude(length = 50)
|
||||
///
|
||||
/// // 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)
|
||||
///
|
||||
/// thing1 = startSketchOn(case, 'end')
|
||||
/// |> circle({ center = [-size / 2, -size / 2], radius = 25 }, %)
|
||||
/// |> circle( center = [-size / 2, -size / 2], radius = 25 )
|
||||
/// |> extrude(length = 50)
|
||||
///
|
||||
/// thing2 = startSketchOn(case, 'end')
|
||||
/// |> circle({ center = [size / 2, -size / 2], radius = 25 }, %)
|
||||
/// |> circle( center = [size / 2, -size / 2], radius = 25 )
|
||||
/// |> extrude(length = 50)
|
||||
///
|
||||
/// // 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)
|
||||
///
|
||||
/// thing1 = startSketchOn(case, 'end')
|
||||
/// |> circle({ center = [-size / 2, -size / 2], radius = 25 }, %)
|
||||
/// |> circle( center = [-size / 2, -size / 2], radius = 25 )
|
||||
/// |> extrude(length = 50)
|
||||
///
|
||||
/// thing2 = startSketchOn(case, 'end')
|
||||
/// |> circle({ center = [size / 2, -size / 2], radius = 25 }, %)
|
||||
/// |> circle( center = [size / 2, -size / 2], radius = 25)
|
||||
/// |> extrude(length = 50)
|
||||
///
|
||||
/// // 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)
|
||||
///
|
||||
/// thing1 = startSketchOn(case, 'end')
|
||||
/// |> circle({ center = [-size / 2, -size / 2], radius = 25 }, %)
|
||||
/// |> circle( center = [-size / 2, -size / 2], radius = 25 )
|
||||
/// |> extrude(length = 50)
|
||||
///
|
||||
/// thing2 = startSketchOn(case, 'end')
|
||||
/// |> circle({ center = [size / 2, -size / 2], radius = 25 }, %)
|
||||
/// |> circle( center = [size / 2, -size / 2], radius = 25 )
|
||||
/// |> extrude(length = 50)
|
||||
///
|
||||
/// 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 = [0, -5])
|
||||
/// |> close()
|
||||
/// |> hole(circle({ center = [1, 1], radius = .25 }, %), %)
|
||||
/// |> hole(circle({ center = [1, 4], radius = .25 }, %), %)
|
||||
/// |> hole(circle( center = [1, 1], radius = .25 ), %)
|
||||
/// |> hole(circle( center = [1, 4], radius = .25 ), %)
|
||||
///
|
||||
/// 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)
|
||||
/// |> circle({ center = [0, 0], radius = 3 }, %)
|
||||
/// |> circle( center = [0, 0], radius = 3 )
|
||||
/// |> hole(squareHoleSketch(), %)
|
||||
/// 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.
|
||||
/// pipeHole = startSketchOn('XY')
|
||||
/// |> circle({
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 1.5,
|
||||
/// }, %)
|
||||
/// )
|
||||
///
|
||||
/// sweepSketch = startSketchOn('XY')
|
||||
/// |> circle({
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 2,
|
||||
/// }, %)
|
||||
/// )
|
||||
/// |> hole(pipeHole, %)
|
||||
/// |> 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.
|
||||
/// springSketch = startSketchOn('YZ')
|
||||
/// |> circle({ center = [0, 0], radius = 1 }, %)
|
||||
/// |> circle( center = [0, 0], radius = 1)
|
||||
/// |> sweep(path = helixPath)
|
||||
/// ```
|
||||
#[stdlib {
|
||||
|
@ -57,16 +57,16 @@ pub async fn scale(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
|
||||
///
|
||||
/// // Create a hole for the pipe.
|
||||
/// pipeHole = startSketchOn('XY')
|
||||
/// |> circle({
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 1.5,
|
||||
/// }, %)
|
||||
/// )
|
||||
///
|
||||
/// sweepSketch = startSketchOn('XY')
|
||||
/// |> circle({
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 2,
|
||||
/// }, %)
|
||||
/// )
|
||||
/// |> hole(pipeHole, %)
|
||||
/// |> sweep(path = sweepPath)
|
||||
/// |> scale(
|
||||
@ -150,16 +150,16 @@ pub async fn translate(exec_state: &mut ExecState, args: Args) -> Result<KclValu
|
||||
///
|
||||
/// // Create a hole for the pipe.
|
||||
/// pipeHole = startSketchOn('XY')
|
||||
/// |> circle({
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 1.5,
|
||||
/// }, %)
|
||||
/// )
|
||||
///
|
||||
/// sweepSketch = startSketchOn('XY')
|
||||
/// |> circle({
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 2,
|
||||
/// }, %)
|
||||
/// )
|
||||
/// |> hole(pipeHole, %)
|
||||
/// |> sweep(path = sweepPath)
|
||||
/// |> translate(
|
||||
@ -369,16 +369,16 @@ pub async fn rotate(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
///
|
||||
/// // Create a hole for the pipe.
|
||||
/// pipeHole = startSketchOn('XY')
|
||||
/// |> circle({
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 1.5,
|
||||
/// }, %)
|
||||
/// )
|
||||
///
|
||||
/// sweepSketch = startSketchOn('XY')
|
||||
/// |> circle({
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 2,
|
||||
/// }, %)
|
||||
/// )
|
||||
/// |> hole(pipeHole, %)
|
||||
/// |> sweep(path = sweepPath)
|
||||
/// |> rotate(
|
||||
@ -408,16 +408,16 @@ pub async fn rotate(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
///
|
||||
/// // Create a hole for the pipe.
|
||||
/// pipeHole = startSketchOn('XY')
|
||||
/// |> circle({
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 1.5,
|
||||
/// }, %)
|
||||
/// )
|
||||
///
|
||||
/// sweepSketch = startSketchOn('XY')
|
||||
/// |> circle({
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 2,
|
||||
/// }, %)
|
||||
/// )
|
||||
/// |> hole(pipeHole, %)
|
||||
/// |> sweep(path = sweepPath)
|
||||
/// |> rotate(
|
||||
@ -527,15 +527,15 @@ mod tests {
|
||||
|
||||
// Create a hole for the pipe.
|
||||
pipeHole = startSketchOn('XY')
|
||||
|> circle({
|
||||
|> circle(
|
||||
center = [0, 0],
|
||||
radius = 1.5,
|
||||
}, %)
|
||||
)
|
||||
sweepSketch = startSketchOn('XY')
|
||||
|> circle({
|
||||
|> circle(
|
||||
center = [0, 0],
|
||||
radius = 2,
|
||||
}, %)
|
||||
)
|
||||
|> hole(pipeHole, %)
|
||||
|> sweep(
|
||||
path = sweepPath,
|
||||
@ -550,8 +550,8 @@ sweepSketch = startSketchOn('XY')
|
||||
let result = parse_execute(&ast).await;
|
||||
assert!(result.is_err());
|
||||
assert_eq!(
|
||||
result.unwrap_err().to_string(),
|
||||
r#"semantic: KclErrorDetails { source_ranges: [SourceRange([630, 638, 0])], message: "Expected `roll`, `pitch`, and `yaw` or `axis` and `angle` to be provided." }"#.to_string()
|
||||
result.unwrap_err().message(),
|
||||
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;
|
||||
assert!(result.is_err());
|
||||
assert_eq!(
|
||||
result.unwrap_err().to_string(),
|
||||
r#"semantic: KclErrorDetails { source_ranges: [SourceRange([630, 668, 0])], message: "Expected `angle` to be provided when `axis` is provided." }"#.to_string()
|
||||
result.unwrap_err().message(),
|
||||
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;
|
||||
assert!(result.is_err());
|
||||
assert_eq!(
|
||||
result.unwrap_err().to_string(),
|
||||
r#"semantic: KclErrorDetails { source_ranges: [SourceRange([630, 659, 0])], message: "Expected `axis` to be provided when `angle` is provided." }"#.to_string()
|
||||
result.unwrap_err().message(),
|
||||
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;
|
||||
assert!(result.is_err());
|
||||
assert_eq!(
|
||||
result.unwrap_err().to_string(),
|
||||
r#"semantic: KclErrorDetails { source_ranges: [SourceRange([630, 685, 0])], message: "Expected angle to be between -360 and 360, found `900`" }"#.to_string()
|
||||
result.unwrap_err().message(),
|
||||
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;
|
||||
assert!(result.is_err());
|
||||
assert_eq!(
|
||||
result.unwrap_err().to_string(),
|
||||
r#"semantic: KclErrorDetails { source_ranges: [SourceRange([630, 697, 0])], message: "Expected `roll` to be provided when `pitch` or `yaw` is provided." }"#.to_string()
|
||||
result.unwrap_err().message(),
|
||||
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;
|
||||
assert!(result.is_err());
|
||||
assert_eq!(
|
||||
result.unwrap_err().to_string(),
|
||||
r#"semantic: KclErrorDetails { source_ranges: [SourceRange([630, 657, 0])], message: "Expected `roll` to be provided when `pitch` or `yaw` is provided." }"#.to_string()
|
||||
result.unwrap_err().message(),
|
||||
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;
|
||||
assert!(result.is_err());
|
||||
assert_eq!(
|
||||
result.unwrap_err().to_string(),
|
||||
r#"semantic: KclErrorDetails { source_ranges: [SourceRange([630, 689, 0])], message: "Expected yaw to be between -360 and 360, found `900`" }"#.to_string()
|
||||
result.unwrap_err().message(),
|
||||
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;
|
||||
assert!(result.is_err());
|
||||
assert_eq!(
|
||||
result.unwrap_err().to_string(),
|
||||
r#"semantic: KclErrorDetails { source_ranges: [SourceRange([630, 689, 0])], message: "Expected roll to be between -360 and 360, found `900`" }"#.to_string()
|
||||
result.unwrap_err().message(),
|
||||
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;
|
||||
assert!(result.is_err());
|
||||
assert_eq!(
|
||||
result.unwrap_err().to_string(),
|
||||
r#"semantic: KclErrorDetails { source_ranges: [SourceRange([630, 689, 0])], message: "Expected pitch to be between -360 and 360, found `900`" }"#.to_string()
|
||||
result.unwrap_err().message(),
|
||||
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;
|
||||
assert!(result.is_err());
|
||||
assert_eq!(
|
||||
result.unwrap_err().to_string(),
|
||||
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()
|
||||
result.unwrap_err().message(),
|
||||
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([-10, -5], %)
|
||||
|> close()
|
||||
|> hole(circle({
|
||||
|> hole(circle(
|
||||
center = [
|
||||
width / 2 + thk + hole_diam,
|
||||
length / 2 - hole_diam
|
||||
],
|
||||
radius = hole_diam / 2
|
||||
}, %), %)
|
||||
), %)
|
||||
|> extrude(-thk, %)
|
||||
|> patternLinear3d(
|
||||
axis = [0, -1, 0],
|
||||
@ -1508,13 +1508,13 @@ tabs_l = startSketchOn({
|
||||
|> line([0, -10], %)
|
||||
|> line([10, -5], %)
|
||||
|> close()
|
||||
|> hole(circle({
|
||||
|> hole(circle(
|
||||
center = [
|
||||
-width / 2 - thk - hole_diam,
|
||||
length / 2 - hole_diam
|
||||
],
|
||||
radius = hole_diam / 2
|
||||
}, %), %)
|
||||
), %)
|
||||
|> extrude(-thk, %)
|
||||
|> patternLinear3d(axis = [0, -1, 0], repetitions = 1, distance = length - 10)
|
||||
"#;
|
||||
@ -1602,13 +1602,13 @@ tabs_r = startSketchOn({
|
||||
|> line([0, -10], %)
|
||||
|> line([-10, -5], %)
|
||||
|> close()
|
||||
|> hole(circle({
|
||||
|> hole(circle(
|
||||
center = [
|
||||
width / 2 + thk + hole_diam,
|
||||
length / 2 - hole_diam
|
||||
],
|
||||
radius = hole_diam / 2
|
||||
}, %), %)
|
||||
radius = hole_diam / 2,
|
||||
), %)
|
||||
|> extrude(-thk, %)
|
||||
|> patternLinear3d(axis = [0, -1, 0], repetitions = 1, distance = length - 10)
|
||||
// build the tabs of the mounting bracket (left side)
|
||||
@ -1625,13 +1625,13 @@ tabs_l = startSketchOn({
|
||||
|> line([0, -10], %)
|
||||
|> line([10, -5], %)
|
||||
|> close()
|
||||
|> hole(circle({
|
||||
|> hole(circle(
|
||||
center = [
|
||||
-width / 2 - thk - hole_diam,
|
||||
length / 2 - hole_diam
|
||||
],
|
||||
radius = hole_diam / 2
|
||||
}, %), %)
|
||||
radius = hole_diam / 2,
|
||||
), %)
|
||||
|> extrude(-thk, %)
|
||||
|> patternLinear3d(axis = [0, -1, 0], repetitions = 1, distance = length - 10)
|
||||
"#
|
||||
|
@ -6,7 +6,7 @@
|
||||
/// circumference = 70
|
||||
///
|
||||
/// exampleSketch = startSketchOn("XZ")
|
||||
/// |> circle({ center = [0, 0], radius = circumference/ (2 * PI) }, %)
|
||||
/// |> circle(center = [0, 0], radius = circumference/ (2 * PI))
|
||||
///
|
||||
/// example = extrude(exampleSketch, length = 5)
|
||||
/// ```
|
||||
|
@ -338,7 +338,7 @@ description: Artifact commands assembly_non_default_units.kcl
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
197,
|
||||
239,
|
||||
232,
|
||||
3
|
||||
],
|
||||
"command": {
|
||||
@ -358,7 +358,7 @@ description: Artifact commands assembly_non_default_units.kcl
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
197,
|
||||
239,
|
||||
232,
|
||||
3
|
||||
],
|
||||
"command": {
|
||||
@ -369,7 +369,7 @@ description: Artifact commands assembly_non_default_units.kcl
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
197,
|
||||
239,
|
||||
232,
|
||||
3
|
||||
],
|
||||
"command": {
|
||||
@ -386,7 +386,7 @@ description: Artifact commands assembly_non_default_units.kcl
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
197,
|
||||
239,
|
||||
232,
|
||||
3
|
||||
],
|
||||
"command": {
|
||||
@ -415,7 +415,7 @@ description: Artifact commands assembly_non_default_units.kcl
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
197,
|
||||
239,
|
||||
232,
|
||||
3
|
||||
],
|
||||
"command": {
|
||||
@ -468,7 +468,7 @@ description: Artifact commands assembly_non_default_units.kcl
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
114,
|
||||
156,
|
||||
149,
|
||||
4
|
||||
],
|
||||
"command": {
|
||||
@ -488,7 +488,7 @@ description: Artifact commands assembly_non_default_units.kcl
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
114,
|
||||
156,
|
||||
149,
|
||||
4
|
||||
],
|
||||
"command": {
|
||||
@ -499,7 +499,7 @@ description: Artifact commands assembly_non_default_units.kcl
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
114,
|
||||
156,
|
||||
149,
|
||||
4
|
||||
],
|
||||
"command": {
|
||||
@ -516,7 +516,7 @@ description: Artifact commands assembly_non_default_units.kcl
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
114,
|
||||
156,
|
||||
149,
|
||||
4
|
||||
],
|
||||
"command": {
|
||||
@ -545,7 +545,7 @@ description: Artifact commands assembly_non_default_units.kcl
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
114,
|
||||
156,
|
||||
149,
|
||||
4
|
||||
],
|
||||
"command": {
|
||||
|
@ -1,13 +1,13 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph path2 [Path]
|
||||
2["Path<br>[197, 239, 3]"]
|
||||
3["Segment<br>[197, 239, 3]"]
|
||||
2["Path<br>[197, 232, 3]"]
|
||||
3["Segment<br>[197, 232, 3]"]
|
||||
4[Solid2d]
|
||||
end
|
||||
subgraph path6 [Path]
|
||||
6["Path<br>[114, 156, 4]"]
|
||||
7["Segment<br>[114, 156, 4]"]
|
||||
6["Path<br>[114, 149, 4]"]
|
||||
7["Segment<br>[114, 149, 4]"]
|
||||
8[Solid2d]
|
||||
end
|
||||
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.
|
||||
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.
|
||||
startSketchOn('XZ')
|
||||
|> circle({ center = [0, 2], radius = 1 }, %)
|
||||
|> circle(center = [0, 2], radius = 1)
|
||||
|
@ -1,7 +1,6 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Artifact commands fillet-and-shell.kcl
|
||||
snapshot_kind: text
|
||||
---
|
||||
[
|
||||
{
|
||||
@ -927,7 +926,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1370,
|
||||
1414,
|
||||
1407,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -947,7 +946,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1370,
|
||||
1414,
|
||||
1407,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -958,7 +957,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1370,
|
||||
1414,
|
||||
1407,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -975,7 +974,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1370,
|
||||
1414,
|
||||
1407,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1004,7 +1003,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1370,
|
||||
1414,
|
||||
1407,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1015,8 +1014,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1035,8 +1034,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1046,8 +1045,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1063,8 +1062,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1092,8 +1091,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1104,8 +1103,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1422,
|
||||
1476,
|
||||
1415,
|
||||
1462,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1117,8 +1116,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1422,
|
||||
1476,
|
||||
1415,
|
||||
1462,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1130,8 +1129,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1150,8 +1149,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1164,8 +1163,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1175,8 +1174,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1187,8 +1186,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1200,8 +1199,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1214,8 +1213,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1228,8 +1227,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1242,8 +1241,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1334,7 +1333,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1370,
|
||||
1414,
|
||||
1407,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1354,7 +1353,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1370,
|
||||
1414,
|
||||
1407,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1365,7 +1364,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1370,
|
||||
1414,
|
||||
1407,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1382,7 +1381,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1370,
|
||||
1414,
|
||||
1407,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1411,7 +1410,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1370,
|
||||
1414,
|
||||
1407,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1422,8 +1421,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1442,8 +1441,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1453,8 +1452,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1470,8 +1469,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1499,8 +1498,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1511,8 +1510,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1422,
|
||||
1476,
|
||||
1415,
|
||||
1462,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1524,8 +1523,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1422,
|
||||
1476,
|
||||
1415,
|
||||
1462,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1537,8 +1536,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1557,8 +1556,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1571,8 +1570,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1582,8 +1581,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1594,8 +1593,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1607,8 +1606,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1621,8 +1620,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1635,8 +1634,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1649,8 +1648,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1741,7 +1740,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1370,
|
||||
1414,
|
||||
1407,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1761,7 +1760,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1370,
|
||||
1414,
|
||||
1407,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1772,7 +1771,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1370,
|
||||
1414,
|
||||
1407,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1789,7 +1788,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1370,
|
||||
1414,
|
||||
1407,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1818,7 +1817,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1370,
|
||||
1414,
|
||||
1407,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1829,8 +1828,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1849,8 +1848,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1860,8 +1859,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1877,8 +1876,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1906,8 +1905,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1918,8 +1917,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1422,
|
||||
1476,
|
||||
1415,
|
||||
1462,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1931,8 +1930,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1422,
|
||||
1476,
|
||||
1415,
|
||||
1462,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1944,8 +1943,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1964,8 +1963,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1978,8 +1977,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -1989,8 +1988,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2001,8 +2000,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2014,8 +2013,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2028,8 +2027,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2042,8 +2041,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2056,8 +2055,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2148,7 +2147,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1370,
|
||||
1414,
|
||||
1407,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2168,7 +2167,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1370,
|
||||
1414,
|
||||
1407,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2179,7 +2178,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1370,
|
||||
1414,
|
||||
1407,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2196,7 +2195,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1370,
|
||||
1414,
|
||||
1407,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2225,7 +2224,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1370,
|
||||
1414,
|
||||
1407,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2236,8 +2235,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2256,8 +2255,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2267,8 +2266,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2284,8 +2283,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2313,8 +2312,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2325,8 +2324,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1422,
|
||||
1476,
|
||||
1415,
|
||||
1462,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2338,8 +2337,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1422,
|
||||
1476,
|
||||
1415,
|
||||
1462,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2351,8 +2350,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2371,8 +2370,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2385,8 +2384,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2396,8 +2395,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2408,8 +2407,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2421,8 +2420,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2435,8 +2434,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2449,8 +2448,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2463,8 +2462,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -2541,8 +2540,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
2043,
|
||||
2098,
|
||||
2029,
|
||||
2084,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
|
@ -20,52 +20,52 @@ flowchart LR
|
||||
31["Path<br>[1337, 1362, 0]"]
|
||||
end
|
||||
subgraph path32 [Path]
|
||||
32["Path<br>[1370, 1414, 0]"]
|
||||
33["Segment<br>[1370, 1414, 0]"]
|
||||
32["Path<br>[1370, 1407, 0]"]
|
||||
33["Segment<br>[1370, 1407, 0]"]
|
||||
34[Solid2d]
|
||||
end
|
||||
subgraph path35 [Path]
|
||||
35["Path<br>[1427, 1472, 0]"]
|
||||
36["Segment<br>[1427, 1472, 0]"]
|
||||
35["Path<br>[1420, 1458, 0]"]
|
||||
36["Segment<br>[1420, 1458, 0]"]
|
||||
37[Solid2d]
|
||||
end
|
||||
subgraph path45 [Path]
|
||||
45["Path<br>[1337, 1362, 0]"]
|
||||
end
|
||||
subgraph path46 [Path]
|
||||
46["Path<br>[1370, 1414, 0]"]
|
||||
47["Segment<br>[1370, 1414, 0]"]
|
||||
46["Path<br>[1370, 1407, 0]"]
|
||||
47["Segment<br>[1370, 1407, 0]"]
|
||||
48[Solid2d]
|
||||
end
|
||||
subgraph path49 [Path]
|
||||
49["Path<br>[1427, 1472, 0]"]
|
||||
50["Segment<br>[1427, 1472, 0]"]
|
||||
49["Path<br>[1420, 1458, 0]"]
|
||||
50["Segment<br>[1420, 1458, 0]"]
|
||||
51[Solid2d]
|
||||
end
|
||||
subgraph path59 [Path]
|
||||
59["Path<br>[1337, 1362, 0]"]
|
||||
end
|
||||
subgraph path60 [Path]
|
||||
60["Path<br>[1370, 1414, 0]"]
|
||||
61["Segment<br>[1370, 1414, 0]"]
|
||||
60["Path<br>[1370, 1407, 0]"]
|
||||
61["Segment<br>[1370, 1407, 0]"]
|
||||
62[Solid2d]
|
||||
end
|
||||
subgraph path63 [Path]
|
||||
63["Path<br>[1427, 1472, 0]"]
|
||||
64["Segment<br>[1427, 1472, 0]"]
|
||||
63["Path<br>[1420, 1458, 0]"]
|
||||
64["Segment<br>[1420, 1458, 0]"]
|
||||
65[Solid2d]
|
||||
end
|
||||
subgraph path73 [Path]
|
||||
73["Path<br>[1337, 1362, 0]"]
|
||||
end
|
||||
subgraph path74 [Path]
|
||||
74["Path<br>[1370, 1414, 0]"]
|
||||
75["Segment<br>[1370, 1414, 0]"]
|
||||
74["Path<br>[1370, 1407, 0]"]
|
||||
75["Segment<br>[1370, 1407, 0]"]
|
||||
76[Solid2d]
|
||||
end
|
||||
subgraph path77 [Path]
|
||||
77["Path<br>[1427, 1472, 0]"]
|
||||
78["Segment<br>[1427, 1472, 0]"]
|
||||
77["Path<br>[1420, 1458, 0]"]
|
||||
78["Segment<br>[1420, 1458, 0]"]
|
||||
79[Solid2d]
|
||||
end
|
||||
1["Plane<br>[373, 461, 0]"]
|
||||
@ -86,28 +86,28 @@ flowchart LR
|
||||
28["SweepEdge Opposite"]
|
||||
29["SweepEdge Adjacent"]
|
||||
30["Plane<br>[1310, 1329, 0]"]
|
||||
38["Sweep Extrusion<br>[1484, 1508, 0]"]
|
||||
38["Sweep Extrusion<br>[1470, 1494, 0]"]
|
||||
39[Wall]
|
||||
40["Cap Start"]
|
||||
41["Cap End"]
|
||||
42["SweepEdge Opposite"]
|
||||
43["SweepEdge Adjacent"]
|
||||
44["Plane<br>[1310, 1329, 0]"]
|
||||
52["Sweep Extrusion<br>[1484, 1508, 0]"]
|
||||
52["Sweep Extrusion<br>[1470, 1494, 0]"]
|
||||
53[Wall]
|
||||
54["Cap Start"]
|
||||
55["Cap End"]
|
||||
56["SweepEdge Opposite"]
|
||||
57["SweepEdge Adjacent"]
|
||||
58["Plane<br>[1310, 1329, 0]"]
|
||||
66["Sweep Extrusion<br>[1484, 1508, 0]"]
|
||||
66["Sweep Extrusion<br>[1470, 1494, 0]"]
|
||||
67[Wall]
|
||||
68["Cap Start"]
|
||||
69["Cap End"]
|
||||
70["SweepEdge Opposite"]
|
||||
71["SweepEdge Adjacent"]
|
||||
72["Plane<br>[1310, 1329, 0]"]
|
||||
80["Sweep Extrusion<br>[1484, 1508, 0]"]
|
||||
80["Sweep Extrusion<br>[1470, 1494, 0]"]
|
||||
81[Wall]
|
||||
82["Cap Start"]
|
||||
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) {
|
||||
screw = startSketchOn("XY")
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> circle({ center = [x, y], radius = 2.5 }, %)
|
||||
|> hole(circle({ center = [x, y], radius = 1.25 }, %), %)
|
||||
|> circle(center = [x, y], radius = 2.5)
|
||||
|> hole(circle(center = [x, y], radius = 1.25), %)
|
||||
|> extrude(length = height)
|
||||
return screw
|
||||
}
|
||||
|
@ -147,14 +147,14 @@ description: Operations executed fillet-and-shell.kcl
|
||||
"name": "m25Screw",
|
||||
"functionSourceRange": [
|
||||
1283,
|
||||
1525,
|
||||
1511,
|
||||
0
|
||||
],
|
||||
"unlabeledArg": null,
|
||||
"labeledArgs": {},
|
||||
"sourceRange": [
|
||||
1527,
|
||||
1656,
|
||||
1513,
|
||||
1642,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -191,8 +191,8 @@ description: Operations executed fillet-and-shell.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -204,16 +204,16 @@ description: Operations executed fillet-and-shell.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1474,
|
||||
1475,
|
||||
1460,
|
||||
1461,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "hole",
|
||||
"sourceRange": [
|
||||
1422,
|
||||
1476,
|
||||
1415,
|
||||
1462,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -236,16 +236,16 @@ description: Operations executed fillet-and-shell.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1501,
|
||||
1507,
|
||||
1487,
|
||||
1493,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "extrude",
|
||||
"sourceRange": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -271,14 +271,14 @@ description: Operations executed fillet-and-shell.kcl
|
||||
"name": "m25Screw",
|
||||
"functionSourceRange": [
|
||||
1283,
|
||||
1525,
|
||||
1511,
|
||||
0
|
||||
],
|
||||
"unlabeledArg": null,
|
||||
"labeledArgs": {},
|
||||
"sourceRange": [
|
||||
1658,
|
||||
1785,
|
||||
1644,
|
||||
1771,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -315,8 +315,8 @@ description: Operations executed fillet-and-shell.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -328,16 +328,16 @@ description: Operations executed fillet-and-shell.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1474,
|
||||
1475,
|
||||
1460,
|
||||
1461,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "hole",
|
||||
"sourceRange": [
|
||||
1422,
|
||||
1476,
|
||||
1415,
|
||||
1462,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -360,16 +360,16 @@ description: Operations executed fillet-and-shell.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1501,
|
||||
1507,
|
||||
1487,
|
||||
1493,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "extrude",
|
||||
"sourceRange": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -395,14 +395,14 @@ description: Operations executed fillet-and-shell.kcl
|
||||
"name": "m25Screw",
|
||||
"functionSourceRange": [
|
||||
1283,
|
||||
1525,
|
||||
1511,
|
||||
0
|
||||
],
|
||||
"unlabeledArg": null,
|
||||
"labeledArgs": {},
|
||||
"sourceRange": [
|
||||
1787,
|
||||
1912,
|
||||
1773,
|
||||
1898,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -439,8 +439,8 @@ description: Operations executed fillet-and-shell.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -452,16 +452,16 @@ description: Operations executed fillet-and-shell.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1474,
|
||||
1475,
|
||||
1460,
|
||||
1461,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "hole",
|
||||
"sourceRange": [
|
||||
1422,
|
||||
1476,
|
||||
1415,
|
||||
1462,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -484,16 +484,16 @@ description: Operations executed fillet-and-shell.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1501,
|
||||
1507,
|
||||
1487,
|
||||
1493,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "extrude",
|
||||
"sourceRange": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -519,14 +519,14 @@ description: Operations executed fillet-and-shell.kcl
|
||||
"name": "m25Screw",
|
||||
"functionSourceRange": [
|
||||
1283,
|
||||
1525,
|
||||
1511,
|
||||
0
|
||||
],
|
||||
"unlabeledArg": null,
|
||||
"labeledArgs": {},
|
||||
"sourceRange": [
|
||||
1914,
|
||||
2041,
|
||||
1900,
|
||||
2027,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -563,8 +563,8 @@ description: Operations executed fillet-and-shell.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1427,
|
||||
1472,
|
||||
1420,
|
||||
1458,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -576,16 +576,16 @@ description: Operations executed fillet-and-shell.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1474,
|
||||
1475,
|
||||
1460,
|
||||
1461,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "hole",
|
||||
"sourceRange": [
|
||||
1422,
|
||||
1476,
|
||||
1415,
|
||||
1462,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -608,16 +608,16 @@ description: Operations executed fillet-and-shell.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1501,
|
||||
1507,
|
||||
1487,
|
||||
1493,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "extrude",
|
||||
"sourceRange": [
|
||||
1484,
|
||||
1508,
|
||||
1470,
|
||||
1494,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -651,8 +651,8 @@ description: Operations executed fillet-and-shell.kcl
|
||||
]
|
||||
},
|
||||
"sourceRange": [
|
||||
2063,
|
||||
2070,
|
||||
2049,
|
||||
2056,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -671,16 +671,16 @@ description: Operations executed fillet-and-shell.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
2084,
|
||||
2097,
|
||||
2070,
|
||||
2083,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "shell",
|
||||
"sourceRange": [
|
||||
2043,
|
||||
2098,
|
||||
2029,
|
||||
2084,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -692,8 +692,8 @@ description: Operations executed fillet-and-shell.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
2049,
|
||||
2053,
|
||||
2035,
|
||||
2039,
|
||||
0
|
||||
]
|
||||
}
|
||||
|
@ -985,7 +985,7 @@ description: Variables in memory after executing fillet-and-shell.kcl
|
||||
{
|
||||
"sourceRange": [
|
||||
1283,
|
||||
1525,
|
||||
1511,
|
||||
0
|
||||
]
|
||||
}
|
||||
|
@ -326,7 +326,7 @@ description: Artifact commands flush_batch_on_end.kcl
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -346,7 +346,7 @@ description: Artifact commands flush_batch_on_end.kcl
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -357,7 +357,7 @@ description: Artifact commands flush_batch_on_end.kcl
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -374,7 +374,7 @@ description: Artifact commands flush_batch_on_end.kcl
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -403,7 +403,7 @@ description: Artifact commands flush_batch_on_end.kcl
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -414,8 +414,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
428,
|
||||
511,
|
||||
437,
|
||||
529,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -434,8 +434,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
428,
|
||||
511,
|
||||
437,
|
||||
529,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -445,8 +445,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
428,
|
||||
511,
|
||||
437,
|
||||
529,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -462,8 +462,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
428,
|
||||
511,
|
||||
437,
|
||||
529,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -491,8 +491,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
428,
|
||||
511,
|
||||
437,
|
||||
529,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -503,8 +503,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
601,
|
||||
622,
|
||||
619,
|
||||
640,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -516,8 +516,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
601,
|
||||
622,
|
||||
619,
|
||||
640,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -529,8 +529,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
678,
|
||||
715,
|
||||
696,
|
||||
733,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -549,8 +549,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
678,
|
||||
715,
|
||||
696,
|
||||
733,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -563,8 +563,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
678,
|
||||
715,
|
||||
696,
|
||||
733,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -574,8 +574,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
678,
|
||||
715,
|
||||
696,
|
||||
733,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -586,8 +586,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
678,
|
||||
715,
|
||||
696,
|
||||
733,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -599,8 +599,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
678,
|
||||
715,
|
||||
696,
|
||||
733,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -613,8 +613,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
678,
|
||||
715,
|
||||
696,
|
||||
733,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -627,8 +627,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
678,
|
||||
715,
|
||||
696,
|
||||
733,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -641,8 +641,8 @@ description: Artifact commands flush_batch_on_end.kcl
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
678,
|
||||
715,
|
||||
696,
|
||||
733,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
|
@ -1,17 +1,17 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph path2 [Path]
|
||||
2["Path<br>[282, 365, 0]"]
|
||||
3["Segment<br>[282, 365, 0]"]
|
||||
2["Path<br>[282, 374, 0]"]
|
||||
3["Segment<br>[282, 374, 0]"]
|
||||
4[Solid2d]
|
||||
end
|
||||
subgraph path5 [Path]
|
||||
5["Path<br>[428, 511, 0]"]
|
||||
6["Segment<br>[428, 511, 0]"]
|
||||
5["Path<br>[437, 529, 0]"]
|
||||
6["Segment<br>[437, 529, 0]"]
|
||||
7[Solid2d]
|
||||
end
|
||||
1["Plane<br>[199, 218, 0]"]
|
||||
8["Sweep Extrusion<br>[678, 715, 0]"]
|
||||
8["Sweep Extrusion<br>[696, 733, 0]"]
|
||||
9[Wall]
|
||||
10["Cap Start"]
|
||||
11["Cap End"]
|
||||
|
@ -188,7 +188,7 @@ description: Result of parsing flush_batch_on_end.kcl
|
||||
},
|
||||
{
|
||||
"declaration": {
|
||||
"end": 365,
|
||||
"end": 374,
|
||||
"id": {
|
||||
"end": 279,
|
||||
"name": "outerProfile",
|
||||
@ -198,24 +198,17 @@ description: Result of parsing flush_batch_on_end.kcl
|
||||
"init": {
|
||||
"arguments": [
|
||||
{
|
||||
"end": 344,
|
||||
"properties": [
|
||||
{
|
||||
"end": 312,
|
||||
"key": {
|
||||
"end": 299,
|
||||
"name": "center",
|
||||
"start": 293,
|
||||
"type": "Identifier"
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"name": "center"
|
||||
},
|
||||
"start": 293,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"arg": {
|
||||
"elements": [
|
||||
{
|
||||
"end": 306,
|
||||
"end": 318,
|
||||
"raw": "0.0",
|
||||
"start": 303,
|
||||
"start": 315,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -224,9 +217,9 @@ description: Result of parsing flush_batch_on_end.kcl
|
||||
}
|
||||
},
|
||||
{
|
||||
"end": 311,
|
||||
"end": 323,
|
||||
"raw": "0.0",
|
||||
"start": 308,
|
||||
"start": 320,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -235,36 +228,32 @@ description: Result of parsing flush_batch_on_end.kcl
|
||||
}
|
||||
}
|
||||
],
|
||||
"end": 312,
|
||||
"start": 302,
|
||||
"end": 324,
|
||||
"start": 314,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
},
|
||||
{
|
||||
"end": 342,
|
||||
"key": {
|
||||
"end": 322,
|
||||
"name": "radius",
|
||||
"start": 316,
|
||||
"type": "Identifier"
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"name": "radius"
|
||||
},
|
||||
"start": 316,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"end": 342,
|
||||
"arg": {
|
||||
"end": 354,
|
||||
"left": {
|
||||
"end": 338,
|
||||
"end": 350,
|
||||
"name": "outerDiameter",
|
||||
"start": 325,
|
||||
"start": 337,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
},
|
||||
"operator": "/",
|
||||
"right": {
|
||||
"end": 342,
|
||||
"end": 354,
|
||||
"raw": "2",
|
||||
"start": 341,
|
||||
"start": 353,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -272,30 +261,25 @@ description: Result of parsing flush_batch_on_end.kcl
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"start": 325,
|
||||
"start": 337,
|
||||
"type": "BinaryExpression",
|
||||
"type": "BinaryExpression"
|
||||
}
|
||||
}
|
||||
],
|
||||
"start": 289,
|
||||
"type": "ObjectExpression",
|
||||
"type": "ObjectExpression"
|
||||
},
|
||||
{
|
||||
"end": 355,
|
||||
"name": "sketch000",
|
||||
"start": 346,
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
"name": "tag"
|
||||
},
|
||||
{
|
||||
"end": 364,
|
||||
"start": 357,
|
||||
"arg": {
|
||||
"end": 371,
|
||||
"start": 364,
|
||||
"type": "TagDeclarator",
|
||||
"type": "TagDeclarator",
|
||||
"value": "arc000"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 288,
|
||||
@ -303,15 +287,22 @@ description: Result of parsing flush_batch_on_end.kcl
|
||||
"start": 282,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 365,
|
||||
"end": 374,
|
||||
"start": 282,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"end": 301,
|
||||
"name": "sketch000",
|
||||
"start": 292,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
}
|
||||
},
|
||||
"start": 267,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 365,
|
||||
"end": 374,
|
||||
"kind": "const",
|
||||
"start": 267,
|
||||
"type": "VariableDeclaration",
|
||||
@ -319,34 +310,27 @@ description: Result of parsing flush_batch_on_end.kcl
|
||||
},
|
||||
{
|
||||
"declaration": {
|
||||
"end": 511,
|
||||
"end": 529,
|
||||
"id": {
|
||||
"end": 425,
|
||||
"end": 434,
|
||||
"name": "innerProfile",
|
||||
"start": 413,
|
||||
"start": 422,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"arguments": [
|
||||
{
|
||||
"end": 490,
|
||||
"properties": [
|
||||
{
|
||||
"end": 458,
|
||||
"key": {
|
||||
"end": 445,
|
||||
"name": "center",
|
||||
"start": 439,
|
||||
"type": "Identifier"
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"name": "center"
|
||||
},
|
||||
"start": 439,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"arg": {
|
||||
"elements": [
|
||||
{
|
||||
"end": 452,
|
||||
"end": 473,
|
||||
"raw": "0.0",
|
||||
"start": 449,
|
||||
"start": 470,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -355,9 +339,9 @@ description: Result of parsing flush_batch_on_end.kcl
|
||||
}
|
||||
},
|
||||
{
|
||||
"end": 457,
|
||||
"end": 478,
|
||||
"raw": "0.0",
|
||||
"start": 454,
|
||||
"start": 475,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -366,36 +350,32 @@ description: Result of parsing flush_batch_on_end.kcl
|
||||
}
|
||||
}
|
||||
],
|
||||
"end": 458,
|
||||
"start": 448,
|
||||
"end": 479,
|
||||
"start": 469,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
},
|
||||
{
|
||||
"end": 488,
|
||||
"key": {
|
||||
"end": 468,
|
||||
"name": "radius",
|
||||
"start": 462,
|
||||
"type": "Identifier"
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"name": "radius"
|
||||
},
|
||||
"start": 462,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"end": 488,
|
||||
"arg": {
|
||||
"end": 509,
|
||||
"left": {
|
||||
"end": 484,
|
||||
"end": 505,
|
||||
"name": "innerDiameter",
|
||||
"start": 471,
|
||||
"start": 492,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
},
|
||||
"operator": "/",
|
||||
"right": {
|
||||
"end": 488,
|
||||
"end": 509,
|
||||
"raw": "2",
|
||||
"start": 487,
|
||||
"start": 508,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -403,104 +383,106 @@ description: Result of parsing flush_batch_on_end.kcl
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"start": 471,
|
||||
"start": 492,
|
||||
"type": "BinaryExpression",
|
||||
"type": "BinaryExpression"
|
||||
}
|
||||
}
|
||||
],
|
||||
"start": 435,
|
||||
"type": "ObjectExpression",
|
||||
"type": "ObjectExpression"
|
||||
},
|
||||
{
|
||||
"end": 501,
|
||||
"name": "sketch000",
|
||||
"start": 492,
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
"name": "tag"
|
||||
},
|
||||
{
|
||||
"end": 510,
|
||||
"start": 503,
|
||||
"arg": {
|
||||
"end": 526,
|
||||
"start": 519,
|
||||
"type": "TagDeclarator",
|
||||
"type": "TagDeclarator",
|
||||
"value": "arc001"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 434,
|
||||
"end": 443,
|
||||
"name": "circle",
|
||||
"start": 428,
|
||||
"start": 437,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 511,
|
||||
"start": 428,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"end": 529,
|
||||
"start": 437,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"end": 456,
|
||||
"name": "sketch000",
|
||||
"start": 447,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
}
|
||||
},
|
||||
"start": 413,
|
||||
"start": 422,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 511,
|
||||
"end": 529,
|
||||
"kind": "const",
|
||||
"start": 413,
|
||||
"start": 422,
|
||||
"type": "VariableDeclaration",
|
||||
"type": "VariableDeclaration"
|
||||
},
|
||||
{
|
||||
"declaration": {
|
||||
"end": 670,
|
||||
"end": 688,
|
||||
"id": {
|
||||
"end": 580,
|
||||
"end": 598,
|
||||
"name": "pipeProfile",
|
||||
"start": 569,
|
||||
"start": 587,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"body": [
|
||||
{
|
||||
"end": 595,
|
||||
"end": 613,
|
||||
"name": "outerProfile",
|
||||
"start": 583,
|
||||
"start": 601,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"end": 618,
|
||||
"end": 636,
|
||||
"name": "innerProfile",
|
||||
"start": 606,
|
||||
"start": 624,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
},
|
||||
{
|
||||
"end": 621,
|
||||
"start": 620,
|
||||
"end": 639,
|
||||
"start": 638,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 605,
|
||||
"end": 623,
|
||||
"name": "hole",
|
||||
"start": 601,
|
||||
"start": 619,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 622,
|
||||
"start": 601,
|
||||
"end": 640,
|
||||
"start": 619,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
}
|
||||
],
|
||||
"end": 670,
|
||||
"end": 688,
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {
|
||||
"1": [
|
||||
{
|
||||
"end": 670,
|
||||
"start": 622,
|
||||
"end": 688,
|
||||
"start": 640,
|
||||
"type": "NonCodeNode",
|
||||
"value": {
|
||||
"type": "newLineBlockComment",
|
||||
@ -512,26 +494,26 @@ description: Result of parsing flush_batch_on_end.kcl
|
||||
},
|
||||
"startNodes": []
|
||||
},
|
||||
"start": 583,
|
||||
"start": 601,
|
||||
"type": "PipeExpression",
|
||||
"type": "PipeExpression"
|
||||
},
|
||||
"start": 569,
|
||||
"start": 587,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 670,
|
||||
"end": 688,
|
||||
"kind": "const",
|
||||
"start": 569,
|
||||
"start": 587,
|
||||
"type": "VariableDeclaration",
|
||||
"type": "VariableDeclaration"
|
||||
},
|
||||
{
|
||||
"declaration": {
|
||||
"end": 715,
|
||||
"end": 733,
|
||||
"id": {
|
||||
"end": 675,
|
||||
"end": 693,
|
||||
"name": "pipe",
|
||||
"start": 671,
|
||||
"start": 689,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
@ -543,43 +525,43 @@ description: Result of parsing flush_batch_on_end.kcl
|
||||
"name": "length"
|
||||
},
|
||||
"arg": {
|
||||
"end": 714,
|
||||
"end": 732,
|
||||
"name": "length",
|
||||
"start": 708,
|
||||
"start": 726,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 685,
|
||||
"end": 703,
|
||||
"name": "extrude",
|
||||
"start": 678,
|
||||
"start": 696,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 715,
|
||||
"start": 678,
|
||||
"end": 733,
|
||||
"start": 696,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"end": 697,
|
||||
"end": 715,
|
||||
"name": "pipeProfile",
|
||||
"start": 686,
|
||||
"start": 704,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
}
|
||||
},
|
||||
"start": 671,
|
||||
"start": 689,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 715,
|
||||
"end": 733,
|
||||
"kind": "const",
|
||||
"start": 671,
|
||||
"start": 689,
|
||||
"type": "VariableDeclaration",
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"end": 716,
|
||||
"end": 734,
|
||||
"innerAttrs": [
|
||||
{
|
||||
"end": 33,
|
||||
@ -641,8 +623,8 @@ description: Result of parsing flush_batch_on_end.kcl
|
||||
],
|
||||
"4": [
|
||||
{
|
||||
"end": 412,
|
||||
"start": 365,
|
||||
"end": 421,
|
||||
"start": 374,
|
||||
"type": "NonCodeNode",
|
||||
"value": {
|
||||
"type": "newLineBlockComment",
|
||||
@ -653,8 +635,8 @@ description: Result of parsing flush_batch_on_end.kcl
|
||||
],
|
||||
"5": [
|
||||
{
|
||||
"end": 568,
|
||||
"start": 511,
|
||||
"end": 586,
|
||||
"start": 529,
|
||||
"type": "NonCodeNode",
|
||||
"value": {
|
||||
"type": "newLineBlockComment",
|
||||
|
@ -11,16 +11,20 @@ length = 1 + 1 / 2
|
||||
sketch000 = startSketchOn('XY')
|
||||
|
||||
// create a profile of the outside of the pipe
|
||||
outerProfile = circle({
|
||||
outerProfile = circle(
|
||||
sketch000,
|
||||
center = [0.0, 0.0],
|
||||
radius = outerDiameter / 2
|
||||
}, sketch000, $arc000)
|
||||
radius = outerDiameter / 2,
|
||||
tag = $arc000,
|
||||
)
|
||||
|
||||
// create a profile of the inside of the pipe
|
||||
innerProfile = circle({
|
||||
innerProfile = circle(
|
||||
sketch000,
|
||||
center = [0.0, 0.0],
|
||||
radius = innerDiameter / 2
|
||||
}, sketch000, $arc001)
|
||||
radius = innerDiameter / 2,
|
||||
tag = $arc001,
|
||||
)
|
||||
|
||||
// create a profile with holes sketch000Profile000Holes
|
||||
pipeProfile = outerProfile
|
||||
|
@ -36,8 +36,8 @@ description: Operations executed flush_batch_on_end.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
606,
|
||||
618,
|
||||
624,
|
||||
636,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -49,16 +49,16 @@ description: Operations executed flush_batch_on_end.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
620,
|
||||
621,
|
||||
638,
|
||||
639,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "hole",
|
||||
"sourceRange": [
|
||||
601,
|
||||
622,
|
||||
619,
|
||||
640,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -75,16 +75,16 @@ description: Operations executed flush_batch_on_end.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
708,
|
||||
714,
|
||||
726,
|
||||
732,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "extrude",
|
||||
"sourceRange": [
|
||||
678,
|
||||
715,
|
||||
696,
|
||||
733,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -96,8 +96,8 @@ description: Operations executed flush_batch_on_end.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
686,
|
||||
697,
|
||||
704,
|
||||
715,
|
||||
0
|
||||
]
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -31,8 +31,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
],
|
||||
"radius": 0.2734375,
|
||||
"tag": {
|
||||
"end": 364,
|
||||
"start": 357,
|
||||
"end": 371,
|
||||
"start": 364,
|
||||
"type": "TagDeclarator",
|
||||
"value": "arc000"
|
||||
},
|
||||
@ -50,12 +50,12 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
],
|
||||
"tag": {
|
||||
"end": 364,
|
||||
"start": 357,
|
||||
"end": 371,
|
||||
"start": 364,
|
||||
"type": "TagDeclarator",
|
||||
"value": "arc000"
|
||||
},
|
||||
@ -65,8 +65,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
357,
|
||||
364,
|
||||
371,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -84,8 +84,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"__geoMeta": {
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
428,
|
||||
511,
|
||||
437,
|
||||
529,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -100,8 +100,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
],
|
||||
"radius": 0.182,
|
||||
"tag": {
|
||||
"end": 510,
|
||||
"start": 503,
|
||||
"end": 526,
|
||||
"start": 519,
|
||||
"type": "TagDeclarator",
|
||||
"value": "arc001"
|
||||
},
|
||||
@ -119,8 +119,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
503,
|
||||
510,
|
||||
519,
|
||||
526,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -158,8 +158,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"__geoMeta": {
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
428,
|
||||
511,
|
||||
437,
|
||||
529,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -174,8 +174,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
],
|
||||
"radius": 0.182,
|
||||
"tag": {
|
||||
"end": 510,
|
||||
"start": 503,
|
||||
"end": 526,
|
||||
"start": 519,
|
||||
"type": "TagDeclarator",
|
||||
"value": "arc001"
|
||||
},
|
||||
@ -235,8 +235,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"__geoMeta": {
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
428,
|
||||
511,
|
||||
437,
|
||||
529,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -253,8 +253,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"__geoMeta": {
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
428,
|
||||
511,
|
||||
437,
|
||||
529,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -269,8 +269,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
],
|
||||
"radius": 0.182,
|
||||
"tag": {
|
||||
"end": 510,
|
||||
"start": 503,
|
||||
"end": 526,
|
||||
"start": 519,
|
||||
"type": "TagDeclarator",
|
||||
"value": "arc001"
|
||||
},
|
||||
@ -288,8 +288,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
503,
|
||||
510,
|
||||
519,
|
||||
526,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -304,8 +304,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
428,
|
||||
511,
|
||||
437,
|
||||
529,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -376,7 +376,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -391,8 +391,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
],
|
||||
"radius": 0.2734375,
|
||||
"tag": {
|
||||
"end": 364,
|
||||
"start": 357,
|
||||
"end": 371,
|
||||
"start": 364,
|
||||
"type": "TagDeclarator",
|
||||
"value": "arc000"
|
||||
},
|
||||
@ -453,7 +453,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -471,7 +471,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -486,8 +486,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
],
|
||||
"radius": 0.2734375,
|
||||
"tag": {
|
||||
"end": 364,
|
||||
"start": 357,
|
||||
"end": 371,
|
||||
"start": 364,
|
||||
"type": "TagDeclarator",
|
||||
"value": "arc000"
|
||||
},
|
||||
@ -505,12 +505,12 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
],
|
||||
"tag": {
|
||||
"end": 364,
|
||||
"start": 357,
|
||||
"end": 371,
|
||||
"start": 364,
|
||||
"type": "TagDeclarator",
|
||||
"value": "arc000"
|
||||
},
|
||||
@ -520,8 +520,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
357,
|
||||
364,
|
||||
371,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -537,7 +537,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
{
|
||||
"sourceRange": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -556,12 +556,12 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
],
|
||||
"tag": {
|
||||
"end": 364,
|
||||
"start": 357,
|
||||
"end": 371,
|
||||
"start": 364,
|
||||
"type": "TagDeclarator",
|
||||
"value": "arc000"
|
||||
},
|
||||
@ -577,7 +577,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -592,8 +592,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
],
|
||||
"radius": 0.2734375,
|
||||
"tag": {
|
||||
"end": 364,
|
||||
"start": 357,
|
||||
"end": 371,
|
||||
"start": 364,
|
||||
"type": "TagDeclarator",
|
||||
"value": "arc000"
|
||||
},
|
||||
@ -654,7 +654,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -672,7 +672,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -687,8 +687,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
],
|
||||
"radius": 0.2734375,
|
||||
"tag": {
|
||||
"end": 364,
|
||||
"start": 357,
|
||||
"end": 371,
|
||||
"start": 364,
|
||||
"type": "TagDeclarator",
|
||||
"value": "arc000"
|
||||
},
|
||||
@ -706,12 +706,12 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
],
|
||||
"tag": {
|
||||
"end": 364,
|
||||
"start": 357,
|
||||
"end": 371,
|
||||
"start": 364,
|
||||
"type": "TagDeclarator",
|
||||
"value": "arc000"
|
||||
},
|
||||
@ -721,8 +721,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
357,
|
||||
364,
|
||||
371,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -738,7 +738,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
{
|
||||
"sourceRange": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -754,7 +754,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
{
|
||||
"sourceRange": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -772,7 +772,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -787,8 +787,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
],
|
||||
"radius": 0.2734375,
|
||||
"tag": {
|
||||
"end": 364,
|
||||
"start": 357,
|
||||
"end": 371,
|
||||
"start": 364,
|
||||
"type": "TagDeclarator",
|
||||
"value": "arc000"
|
||||
},
|
||||
@ -849,7 +849,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -867,7 +867,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -882,8 +882,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
],
|
||||
"radius": 0.2734375,
|
||||
"tag": {
|
||||
"end": 364,
|
||||
"start": 357,
|
||||
"end": 371,
|
||||
"start": 364,
|
||||
"type": "TagDeclarator",
|
||||
"value": "arc000"
|
||||
},
|
||||
@ -901,12 +901,12 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
],
|
||||
"tag": {
|
||||
"end": 364,
|
||||
"start": 357,
|
||||
"end": 371,
|
||||
"start": 364,
|
||||
"type": "TagDeclarator",
|
||||
"value": "arc000"
|
||||
},
|
||||
@ -916,8 +916,8 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
357,
|
||||
364,
|
||||
371,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -933,7 +933,7 @@ description: Variables in memory after executing flush_batch_on_end.kcl
|
||||
{
|
||||
"sourceRange": [
|
||||
282,
|
||||
365,
|
||||
374,
|
||||
0
|
||||
]
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Artifact commands helix_ccw.kcl
|
||||
snapshot_kind: text
|
||||
---
|
||||
[
|
||||
{
|
||||
@ -315,7 +314,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
35,
|
||||
78,
|
||||
71,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -335,7 +334,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
35,
|
||||
78,
|
||||
71,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -346,7 +345,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
35,
|
||||
78,
|
||||
71,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -363,7 +362,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
35,
|
||||
78,
|
||||
71,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -392,7 +391,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
35,
|
||||
78,
|
||||
71,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -403,8 +402,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
84,
|
||||
104,
|
||||
77,
|
||||
97,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -423,8 +422,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
84,
|
||||
104,
|
||||
77,
|
||||
97,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -437,8 +436,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
84,
|
||||
104,
|
||||
77,
|
||||
97,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -448,8 +447,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
84,
|
||||
104,
|
||||
77,
|
||||
97,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -460,8 +459,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
84,
|
||||
104,
|
||||
77,
|
||||
97,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -473,8 +472,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
84,
|
||||
104,
|
||||
77,
|
||||
97,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -487,8 +486,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
84,
|
||||
104,
|
||||
77,
|
||||
97,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -501,8 +500,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
110,
|
||||
205,
|
||||
103,
|
||||
198,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
|
@ -1,12 +1,12 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph path2 [Path]
|
||||
2["Path<br>[35, 78, 0]"]
|
||||
3["Segment<br>[35, 78, 0]"]
|
||||
2["Path<br>[35, 71, 0]"]
|
||||
3["Segment<br>[35, 71, 0]"]
|
||||
4[Solid2d]
|
||||
end
|
||||
1["Plane<br>[10, 29, 0]"]
|
||||
5["Sweep Extrusion<br>[84, 104, 0]"]
|
||||
5["Sweep Extrusion<br>[77, 97, 0]"]
|
||||
6[Wall]
|
||||
7["Cap Start"]
|
||||
8["Cap End"]
|
||||
|
@ -7,7 +7,7 @@ description: Result of parsing helix_ccw.kcl
|
||||
"body": [
|
||||
{
|
||||
"declaration": {
|
||||
"end": 205,
|
||||
"end": 198,
|
||||
"id": {
|
||||
"end": 7,
|
||||
"name": "part001",
|
||||
@ -41,24 +41,17 @@ description: Result of parsing helix_ccw.kcl
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"end": 74,
|
||||
"properties": [
|
||||
{
|
||||
"end": 59,
|
||||
"key": {
|
||||
"end": 50,
|
||||
"name": "center",
|
||||
"start": 44,
|
||||
"type": "Identifier"
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"name": "center"
|
||||
},
|
||||
"start": 44,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"arg": {
|
||||
"elements": [
|
||||
{
|
||||
"end": 55,
|
||||
"end": 53,
|
||||
"raw": "5",
|
||||
"start": 54,
|
||||
"start": 52,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -67,9 +60,9 @@ description: Result of parsing helix_ccw.kcl
|
||||
}
|
||||
},
|
||||
{
|
||||
"end": 58,
|
||||
"end": 56,
|
||||
"raw": "5",
|
||||
"start": 57,
|
||||
"start": 55,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -78,26 +71,22 @@ description: Result of parsing helix_ccw.kcl
|
||||
}
|
||||
}
|
||||
],
|
||||
"end": 59,
|
||||
"start": 53,
|
||||
"end": 57,
|
||||
"start": 51,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
},
|
||||
{
|
||||
"end": 72,
|
||||
"key": {
|
||||
"end": 67,
|
||||
"name": "radius",
|
||||
"start": 61,
|
||||
"type": "Identifier"
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"name": "radius"
|
||||
},
|
||||
"start": 61,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"end": 72,
|
||||
"arg": {
|
||||
"end": 70,
|
||||
"raw": "10",
|
||||
"start": 70,
|
||||
"start": 68,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"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": {
|
||||
"end": 41,
|
||||
"name": "circle",
|
||||
"start": 35,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 78,
|
||||
"end": 71,
|
||||
"start": 35,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
@ -138,9 +117,9 @@ description: Result of parsing helix_ccw.kcl
|
||||
"name": "length"
|
||||
},
|
||||
"arg": {
|
||||
"end": 103,
|
||||
"end": 96,
|
||||
"raw": "10",
|
||||
"start": 101,
|
||||
"start": 94,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -151,13 +130,13 @@ description: Result of parsing helix_ccw.kcl
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 91,
|
||||
"end": 84,
|
||||
"name": "extrude",
|
||||
"start": 84,
|
||||
"start": 77,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 104,
|
||||
"start": 84,
|
||||
"end": 97,
|
||||
"start": 77,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
@ -165,22 +144,22 @@ description: Result of parsing helix_ccw.kcl
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"end": 201,
|
||||
"end": 194,
|
||||
"properties": [
|
||||
{
|
||||
"end": 152,
|
||||
"end": 145,
|
||||
"key": {
|
||||
"end": 147,
|
||||
"end": 140,
|
||||
"name": "revolutions",
|
||||
"start": 136,
|
||||
"start": 129,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"start": 136,
|
||||
"start": 129,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"end": 152,
|
||||
"end": 145,
|
||||
"raw": "16",
|
||||
"start": 150,
|
||||
"start": 143,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -190,19 +169,19 @@ description: Result of parsing helix_ccw.kcl
|
||||
}
|
||||
},
|
||||
{
|
||||
"end": 175,
|
||||
"end": 168,
|
||||
"key": {
|
||||
"end": 171,
|
||||
"end": 164,
|
||||
"name": "angleStart",
|
||||
"start": 161,
|
||||
"start": 154,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"start": 161,
|
||||
"start": 154,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"end": 175,
|
||||
"end": 168,
|
||||
"raw": "0",
|
||||
"start": 174,
|
||||
"start": 167,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -212,49 +191,49 @@ description: Result of parsing helix_ccw.kcl
|
||||
}
|
||||
},
|
||||
{
|
||||
"end": 194,
|
||||
"key": {
|
||||
"end": 187,
|
||||
"key": {
|
||||
"end": 180,
|
||||
"name": "ccw",
|
||||
"start": 184,
|
||||
"start": 177,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"start": 184,
|
||||
"start": 177,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"end": 194,
|
||||
"end": 187,
|
||||
"raw": "true",
|
||||
"start": 190,
|
||||
"start": 183,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"start": 127,
|
||||
"start": 120,
|
||||
"type": "ObjectExpression",
|
||||
"type": "ObjectExpression"
|
||||
},
|
||||
{
|
||||
"end": 204,
|
||||
"start": 203,
|
||||
"end": 197,
|
||||
"start": 196,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 126,
|
||||
"end": 119,
|
||||
"name": "helixRevolutions",
|
||||
"start": 110,
|
||||
"start": 103,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 205,
|
||||
"start": 110,
|
||||
"end": 198,
|
||||
"start": 103,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
}
|
||||
],
|
||||
"end": 205,
|
||||
"end": 198,
|
||||
"start": 10,
|
||||
"type": "PipeExpression",
|
||||
"type": "PipeExpression"
|
||||
@ -262,14 +241,14 @@ description: Result of parsing helix_ccw.kcl
|
||||
"start": 0,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 205,
|
||||
"end": 198,
|
||||
"kind": "const",
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"end": 206,
|
||||
"end": 199,
|
||||
"start": 0
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
part001 = startSketchOn('XY')
|
||||
|> circle({ center = [5, 5], radius = 10 }, %)
|
||||
|> circle(center = [5, 5], radius = 10)
|
||||
|> extrude(length = 10)
|
||||
|> helixRevolutions({
|
||||
revolutions = 16,
|
||||
|
@ -43,16 +43,16 @@ description: Operations executed helix_ccw.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
101,
|
||||
103,
|
||||
94,
|
||||
96,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "extrude",
|
||||
"sourceRange": [
|
||||
84,
|
||||
104,
|
||||
77,
|
||||
97,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -109,8 +109,8 @@ description: Operations executed helix_ccw.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
127,
|
||||
201,
|
||||
120,
|
||||
194,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -122,16 +122,16 @@ description: Operations executed helix_ccw.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
203,
|
||||
204,
|
||||
196,
|
||||
197,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "helixRevolutions",
|
||||
"sourceRange": [
|
||||
110,
|
||||
205,
|
||||
103,
|
||||
198,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
|
@ -15,7 +15,7 @@ description: Variables in memory after executing helix_ccw.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
35,
|
||||
78,
|
||||
71,
|
||||
0
|
||||
],
|
||||
"tag": null,
|
||||
@ -31,7 +31,7 @@ description: Variables in memory after executing helix_ccw.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
35,
|
||||
78,
|
||||
71,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -103,7 +103,7 @@ description: Variables in memory after executing helix_ccw.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
35,
|
||||
78,
|
||||
71,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -117,7 +117,7 @@ description: Variables in memory after executing helix_ccw.kcl
|
||||
{
|
||||
"sourceRange": [
|
||||
35,
|
||||
78,
|
||||
71,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -133,7 +133,7 @@ description: Variables in memory after executing helix_ccw.kcl
|
||||
{
|
||||
"sourceRange": [
|
||||
35,
|
||||
78,
|
||||
71,
|
||||
0
|
||||
]
|
||||
}
|
||||
|
@ -2,4 +2,4 @@ export fn foo = () => { return 0 }
|
||||
|
||||
// This interacts with the engine.
|
||||
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
|
||||
description: Artifact commands import_whole.kcl
|
||||
snapshot_kind: text
|
||||
---
|
||||
[
|
||||
{
|
||||
@ -327,7 +326,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
61,
|
||||
104,
|
||||
97,
|
||||
3
|
||||
],
|
||||
"command": {
|
||||
@ -347,7 +346,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
61,
|
||||
104,
|
||||
97,
|
||||
3
|
||||
],
|
||||
"command": {
|
||||
@ -358,7 +357,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
61,
|
||||
104,
|
||||
97,
|
||||
3
|
||||
],
|
||||
"command": {
|
||||
@ -375,7 +374,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
61,
|
||||
104,
|
||||
97,
|
||||
3
|
||||
],
|
||||
"command": {
|
||||
@ -404,7 +403,7 @@ snapshot_kind: text
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
61,
|
||||
104,
|
||||
97,
|
||||
3
|
||||
],
|
||||
"command": {
|
||||
@ -415,8 +414,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
110,
|
||||
130,
|
||||
103,
|
||||
123,
|
||||
3
|
||||
],
|
||||
"command": {
|
||||
@ -435,8 +434,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
110,
|
||||
130,
|
||||
103,
|
||||
123,
|
||||
3
|
||||
],
|
||||
"command": {
|
||||
@ -449,8 +448,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
110,
|
||||
130,
|
||||
103,
|
||||
123,
|
||||
3
|
||||
],
|
||||
"command": {
|
||||
@ -460,8 +459,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
110,
|
||||
130,
|
||||
103,
|
||||
123,
|
||||
3
|
||||
],
|
||||
"command": {
|
||||
@ -472,8 +471,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
110,
|
||||
130,
|
||||
103,
|
||||
123,
|
||||
3
|
||||
],
|
||||
"command": {
|
||||
@ -485,8 +484,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
110,
|
||||
130,
|
||||
103,
|
||||
123,
|
||||
3
|
||||
],
|
||||
"command": {
|
||||
@ -499,8 +498,8 @@ snapshot_kind: text
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
110,
|
||||
130,
|
||||
103,
|
||||
123,
|
||||
3
|
||||
],
|
||||
"command": {
|
||||
|
@ -1,6 +1,5 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
assertion_line: 188
|
||||
description: Artifact graph flowchart import_whole.kcl
|
||||
extension: md
|
||||
snapshot_kind: binary
|
||||
|
@ -1,12 +1,12 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph path2 [Path]
|
||||
2["Path<br>[61, 104, 3]"]
|
||||
3["Segment<br>[61, 104, 3]"]
|
||||
2["Path<br>[61, 97, 3]"]
|
||||
3["Segment<br>[61, 97, 3]"]
|
||||
4[Solid2d]
|
||||
end
|
||||
1["Plane<br>[36, 55, 3]"]
|
||||
5["Sweep Extrusion<br>[110, 130, 3]"]
|
||||
5["Sweep Extrusion<br>[103, 123, 3]"]
|
||||
6[Wall]
|
||||
7["Cap Start"]
|
||||
8["Cap End"]
|
||||
|
@ -1,4 +1,4 @@
|
||||
@settings(defaultLengthUnit = inch)
|
||||
startSketchOn('XY')
|
||||
|> circle({ center = [5, 5], radius = 10 }, %)
|
||||
|> circle(center = [5, 5], radius = 10)
|
||||
|> extrude(length = 10)
|
||||
|
@ -43,16 +43,16 @@ description: Operations executed import_whole.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
127,
|
||||
129,
|
||||
120,
|
||||
122,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "extrude",
|
||||
"sourceRange": [
|
||||
110,
|
||||
130,
|
||||
103,
|
||||
123,
|
||||
3
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
|
@ -15,7 +15,7 @@ description: Variables in memory after executing import_whole.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
61,
|
||||
104,
|
||||
97,
|
||||
3
|
||||
],
|
||||
"tag": null,
|
||||
@ -31,7 +31,7 @@ description: Variables in memory after executing import_whole.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
61,
|
||||
104,
|
||||
97,
|
||||
3
|
||||
]
|
||||
},
|
||||
@ -103,7 +103,7 @@ description: Variables in memory after executing import_whole.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
61,
|
||||
104,
|
||||
97,
|
||||
3
|
||||
]
|
||||
}
|
||||
@ -117,7 +117,7 @@ description: Variables in memory after executing import_whole.kcl
|
||||
{
|
||||
"sourceRange": [
|
||||
61,
|
||||
104,
|
||||
97,
|
||||
3
|
||||
]
|
||||
}
|
||||
@ -133,7 +133,7 @@ description: Variables in memory after executing import_whole.kcl
|
||||
{
|
||||
"sourceRange": [
|
||||
61,
|
||||
104,
|
||||
97,
|
||||
3
|
||||
]
|
||||
}
|
||||
|
@ -412,7 +412,7 @@ description: Artifact commands revolve_about_edge.kcl
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
145,
|
||||
190,
|
||||
183,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -432,7 +432,7 @@ description: Artifact commands revolve_about_edge.kcl
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
145,
|
||||
190,
|
||||
183,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -443,7 +443,7 @@ description: Artifact commands revolve_about_edge.kcl
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
145,
|
||||
190,
|
||||
183,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -460,7 +460,7 @@ description: Artifact commands revolve_about_edge.kcl
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
145,
|
||||
190,
|
||||
183,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -489,7 +489,7 @@ description: Artifact commands revolve_about_edge.kcl
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
145,
|
||||
190,
|
||||
183,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -500,8 +500,8 @@ description: Artifact commands revolve_about_edge.kcl
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
196,
|
||||
270,
|
||||
189,
|
||||
263,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -518,8 +518,8 @@ description: Artifact commands revolve_about_edge.kcl
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
196,
|
||||
270,
|
||||
189,
|
||||
263,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -530,8 +530,8 @@ description: Artifact commands revolve_about_edge.kcl
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
196,
|
||||
270,
|
||||
189,
|
||||
263,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -543,8 +543,8 @@ description: Artifact commands revolve_about_edge.kcl
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
196,
|
||||
270,
|
||||
189,
|
||||
263,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
@ -557,8 +557,8 @@ description: Artifact commands revolve_about_edge.kcl
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
196,
|
||||
270,
|
||||
189,
|
||||
263,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user