Skip to content

Commit 16c2ab0

Browse files
Update KCL docs (#565)
YOYO NEW KCL DOCS!! Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 67547b3 commit 16c2ab0

File tree

104 files changed

+1469
-134919
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+1469
-134919
lines changed

content/pages/docs/kcl-lang/modules.md

Lines changed: 9 additions & 13 deletions

content/pages/docs/kcl-samples/mounting-plate/main.kcl

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,20 @@ filletRadius = 0.5
1111
plateThickness = .5
1212
centerHoleDiameter = 2
1313

14-
// Create a function that defines the body width and length of the mounting plate. Tag the corners so they can be passed through the fillet function.
15-
fn rectShape(pos, w, l) {
16-
rr = startSketchOn(XY)
17-
|> startProfile(at = [pos[0] - (w / 2), pos[1] - (l / 2)])
18-
|> line(endAbsolute = [pos[0] + w / 2, pos[1] - (l / 2)], tag = $edge1)
19-
|> line(endAbsolute = [pos[0] + w / 2, pos[1] + l / 2], tag = $edge2)
20-
|> line(endAbsolute = [pos[0] - (w / 2), pos[1] + l / 2], tag = $edge3)
21-
|> close(tag = $edge4)
22-
return rr
23-
}
24-
2514
// Define the hole radius and x, y location constants
2615
holeRadius = .25
2716
holeIndex = .75
2817

18+
sketch001 = startSketchOn(XY)
19+
rectShape = startProfile(sketch001, at = [-plateWidth / 2, plateLength / 2])
20+
|> angledLine(angle = 0, length = plateWidth, tag = $basePlateEdge1)
21+
|> angledLine(angle = segAng(basePlateEdge1) - 90, length = plateLength, tag = $basePlateEdge2)
22+
|> angledLine(angle = segAng(basePlateEdge1), length = -segLen(basePlateEdge1), tag = $basePlateEdge3)
23+
|> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $basePlateEdge4)
24+
|> close()
25+
2926
// Create the mounting plate extrusion, holes, and fillets
30-
rs = rectShape(pos = [0, 0], w = plateWidth, l = plateLength)
31-
part = rs
27+
part = rectShape
3228
|> subtract2d(tool = circle(
3329
center = [
3430
-plateWidth / 2 + holeIndex,
@@ -62,9 +58,9 @@ part = rs
6258
|> fillet(
6359
radius = filletRadius,
6460
tags = [
65-
getPreviousAdjacentEdge(rs.tags.edge1),
66-
getPreviousAdjacentEdge(rs.tags.edge2),
67-
getPreviousAdjacentEdge(rs.tags.edge3),
68-
getPreviousAdjacentEdge(rs.tags.edge4)
61+
getCommonEdge(faces = [basePlateEdge3, basePlateEdge2]),
62+
getCommonEdge(faces = [basePlateEdge4, basePlateEdge3]),
63+
getCommonEdge(faces = [basePlateEdge4, basePlateEdge1]),
64+
getCommonEdge(faces = [basePlateEdge2, basePlateEdge1])
6965
],
7066
)
-191 Bytes

content/pages/docs/kcl-std/consts.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

content/pages/docs/kcl-std/consts/std-math-E.md

Lines changed: 2 additions & 4 deletions

content/pages/docs/kcl-std/consts/std-math-PI.md

Lines changed: 2 additions & 1 deletion

content/pages/docs/kcl-std/consts/std-math-TAU.md

Lines changed: 2 additions & 4 deletions

content/pages/docs/kcl-std/functions/std-appearance-hexString.md

Lines changed: 8 additions & 5 deletions

content/pages/docs/kcl-std/functions/std-array-map.md

Lines changed: 6 additions & 7 deletions

content/pages/docs/kcl-std/functions/std-array-pop.md

Lines changed: 19 additions & 3 deletions

0 commit comments

Comments
 (0)