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,17 +8,19 @@ layout: manual
Create a regular polygon with the specified number of sides that is either inscribed or circumscribed around a circle of the specified radius.
```kcl
polygon(
@sketchOrSurface: Sketch | Plane | Face,
radius: number(Length),
numSides: number(_),
center: Point2d,
inscribed?: bool,
): Sketch
// Create a regular hexagon inscribed in a circle of radius 10
hex = startSketchOn(XY)
|> polygon(
radius = 10,
numSides = 6,
center = [0, 0],
inscribed = true,
)
example = extrude(hex, length = 5)
```
### Arguments
| Name | Type | Description | Required |
@ -34,6 +36,18 @@ polygon(
[`Sketch`](/docs/kcl-std/types/std-types-Sketch) - A sketch is a collection of paths.
### Function signature
```kcl
polygon(
@sketchOrSurface: Sketch | Plane | Face,
radius: number(Length),
numSides: number(_),
center: Point2d,
inscribed?: bool,
): Sketch
```
### Examples
```kcl