CGA: Reversing Lot normals

374
2
11-04-2012 11:27 PM
MatthiasBuehler1
Frequent Contributor
Hi,

In some cases, datasets with building footprints have some shapes which have reversed normals, so that after an initial extrude, the extrusion points down (into the ground).

This can be prevented by checking the normal right on the shape, then reversing if needed :

Lot -->
     case convert(y, scope, world, pos, 0,1,0) - convert(y, scope, 
world, pos, 0,0,0) < 0 :
         reverseNormals
         LotNormalUp
     else:
         LotNormalUp
0 Kudos
2 Replies
ErinKennedy
New Contributor
It appears I cannot do a 'negative' extrusion downward. Could I alter that script to make an upward facing lot downward facing to extrude downward? And if so, what would I change?

Thanks!
0 Kudos
MatthiasBuehler1
Frequent Contributor
of course you can extrude 'downwards', you just need to reverse the normal again.

otherwise, you can also extrude upwards, then move the whole thing down. these things are all possible in CGA.

I guess you did not yet play around with CGA, right ?

in that case, I recommend you watch the video version of tutorial 6 here:

http://forums.arcgis.com/threads/64843-CityEngine-Collection-RESOURCES-FAQ-HELP


let me know if this helps.

matt
0 Kudos