Module fmeobjects :: Class FMEMultiSolid
[hide private]
[frames] | no frames]

Class FMEMultiSolid


init(MultipleInvocations)

Create an instance of a Multi-Solid geometry object.

init()

Default FMEMultiSolid constructor.

Returns: FMEMultiSolid

init(multiSolid)

Create a copy of the passed in Multi-Solid geometry object.

Parameters

Returns: FMEMultiSolid

Instance Methods [hide private]
 
__decIterRef__(args)
 
__incIterRef__(args)
 
__init__(MultipleInvocations)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__iter__(x)
iter(x)
None
appendPart(solid)
This appends the solid to the multi solid.
None
appendParts(multiSolid)
This appends the multi solid passed in to the multi solid.
int
getAppearanceReference(front)
This method returns the appearance reference within the Library associated with this solid.
FMEMultiCurve or None
getAsWireFrame()
Returns the wireframe of the multisolid as a FMEMultiCurve.
FMESolid of a terminal type or None
getPartAt(index)
This method returns the solid at the given index.
int
numParts()
This returns the number of solids that make up this multi solid.
None
offset(offsetPoint)
Offsets the geometry by the coords specified by offsetPoint.
FMESolid of a terminal type or None
removeLastPart()
This removes and returns the last solid of the multi solid.
None
resolvePartDefaults()
Recursively resolves parts with default appearances by replacing these defaults with the inherited appearance references stored by the parent geometry, if such a value exists.
None
rotate2D(center, angle)
Rotates the contained solids about the z-axis by the specified angle, in degrees.
None
scale(xscale, yscale, zscale)
Scales the contained solids by the scaling factors, relative to the origin.
None
setAppearanceReference(appearanceRef, front)
This method associates an appearance within the Library with this solid.

Inherited from FMEGeometry: __getObject__, __new__, boundingBox, boundingCube, bounds, clearMeasures, copyAttributesFromFeature, copyNameFromGeometry, copyTraitsFromGeometry, copyTraitsToFeature, deleteName, force2D, force3D, getArea, getMeasureNames, getName, getTrait, getTraitNames, getTraitNullMissingAndType, getTraitType, hasMeasures, hasName, is3D, isCollection, measureExists, removeMeasure, removeTraits, renameMeasure, setName, setTrait, setTraitNullWithType

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(MultipleInvocations)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__

appendPart(solid)

 

This appends the solid to the multi solid. If None is passed in, nothing will be appended. All solids in the multi solid will be forced to have the same dimension. If any 3D solids exist, all 2D solids will be converted to 3D with a default Z value of 0.0.

Parameters:
  • solid (FMESolid) - The solid to be appended.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

appendParts(multiSolid)

 

This appends the multi solid passed in to the multi solid. If None is passed in, nothing will be appended.

Parameters:
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

getAppearanceReference(front)

 

This method returns the appearance reference within the Library associated with this solid. The front parameter controls whether this query should return the front or the back appearance reference. Both can be fetched independently. There is no checking as to whether the appearance associated with this reference still exists in the Library or not; in healthy situations it is expected to be, though. An appearance reference of '0' represents the default appearance, and will not be found in the Library. '0' indicates this geometry should inherit the appearance from its parent; if it has no parent then interpretation of the default appearance is left to the consumer of this geometry.

Parameters:
  • front (bool) - Indicates whether the appearance reference should be fetched for the front or back.
Returns: int
The unique appearance reference for this appearance.
Raises:
  • FMEException - An exception is raised if an error occurred.

getAsWireFrame()

 

Returns the wireframe of the multisolid as a FMEMultiCurve. None is returned if a wireframe cannot be generated.

Returns: FMEMultiCurve or None
The wireframe of the multisolid as a FMEMultiCurve

getPartAt(index)

 

This method returns the solid at the given index. None is returned if the index is out of range.

Parameters:
  • index (int) - The index of the solid part to return.
Returns: FMESolid of a terminal type or None
The solid at the given index. Note: This method returns a terminal solid type of the FMESolid; i.e. one of the leaf classes in the FMESolid inheritance graph. For example, a FMELine is returned if the solid truly is a line.
Raises:
  • FMEException - An exception is raised if an error occurred.

numParts()

 

This returns the number of solids that make up this multi solid.

Returns: int
The number of solids in multi solid.

offset(offsetPoint)

 

Offsets the geometry by the coords specified by offsetPoint.

Parameters:
  • offsetPoint (FMEPoint) - The point to offset the coordinates of the geometry by.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

removeLastPart()

 

This removes and returns the last solid of the multi solid. If there are no solids in the multi solid, it will return None.

Returns: FMESolid of a terminal type or None
The last solid of the multi solid. Note: This method returns a terminal solid type of the FMESolid; i.e. one of the leaf classes in the FMESolid inheritance graph. For example, a FMELine is returned if the solid truly is a line.
Raises:
  • FMEException - An exception is raised if an error occurred.

resolvePartDefaults()

 

Recursively resolves parts with default appearances by replacing these defaults with the inherited appearance references stored by the parent geometry, if such a value exists. The nearest non-default ancestor value will be used to set the default appearances on the part.

Returns: None

rotate2D(center, angle)

 

Rotates the contained solids about the z-axis by the specified angle, in degrees. The rotation is performed relative to the center specified. A positive angle corresponds to a counter-clockwise rotation, when looking down onto the XY-plane.

Parameters:
  • center (FMEPoint) - The center of the rotation.
  • angle (float) - The angle in degrees.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

scale(xscale, yscale, zscale)

 

Scales the contained solids by the scaling factors, relative to the origin.

Parameters:
  • xscale (float) - The x scale factor.
  • yscale (float) - The y scale factor.
  • zscale (float) - The z scale factor.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

setAppearanceReference(appearanceRef, front)

 

This method associates an appearance within the Library with this solid. This is done by passing in the unique appearance reference for this appearance. Subsequent calls to this method on the same, will override the previous appearance used with the new appearance passed in. An appearance reference of '0' represents the default appearance. Intepretation of the default appearance if left to the consumer of this geometry. When set at this FMEMultiSolid level, the appearance to apply when the contained solids and surfaces use the default appearance instead of a specific appearance. The second parameter controls whether this action should take place on the front of the contained surfaces or the back. Both can be set independently. This method returns true if the reference was found on the Library. If the reference was not found in the library, it will still attach the reference to the solid, but will return false. This is an unhealthy situation, as it represents a "dangling reference" and the user should decide to remedy this by either adding an Appearance with that exact reference to the Library, or else remove from this solid.

Parameters:
  • appearanceRef (int) - The unique appearance reference for this appearance.
  • front (bool) - Boolean indicating whether the appearance reference should be set for the front or back of the solid.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred or the reference was not found in the library and a dangling reference was attached.