GenerateBridgeSettings

Fit street heights to graph.

@example:
# Settings class specifying parameters for automatically determining street heights.
settings = GenerateBridgeSettings()
settings.setObjectAttributeForAbsoluteHeight("none")
settings.setLevelHeight(50)
settings.setObjectAttributeForLevel("layer")
settings.setRampMaximumSlope(0.01)
settings.setLockNonZeroHeights(False)
settings.setAllowTunnels(True)
settings.setBridgeJoinPreference(2)
settings.setUseVisibleTerrain(False)
settings.setOnlyApplyLevelWhenStreetsCross(False)
segments = ce.getObjectsFrom(ce.scene, ce.isGraphSegment)
ce.generateBridges(segments, settings)

 

Methods defined here:

getAllowTunnels

getAllowTunnels(self):

Gets AllowTunnels field. Allow tunnels (streets below zero height).

@return: Value of AllowTunnels field.  [True/False]

getBridgeJoinPreference

getBridgeJoinPreference(self):

Gets BridgeJoinPreference field. 0 to 10; where 0 = disconnect bridges, and 10 = link bridges together.

@return: Value of BridgeJoinPreference field.  [float]

getLevelHeight

getLevelHeight(self):

Gets LevelHeight field. Vertical distance between two crossing streets.

@return: Value of LevelHeight field.  [float]

getLockNonZeroHeights

getLockNonZeroHeights(self):

Gets LockNonZeroHeights field. Do not change height of nodes with non-zero position.

@return: Value of LockNonZeroHeights field.  [True/False]

getObjectAttributeForAbsoluteHeight

getObjectAttributeForAbsoluteHeight(self):

Gets ObjectAttributeForAbsoluteHeight field. (optional) If the object attribute exists, it is used to set the total height and Level Height is discarded.

@return: Value of ObjectAttributeForAbsoluteHeight field.  [str]

getObjectAttributeForLevel

getObjectAttributeForLevel(self):

Gets ObjectAttributeForLevel field. (optional) If the object attribute exists, it is used to set the level i.e. total height equals Level Height multiplied with this attribute.

@return: Value of ObjectAttributeForLevel field.  [str]

getOnlyApplyLevelWhenStreetsCross

getOnlyApplyLevelWhenStreetsCross(self):

Gets OnlyApplyLevelWhenStreetsCross field. Only use the Level object attribute when streets cross.

@return: Value of OnlyApplyLevelWhenStreetsCross field.  [True/False]

getRampMaximumSlope

getRampMaximumSlope(self):

Gets RampMaximumSlope field. Maximum slope of (vertical climb per horizontal unit).

@return: Value of RampMaximumSlope field.  [float]

getUseVisibleTerrain

getUseVisibleTerrain(self):

Gets UseVisibleTerrain field. Treat all heights as relative above terrain (if any).

@return: Value of UseVisibleTerrain field.  [True/False]

setAllowTunnels

setAllowTunnels(self, booleanValue):

Sets AllowTunnels field. Allow tunnels (streets below zero height).

@param booleanValue: the new value. [True/False]

setBridgeJoinPreference

setBridgeJoinPreference(self, floatValue):

Sets BridgeJoinPreference field. 0 to 10; where 0 = disconnect bridges, and 10 = link bridges together.

@param floatValue: the new value. [float]

setLevelHeight

setLevelHeight(self, floatValue):

Sets LevelHeight field. Vertical distance between two crossing streets.

@param floatValue: the new value. [float]

setLockNonZeroHeights

setLockNonZeroHeights(self, booleanValue):

Sets LockNonZeroHeights field. Do not change height of nodes with non-zero position.

@param booleanValue: the new value. [True/False]

setObjectAttributeForAbsoluteHeight

setObjectAttributeForAbsoluteHeight(self, stringValue):

Sets ObjectAttributeForAbsoluteHeight field. (optional) If the object attribute exists, it is used to set the total height and Level Height is discarded.

@param stringValue: the new value. [str]

setObjectAttributeForLevel

setObjectAttributeForLevel(self, stringValue):

Sets ObjectAttributeForLevel field. (optional) If the object attribute exists, it is used to set the level i.e. total height equals Level Height multiplied with this attribute.

@param stringValue: the new value. [str]

setOnlyApplyLevelWhenStreetsCross

setOnlyApplyLevelWhenStreetsCross(self, booleanValue):

Sets OnlyApplyLevelWhenStreetsCross field. Only use the Level object attribute when streets cross.

@param booleanValue: the new value. [True/False]

setRampMaximumSlope

setRampMaximumSlope(self, floatValue):

Sets RampMaximumSlope field. Maximum slope of (vertical climb per horizontal unit).

@param floatValue: the new value. [float]

setUseVisibleTerrain

setUseVisibleTerrain(self, booleanValue):

Sets UseVisibleTerrain field. Treat all heights as relative above terrain (if any).

@param booleanValue: the new value. [True/False]