Building Footprints to extruded buildings.

971
3
07-23-2013 08:13 AM
DevonJenkins
Occasional Contributor
Hi M. ,

I know you've more then likely answered this question a thousand times, so I apologize in advance. But If I'm importing building foot prints with a height/Z attribute how can I procedurally extrude these buildings to create simple polygons?

More Specifically, I'd like to use the Zoning.cga found in the red lands redevelopment example, as my cityengine model will be used for urban planning.

Please see attached photo to confirm the rule. Can i link my SHP height attributes to this rule with MINIMAL CGA coding...as I consider my self to be basically CGA illiterate.

Thanks,
Devon
0 Kudos
3 Replies
JoanneO_Brien
Occasional Contributor
In order to assess the height attribute in your shapefile you need an attribute to link to this. The attribute must be the exact name of the attribute in your shapefile and is case sensitive eg:

att height = 0


Once you have your link (add this to the Zoning.cga in your case) you can then modify the cga to use these height values.

In your case I'd suggest that you add the attribute link, and then tell the maximum height to use this value

eg:

attr height = 0  # your attribute link

@Description("Set Height_Method control (above) to Max_Height to use this.")
@Group("3D FORM - HEIGHT LIMIT") @Order(2)
attr Max_Height = heightBld # this means that it's going to use your attribute height as the Max_Height


This code has been structured with two different method's for showing the building height. The first method is by the number of floors in the building, but in the method you want it's by the Limit Height to Max_Height value. So you have two options. You can either manually change the Height_Method to this in the Inspector window, or if you want this for all your buildings, then I suggest you change it in the code, this is just above where you changed the Max_Height

@Description("Determines height limit of zoning envelope.")
@Group("3D FORM - HEIGHT LIMIT",3) @Order(1) @Range("Limit Height to Max_Height", "Limit Height to Floor_Count_Max")
attr Height_Method = "Limit Height to Floor_Count_Max"


hope that helps!
0 Kudos
DevonJenkins
Occasional Contributor
I'll give it a whirl...... haha. Thanks for your response! I'll let you know how it goes.
0 Kudos
DevonJenkins
Occasional Contributor
hey hey,

thanks again. Worked without any problems :).
0 Kudos