Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KCL: Change core sketch functions to use keyword args #4826

Open
wants to merge 111 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 108 commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
a186517
KCL: Line and Extrude use kw args
adamchalmers Dec 16, 2024
57ca6d5
WIP: Autocomplete
adamchalmers Jan 6, 2025
69f036e
Move get_autocomplete_snippet_from_schema into the stdlib fn arg struct
adamchalmers Jan 6, 2025
641efb0
Change arg_docs to args
adamchalmers Jan 6, 2025
b079af2
More autocomplete work
adamchalmers Jan 6, 2025
bdeda51
LSP: Update examples to use new KCL stdlib
adamchalmers Jan 6, 2025
989ca83
Update more test KCL
adamchalmers Jan 7, 2025
2848d6c
bugfix: Use = not : in autocomplete
adamchalmers Jan 7, 2025
725ffd9
JS: Rectangle and extrude buttons now generate keyword args
adamchalmers Jan 7, 2025
235e526
WIP: Start fixing frontend
adamchalmers Jan 7, 2025
cc9a14d
Fix some tests
adamchalmers Jan 7, 2025
e917eb9
Update test KCL
adamchalmers Jan 7, 2025
d66c7cf
Fixed test 'Should reorder when user selects last-to-first'
adamchalmers Jan 7, 2025
fb59996
Fix lints
adamchalmers Jan 9, 2025
18b1d84
Fix up Rust changes
adamchalmers Jan 9, 2025
cd28a4a
yarn fmt
adamchalmers Jan 9, 2025
ecec739
Fix test 'yRelative to horizontal distance'
adamchalmers Jan 9, 2025
72f84c3
Fix constraint checking in line
adamchalmers Jan 10, 2025
248b2d2
Fix test by changing lookups into transformMap
adamchalmers Jan 13, 2025
d386c92
Fix minor tests + lints
adamchalmers Jan 13, 2025
e86a5fa
Use new transformMap lookup even if line is unconstrained
adamchalmers Jan 14, 2025
ddafbf0
Stop asserting on exact source ranges
adamchalmers Jan 14, 2025
440173d
Fix lints, fix one test sourcerange assertions
adamchalmers Jan 14, 2025
84cd2c0
Test now uses callExpressionKw not positional
adamchalmers Jan 14, 2025
de2dfc2
Fix more tests: getConstraintType calls weren't checking if the
adamchalmers Jan 14, 2025
81e2fd2
Remove .only calls
adamchalmers Jan 14, 2025
ff71250
Fix test 'should recognize that sketch001 has been extruded'
adamchalmers Jan 14, 2025
ae0860a
Fixed another queryAst test
adamchalmers Jan 14, 2025
2943ea1
Fix test: traverse was not handling CallExpressionKw
adamchalmers Jan 14, 2025
6522f1c
Fix another queryAst test
adamchalmers Jan 14, 2025
308b712
Fix more queryAst code that wasn't aware of CallExpressionKw
adamchalmers Jan 14, 2025
a69ccf9
Refactor: move some strings into named constants
adamchalmers Jan 14, 2025
70766ce
Fix tests
adamchalmers Jan 14, 2025
1c8cc54
Update test to expect kwargs syntax
adamchalmers Jan 14, 2025
a819d16
Only 13 failing
adamchalmers Jan 14, 2025
ad8336e
Call the KW helper, not just positional
adamchalmers Jan 14, 2025
fc7e699
Update sourceRanges
adamchalmers Jan 14, 2025
141c38c
Convert old test KCL to kwargs
adamchalmers Jan 14, 2025
9e77828
Fix another test, addTagKw
adamchalmers Jan 14, 2025
9dc06f6
Fix another test, allow it to use callExpressionKw
adamchalmers Jan 14, 2025
d9fe9ba
Fix another test
adamchalmers Jan 14, 2025
fda4aeb
Bugfix: don't duplicate tag
adamchalmers Jan 14, 2025
cd022fb
close is now a kw function
adamchalmers Jan 14, 2025
99866b5
Convert close from positional to kwargs
adamchalmers Jan 15, 2025
10c4461
Fix the last test
adamchalmers Jan 15, 2025
617dcfe
Fix git merge conflicts from Helix and Cache work
adamchalmers Jan 16, 2025
6b37bf1
Start using kwargs branch of kcl-samples
adamchalmers Jan 16, 2025
987152e
Fix some graph tests
adamchalmers Jan 16, 2025
21ea1d7
Support kwargs in addEdgeTreatment
adamchalmers Jan 16, 2025
5d1df40
WIP
adamchalmers Jan 16, 2025
bd329de
Fix the last graph test
adamchalmers Jan 16, 2025
ee6014d
Update helix docs
adamchalmers Jan 16, 2025
ce8aeab
Start fixing playwright tests
adamchalmers Jan 17, 2025
f3a2922
Remove .only and fix resulting tests
adamchalmers Jan 17, 2025
d653b85
Add back a missing import
adamchalmers Jan 17, 2025
5191013
Correct sourceRange expectations
adamchalmers Jan 17, 2025
729a34e
Fixed more e2e tests
adamchalmers Jan 17, 2025
26f01bc
fmt
adamchalmers Jan 17, 2025
2559309
Update snapshots
adamchalmers Jan 17, 2025
8e343a2
Remove expect from application code
adamchalmers Jan 21, 2025
1227b38
Update e2e test code with new syntax
adamchalmers Jan 21, 2025
cb4a477
Fix point-and-click sketch mode to use kwargs
adamchalmers Jan 21, 2025
da2072e
Fix drafting lines
adamchalmers Jan 21, 2025
09df8a7
Fix some uses of extrude
nrc Jan 21, 2025
8bac097
Fix the 'constrain length' test
adamchalmers Jan 21, 2025
38e59df
Fix some uses of close and lineTo
nrc Jan 21, 2025
a69da08
Some line fixes
nrc Jan 21, 2025
9c35c06
Rebasing fixups
nrc Jan 22, 2025
12ed315
A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubunt…
github-actions[bot] Jan 22, 2025
da3788a
Fix: make Toolbar components support CallExpressionKw
adamchalmers Jan 22, 2025
e8961d4
Fix 'remove constraint' on kw arg calls
adamchalmers Jan 23, 2025
3cecb99
Fix: mutateKwArg was appending not overwriting args
adamchalmers Jan 23, 2025
91df6b9
Style fix: skip % when creating new line calls
adamchalmers Jan 23, 2025
e26d7e7
Same as previous
adamchalmers Jan 23, 2025
2abd516
Same as previous
adamchalmers Jan 24, 2025
bf306e7
34 failing
adamchalmers Jan 24, 2025
fda7acf
Fix many bad regex find-replaces
adamchalmers Jan 24, 2025
aafa1a3
Fix shell
adamchalmers Jan 24, 2025
7f9526b
Fix revolve
adamchalmers Jan 24, 2025
8718904
Rectangle tool should use default unlabeled, fix broken regex find-re…
adamchalmers Jan 24, 2025
25d9c19
Migrate Extrude AST mod from XState action to actor
franknoirot Jan 23, 2025
f6c3351
Fix pathToNode for new extrude nodes
adamchalmers Jan 24, 2025
e1ce83a
Fix: Restore more tags which my bad regex mistakenly erased
adamchalmers Jan 24, 2025
7031b6f
Update sweep test KCL
adamchalmers Jan 24, 2025
b742163
Fix more missing tags from bad regex
adamchalmers Jan 24, 2025
43c12e5
Fix: Update expected hover text for 'line' fn
adamchalmers Jan 25, 2025
b7ec0ee
Fix test expectation
adamchalmers Jan 25, 2025
ef8131f
Changing stdlib changed the order of autocompletes
adamchalmers Jan 25, 2025
665ec8a
simple test fixups
nrc Jan 26, 2025
e34a4db
A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubunt…
github-actions[bot] Jan 26, 2025
82d6446
Empty commit to unstick CI
nrc Jan 26, 2025
2a5433a
Fix edge treatment tests
adamchalmers Jan 28, 2025
734e590
Merge branch 'main' into achalmers/kw-fn-sketches
adamchalmers Jan 28, 2025
0400f33
Merge branch 'main' into achalmers/kw-fn-sketches
adamchalmers Jan 28, 2025
1ae55c2
Fixes test 'Basic sketch › code pane closed at start'
adamchalmers Jan 28, 2025
260ec9f
Fix broken code test
adamchalmers Jan 29, 2025
1f3455e
Fix: Optional args given with wrong type were silently ignored
adamchalmers Jan 29, 2025
5f3cf61
Fix sample KCL, extrude needs to use kw args
adamchalmers Jan 29, 2025
7b3cfb1
Ensure no failing simulation tests are suddenly passing
adamchalmers Jan 29, 2025
012da72
WIP: Fix up artifact graph tests
adamchalmers Jan 29, 2025
069b1cb
Fix up frontend unit tests
adamchalmers Jan 29, 2025
b5182c8
Yarn fmt
adamchalmers Jan 29, 2025
95b6476
Update snapshot with new KCL
github-actions[bot] Jan 29, 2025
c18c8f9
A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubunt…
github-actions[bot] Jan 29, 2025
78e1bec
void
adamchalmers Jan 29, 2025
a6b2d32
A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubunt…
github-actions[bot] Jan 29, 2025
1c58996
void
adamchalmers Jan 30, 2025
ab00c7b
Merge branch 'main' into achalmers/kw-fn-sketches
adamchalmers Jan 30, 2025
01cb6df
Fuck it, update all the snapshots
adamchalmers Jan 30, 2025
989a227
A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubunt…
github-actions[bot] Jan 30, 2025
2c28ad6
Code review from Jon
adamchalmers Jan 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ yarn-error.log*

