Fix KCL examples

This commit is contained in:
Adam Chalmers
2025-03-12 16:52:36 -05:00
parent a1ff7de996
commit f53ef5d370
248 changed files with 188136 additions and 187952 deletions

View File

@ -36,9 +36,9 @@ myAngle = -120
sketch001 = startSketchOn(XZ) sketch001 = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> line(end = [8, 0]) |> line(end = [8, 0])
|> angledLine({ angle = abs(myAngle), length = 5 }, %) |> angledLine(angle = abs(myAngle), length = 5)
|> line(end = [-5, 0]) |> line(end = [-5, 0])
|> angledLine({ angle = myAngle, length = 5 }, %) |> angledLine(angle = myAngle, length = 5)
|> close() |> close()
baseExtrusion = extrude(sketch001, length = 5) baseExtrusion = extrude(sketch001, length = 5)

View File

@ -33,10 +33,7 @@ acos(num: number): number
```js ```js
sketch001 = startSketchOn(XZ) sketch001 = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ |> angledLine(angle = toDegrees(acos(0.5)), length = 10)
angle = toDegrees(acos(0.5)),
length = 10
}, %)
|> line(end = [5, 0]) |> line(end = [5, 0])
|> line(endAbsolute = [12, 0]) |> line(endAbsolute = [12, 0])
|> close() |> close()

View File

