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:
@ -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
|
||||
|
Reference in New Issue
Block a user