Skip to content

Commit

Permalink
Rename args: end and endAbsolute
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchalmers committed Dec 17, 2024
1 parent e99f814 commit f678077
Show file tree
Hide file tree
Showing 258 changed files with 37,239 additions and 37,223 deletions.
4 changes: 2 additions & 2 deletions docs/kcl/abs.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ myAngle = -120

sketch001 = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line(to = [8, 0])
|> line(end = [8, 0])
|> angledLine({ angle = abs(myAngle), length = 5 }, %)
|> line(to = [-5, 0])
|> line(end = [-5, 0])
|> angledLine({ angle = myAngle, length = 5 }, %)
|> close()

Expand Down
4 changes: 2 additions & 2 deletions docs/kcl/acos.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ sketch001 = startSketchOn('XZ')
angle = toDegrees(acos(0.5)),
length = 10
}, %)
|> line(to = [5, 0])
|> line(end = [12, 0])
|> line(end = [5, 0])
|> line(endAbsolute = [12, 0])
|> close()

extrude001 = extrude(sketch001, length = 5)
Expand Down
2 changes: 1 addition & 1 deletion docs/kcl/angleToMatchLengthX.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ angleToMatchLengthX(tag: TagIdentifier, to: number, sketch: Sketch) -> number
```js
sketch001 = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line(to = [2, 5], tag = $seg01)
|> line(end = [2, 5], tag = $seg01)
|> angledLineToX([-angleToMatchLengthX(seg01, 7, %), 10], %)
|> close()

Expand Down
2 changes: 1 addition & 1 deletion docs/kcl/angleToMatchLengthY.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ angleToMatchLengthY(tag: TagIdentifier, to: number, sketch: Sketch) -> number
```js
sketch001 = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line(to = [1, 2], tag = $seg01)
|> line(end = [1, 2], tag = $seg01)
|> angledLine({
angle = angleToMatchLengthY(seg01, 15, %),
length = 5
Expand Down
2 changes: 1 addition & 1 deletion docs/kcl/angledLine.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ exampleSketch = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> yLineTo(15, %)
|> angledLine({ angle = 30, length = 15 }, %)
|> line(to = [8, -10])
|> line(end = [8, -10])
|> yLineTo(0, %)
|> close()

Expand Down
2 changes: 1 addition & 1 deletion docs/kcl/angledLineOfXLength.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ sketch001 = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> angledLineOfXLength({ angle = 45, length = 10 }, %, $edge1)
|> angledLineOfXLength({ angle = -15, length = 20 }, %, $edge2)
|> line(to = [0, -5])
|> line(end = [0, -5])
|> close(tag = $edge3)

extrusion = extrude(sketch001, length = 10)
Expand Down
8 changes: 4 additions & 4 deletions docs/kcl/angledLineOfYLength.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ angledLineOfYLength(data: AngledLineData, sketch: Sketch, tag?: TagDeclarator) -
```js
exampleSketch = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line(to = [10, 0])
|> line(end = [10, 0])
|> angledLineOfYLength({ angle = 45, length = 10 }, %)
|> line(to = [0, 10])
|> line(end = [0, 10])
|> angledLineOfYLength({ angle = 135, length = 10 }, %)
|> line(to = [-10, 0])
|> line(to = [0, -30])
|> line(end = [-10, 0])
|> line(end = [0, -30])

example = extrude(exampleSketch, length = 10)
```
Expand Down
6 changes: 3 additions & 3 deletions docs/kcl/angledLineThatIntersects.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ angledLineThatIntersects(data: AngledLineThatIntersectsData, sketch: Sketch, tag
```js
exampleSketch = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line(end = [5, 10])
|> line(end = [-10, 10], tag = $lineToIntersect)
|> line(end = [0, 20])
|> line(endAbsolute = [5, 10])
|> line(endAbsolute = [-10, 10], tag = $lineToIntersect)
|> line(endAbsolute = [0, 20])
|> angledLineThatIntersects({
angle = 80,
intersectTag = lineToIntersect,
Expand Down
4 changes: 2 additions & 2 deletions docs/kcl/angledLineToX.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ angledLineToX(data: AngledLineToData, sketch: Sketch, tag?: TagDeclarator) -> Sk
exampleSketch = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> angledLineToX({ angle = 30, to = 10 }, %)
|> line(to = [0, 10])
|> line(to = [-10, 0])
|> line(end = [0, 10])
|> line(end = [-10, 0])
|> close()

example = extrude(exampleSketch, length = 10)
Expand Down
2 changes: 1 addition & 1 deletion docs/kcl/angledLineToY.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ angledLineToY(data: AngledLineToData, sketch: Sketch, tag?: TagDeclarator) -> Sk
exampleSketch = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> angledLineToY({ angle = 60, to = 20 }, %)
|> line(to = [-20, 0])
|> line(end = [-20, 0])
|> angledLineToY({ angle = 70, to = 10 }, %)
|> close()

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

example = extrude(exampleSketch, length = 5)
Expand Down Expand Up @@ -65,9 +65,9 @@ sketch001 = startSketchOn('XY')
fn cube(center) {
return startSketchOn('XY')
|> startProfileAt([center[0] - 10, center[1] - 10], %)
|> line(end = [center[0] + 10, center[1] - 10])
|> line(end = [center[0] + 10, center[1] + 10])
|> line(end = [center[0] - 10, center[1] + 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)
}
Expand Down Expand Up @@ -95,9 +95,9 @@ appearance({
// This example shows setting the appearance _after_ the shell.
firstSketch = startSketchOn('XY')
|> startProfileAt([-12, 12], %)
|> line(to = [24, 0])
|> line(to = [0, -24])
|> line(to = [-24, 0])
|> line(end = [24, 0])
|> line(end = [0, -24])
|> line(end = [-24, 0])
|> close()
|> extrude(length = 6)

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

example = extrude(exampleSketch, length = 1)
Expand All @@ -162,9 +162,9 @@ example = extrude(exampleSketch, length = 1)
// This example shows _after_ the pattern.
exampleSketch = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line(to = [0, 2])
|> line(to = [3, 1])
|> line(to = [0, -4])
|> line(end = [0, 2])
|> line(end = [3, 1])
|> line(end = [0, -4])
|> close()

example = extrude(exampleSketch, length = 1)
Expand All @@ -186,9 +186,9 @@ example = extrude(exampleSketch, length = 1)
// Color the result of a 2D pattern that was extruded.
exampleSketch = startSketchOn('XZ')
|> startProfileAt([.5, 25], %)
|> line(to = [0, 5])
|> line(to = [-1, 0])
|> line(to = [0, -5])
|> line(end = [0, 5])
|> line(end = [-1, 0])
|> line(end = [0, -5])
|> close()
|> patternCircular2d({
center = [0, 0],
Expand All @@ -214,11 +214,11 @@ example = extrude(exampleSketch, length = 1)
// Create a path for the sweep.
sweepPath = startSketchOn('XZ')
|> startProfileAt([0.05, 0.05], %)
|> line(to = [0, 7])
|> line(end = [0, 7])
|> tangentialArc({ offset = 90, radius = 5 }, %)
|> line(to = [-3, 0])
|> line(end = [-3, 0])
|> tangentialArc({ offset = -90, radius = 5 }, %)
|> line(to = [0, 7])
|> line(end = [0, 7])

pipeHole = startSketchOn('XY')
|> circle({ center = [0, 0], radius = 1.5 }, %)
Expand Down
2 changes: 1 addition & 1 deletion docs/kcl/arc.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ arc(data: ArcData, sketch: Sketch, tag?: TagDeclarator) -> Sketch
```js
exampleSketch = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line(to = [10, 0])
|> line(end = [10, 0])
|> arc({
angleStart = 0,
angleEnd = 280,
Expand Down
4 changes: 2 additions & 2 deletions docs/kcl/bezierCurve.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ bezierCurve(data: BezierData, sketch: Sketch, tag?: TagDeclarator) -> Sketch
```js
exampleSketch = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line(to = [0, 10])
|> line(end = [0, 10])
|> bezierCurve({
to = [10, 10],
control1 = [5, 0],
control2 = [5, 10]
}, %)
|> line(end = [10, 0])
|> line(endAbsolute = [10, 0])
|> close()

example = extrude(exampleSketch, length = 10)
Expand Down
4 changes: 2 additions & 2 deletions docs/kcl/ceil.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ ceil(num: number) -> number
```js
sketch001 = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line(end = [12, 10])
|> line(to = [ceil(7.02986), 0])
|> line(endAbsolute = [12, 10])
|> line(end = [ceil(7.02986), 0])
|> yLineTo(0, %)
|> close()

Expand Down
20 changes: 10 additions & 10 deletions docs/kcl/chamfer.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ chamferLength = 2

mountingPlateSketch = startSketchOn("XY")
|> startProfileAt([-width / 2, -length / 2], %)
|> line(end = [width / 2, -length / 2], tag = $edge1)
|> line(end = [width / 2, length / 2], tag = $edge2)
|> line(end = [-width / 2, length / 2], tag = $edge3)
|> 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(mountingPlateSketch, length = thickness)
Expand All @@ -61,9 +61,9 @@ mountingPlate = extrude(mountingPlateSketch, length = thickness)
fn cube(pos, scale) {
sg = startSketchOn('XY')
|> startProfileAt(pos, %)
|> line(to = [0, scale])
|> line(to = [scale, 0])
|> line(to = [0, -scale])
|> line(end = [0, scale])
|> line(end = [scale, 0])
|> line(end = [0, -scale])

return sg
}
Expand All @@ -78,10 +78,10 @@ part001 = cube([0, 0], 20)

sketch001 = startSketchOn(part001, chamfer1)
|> startProfileAt([10, 10], %)
|> line(to = [2, 0])
|> line(to = [0, 2])
|> line(to = [-2, 0])
|> line(end = [profileStartX(%), profileStartY(%)])
|> line(end = [2, 0])
|> line(end = [0, 2])
|> line(end = [-2, 0])
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> extrude(length = 10)
```
Expand Down
6 changes: 3 additions & 3 deletions docs/kcl/circle.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ example = extrude(exampleSketch, length = 5)
```js
exampleSketch = startSketchOn("XZ")
|> startProfileAt([-15, 0], %)
|> line(to = [30, 0])
|> line(to = [0, 30])
|> line(to = [-30, 0])
|> line(end = [30, 0])
|> line(end = [0, 30])
|> line(end = [-30, 0])
|> close()
|> hole(circle({ center = [0, 15], radius = 5 }, %), %)

Expand Down
8 changes: 4 additions & 4 deletions docs/kcl/close.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ close(sketch: Sketch, tag?: TagDeclarator) -> Sketch
```js
startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line(to = [10, 10])
|> line(to = [10, 0])
|> line(end = [10, 10])
|> line(end = [10, 0])
|> close()
|> extrude(length = 10)
```
Expand All @@ -41,8 +41,8 @@ startSketchOn('XZ')
```js
exampleSketch = startSketchOn('-XZ')
|> startProfileAt([0, 0], %)
|> line(to = [10, 0])
|> line(to = [0, 10])
|> line(end = [10, 0])
|> line(end = [0, 10])
|> close()

example = extrude(exampleSketch, length = 10)
Expand Down
16 changes: 8 additions & 8 deletions docs/kcl/extrude.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ extrude(sketch_set: SketchSet, length: number) -> SolidSet
```js
example = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line(to = [10, 0])
|> line(end = [10, 0])
|> arc({
angleStart = 120,
angleEnd = 0,
radius = 5
}, %)
|> line(to = [5, 0])
|> line(to = [0, 10])
|> line(end = [5, 0])
|> line(end = [0, 10])
|> bezierCurve({
control1 = [-10, 0],
control2 = [2, 10],
to = [-5, 10]
}, %)
|> line(to = [-5, -2])
|> line(end = [-5, -2])
|> close()
|> extrude(length = 10)
```
Expand All @@ -58,15 +58,15 @@ exampleSketch = startSketchOn('XZ')
angleEnd = -60,
radius = 5
}, %)
|> line(to = [10, 0])
|> line(to = [5, 0])
|> line(end = [10, 0])
|> line(end = [5, 0])
|> bezierCurve({
control1 = [-3, 0],
control2 = [2, 10],
to = [-5, 10]
}, %)
|> line(to = [-4, 10])
|> line(to = [-5, -2])
|> line(end = [-4, 10])
|> line(end = [-5, -2])
|> close()

example = extrude(exampleSketch, length = 10)
Expand Down
12 changes: 6 additions & 6 deletions docs/kcl/fillet.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ filletRadius = 2

mountingPlateSketch = startSketchOn("XY")
|> startProfileAt([-width / 2, -length / 2], %)
|> line(end = [width / 2, -length / 2], tag = $edge1)
|> line(end = [width / 2, length / 2], tag = $edge2)
|> line(end = [-width / 2, length / 2], tag = $edge3)
|> 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(mountingPlateSketch, length = thickness)
Expand All @@ -63,9 +63,9 @@ filletRadius = 1

mountingPlateSketch = startSketchOn("XY")
|> startProfileAt([-width / 2, -length / 2], %)
|> line(end = [width / 2, -length / 2], tag = $edge1)
|> line(end = [width / 2, length / 2], tag = $edge2)
|> line(end = [-width / 2, length / 2], tag = $edge3)
|> 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(mountingPlateSketch, length = thickness)
Expand Down
Loading

0 comments on commit f678077

Please sign in to comment.