* KCL test for rectangle * Rectangle function * Rectangle helper tests * Rectangle helper * Fix clippy lints * Update docs * fmt * Fix bug * fmt * Fix doc comments * Update generated docs --------- Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
65 KiB
65 KiB
title, subtitle, excerpt, layout
title | subtitle | excerpt | layout |
---|---|---|---|
rectangle | Function in std::sketch | Sketch a rectangle. | manual |
Sketch a rectangle.
rectangle(
@sketchOrSurface: Sketch | Plane | Face,
width: number(Length),
height: number(Length),
center?: Point2d,
corner?: Point2d,
): Sketch
Arguments
Name | Type | Description | Required |
---|---|---|---|
sketchOrSurface |
Sketch or Plane or Face |
Sketch to extend, or plane or surface to sketch on. | Yes |
width |
number(Length) |
Rectangle's width along X axis. | Yes |
height |
number(Length) |
Rectangle's height along Y axis. | Yes |
center |
Point2d |
The center of the rectangle. Incompatible with corner . |
No |
corner |
Point2d |
The corner of the rectangle. Incompatible with center . This will be the corner which is most negative on both X and Y axes. |
No |
Returns
Sketch
- A sketch is a collection of paths.
Examples
exampleSketch = startSketchOn(-XZ)
|> rectangle(center = [0, 0], width = 10, height = 5)
exampleSketch = startSketchOn(-XZ)
|> rectangle(corner = [0, 0], width = 10, height = 5)