@ -36,7 +36,7 @@ angleToMatchLengthX(
sketch001 = startSketchOn(XZ) sketch001 = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> line(end = [2, 5], tag = $seg01) |> line(end = [2, 5], tag = $seg01)
|> angledLineToX([-angleToMatchLengthX(seg01, 7, %), 10], %) |> angledLine(angle = -angleToMatchLengthX(seg01, 7, %), endAbsoluteX = 10)
|> close() |> close()
extrusion = extrude(sketch001, length = 5) extrusion = extrude(sketch001, length = 5)

View File

@ -36,10 +36,7 @@ angleToMatchLengthY(
sketch001 = startSketchOn(XZ) sketch001 = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> line(end = [1, 2], tag = $seg01) |> line(end = [1, 2], tag = $seg01)
|> angledLine({ |> angledLine(angle = angleToMatchLengthY(seg01, 15, %), length = 5)
angle = angleToMatchLengthY(seg01, 15, %),
length = 5
}, %)
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -10,8 +10,13 @@ Draw a line segment relative to the current origin using the polar measure of so
```js ```js
angledLine( angledLine(
data: AngledLineData,
sketch: Sketch, sketch: Sketch,
angle: number,
length?: number,
lengthX?: number,
lengthY?: number,
endAbsoluteX?: number,
endAbsoluteY?: number,
tag?: TagDeclarator, tag?: TagDeclarator,
): Sketch ): Sketch
``` ```
@ -21,9 +26,14 @@ angledLine(
| Name | Type | Description | Required | | Name | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `data` | [`AngledLineData`](/docs/kcl/types/AngledLineData) | Data to draw an angled line. | Yes | | `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | Which sketch should this path be added to? | Yes |
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | | Yes | | `angle` | [`number`](/docs/kcl/types/number) | Which angle should the line be drawn at? | Yes |
| [`tag`](/docs/kcl/types/tag) | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | | No | | `length` | [`number`](/docs/kcl/types/number) | Draw the line this distance along the given angle. Only one of `length`, `lengthX`, `lengthY`, `lengthAbsoluteEndX`, `lengthAbsoluteEndY` can be given. | No |
| `lengthX` | [`number`](/docs/kcl/types/number) | Draw the line this distance along the X axis. Only one of `length`, `lengthX`, `lengthY`, `lengthAbsoluteEndX`, `lengthAbsoluteEndY` can be given. | No |
| `lengthY` | [`number`](/docs/kcl/types/number) | Draw the line this distance along the Y axis. Only one of `length`, `lengthX`, `lengthY`, `lengthAbsoluteEndX`, `lengthAbsoluteEndY` can be given. | No |
| `endAbsoluteX` | [`number`](/docs/kcl/types/number) | Draw the line along the given angle until it reaches this point along the X axis. Only one of `length`, `lengthX`, `lengthY`, `lengthAbsoluteEndX`, `lengthAbsoluteEndY` can be given. | No |
| `endAbsoluteY` | [`number`](/docs/kcl/types/number) | Draw the line along the given angle until it reaches this point along the Y axis. Only one of `length`, `lengthX`, `lengthY`, `lengthAbsoluteEndX`, `lengthAbsoluteEndY` can be given. | No |
| [`tag`](/docs/kcl/types/tag) | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | Create a new tag which refers to this line | No |
### Returns ### Returns
@ -36,7 +46,7 @@ angledLine(
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> yLine(endAbsolute = 15) |> yLine(endAbsolute = 15)
|> angledLine({ angle = 30, length = 15 }, %) |> angledLine(angle = 30, length = 15)
|> line(end = [8, -10]) |> line(end = [8, -10])
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -33,10 +33,7 @@ asin(num: number): number
```js ```js
sketch001 = startSketchOn(XZ) sketch001 = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ |> angledLine(angle = toDegrees(asin(0.5)), length = 20)
angle = toDegrees(asin(0.5)),
length = 20
}, %)
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -33,10 +33,7 @@ atan(num: number): number
```js ```js
sketch001 = startSketchOn(XZ) sketch001 = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ |> angledLine(angle = toDegrees(atan(1.25)), length = 20)
angle = toDegrees(atan(1.25)),
length = 20
}, %)
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -37,10 +37,7 @@ atan2(
```js ```js
sketch001 = startSketchOn(XZ) sketch001 = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ |> angledLine(angle = toDegrees(atan2(1.25, 2)), length = 20)
angle = toDegrees(atan2(1.25, 2)),
length = 20
}, %)
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -17,10 +17,10 @@ std::math::E: number = 2.71828182845904523536028747135266250_
```js ```js
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ |> angledLine(
angle = 30, angle = 30,
length = 2 * E ^ 2, length = 2 * E ^ 2,
}, %) )
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -17,10 +17,10 @@ std::math::TAU: number = 6.28318530717958647692528676655900577_
```js ```js
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ |> angledLine(
angle = 50, angle = 50,
length = 10 * TAU, length = 10 * TAU,
}, %) )
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -30,7 +30,7 @@ e(): number
```js ```js
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ angle = 30, length = 2 * e() ^ 2 }, %) |> angledLine(angle = 30, length = 2 * e() ^ 2)
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -30,10 +30,10 @@ getNextAdjacentEdge(tag: TagIdentifier): Uuid
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> line(end = [10, 0]) |> line(end = [10, 0])
|> angledLine({ angle = 60, length = 10 }, %) |> angledLine(angle = 60, length = 10)
|> angledLine({ angle = 120, length = 10 }, %) |> angledLine(angle = 120, length = 10)
|> line(end = [-10, 0]) |> line(end = [-10, 0])
|> angledLine({ angle = 240, length = 10 }, %, $referenceEdge) |> angledLine(angle = 240, length = 10, tag = $referenceEdge)
|> close() |> close()
example = extrude(exampleSketch, length = 5) example = extrude(exampleSketch, length = 5)

View File

@ -30,10 +30,10 @@ getOppositeEdge(tag: TagIdentifier): Uuid
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> line(end = [10, 0]) |> line(end = [10, 0])
|> angledLine({ angle = 60, length = 10 }, %) |> angledLine(angle = 60, length = 10)
|> angledLine({ angle = 120, length = 10 }, %) |> angledLine(angle = 120, length = 10)
|> line(end = [-10, 0]) |> line(end = [-10, 0])
|> angledLine({ angle = 240, length = 10 }, %, $referenceEdge) |> angledLine(angle = 240, length = 10, tag = $referenceEdge)
|> close() |> close()
example = extrude(exampleSketch, length = 5) example = extrude(exampleSketch, length = 5)

View File

@ -30,10 +30,10 @@ getPreviousAdjacentEdge(tag: TagIdentifier): Uuid
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> line(end = [10, 0]) |> line(end = [10, 0])
|> angledLine({ angle = 60, length = 10 }, %) |> angledLine(angle = 60, length = 10)
|> angledLine({ angle = 120, length = 10 }, %) |> angledLine(angle = 120, length = 10)
|> line(end = [-10, 0]) |> line(end = [-10, 0])
|> angledLine({ angle = 240, length = 10 }, %, $referenceEdge) |> angledLine(angle = 240, length = 10, tag = $referenceEdge)
|> close() |> close()
example = extrude(exampleSketch, length = 5) example = extrude(exampleSketch, length = 5)

View File

@ -37,11 +37,7 @@ layout: manual
* [`angleToMatchLengthX`](kcl/angleToMatchLengthX) * [`angleToMatchLengthX`](kcl/angleToMatchLengthX)
* [`angleToMatchLengthY`](kcl/angleToMatchLengthY) * [`angleToMatchLengthY`](kcl/angleToMatchLengthY)
* [`angledLine`](kcl/angledLine) * [`angledLine`](kcl/angledLine)
* [`angledLineOfXLength`](kcl/angledLineOfXLength)
* [`angledLineOfYLength`](kcl/angledLineOfYLength)
* [`angledLineThatIntersects`](kcl/angledLineThatIntersects) * [`angledLineThatIntersects`](kcl/angledLineThatIntersects)
* [`angledLineToX`](kcl/angledLineToX)
* [`angledLineToY`](kcl/angledLineToY)
* [`appearance`](kcl/appearance) * [`appearance`](kcl/appearance)
* [`arc`](kcl/arc) * [`arc`](kcl/arc)
* [`arcTo`](kcl/arcTo) * [`arcTo`](kcl/arcTo)

View File

@ -33,10 +33,7 @@ max(args: [number]): number
```js ```js
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ |> angledLine(angle = 70, length = max(15, 31, 4, 13, 22))
angle = 70,
length = max(15, 31, 4, 13, 22)
}, %)
|> line(end = [20, 0]) |> line(end = [20, 0])
|> close() |> close()

View File

@ -33,10 +33,7 @@ min(args: [number]): number
```js ```js
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ |> angledLine(angle = 70, length = min(15, 31, 4, 13, 22))
angle = 70,
length = min(15, 31, 4, 13, 22)
}, %)
|> line(end = [20, 0]) |> line(end = [20, 0])
|> close() |> close()

View File

@ -37,7 +37,7 @@ pow(
```js ```js
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ angle = 50, length = pow(5, 2) }, %) |> angledLine(angle = 50, length = pow(5, 2))
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -29,11 +29,8 @@ profileStart(sketch: Sketch): [number]
```js ```js
sketch001 = startSketchOn(XY) sketch001 = startSketchOn(XY)
|> startProfileAt([5, 2], %) |> startProfileAt([5, 2], %)
|> angledLine({ angle = 120, length = 50 }, %, $seg01) |> angledLine(angle = 120, length = 50, tag = $seg01)
|> angledLine({ |> angledLine(angle = segAng(seg01) + 120, length = 50)
angle = segAng(seg01) + 120,
length = 50
}, %)
|> line(end = profileStart(%)) |> line(end = profileStart(%))
|> close() |> close()
|> extrude(length = 20) |> extrude(length = 20)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -151,15 +151,9 @@ cube
sketch001 = startSketchOn(XY) sketch001 = startSketchOn(XY)
rectangleSketch = startProfileAt([-200, 23.86], sketch001) rectangleSketch = startProfileAt([-200, 23.86], sketch001)
|> angledLine([0, 73.47], %, $rectangleSegmentA001) |> angledLine(angle = 0, length = 73.47, tag = $rectangleSegmentA001)
|> angledLine([ |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 50.61)
segAng(rectangleSegmentA001) - 90, |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001))
50.61
], %)
|> angledLine([
segAng(rectangleSegmentA001),
-segLen(rectangleSegmentA001)
], %)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()

View File

@ -85,15 +85,9 @@ cube
sketch001 = startSketchOn(XY) sketch001 = startSketchOn(XY)
rectangleSketch = startProfileAt([-200, 23.86], sketch001) rectangleSketch = startProfileAt([-200, 23.86], sketch001)
|> angledLine([0, 73.47], %, $rectangleSegmentA001) |> angledLine(angle = 0, length = 73.47, tag = $rectangleSegmentA001)
|> angledLine([ |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 50.61)
segAng(rectangleSegmentA001) - 90, |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001))
50.61
], %)
|> angledLine([
segAng(rectangleSegmentA001),
-segLen(rectangleSegmentA001)
], %)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()

View File

@ -32,9 +32,9 @@ exampleSketch = startSketchOn(XZ)
|> line(end = [10, 0]) |> line(end = [10, 0])
|> line(end = [5, 10], tag = $seg01) |> line(end = [5, 10], tag = $seg01)
|> line(end = [-10, 0]) |> line(end = [-10, 0])
|> angledLine([segAng(seg01), 10], %) |> angledLine(angle = segAng(seg01), length = 10)
|> line(end = [-10, 0]) |> line(end = [-10, 0])
|> angledLine([segAng(seg01), -15], %) |> angledLine(angle = segAng(seg01), length = -15)
|> close() |> close()
example = extrude(exampleSketch, length = 4) example = extrude(exampleSketch, length = 4)

View File

@ -29,9 +29,9 @@ segLen(tag: TagIdentifier): number
```js ```js
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ angle = 60, length = 10 }, %, $thing) |> angledLine(angle = 60, length = 10, tag = $thing)
|> tangentialArc({ offset = -120, radius = 5 }, %) |> tangentialArc({ offset = -120, radius = 5 }, %)
|> angledLine({ angle = -60, length = segLen(thing) }, %) |> angledLine(angle = -60, length = segLen(thing))
|> close() |> close()
example = extrude(exampleSketch, length = 5) example = extrude(exampleSketch, length = 5)

View File

@ -33,7 +33,7 @@ sqrt(num: number): number
```js ```js
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ angle = 50, length = sqrt(2500) }, %) |> angledLine(angle = 50, length = sqrt(2500))
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -29,10 +29,10 @@ cos(@num: number(rad)): number(_)
```js ```js
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ |> angledLine(
angle = 30, angle = 30,
length = 3 / cos(toRadians(30)), length = 3 / cos(toRadians(30)),
}, %) )
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -29,10 +29,10 @@ sin(@num: number(rad)): number(_)
```js ```js
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ |> angledLine(
angle = 50, angle = 50,
length = 15 / sin(toDegrees(135)), length = 15 / sin(toDegrees(135)),
}, %) )
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -29,10 +29,10 @@ tan(@num: number(rad)): number(_)
```js ```js
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ |> angledLine(
angle = 50, angle = 50,
length = 50 * tan(1/2), length = 50 * tan(1/2),
}, %) )
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

File diff suppressed because it is too large Load Diff

View File

@ -91,15 +91,9 @@ springSketch = startSketchOn(YZ)
sketch001 = startSketchOn(XY) sketch001 = startSketchOn(XY)
rectangleSketch = startProfileAt([-200, 23.86], sketch001) rectangleSketch = startProfileAt([-200, 23.86], sketch001)
|> angledLine([0, 73.47], %, $rectangleSegmentA001) |> angledLine(angle = 0, length = 73.47, tag = $rectangleSegmentA001)
|> angledLine([ |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 50.61)
segAng(rectangleSegmentA001) - 90, |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001))
50.61
], %)
|> angledLine([
segAng(rectangleSegmentA001),
-segLen(rectangleSegmentA001)
], %)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()

View File

@ -32,10 +32,7 @@ pillSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> line(end = [20, 0]) |> line(end = [20, 0])
|> tangentialArcToRelative([0, 10], %, $arc1) |> tangentialArcToRelative([0, 10], %, $arc1)
|> angledLine({ |> angledLine(angle = tangentToEnd(arc1), length = 20)
angle = tangentToEnd(arc1),
length = 20
}, %)
|> tangentialArcToRelative([0, -10], %) |> tangentialArcToRelative([0, -10], %)
|> close() |> close()
@ -50,10 +47,7 @@ pillSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> line(end = [0, 20]) |> line(end = [0, 20])
|> tangentialArcTo([10, 20], %, $arc1) |> tangentialArcTo([10, 20], %, $arc1)
|> angledLine({ |> angledLine(angle = tangentToEnd(arc1), length = 20)
angle = tangentToEnd(arc1),
length = 20
}, %)
|> tangentialArcToRelative([-10, 0], %) |> tangentialArcToRelative([-10, 0], %)
|> close() |> close()
@ -66,10 +60,7 @@ pillExtrude = extrude(pillSketch, length = 10)
rectangleSketch = startSketchOn(XZ) rectangleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> line(end = [10, 0], tag = $seg1) |> line(end = [10, 0], tag = $seg1)
|> angledLine({ |> angledLine(angle = tangentToEnd(seg1), length = 10)
angle = tangentToEnd(seg1),
length = 10
}, %)
|> line(end = [0, 10]) |> line(end = [0, 10])
|> line(end = [-20, 0]) |> line(end = [-20, 0])
|> close() |> close()
@ -83,7 +74,7 @@ rectangleExtrude = extrude(rectangleSketch, length = 10)
bottom = startSketchOn(XY) bottom = startSketchOn(XY)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> arcTo({ end = [10, 10], interior = [5, 1] }, %, $arc1) |> arcTo({ end = [10, 10], interior = [5, 1] }, %, $arc1)
|> angledLine([tangentToEnd(arc1), 20], %) |> angledLine(angle = tangentToEnd(arc1), length = 20)
|> close() |> close()
``` ```
@ -95,7 +86,7 @@ circSketch = startSketchOn(XY)
triangleSketch = startSketchOn(XY) triangleSketch = startSketchOn(XY)
|> startProfileAt([-5, 0], %) |> startProfileAt([-5, 0], %)
|> angledLine([tangentToEnd(circ), 10], %) |> angledLine(angle = tangentToEnd(circ), length = 10)
|> line(end = [-15, 0]) |> line(end = [-15, 0])
|> close() |> close()
``` ```

View File

@ -35,9 +35,9 @@ tangentialArc(
```js ```js
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ angle = 60, length = 10 }, %) |> angledLine(angle = 60, length = 10)
|> tangentialArc({ radius = 10, offset = -120 }, %) |> tangentialArc({ radius = 10, offset = -120 }, %)
|> angledLine({ angle = -60, length = 10 }, %) |> angledLine(angle = -60, length = 10)
|> close() |> close()
example = extrude(exampleSketch, length = 10) example = extrude(exampleSketch, length = 10)

View File

@ -35,7 +35,7 @@ tangentialArcTo(
```js ```js
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ angle = 60, length = 10 }, %) |> angledLine(angle = 60, length = 10)
|> tangentialArcTo([15, 15], %) |> tangentialArcTo([15, 15], %)
|> line(end = [10, -15]) |> line(end = [10, -15])
|> close() |> close()

View File

@ -35,7 +35,7 @@ tangentialArcToRelative(
```js ```js
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ angle = 45, length = 10 }, %) |> angledLine(angle = 45, length = 10)
|> tangentialArcToRelative([0, -10], %) |> tangentialArcToRelative([0, -10], %)
|> line(end = [-10, 0]) |> line(end = [-10, 0])
|> close() |> close()

View File

@ -30,7 +30,7 @@ tau(): number
```js ```js
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ angle = 50, length = 10 * tau() }, %) |> angledLine(angle = 50, length = 10 * tau())
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -33,10 +33,7 @@ toDegrees(num: number): number
```js ```js
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ |> angledLine(angle = 50, length = 70 * cos(toDegrees(pi() / 4)))
angle = 50,
length = 70 * cos(toDegrees(pi() / 4))
}, %)
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -33,10 +33,7 @@ toRadians(num: number): number
```js ```js
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({ |> angledLine(angle = 50, length = 70 * cos(toRadians(45)))
angle = 50,
length = 70 * cos(toRadians(45))
}, %)
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -81,15 +81,9 @@ cube
sketch001 = startSketchOn(XY) sketch001 = startSketchOn(XY)
rectangleSketch = startProfileAt([-200, 23.86], sketch001) rectangleSketch = startProfileAt([-200, 23.86], sketch001)
|> angledLine([0, 73.47], %, $rectangleSegmentA001) |> angledLine(angle = 0, length = 73.47, tag = $rectangleSegmentA001)
|> angledLine([ |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 50.61)
segAng(rectangleSegmentA001) - 90, |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001))
50.61
], %)
|> angledLine([
segAng(rectangleSegmentA001),
-segLen(rectangleSegmentA001)
], %)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()

View File

@ -184,15 +184,17 @@ way:
```norun ```norun
startSketchOn('XZ') startSketchOn('XZ')
|> startProfileAt(origin, %) |> startProfileAt(origin, %)
|> angledLine({angle = 0, length = 191.26}, %, $rectangleSegmentA001) |> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001)
|> angledLine({ |> angledLine(
angle = segAng(rectangleSegmentA001) - 90, angle = segAng(rectangleSegmentA001) - 90,
length = 196.99, length = 196.99,
}, %, $rectangleSegmentB001) tag = $rectangleSegmentB001,
|> angledLine({ )
|> angledLine(
angle = segAng(rectangleSegmentA001), angle = segAng(rectangleSegmentA001),
length = -segLen(rectangleSegmentA001), length = -segLen(rectangleSegmentA001),
}, %, $rectangleSegmentC001) tag = $rectangleSegmentC001,
)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
``` ```
@ -217,15 +219,17 @@ However if the code was written like this:
fn rect(origin) { fn rect(origin) {
return startSketchOn('XZ') return startSketchOn('XZ')
|> startProfileAt(origin, %) |> startProfileAt(origin, %)
|> angledLine({angle = 0, length = 191.26}, %, $rectangleSegmentA001) |> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001)
|> angledLine({ |> angledLine(
angle = segAng(rectangleSegmentA001) - 90, angle = segAng(rectangleSegmentA001) - 90,
length = 196.99 length = 196.99,
}, %, $rectangleSegmentB001) tag = $rectangleSegmentB001,
|> angledLine({ )
|> angledLine(
angle = segAng(rectangleSegmentA001), angle = segAng(rectangleSegmentA001),
length = -segLen(rectangleSegmentA001) length = -segLen(rectangleSegmentA001)
}, %, $rectangleSegmentC001) tag = $rectangleSegmentC001,
)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
} }
@ -245,15 +249,17 @@ For example the following code works.
fn rect(origin) { fn rect(origin) {
return startSketchOn('XZ') return startSketchOn('XZ')
|> startProfileAt(origin, %) |> startProfileAt(origin, %)
|> angledLine({angle = 0, length = 191.26}, %, $rectangleSegmentA001) |> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001)
|> angledLine({ |> angledLine(
angle = segAng(rectangleSegmentA001) - 90, angle = segAng(rectangleSegmentA001) - 90,
length = 196.99 length = 196.99,
}, %, $rectangleSegmentB001) tag = $rectangleSegmentB001,
|> angledLine({ )
|> angledLine(
angle = segAng(rectangleSegmentA001), angle = segAng(rectangleSegmentA001),
length = -segLen(rectangleSegmentA001) length = -segLen(rectangleSegmentA001)
}, %, $rectangleSegmentC001) tag = $rectangleSegmentC001,
)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
} }

View File

@ -14,15 +14,17 @@ way:
```js ```js
startSketchOn('XZ') startSketchOn('XZ')
|> startProfileAt(origin, %) |> startProfileAt(origin, %)
|> angledLine({angle = 0, length = 191.26}, %, $rectangleSegmentA001) |> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001)
|> angledLine({ |> angledLine(
angle = segAng(rectangleSegmentA001) - 90, angle = segAng(rectangleSegmentA001) - 90,
length = 196.99, length = 196.99,
}, %, $rectangleSegmentB001) tag = $rectangleSegmentB001,
|> angledLine({ )
|> angledLine(
angle = segAng(rectangleSegmentA001), angle = segAng(rectangleSegmentA001),
length = -segLen(rectangleSegmentA001), length = -segLen(rectangleSegmentA001),
}, %, $rectangleSegmentC001) tag = $rectangleSegmentC001,
)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
``` ```
@ -46,15 +48,16 @@ However if the code was written like this:
fn rect(origin) { fn rect(origin) {
return startSketchOn('XZ') return startSketchOn('XZ')
|> startProfileAt(origin, %) |> startProfileAt(origin, %)
|> angledLine({angle = 0, length = 191.26}, %, $rectangleSegmentA001) |> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001)
|> angledLine({ |> angledLine(
angle = segAng(rectangleSegmentA001) - 90, angle = segAng(rectangleSegmentA001) - 90,
length = 196.99 length = 196.99,
}, %, $rectangleSegmentB001) tag = $rectangleSegmentB001)
|> angledLine({ |> angledLine(
angle = segAng(rectangleSegmentA001), angle = segAng(rectangleSegmentA001),
length = -segLen(rectangleSegmentA001) length = -segLen(rectangleSegmentA001),
}, %, $rectangleSegmentC001) tag = $rectangleSegmentC001
)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
} }
@ -74,15 +77,15 @@ For example the following code works.
fn rect(origin) { fn rect(origin) {
return startSketchOn('XZ') return startSketchOn('XZ')
|> startProfileAt(origin, %) |> startProfileAt(origin, %)
|> angledLine({angle = 0, length = 191.26}, %, $rectangleSegmentA001) |> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001)
|> angledLine({ |> angledLine(
angle = segAng(rectangleSegmentA001) - 90, angle = segAng(rectangleSegmentA001) - 90,
length = 196.99 length = 196.99
}, %, $rectangleSegmentB001) , %, $rectangleSegmentB001)
|> angledLine({ |> angledLine(
angle = segAng(rectangleSegmentA001), angle = segAng(rectangleSegmentA001),
length = -segLen(rectangleSegmentA001) length = -segLen(rectangleSegmentA001)
}, %, $rectangleSegmentC001) , %, $rectangleSegmentC001)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
} }

View File

@ -38,10 +38,10 @@ xLine(
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> xLine(length = 15) |> xLine(length = 15)
|> angledLine({ angle = 80, length = 15 }, %) |> angledLine(angle = 80, length = 15)
|> line(end = [8, -10]) |> line(end = [8, -10])
|> xLine(length = 10) |> xLine(length = 10)
|> angledLine({ angle = 120, length = 30 }, %) |> angledLine(angle = 120, length = 30)
|> xLine(length = -15) |> xLine(length = -15)
|> close() |> close()

View File

@ -38,7 +38,7 @@ yLine(
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> yLine(length = 15) |> yLine(length = 15)
|> angledLine({ angle = 30, length = 15 }, %) |> angledLine(angle = 30, length = 15)
|> line(end = [8, -10]) |> line(end = [8, -10])
|> yLine(length = -5) |> yLine(length = -5)
|> close() |> close()

View File

@ -31,15 +31,17 @@ fn rail8020(originStart, railHeight, railLength) {
|> xLine(length = 0.06 * railHeight, tag = $edge1) |> xLine(length = 0.06 * railHeight, tag = $edge1)
|> yLine(length = 0.087 * railHeight, tag = $edge2) |> yLine(length = 0.087 * railHeight, tag = $edge2)
|> xLine(length = -0.183 * railHeight, tag = $edge3) |> xLine(length = -0.183 * railHeight, tag = $edge3)
|> angledLineToY({ |> angledLine(
angle = 45, angle = 45,
to = (1 - 0.356) / 2 * railHeight + originStart[1] endAbsoluteY = (1 - 0.356) / 2 * railHeight + originStart[1],
}, %, $edge4) tag = $edge4,
)
|> xLine(length = 0.232 * railHeight, tag = $edge5) |> xLine(length = 0.232 * railHeight, tag = $edge5)
|> angledLineToY({ |> angledLine(
angle = -45, angle = -45,
to = 0.087 * railHeight + originStart[1] endAbsoluteY = 0.087 * railHeight + originStart[1],
}, %, $edge6) tag = $edge6,
)
|> xLine(length = -0.183 * railHeight, tag = $edge7) |> xLine(length = -0.183 * railHeight, tag = $edge7)
|> yLine(length = -0.087 * railHeight, tag = $edge8) |> yLine(length = -0.087 * railHeight, tag = $edge8)
|> xLine(length = 0.06 * railHeight) |> xLine(length = 0.06 * railHeight)
@ -75,15 +77,17 @@ fn rail8020(originStart, railHeight, railLength) {
|> yLine(length = 0.06 * railHeight, tag = $edge9) |> yLine(length = 0.06 * railHeight, tag = $edge9)
|> xLine(length = -0.087 * railHeight, tag = $edge10) |> xLine(length = -0.087 * railHeight, tag = $edge10)
|> yLine(length = -0.183 * railHeight, tag = $edge11) // edge11 |> yLine(length = -0.183 * railHeight, tag = $edge11) // edge11
|> angledLineToX({ |> angledLine(
angle = 135, angle = 135,
to = ((1 - 0.356) / 2 + 0.356) * railHeight + originStart[0] endAbsoluteX = ((1 - 0.356) / 2 + 0.356) * railHeight + originStart[0],
}, %, $edge12) // edge12 tag = $edge12,
) // edge12
|> yLine(length = 0.232 * railHeight, tag = $edge13) // 13 |> yLine(length = 0.232 * railHeight, tag = $edge13) // 13
|> angledLineToX({ |> angledLine(
angle = 45, angle = 45,
to = (1 - 0.087) * railHeight + originStart[0] endAbsoluteX = (1 - 0.087) * railHeight + originStart[0],
}, %, $edge14) // 14 tag = $edge14,
) // 14
|> yLine(length = -0.183 * railHeight, tag = $edge15) // 15 |> yLine(length = -0.183 * railHeight, tag = $edge15) // 15
|> xLine(length = 0.087 * railHeight, tag = $edge16) |> xLine(length = 0.087 * railHeight, tag = $edge16)
|> yLine(length = 0.06 * railHeight) |> yLine(length = 0.06 * railHeight)
@ -119,15 +123,17 @@ fn rail8020(originStart, railHeight, railLength) {
|> xLine(length = -0.06 * railHeight, tag = $edge17) |> xLine(length = -0.06 * railHeight, tag = $edge17)
|> yLine(length = -0.087 * railHeight, tag = $edge18) |> yLine(length = -0.087 * railHeight, tag = $edge18)
|> xLine(length = 0.183 * railHeight, tag = $edge19) |> xLine(length = 0.183 * railHeight, tag = $edge19)
|> angledLineToY({ |> angledLine(
angle = 45, angle = 45,
to = ((1 - 0.356) / 2 + 0.356) * railHeight + originStart[1] endAbsoluteY = ((1 - 0.356) / 2 + 0.356) * railHeight + originStart[1],
}, %, $edge20) tag = $edge20,
)
|> xLine(length = -0.232 * railHeight, tag = $edge21) |> xLine(length = -0.232 * railHeight, tag = $edge21)
|> angledLineToY({ |> angledLine(
angle = 135, angle = 135,
to = (1 - 0.087) * railHeight + originStart[1] endAbsoluteY = (1 - 0.087) * railHeight + originStart[1],
}, %, $edge22) tag = $edge22,
)
|> xLine(length = 0.183 * railHeight, tag = $edge23) |> xLine(length = 0.183 * railHeight, tag = $edge23)
|> yLine(length = 0.087 * railHeight, tag = $edge24) |> yLine(length = 0.087 * railHeight, tag = $edge24)
|> xLine(length = -0.06 * railHeight) |> xLine(length = -0.06 * railHeight)
@ -163,15 +169,17 @@ fn rail8020(originStart, railHeight, railLength) {
|> yLine(length = -0.06 * railHeight, tag = $edge25) |> yLine(length = -0.06 * railHeight, tag = $edge25)
|> xLine(length = 0.087 * railHeight, tag = $edge26) |> xLine(length = 0.087 * railHeight, tag = $edge26)
|> yLine(length = 0.183 * railHeight, tag = $edge27) |> yLine(length = 0.183 * railHeight, tag = $edge27)
|> angledLineToX({ |> angledLine(
angle = 135, angle = 135,
to = (1 - 0.356) / 2 * railHeight + originStart[0] endAbsoluteX = (1 - 0.356) / 2 * railHeight + originStart[0],
}, %, $edge28) tag = $edge28,
)
|> yLine(length = -0.232 * railHeight, tag = $edge29) |> yLine(length = -0.232 * railHeight, tag = $edge29)
|> angledLineToX({ |> angledLine(
angle = 45, angle = 45,
to = 0.087 * railHeight + originStart[0] endAbsoluteX = 0.087 * railHeight + originStart[0],
}, %, $edge30) tag = $edge30,
)
|> yLine(length = 0.183 * railHeight, tag = $edge31) |> yLine(length = 0.183 * railHeight, tag = $edge31)
|> xLine(length = -0.087 * railHeight, tag = $edge32) |> xLine(length = -0.087 * railHeight, tag = $edge32)
|> yLine(length = -0.06 * railHeight) |> yLine(length = -0.06 * railHeight)

View File

@ -86,11 +86,11 @@ export fn seatSlats(plane, length) {
fn backSlatsSketch(plane) { fn backSlatsSketch(plane) {
sketch004 = startSketchOn(plane) sketch004 = startSketchOn(plane)
|> startProfileAt([22, 38.5], %) |> startProfileAt([22, 38.5], %)
|> angledLine([173, 2], %) |> angledLine(angle = 173, length = 2)
|> line(end = [-1.74, 2.03]) |> line(end = [-1.74, 2.03])
|> angledLine([82, 6.6], %) |> angledLine(angle = 82, length = 6.6)
|> line(end = [2.23, 1.42]) |> line(end = [2.23, 1.42])
|> angledLine([-7, 2], %) |> angledLine(angle = -7, length = 2)
|> line(endAbsolute = profileStart(%)) |> line(endAbsolute = profileStart(%))
|> close() |> close()
|> patternLinear2d(instances = 2, distance = 11, axis = [-0.137, -1]) |> patternLinear2d(instances = 2, distance = 11, axis = [-0.137, -1])

View File

@ -23,7 +23,7 @@ customPlane = {
fn lug(plane, length, diameter) { fn lug(plane, length, diameter) {
lugSketch = startSketchOn(customPlane) lugSketch = startSketchOn(customPlane)
|> startProfileAt([0 + diameter / 2, 0], %) |> startProfileAt([0 + diameter / 2, 0], %)
|> angledLineOfYLength({ angle = 70, length = lugHeadLength }, %) |> angledLine(angle = 70, lengthY = lugHeadLength)
|> xLine(endAbsolute = lugDiameter / 2) |> xLine(endAbsolute = lugDiameter / 2)
|> yLine(endAbsolute = lugLength) |> yLine(endAbsolute = lugLength)
|> tangentialArc({ offset = 90, radius = 3 * mm() }, %) |> tangentialArc({ offset = 90, radius = 3 * mm() }, %)

View File

@ -22,20 +22,22 @@ tealPlane = offsetPlane(YZ, offset = -halfSize)
// Sketch a rectangle centered at the origin of the profile // Sketch a rectangle centered at the origin of the profile
fn sketchRectangle(profile, color) { fn sketchRectangle(profile, color) {
return profile return profile
|> startProfileAt([-halfSize, halfSize], %) |> startProfileAt([-halfSize, halfSize], %)
|> angledLine([0, size], %, $rectangleSegmentA001) |> angledLine(angle = 0, length = size, tag = $rectangleSegmentA001)
|> angledLine([ |> angledLine(
segAng(rectangleSegmentA001) - 90, angle = segAng(rectangleSegmentA001) - 90,
size length = size,
], %, $rectangleSegmentB001) tag = $rectangleSegmentB001,
|> angledLine([ )
segAng(rectangleSegmentA001), |> angledLine(
-segLen(rectangleSegmentA001) angle = segAng(rectangleSegmentA001),
], %, $rectangleSegmentC001) length = -segLen(rectangleSegmentA001),
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) tag = $rectangleSegmentC001,
|> close() )
|> extrude(%, length = extrudeLength) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> appearance(color = color, metalness = metalConstant, roughness = roughnessConstant) |> close()
|> extrude(length = extrudeLength)
|> appearance(color = color, metalness = metalConstant, roughness = roughnessConstant)
} }
// Sketch each side of the cube // Sketch each side of the cube

View File

@ -13,15 +13,17 @@ holeDia = 4
// Model a box with base enclosure dimensions // Model a box with base enclosure dimensions
sketch001 = startSketchOn(XY) sketch001 = startSketchOn(XY)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine([0, width], %, $rectangleSegmentA001) |> angledLine(angle = 0, length = width, tag = $rectangleSegmentA001)
|> angledLine([ |> angledLine(
segAng(rectangleSegmentA001) + 90, angle = segAng(rectangleSegmentA001) + 90,
length length = length,
], %, $rectangleSegmentB001) tag = $rectangleSegmentB001,
|> angledLine([ )
segAng(rectangleSegmentA001), |> angledLine(
-segLen(rectangleSegmentA001) angle = segAng(rectangleSegmentA001),
], %, $rectangleSegmentC001) length = -segLen(rectangleSegmentA001),
tag = $rectangleSegmentC001,
)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $rectangleSegmentD001) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $rectangleSegmentD001)
|> close() |> close()
extrude001 = extrude(sketch001, length = height) extrude001 = extrude(sketch001, length = height)
@ -80,15 +82,17 @@ function001([
// Define lid position and outer surface // Define lid position and outer surface
sketch003 = startSketchOn(XY) sketch003 = startSketchOn(XY)
|> startProfileAt([width * 1.2, 0], %) |> startProfileAt([width * 1.2, 0], %)
|> angledLine([0, width], %, $rectangleSegmentA002) |> angledLine(angle = 0, length = width, tag = $rectangleSegmentA002)
|> angledLine([ |> angledLine(
segAng(rectangleSegmentA001) + 90, angle = segAng(rectangleSegmentA001) + 90,
length length = length,
], %, $rectangleSegmentB002) tag = $rectangleSegmentB002,
|> angledLine([ )
segAng(rectangleSegmentA001), |> angledLine(
-segLen(rectangleSegmentA001) angle = segAng(rectangleSegmentA001),
], %, $rectangleSegmentC002) length = -segLen(rectangleSegmentA001),
tag = $rectangleSegmentC002,
)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $rectangleSegmentD002) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $rectangleSegmentD002)
|> close() |> close()
|> hole(circle( |> hole(circle(
@ -136,15 +140,17 @@ sketch004 = startSketchOn(extrude003, 'END')
width * 1.2 + wallThickness, width * 1.2 + wallThickness,
wallThickness wallThickness
], %) ], %)
|> angledLine([0, width - (2 * wallThickness)], %, $rectangleSegmentA003) |> angledLine(angle = 0, length = width - (2 * wallThickness), tag = $rectangleSegmentA003)
|> angledLine([ |> angledLine(
segAng(rectangleSegmentA003) + 90, angle = segAng(rectangleSegmentA003) + 90,
length - (2 * wallThickness) length = length - (2 * wallThickness),
], %, $rectangleSegmentB003) tag = $rectangleSegmentB003,
|> angledLine([ )
segAng(rectangleSegmentA003), |> angledLine(
-segLen(rectangleSegmentA003) angle = segAng(rectangleSegmentA003),
], %, $rectangleSegmentC003) length = -segLen(rectangleSegmentA003),
tag = $rectangleSegmentC003,
)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $rectangleSegmentD003) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $rectangleSegmentD003)
|> close() |> close()
|> hole(circle( |> hole(circle(

View File

@ -34,15 +34,15 @@ fn primaryTube(n, angle001, length001, length002, length003) {
|> startProfileAt([0, plateHeight], %) |> startProfileAt([0, plateHeight], %)
|> line(end = [0, length001]) |> line(end = [0, length001])
|> tangentialArc({ offset = -80, radius = bendRadius }, %, $arc01) |> tangentialArc({ offset = -80, radius = bendRadius }, %, $arc01)
|> angledLine({ |> angledLine(
angle = tangentToEnd(arc01), angle = tangentToEnd(arc01),
length = length002 length = length002
}, %) )
|> tangentialArc({ offset = 85, radius = bendRadius }, %, $arc02) |> tangentialArc({ offset = 85, radius = bendRadius }, %, $arc02)
|> angledLine({ |> angledLine(
angle = tangentToEnd(arc02), angle = tangentToEnd(arc02),
length = length003 length = length003
}, %) )
// Create the cross section of each tube and sweep them // Create the cross section of each tube and sweep them
sweepProfile = startSketchOn(XY) sweepProfile = startSketchOn(XY)

View File

@ -35,9 +35,9 @@ fn slot(sketch1, start, end, width) {
xstart = width / 2 * cos(toRadians(angle - 90)) + start[0] xstart = width / 2 * cos(toRadians(angle - 90)) + start[0]
ystart = width / 2 * sin(toRadians(angle - 90)) + start[1] ystart = width / 2 * sin(toRadians(angle - 90)) + start[1]
slotSketch = startProfileAt([xstart, ystart], sketch1) slotSketch = startProfileAt([xstart, ystart], sketch1)
|> angledLine({ angle = angle, length = dist }, %, $line000) |> angledLine(angle = angle, length = dist, tag = $line000)
|> tangentialArc({ radius = width / 2, offset = 180 }, %, $arc000) |> tangentialArc({ radius = width / 2, offset = 180 }, %, $arc000)
|> angledLine({ angle = angle, length = -dist }, %, $line001) |> angledLine(angle = angle, length = -dist, tag = $line001)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %, $arc001) |> tangentialArcTo([profileStartX(%), profileStartY(%)], %, $arc001)
|> close() |> close()
return slotSketch return slotSketch

View File

@ -12,15 +12,17 @@ handleThickness = 0.65
// Upper ring of the metal structure // Upper ring of the metal structure
sketch001 = startSketchOn(XZ) sketch001 = startSketchOn(XZ)
|> startProfileAt([carafeDiameter / 2, 5.7], %) |> startProfileAt([carafeDiameter / 2, 5.7], %)
|> angledLine([0, 0.1], %, $rectangleSegmentA001) |> angledLine(angle = 0, length = 0.1, tag = $rectangleSegmentA001)
|> angledLine([ |> angledLine(
segAng(rectangleSegmentA001) - 90, angle = segAng(rectangleSegmentA001) - 90,
-0.75 length = -0.75,
], %, $rectangleSegmentB001) tag = $rectangleSegmentB001,
|> angledLine([ )
segAng(rectangleSegmentA001), |> angledLine(
-segLen(rectangleSegmentA001) angle = segAng(rectangleSegmentA001),
], %, $rectangleSegmentC001) length = -segLen(rectangleSegmentA001),
tag = $rectangleSegmentC001,
)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
|> revolve(angle = 360, axis = 'Y') |> revolve(angle = 360, axis = 'Y')
@ -45,13 +47,13 @@ sketch002 = startSketchOn(plane001)
angleEnd = 205, angleEnd = 205,
radius = 0.3 radius = 0.3
}, %) }, %)
|> angledLine({ angle = -60, length = 0.6 }, %, $edge2) |> angledLine(angle = -60, length = 0.6, tag = $edge2)
|> arc({ |> arc({
angleStart = 30, angleStart = 30,
angleEnd = -120, angleEnd = -120,
radius = 0.6 radius = 0.6
}, %) }, %)
|> angledLineToY({ angle = 150, to = -0.2 }, %, $edge3) |> angledLine(angle = 150, endAbsoluteY = -0.2, tag = $edge3)
|> arc({ |> arc({
angleStart = 60, angleStart = 60,
angleEnd = 90, angleEnd = 90,
@ -65,19 +67,21 @@ sketch002 = startSketchOn(plane001)
angleEnd = 60, angleEnd = 60,
radius = 0.6 radius = 0.6
}, %) }, %)
|> angledLine({ |> angledLine(
angle = 150, angle = 150,
length = -segLen(edge3) + 0.035 length = -segLen(edge3) + 0.035,
}, %, $edge5) tag = $edge5,
)
|> arc({ |> arc({
angleStart = -120, angleStart = -120,
angleEnd = 30, angleEnd = 30,
radius = 0.5 radius = 0.5
}, %) }, %)
|> angledLine({ |> angledLine(
angle = -60, angle = -60,
length = -segLen(edge2) + 0.035 length = -segLen(edge2) + 0.035,
}, %, $edge6) tag = $edge6,
)
|> arc({ |> arc({
angleStart = 205, angleStart = 205,
angleEnd = 180, angleEnd = 180,
@ -123,12 +127,13 @@ extrude002 = extrude(sketch004, length = -0.050)
sketch005 = startSketchOn(XZ) sketch005 = startSketchOn(XZ)
|> startProfileAt([0.15, 1.11], %) |> startProfileAt([0.15, 1.11], %)
|> xLine(endAbsolute = carafeDiameter / 2 - 0.2) |> xLine(endAbsolute = carafeDiameter / 2 - 0.2)
|> angledLineToX({ |> angledLine(
angle = 30, angle = 30,
to = carafeDiameter / 2 - 0.07 endAbsoluteX = carafeDiameter / 2 - 0.07,
}, %, $seg1) tag = $seg1,
|> angledLine({ angle = -60, length = 0.050 }, %) )
|> angledLine({ angle = 30, length = -segLen(seg1) }, %) |> angledLine(angle = -60, length = 0.050)
|> angledLine(angle = 30, length = -segLen(seg1))
|> xLine(endAbsolute = 0.15) |> xLine(endAbsolute = 0.15)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
@ -138,7 +143,7 @@ sketch005 = startSketchOn(XZ)
sketch006 = startSketchOn(XZ) sketch006 = startSketchOn(XZ)
|> startProfileAt([0.1, 1], %) |> startProfileAt([0.1, 1], %)
|> line(end = [0.1, 0]) |> line(end = [0.1, 0])
|> angledLineToX({ angle = 10, to = 0.05 }, %) |> angledLine(angle = 10, endAbsoluteX = 0.05)
|> yLine(length = 10) |> yLine(length = 10)
|> line(end = [0.6, 0]) |> line(end = [0.6, 0])
|> yLine(length = -.05) |> yLine(length = -.05)

View File

@ -26,9 +26,9 @@ fn face(plane) {
faceSketch = startSketchOn(plane) faceSketch = startSketchOn(plane)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> yLine(length = height) |> yLine(length = height)
|> angledLineOfYLength({ angle = -45, length = thirdStep }, %) |> angledLine(angle = -45, lengthY = thirdStep)
|> yLine(length = -secondStep) |> yLine(length = -secondStep)
|> angledLineOfYLength({ angle = -45, length = firstStep }, %) |> angledLine(angle = -45, lengthY = firstStep)
|> close() |> close()
return faceSketch return faceSketch
} }

View File

@ -23,9 +23,9 @@ fn face(plane) {
faceSketch = startSketchOn(plane) faceSketch = startSketchOn(plane)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> yLine(length = height) |> yLine(length = height)
|> angledLineOfYLength({ angle = -45, length = thirdStep }, %) |> angledLine(angle = -45, lengthY = thirdStep)
|> yLine(length = -secondStep) |> yLine(length = -secondStep)
|> angledLineOfYLength({ angle = -45, length = firstStep }, %) |> angledLine(angle = -45, lengthY = firstStep)
|> close() |> close()
return faceSketch return faceSketch
} }

View File

@ -39,9 +39,9 @@ fn face(plane) {
|> startProfileAt([binBaseLength + binTol, 0], %) |> startProfileAt([binBaseLength + binTol, 0], %)
|> yLine(length = height) |> yLine(length = height)
|> xLine(length = -binBaseLength) |> xLine(length = -binBaseLength)
|> angledLineOfYLength({ angle = -45, length = thirdStep }, %) |> angledLine(angle = -45, lengthY = thirdStep)
|> yLine(length = -secondStep) |> yLine(length = -secondStep)
|> angledLineOfYLength({ angle = -45, length = firstStep }, %) |> angledLine(angle = -45, lengthY = firstStep)
|> close() |> close()
return faceSketch return faceSketch
} }
@ -190,9 +190,9 @@ fn lipFace(plane) {
// |> angledLineOfYLength({ angle: -45, length: lipStep5 }, %) // |> angledLineOfYLength({ angle: -45, length: lipStep5 }, %)
|> line(end = [1.046447, -1.046447], tag = $line001) |> line(end = [1.046447, -1.046447], tag = $line001)
|> yLine(length = -lipStep4) |> yLine(length = -lipStep4)
|> angledLineOfYLength({ angle = -45, length = lipStep3 }, %) |> angledLine(angle = -45, lengthY = lipStep3)
|> yLine(length = -lipStep2) |> yLine(length = -lipStep2)
|> angledLineOfYLength({ angle = -135, length = lipStep1 }, %) |> angledLine(angle = -135, lengthY = lipStep1)
|> close() |> close()
return faceSketch return faceSketch
} }

View File

@ -32,9 +32,9 @@ fn face(plane) {
|> startProfileAt([binBaseLength + binTol, 0], %) |> startProfileAt([binBaseLength + binTol, 0], %)
|> yLine(length = height) |> yLine(length = height)
|> xLine(length = -binBaseLength) |> xLine(length = -binBaseLength)
|> angledLineOfYLength({ angle = -45, length = thirdStep }, %) |> angledLine(angle = -45, lengthY = thirdStep)
|> yLine(length = -secondStep) |> yLine(length = -secondStep)
|> angledLineOfYLength({ angle = -45, length = firstStep }, %) |> angledLine(angle = -45, lengthY = firstStep)
|> close() |> close()
return faceSketch return faceSketch
} }

View File

@ -13,11 +13,11 @@ diameter = 0.3125
fn hexNut(start, thk, innerDia) { fn hexNut(start, thk, innerDia) {
hexNutSketch = startSketchOn(-XZ) hexNutSketch = startSketchOn(-XZ)
|> startProfileAt([start[0] + innerDia, start[1]], %) |> startProfileAt([start[0] + innerDia, start[1]], %)
|> angledLine({ angle = 240, length = innerDia }, %) |> angledLine(angle = 240, length = innerDia)
|> angledLine({ angle = 180, length = innerDia }, %) |> angledLine(angle = 180, length = innerDia)
|> angledLine({ angle = 120, length = innerDia }, %) |> angledLine(angle = 120, length = innerDia)
|> angledLine({ angle = 60, length = innerDia }, %) |> angledLine(angle = 60, length = innerDia)
|> angledLine({ angle = 0, length = innerDia * .90 }, %) |> angledLine(angle = 0, length = innerDia * .90)
|> close() |> close()
|> hole(circle(center = [start[0], start[1]], radius = innerDia / 2), %) |> hole(circle(center = [start[0], start[1]], radius = innerDia / 2), %)
|> extrude(length = thk) |> extrude(length = thk)

View File

@ -9,15 +9,17 @@ import basePlateRadius, basePlateThickness, baseChamfer, baseHeight from "global
// Base Plate // Base Plate
sketch001 = startSketchOn(XY) sketch001 = startSketchOn(XY)
|> startProfileAt([-basePlateRadius, -basePlateRadius], %) |> startProfileAt([-basePlateRadius, -basePlateRadius], %)
|> angledLine([0, 2 * basePlateRadius], %, $rectangleSegmentA001) |> angledLine(angle = 0, length = 2 * basePlateRadius, tag = $rectangleSegmentA001)
|> angledLine([ |> angledLine(
segAng(rectangleSegmentA001) + 90, angle = segAng(rectangleSegmentA001) + 90,
2 * basePlateRadius length = 2 * basePlateRadius,
], %, $rectangleSegmentB001) tag = $rectangleSegmentB001,
|> angledLine([ )
segAng(rectangleSegmentA001), |> angledLine(
-segLen(rectangleSegmentA001) angle = segAng(rectangleSegmentA001),
], %, $rectangleSegmentC001) length = -segLen(rectangleSegmentA001),
tag = $rectangleSegmentC001,
)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $rectangleSegmentD001) |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $rectangleSegmentD001)
|> close() |> close()
extrude001 = extrude(sketch001, length = basePlateThickness) extrude001 = extrude(sketch001, length = basePlateThickness)

View File

@ -16,10 +16,10 @@ sketch011 = startSketchOn(plane003)
angleEnd = 270 + axisJ2, angleEnd = 270 + axisJ2,
radius = axisJ2ArmWidth / 2 radius = axisJ2ArmWidth / 2
}, %) }, %)
|> angledLine({ |> angledLine(
angle = axisJ2, angle = axisJ2,
length = axisJ2ArmLength length = axisJ2ArmLength,
}, %) )
|> arc({ |> arc({
angleStart = -90 + axisJ2, angleStart = -90 + axisJ2,
angleEnd = 90 + axisJ2, angleEnd = 90 + axisJ2,

View File

@ -16,10 +16,10 @@ sketch017 = startSketchOn(plane002)
angleEnd = 270 + axisJ3C, angleEnd = 270 + axisJ3C,
radius = axisJ3CArmWidth / 2 radius = axisJ3CArmWidth / 2
}, %) }, %)
|> angledLine({ |> angledLine(
angle = axisJ3C, angle = axisJ3C,
length = axisJ3CArmLength length = axisJ3CArmLength,
}, %) )
|> arc({ |> arc({
angleStart = 270 + axisJ3C, angleStart = 270 + axisJ3C,
angleEnd = 90 + axisJ3C, angleEnd = 90 + axisJ3C,
@ -99,31 +99,31 @@ sketch023 = startSketchOn(extrude022, 'START')
1.75 + axisJ2ArmLength * cos(toRadians(axisJ2)) + axisJ3CArmLength * cos(toRadians(axisJ3C)), 1.75 + axisJ2ArmLength * cos(toRadians(axisJ2)) + axisJ3CArmLength * cos(toRadians(axisJ3C)),
8 + axisJ2ArmLength * sin(toRadians(axisJ2)) + axisJ3CArmLength * sin(toRadians(axisJ3C)) 8 + axisJ2ArmLength * sin(toRadians(axisJ2)) + axisJ3CArmLength * sin(toRadians(axisJ3C))
], %) ], %)
|> angledLine({ |> angledLine(
angle = axisJ3C + axisJ4 / 2, angle = axisJ3C + axisJ4 / 2,
length = grabberLength / 4 length = grabberLength / 4,
}, %) )
|> arc({ |> arc({
angleStart = 150 + axisJ3C + axisJ4 / 2, angleStart = 150 + axisJ3C + axisJ4 / 2,
angleEnd = 30 + axisJ3C + axisJ4 / 2, angleEnd = 30 + axisJ3C + axisJ4 / 2,
radius = grabberLength / 3 radius = grabberLength / 3
}, %) }, %)
|> angledLine({ |> angledLine(
angle = axisJ3C + axisJ4 / 2, angle = axisJ3C + axisJ4 / 2,
length = grabberLength / 6 length = grabberLength / 6,
}, %) )
|> angledLine({ |> angledLine(
angle = axisJ3C + axisJ4 / 2 + 132, angle = axisJ3C + axisJ4 / 2 + 132,
length = grabberLength / 3.5 length = grabberLength / 3.5,
}, %) )
|> angledLine({ |> angledLine(
angle = axisJ3C + axisJ4 / 2 + 160, angle = axisJ3C + axisJ4 / 2 + 160,
length = grabberLength / 3.5 length = grabberLength / 3.5,
}, %) )
|> angledLine({ |> angledLine(
angle = axisJ3C + axisJ4 / 2 + 200, angle = axisJ3C + axisJ4 / 2 + 200,
length = grabberLength / 3 length = grabberLength / 3,
}, %) )
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
@ -135,31 +135,31 @@ sketch024 = startSketchOn(extrude022, 'START')
1.75 + axisJ2ArmLength * cos(toRadians(axisJ2)) + axisJ3CArmLength * cos(toRadians(axisJ3C)), 1.75 + axisJ2ArmLength * cos(toRadians(axisJ2)) + axisJ3CArmLength * cos(toRadians(axisJ3C)),
8 + axisJ2ArmLength * sin(toRadians(axisJ2)) + axisJ3CArmLength * sin(toRadians(axisJ3C)) 8 + axisJ2ArmLength * sin(toRadians(axisJ2)) + axisJ3CArmLength * sin(toRadians(axisJ3C))
], %) ], %)
|> angledLine({ |> angledLine(
angle = axisJ3C - (axisJ4 / 2), angle = axisJ3C - (axisJ4 / 2),
length = grabberLength / 4 length = grabberLength / 4,
}, %) )
|> arc({ |> arc({
angleStart = 210 + axisJ3C - (axisJ4 / 2), angleStart = 210 + axisJ3C - (axisJ4 / 2),
angleEnd = 330 + axisJ3C - (axisJ4 / 2), angleEnd = 330 + axisJ3C - (axisJ4 / 2),
radius = grabberLength / 3 radius = grabberLength / 3
}, %) }, %)
|> angledLine({ |> angledLine(
angle = axisJ3C - (axisJ4 / 2), angle = axisJ3C - (axisJ4 / 2),
length = grabberLength / 6 length = grabberLength / 6,
}, %) )
|> angledLine({ |> angledLine(
angle = axisJ3C - (axisJ4 / 2) - 132, angle = axisJ3C - (axisJ4 / 2) - 132,
length = grabberLength / 3.5 length = grabberLength / 3.5,
}, %) )
|> angledLine({ |> angledLine(
angle = axisJ3C - (axisJ4 / 2) - 160, angle = axisJ3C - (axisJ4 / 2) - 160,
length = grabberLength / 3.5 length = grabberLength / 3.5,
}, %) )
|> angledLine({ |> angledLine(
angle = axisJ3C - (axisJ4 / 2) - 200, angle = axisJ3C - (axisJ4 / 2) - 200,
length = grabberLength / 3 length = grabberLength / 3,
}, %) )
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()

View File

@ -14,13 +14,13 @@ extrude005 = extrude(sketch005, length = 1.5 - 0.1)
sketch006 = startSketchOn(plane002) sketch006 = startSketchOn(plane002)
|> startProfileAt([3.5, baseHeight], %) |> startProfileAt([3.5, baseHeight], %)
|> angledLine({ angle = 60, length = 1.75 }, %) |> angledLine(angle = 60, length = 1.75)
|> arc({ |> arc({
angleStart = -30, angleStart = -30,
angleEnd = -30 + 180, angleEnd = -30 + 180,
radius = 3 radius = 3
}, %) }, %)
|> angledLineToY({ angle = 60, to = baseHeight }, %) |> angledLine(angle = 60, endAbsoluteY = baseHeight)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()

View File

@ -19,17 +19,17 @@ pipeSketch = startSketchOn(XY)
|> startProfileAt([pipeSmallDia - (thickness / 2), 38], %) |> startProfileAt([pipeSmallDia - (thickness / 2), 38], %)
|> line(end = [thickness, 0]) |> line(end = [thickness, 0])
|> line(end = [0, -pipeSmallDiaLength]) |> line(end = [0, -pipeSmallDiaLength])
|> angledLineOfYLength({ |> angledLine(
angle = -60, angle = -60,
length = pipeTransitionLength lengthY = pipeTransitionLength
}, %) )
|> line(end = [0, -pipeLargeDiaLength]) |> line(end = [0, -pipeLargeDiaLength])
|> xLine(length = -thickness) |> xLine(length = -thickness)
|> line(end = [0, pipeLargeDiaLength]) |> line(end = [0, pipeLargeDiaLength])
|> angledLineToX({ |> angledLine(
angle = -pipeTransitionAngle + 180, angle = -pipeTransitionAngle + 180,
to = pipeSmallDia - (thickness / 2) endAbsoluteX = pipeSmallDia - (thickness / 2)
}, %) )
|> close() |> close()
// Revolve the sketch to create the pipe // Revolve the sketch to create the pipe

View File

@ -15,20 +15,20 @@ frontLength = 7
sketch001 = startSketchOn(-YZ) sketch001 = startSketchOn(-YZ)
|> startProfileAt([wallsWidth / 2, 0], %) |> startProfileAt([wallsWidth / 2, 0], %)
|> xLine(length = wallThickness / 2) |> xLine(length = wallThickness / 2)
|> angledLineToX({ angle = 60, to = wallsWidth }, %, $seg01) |> angledLine(angle = 60, endAbsoluteX = wallsWidth, tag = $seg01)
|> yLine(endAbsolute = height) |> yLine(endAbsolute = height)
|> xLine(length = -wallThickness) |> xLine(length = -wallThickness)
|> yLine(endAbsolute = segEndY(seg01)) |> yLine(endAbsolute = segEndY(seg01))
|> angledLineToX({ |> angledLine(
angle = 60, angle = 60,
to = wallsWidth / 2 + wallThickness / 2 endAbsoluteX = wallsWidth / 2 + wallThickness / 2,
}, %) )
|> xLine(length = -wallThickness) |> xLine(length = -wallThickness)
|> angledLineToX({ angle = 180 - 60, to = wallThickness }, %) |> angledLine(angle = 180 - 60, endAbsoluteX = wallThickness)
|> yLine(endAbsolute = height) |> yLine(endAbsolute = height)
|> xLine(endAbsolute = 0) |> xLine(endAbsolute = 0)
|> yLine(endAbsolute = segEndY(seg01)) |> yLine(endAbsolute = segEndY(seg01))
|> angledLineToY({ angle = 180 - 60, to = 0 }, %) |> angledLine(angle = 180 - 60, endAbsoluteY = 0)
|> close() |> close()
part001 = revolve( part001 = revolve(
sketch001, sketch001,
@ -44,20 +44,20 @@ part001 = revolve(
sketch002 = startSketchOn(-YZ) sketch002 = startSketchOn(-YZ)
|> startProfileAt([wallsWidth / 2, 0], %) |> startProfileAt([wallsWidth / 2, 0], %)
|> xLine(length = wallThickness / 2) |> xLine(length = wallThickness / 2)
|> angledLineToX({ angle = 60, to = wallsWidth }, %, $seg02) |> angledLine(angle = 60, endAbsoluteX = wallsWidth, tag = $seg02)
|> yLine(endAbsolute = height) |> yLine(endAbsolute = height)
|> xLine(length = -wallThickness) |> xLine(length = -wallThickness)
|> yLine(endAbsolute = segEndY(seg01)) |> yLine(endAbsolute = segEndY(seg01))
|> angledLineToX({ |> angledLine(
angle = 60, angle = 60,
to = wallsWidth / 2 + wallThickness / 2 endAbsoluteX = wallsWidth / 2 + wallThickness / 2,
}, %) )
|> xLine(length = -wallThickness) |> xLine(length = -wallThickness)
|> angledLineToX({ angle = 180 - 60, to = wallThickness }, %) |> angledLine(angle = 180 - 60, endAbsoluteX = wallThickness)
|> yLine(endAbsolute = height) |> yLine(endAbsolute = height)
|> xLine(endAbsolute = 0) |> xLine(endAbsolute = 0)
|> yLine(endAbsolute = segEndY(seg02)) |> yLine(endAbsolute = segEndY(seg02))
|> angledLineToY({ angle = 180 - 60, to = 0 }, %) |> angledLine(angle = 180 - 60, endAbsoluteY = 0)
|> close() |> close()
|> extrude(length = backLength - height) |> extrude(length = backLength - height)
@ -76,7 +76,7 @@ customPlane = {
sketch003 = startSketchOn(customPlane) sketch003 = startSketchOn(customPlane)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> tangentialArc({ offset = 60, radius = height }, %) |> tangentialArc({ offset = 60, radius = height }, %)
|> angledLineToY({ angle = 60, to = 0 }, %) |> angledLine(angle = 60, endAbsoluteY = 0)
|> close() |> close()
|> extrude(length = wallThickness) |> extrude(length = wallThickness)
@ -85,12 +85,12 @@ sketch004 = startSketchOn(sketch002, 'END')
|> yLine(endAbsolute = height) |> yLine(endAbsolute = height)
|> xLine(endAbsolute = wallThickness) |> xLine(endAbsolute = wallThickness)
|> yLine(endAbsolute = segEndY(seg01)) |> yLine(endAbsolute = segEndY(seg01))
|> angledLineToX({ |> angledLine(
angle = 180 - 60, angle = 180 - 60,
to = wallsWidth / 2 - (wallThickness / 2) endAbsoluteX = wallsWidth / 2 - (wallThickness / 2),
}, %) )
|> xLine(length = wallThickness) |> xLine(length = wallThickness)
|> angledLineToY({ angle = 60, to = segEndY(seg01) }, %) |> angledLine(angle = 60, endAbsoluteY = segEndY(seg01))
|> yLine(endAbsolute = height) |> yLine(endAbsolute = height)
|> xLine(length = wallThickness) |> xLine(length = wallThickness)
|> tangentialArcTo([ |> tangentialArcTo([

View File

@ -48,30 +48,34 @@ extrude001 = extrude(sketch001, length = 5)
sketch003 = startSketchOn(extrude001, 'START') sketch003 = startSketchOn(extrude001, 'START')
|> startProfileAt([distanceToInsideEdge, 0], %) |> startProfileAt([distanceToInsideEdge, 0], %)
|> angledLine([180, templateThickness], %, $rectangleSegmentA002) |> angledLine(angle = 180, length = templateThickness, tag = $rectangleSegmentA002)
|> angledLine([ |> angledLine(
segAng(rectangleSegmentA002) + 90, angle = segAng(rectangleSegmentA002) + 90,
templateThickness length = templateThickness,
], %, $rectangleSegmentB002) tag = $rectangleSegmentB002,
|> angledLine([ )
segAng(rectangleSegmentA002), |> angledLine(
-segLen(rectangleSegmentA002) angle = segAng(rectangleSegmentA002),
], %, $rectangleSegmentC002) length = -segLen(rectangleSegmentA002),
tag = $rectangleSegmentC002,
)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
extrude003 = extrude(sketch003, length = 13) extrude003 = extrude(sketch003, length = 13)
sketch002 = startSketchOn(extrude001, 'START') sketch002 = startSketchOn(extrude001, 'START')
|> startProfileAt([-distanceToInsideEdge, 0], %) |> startProfileAt([-distanceToInsideEdge, 0], %)
|> angledLine([0, templateThickness], %, $rectangleSegmentA001) |> angledLine(angle = 0, length = templateThickness, tag = $rectangleSegmentA001)
|> angledLine([ |> angledLine(
segAng(rectangleSegmentA001) - 90, angle = segAng(rectangleSegmentA001) - 90,
templateThickness length = templateThickness,
], %, $rectangleSegmentB001) tag = $rectangleSegmentB001,
|> angledLine([ )
segAng(rectangleSegmentA001), |> angledLine(
-segLen(rectangleSegmentA001) angle = segAng(rectangleSegmentA001),
], %, $rectangleSegmentC001) length = -segLen(rectangleSegmentA001),
tag = $rectangleSegmentC001,
)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
@ -79,15 +83,17 @@ extrude002 = extrude(sketch002, length = 13)
sketch004 = startSketchOn(extrude002, 'END') sketch004 = startSketchOn(extrude002, 'END')
|> startProfileAt([-distanceToInsideEdge, 0], %) |> startProfileAt([-distanceToInsideEdge, 0], %)
|> angledLine([0, distanceToInsideEdge * 2], %, $rectangleSegmentA003) |> angledLine(angle = 0, length = distanceToInsideEdge * 2, tag = $rectangleSegmentA003)
|> angledLine([ |> angledLine(
segAng(rectangleSegmentA003) - 90, angle = segAng(rectangleSegmentA003) - 90,
templateThickness length = templateThickness,
], %, $rectangleSegmentB003) tag = $rectangleSegmentB003,
|> angledLine([ )
segAng(rectangleSegmentA003), |> angledLine(
-segLen(rectangleSegmentA003) angle = segAng(rectangleSegmentA003),
], %, $rectangleSegmentC003) length = -segLen(rectangleSegmentA003),
tag = $rectangleSegmentC003,
)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
extrude004 = extrude(sketch004, length = 4) extrude004 = extrude(sketch004, length = 4)

View File

@ -52,14 +52,16 @@ sketch002 = startSketchOn(extrude001, 'START')
-templateGap * 2 - (templateDiameter / 2) -templateGap * 2 - (templateDiameter / 2)
], %) ], %)
|> xLine(length = -7, tag = $rectangleSegmentA001) |> xLine(length = -7, tag = $rectangleSegmentA001)
|> angledLine([ |> angledLine(
segAng(rectangleSegmentA001) + 90, angle = segAng(rectangleSegmentA001) + 90,
minClampingDistance length = minClampingDistance,
], %, $rectangleSegmentB001) tag = $rectangleSegmentB001,
|> angledLine([ )
segAng(rectangleSegmentA001), |> angledLine(
-segLen(rectangleSegmentA001) angle = segAng(rectangleSegmentA001),
], %, $rectangleSegmentC001) length = -segLen(rectangleSegmentA001),
tag = $rectangleSegmentC001,
)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
@ -73,14 +75,14 @@ sketch003 = startSketchOn(extrude001, 'START')
-templateGap * 2 - (templateDiameter / 2) -templateGap * 2 - (templateDiameter / 2)
], %) ], %)
|> xLine(length = 7, tag = $rectangleSegmentA002) |> xLine(length = 7, tag = $rectangleSegmentA002)
|> angledLine([ |> angledLine(
segAng(rectangleSegmentA002) - 90, angle = segAng(rectangleSegmentA002) - 90,
minClampingDistance length = minClampingDistance,
], %) )
|> angledLine([ |> angledLine(
segAng(rectangleSegmentA002), angle = segAng(rectangleSegmentA002),
-segLen(rectangleSegmentA002) length = -segLen(rectangleSegmentA002),
], %) )
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -9,24 +9,26 @@ export fn zLogo(surface, origin, scale) {
], %) ], %)
|> yLine(length = -0.15 * scale) |> yLine(length = -0.15 * scale)
|> xLine(length = 0.15 * scale) |> xLine(length = 0.15 * scale)
|> angledLineToX({ |> angledLine(
angle = 47.15, angle = 47.15,
to = 0.3 * scale + origin[0] endAbsoluteX = 0.3 * scale + origin[0],
}, %, $seg1) tag = $seg1,
)
|> yLine(endAbsolute = 0 + origin[1], tag = $seg3) |> yLine(endAbsolute = 0 + origin[1], tag = $seg3)
|> xLine(length = 0.63 * scale) |> xLine(length = 0.63 * scale)
|> yLine(length = 0.225 * scale) |> yLine(length = 0.225 * scale)
|> xLine(length = -0.57 * scale) |> xLine(length = -0.57 * scale)
|> angledLineToX({ |> angledLine(
angle = 47.15, angle = 47.15,
to = 0.93 * scale + origin[0] endAbsoluteX = 0.93 * scale + origin[0],
}, %) )
|> yLine(length = 0.15 * scale) |> yLine(length = 0.15 * scale)
|> xLine(length = -0.15 * scale) |> xLine(length = -0.15 * scale)
|> angledLine({ |> angledLine(
angle = 47.15, angle = 47.15,
length = -segLen(seg1) length = -segLen(seg1),
}, %, $seg2) tag = $seg2
)
|> yLine(length = segLen(seg3)) |> yLine(length = segLen(seg3))
|> xLine(endAbsolute = 0 + origin[0]) |> xLine(endAbsolute = 0 + origin[0])
|> yLine(length = -0.225 * scale) |> yLine(length = -0.225 * scale)
@ -51,7 +53,7 @@ export fn oLogo(surface, origin, scale) {
angleEnd = 47.15 - 6 + 180, angleEnd = 47.15 - 6 + 180,
radius = .525 * scale radius = .525 * scale
}, %) }, %)
|> angledLine({ angle = 47.15, length = .24 * scale }, %) |> angledLine(angle = 47.15, length = .24 * scale)
|> arc({ |> arc({
angleStart = 47.15 - 11 + 180, angleStart = 47.15 - 11 + 180,
angleEnd = 47.15 + 11, angleEnd = 47.15 + 11,
@ -72,7 +74,7 @@ export fn oLogo2(surface, origin, scale) {
angleEnd = 47.15 - 6, angleEnd = 47.15 - 6,
radius = .525 * scale radius = .525 * scale
}, %) }, %)
|> angledLine({ angle = 47.15, length = -.24 * scale }, %) |> angledLine(angle = 47.15, length = -.24 * scale)
|> arc({ |> arc({
angleStart = 47.15 - 11, angleStart = 47.15 - 11,
angleEnd = 47.15 + 11 - 180, angleEnd = 47.15 + 11 - 180,

View File

@ -43,9 +43,17 @@ overwrite-sim-test test_name:
EXPECTORATE=overwrite TWENTY_TWENTY=overwrite {{cita}} -p kcl-lib --no-quiet -- tests::{{test_name}}::kcl_test_execute EXPECTORATE=overwrite TWENTY_TWENTY=overwrite {{cita}} -p kcl-lib --no-quiet -- tests::{{test_name}}::kcl_test_execute
EXPECTORATE=overwrite {{cita}} -p kcl-lib --no-quiet -- simulation_tests::{{test_name}}::test_after_engine EXPECTORATE=overwrite {{cita}} -p kcl-lib --no-quiet -- simulation_tests::{{test_name}}::test_after_engine
<<<<<<< HEAD
# Regenerate all the simulation test output. # Regenerate all the simulation test output.
redo-sim-tests: redo-sim-tests:
EXPECTORATE=overwrite TWENTY_TWENTY=overwrite {{cita}} -p kcl-lib --no-quiet -- simulation_tests EXPECTORATE=overwrite TWENTY_TWENTY=overwrite {{cita}} -p kcl-lib --no-quiet -- simulation_tests
||||||| parent of afaad9c3c (Fix KCL examples)
=======
overwrite-sim-test-sample test_name:
EXPECTORATE=overwrite {{cita}} -p kcl-lib --no-quiet -- simulation_tests::kcl_samples::parse_{{test_name}}
EXPECTORATE=overwrite {{cita}} -p kcl-lib --no-quiet -- simulation_tests::kcl_samples::unparse_{{test_name}}
EXPECTORATE=overwrite TWENTY_TWENTY=overwrite {{cita}} -p kcl-lib --no-quiet -- simulation_tests::kcl_samples::kcl_test_execute_{{test_name}}
>>>>>>> afaad9c3c (Fix KCL examples)
test: test:
export RUST_BRACKTRACE="full" && cargo nextest run --workspace --no-fail-fast export RUST_BRACKTRACE="full" && cargo nextest run --workspace --no-fail-fast

View File

@ -3,7 +3,7 @@ const part001 = startSketchOn(XY)
|> line(end = [15.1, 2.48]) |> line(end = [15.1, 2.48])
|> line(end = [3.15, -9.85], tag = $seg01) |> line(end = [3.15, -9.85], tag = $seg01)
|> line(end = [-15.17, -4.1]) |> line(end = [-15.17, -4.1])
|> angledLine([segAng(seg01), 12.35], %) |> angledLine(angle = segAng(seg01), length = 12.35)
|> line(end = [-13.02, 10.03]) |> line(end = [-13.02, 10.03])
|> close() |> close()
|> extrude(length = 4) |> extrude(length = 4)

View File

@ -95,7 +95,7 @@ fn F = (state, F) => {
} else { } else {
// Pass onto the next instruction // Pass onto the next instruction
state |> setSketch(%, angledLine({ angle: state.currentAngle, length: state.currentLength }, state.q)) state |> setSketch(%, angledLine(state.q, angle = state.currentAngle, length = state.currentLength))
} }
} }

View File

@ -6,9 +6,9 @@ let circ = {angle_start: 0, angle_end: 360, radius: radius}
let triangleLen = 500 let triangleLen = 500
const p = startSketchOn(XY) const p = startSketchOn(XY)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> angledLine({angle: 60, length:triangleLen}, %, $a) |> angledLine(angle = 60, length = triangleLen, tag = $a)
|> angledLine({angle: 180, length: triangleLen}, %, $b) |> angledLine(angle = 180, length = triangleLen, tag = $b)
|> angledLine({angle: 300, length: triangleLen}, %, $c) |> angledLine(angle = 300, length = triangleLen, tag = $c)
|> extrude(length = triangleHeight) |> extrude(length = triangleHeight)
fn circl = (x, face) => { fn circl = (x, face) => {

View File

@ -12,7 +12,7 @@ Fy = 0.5
sketch001 = startSketchOn('-YZ') sketch001 = startSketchOn('-YZ')
|> startProfileAt([back_walls_width / 2, 0], %) |> startProfileAt([back_walls_width / 2, 0], %)
|> xLine(length = wall_thickness / 2) |> xLine(length = wall_thickness / 2)
|> angledLineToX({ angle: 45, to: back_walls_width }, %, $seg01) |> angledLine(angle = 45, endAbsoluteX = back_walls_width, tag = $seg01)
|> yLine(endAbsolute = height) |> yLine(endAbsolute = height)
|> xLine(length = -wall_thickness) |> xLine(length = -wall_thickness)
|> yLine(endAbsolute = segEndY(seg01)) |> yLine(endAbsolute = segEndY(seg01))
@ -21,11 +21,11 @@ sketch001 = startSketchOn('-YZ')
to: back_walls_width / 2 + wall_thickness / 2 to: back_walls_width / 2 + wall_thickness / 2
}, %) }, %)
|> xLine(length = -wall_thickness) |> xLine(length = -wall_thickness)
|> angledLineToX({ angle: 180 - 45, to: wall_thickness }, %) |> angledLine(angle = 180 - 45, endAbsoluteX = wall_thickness)
|> yLine(endAbsolute = height) |> yLine(endAbsolute = height)
|> xLine(endAbsolute = 0) |> xLine(endAbsolute = 0)
|> yLine(endAbsolute = segEndY(seg01)) |> yLine(endAbsolute = segEndY(seg01))
|> angledLineToY({ angle: 180 - 45, to: 0 }, %) |> angledLine(angle = 180 - 45, endAbsoluteY = 0)
|> close() |> close()
part001 = revolve({ part001 = revolve({
angle: 90, angle: 90,
@ -40,7 +40,7 @@ part001 = revolve({
sketch002 = startSketchOn('-YZ') sketch002 = startSketchOn('-YZ')
|> startProfileAt([back_walls_width / 2, 0], %) |> startProfileAt([back_walls_width / 2, 0], %)
|> xLine(length = wall_thickness / 2) |> xLine(length = wall_thickness / 2)
|> angledLineToX({ angle: 45, to: back_walls_width }, %, $seg02) |> angledLine(angle = 45, endAbsoluteX = back_walls_width, tag = $seg02)
|> yLine(endAbsolute = height) |> yLine(endAbsolute = height)
|> xLine(length = -wall_thickness) |> xLine(length = -wall_thickness)
|> yLine(endAbsolute = segEndY(seg01)) |> yLine(endAbsolute = segEndY(seg01))
@ -49,10 +49,10 @@ sketch002 = startSketchOn('-YZ')
to: back_walls_width / 2 + wall_thickness / 2 to: back_walls_width / 2 + wall_thickness / 2
}, %) }, %)
|> xLine(length = -wall_thickness) |> xLine(length = -wall_thickness)
|> angledLineToX({ angle: 180 - 45, to: wall_thickness }, %) |> angledLine(angle = 180 - 45, endAbsoluteX = wall_thickness)
|> yLine(endAbsolute = height) |> yLine(endAbsolute = height)
|> xLine(endAbsolute = 0) |> xLine(endAbsolute = 0)
|> yLine(endAbsolute = segEndY(seg02)) |> yLine(endAbsolute = segEndY(seg02))
|> angledLineToY({ angle: 180 - 45, to: 0 }, %) |> angledLine(angle = 180 - 45, endAbsoluteY = 0)
|> close() |> close()
|> extrude(length = back_length - height) |> extrude(length = back_length - height)

View File

@ -1,15 +1,21 @@
fn rect = (origin) => { fn rect = (origin) => {
return startSketchOn(XZ) return startSketchOn(XZ)
|> startProfileAt(origin, %) |> startProfileAt(origin, %)
|> angledLine([0, 191.26], %, $rectangleSegmentA001) |> angledLine(
|> angledLine([ angle = 0,
segAng(rectangleSegmentA001) - 90, length = 191.26,
196.99 tag = $rectangleSegmentA001,
], %, $rectangleSegmentB001) )
|> angledLine([ |> angledLine(
segAng(rectangleSegmentA001), angle = segAng(rectangleSegmentA001) - 90,
-segLen(rectangleSegmentA001) length = 196.99,
], %, $rectangleSegmentC001) tag = $rectangleSegmentB001,
)
|> angledLine(
angle = segAng(rectangleSegmentA001),
length = -segLen(rectangleSegmentA001),
tag = $rectangleSegmentC001,
)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
} }

View File

@ -111,7 +111,7 @@ const plane001 = {
const sketch001l = startSketchOn(plane001) const sketch001l = startSketchOn(plane001)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> xLine(length = serverDepth + .8) |> xLine(length = serverDepth + .8)
|> angledLineToY({ angle: -45, to: 1 }, %) |> angledLine(angle = -45, endAbsoluteY = 1)
|> xLine(length = -serverDepth + 2 - .8, tag = $seg01) |> xLine(length = -serverDepth + 2 - .8, tag = $seg01)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
@ -172,8 +172,8 @@ const sketch006l = startSketchOn(plane001)
intersectTag: lineToIntersect4, intersectTag: lineToIntersect4,
offset: 0 offset: 0
}, %) }, %)
|> angledLine({ angle: -70, length: 1.414 }, %) |> angledLine(angle = -70, length = 1.414 )
|> angledLineToY({ angle: 70 + 180, to: 2 - 1 }, %) |> angledLine(angle = 70 + 180, endAbsoluteY = 2 - 1)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude006l = extrude(sketch006l, length = 1) const extrude006l = extrude(sketch006l, length = 1)
@ -188,7 +188,7 @@ const sketch007l = startSketchOn(plane001)
intersectTag: lineToIntersect5, intersectTag: lineToIntersect5,
offset: 0 offset: 0
}, %) }, %)
|> angledLine({ angle: -70, length: 1.414 }, %) |> angledLine(angle = -70, length = 1.414 )
|> angledLineToY({ |> angledLineToY({
angle: 70 + 180, angle: 70 + 180,
to: railHeight * 1.75 + 1 to: railHeight * 1.75 + 1
@ -214,7 +214,7 @@ const plane002 = {
const sketch001w = startSketchOn(plane002) const sketch001w = startSketchOn(plane002)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> xLine(length = depth) |> xLine(length = depth)
|> angledLineToY({ angle: -45, to: 1 }, %) |> angledLine(angle = -45, endAbsoluteY = 1)
|> xLine(length = -depth + 2, tag = $seg01w) |> xLine(length = -depth + 2, tag = $seg01w)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
@ -223,7 +223,7 @@ const extrude001w = extrude(sketch001w, length = 1)
const sketch002w = startSketchOn(plane002) const sketch002w = startSketchOn(plane002)
|> startProfileAt([depth, 0], %) |> startProfileAt([depth, 0], %)
|> yLine(length = railHeight * 1.75 + 2) |> yLine(length = railHeight * 1.75 + 2)
|> angledLineToX({ angle: -135, to: depth - 1 }, %) |> angledLine(angle = -135, endAbsoluteX = depth - 1)
|> yLine(length = -railHeight * 1.75) |> yLine(length = -railHeight * 1.75)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
@ -255,9 +255,9 @@ const extrude004w = extrude(sketch004w, length = 1)
const sketch005w = startSketchOn(plane002) const sketch005w = startSketchOn(plane002)
|> startProfileAt([1, 40.6 + 1.75 / 2], %) |> startProfileAt([1, 40.6 + 1.75 / 2], %)
|> angledLine({ angle: -23, length: 35.5 }, %) |> angledLine(angle = -23, length = 35.5 )
|> angledLine({ angle: -23 + 90 + 45, length: 1.413 }, %) |> angledLine(angle = -23 + 90 + 45, length = 1.413 )
|> angledLineToX({ angle: -23, to: 1 }, %, $lineToIntersect) |> angledLine(angle = -23, endAbsoluteX = 1, tag = $lineToIntersect)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude005w = extrude(sketch005w, length = 1) const extrude005w = extrude(sketch005w, length = 1)
@ -267,7 +267,7 @@ const sketch006w = startSketchOn(plane002)
1 + 35.5 * cos(23 * pi() / 180), 1 + 35.5 * cos(23 * pi() / 180),
40.6 - (35.5 * sin(23 * pi() / 180)) + 1.75 / 2 40.6 - (35.5 * sin(23 * pi() / 180)) + 1.75 / 2
], %) ], %)
|> angledLineToX({ angle: -23 + 90, to: depth - 1 }, %) |> angledLine(angle = -23 + 90, endAbsoluteX = depth - 1)
|> yLine(length = 2.56) |> yLine(length = 2.56)
|> angledLineThatIntersects({ |> angledLineThatIntersects({
angle: -23 + 90 + 180, angle: -23 + 90 + 180,
@ -280,8 +280,8 @@ const extrude006w = extrude(sketch006w, length = 1)
const sketch007w = startSketchOn(plane002) const sketch007w = startSketchOn(plane002)
|> startProfileAt([depth - 1, 60.65 + 1.75 / 2], %) |> startProfileAt([depth - 1, 60.65 + 1.75 / 2], %)
|> angledLine({ angle: -23 + 180, length: 34.93 }, %, $lineToIntersect3) |> angledLine(angle = -23 + 180, length = 34.93 , tag = $lineToIntersect3)
|> angledLine({ angle: 23 - 90, length: 1.414 }, %) |> angledLine(angle = 23 - 90, length = 1.414 )
|> angledLineThatIntersects({ |> angledLineThatIntersects({
angle: -23 + 180, angle: -23 + 180,
intersectTag: lineToIntersect2, intersectTag: lineToIntersect2,
@ -298,7 +298,7 @@ const sketch008w = startSketchOn(plane002)
intersectTag: lineToIntersect3, intersectTag: lineToIntersect3,
offset: 0 offset: 0
}, %) }, %)
|> angledLine({ angle: -23 - 45, length: 1.414 }, %) |> angledLine(angle = -23 - 45, length = 1.414 )
|> angledLineThatIntersects({ |> angledLineThatIntersects({
angle: -23 - 90, angle: -23 - 90,
intersectTag: lineToIntersect, intersectTag: lineToIntersect,
@ -310,18 +310,18 @@ const extrude008w = extrude(sketch008w, length = 1)
const sketch009w = startSketchOn(plane002) const sketch009w = startSketchOn(plane002)
|> startProfileAt([31.2, 33.3 + 1.75 / 2], %) |> startProfileAt([31.2, 33.3 + 1.75 / 2], %)
|> angledLine({ angle: -23 - 45, length: 1.414 }, %) |> angledLine(angle = -23 - 45, length = 1.414 )
|> angledLine({ angle: 90 - 23, length: 28 }, %) |> angledLine(angle = 90 - 23, length = 28 )
|> angledLine({ angle: -23 + 45, length: -1.414 }, %) |> angledLine(angle = -23 + 45, length = -1.414 )
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude009w = extrude(sketch009w, length = 1) const extrude009w = extrude(sketch009w, length = 1)
const sketch010w = startSketchOn(plane002) const sketch010w = startSketchOn(plane002)
|> startProfileAt([31.2, 33.3 + 1.75 / 2], %) |> startProfileAt([31.2, 33.3 + 1.75 / 2], %)
|> angledLine({ angle: -23 - 45, length: 1.414 }, %) |> angledLine(angle = -23 - 45, length = 1.414 )
|> angledLine({ angle: 180 - 23, length: 28 }, %) |> angledLine(angle = 180 - 23, length = 28 )
|> angledLine({ angle: -23 + 45, length: 1.414 }, %) |> angledLine(angle = -23 + 45, length = 1.414 )
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude010w = extrude(sketch010w, length = 1) const extrude010w = extrude(sketch010w, length = 1)
@ -331,9 +331,9 @@ const sketch011w = startSketchOn(plane002)
31.2 - ((28 - 2) * cos(23 * pi() / 180)), 31.2 - ((28 - 2) * cos(23 * pi() / 180)),
33.3 + (28 - 2) * sin(23 * pi() / 180) + 1.75 / 2 33.3 + (28 - 2) * sin(23 * pi() / 180) + 1.75 / 2
], %) ], %)
|> angledLine({ angle: 90 - 23, length: 28 - 2 }, %) |> angledLine(angle = 90 - 23, length = 28 - 2 )
|> angledLine({ angle: -23 - 45, length: -1.414 }, %) |> angledLine(angle = -23 - 45, length = -1.414 )
|> angledLine({ angle: 90 - 23 + 180, length: 28 }, %) |> angledLine(angle = 90 - 23 + 180, length = 28 )
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude011w = extrude(sketch011w, length = 1) const extrude011w = extrude(sketch011w, length = 1)
@ -343,9 +343,9 @@ const sketch012w = startSketchOn(plane002)
31.2 + (28 - 2) * sin(23 * pi() / 180), 31.2 + (28 - 2) * sin(23 * pi() / 180),
33.3 + (28 - 2) * cos(23 * pi() / 180) + 1.75 / 2 33.3 + (28 - 2) * cos(23 * pi() / 180) + 1.75 / 2
], %) ], %)
|> angledLine({ angle: 180 - 23, length: 28 - 2 }, %) |> angledLine(angle = 180 - 23, length = 28 - 2 )
|> angledLine({ angle: -23 - 45, length: -1.414 }, %) |> angledLine(angle = -23 - 45, length = -1.414 )
|> angledLine({ angle: -23, length: 28 }, %) |> angledLine(angle = -23, length = 28 )
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude012w = extrude(sketch012w, length = 1) const extrude012w = extrude(sketch012w, length = 1)
@ -355,8 +355,8 @@ const sketch013w = startSketchOn(plane002)
1 + 4 * cos(23 * pi() / 180), 1 + 4 * cos(23 * pi() / 180),
40.6 - (4 * sin(23 * pi() / 180)) + 1.75 / 2 40.6 - (4 * sin(23 * pi() / 180)) + 1.75 / 2
], %) ], %)
|> angledLine({ angle: -23, length: 1 }, %) |> angledLine(angle = -23, length = 1 )
|> angledLineToX({ angle: -23 + 90, to: 1 }, %) |> angledLine(angle = -23 + 90, endAbsoluteX = 1)
|> yLine(length = 2.56) |> yLine(length = 2.56)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
@ -367,9 +367,9 @@ const sketch014w = startSketchOn(plane002)
1 + 12 * cos(23 * pi() / 180), 1 + 12 * cos(23 * pi() / 180),
40.6 - (12 * sin(23 * pi() / 180)) + 1.75 / 2 40.6 - (12 * sin(23 * pi() / 180)) + 1.75 / 2
], %) ], %)
|> angledLine({ angle: -23 - 90, length: 36 / 2 }, %) |> angledLine(angle = -23 - 90, length = 36 / 2 )
|> angledLine({ angle: -23, length: 1 }, %) |> angledLine(angle = -23, length = 1 )
|> angledLine({ angle: -23 - 90, length: -36 / 2 }, %) |> angledLine(angle = -23 - 90, length = -36 / 2 )
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude014w = extrude(sketch014w, length = 1) const extrude014w = extrude(sketch014w, length = 1)
@ -379,9 +379,9 @@ const sketch015w = startSketchOn(plane002)
1 + (36 - 5.55 - 8) * cos(23 * pi() / 180), 1 + (36 - 5.55 - 8) * cos(23 * pi() / 180),
40.6 - ((36 - 5.55 - 8) * sin(23 * pi() / 180)) + 1.75 / 2 40.6 - ((36 - 5.55 - 8) * sin(23 * pi() / 180)) + 1.75 / 2
], %) ], %)
|> angledLine({ angle: -23 - 90, length: 36 / 2 }, %) |> angledLine(angle = -23 - 90, length = 36 / 2 )
|> angledLine({ angle: -23, length: 1 }, %) |> angledLine(angle = -23, length = 1 )
|> angledLine({ angle: -23 - 90, length: -36 / 2 }, %) |> angledLine(angle = -23 - 90, length = -36 / 2 )
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude015w = extrude(sketch015w, length = 1) const extrude015w = extrude(sketch015w, length = 1)
@ -391,9 +391,9 @@ const sketch016w = startSketchOn(plane002)
1 + (36 - 5.5) * cos(23 * pi() / 180), 1 + (36 - 5.5) * cos(23 * pi() / 180),
40.6 - ((36 - 5.5) * sin(23 * pi() / 180)) + 1.75 / 2 40.6 - ((36 - 5.5) * sin(23 * pi() / 180)) + 1.75 / 2
], %) ], %)
|> angledLine({ angle: -23 - 90, length: 36 / 2 }, %) |> angledLine(angle = -23 - 90, length = 36 / 2 )
|> angledLine({ angle: -23, length: 1 }, %) |> angledLine(angle = -23, length = 1 )
|> angledLine({ angle: -23 - 90, length: -36 / 2 }, %) |> angledLine(angle = -23 - 90, length = -36 / 2 )
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude016w = extrude(sketch016w, length = 1) const extrude016w = extrude(sketch016w, length = 1)
@ -408,7 +408,7 @@ const sketch017w = startSketchOn(plane002)
angleEnd: 180 - 23, angleEnd: 180 - 23,
radius: 7 / 2 + 2 radius: 7 / 2 + 2
}, %) }, %)
|> angledLine({ angle: -23 + 180, length: -1 }, %) |> angledLine(angle = -23 + 180, length = -1 )
|> arc({ |> arc({
angleStart: 180 - 23, angleStart: 180 - 23,
angleEnd: -23, angleEnd: -23,
@ -428,7 +428,7 @@ const sketch018w = startSketchOn(plane002)
angleEnd: 180 - 23, angleEnd: 180 - 23,
radius: 7 / 2 + 2 radius: 7 / 2 + 2
}, %) }, %)
|> angledLine({ angle: -23 + 180, length: -1 }, %) |> angledLine(angle = -23 + 180, length = -1 )
|> arc({ |> arc({
angleStart: 180 - 23, angleStart: 180 - 23,
angleEnd: -23, angleEnd: -23,
@ -440,9 +440,9 @@ const extrude018w = extrude(sketch018w, length = 1)
const sketch019w = startSketchOn(plane002) const sketch019w = startSketchOn(plane002)
|> startProfileAt([1, 27.8 + 1.75 / 2], %) |> startProfileAt([1, 27.8 + 1.75 / 2], %)
|> angledLine({ angle: -23, length: 7 }, %) |> angledLine(angle = -23, length = 7 )
|> angledLine({ angle: -23 + 90, length: -1 }, %) |> angledLine(angle = -23 + 90, length = -1 )
|> angledLineToX({ angle: -23, to: 1 }, %) |> angledLine(angle = -23, endAbsoluteX = 1)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude019w = extrude(sketch019w, length = 1) const extrude019w = extrude(sketch019w, length = 1)
@ -452,18 +452,18 @@ const sketch020w = startSketchOn(plane002)
1 + (36 - 5.53 - 12) * cos(23 * pi() / 180), 1 + (36 - 5.53 - 12) * cos(23 * pi() / 180),
27.8 + 1.75 / 2 - ((36 - 5.53 - 12) * sin(23 * pi() / 180)) 27.8 + 1.75 / 2 - ((36 - 5.53 - 12) * sin(23 * pi() / 180))
], %) ], %)
|> angledLine({ angle: -23, length: 7 }, %) |> angledLine(angle = -23, length = 7 )
|> angledLine({ angle: -23 + 90, length: -1 }, %) |> angledLine(angle = -23 + 90, length = -1 )
|> angledLine({ angle: -23 + 180, length: 7 }, %) |> angledLine(angle = -23 + 180, length = 7 )
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude020w = extrude(sketch020w, length = 1) const extrude020w = extrude(sketch020w, length = 1)
const sketch021w = startSketchOn(plane002) const sketch021w = startSketchOn(plane002)
|> startProfileAt([1, 21.9], %) |> startProfileAt([1, 21.9], %)
|> angledLineToX({ angle: -23, to: depth - 1 }, %) |> angledLine(angle = -23, endAbsoluteX = depth - 1)
|> yLine(length = -1.1) |> yLine(length = -1.1)
|> angledLineToX({ angle: -23, to: 1 }, %) |> angledLine(angle = -23, endAbsoluteX = 1)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude021w = extrude(sketch021w, length = 1) const extrude021w = extrude(sketch021w, length = 1)
@ -475,7 +475,7 @@ const sketch022w = startSketchOn(plane002)
to: railHeight * 1.75 + 1 to: railHeight * 1.75 + 1
}, %) }, %)
|> xLine(length = -2.56) |> xLine(length = -2.56)
|> angledLineToX({ angle: -23, to: depth - 1 }, %) |> angledLine(angle = -23, endAbsoluteX = depth - 1)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude022w = extrude(sketch022w, length = 1) const extrude022w = extrude(sketch022w, length = 1)
@ -487,25 +487,25 @@ const sketch023w = startSketchOn(plane002)
to: railHeight * 1.75 + 1 to: railHeight * 1.75 + 1
}, %) }, %)
|> xLine(length = 1.086) |> xLine(length = 1.086)
|> angledLineToX({ angle: 90 - 23, to: 1 }, %) |> angledLine(angle = 90 - 23, endAbsoluteX = 1)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude023w = extrude(sketch023w, length = 1) const extrude023w = extrude(sketch023w, length = 1)
const sketch024w = startSketchOn(plane002) const sketch024w = startSketchOn(plane002)
|> startProfileAt([1, 16.5], %) |> startProfileAt([1, 16.5], %)
|> angledLineToY({ angle: -23, to: 1 }, %) |> angledLine(angle = -23, endAbsoluteY = 1)
|> xLine(length = -2.56) |> xLine(length = -2.56)
|> angledLineToX({ angle: -23, to: 1 }, %) |> angledLine(angle = -23, endAbsoluteX = 1)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude024w = extrude(sketch024w, length = 1) const extrude024w = extrude(sketch024w, length = 1)
const sketch025w = startSketchOn(plane002) const sketch025w = startSketchOn(plane002)
|> startProfileAt([1, 4], %) |> startProfileAt([1, 4], %)
|> angledLineToY({ angle: -23, to: 1 }, %) |> angledLine(angle = -23, endAbsoluteY = 1)
|> xLine(length = -2.56) |> xLine(length = -2.56)
|> angledLineToX({ angle: -23, to: 1 }, %) |> angledLine(angle = -23, endAbsoluteX = 1)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude025w = extrude(sketch025w, length = 1) const extrude025w = extrude(sketch025w, length = 1)

View File

@ -109,7 +109,7 @@ const plane001 = {
const sketch001l = startSketchOn(plane001) const sketch001l = startSketchOn(plane001)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> xLine(length = serverDepth + .8) |> xLine(length = serverDepth + .8)
|> angledLineToY({ angle: -45, to: 1 }, %) |> angledLine(angle = -45, endAbsoluteY = 1)
|> xLine(length = -serverDepth + 2 - .8, tag = $seg01) |> xLine(length = -serverDepth + 2 - .8, tag = $seg01)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
@ -170,8 +170,8 @@ const sketch006l = startSketchOn(plane001)
intersectTag: lineToIntersect4, intersectTag: lineToIntersect4,
offset: 0 offset: 0
}, %) }, %)
|> angledLine({ angle: -70, length: 1.414 }, %) |> angledLine(angle = -70, length = 1.414 )
|> angledLineToY({ angle: 70 + 180, to: 2 - 1 }, %) |> angledLine(angle = 70 + 180, endAbsoluteY = 2 - 1)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude006l = extrude(sketch006l, length = 1) const extrude006l = extrude(sketch006l, length = 1)
@ -186,7 +186,7 @@ const sketch007l = startSketchOn(plane001)
intersectTag: lineToIntersect5, intersectTag: lineToIntersect5,
offset: 0 offset: 0
}, %) }, %)
|> angledLine({ angle: -70, length: 1.414 }, %) |> angledLine(angle = -70, length = 1.414 )
|> angledLineToY({ |> angledLineToY({
angle: 70 + 180, angle: 70 + 180,
to: railHeight * 1.75 + 1 to: railHeight * 1.75 + 1
@ -212,7 +212,7 @@ const plane002 = {
const sketch001w = startSketchOn(plane002) const sketch001w = startSketchOn(plane002)
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> xLine(length = depth) |> xLine(length = depth)
|> angledLineToY({ angle: -45, to: 1 }, %) |> angledLine(angle = -45, endAbsoluteY = 1)
|> xLine(length = -depth + 2, tag = $seg01w) |> xLine(length = -depth + 2, tag = $seg01w)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
@ -221,7 +221,7 @@ const extrude001w = extrude(sketch001w, length = 1)
const sketch002w = startSketchOn(plane002) const sketch002w = startSketchOn(plane002)
|> startProfileAt([depth, 0], %) |> startProfileAt([depth, 0], %)
|> yLine(length = railHeight * 1.75 + 2) |> yLine(length = railHeight * 1.75 + 2)
|> angledLineToX({ angle: -135, to: depth - 1 }, %) |> angledLine(angle = -135, endAbsoluteX = depth - 1)
|> yLine(length = -railHeight * 1.75) |> yLine(length = -railHeight * 1.75)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
@ -253,9 +253,9 @@ const extrude004w = extrude(sketch004w, length = 1)
const sketch005w = startSketchOn(plane002) const sketch005w = startSketchOn(plane002)
|> startProfileAt([1, 40.6 + 1.75 / 2], %) |> startProfileAt([1, 40.6 + 1.75 / 2], %)
|> angledLine({ angle: -23, length: 35.5 }, %) |> angledLine(angle = -23, length = 35.5 )
|> angledLine({ angle: -23 + 90 + 45, length: 1.413 }, %) |> angledLine(angle = -23 + 90 + 45, length = 1.413 )
|> angledLineToX({ angle: -23, to: 1 }, %, $lineToIntersect) |> angledLine(angle = -23, endAbsoluteX = 1, tag = $lineToIntersect)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude005w = extrude(sketch005w, length = 1) const extrude005w = extrude(sketch005w, length = 1)
@ -265,7 +265,7 @@ const sketch006w = startSketchOn(plane002)
1 + 35.5 * cos(23 * pi() / 180), 1 + 35.5 * cos(23 * pi() / 180),
40.6 - (35.5 * sin(23 * pi() / 180)) + 1.75 / 2 40.6 - (35.5 * sin(23 * pi() / 180)) + 1.75 / 2
], %) ], %)
|> angledLineToX({ angle: -23 + 90, to: depth - 1 }, %) |> angledLine(angle = -23 + 90, endAbsoluteX = depth - 1)
|> yLine(length = 2.56) |> yLine(length = 2.56)
|> angledLineThatIntersects({ |> angledLineThatIntersects({
angle: -23 + 90 + 180, angle: -23 + 90 + 180,
@ -278,8 +278,8 @@ const extrude006w = extrude(sketch006w, length = 1)
const sketch007w = startSketchOn(plane002) const sketch007w = startSketchOn(plane002)
|> startProfileAt([depth - 1, 60.65 + 1.75 / 2], %) |> startProfileAt([depth - 1, 60.65 + 1.75 / 2], %)
|> angledLine({ angle: -23 + 180, length: 34.93 }, %, $lineToIntersect3) |> angledLine(angle = -23 + 180, length = 34.93 , tag = $lineToIntersect3)
|> angledLine({ angle: 23 - 90, length: 1.414 }, %) |> angledLine(angle = 23 - 90, length = 1.414 )
|> angledLineThatIntersects({ |> angledLineThatIntersects({
angle: -23 + 180, angle: -23 + 180,
intersectTag: lineToIntersect2, intersectTag: lineToIntersect2,
@ -296,7 +296,7 @@ const sketch008w = startSketchOn(plane002)
intersectTag: lineToIntersect3, intersectTag: lineToIntersect3,
offset: 0 offset: 0
}, %) }, %)
|> angledLine({ angle: -23 - 45, length: 1.414 }, %) |> angledLine(angle = -23 - 45, length = 1.414 )
|> angledLineThatIntersects({ |> angledLineThatIntersects({
angle: -23 - 90, angle: -23 - 90,
intersectTag: lineToIntersect, intersectTag: lineToIntersect,
@ -308,18 +308,18 @@ const extrude008w = extrude(sketch008w, length = 1)
const sketch009w = startSketchOn(plane002) const sketch009w = startSketchOn(plane002)
|> startProfileAt([31.2, 33.3 + 1.75 / 2], %) |> startProfileAt([31.2, 33.3 + 1.75 / 2], %)
|> angledLine({ angle: -23 - 45, length: 1.414 }, %) |> angledLine(angle = -23 - 45, length = 1.414 )
|> angledLine({ angle: 90 - 23, length: 28 }, %) |> angledLine(angle = 90 - 23, length = 28 )
|> angledLine({ angle: -23 + 45, length: -1.414 }, %) |> angledLine(angle = -23 + 45, length = -1.414 )
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude009w = extrude(sketch009w, length = 1) const extrude009w = extrude(sketch009w, length = 1)
const sketch010w = startSketchOn(plane002) const sketch010w = startSketchOn(plane002)
|> startProfileAt([31.2, 33.3 + 1.75 / 2], %) |> startProfileAt([31.2, 33.3 + 1.75 / 2], %)
|> angledLine({ angle: -23 - 45, length: 1.414 }, %) |> angledLine(angle = -23 - 45, length = 1.414 )
|> angledLine({ angle: 180 - 23, length: 28 }, %) |> angledLine(angle = 180 - 23, length = 28 )
|> angledLine({ angle: -23 + 45, length: 1.414 }, %) |> angledLine(angle = -23 + 45, length = 1.414 )
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude010w = extrude(sketch010w, length = 1) const extrude010w = extrude(sketch010w, length = 1)
@ -329,9 +329,9 @@ const sketch011w = startSketchOn(plane002)
31.2 - ((28 - 2) * cos(23 * pi() / 180)), 31.2 - ((28 - 2) * cos(23 * pi() / 180)),
33.3 + (28 - 2) * sin(23 * pi() / 180) + 1.75 / 2 33.3 + (28 - 2) * sin(23 * pi() / 180) + 1.75 / 2
], %) ], %)
|> angledLine({ angle: 90 - 23, length: 28 - 2 }, %) |> angledLine(angle = 90 - 23, length = 28 - 2 )
|> angledLine({ angle: -23 - 45, length: -1.414 }, %) |> angledLine(angle = -23 - 45, length = -1.414 )
|> angledLine({ angle: 90 - 23 + 180, length: 28 }, %) |> angledLine(angle = 90 - 23 + 180, length = 28 )
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude011w = extrude(sketch011w, length = 1) const extrude011w = extrude(sketch011w, length = 1)
@ -341,9 +341,9 @@ const sketch012w = startSketchOn(plane002)
31.2 + (28 - 2) * sin(23 * pi() / 180), 31.2 + (28 - 2) * sin(23 * pi() / 180),
33.3 + (28 - 2) * cos(23 * pi() / 180) + 1.75 / 2 33.3 + (28 - 2) * cos(23 * pi() / 180) + 1.75 / 2
], %) ], %)
|> angledLine({ angle: 180 - 23, length: 28 - 2 }, %) |> angledLine(angle = 180 - 23, length = 28 - 2 )
|> angledLine({ angle: -23 - 45, length: -1.414 }, %) |> angledLine(angle = -23 - 45, length = -1.414 )
|> angledLine({ angle: -23, length: 28 }, %) |> angledLine(angle = -23, length = 28 )
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude012w = extrude(sketch012w, length = 1) const extrude012w = extrude(sketch012w, length = 1)
@ -353,8 +353,8 @@ const sketch013w = startSketchOn(plane002)
1 + 4 * cos(23 * pi() / 180), 1 + 4 * cos(23 * pi() / 180),
40.6 - (4 * sin(23 * pi() / 180)) + 1.75 / 2 40.6 - (4 * sin(23 * pi() / 180)) + 1.75 / 2
], %) ], %)
|> angledLine({ angle: -23, length: 1 }, %) |> angledLine(angle = -23, length = 1 )
|> angledLineToX({ angle: -23 + 90, to: 1 }, %) |> angledLine(angle = -23 + 90, endAbsoluteX = 1)
|> yLine(length = 2.56) |> yLine(length = 2.56)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
@ -365,9 +365,9 @@ const sketch014w = startSketchOn(plane002)
1 + 12 * cos(23 * pi() / 180), 1 + 12 * cos(23 * pi() / 180),
40.6 - (12 * sin(23 * pi() / 180)) + 1.75 / 2 40.6 - (12 * sin(23 * pi() / 180)) + 1.75 / 2
], %) ], %)
|> angledLine({ angle: -23 - 90, length: 36 / 2 }, %) |> angledLine(angle = -23 - 90, length = 36 / 2 )
|> angledLine({ angle: -23, length: 1 }, %) |> angledLine(angle = -23, length = 1 )
|> angledLine({ angle: -23 - 90, length: -36 / 2 }, %) |> angledLine(angle = -23 - 90, length = -36 / 2 )
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude014w = extrude(sketch014w, length = 1) const extrude014w = extrude(sketch014w, length = 1)
@ -377,9 +377,9 @@ const sketch015w = startSketchOn(plane002)
1 + (36 - 5.55 - 8) * cos(23 * pi() / 180), 1 + (36 - 5.55 - 8) * cos(23 * pi() / 180),
40.6 - ((36 - 5.55 - 8) * sin(23 * pi() / 180)) + 1.75 / 2 40.6 - ((36 - 5.55 - 8) * sin(23 * pi() / 180)) + 1.75 / 2
], %) ], %)
|> angledLine({ angle: -23 - 90, length: 36 / 2 }, %) |> angledLine(angle = -23 - 90, length = 36 / 2 )
|> angledLine({ angle: -23, length: 1 }, %) |> angledLine(angle = -23, length = 1 )
|> angledLine({ angle: -23 - 90, length: -36 / 2 }, %) |> angledLine(angle = -23 - 90, length = -36 / 2 )
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude015w = extrude(sketch015w, length = 1) const extrude015w = extrude(sketch015w, length = 1)
@ -389,9 +389,9 @@ const sketch016w = startSketchOn(plane002)
1 + (36 - 5.5) * cos(23 * pi() / 180), 1 + (36 - 5.5) * cos(23 * pi() / 180),
40.6 - ((36 - 5.5) * sin(23 * pi() / 180)) + 1.75 / 2 40.6 - ((36 - 5.5) * sin(23 * pi() / 180)) + 1.75 / 2
], %) ], %)
|> angledLine({ angle: -23 - 90, length: 36 / 2 }, %) |> angledLine(angle = -23 - 90, length = 36 / 2 )
|> angledLine({ angle: -23, length: 1 }, %) |> angledLine(angle = -23, length = 1 )
|> angledLine({ angle: -23 - 90, length: -36 / 2 }, %) |> angledLine(angle = -23 - 90, length = -36 / 2 )
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude016w = extrude(sketch016w, length = 1) const extrude016w = extrude(sketch016w, length = 1)
@ -406,7 +406,7 @@ const sketch017w = startSketchOn(plane002)
angleEnd: 180 - 23, angleEnd: 180 - 23,
radius: 7 / 2 + 2 radius: 7 / 2 + 2
}, %) }, %)
|> angledLine({ angle: -23 + 180, length: -1 }, %) |> angledLine(angle = -23 + 180, length = -1 )
|> arc({ |> arc({
angleStart: 180 - 23, angleStart: 180 - 23,
angleEnd: -23, angleEnd: -23,
@ -426,7 +426,7 @@ const sketch018w = startSketchOn(plane002)
angleEnd: 180 - 23, angleEnd: 180 - 23,
radius: 7 / 2 + 2 radius: 7 / 2 + 2
}, %) }, %)
|> angledLine({ angle: -23 + 180, length: -1 }, %) |> angledLine(angle = -23 + 180, length = -1 )
|> arc({ |> arc({
angleStart: 180 - 23, angleStart: 180 - 23,
angleEnd: -23, angleEnd: -23,
@ -438,9 +438,9 @@ const extrude018w = extrude(sketch018w, length = 1)
const sketch019w = startSketchOn(plane002) const sketch019w = startSketchOn(plane002)
|> startProfileAt([1, 27.8 + 1.75 / 2], %) |> startProfileAt([1, 27.8 + 1.75 / 2], %)
|> angledLine({ angle: -23, length: 7 }, %) |> angledLine(angle = -23, length = 7 )
|> angledLine({ angle: -23 + 90, length: -1 }, %) |> angledLine(angle = -23 + 90, length = -1 )
|> angledLineToX({ angle: -23, to: 1 }, %) |> angledLine(angle = -23, endAbsoluteX = 1)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude019w = extrude(sketch019w, length = 1) const extrude019w = extrude(sketch019w, length = 1)
@ -450,18 +450,18 @@ const sketch020w = startSketchOn(plane002)
1 + (36 - 5.53 - 12) * cos(23 * pi() / 180), 1 + (36 - 5.53 - 12) * cos(23 * pi() / 180),
27.8 + 1.75 / 2 - ((36 - 5.53 - 12) * sin(23 * pi() / 180)) 27.8 + 1.75 / 2 - ((36 - 5.53 - 12) * sin(23 * pi() / 180))
], %) ], %)
|> angledLine({ angle: -23, length: 7 }, %) |> angledLine(angle = -23, length = 7 )
|> angledLine({ angle: -23 + 90, length: -1 }, %) |> angledLine(angle = -23 + 90, length = -1 )
|> angledLine({ angle: -23 + 180, length: 7 }, %) |> angledLine(angle = -23 + 180, length = 7 )
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude020w = extrude(sketch020w, length = 1) const extrude020w = extrude(sketch020w, length = 1)
const sketch021w = startSketchOn(plane002) const sketch021w = startSketchOn(plane002)
|> startProfileAt([1, 21.9], %) |> startProfileAt([1, 21.9], %)
|> angledLineToX({ angle: -23, to: depth - 1 }, %) |> angledLine(angle = -23, endAbsoluteX = depth - 1)
|> yLine(length = -1.1) |> yLine(length = -1.1)
|> angledLineToX({ angle: -23, to: 1 }, %) |> angledLine(angle = -23, endAbsoluteX = 1)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude021w = extrude(sketch021w, length = 1) const extrude021w = extrude(sketch021w, length = 1)
@ -473,7 +473,7 @@ const sketch022w = startSketchOn(plane002)
to: railHeight * 1.75 + 1 to: railHeight * 1.75 + 1
}, %) }, %)
|> xLine(length = -2.56) |> xLine(length = -2.56)
|> angledLineToX({ angle: -23, to: depth - 1 }, %) |> angledLine(angle = -23, endAbsoluteX = depth - 1)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude022w = extrude(sketch022w, length = 1) const extrude022w = extrude(sketch022w, length = 1)
@ -485,25 +485,25 @@ const sketch023w = startSketchOn(plane002)
to: railHeight * 1.75 + 1 to: railHeight * 1.75 + 1
}, %) }, %)
|> xLine(length = 1.086) |> xLine(length = 1.086)
|> angledLineToX({ angle: 90 - 23, to: 1 }, %) |> angledLine(angle = 90 - 23, endAbsoluteX = 1)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude023w = extrude(sketch023w, length = 1) const extrude023w = extrude(sketch023w, length = 1)
const sketch024w = startSketchOn(plane002) const sketch024w = startSketchOn(plane002)
|> startProfileAt([1, 16.5], %) |> startProfileAt([1, 16.5], %)
|> angledLineToY({ angle: -23, to: 1 }, %) |> angledLine(angle = -23, endAbsoluteY = 1)
|> xLine(length = -2.56) |> xLine(length = -2.56)
|> angledLineToX({ angle: -23, to: 1 }, %) |> angledLine(angle = -23, endAbsoluteX = 1)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude024w = extrude(sketch024w, length = 1) const extrude024w = extrude(sketch024w, length = 1)
const sketch025w = startSketchOn(plane002) const sketch025w = startSketchOn(plane002)
|> startProfileAt([1, 4], %) |> startProfileAt([1, 4], %)
|> angledLineToY({ angle: -23, to: 1 }, %) |> angledLine(angle = -23, endAbsoluteY = 1)
|> xLine(length = -2.56) |> xLine(length = -2.56)
|> angledLineToX({ angle: -23, to: 1 }, %) |> angledLine(angle = -23, endAbsoluteX = 1)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
const extrude025w = extrude(sketch025w, length = 1) const extrude025w = extrude(sketch025w, length = 1)

View File

@ -6,10 +6,10 @@ let angleStart = 110
startSketchOn(XY) startSketchOn(XY)
|> startProfileAt([startX, startY], %) |> startProfileAt([startX, startY], %)
|> angledLine({ |> angledLine(
angle: angleStart, angle = angleStart,
length: .000001, length = .000001,
}, %) )
|> tangentialArc({ |> tangentialArc({
offset: angleOffset, offset: angleOffset,
radius: r, radius: r,

File diff suppressed because it is too large Load Diff

View File

@ -1048,11 +1048,11 @@ identifierGuy = 5
part001 = startSketchOn(XY) part001 = startSketchOn(XY)
|> startProfileAt([-1.2, 4.83], %) |> startProfileAt([-1.2, 4.83], %)
|> line(end = [2.8, 0]) |> line(end = [2.8, 0])
|> angledLine([100 + 100, 3.01], %) |> angledLine(angle = 100 + 100, length = 3.01)
|> angledLine([abc, 3.02], %) |> angledLine(angle = abc, length = 3.02)
|> angledLine([def(yo), 3.03], %) |> angledLine(angle = def(yo), length = 3.03)
|> angledLine([ghi(2), 3.04], %) |> angledLine(angle = ghi(2), length = 3.04)
|> angledLine([jkl(yo) + 2, 3.05], %) |> angledLine(angle = jkl(yo) + 2, length = 3.05)
|> close() |> close()
yo2 = hmm([identifierGuy + 5])"#; yo2 = hmm([identifierGuy + 5])"#;
@ -2031,10 +2031,10 @@ let w = f() + f()
let ast = r#"fn bar(t) { let ast = r#"fn bar(t) {
return startSketchOn(XY) return startSketchOn(XY)
|> startProfileAt([0,0], %) |> startProfileAt([0,0], %)
|> angledLine({ |> angledLine(
angle = -60, angle = -60,
length = segLen(t), length = segLen(t),
}, %) )
|> line(end = [0, 0]) |> line(end = [0, 0])
|> close() |> close()
} }

View File

@ -116,9 +116,9 @@ const Part001 = startSketchOn('XY')
|> line([0, -1], %) |> line([0, -1], %)
|> line([-thickness, 0], %) |> line([-thickness, 0], %)
|> line([0, 1], %) |> line([0, 1], %)
|> angledLineToX({ angle: 120, to: pipeSmallDia }, %) |> angledLine(angle = 120, endAbsoluteX = pipeSmallDia)
|> line([0, pipeLength], %) |> line([0, pipeLength], %)
|> angledLineToX({ angle: 60, to: pipeLargeDia }, %) |> angledLine(angle = 60, endAbsoluteX = pipeLargeDia)
|> close() |> close()
|> revolve({ axis: 'y' }, %) |> revolve({ axis: 'y' }, %)
" "
@ -152,9 +152,9 @@ const part001 = startSketchOn('XY')
|> line([0, -1], %) |> line([0, -1], %)
|> line([-thickness, 0], %) |> line([-thickness, 0], %)
|> line([0, 1], %) |> line([0, 1], %)
|> angledLineToX({ angle: 120, to: pipeSmallDia }, %) |> angledLine(angle = 120, endAbsoluteX = pipeSmallDia)
|> line([0, pipeLength], %) |> line([0, pipeLength], %)
|> angledLineToX({ angle: 60, to: pipeLargeDia }, %) |> angledLine(angle = 60, endAbsoluteX = pipeLargeDia)
|> close() |> close()
|> revolve({ axis: 'y' }, %) |> revolve({ axis: 'y' }, %)
" "

View File

@ -4468,10 +4468,10 @@ e
/// ``` /// ```
/// exampleSketch = startSketchOn("XZ") /// exampleSketch = startSketchOn("XZ")
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = 30, /// angle = 30,
/// length = 3 / cos(toRadians(30)), /// length = 3 / cos(toRadians(30)),
/// }, %) /// )
/// |> yLine(endAbsolute = 0) /// |> yLine(endAbsolute = 0)
/// |> close(%) /// |> close(%)
/// ///

View File

@ -3,19 +3,23 @@
use anyhow::Result; use anyhow::Result;
use indexmap::IndexMap; use indexmap::IndexMap;
use kcl_derive_docs::stdlib; use kcl_derive_docs::stdlib;
use kcmc::{each_cmd as mcmd, length_unit::LengthUnit, shared::CutType, ModelingCmd}; use kcmc::{
each_cmd as mcmd, length_unit::LengthUnit, ok_response::OkModelingCmdResponse, shared::CutType,
websocket::OkWebSocketResponseData, ModelingCmd,
};
use kittycad_modeling_cmds as kcmc; use kittycad_modeling_cmds as kcmc;
use schemars::JsonSchema; use schemars::JsonSchema;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use uuid::Uuid;
use super::DEFAULT_TOLERANCE;
use crate::{ use crate::{
errors::{KclError, KclErrorDetails}, errors::{KclError, KclErrorDetails},
execution::{ execution::{
types::{PrimitiveType, RuntimeType}, kcl_value::RuntimeType, EdgeCut, ExecState, ExtrudeSurface, FilletSurface, GeoMeta, KclValue, PrimitiveType,
EdgeCut, ExecState, ExtrudeSurface, FilletSurface, GeoMeta, KclValue, Solid, TagIdentifier, Solid, TagIdentifier,
}, },
parsing::ast::types::TagNode, parsing::ast::types::TagNode,
settings::types::UnitLength,
std::Args, std::Args,
SourceRange, SourceRange,
}; };
@ -165,8 +169,10 @@ async fn inner_fillet(
edge_id, edge_id,
object_id: solid.id, object_id: solid.id,
radius: LengthUnit(radius), radius: LengthUnit(radius),
tolerance: LengthUnit(tolerance.unwrap_or(DEFAULT_TOLERANCE)), tolerance: LengthUnit(tolerance.unwrap_or(default_tolerance(&args.ctx.settings.units))),
cut_type: CutType::Fillet, cut_type: CutType::Fillet,
// We make this a none so that we can remove it in the future.
face_id: None,
}), }),
) )
.await?; .await?;
@ -193,6 +199,264 @@ async fn inner_fillet(
Ok(solid) Ok(solid)
} }
/// Get the opposite edge to the edge given.
pub async fn get_opposite_edge(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
let tag: TagIdentifier = args.get_data()?;
let edge = inner_get_opposite_edge(tag, exec_state, args.clone()).await?;
Ok(KclValue::Uuid {
value: edge,
meta: vec![args.source_range.into()],
})
}
/// Get the opposite edge to the edge given.
///
/// ```no_run
/// exampleSketch = startSketchOn('XZ')
/// |> startProfileAt([0, 0], %)
/// |> line(end = [10, 0])
/// |> angledLine(
/// angle = 60,
/// length = 10,
/// )
/// |> angledLine(
/// angle = 120,
/// length = 10,
/// )
/// |> line(end = [-10, 0])
/// |> angledLine(
/// angle = 240,
/// length = 10,
/// tag = $referenceEdge,
/// )
/// |> close()
///
/// example = extrude(exampleSketch, length = 5)
/// |> fillet(
/// radius = 3,
/// tags = [getOppositeEdge(referenceEdge)],
/// )
/// ```
#[stdlib {
name = "getOppositeEdge",
}]
async fn inner_get_opposite_edge(tag: TagIdentifier, exec_state: &mut ExecState, args: Args) -> Result<Uuid, KclError> {
if args.ctx.no_engine_commands().await {
return Ok(exec_state.next_uuid());
}
let face_id = args.get_adjacent_face_to_tag(exec_state, &tag, false).await?;
let id = exec_state.next_uuid();
let tagged_path = args.get_tag_engine_info(exec_state, &tag)?;
let resp = args
.send_modeling_cmd(
id,
ModelingCmd::from(mcmd::Solid3dGetOppositeEdge {
edge_id: tagged_path.id,
object_id: tagged_path.sketch,
face_id,
}),
)
.await?;
let OkWebSocketResponseData::Modeling {
modeling_response: OkModelingCmdResponse::Solid3dGetOppositeEdge(opposite_edge),
} = &resp
else {
return Err(KclError::Engine(KclErrorDetails {
message: format!("mcmd::Solid3dGetOppositeEdge response was not as expected: {:?}", resp),
source_ranges: vec![args.source_range],
}));
};
Ok(opposite_edge.edge)
}
/// Get the next adjacent edge to the edge given.
pub async fn get_next_adjacent_edge(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
let tag: TagIdentifier = args.get_data()?;
let edge = inner_get_next_adjacent_edge(tag, exec_state, args.clone()).await?;
Ok(KclValue::Uuid {
value: edge,
meta: vec![args.source_range.into()],
})
}
/// Get the next adjacent edge to the edge given.
///
/// ```no_run
/// exampleSketch = startSketchOn('XZ')
/// |> startProfileAt([0, 0], %)
/// |> line(end = [10, 0])
/// |> angledLine(
/// angle = 60,
/// length = 10,
/// )
/// |> angledLine(
/// angle = 120,
/// length = 10,
/// )
/// |> line(end = [-10, 0])
/// |> angledLine(
/// angle = 240,
/// length = 10,
/// tag = $referenceEdge,
/// )
/// |> close()
///
/// example = extrude(exampleSketch, length = 5)
/// |> fillet(
/// radius = 3,
/// tags = [getNextAdjacentEdge(referenceEdge)],
/// )
/// ```
#[stdlib {
name = "getNextAdjacentEdge",
}]
async fn inner_get_next_adjacent_edge(
tag: TagIdentifier,
exec_state: &mut ExecState,
args: Args,
) -> Result<Uuid, KclError> {
if args.ctx.no_engine_commands().await {
return Ok(exec_state.next_uuid());
}
let face_id = args.get_adjacent_face_to_tag(exec_state, &tag, false).await?;
let id = exec_state.next_uuid();
let tagged_path = args.get_tag_engine_info(exec_state, &tag)?;
let resp = args
.send_modeling_cmd(
id,
ModelingCmd::from(mcmd::Solid3dGetNextAdjacentEdge {
edge_id: tagged_path.id,
object_id: tagged_path.sketch,
face_id,
}),
)
.await?;
let OkWebSocketResponseData::Modeling {
modeling_response: OkModelingCmdResponse::Solid3dGetNextAdjacentEdge(adjacent_edge),
} = &resp
else {
return Err(KclError::Engine(KclErrorDetails {
message: format!(
"mcmd::Solid3dGetNextAdjacentEdge response was not as expected: {:?}",
resp
),
source_ranges: vec![args.source_range],
}));
};
adjacent_edge.edge.ok_or_else(|| {
KclError::Type(KclErrorDetails {
message: format!("No edge found next adjacent to tag: `{}`", tag.value),
source_ranges: vec![args.source_range],
})
})
}
/// Get the previous adjacent edge to the edge given.
pub async fn get_previous_adjacent_edge(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
let tag: TagIdentifier = args.get_data()?;
let edge = inner_get_previous_adjacent_edge(tag, exec_state, args.clone()).await?;
Ok(KclValue::Uuid {
value: edge,
meta: vec![args.source_range.into()],
})
}
/// Get the previous adjacent edge to the edge given.
///
/// ```no_run
/// exampleSketch = startSketchOn('XZ')
/// |> startProfileAt([0, 0], %)
/// |> line(end = [10, 0])
/// |> angledLine(
/// angle = 60,
/// length = 10,
/// )
/// |> angledLine(
/// angle = 120,
/// length = 10,
/// )
/// |> line(end = [-10, 0])
/// |> angledLine(
/// angle = 240,
/// length = 10,
/// tag = $referenceEdge,
/// )
/// |> close()
///
/// example = extrude(exampleSketch, length = 5)
/// |> fillet(
/// radius = 3,
/// tags = [getPreviousAdjacentEdge(referenceEdge)],
/// )
/// ```
#[stdlib {
name = "getPreviousAdjacentEdge",
}]
async fn inner_get_previous_adjacent_edge(
tag: TagIdentifier,
exec_state: &mut ExecState,
args: Args,
) -> Result<Uuid, KclError> {
if args.ctx.no_engine_commands().await {
return Ok(exec_state.next_uuid());
}
let face_id = args.get_adjacent_face_to_tag(exec_state, &tag, false).await?;
let id = exec_state.next_uuid();
let tagged_path = args.get_tag_engine_info(exec_state, &tag)?;
let resp = args
.send_modeling_cmd(
id,
ModelingCmd::from(mcmd::Solid3dGetPrevAdjacentEdge {
edge_id: tagged_path.id,
object_id: tagged_path.sketch,
face_id,
}),
)
.await?;
let OkWebSocketResponseData::Modeling {
modeling_response: OkModelingCmdResponse::Solid3dGetPrevAdjacentEdge(adjacent_edge),
} = &resp
else {
return Err(KclError::Engine(KclErrorDetails {
message: format!(
"mcmd::Solid3dGetPrevAdjacentEdge response was not as expected: {:?}",
resp
),
source_ranges: vec![args.source_range],
}));
};
adjacent_edge.edge.ok_or_else(|| {
KclError::Type(KclErrorDetails {
message: format!("No edge found previous adjacent to tag: `{}`", tag.value),
source_ranges: vec![args.source_range],
})
})
}
pub(crate) fn default_tolerance(units: &UnitLength) -> f64 {
match units {
UnitLength::Mm => 0.0000001,
UnitLength::Cm => 0.0000001,
UnitLength::In => 0.0000001,
UnitLength::Ft => 0.0001,
UnitLength::Yd => 0.001,
UnitLength::M => 0.001,
}
}
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;

