innerRectangle

Synopsis

innerRectangle(alignment) { selector operator operations | selector operator operations }

The innerRectangle operation finds for each face of the current shape's geometry the largest rectangle which is fully inside the face.

The face must not have self-intersections.

Parameters

 

Related

Examples

Inner Rectangles of Lot Shapes


InnerRectangle Scope
				
Lot-->	
   innerRectangle(scope) {shape : Color | remainder : Color}
Color-->
   color(rand(1),rand(1),rand(1))
				
This example shows the largest inner rectangle aligned to the scope axes. Each polygon is a separate shape.

InnerRectangle Edge
Lot-->
   innerRectangle(edge) {shape : Color | remainder = Color}
				
This example shows the largest inner rectangle aligned to one edge. All polygons corresponding to the remainder are combined into one shape.

InnerRectangle Lot 1
Lot-->
   innerRectangle(scope) { shape : Extrude | remainder : Color }
Extrude-->
   extrude(5)
Color-->
   color(0,1,0)
				
This example shows how to use innerRectangle to place mass volumes in planar lots. Each rectangle has sides parallel to the scope axes.

InnerRectangle Lot 2
Lot-->
   comp(f) { all : Rectangle }
Rectangle-->
   innerRectangle(scope) { shape : Extrude | remainder : Color }
				
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.

InnerRectangle Lot 3
Lot-->
   alignScopeToAxes()
   innerRectangle(scope) { shape : Extrude | remainder : Color }
Extrude-->
   extrude(world.up.flatTop, 10)
				
When the scope is aligned to the world coordinate system each inner shape is a rectangle seen from the world's y axis.

Copyright ©2008-2016 Esri R&D Center Zurich. All rights reserved.