SubdivideShapesSettings

Shape subdivision settings.

@example:
# Settings class used to control parameters for subdivde shapes operation
shapes = ce.getObjectsFrom(ce.scene, ce.isShape, ce.withName("'Block 1'"))
subdsettings = SubdivideShapesSettings()
subdsettings.setLotAreaMax(800)
ce.subdivideShapes(shapes, subdsettings)

 

此处定义的方法如下:

getCornerAlignment

getCornerAlignment(self):

Gets CornerAlignment field.

@return: Value of CornerAlignment field.  ["STREET_LENGTH", "STREET_WIDTH"] [str]

getCornerAngleMax

getCornerAngleMax(self):

Gets CornerAngleMax field. Corner angle threshold. If corner angle is below this value, "soft" corners are inserted.

@return: Value of CornerAngleMax field.  [float]

getCornerWidth

getCornerWidth(self):

Gets CornerWidth field. Corner width. Inserted "soft" corners have this width.

@return: Value of CornerWidth field.  [float]

getForceStreetAccess

getForceStreetAccess(self):

Gets ForceStreetAccess field. Factor to guarantee street access. A large value gives preference to splits that result in lots with street access.

@return: Value of ForceStreetAccess field.  [float]

getIrregularity

getIrregularity(self):

Gets Irregularity field. Split line irrgularity. Larger values result in split positions more distant from middle point.

@return: Value of Irregularity field.  [float]

getLotAreaMax

getLotAreaMax(self):

Gets LotAreaMax field. Maximum lot area. If the lot area is less than this value, subdivision stops.

@return: Value of LotAreaMax field.  [float]

getLotAreaMin

getLotAreaMin(self):

Gets LotAreaMin field. Minimum lot area. If the lot area is greater than this value, subdivision continues.

@return: Value of LotAreaMin field.  [float]

getLotElevation

getLotElevation(self):

Gets LotElevation field. Flat or uneven lots.

@return: Value of LotElevation field.  ["UNEVEN", "EVEN_MIN", "EVEN_MAX", "EVEN_AVG"] [str]

getLotMinWidth

getLotMinWidth(self):

Gets LotMinWidth field. Minimal lot side length. If violated, the split position is sampled again.

@return: Value of LotMinWidth field.  [float]

getLotSubdivisionMethod

getLotSubdivisionMethod(self):

Gets LotSubdivisionMethod field.

@return: Value of LotSubdivisionMethod field.  ["NONE", "SKELETON", "OFFSET", "RECURSIVE"] [str]

getOffsetWidth

getOffsetWidth(self):

Gets OffsetWidth field. Offset width. When block inwards offset is used to compute subdivision, this is the default depth of the generated lots.

@return: Value of OffsetWidth field.  [float]

getSeed

getSeed(self):

Gets Seed field. Seed.

@return: Value of Seed field.  [int]

getShallowLotFrac

getShallowLotFrac(self):

Gets ShallowLotFrac field.

@return: Value of ShallowLotFrac field.  [float]

getSimplify

getSimplify(self):

Gets Simplify field. Amount of simplification that occurs. A high value creates irregular lots with fewer verticies.

@return: Value of Simplify field.  [float]

getSubdivisionRecursive

getSubdivisionRecursive(self):

Gets SubdivisionRecursive field. Use recursive algorithm for subdivision.

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

setCornerAlignment

setCornerAlignment(self, enumValue):

Sets CornerAlignment field.

@param enumValue: the new value ["STREET_LENGTH", "STREET_WIDTH"]. [str]

setCornerAngleMax

setCornerAngleMax(self, floatValue):

Sets CornerAngleMax field. Corner angle threshold. If corner angle is below this value, "soft" corners are inserted.

@param floatValue: the new value. [float]

setCornerWidth

setCornerWidth(self, floatValue):

Sets CornerWidth field. Corner width. Inserted "soft" corners have this width.

@param floatValue: the new value. [float]

setForceStreetAccess

setForceStreetAccess(self, floatValue):

Sets ForceStreetAccess field. Factor to guarantee street access. A large value gives preference to splits that result in lots with street access.

@param floatValue: the new value. [float]

setIrregularity

setIrregularity(self, floatValue):

Sets Irregularity field. Split line irrgularity. Larger values result in split positions more distant from middle point.

@param floatValue: the new value. [float]

setLotAreaMax

setLotAreaMax(self, floatValue):

Sets LotAreaMax field. Maximum lot area. If the lot area is less than this value, subdivision stops.

@param floatValue: the new value. [float]

setLotAreaMin

setLotAreaMin(self, floatValue):

Sets LotAreaMin field. Minimum lot area. If the lot area is greater than this value, subdivision continues.

@param floatValue: the new value. [float]

setLotElevation

setLotElevation(self, enumValue):

Sets LotElevation field. Flat or uneven lots.

@param enumValue: the new value ["UNEVEN", "EVEN_MIN", "EVEN_MAX", "EVEN_AVG"]. [str]

setLotMinWidth

setLotMinWidth(self, floatValue):

Sets LotMinWidth field. Minimal lot side length. If violated, the split position is sampled again.

@param floatValue: the new value. [float]

setLotSubdivisionMethod

setLotSubdivisionMethod(self, enumValue):

Sets LotSubdivisionMethod field. The subdivision algorithm used. The recursive method is creates regular blocks, while the straight skeleton guarantees street access.

@param enumValue: the new value ["NONE", "SKELETON", "OFFSET", "RECURSIVE"]. [str]

setOffsetWidth

setOffsetWidth(self, floatValue):

Sets OffsetWidth field. Offset width. When block inwards offset is used to compute subdivision, this is the default depth of the generated lots.

@param floatValue: the new value. [float]

setSeed

setSeed(self, intValue):

Sets Seed field. Seed.

@param intValue: the new value. [int]

setShallowLotFrac

setShallowLotFrac(self, floatValue):

Sets ShallowLotFrac field.

@param floatValue: the new value. [float]

setSimplify

setSimplify(self, floatValue):

Sets Simplify field. Amount of simplification that occurs. A high value creates irregular lots with fewer verticies.

@param floatValue: the new value. [float]

setSubdivisionRecursive

setSubdivisionRecursive(self, booleanValue):

Sets SubdivisionRecursive field. Use recursive algorithm for subdivision.

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

常量

此类用于定义以下常量:

EVEN_AVG = 'EVEN_AVG'
EVEN_MAX = 'EVEN_MAX'
EVEN_MIN = 'EVEN_MIN'
NONE = 'NONE'
OFFSET = 'OFFSET'
RECURSIVE = 'RECURSIVE'
SKELETON = 'SKELETON'
STREET_LENGTH = 'STREET_LENGTH'
STREET_WIDTH = 'STREET_WIDTH'
UNEVEN = 'UNEVEN'