Use this when you want the biggest rectangle that hugs a specific side of a lot or building footprint — for example, fitting a rectangular pad flush against a property's street frontage, or sizing a building envelope that has to align with a particular boundary edge.
Category: Geometric Operations
Kind: Operation
Description: returns the largest rectangle inside a polygon aligned to one of its edges. touch edge keeps the rectangle flush with that edge, like a capped inward offset
Inputs
Name | Abbreviation | Type | Access | Description |
polygon | P | Cartesian | Item | the polygon to fit a rectangle inside |
align to edge (default 0) | A | Number | Item | index of the polygon's outer edge to align the rectangle to; the rectangle's sides are rotated to run parallel to this edge. |
touch edge (optional, default false) | T | Boolean | Item | when on, one side of the rectangle sits flush against the chosen edge and grows inward from it; when off, the rectangle keeps that orientation of the edge, but grows to fill the polygon |
Outputs
Name | Abbreviation | Type | Access | Description |
rectangle | R | Cartesian | Item | the inscribed rectangle |
width | W | Number | Item | the rectangle side measured parallel to the aligned edge |
height | H | Number | Item | the rectangle side measured perpendicular to the aligned edge |
How to
Add the Edge-Aligned Inscribed Rectangle node.
Feed in a polygon.
Set "align to edge" to the index of the outer edge you want the rectangle aligned to (0 is the first edge).
Turn on "touch edge" to keep the rectangle flush against that edge, or leave it off to let the rectangle grow to fill the polygon at that orientation.
The outputs are the fitted rectangle plus its width and height.