How to assign elevations

5144
30
07-01-2015 07:15 AM
JacquelineAlessi
Occasional Contributor II

I do have another question for you afterall. I have brought in a layer of all of the building floors, it contains information about the elevation of the floor of the floor and also has the height of the floor. This is very important because our buildings have irregular interstitials that have been requested to be modled true to form. I was able to create a rule to extrude each floor by the height attribute. Im stuck on trying to determine how to assign the elevations in the attributes as the "heightmap", the elevation that floor should sit on. I want this to be independant of my terrain so I assume that it has to be added to the rule. I found some information online stating that there was a way to do this but the token settings.setHeightmap say that it is undefined. Very confused: below is an example of where Im currently at:

#This attribute should be "sourced" to the object attribute

attr Height = 0

attr Elevation = 0

@StartRule

Lot -->

  extrude (Height)

  volume.

This is the example I atempted to use but I guess I dont understand it:

alignShapes(self, shapes, settings=None)Aligns a set of shapes.

@param shapes: The set of shapes to align.
@param settings: The align settings. Omit to use default settings. (default  = None).

@note: # align shapes of layer 'Lots' to layer 'Heightmap'
lotLayer = ce.getObjectsFrom(ce.scene, ce.isLayer, ce.withName("'Lots'"))
settings = AlignShapesSettings()
settings.setHeightmap('Heightmap')
settings.setAlignFunction(AlignShapesSettings.TRANSLATE_TO_MIN)
ce.alignShapes(lotLayer, settings)

0 Kudos
30 Replies
by Anonymous User
Not applicable

ColorRamp --> 

It has no contents. All rules must have at least 1 operation, or have a final shape name.

AllComponents -->

First five lines cannot be inside a rule - just move those out of the rule.

The line with Color - the color operation is case sensitive so should be:

color(Red,Green,Blue)