.idea
.vscode
.helix
src/wasm-lib/.idea
src/wasm-lib/.vscode

Expand Down
2 changes: 2 additions & 0 deletions .helix/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[editor]
auto-format = true
10 changes: 10 additions & 0 deletions .helix/languages.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[language-server.eslint]
args = ["--stdio"]
command = "vscode-eslint-language-server"

[[language]]
name = "typescript"
auto-format = true
formatter = { command = "node_modules/.bin/prettier", args = ["--parser", "typescript"] }
language-servers = [ { name = "eslint", only-features = [ "diagnostics" ] }, "typescript-language-server" ]

8 changes: 4 additions & 4 deletions docs/kcl/abs.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/kcl/acos.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/kcl/angleToMatchLengthX.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/kcl/angleToMatchLengthY.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/kcl/angledLine.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/kcl/angledLineOfXLength.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions docs/kcl/angledLineOfYLength.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions docs/kcl/angledLineThatIntersects.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/kcl/angledLineToX.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/kcl/angledLineToY.md

Large diffs are not rendered by default.

76 changes: 38 additions & 38 deletions docs/kcl/appearance.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ appearance(data: AppearanceData, solid_set: SolidSet) -> SolidSet
// Add color to an extruded solid.
exampleSketch = startSketchOn("XZ")
|> startProfileAt([0, 0], %)
|> lineTo([10, 0], %)
|> lineTo([0, 10], %)
|> lineTo([-10, 0], %)
|> close(%)
|> line(endAbsolute = [10, 0])
|> line(endAbsolute = [0, 10])
|> line(endAbsolute = [-10, 0])
|> close()

