Creating a U or L shape on another shape

09-18-2013 03:48 PM
New Contributor

I have the following code for creating a U shape, I'm attempting to essentially extrude a cube, and add a uShape on top using comp(f).

I have attached two images, if I use my start rule as "RoofTier" it creates a ushape no problem. If I use my start rule as Lot, it will extrude my lower part of the building, but the u shape is incorrect. This also happens to L shapes. Note I'm just using the "Null" rule in this case to make my floor/ceiling planes.

Does anyone have any insight? I know from images I've seen this is very possible.



version "2012.1"

attr myFrontDepth = 5
attr myRightWidth = 5
attr myLeftWidth = 5

Lot -->
 comp(f) { top : Roof | all : Null}
Roof -->

RoofTier -->
     shapeU(myFrontDepth,myRightWidth,myLeftWidth) { shape : Footprint | remainder: NIL }
Footprint -->
0 Kudos
2 Replies
by Anonymous User
Not applicable
Original User: matthiasbuehler

Hi !

The following operations need a 'yUp scope' :
setback(), shapeL(),shapeO(),shapeU().

a convention is that the scope is oriented zUp after a comp(f), thus the scope needs to be realigned. Otherwise, one experiences that one dimension of those operations to look 'incorrect'.

solution, e.g. :
Roof -->
    alignScopeToGeometry(yUp, 0)

The scope is a very very important concept in CGA, so make sure you understand this and always work with the 'Inspect Model Mode' and the 'Model Hierarchy'.

Also, check this video :

Ok so far ?

0 Kudos
New Contributor II

Thank you! Just ran into this problem trying to make a typical "five over two" podium building.

0 Kudos