Make the function signature less prominent, add an early example to docs

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron
2025-06-19 17:08:46 +12:00
parent 6358eed7e4
commit ff1be99351
99 changed files with 2137 additions and 686 deletions

View File

@ -8,12 +8,48 @@ layout: manual
Start a new 2-dimensional sketch on a specific plane or face.
```kcl
startSketchOn(
@planeOrSolid: Solid | Plane,
face?: TaggedFace,
): Plane | Face
exampleSketch = startSketchOn(XY)
|> startProfile(at = [0, 0])
|> line(end = [10, 0])
|> line(end = [0, 10])
|> line(end = [-10, 0])
|> close()
example = extrude(exampleSketch, length = 5)
exampleSketch002 = startSketchOn(example, face = END)
|> startProfile(at = [1, 1])
|> line(end = [8, 0])
|> line(end = [0, 8])
|> line(end = [-8, 0])
|> close()
example002 = extrude(exampleSketch002, length = 5)
exampleSketch003 = startSketchOn(example002, face = END)
|> startProfile(at = [2, 2])
|> line(end = [6, 0])
|> line(end = [0, 6])
|> line(end = [-6, 0])
|> close()
example003 = extrude(exampleSketch003, length = 5)
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `planeOrSolid` | [`Solid`](/docs/kcl-std/types/std-types-Solid) or [`Plane`](/docs/kcl-std/types/std-types-Plane) | Profile whose start is being used. | Yes |
| `face` | [`TaggedFace`](/docs/kcl-std/types/std-types-TaggedFace) | Identify a face of a solid if a solid is specified as the input argument (`planeOrSolid`). | No |
### Returns
[`Plane`](/docs/kcl-std/types/std-types-Plane) or [`Face`](/docs/kcl-std/types/std-types-Face)
### Description
### Sketch on Face Behavior
There are some important behaviors to understand when sketching on a face:
@ -31,17 +67,14 @@ The point is if you want to export the result of a sketch on a face, you
only need to export the final Solid that was created from the sketch on the
face, since it will include all the parent faces and Solids.
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `planeOrSolid` | [`Solid`](/docs/kcl-std/types/std-types-Solid) or [`Plane`](/docs/kcl-std/types/std-types-Plane) | Profile whose start is being used. | Yes |
| `face` | [`TaggedFace`](/docs/kcl-std/types/std-types-TaggedFace) | Identify a face of a solid if a solid is specified as the input argument (`planeOrSolid`). | No |
### Returns
[`Plane`](/docs/kcl-std/types/std-types-Plane) or [`Face`](/docs/kcl-std/types/std-types-Face)
### Function signature
```kcl
startSketchOn(
@planeOrSolid: Solid | Plane,
face?: TaggedFace,
): Plane | Face
```
### Examples