example = extrude(5, exampleSketch)
example = extrude(exampleSketch, length = 5)
|> appearance({
color = '#ff0000',
metalness = 50,
Expand Down Expand Up @@ -65,11 +65,11 @@ sketch001 = startSketchOn('XY')
fn cube(center) {
return startSketchOn('XY')
|> startProfileAt([center[0] - 10, center[1] - 10], %)
|> lineTo([center[0] + 10, center[1] - 10], %)
|> lineTo([center[0] + 10, center[1] + 10], %)
|> lineTo([center[0] - 10, center[1] + 10], %)
|> close(%)
|> extrude(10, %)
|> line(endAbsolute = [center[0] + 10, center[1] - 10])
|> line(endAbsolute = [center[0] + 10, center[1] + 10])
|> line(endAbsolute = [center[0] - 10, center[1] + 10])
|> close()
|> extrude(length = 10)
}

example0 = cube([0, 0])
Expand All @@ -95,11 +95,11 @@ appearance({
// This example shows setting the appearance _after_ the shell.
firstSketch = startSketchOn('XY')
|> startProfileAt([-12, 12], %)
|> line([24, 0], %)
|> line([0, -24], %)
|> line([-24, 0], %)
|> close(%)
|> extrude(6, %)
|> line(end = [24, 0])
|> line(end = [0, -24])
|> line(end = [-24, 0])
|> close()
|> extrude(length = 6)

shell({ faces = ['end'], thickness = 0.25 }, firstSketch)
|> appearance({
Expand All @@ -116,11 +116,11 @@ shell({ faces = ['end'], thickness = 0.25 }, firstSketch)
// This example shows setting the appearance _before_ the shell.
firstSketch = startSketchOn('XY')
|> startProfileAt([-12, 12], %)
|> line([24, 0], %)
|> line([0, -24], %)
|> line([-24, 0], %)
|> close(%)
|> extrude(6, %)
|> line(end = [24, 0])
|> line(end = [0, -24])
|> line(end = [-24, 0])
|> close()
|> extrude(length = 6)
|> appearance({
color = '#ff0000',
metalness = 90,
Expand All @@ -137,12 +137,12 @@ shell({ faces = ['end'], thickness = 0.25 }, firstSketch)
// This example shows _before_ the pattern.
exampleSketch = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line([0, 2], %)
|> line([3, 1], %)
|> line([0, -4], %)
|> close(%)
|> line(end = [0, 2])
|> line(end = [3, 1])
|> line(end = [0, -4])
|> close()

example = extrude(1, exampleSketch)
example = extrude(exampleSketch, length = 1)
|> appearance({
color = '#ff0000',
metalness = 90,
Expand All @@ -162,12 +162,12 @@ example = extrude(1, exampleSketch)
// This example shows _after_ the pattern.
exampleSketch = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line([0, 2], %)
|> line([3, 1], %)
|> line([0, -4], %)
|> close(%)
|> line(end = [0, 2])
|> line(end = [3, 1])
|> line(end = [0, -4])
|> close()

example = extrude(1, exampleSketch)
example = extrude(exampleSketch, length = 1)
|> patternLinear3d({
axis = [1, 0, 1],
instances = 7,
Expand All @@ -186,18 +186,18 @@ example = extrude(1, exampleSketch)
// Color the result of a 2D pattern that was extruded.
exampleSketch = startSketchOn('XZ')
|> startProfileAt([.5, 25], %)
|> line([0, 5], %)
|> line([-1, 0], %)
|> line([0, -5], %)
|> close(%)
|> line(end = [0, 5])
|> line(end = [-1, 0])
|> line(end = [0, -5])
|> close()
|> patternCircular2d({
center = [0, 0],
instances = 13,
arcDegrees = 360,
rotateDuplicates = true
}, %)

example = extrude(1, exampleSketch)
example = extrude(exampleSketch, length = 1)
|> appearance({
color = '#ff0000',
metalness = 90,
Expand All @@ -214,11 +214,11 @@ example = extrude(1, exampleSketch)
// Create a path for the sweep.
sweepPath = startSketchOn('XZ')
|> startProfileAt([0.05, 0.05], %)
|> line([0, 7], %)
|> line(end = [0, 7])
|> tangentialArc({ offset = 90, radius = 5 }, %)
|> line([-3, 0], %)
|> line(end = [-3, 0])
|> tangentialArc({ offset = -90, radius = 5 }, %)
|> line([0, 7], %)
|> line(end = [0, 7])

pipeHole = startSketchOn('XY')
|> circle({ center = [0, 0], radius = 1.5 }, %)
Expand Down
6 changes: 3 additions & 3 deletions docs/kcl/arc.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/kcl/arcTo.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/kcl/asin.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/kcl/atan.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/kcl/atan2.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/kcl/bezierCurve.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/kcl/ceil.md

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions docs/kcl/chamfer.md

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions docs/kcl/circle.md

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions docs/kcl/circleThreePoint.md

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions docs/kcl/close.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/kcl/cos.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/kcl/e.md

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions docs/kcl/extrude.md

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions docs/kcl/fillet.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ filletRadius = 2

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)
|> line(endAbsolute = [width / 2, -length / 2], tag = $edge1)
|> line(endAbsolute = [width / 2, length / 2], tag = $edge2)
|> line(endAbsolute = [-width / 2, length / 2], tag = $edge3)
|> close(tag = $edge4)

mountingPlate = extrude(thickness, mountingPlateSketch)
mountingPlate = extrude(mountingPlateSketch, length = thickness)
|> fillet({
radius = filletRadius,
tags = [
Expand All @@ -63,12 +63,12 @@ filletRadius = 1

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)
|> line(endAbsolute = [width / 2, -length / 2], tag = $edge1)
|> line(endAbsolute = [width / 2, length / 2], tag = $edge2)
|> line(endAbsolute = [-width / 2, length / 2], tag = $edge3)
|> close(tag = $edge4)

mountingPlate = extrude(thickness, mountingPlateSketch)
mountingPlate = extrude(mountingPlateSketch, length = thickness)
|> fillet({
radius = filletRadius,
tolerance = 0.000001,
Expand Down
8 changes: 4 additions & 4 deletions docs/kcl/floor.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/kcl/getNextAdjacentEdge.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ getNextAdjacentEdge(tag: TagIdentifier) -> Uuid
```js
exampleSketch = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line([10, 0], %)
|> line(end = [10, 0])
|> angledLine({ angle = 60, length = 10 }, %)
|> angledLine({ angle = 120, length = 10 }, %)
|> line([-10, 0], %)
|> line(end = [-10, 0])
|> angledLine({ angle = 240, length = 10 }, %, $referenceEdge)
|> close(%)
|> close()

example = extrude(5, exampleSketch)
example = extrude(exampleSketch, length = 5)
|> fillet({
radius = 3,
tags = [getNextAdjacentEdge(referenceEdge)]
Expand Down
8 changes: 4 additions & 4 deletions docs/kcl/getOppositeEdge.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ getOppositeEdge(tag: TagIdentifier) -> Uuid
```js
exampleSketch = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line([10, 0], %)
|> line(end = [10, 0])
|> angledLine({ angle = 60, length = 10 }, %)
|> angledLine({ angle = 120, length = 10 }, %)
|> line([-10, 0], %)
|> line(end = [-10, 0])
|> angledLine({ angle = 240, length = 10 }, %, $referenceEdge)
|> close(%)
|> close()

example = extrude(5, exampleSketch)
example = extrude(exampleSketch, length = 5)
|> fillet({
radius = 3,
tags = [getOppositeEdge(referenceEdge)]
Expand Down
8 changes: 4 additions & 4 deletions docs/kcl/getPreviousAdjacentEdge.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ getPreviousAdjacentEdge(tag: TagIdentifier) -> Uuid
```js
exampleSketch = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line([10, 0], %)
|> line(end = [10, 0])
|> angledLine({ angle = 60, length = 10 }, %)
|> angledLine({ angle = 120, length = 10 }, %)
|> line([-10, 0], %)
|> line(end = [-10, 0])
|> angledLine({ angle = 240, length = 10 }, %, $referenceEdge)
|> close(%)
|> close()

example = extrude(5, exampleSketch)
example = extrude(exampleSketch, length = 5)
|> fillet({
radius = 3,
tags = [getPreviousAdjacentEdge(referenceEdge)]
Expand Down
2 changes: 1 addition & 1 deletion docs/kcl/helix.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ springSketch = startSketchOn('YZ')
// Create a helix around an edge.
helper001 = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line([0, 10], %, $edge001)
|> line(end = [0, 10], tag = $edge001)

helixPath = helix({
angleStart = 0,
Expand Down
2 changes: 1 addition & 1 deletion docs/kcl/helixRevolutions.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ helixRevolutions(data: HelixRevolutionsData, solid: Solid) -> Solid
```js
part001 = startSketchOn('XY')
|> circle({ center = [5, 5], radius = 10 }, %)
|> extrude(10, %)
|> extrude(length = 10)
|> helixRevolutions({
angleStart = 0,
ccw = true,
Expand Down
20 changes: 10 additions & 10 deletions docs/kcl/hole.md

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions docs/kcl/hollow.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ hollow(thickness: number, solid: Solid) -> Solid
// Hollow a basic sketch.
firstSketch = startSketchOn('XY')
|> startProfileAt([-12, 12], %)
|> line([24, 0], %)
|> line([0, -24], %)
|> line([-24, 0], %)
|> close(%)
|> extrude(6, %)
|> line(end = [24, 0])
|> line(end = [0, -24])
|> line(end = [-24, 0])
|> close()
|> extrude(length = 6)
|> hollow(0.25, %)
```

Expand All @@ -45,11 +45,11 @@ firstSketch = startSketchOn('XY')
// Hollow a basic sketch.
firstSketch = startSketchOn('-XZ')
|> startProfileAt([-12, 12], %)
|> line([24, 0], %)
|> line([0, -24], %)
|> line([-24, 0], %)
|> close(%)
|> extrude(6, %)
|> line(end = [24, 0])
|> line(end = [0, -24])
|> line(end = [-24, 0])
|> close()
|> extrude(length = 6)
|> hollow(0.5, %)
```

Expand All @@ -60,25 +60,25 @@ firstSketch = startSketchOn('-XZ')
size = 100
case = startSketchOn('-XZ')
|> startProfileAt([-size, -size], %)
|> line([2 * size, 0], %)
|> line([0, 2 * size], %)
|> line(end = [2 * size, 0])
|> line(end = [0, 2 * size])
|> tangentialArcTo([-size, size], %)
|> close(%)
|> extrude(65, %)
|> close()
|> extrude(length = 65)

thing1 = startSketchOn(case, 'end')
|> circle({
center = [-size / 2, -size / 2],
radius = 25
}, %)
|> extrude(50, %)
|> extrude(length = 50)

thing2 = startSketchOn(case, 'end')
|> circle({
center = [size / 2, -size / 2],
radius = 25
}, %)
|> extrude(50, %)
|> extrude(length = 50)

hollow(0.5, case)
```
Expand Down
1 change: 0 additions & 1 deletion docs/kcl/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ layout: manual
* [`legAngY`](kcl/legAngY)
* [`legLen`](kcl/legLen)
* [`line`](kcl/line)
* [`lineTo`](kcl/lineTo)
* [`ln`](kcl/ln)
* [`loft`](kcl/loft)
* [`log`](kcl/log)
Expand Down
2 changes: 1 addition & 1 deletion docs/kcl/int.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ assertEqual(n, 3, 0.0001, "5/2 = 2.5, rounded up makes 3")
// Draw n cylinders.
startSketchOn('XZ')
|> circle({ center = [0, 0], radius = 2 }, %)
|> extrude(5, %)
|> extrude(length = 5)
|> patternTransform(n, fn(id) {
return { translate = [4 * id, 0, 0] }
}, %)
Expand Down
12 changes: 6 additions & 6 deletions docs/kcl/lastSegX.md

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions docs/kcl/lastSegY.md

Large diffs are not rendered by default.

Loading
Loading