Skip to content

Commit

Permalink
tag as top level part 2 (#2773)
Browse files Browse the repository at this point in the history
* updates

Signed-off-by: Jess Frazelle <[email protected]>

* A snapshot a day keeps the bugs away! πŸ“·πŸ› (OS: ubuntu)

* updates

Signed-off-by: Jess Frazelle <[email protected]>

* fmt

Signed-off-by: Jess Frazelle <[email protected]>

* updates

Signed-off-by: Jess Frazelle <[email protected]>

* unit tests pass

Signed-off-by: Jess Frazelle <[email protected]>

* playwright

Signed-off-by: Jess Frazelle <[email protected]>

* updates

Signed-off-by: Jess Frazelle <[email protected]>

* format

Signed-off-by: Jess Frazelle <[email protected]>

* format

Signed-off-by: Jess Frazelle <[email protected]>

* updates

Signed-off-by: Jess Frazelle <[email protected]>

* more literals gone

Signed-off-by: Jess Frazelle <[email protected]>

* updates

Signed-off-by: Jess Frazelle <[email protected]>

* fixes

Signed-off-by: Jess Frazelle <[email protected]>

* remove console log

Signed-off-by: Jess Frazelle <[email protected]>

* fixes

Signed-off-by: Jess Frazelle <[email protected]>

* remove only

Signed-off-by: Jess Frazelle <[email protected]>

* fix some recast shit

Signed-off-by: Jess Frazelle <[email protected]>

* updates

Signed-off-by: Jess Frazelle <[email protected]>

* last

Signed-off-by: Jess Frazelle <[email protected]>

---------

Signed-off-by: Jess Frazelle <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
jessfraz and github-actions[bot] authored Jun 25, 2024
1 parent ad5bfa1 commit da6cd5c
Show file tree
Hide file tree
Showing 44 changed files with 720 additions and 536 deletions.
7 changes: 2 additions & 5 deletions docs/kcl/angleToMatchLengthX.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ angleToMatchLengthX(segment_name: TagIdentifier, to: number, sketch_group: Sketc
```js
const sketch001 = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line([2, 5], %, 'seg01')
|> angledLineToX([
-angleToMatchLengthX('seg01', 7, %),
10
], %)
|> line([2, 5], %, $seg01)
|> angledLineToX([-angleToMatchLengthX(seg01, 7, %), 10], %)
|> close(%)

const extrusion = extrude(5, sketch001)
Expand Down
4 changes: 2 additions & 2 deletions docs/kcl/angleToMatchLengthY.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ angleToMatchLengthY(segment_name: TagIdentifier, to: number, sketch_group: Sketc
```js
const sketch001 = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line([1, 2], %, 'seg01')
|> line([1, 2], %, $seg01)
|> angledLine({
angle: angleToMatchLengthY('seg01', 15, %),
angle: angleToMatchLengthY(seg01, 15, %),
length: 5
}, %)
|> yLineTo(0, %)
Expand Down
6 changes: 3 additions & 3 deletions docs/kcl/angledLineOfXLength.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ angledLineOfXLength(data: AngledLineData, sketch_group: SketchGroup, tag?: TagDe
```js
const sketch001 = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> angledLineOfXLength({ angle: 45, length: 10 }, %, "edge1")
|> angledLineOfXLength({ angle: -15, length: 20 }, %, "edge2")
|> angledLineOfXLength({ angle: 45, length: 10 }, %, $edge1)
|> angledLineOfXLength({ angle: -15, length: 20 }, %, $edge2)
|> line([0, -5], %)
|> close(%, "edge3")
|> close(%, $edge3)

const extrusion = extrude(10, sketch001)
```
Expand Down
2 changes: 1 addition & 1 deletion docs/kcl/angledLineThatIntersects.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ angledLineThatIntersects(data: AngledLineThatIntersectsData, sketch_group: Sketc
const exampleSketch = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> lineTo([5, 10], %)
|> lineTo([-10, 10], %, "lineToIntersect")
|> lineTo([-10, 10], %, $lineToIntersect)
|> lineTo([0, 20], %)
|> angledLineThatIntersects({
angle: 80,
Expand Down
16 changes: 8 additions & 8 deletions docs/kcl/chamfer.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ const chamferLength = 2

const mountingPlateSketch = startSketchOn("XY")
|> startProfileAt([-width / 2, -length / 2], %)
|> lineTo([width / 2, -length / 2], %, 'edge1')
|> lineTo([width / 2, length / 2], %, 'edge2')
|> lineTo([-width / 2, length / 2], %, 'edge3')
|> close(%, 'edge4')
|> lineTo([width / 2, -length / 2], %, $edge1)
|> lineTo([width / 2, length / 2], %, $edge2)
|> lineTo([-width / 2, length / 2], %, $edge3)
|> close(%, $edge4)

const mountingPlate = extrude(thickness, mountingPlateSketch)
|> chamfer({
length: chamferLength,
tags: [
getNextAdjacentEdge('edge1', %),
getNextAdjacentEdge('edge2', %),
getNextAdjacentEdge('edge3', %),
getNextAdjacentEdge('edge4', %)
getNextAdjacentEdge(edge1, %),
getNextAdjacentEdge(edge2, %),
getNextAdjacentEdge(edge3, %),
getNextAdjacentEdge(edge4, %)
]
}, %)
```
Expand Down
18 changes: 9 additions & 9 deletions docs/kcl/circle.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Sketch a circle.


```js
circle(center: [number], radius: number, tag?: TagDeclarator, sketch_surface_or_group: SketchSurfaceOrGroup) -> SketchGroup
circle(center: [number], radius: number, sketch_surface_or_group: SketchSurfaceOrGroup, tag?: TagDeclarator) -> SketchGroup
```

### Examples
Expand Down Expand Up @@ -41,14 +41,6 @@ const example = extrude(5, exampleSketch)

* `center`: `[number]` (REQUIRED)
* `radius`: `number` (REQUIRED)
* `tag`: `TagDeclarator` (OPTIONAL)
```js
{
end: number,
start: number,
value: string,
}
```
* `sketch_surface_or_group`: `SketchSurfaceOrGroup` - A sketch surface or a sketch group. (REQUIRED)
```js
{
Expand Down Expand Up @@ -510,6 +502,14 @@ const example = extrude(5, exampleSketch)
}],
}
```
* `tag`: `TagDeclarator` (OPTIONAL)
```js
{
end: number,
start: number,
value: string,
}
```

### Returns

Expand Down
16 changes: 8 additions & 8 deletions docs/kcl/fillet.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ const filletRadius = 2

const mountingPlateSketch = startSketchOn("XY")
|> startProfileAt([-width / 2, -length / 2], %)
|> lineTo([width / 2, -length / 2], %, 'edge1')
|> lineTo([width / 2, length / 2], %, 'edge2')
|> lineTo([-width / 2, length / 2], %, 'edge3')
|> close(%, 'edge4')
|> lineTo([width / 2, -length / 2], %, $edge1)
|> lineTo([width / 2, length / 2], %, $edge2)
|> lineTo([-width / 2, length / 2], %, $edge3)
|> close(%, $edge4)

const mountingPlate = extrude(thickness, mountingPlateSketch)
|> fillet({
radius: filletRadius,
tags: [
getNextAdjacentEdge('edge1', %),
getNextAdjacentEdge('edge2', %),
getNextAdjacentEdge('edge3', %),
getNextAdjacentEdge('edge4', %)
getNextAdjacentEdge(edge1, %),
getNextAdjacentEdge(edge2, %),
getNextAdjacentEdge(edge3, %),
getNextAdjacentEdge(edge4, %)
]
}, %)
```
Expand Down
4 changes: 2 additions & 2 deletions docs/kcl/getEdge.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ getEdge(tag: TagIdentifier, extrude_group: ExtrudeGroup) -> Uuid
```js
const box = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line([0, 10], %, 'revolveAxis')
|> line([0, 10], %, $revolveAxis)
|> line([10, 0], %)
|> line([0, -10], %)
|> close(%)
Expand All @@ -30,7 +30,7 @@ const revolution = startSketchOn(box, "revolveAxis")
|> line([0, -10], %)
|> close(%)
|> revolve({
axis: getEdge('revolveAxis', box),
axis: getEdge(revolveAxis, box),
angle: 90
}, %)
```
Expand Down
6 changes: 2 additions & 4 deletions docs/kcl/getNextAdjacentEdge.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@ const exampleSketch = startSketchOn('XZ')
|> angledLine({ angle: 60, length: 10 }, %)
|> angledLine({ angle: 120, length: 10 }, %)
|> line([-10, 0], %)
|> angledLine({ angle: 240, length: 10 }, %, 'referenceEdge')
|> angledLine({ angle: 240, length: 10 }, %, $referenceEdge)
|> close(%)

const example = extrude(5, exampleSketch)
|> fillet({
radius: 3,
tags: [
getNextAdjacentEdge("referenceEdge", %)
]
tags: [getNextAdjacentEdge(referenceEdge, %)]
}, %)
```

Expand Down
4 changes: 2 additions & 2 deletions docs/kcl/getOppositeEdge.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ const exampleSketch = startSketchOn('XZ')
|> angledLine({ angle: 60, length: 10 }, %)
|> angledLine({ angle: 120, length: 10 }, %)
|> line([-10, 0], %)
|> angledLine({ angle: 240, length: 10 }, %, 'referenceEdge')
|> angledLine({ angle: 240, length: 10 }, %, $referenceEdge)
|> close(%)

const example = extrude(5, exampleSketch)
|> fillet({
radius: 3,
tags: [getOppositeEdge("referenceEdge", %)]
tags: [getOppositeEdge(referenceEdge, %)]
}, %)
```

Expand Down
4 changes: 2 additions & 2 deletions docs/kcl/getPreviousAdjacentEdge.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ const exampleSketch = startSketchOn('XZ')
|> angledLine({ angle: 60, length: 10 }, %)
|> angledLine({ angle: 120, length: 10 }, %)
|> line([-10, 0], %)
|> angledLine({ angle: 240, length: 10 }, %, 'referenceEdge')
|> angledLine({ angle: 240, length: 10 }, %, $referenceEdge)
|> close(%)

const example = extrude(5, exampleSketch)
|> fillet({
radius: 3,
tags: [
getPreviousAdjacentEdge("referenceEdge", %)
getPreviousAdjacentEdge(referenceEdge, %)
]
}, %)
```
Expand Down
4 changes: 2 additions & 2 deletions docs/kcl/profileStart.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ profileStart(sketch_group: SketchGroup) -> [number]
```js
const sketch001 = startSketchOn('XY')
|> startProfileAt([5, 2], %)
|> angledLine({ angle: 120, length: 50 }, %, 'seg01')
|> angledLine({ angle: 120, length: 50 }, %, $seg01)
|> angledLine({
angle: segAng('seg01', %) + 120,
angle: segAng(seg01, %) + 120,
length: 50
}, %)
|> lineTo(profileStart(%), %)
Expand Down
4 changes: 2 additions & 2 deletions docs/kcl/revolve.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ const box = startSketchOn('XY')
|> startProfileAt([0, 0], %)
|> line([0, 20], %)
|> line([20, 0], %)
|> line([0, -20], %, 'revolveAxis')
|> line([0, -20], %, $revolveAxis)
|> close(%)
|> extrude(20, %)

const sketch001 = startSketchOn(box, "END")
|> circle([10, 10], 4, %)
|> revolve({
angle: 90,
axis: getOppositeEdge('revolveAxis', box)
axis: getOppositeEdge(revolveAxis, box)
}, %)
```

Expand Down
6 changes: 3 additions & 3 deletions docs/kcl/segAng.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ segAng(segment_name: TagIdentifier, sketch_group: SketchGroup) -> number
const exampleSketch = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line([10, 0], %)
|> line([5, 10], %, 'seg01')
|> line([5, 10], %, $seg01)
|> line([-10, 0], %)
|> angledLine([segAng('seg01', %), 10], %)
|> angledLine([segAng(seg01, %), 10], %)
|> line([-10, 0], %)
|> angledLine([segAng('seg01', %), -15], %)
|> angledLine([segAng(seg01, %), -15], %)
|> close(%)

const example = extrude(4, exampleSketch)
Expand Down
4 changes: 2 additions & 2 deletions docs/kcl/segEndX.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ segEndX(segment_name: TagIdentifier, sketch_group: SketchGroup) -> number
```js
const exampleSketch = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line([20, 0], %, "thing")
|> line([20, 0], %, $thing)
|> line([0, 5], %)
|> line([segEndX("thing", %), 0], %)
|> line([segEndX(thing, %), 0], %)
|> line([-20, 10], %)
|> close(%)

Expand Down
4 changes: 2 additions & 2 deletions docs/kcl/segEndY.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ segEndY(segment_name: TagIdentifier, sketch_group: SketchGroup) -> number
const exampleSketch = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line([20, 0], %)
|> line([0, 3], %, "thing")
|> line([0, 3], %, $thing)
|> line([-10, 0], %)
|> line([0, segEndY("thing", %)], %)
|> line([0, segEndY(thing, %)], %)
|> line([-10, 0], %)
|> close(%)

Expand Down
7 changes: 2 additions & 5 deletions docs/kcl/segLen.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@ segLen(segment_name: TagIdentifier, sketch_group: SketchGroup) -> number
```js
const exampleSketch = startSketchOn("XZ")
|> startProfileAt([0, 0], %)
|> angledLine({ angle: 60, length: 10 }, %, "thing")
|> angledLine({ angle: 60, length: 10 }, %, $thing)
|> tangentialArc({ offset: -120, radius: 5 }, %)
|> angledLine({
angle: -60,
length: segLen("thing", %)
}, %)
|> angledLine({ angle: -60, length: segLen(thing, %) }, %)
|> close(%)

const example = extrude(5, exampleSketch)
Expand Down
4 changes: 2 additions & 2 deletions docs/kcl/startSketchOn.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const example003 = extrude(5, exampleSketch003)
const exampleSketch = startSketchOn("XY")
|> startProfileAt([0, 0], %)
|> line([10, 0], %)
|> line([0, 10], %, 'sketchingFace')
|> line([0, 10], %, $sketchingFace)
|> line([-10, 0], %)
|> close(%)

Expand All @@ -60,7 +60,7 @@ const exampleSketch002 = startSketchOn(example, 'sketchingFace')
|> line([8, 0], %)
|> line([0, 8], %)
|> line([-8, 0], %)
|> close(%, 'sketchingFace002')
|> close(%, $sketchingFace002)

const example002 = extrude(10, exampleSketch002)

Expand Down
Loading

0 comments on commit da6cd5c

Please sign in to comment.