View File

@ -104,10 +104,10 @@ pub async fn sqrt(_exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
/// ```no_run /// ```no_run
/// exampleSketch = startSketchOn("XZ") /// exampleSketch = startSketchOn("XZ")
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = 50, /// angle = 50,
/// length = sqrt(2500), /// length = sqrt(2500),
/// }, %) /// )
/// |> yLine(endAbsolute = 0) /// |> yLine(endAbsolute = 0)
/// |> close() /// |> close()
/// ///
@ -137,15 +137,15 @@ pub async fn abs(_exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
/// sketch001 = startSketchOn('XZ') /// sketch001 = startSketchOn('XZ')
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> line(end = [8, 0]) /// |> line(end = [8, 0])
/// |> angledLine({ /// |> angledLine(
/// angle = abs(myAngle), /// angle = abs(myAngle),
/// length = 5, /// length = 5,
/// }, %) /// )
/// |> line(end = [-5, 0]) /// |> line(end = [-5, 0])
/// |> angledLine({ /// |> angledLine(
/// angle = myAngle, /// angle = myAngle,
/// length = 5, /// length = 5,
/// }, %) /// )
/// |> close() /// |> close()
/// ///
/// baseExtrusion = extrude(sketch001, length = 5) /// baseExtrusion = extrude(sketch001, length = 5)
@ -255,10 +255,10 @@ pub async fn min(_exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
/// ```no_run /// ```no_run
/// exampleSketch = startSketchOn("XZ") /// exampleSketch = startSketchOn("XZ")
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = 70, /// angle = 70,
/// length = min(15, 31, 4, 13, 22) /// length = min(15, 31, 4, 13, 22)
/// }, %) /// )
/// |> line(end = [20, 0]) /// |> line(end = [20, 0])
/// |> close() /// |> close()
/// ///
@ -292,10 +292,10 @@ pub async fn max(_exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
/// ```no_run /// ```no_run
/// exampleSketch = startSketchOn("XZ") /// exampleSketch = startSketchOn("XZ")
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = 70, /// angle = 70,
/// length = max(15, 31, 4, 13, 22) /// length = max(15, 31, 4, 13, 22)
/// }, %) /// )
/// |> line(end = [20, 0]) /// |> line(end = [20, 0])
/// |> close() /// |> close()
/// ///
@ -343,10 +343,10 @@ pub async fn pow(_exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
/// ```no_run /// ```no_run
/// exampleSketch = startSketchOn("XZ") /// exampleSketch = startSketchOn("XZ")
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = 50, /// angle = 50,
/// length = pow(5, 2), /// length = pow(5, 2),
/// }, %) /// )
/// |> yLine(endAbsolute = 0) /// |> yLine(endAbsolute = 0)
/// |> close() /// |> close()
/// ///
@ -373,10 +373,10 @@ pub async fn acos(_exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
/// ```no_run /// ```no_run
/// sketch001 = startSketchOn('XZ') /// sketch001 = startSketchOn('XZ')
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = toDegrees(acos(0.5)), /// angle = toDegrees(acos(0.5)),
/// length = 10, /// length = 10,
/// }, %) /// )
/// |> line(end = [5, 0]) /// |> line(end = [5, 0])
/// |> line(endAbsolute = [12, 0]) /// |> line(endAbsolute = [12, 0])
/// |> close() /// |> close()
@ -404,10 +404,10 @@ pub async fn asin(_exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
/// ```no_run /// ```no_run
/// sketch001 = startSketchOn('XZ') /// sketch001 = startSketchOn('XZ')
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = toDegrees(asin(0.5)), /// angle = toDegrees(asin(0.5)),
/// length = 20, /// length = 20,
/// }, %) /// )
/// |> yLine(endAbsolute = 0) /// |> yLine(endAbsolute = 0)
/// |> close() /// |> close()
/// ///
@ -434,10 +434,10 @@ pub async fn atan(_exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
/// ```no_run /// ```no_run
/// sketch001 = startSketchOn('XZ') /// sketch001 = startSketchOn('XZ')
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = toDegrees(atan(1.25)), /// angle = toDegrees(atan(1.25)),
/// length = 20, /// length = 20,
/// }, %) /// )
/// |> yLine(endAbsolute = 0) /// |> yLine(endAbsolute = 0)
/// |> close() /// |> close()
/// ///
@ -464,10 +464,10 @@ pub async fn atan2(_exec_state: &mut ExecState, args: Args) -> Result<KclValue,
/// ```no_run /// ```no_run
/// sketch001 = startSketchOn('XZ') /// sketch001 = startSketchOn('XZ')
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = toDegrees(atan2(1.25, 2)), /// angle = toDegrees(atan2(1.25, 2)),
/// length = 20, /// length = 20,
/// }, %) /// )
/// |> yLine(endAbsolute = 0) /// |> yLine(endAbsolute = 0)
/// |> close() /// |> close()
/// ///
@ -628,10 +628,10 @@ pub async fn e(_exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclE
/// ```no_run /// ```no_run
/// exampleSketch = startSketchOn("XZ") /// exampleSketch = startSketchOn("XZ")
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = 30, /// angle = 30,
/// length = 2 * e() ^ 2, /// length = 2 * e() ^ 2,
/// }, %) /// )
/// |> yLine(endAbsolute = 0) /// |> yLine(endAbsolute = 0)
/// |> close() /// |> close()
/// ///
@ -660,10 +660,10 @@ pub async fn tau(_exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
/// ```no_run /// ```no_run
/// exampleSketch = startSketchOn("XZ") /// exampleSketch = startSketchOn("XZ")
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = 50, /// angle = 50,
/// length = 10 * tau(), /// length = 10 * tau(),
/// }, %) /// )
/// |> yLine(endAbsolute = 0) /// |> yLine(endAbsolute = 0)
/// |> close() /// |> close()
/// ///
@ -691,10 +691,10 @@ pub async fn to_radians(_exec_state: &mut ExecState, args: Args) -> Result<KclVa
/// ```no_run /// ```no_run
/// exampleSketch = startSketchOn("XZ") /// exampleSketch = startSketchOn("XZ")
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = 50, /// angle = 50,
/// length = 70 * cos(toRadians(45)), /// length = 70 * cos(toRadians(45)),
/// }, %) /// )
/// |> yLine(endAbsolute = 0) /// |> yLine(endAbsolute = 0)
/// |> close() /// |> close()
/// ///
@ -721,10 +721,10 @@ pub async fn to_degrees(_exec_state: &mut ExecState, args: Args) -> Result<KclVa
/// ```no_run /// ```no_run
/// exampleSketch = startSketchOn("XZ") /// exampleSketch = startSketchOn("XZ")
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = 50, /// angle = 50,
/// length = 70 * cos(toDegrees(pi()/4)), /// length = 70 * cos(toDegrees(pi()/4)),
/// }, %) /// )
/// |> yLine(endAbsolute = 0) /// |> yLine(endAbsolute = 0)
/// |> close() /// |> close()
/// ///

View File

@ -388,18 +388,19 @@ pub async fn segment_length(exec_state: &mut ExecState, args: Args) -> Result<Kc
/// ```no_run /// ```no_run
/// exampleSketch = startSketchOn("XZ") /// exampleSketch = startSketchOn("XZ")
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = 60, /// angle = 60,
/// length = 10, /// length = 10,
/// }, %, $thing) /// tag = $thing,
/// )
/// |> tangentialArc({ /// |> tangentialArc({
/// offset = -120, /// offset = -120,
/// radius = 5, /// radius = 5,
/// }, %) /// }, %)
/// |> angledLine({ /// |> angledLine(
/// angle = -60, /// angle = -60,
/// length = segLen(thing), /// length = segLen(thing),
/// }, %) /// )
/// |> close() /// |> close()
/// ///
/// example = extrude(exampleSketch, length = 5) /// example = extrude(exampleSketch, length = 5)
@ -442,9 +443,9 @@ pub async fn segment_angle(exec_state: &mut ExecState, args: Args) -> Result<Kcl
/// |> line(end = [10, 0]) /// |> line(end = [10, 0])
/// |> line(end = [5, 10], tag = $seg01) /// |> line(end = [5, 10], tag = $seg01)
/// |> line(end = [-10, 0]) /// |> line(end = [-10, 0])
/// |> angledLine([segAng(seg01), 10], %) /// |> angledLine(angle = segAng(seg01), length = 10)
/// |> line(end = [-10, 0]) /// |> line(end = [-10, 0])
/// |> angledLine([segAng(seg01), -15], %) /// |> angledLine(angle = segAng(seg01), length = -15)
/// |> close() /// |> close()
/// ///
/// example = extrude(exampleSketch, length = 4) /// example = extrude(exampleSketch, length = 4)
@ -487,10 +488,10 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> line(end = [20, 0]) /// |> line(end = [20, 0])
/// |> tangentialArcToRelative([0, 10], %, $arc1) /// |> tangentialArcToRelative([0, 10], %, $arc1)
/// |> angledLine({ /// |> angledLine(
/// angle: tangentToEnd(arc1), /// angle = tangentToEnd(arc1),
/// length: 20, /// length = 20,
/// }, %) /// )
/// |> tangentialArcToRelative([0, -10], %) /// |> tangentialArcToRelative([0, -10], %)
/// |> close() /// |> close()
/// ///
@ -503,10 +504,10 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> line(end = [0, 20]) /// |> line(end = [0, 20])
/// |> tangentialArcTo([10, 20], %, $arc1) /// |> tangentialArcTo([10, 20], %, $arc1)
/// |> angledLine({ /// |> angledLine(
/// angle: tangentToEnd(arc1), /// angle = tangentToEnd(arc1),
/// length: 20, /// length = 20,
/// }, %) /// )
/// |> tangentialArcToRelative([-10, 0], %) /// |> tangentialArcToRelative([-10, 0], %)
/// |> close() /// |> close()
/// ///
@ -517,10 +518,10 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
/// rectangleSketch = startSketchOn('XZ') /// rectangleSketch = startSketchOn('XZ')
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> line(end = [10, 0], tag = $seg1) /// |> line(end = [10, 0], tag = $seg1)
/// |> angledLine({ /// |> angledLine(
/// angle: tangentToEnd(seg1), /// angle = tangentToEnd(seg1),
/// length: 10, /// length = 10,
/// }, %) /// )
/// |> line(end = [0, 10]) /// |> line(end = [0, 10])
/// |> line(end = [-20, 0]) /// |> line(end = [-20, 0])
/// |> close() /// |> close()
@ -535,7 +536,7 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
/// end: [10, 10], /// end: [10, 10],
/// interior: [5, 1] /// interior: [5, 1]
/// }, %, $arc1) /// }, %, $arc1)
/// |> angledLine([tangentToEnd(arc1), 20], %) /// |> angledLine(angle = tangentToEnd(arc1), length = 20)
/// |> close() /// |> close()
/// ``` /// ```
/// ///
@ -545,7 +546,7 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
/// ///
/// triangleSketch = startSketchOn("XY") /// triangleSketch = startSketchOn("XY")
/// |> startProfileAt([-5, 0], %) /// |> startProfileAt([-5, 0], %)
/// |> angledLine([tangentToEnd(circ), 10], %) /// |> angledLine(angle = tangentToEnd(circ), length = 10)
/// |> line(end = [-15, 0]) /// |> line(end = [-15, 0])
/// |> close() /// |> close()
/// ``` /// ```
@ -595,10 +596,10 @@ pub async fn angle_to_match_length_x(exec_state: &mut ExecState, args: Args) ->
/// sketch001 = startSketchOn('XZ') /// sketch001 = startSketchOn('XZ')
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> line(end = [2, 5], tag = $seg01) /// |> line(end = [2, 5], tag = $seg01)
/// |> angledLineToX([ /// |> angledLine(
/// -angleToMatchLengthX(seg01, 7, %), /// angle = -angleToMatchLengthX(seg01, 7, %),
/// 10 /// endAbsoluteX = 10,
/// ], %) /// )
/// |> close() /// |> close()
/// ///
/// extrusion = extrude(sketch001, length = 5) /// extrusion = extrude(sketch001, length = 5)
@ -658,10 +659,10 @@ pub async fn angle_to_match_length_y(exec_state: &mut ExecState, args: Args) ->
/// sketch001 = startSketchOn('XZ') /// sketch001 = startSketchOn('XZ')
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> line(end = [1, 2], tag = $seg01) /// |> line(end = [1, 2], tag = $seg01)
/// |> angledLine({ /// |> angledLine(
/// angle = angleToMatchLengthY(seg01, 15, %), /// angle = angleToMatchLengthY(seg01, 15, %),
/// length = 5, /// length = 5,
/// }, %) /// )
/// |> yLine(endAbsolute = 0) /// |> yLine(endAbsolute = 0)
/// |> close() /// |> close()
/// ///

View File

@ -283,16 +283,16 @@ pub async fn x_line(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
/// exampleSketch = startSketchOn(XZ) /// exampleSketch = startSketchOn(XZ)
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> xLine(length = 15) /// |> xLine(length = 15)
/// |> angledLine({ /// |> angledLine(
/// angle = 80, /// angle = 80,
/// length = 15, /// length = 15,
/// }, %) /// )
/// |> line(end = [8, -10]) /// |> line(end = [8, -10])
/// |> xLine(length = 10) /// |> xLine(length = 10)
/// |> angledLine({ /// |> angledLine(
/// angle = 120, /// angle = 120,
/// length = 30, /// length = 30,
/// }, %) /// )
/// |> xLine(length = -15) /// |> xLine(length = -15)
/// |> close() /// |> close()
/// ///
@ -352,10 +352,10 @@ pub async fn y_line(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
/// exampleSketch = startSketchOn(XZ) /// exampleSketch = startSketchOn(XZ)
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> yLine(length = 15) /// |> yLine(length = 15)
/// |> angledLine({ /// |> angledLine(
/// angle = 30, /// angle = 30,
/// length = 15, /// length = 15,
/// }, %) /// )
/// |> line(end = [8, -10]) /// |> line(end = [8, -10])
/// |> yLine(length = -5) /// |> yLine(length = -5)
/// |> close() /// |> close()
@ -432,10 +432,10 @@ pub async fn angled_line(exec_state: &mut ExecState, args: Args) -> Result<KclVa
/// exampleSketch = startSketchOn(XZ) /// exampleSketch = startSketchOn(XZ)
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> yLine(endAbsolute = 15) /// |> yLine(endAbsolute = 15)
/// |> angledLine({ /// |> angledLine(
/// angle = 30, /// angle = 30,
/// length = 15, /// length = 15,
/// }, %) /// )
/// |> line(end = [8, -10]) /// |> line(end = [8, -10])
/// |> yLine(endAbsolute = 0) /// |> yLine(endAbsolute = 0)
/// |> close() /// |> close()
@ -1320,9 +1320,9 @@ pub async fn profile_start_x(exec_state: &mut ExecState, args: Args) -> Result<K
/// ```no_run /// ```no_run
/// sketch001 = startSketchOn(XY) /// sketch001 = startSketchOn(XY)
/// |> startProfileAt([5, 2], %) /// |> startProfileAt([5, 2], %)
/// |> angledLine([-26.6, 50], %) /// |> angledLine(angle = -26.6, length = 50)
/// |> angledLine([90, 50], %) /// |> angledLine(angle = 90, length = 50)
/// |> angledLineToX({ angle = 30, to = profileStartX(%) }, %) /// |> angledLine(angle = 30, endAbsoluteX = profileStartX(%))
/// ``` /// ```
#[stdlib { #[stdlib {
name = "profileStartX" name = "profileStartX"
@ -1345,8 +1345,8 @@ pub async fn profile_start_y(exec_state: &mut ExecState, args: Args) -> Result<K
/// ```no_run /// ```no_run
/// sketch001 = startSketchOn(XY) /// sketch001 = startSketchOn(XY)
/// |> startProfileAt([5, 2], %) /// |> startProfileAt([5, 2], %)
/// |> angledLine({ angle = -60, length = 14 }, %) /// |> angledLine(angle = -60, length = 14 )
/// |> angledLineToY({ angle = 30, to = profileStartY(%) }, %) /// |> angledLine(angle = 30, endAbsoluteY = profileStartY(%))
/// ``` /// ```
#[stdlib { #[stdlib {
name = "profileStartY" name = "profileStartY"
@ -1369,8 +1369,8 @@ pub async fn profile_start(exec_state: &mut ExecState, args: Args) -> Result<Kcl
/// ```no_run /// ```no_run
/// sketch001 = startSketchOn(XY) /// sketch001 = startSketchOn(XY)
/// |> startProfileAt([5, 2], %) /// |> startProfileAt([5, 2], %)
/// |> angledLine({ angle = 120, length = 50 }, %, $seg01) /// |> angledLine(angle = 120, length = 50 , tag = $seg01)
/// |> angledLine({ angle = segAng(seg01) + 120, length = 50 }, %) /// |> angledLine(angle = segAng(seg01) + 120, length = 50 )
/// |> line(end = profileStart(%)) /// |> line(end = profileStart(%))
/// |> close() /// |> close()
/// |> extrude(length = 20) /// |> extrude(length = 20)
@ -1739,15 +1739,15 @@ pub async fn tangential_arc(exec_state: &mut ExecState, args: Args) -> Result<Kc
/// ```no_run /// ```no_run
/// exampleSketch = startSketchOn(XZ) /// exampleSketch = startSketchOn(XZ)
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = 60, /// angle = 60,
/// length = 10, /// length = 10,
/// }, %) /// )
/// |> tangentialArc({ radius = 10, offset = -120 }, %) /// |> tangentialArc({ radius = 10, offset = -120 }, %)
/// |> angledLine({ /// |> angledLine(
/// angle = -60, /// angle = -60,
/// length = 10, /// length = 10,
/// }, %) /// )
/// |> close() /// |> close()
/// ///
/// example = extrude(exampleSketch, length = 10) /// example = extrude(exampleSketch, length = 10)
@ -1873,10 +1873,10 @@ pub async fn tangential_arc_to_relative(exec_state: &mut ExecState, args: Args)
/// ```no_run /// ```no_run
/// exampleSketch = startSketchOn(XZ) /// exampleSketch = startSketchOn(XZ)
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = 60, /// angle = 60,
/// length = 10, /// length = 10,
/// }, %) /// )
/// |> tangentialArcTo([15, 15], %) /// |> tangentialArcTo([15, 15], %)
/// |> line(end = [10, -15]) /// |> line(end = [10, -15])
/// |> close() /// |> close()
@ -1940,10 +1940,10 @@ async fn inner_tangential_arc_to(
/// ```no_run /// ```no_run
/// exampleSketch = startSketchOn(XZ) /// exampleSketch = startSketchOn(XZ)
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = 45, /// angle = 45,
/// length = 10, /// length = 10,
/// }, %) /// )
/// |> tangentialArcToRelative([0, -10], %) /// |> tangentialArcToRelative([0, -10], %)
/// |> line(end = [-10, 0]) /// |> line(end = [-10, 0])
/// |> close() /// |> close()

View File

@ -105,20 +105,20 @@ pub async fn sweep(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
/// |> sweep(path = helixPath) /// |> sweep(path = helixPath)
/// ``` /// ```
/// ///
/// ``` /// ```no_run
/// // Sweep two sketches along the same path. /// // Sweep two sketches along the same path.
/// ///
/// sketch001 = startSketchOn('XY') /// sketch001 = startSketchOn('XY')
/// rectangleSketch = startProfileAt([-200, 23.86], sketch001) /// rectangleSketch = startProfileAt([-200, 23.86], sketch001)
/// |> angledLine([0, 73.47], %, $rectangleSegmentA001) /// |> angledLine(angle = 0, length = 73.47, tag = $rectangleSegmentA001)
/// |> angledLine([ /// |> angledLine(
/// segAng(rectangleSegmentA001) - 90, /// angle = segAng(rectangleSegmentA001) - 90,
/// 50.61 /// length = 50.61,
/// ], %) /// )
/// |> angledLine([ /// |> angledLine(
/// segAng(rectangleSegmentA001), /// angle = segAng(rectangleSegmentA001),
/// -segLen(rectangleSegmentA001) /// length = -segLen(rectangleSegmentA001),
/// ], %) /// )
/// |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) /// |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
/// |> close() /// |> close()
/// ///

View File

@ -113,15 +113,15 @@ pub async fn scale(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
/// ///
/// sketch001 = startSketchOn('XY') /// sketch001 = startSketchOn('XY')
/// rectangleSketch = startProfileAt([-200, 23.86], sketch001) /// rectangleSketch = startProfileAt([-200, 23.86], sketch001)
/// |> angledLine([0, 73.47], %, $rectangleSegmentA001) /// |> angledLine(angle = 0, length = 73.47, tag = $rectangleSegmentA001)
/// |> angledLine([ /// |> angledLine(
/// segAng(rectangleSegmentA001) - 90, /// angle = segAng(rectangleSegmentA001) - 90,
/// 50.61 /// length = 50.61,
/// ], %) /// )
/// |> angledLine([ /// |> angledLine(
/// segAng(rectangleSegmentA001), /// angle = segAng(rectangleSegmentA001),
/// -segLen(rectangleSegmentA001) /// length = -segLen(rectangleSegmentA001),
/// ], %) /// )
/// |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) /// |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
/// |> close() /// |> close()
/// ///
@ -291,15 +291,15 @@ pub async fn translate(exec_state: &mut ExecState, args: Args) -> Result<KclValu
/// ///
/// sketch001 = startSketchOn('XY') /// sketch001 = startSketchOn('XY')
/// rectangleSketch = startProfileAt([-200, 23.86], sketch001) /// rectangleSketch = startProfileAt([-200, 23.86], sketch001)
/// |> angledLine([0, 73.47], %, $rectangleSegmentA001) /// |> angledLine(angle = 0, length = 73.47, tag = $rectangleSegmentA001)
/// |> angledLine([ /// |> angledLine(
/// segAng(rectangleSegmentA001) - 90, /// angle = segAng(rectangleSegmentA001) - 90,
/// 50.61 /// length = 50.61,
/// ], %) /// )
/// |> angledLine([ /// |> angledLine(
/// segAng(rectangleSegmentA001), /// angle = segAng(rectangleSegmentA001),
/// -segLen(rectangleSegmentA001) /// length = -segLen(rectangleSegmentA001),
/// ], %) /// )
/// |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) /// |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
/// |> close() /// |> close()
/// ///
@ -689,15 +689,15 @@ pub async fn rotate(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
/// ///
/// sketch001 = startSketchOn('XY') /// sketch001 = startSketchOn('XY')
/// rectangleSketch = startProfileAt([-200, 23.86], sketch001) /// rectangleSketch = startProfileAt([-200, 23.86], sketch001)
/// |> angledLine([0, 73.47], %, $rectangleSegmentA001) /// |> angledLine(angle = 0, length = 73.47, tag = $rectangleSegmentA001)
/// |> angledLine([ /// |> angledLine(
/// segAng(rectangleSegmentA001) - 90, /// angle = segAng(rectangleSegmentA001) - 90,
/// 50.61 /// length = 50.61,
/// ], %) /// )
/// |> angledLine([ /// |> angledLine(
/// segAng(rectangleSegmentA001), /// angle = segAng(rectangleSegmentA001),
/// -segLen(rectangleSegmentA001) /// length = -segLen(rectangleSegmentA001),
/// ], %) /// )
/// |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) /// |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
/// |> close() /// |> close()
/// ///

View File

@ -18,10 +18,10 @@ export PI = 3.14159265358979323846264338327950288_
/// ``` /// ```
/// exampleSketch = startSketchOn(XZ) /// exampleSketch = startSketchOn(XZ)
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = 30, /// angle = 30,
/// length = 2 * E ^ 2, /// length = 2 * E ^ 2,
/// }, %) /// )
/// |> yLine(endAbsolute = 0) /// |> yLine(endAbsolute = 0)
/// |> close() /// |> close()
/// ///
@ -34,10 +34,10 @@ export E = 2.71828182845904523536028747135266250_
/// ``` /// ```
/// exampleSketch = startSketchOn(XZ) /// exampleSketch = startSketchOn(XZ)
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = 50, /// angle = 50,
/// length = 10 * TAU, /// length = 10 * TAU,
/// }, %) /// )
/// |> yLine(endAbsolute = 0) /// |> yLine(endAbsolute = 0)
/// |> close() /// |> close()
/// ///
@ -50,10 +50,10 @@ export TAU = 6.28318530717958647692528676655900577_
/// ``` /// ```
/// exampleSketch = startSketchOn(XZ) /// exampleSketch = startSketchOn(XZ)
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = 30, /// angle = 30,
/// length = 3 / cos(toRadians(30)), /// length = 3 / cos(toRadians(30)),
/// }, %) /// )
/// |> yLine(endAbsolute = 0) /// |> yLine(endAbsolute = 0)
/// |> close() /// |> close()
/// ///
@ -67,10 +67,10 @@ export fn cos(@num: number(rad)): number(_) {}
/// ``` /// ```
/// exampleSketch = startSketchOn(XZ) /// exampleSketch = startSketchOn(XZ)
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = 50, /// angle = 50,
/// length = 15 / sin(toDegrees(135)), /// length = 15 / sin(toDegrees(135)),
/// }, %) /// )
/// |> yLine(endAbsolute = 0) /// |> yLine(endAbsolute = 0)
/// |> close() /// |> close()
/// ///
@ -84,10 +84,10 @@ export fn sin(@num: number(rad)): number(_) {}
/// ``` /// ```
/// exampleSketch = startSketchOn(XZ) /// exampleSketch = startSketchOn(XZ)
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> angledLine({ /// |> angledLine(
/// angle = 50, /// angle = 50,
/// length = 50 * tan(1/2), /// length = 50 * tan(1/2),
/// }, %) /// )
/// |> yLine(endAbsolute = 0) /// |> yLine(endAbsolute = 0)
/// |> close() /// |> close()
/// ///

View File

@ -42,15 +42,17 @@ export type string
/// ```norun,inline /// ```norun,inline
/// startSketchOn('XZ') /// startSketchOn('XZ')
/// |> startProfileAt(origin, %) /// |> startProfileAt(origin, %)
/// |> angledLine({angle = 0, length = 191.26}, %, $rectangleSegmentA001) /// |> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001)
/// |> angledLine({ /// |> angledLine(
/// angle = segAng(rectangleSegmentA001) - 90, /// angle = segAng(rectangleSegmentA001) - 90,
/// length = 196.99, /// length = 196.99,
/// }, %, $rectangleSegmentB001) /// tag = $rectangleSegmentB001,
/// |> angledLine({ /// )
/// |> angledLine(
/// angle = segAng(rectangleSegmentA001), /// angle = segAng(rectangleSegmentA001),
/// length = -segLen(rectangleSegmentA001), /// length = -segLen(rectangleSegmentA001),
/// }, %, $rectangleSegmentC001) /// tag = $rectangleSegmentC001,
/// )
/// |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) /// |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
/// |> close() /// |> close()
/// ``` /// ```
@ -74,15 +76,16 @@ export type string
/// fn rect(origin) { /// fn rect(origin) {
/// return startSketchOn('XZ') /// return startSketchOn('XZ')
/// |> startProfileAt(origin, %) /// |> startProfileAt(origin, %)
/// |> angledLine({angle = 0, length = 191.26}, %, $rectangleSegmentA001) /// |> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001)
/// |> angledLine({ /// |> angledLine(
/// angle = segAng(rectangleSegmentA001) - 90, /// angle = segAng(rectangleSegmentA001) - 90,
/// length = 196.99 /// length = 196.99,
/// }, %, $rectangleSegmentB001) /// tag = $rectangleSegmentB001)
/// |> angledLine({ /// |> angledLine(
/// angle = segAng(rectangleSegmentA001), /// angle = segAng(rectangleSegmentA001),
/// length = -segLen(rectangleSegmentA001) /// length = -segLen(rectangleSegmentA001),
/// }, %, $rectangleSegmentC001) /// tag = $rectangleSegmentC001
/// )
/// |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) /// |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
/// |> close() /// |> close()
/// } /// }
@ -102,15 +105,15 @@ export type string
/// fn rect(origin) { /// fn rect(origin) {
/// return startSketchOn('XZ') /// return startSketchOn('XZ')
/// |> startProfileAt(origin, %) /// |> startProfileAt(origin, %)
/// |> angledLine({angle = 0, length = 191.26}, %, $rectangleSegmentA001) /// |> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001)
/// |> angledLine({ /// |> angledLine(
/// angle = segAng(rectangleSegmentA001) - 90, /// angle = segAng(rectangleSegmentA001) - 90,
/// length = 196.99 /// length = 196.99
/// }, %, $rectangleSegmentB001) /// , %, $rectangleSegmentB001)
/// |> angledLine({ /// |> angledLine(
/// angle = segAng(rectangleSegmentA001), /// angle = segAng(rectangleSegmentA001),
/// length = -segLen(rectangleSegmentA001) /// length = -segLen(rectangleSegmentA001)
/// }, %, $rectangleSegmentC001) /// , %, $rectangleSegmentC001)
/// |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) /// |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
/// |> close() /// |> close()
/// } /// }

View File

@ -5,7 +5,11 @@ description: Artifact commands angled_line.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -13,7 +17,23 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
0,
0,
0
],
"command": {
"type": "set_scene_units",
"unit": "mm"
}
},
{
"cmdId": "[uuid]",
"range": [
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -22,7 +42,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -31,7 +55,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
10,
29,
0
],
"command": { "command": {
"type": "make_plane", "type": "make_plane",
"origin": { "origin": {
@ -56,7 +84,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
35,
67,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -72,14 +104,22 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
35,
67,
0
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
35,
67,
0
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -92,14 +132,22 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
35,
67,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
73,
97,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -116,7 +164,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
103,
142,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -133,7 +185,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
148,
174,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -150,7 +206,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
180,
229,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -167,7 +227,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
235,
262,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -184,7 +248,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
268,
275,
0
],
"command": { "command": {
"type": "close_path", "type": "close_path",
"path_id": "[uuid]" "path_id": "[uuid]"
@ -192,7 +260,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
281,
300,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -208,7 +280,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
281,
300,
0
],
"command": { "command": {
"type": "extrude", "type": "extrude",
"target": "[uuid]", "target": "[uuid]",
@ -218,14 +294,22 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
281,
300,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
281,
300,
0
],
"command": { "command": {
"type": "object_bring_to_front", "type": "object_bring_to_front",
"object_id": "[uuid]" "object_id": "[uuid]"
@ -233,7 +317,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
281,
300,
0
],
"command": { "command": {
"type": "solid3d_get_extrusion_face_info", "type": "solid3d_get_extrusion_face_info",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -242,7 +330,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
281,
300,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -252,7 +344,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
281,
300,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -262,7 +358,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
281,
300,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -272,7 +372,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
281,
300,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -282,7 +386,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
281,
300,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -292,7 +400,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
281,
300,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -302,7 +414,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
281,
300,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -312,7 +428,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
281,
300,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -322,7 +442,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
281,
300,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -332,7 +456,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
281,
300,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -342,7 +470,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
281,
300,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -352,7 +484,11 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
281,
300,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",

View File

@ -5,13 +5,13 @@ flowchart LR
3["Segment<br>[73, 97, 0]"] 3["Segment<br>[73, 97, 0]"]
4["Segment<br>[103, 142, 0]"] 4["Segment<br>[103, 142, 0]"]
5["Segment<br>[148, 174, 0]"] 5["Segment<br>[148, 174, 0]"]
6["Segment<br>[180, 217, 0]"] 6["Segment<br>[180, 229, 0]"]
7["Segment<br>[223, 250, 0]"] 7["Segment<br>[235, 262, 0]"]
8["Segment<br>[256, 264, 0]"] 8["Segment<br>[268, 275, 0]"]
9[Solid2d] 9[Solid2d]
end end
1["Plane<br>[10, 29, 0]"] 1["Plane<br>[10, 29, 0]"]
10["Sweep Extrusion<br>[270, 289, 0]"] 10["Sweep Extrusion<br>[281, 300, 0]"]
11[Wall] 11[Wall]
12[Wall] 12[Wall]
13[Wall] 13[Wall]

View File

@ -6,13 +6,10 @@ description: Result of parsing angled_line.kcl
"Ok": { "Ok": {
"body": [ "body": [
{ {
"commentStart": 0,
"declaration": { "declaration": {
"commentStart": 0, "end": 300,
"end": 0,
"id": { "id": {
"commentStart": 0, "end": 7,
"end": 0,
"name": "part001", "name": "part001",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
@ -22,46 +19,33 @@ description: Result of parsing angled_line.kcl
{ {
"arguments": [ "arguments": [
{ {
"commentStart": 24, "end": 28,
"end": 0,
"raw": "'XY'", "raw": "'XY'",
"start": 0, "start": 24,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "XY" "value": "XY"
} }
], ],
"callee": { "callee": {
"abs_path": false, "end": 23,
"commentStart": 10, "name": "startSketchOn",
"end": 0, "start": 10,
"name": { "type": "Identifier"
"commentStart": 10,
"end": 0,
"name": "startSketchOn",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
}, },
"commentStart": 10, "end": 29,
"end": 0, "start": 10,
"start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
{ {
"arguments": [ "arguments": [
{ {
"commentStart": 50,
"elements": [ "elements": [
{ {
"commentStart": 51, "end": 55,
"end": 0,
"raw": "4.83", "raw": "4.83",
"start": 0, "start": 51,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -70,10 +54,9 @@ description: Result of parsing angled_line.kcl
} }
}, },
{ {
"commentStart": 57, "end": 62,
"end": 0,
"raw": "12.56", "raw": "12.56",
"start": 0, "start": 57,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -82,37 +65,26 @@ description: Result of parsing angled_line.kcl
} }
} }
], ],
"end": 0, "end": 63,
"start": 0, "start": 50,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
{ {
"commentStart": 65, "end": 66,
"end": 0, "start": 65,
"start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
"type": "PipeSubstitution" "type": "PipeSubstitution"
} }
], ],
"callee": { "callee": {
"abs_path": false, "end": 49,
"commentStart": 35, "name": "startProfileAt",
"end": 0, "start": 35,
"name": { "type": "Identifier"
"commentStart": 35,
"end": 0,
"name": "startProfileAt",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
}, },
"commentStart": 35, "end": 67,
"end": 0, "start": 35,
"start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -121,20 +93,17 @@ description: Result of parsing angled_line.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 78, "end": 81,
"end": 0,
"name": "end", "name": "end",
"start": 0, "start": 78,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 84,
"elements": [ "elements": [
{ {
"commentStart": 85, "end": 89,
"end": 0,
"raw": "15.1", "raw": "15.1",
"start": 0, "start": 85,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -143,10 +112,9 @@ description: Result of parsing angled_line.kcl
} }
}, },
{ {
"commentStart": 91, "end": 95,
"end": 0,
"raw": "2.48", "raw": "2.48",
"start": 0, "start": 91,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -155,31 +123,21 @@ description: Result of parsing angled_line.kcl
} }
} }
], ],
"end": 0, "end": 96,
"start": 0, "start": 84,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
} }
], ],
"callee": { "callee": {
"abs_path": false, "end": 77,
"commentStart": 73, "name": "line",
"end": 0, "start": 73,
"name": { "type": "Identifier"
"commentStart": 73,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
}, },
"commentStart": 73, "end": 97,
"end": 0, "start": 73,
"start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -189,20 +147,17 @@ description: Result of parsing angled_line.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 108, "end": 111,
"end": 0,
"name": "end", "name": "end",
"start": 0, "start": 108,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 114,
"elements": [ "elements": [
{ {
"commentStart": 115, "end": 119,
"end": 0,
"raw": "3.15", "raw": "3.15",
"start": 0, "start": 115,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -212,10 +167,9 @@ description: Result of parsing angled_line.kcl
}, },
{ {
"argument": { "argument": {
"commentStart": 122, "end": 126,
"end": 0,
"raw": "9.85", "raw": "9.85",
"start": 0, "start": 122,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -223,16 +177,15 @@ description: Result of parsing angled_line.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"commentStart": 121, "end": 126,
"end": 0,
"operator": "-", "operator": "-",
"start": 0, "start": 121,
"type": "UnaryExpression", "type": "UnaryExpression",
"type": "UnaryExpression" "type": "UnaryExpression"
} }
], ],
"end": 0, "end": 127,
"start": 0, "start": 114,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
@ -240,16 +193,14 @@ description: Result of parsing angled_line.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 129, "end": 132,
"end": 0,
"name": "tag", "name": "tag",
"start": 0, "start": 129,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 135, "end": 141,
"end": 0, "start": 135,
"start": 0,
"type": "TagDeclarator", "type": "TagDeclarator",
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "seg01" "value": "seg01"
@ -257,23 +208,13 @@ description: Result of parsing angled_line.kcl
} }
], ],
"callee": { "callee": {
"abs_path": false, "end": 107,
"commentStart": 103, "name": "line",
"end": 0, "start": 103,
"name": { "type": "Identifier"
"commentStart": 103,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
}, },
"commentStart": 103, "end": 142,
"end": 0, "start": 103,
"start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -283,21 +224,18 @@ description: Result of parsing angled_line.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 153, "end": 156,
"end": 0,
"name": "end", "name": "end",
"start": 0, "start": 153,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 159,
"elements": [ "elements": [
{ {
"argument": { "argument": {
"commentStart": 161, "end": 166,
"end": 0,
"raw": "15.17", "raw": "15.17",
"start": 0, "start": 161,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -305,19 +243,17 @@ description: Result of parsing angled_line.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"commentStart": 160, "end": 166,
"end": 0,
"operator": "-", "operator": "-",
"start": 0, "start": 160,
"type": "UnaryExpression", "type": "UnaryExpression",
"type": "UnaryExpression" "type": "UnaryExpression"
}, },
{ {
"argument": { "argument": {
"commentStart": 169, "end": 172,
"end": 0,
"raw": "4.1", "raw": "4.1",
"start": 0, "start": 169,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -325,39 +261,28 @@ description: Result of parsing angled_line.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"commentStart": 168, "end": 172,
"end": 0,
"operator": "-", "operator": "-",
"start": 0, "start": 168,
"type": "UnaryExpression", "type": "UnaryExpression",
"type": "UnaryExpression" "type": "UnaryExpression"
} }
], ],
"end": 0, "end": 173,
"start": 0, "start": 159,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
} }
], ],
"callee": { "callee": {
"abs_path": false, "end": 152,
"commentStart": 148, "name": "line",
"end": 0, "start": 148,
"name": { "type": "Identifier"
"commentStart": 148,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
}, },
"commentStart": 148, "end": 174,
"end": 0, "start": 148,
"start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -365,115 +290,85 @@ description: Result of parsing angled_line.kcl
{ {
"arguments": [ "arguments": [
{ {
"commentStart": 191, "type": "LabeledArg",
"elements": [ "label": {
{ "end": 196,
"arguments": [ "name": "angle",
{ "start": 191,
"abs_path": false, "type": "Identifier"
"commentStart": 199, },
"end": 0, "arg": {
"name": { "arguments": [
"commentStart": 199, {
"end": 0, "end": 211,
"name": "seg01", "name": "seg01",
"start": 0, "start": 206,
"type": "Identifier" "type": "Identifier",
}, "type": "Identifier"
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
],
"callee": {
"abs_path": false,
"commentStart": 192,
"end": 0,
"name": {
"commentStart": 192,
"end": 0,
"name": "segAng",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 192,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"commentStart": 207,
"end": 0,
"raw": "12.35",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 12.35,
"suffix": "None"
} }
} ],
], "callee": {
"end": 0, "end": 205,
"start": 0, "name": "segAng",
"type": "ArrayExpression", "start": 199,
"type": "ArrayExpression" "type": "Identifier"
},
"end": 212,
"start": 199,
"type": "CallExpression",
"type": "CallExpression"
}
}, },
{ {
"commentStart": 215, "type": "LabeledArg",
"end": 0, "label": {
"start": 0, "end": 220,
"type": "PipeSubstitution", "name": "length",
"type": "PipeSubstitution" "start": 214,
"type": "Identifier"
},
"arg": {
"end": 228,
"raw": "12.35",
"start": 223,
"type": "Literal",
"type": "Literal",
"value": {
"value": 12.35,
"suffix": "None"
}
}
} }
], ],
"callee": { "callee": {
"abs_path": false, "end": 190,
"commentStart": 180, "name": "angledLine",
"end": 0, "start": 180,
"name": { "type": "Identifier"
"commentStart": 180,
"end": 0,
"name": "angledLine",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
}, },
"commentStart": 180, "end": 229,
"end": 0, "start": 180,
"start": 0, "type": "CallExpressionKw",
"type": "CallExpression", "type": "CallExpressionKw",
"type": "CallExpression" "unlabeled": null
}, },
{ {
"arguments": [ "arguments": [
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 228, "end": 243,
"end": 0,
"name": "end", "name": "end",
"start": 0, "start": 240,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 234,
"elements": [ "elements": [
{ {
"argument": { "argument": {
"commentStart": 236, "end": 253,
"end": 0,
"raw": "13.02", "raw": "13.02",
"start": 0, "start": 248,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -481,18 +376,16 @@ description: Result of parsing angled_line.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"commentStart": 235, "end": 253,
"end": 0,
"operator": "-", "operator": "-",
"start": 0, "start": 247,
"type": "UnaryExpression", "type": "UnaryExpression",
"type": "UnaryExpression" "type": "UnaryExpression"
}, },
{ {
"commentStart": 243, "end": 260,
"end": 0,
"raw": "10.03", "raw": "10.03",
"start": 0, "start": 255,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -501,63 +394,35 @@ description: Result of parsing angled_line.kcl
} }
} }
], ],
"end": 0, "end": 261,
"start": 0, "start": 246,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
} }
], ],
"callee": { "callee": {
"abs_path": false, "end": 239,
"commentStart": 223, "name": "line",
"end": 0, "start": 235,
"name": { "type": "Identifier"
"commentStart": 223,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
}, },
"commentStart": 223, "end": 262,
"end": 0, "start": 235,
"start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
}, },
{ {
"arguments": [ "arguments": [],
{
"commentStart": 262,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": { "callee": {
"abs_path": false, "end": 273,
"commentStart": 256, "name": "close",
"end": 0, "start": 268,
"name": { "type": "Identifier"
"commentStart": 256,
"end": 0,
"name": "close",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
}, },
"commentStart": 256, "end": 275,
"end": 0, "start": 268,
"start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -566,17 +431,15 @@ description: Result of parsing angled_line.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 278, "end": 295,
"end": 0,
"name": "length", "name": "length",
"start": 0, "start": 289,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 287, "end": 299,
"end": 0,
"raw": "4", "raw": "4",
"start": 0, "start": 298,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -587,46 +450,34 @@ description: Result of parsing angled_line.kcl
} }
], ],
"callee": { "callee": {
"abs_path": false, "end": 288,
"commentStart": 270, "name": "extrude",
"end": 0, "start": 281,
"name": { "type": "Identifier"
"commentStart": 270,
"end": 0,
"name": "extrude",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
}, },
"commentStart": 270, "end": 300,
"end": 0, "start": 281,
"start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
} }
], ],
"commentStart": 10, "end": 300,
"end": 0, "start": 10,
"start": 0,
"type": "PipeExpression", "type": "PipeExpression",
"type": "PipeExpression" "type": "PipeExpression"
}, },
"start": 0, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 0, "end": 300,
"kind": "const", "kind": "const",
"start": 0, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
} }
], ],
"commentStart": 0, "end": 301,
"end": 0,
"start": 0 "start": 0
} }
} }

View File

@ -3,7 +3,7 @@ part001 = startSketchOn('XY')
|> line(end = [15.1, 2.48]) |> line(end = [15.1, 2.48])
|> line(end = [3.15, -9.85], tag = $seg01) |> line(end = [3.15, -9.85], tag = $seg01)
|> line(end = [-15.17, -4.1]) |> line(end = [-15.17, -4.1])
|> angledLine([segAng(seg01), 12.35], %) |> angledLine(angle = segAng(seg01), length = 12.35)
|> line(end = [-13.02, 10.03]) |> line(end = [-13.02, 10.03])
|> close(%) |> close()
|> extrude(length = 4) |> extrude(length = 4)

View File

@ -10,11 +10,19 @@ description: Operations executed angled_line.kcl
"type": "String", "type": "String",
"value": "XY" "value": "XY"
}, },
"sourceRange": [] "sourceRange": [
24,
28,
0
]
} }
}, },
"name": "startSketchOn", "name": "startSketchOn",
"sourceRange": [], "sourceRange": [
10,
29,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": null "unlabeledArg": null
}, },
@ -34,11 +42,19 @@ description: Operations executed angled_line.kcl
} }
} }
}, },
"sourceRange": [] "sourceRange": [
298,
299,
0
]
} }
}, },
"name": "extrude", "name": "extrude",
"sourceRange": [], "sourceRange": [
281,
300,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
@ -47,7 +63,11 @@ description: Operations executed angled_line.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [] "sourceRange": [
281,
300,
0
]
} }
} }
] ]

