Makeathon00:00:00:00Registration open
Docs Home
/
KCL Standard Library
/
Functions
/
Std Sketch Rectangle

rectangleFunction in std::sketch

Sketch a rectangle.

This is part of sketch v1 and is soft deprecated in favor of sketch-solve.

A rectangle can be defined by its width, height, and location. Either the center or corner must be provided, but not both, to specify its location.

Arguments

NameTypeDescriptionRequired
sketchOrSurfaceSketch or Plane or FaceSketch to extend, or plane or surface to sketch on.Yes
widthnumber(Length)Rectangle's width along X axis.Yes
heightnumber(Length)Rectangle's height along Y axis.Yes
centerPoint2dThe center of the rectangle. Either corner or center is required, but not both.No
cornerPoint2dThe corner of the rectangle. Either corner or center is required, but not both. 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

Found a typo?