Syntax
- innerRectangle( alignment) { selector operator operations | ... }
Parameters
- alignment—selector
- scope—The largest inner rectangle is found that has sides parallel to the scope's axes.
- edge—The largest inner rectangle is found that has a side parallel to one edge. Per outer polygon/hole, only edges with length greater than quarter the maximum length are considered.
The resulting shape is a rectangle seen from the predominant scope axis of the face normal. The scope's orientation is the same as in the initial shape. - selector—selector
- shape—The inner rectangle polygon.
- remainder—Selects the remainder of the polygon.
- operatorThe operator defines how the inner rectangle polygons are used to generate successor shapes. This also applies to shapes with more than one faces.
- : Each polygon is put into a new shape.
- = All polygons corresponding to the selector are combined into one new shape.
- operationsA sequence of CGA operations to execute.
Description
The innerRectangle operation finds for each face of the current shape's geometry the largest rectangle which is fully inside the face.
Note:
The face must not have self-intersections.
Related
Examples
Inner Rectangles of Lot Shapes
This example shows the largest inner rectangle aligned to the scope axes. Each polygon is a separate shape.
| |
This example shows the largest inner rectangle aligned to one edge. All polygons corresponding to the remainder are combined into one shape.
| |
This example shows how to use innerRectangle to place mass volumes in planar lots. Each rectangle has sides parallel to the scope axes.
| |
In this example the component split is used to generate a separate scope for each slanting face. Each generated inner shape is a rectangle seen from the face normal.
| |
When the scope is aligned to the world coordinate system each inner shape is a rectangle seen from the world's y axis.
|