Skip to content

Commit 399d760

Browse files
Update KCL docs (#583)
YOYO NEW KCL DOCS!! Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent fd3fd1f commit 399d760

Some content is hidden

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

59 files changed

+322
-200
lines changed

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

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ detail on importing geometry.
4444

4545
Tags are used to give a name (tag) to a specific path.
4646

47-
### `TagDeclarator`
47+
### Tag declarations - `TagDecl`
4848

4949
The syntax for declaring a tag is `$myTag` you would use it in the following
5050
way:
@@ -67,24 +67,28 @@ startSketchOn(XZ)
6767
|> close()
6868
```
6969

70-
### `TagIdentifier`
70+
When a function requires declaring a new tag (using the `$` syntax), the argument has type [`TagDecl`](/docs/kcl-std/types/std-types-TagDecl).
7171

72-
As per the example above you can use the tag identifier to get a reference to the
73-
tagged object. The syntax for this is `myTag`.
72+
### Tag identifiers
7473

75-
In the example above we use the tag identifier to get the angle of the segment
76-
`segAng(rectangleSegmentA001)`.
74+
A tag created using a tag declarator can be used by writing its name without the `$`, e.g., `myTag`.
75+
Where necessary to disambiguate from tag declarations, we call these tag identifiers.
7776

78-
### `Start`
77+
In the example above we use the tag identifier `rectangleSegmentA001` to get the angle of the segment
78+
using `segAng(rectangleSegmentA001)`.
7979

80-
There is a special tag, `START` (with type `Start`, although under the cover, it's a string)
81-
for identifying the face of a solid which was the start of an extrusion (i.e., the surface which
82-
is extruded).
80+
Tags can identify either an edge or face of a solid, or a line or other edge of a sketch. Functions
81+
which take a tag identifier as an argument will use either [`TaggedEdge`](/docs/kcl-std/types/std-types-TaggedEdge) (for the edge of a
82+
solid or sketch) or [`TaggedFace`](/docs/kcl-std/types/std-types-TaggedFace).
8383

84-
### `End`
84+
If a line in a sketch is tagged and then the sketch is extruded, the tag is a `TaggedEdge` before
85+
extrusion and a `TaggedFace` after extrusion.
86+
87+
#### `START` and `END`
88+
89+
[`START`](/docs/kcl-std/consts/std-START) and [`END`](/docs/kcl-std/consts/std-END) are special tags
90+
for identifying the starting and ending faces of an extruded solid.
8591

86-
There is a special tag, `END` (with type `End`, although under the cover, it's a string)
87-
for identifying the face of a solid which was finishes an extrusion.
8892

8993
### Tag Scope
9094

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ layout: manual
88
Identifies the ending face of an extrusion. I.e., the new face created by an extrusion.
99

1010
```kcl
11-
END: string = 'end'
11+
END: TaggedFace
1212
```
1313

1414

1515

16+
### Type
17+
18+
[`TaggedFace`](/docs/kcl-std/types/std-types-TaggedFace) - A tag which references a face of a solid, including the distinguished tags `START` and `END`.
19+
1620

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ layout: manual
88
Identifies the starting face of an extrusion. I.e., the face which is extruded.
99

1010
```kcl
11-
START: string = 'start'
11+
START: TaggedFace
1212
```
1313

1414

1515

16+
### Type
17+
18+
[`TaggedFace`](/docs/kcl-std/types/std-types-TaggedFace) - A tag which references a face of a solid, including the distinguished tags `START` and `END`.
19+
1620

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ layout: manual
88
The X-axis (can be used in both 2d and 3d contexts).
99

1010
```kcl
11-
X
11+
X: Axis3d
1212
```
1313

1414

1515

16+
### Type
17+
18+
[`Axis3d`](/docs/kcl-std/types/std-types-Axis3d) - An abstract and infinite line in 3d space.
19+
1620

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ layout: manual
88
An abstract 3d plane aligned with the X and Y axes. Its normal is the positive Z axis.
99

1010
```kcl
11-
XY
11+
XY: Plane
1212
```
1313

1414

1515

16+
### Type
17+
18+
[`Plane`](/docs/kcl-std/types/std-types-Plane) - An abstract plane.
19+
1620

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ layout: manual
88
An abstract 3d plane aligned with the X and Z axes. Its normal is the negative Y axis.
99

1010
```kcl
11-
XZ
11+
XZ: Plane
1212
```
1313

1414

1515

16+
### Type
17+
18+
[`Plane`](/docs/kcl-std/types/std-types-Plane) - An abstract plane.
19+
1620

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ layout: manual
88
The Y-axis (can be used in both 2d and 3d contexts).
99

1010
```kcl
11-
Y
11+
Y: Axis3d
1212
```
1313

1414

1515

16+
### Type
17+
18+
[`Axis3d`](/docs/kcl-std/types/std-types-Axis3d) - An abstract and infinite line in 3d space.
19+
1620

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ layout: manual
88
An abstract 3d plane aligned with the Y and Z axes. Its normal is the positive X axis.
99

1010
```kcl
11-
YZ
11+
YZ: Plane
1212
```
1313

1414

1515

16+
### Type
17+
18+
[`Plane`](/docs/kcl-std/types/std-types-Plane) - An abstract plane.
19+
1620

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ layout: manual
88
The 3D Z-axis.
99

1010
```kcl
11-
Z
11+
Z: Axis3d
1212
```
1313

1414

1515

16+
### Type
17+
18+
[`Axis3d`](/docs/kcl-std/types/std-types-Axis3d) - An abstract and infinite line in 3d space.
19+
1620

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ E: number = 2.71828182845904523536028747135266250_
1313

1414

1515

16+
### Type
17+
18+
[`number`](/docs/kcl-std/types/std-types-number) - A number.
19+
1620
### Examples
1721

1822
```kcl

0 commit comments

Comments
 (0)