shapeU

Syntax

  • shapeU(frontWidth, rightWidth, leftWidth) { selector operator operations |  }

Parameters

  1. frontWidthfloatDepth of front wing. 
  2. rightWidthfloatWidth of right wing. 
  3. leftWidthfloatWidth of left wing. 
  4. selectorselector
    • shape—The setback polygon.
    • remainder—Selects the remainder of the polygon. 
  5. operatorfloatThe operator defines how the setback polygons are used to generate successor shapes. This also applies to shapes with more than one faces. Valid operators are: 
    • —each polygon is put into a new shape.
    • =—all polygons corresponding to the selector are combined into one new shape.
  6. operationsfloatA sequence of CGA operations to execute. 

Description

The shapeU operation selects a number of edges, depending on predefined spatial selectors, and set them back by a user-defined distance.

Note:

This operation is another way of applying setbacks.

shapeU(frontWidth, rightWidth, leftWidth) { selector operator operations | … }

can also be achieved with the setback operation and the comp function:

setback( comp(fe) { front=frontWidth | left=leftWidth | rigth=rightWidth} ) { selector operator operations | … }

Examples

A block filled with U-shapes:Block filled with U-shapes

attr myFrontDepth = 5
attr myRightWidth = 3
attr myLeftWidth = 11

LotInner -->
    Lot
		
Lot -->
    offset(-3, inside)
    shapeU(myFrontDepth,myRightWidth,myLeftWidth) { shape     : Footprint 
                                                  | remainder : NIL }
	
Footprint -->
    extrude(rand(10,20)) 
	color(1,0,0)

Was this article helpful?