rect()

Extrude a rectangle outline at layer height z.

The (x, y) anchor is interpreted per rectMode() (default CORNER, i.e. top-left). Outline only — no infill.

Parameters

Name Type Description
x number X position of the anchor in mm (interpreted per rectMode).
y number Y position of the anchor in mm.
z number Layer height in mm.
w number Width in mm.
h? number Height in mm. Defaults to w (a square). Default: w.

Examples

Syntax

fab.rect(x, y, z, w, [h])