View File

@ -13,16 +13,23 @@ description: Variables in memory after executing angled_line.kcl
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [], "sourceRange": [
73,
97,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
}, },
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [], "sourceRange": [
103,
142,
0
],
"tag": { "tag": {
"commentStart": 135,
"end": 141, "end": 141,
"start": 135, "start": 135,
"type": "TagDeclarator", "type": "TagDeclarator",
@ -33,28 +40,44 @@ description: Variables in memory after executing angled_line.kcl
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [], "sourceRange": [
148,
174,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
}, },
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [], "sourceRange": [
180,
229,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
}, },
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [], "sourceRange": [
235,
262,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
}, },
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [], "sourceRange": [
268,
275,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
} }
@ -66,7 +89,11 @@ description: Variables in memory after executing angled_line.kcl
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [] "sourceRange": [
73,
97,
0
]
}, },
"from": [ "from": [
4.83, 4.83,
@ -85,14 +112,17 @@ description: Variables in memory after executing angled_line.kcl
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [] "sourceRange": [
103,
142,
0
]
}, },
"from": [ "from": [
19.93, 19.93,
15.04 15.04
], ],
"tag": { "tag": {
"commentStart": 135,
"end": 141, "end": 141,
"start": 135, "start": 135,
"type": "TagDeclarator", "type": "TagDeclarator",
@ -110,7 +140,11 @@ description: Variables in memory after executing angled_line.kcl
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [] "sourceRange": [
148,
174,
0
]
}, },
"from": [ "from": [
23.08, 23.08,
@ -129,7 +163,11 @@ description: Variables in memory after executing angled_line.kcl
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [] "sourceRange": [
180,
229,
0
]
}, },
"from": [ "from": [
7.91, 7.91,
@ -148,7 +186,11 @@ description: Variables in memory after executing angled_line.kcl
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [] "sourceRange": [
235,
262,
0
]
}, },
"from": [ "from": [
11.6718, 11.6718,
@ -167,7 +209,11 @@ description: Variables in memory after executing angled_line.kcl
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [] "sourceRange": [
268,
275,
0
]
}, },
"from": [ "from": [
-1.3482, -1.3482,
@ -228,7 +274,11 @@ description: Variables in memory after executing angled_line.kcl
"tag": null, "tag": null,
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [] "sourceRange": [
35,
67,
0
]
} }
}, },
"tags": { "tags": {

View File

@ -5,7 +5,11 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -13,7 +17,23 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
0,
0,
0
],
"command": {
"type": "set_scene_units",
"unit": "mm"
}
},
{
"cmdId": "[uuid]",
"range": [
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -22,7 +42,11 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -31,7 +55,11 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
12,
31,
0
],
"command": { "command": {
"type": "make_plane", "type": "make_plane",
"origin": { "origin": {
@ -56,7 +84,11 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
37,
65,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -72,14 +104,22 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
37,
65,
0
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
37,
65,
0
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -92,14 +132,22 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
37,
65,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
71,
139,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -116,7 +164,11 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
145,
242,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -133,7 +185,11 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
248,
365,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -150,7 +206,11 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
371,
427,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -167,7 +227,11 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
433,
440,
0
],
"command": { "command": {
"type": "close_path", "type": "close_path",
"path_id": "[uuid]" "path_id": "[uuid]"
@ -175,7 +239,11 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
453,
473,
0
],
"command": { "command": {
"type": "make_plane", "type": "make_plane",
"origin": { "origin": {
@ -200,7 +268,11 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
479,
508,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -216,14 +288,22 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
479,
508,
0
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
479,
508,
0
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -236,14 +316,22 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
479,
508,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
514,
539,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -260,7 +348,11 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
545,
571,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -277,7 +369,11 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [
577,
609,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",

Some files were not shown because too many files have changed in this diff Show More