fmeobjects.FMEBRepSolid
addInnerSurface(surface), |
|
This method returns the bounding box of the geometry. |
|
This method returns the bounding cube of the geometry. |
|
Returns the bounds of the geometry. |
|
Remove all measures from the geometry. |
|
Copies all the attributes from the given feature to traits on this geometry, if they match the (optional) regular expression. |
|
|
Copies the name of the 'sourceGeometry' onto this geometry. |
Copies all the traits from the given geometry that match the (optional) regular expression. |
|
Copies all the traits from this geometry to attributes on the given feature, if they match the (optional) regular expression. |
|
This routine returns a copy of the given BRepSolid geometry object. |
|
Deletes the geometry's name. |
|
Reduces the geometry to 2D. |
|
|
This sets the geometry's dimension to 3D. |
This method returns the appearance reference within the Library associated with this solid. |
|
Area calculation. |
|
Returns the wireframe of the solid as a |
|
getInnerSurfaceAt(index), |
|
Retrieve the names of the measures on this geometry. |
|
This routine retrieves the 'name' of this geometry as a |
|
Returns the outer surface of this boundary-representation solid. |
|
|
Retrieves the geometry trait value of the specified trait name. |
Retrieve the names of the traits on this geometry. |
|
This method returns a tuple of a boolean, indicating if the trait is null, a boolean, indicating if the trait is missing, and an integer representing the type of the trait. |
|
|
Returns the type of given trait. |
Check if this geometry or any sub part of this geometry has measures. |
|
Returns whether or not the geometry has a name. |
|
Returns whether or not the geometry is 3D. |
|
Check if the geometry is an aggregate or multi-part collection. |
|
|
Returns |
|
Returns |
Returns the number of inner surfaces in this boundary-representation solid. |
|
|
Offsets the solid by the coords specified by 'offsetPoint'. |
|
Reorients the solid such that either all the surface normals face out from the solid geometry or all the surface normals face in to the solid geometry. |
Removes the last inner surface of this boundary-representation solid. |
|
|
Removes the measure with name 'measureName' if supplied, or the default measure, if there is one. |
|
This method has 4 modes: |
|
Renames the measure specified by 'oldMeasureName' to the new name, specified by 'newMeasureName'. |
Flips the underlying surfaces that make up the solid, such that the front and back of each surface is switched. |
|
Recursively resolves surface parts with default appearances by replacing these defaults with the inherited appearance references stored by the parent surface, if such a value exists. |
|
This reverses the order of the solid's points. |
|
|
Rotates this solid about the z-axis by the specified angle, in degrees. |
|
Scale the feature by the given amounts. |
This method associates an appearance within the Library with this solid. |
|
|
Sets the geometry's name with a |
setOuterSurface(outerSurface), |
|
|
Sets a geometry trait with the specified value. |
|
This method supplies a null trait value with a type to the geometry. |
- class FMEBRepSolid
FME BRepSolid Class
init(surface)
Create an instance of a BRepSolid geometry object.
init(outerSurface)
Creates a new BRepSolid geometry object. The surface passed in is used to define the outer surface of the BRepSolid.
- Parameters:
outerSurface (FMESurface) – The outer surface as a surface.
- Return type:
- Returns:
An instance of a BRepSolid geometry object.
init(brepsolid)
Create a copy of the passed in BRepSolid geometry object.
- Parameters:
brepsolid (FMEBRepSolid) – The BRepSolid geometry object to create a copy of.
- Return type:
- Returns:
An instance of a BRepSolid Geometry object.
- __init__(*args, **kwargs)
- addInnerSurface()
addInnerSurface(surface),
Adds an inner surface to this boundary-representation solid. If
None
is passed in, this solid will not be modified.- Parameters:
surface (FMESurface) – The surface to add to the boundary-representation solid.
- Return type:
None
- boundingBox()
This method returns the bounding box of the geometry.
- boundingCube()
This method returns the bounding cube of the geometry.
- bounds()
Returns the bounds of the geometry.
- clearMeasures()
Remove all measures from the geometry.
- Return type:
None
- copyAttributesFromFeature(sourceFeature, overwriteExisting, regexp, prefix)
Copies all the attributes from the given feature to traits on this geometry, if they match the (optional) regular expression.
- Parameters:
sourceFeature (FMEFeature) – The feature to copy attributes from.
overwriteExisting (bool) – Existing traits will be overwritten only if overwriteExisting is
True
.regexp (str) – (Optional) The regular expression to match the attributes against. If regexp is not specified, then all attributes will be copied.
prefix (str) – (Optional) The prefix is put on all the trait names as they are copied. If it is not specified, a prefix will not be added to the trait names.
- Return type:
None
- copyNameFromGeometry(sourceGeometry)
Copies the name of the ‘sourceGeometry’ onto this geometry. If ‘sourceGeometry’s name is blank or
None
, this geometry’s name will becomeNone
.- Parameters:
sourceGeometry (FMEGeometry) – The geometry to copy the name from.
- Return type:
None
- copyTraitsFromGeometry(sourceGeometry, overwriteExisting, regexp, prefix)
Copies all the traits from the given geometry that match the (optional) regular expression.
- Parameters:
sourceGeometry (FMEGeometry) – The geometry to copy traits from.
overwriteExisting (bool) – Existing traits will be overwritten only if overwriteExisting is
True
.regexp (str) – (Optional) The regular expression to match the traits against. If regexp is not specified, or is an empty string, then all traits will be copied.
prefix (str) – (Optional) The prefix is put on all the trait names as they are copied. If it is not specified, a prefix will not be added to the trait names.
- Return type:
None
- copyTraitsToFeature(destFeature, overwriteExisting, regexp, prefix)
Copies all the traits from this geometry to attributes on the given feature, if they match the (optional) regular expression.
- Parameters:
destFeature (FMEFeature) – The feature to copy traits to.
overwriteExisting (bool) – Existing attributes will be overwritten only if overwriteExisting is
True
.regexp (str) – (Optional) The regular expression to match the traits against. If regexp is not specified, or is an empty string, then all traits will be copied.
prefix (str) – (Optional) The prefix is put on all the attribute names as they are copied. If it is not specified, a prefix will not be added to the attribute names.
- Return type:
None
- createBRepSolidCopy()
This routine returns a copy of the given BRepSolid geometry object. If there are any errors, an exception is raised.
- Return type:
- Returns:
A copy of the aggregate.
- Raises:
FMEException – An exception is raised if an error occurred.
- deleteName()
Deletes the geometry’s name. If a name existed prior to this call then
True
is returned; otherwiseFalse
is returned.- Return type:
- Returns:
Returns a boolean indicating whether or not the name existed before deletion.
- force2D()
Reduces the geometry to 2D.
- Return type:
None
- force3D(newZ)
This sets the geometry’s dimension to 3D. All Z values are set to the value passed in, even if the geometry is already 3D.
- Parameters:
newZ (float) – The new Z value.
- Return type:
None
- 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. If this solid is a regular solid with no geometry instance, a
FMEException
will be thrown.- Parameters:
front (bool) – Indicates whether the appearance reference should be fetched for the front or back.
- Return type:
- Returns:
The unique appearance reference for this appearance.
- Raises:
FMEException – An exception is raised if an error occurred or this solid is a regular solid with no geometry instance.
- getAsWireFrame()
Returns the wireframe of the solid as a
FMEMultiCurve
.None
is returned if a wireframe cannot be generated.- Return type:
FMEMultiCurve or None
- Returns:
The wireframe of the solid as a
FMEMultiCurve
.
- getInnerSurfaceAt()
getInnerSurfaceAt(index),
Returns the inner surface of this boundary-representation solid at the index specified, or returns
None
if the index is out of range.- Parameters:
index (int) – The index of the inner surface to be returned.
- Return type:
FMESurface or None
- Returns:
The inner surface at the given index.
- getMeasureNames()
Retrieve the names of the measures on this geometry.
- Return type:
- Returns:
Return a tuple storing the names of the measures on this geometry. This will return an empty tuple if there are no measures. For
FMEAggregate
,FMEMultiSurface
, andFMECompositeSurface
, this will return the union of all measure names of all of its parts.
- getName()
This routine retrieves the ‘name’ of this geometry as a
str
. This will returnNone
if it did not have a name associated with it.- Return type:
str or None
- Returns:
The geometry’s name.
- getOuterSurface()
Returns the outer surface of this boundary-representation solid.
- Return type:
- Returns:
The outer surface of the BRepSolid.
- getTrait(traitName)
Retrieves the geometry trait value of the specified trait name. Null trait values will be returned as an empty string. Binary blob traits are returned as a bytearray.
None
is returned when the trait is not found on the geometry.
- getTraitNames()
Retrieve the names of the traits on this geometry.
- getTraitNullMissingAndType(traitName)
This method returns a tuple of a boolean, indicating if the trait is null, a boolean, indicating if the trait is missing, and an integer representing the type of the trait. The first boolean is
True
if ‘traitName’ maps to a null trait value on the geometry. Otherwise it isFalse
. The second boolean isTrue
if ‘traitName’ maps to a no value on the geometry. Otherwise it isFalse
. If the trait is absent,FME_ATTR_UNDEFINED
is returned for the type.The possible trait types are
FME_ATTR_UNDEFINED
,FME_ATTR_BOOLEAN
,FME_ATTR_INT8
,FME_ATTR_UINT8
,FME_ATTR_INT16
,FME_ATTR_UINT16
,FME_ATTR_INT32
,FME_ATTR_UINT32
,FME_ATTR_REAL32
,FME_ATTR_REAL64
,FME_ATTR_REAL80
,FME_ATTR_STRING
,FME_ATTR_ENCODED_STRING
,FME_ATTR_INT64
,FME_ATTR_UINT64
.
- getTraitType(traitName)
Returns the type of given trait. If the trait cannot be found,
FME_ATTR_UNDEFINED
will be returned.Returns one of
FME_ATTR_UNDEFINED
,FME_ATTR_BOOLEAN
,FME_ATTR_INT8
,FME_ATTR_UINT8
,FME_ATTR_INT16
,FME_ATTR_UINT16
,FME_ATTR_INT32
,FME_ATTR_UINT32
,FME_ATTR_REAL32
,FME_ATTR_REAL64
,FME_ATTR_REAL80
,FME_ATTR_STRING
,FME_ATTR_ENCODED_STRING
,FME_ATTR_INT64
,FME_ATTR_UINT64
.
- hasMeasures()
Check if this geometry or any sub part of this geometry has measures.
- hasName()
Returns whether or not the geometry has a name.
- is3D()
Returns whether or not the geometry is 3D.
- Return type:
- Returns:
Returns
True
if the geometry is 3D andFalse
otherwise. ForFMENull
, this method will always returnTrue
. ForFMEAggregate
,FMEMultiPoint
,FMEMultiArea
,FMEMultiText
andFMEMultiCurve
, this method will returnTrue
if any one of the sub-parts is 3D. If the collection is empty or all of its members are 2D, this method will returnFalse
.
- isCollection()
Check if the geometry is an aggregate or multi-part collection.
- measureExists(measureName)
Returns
True
if the specified measure exists andFalse
otherwise. If the ‘measureName’ parameter is not specified then the default measure is checked.
- numInnerSurfaces()
Returns the number of inner surfaces in this boundary-representation solid.
- Return type:
- Returns:
The number of inner surfaces in the BRepSolid.
- offset(offsetPoint)
Offsets the solid by the coords specified by ‘offsetPoint’.
- Parameters:
offsetPoint (FMEPoint) – The
FMEPoint
to offset the solid by.- Return type:
None
- Raises:
FMEException – An exception is raised if an error occurred.
- orient(orientation)
Reorients the solid such that either all the surface normals face out from the solid geometry or all the surface normals face in to the solid geometry.
- Parameters:
orientation (int) – Indicates the desired orientation: 0 for the front side facing out; 1 for the front side facing in.
- Return type:
None
- removeLastInnerSurface()
Removes the last inner surface of this boundary-representation solid. If there are no inner surfaces in this solid, this method will return
None
.- Return type:
FMESurface or None
- Returns:
The last inner surface of the BRepSolid or none. Note: This method returns a terminal geometry type of the
FMESurface
; i.e. one of the leaf classes in theFMESurface
inheritance graph. For example, aFMEFace
is returned if the geometry truly is a face.
- removeMeasure(measureName)
Removes the measure with name ‘measureName’ if supplied, or the default measure, if there is one.
- Parameters:
measureName (str) – (Optional) The name of the measure to remove.
- Return type:
None
- removeTraits(regexp)
This method has 4 modes:
Remove all traits at the top level: regex == NULL
Remove some traits at the top level: regex == <string>
Remove all traits at all levels: regex ==
kFME_RecurseAll
Remove some traits at all levels: regex ==
kFME_RecurseSome
<string>
For example, specifying regex == NULL for a multi-surface will remove all traits at the root level of the multi-surface, whereas specifying regex ==
kFME_RecurseSome
<string> will remove all traits from all levels of the multi surface that match <string>. If <string> is an illegal regular expression, no traits will be removed.- Return type:
None
- renameMeasure(oldMeasureName, newMeasureName)
Renames the measure specified by ‘oldMeasureName’ to the new name, specified by ‘newMeasureName’.
- reorient()
Flips the underlying surfaces that make up the solid, such that the front and back of each surface is switched. This has the effect of flipping the solid inside-out. The front and back vertex normals are swapped.
- Return type:
None
- resolvePartDefaults()
Recursively resolves surface parts with default appearances by replacing these defaults with the inherited appearance references stored by the parent surface, if such a value exists. The nearest non-default ancestor value will be used to set the default appearances on the part.
- Return type:
None
- reverse()
This reverses the order of the solid’s points.
- Return type:
None
- rotate2D(center, angle)
Rotates this solid 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:
- Return type:
None
- Raises:
FMEException – An exception is raised if an error occurred.
- scale(xScale, yScale, zScale)
Scale the feature by the given amounts.
- Parameters:
- Return type:
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 side, will override the previous appearance used with the new appearance passed in.
An appearance reference of ‘0’ represents the default appearance. Interpretation of the default appearance is left to the consumer of this geometry. When set at this
FMESolid
level, the appearance represents the default appearance to apply when the contained surfaces use the default appearance instead of a specific appearance. Contained surfaces may be found within nested solids, geometry instances that reference geometries containing surfaces, or as surfaces or multi-surfaces.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. The ‘appearanceRef’ should be a valid reference to a definition stored in the
FMELibrary
. If the reference was not found in the library, it will still attach the reference to the instance, but will throw aFMEException
. This is an unhealthy situation as it represents a ‘dangling reference’.- Parameters:
- Return type:
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.
- setName(name)
Sets the geometry’s name with a
str
. By supplying a blank name as input, this method will act asdeleteName()
.- Parameters:
name (str) – The geometry’s new name.
- Return type:
None
- setOuterSurface()
setOuterSurface(outerSurface),
Sets the outer surface of this boundary-representation solid as the specified
FMESurface
passed in. The outer surface of a boundary-representation solid must exist. Thus, ifNone
is passed in, an error will result.- Parameters:
outerSurface (FMESurface) – The
FMESurface
to be used as the outer surface for the BRepSolid.- Return type:
None
- Returns:
The existing BRepSolid with a new outer surface.
- Raises:
FMEException – An exception is raised if an error occurred, or
None
is passed in.
- setTrait(traitName, traitValue)
Sets a geometry trait with the specified value. If the geometry trait already exists, its value and type will be changed. The following type numeric mappings are used:
PyInt ==> FME_Int32
PyFloat ==> FME_Real64
PyLong ==> FME_Int64
Binary values are to be specified as bytearray values or bytes values.
- setTraitNullWithType(traitName, traitType)
This method supplies a null trait value with a type to the geometry. If a trait with the same name already exists, it is overwritten.
Trait type must be one of
FME_ATTR_UNDEFINED
,FME_ATTR_BOOLEAN
,FME_ATTR_INT8
,FME_ATTR_UINT8
,FME_ATTR_INT16
,FME_ATTR_UINT16
,FME_ATTR_INT32
,FME_ATTR_UINT32
,FME_ATTR_REAL32
,FME_ATTR_REAL64
,FME_ATTR_REAL80
,FME_ATTR_STRING
,FME_ATTR_ENCODED_STRING
,FME_ATTR_INT64
,FME_ATTR_UINT64
.