fmeobjects.FMEGeometryTools.triangulateToSurface
- FMEGeometryTools.triangulateToSurface()
triangulateToSurface(geometry),
This routine will return a
FMEGeometry
object with triangle faces. This feature can support all geometries except forFMEAggregate
,FMECSGSolid
,FMECompositeSolid
andFMEMultiSolid
. The outputFMEGeometry
is neverNone
. The resultingFMEGeometry
is not guaranteed to contain only triangles, so it is the user’s responsiblity to check this. The geometry type of the returnedFMEGeometry
object depends on the type of input geometry:If the input is a
FMETriangleStrip
,FMETriangleFan
, orFMEFace
that is already triangular, the resultingFMEGeometry
is a copy of the input geometry and hence has the same geometry type as the input.If the input is a sliver face, the resulting
FMEGeometry
is a copy of the original geometry.If the input is a non-triangular and non-sliver Face, non-triangular Area, or RectangleFace, the resulting
FMEGeometry
is aFMECompositeSurface
, whose components are triangular Faces. Otherwise the component is aFMECompositeSurface
consisting of triangular Faces.If the input is a CompositeSurface, the resulting
FMEGeometry
is aFMECompositeSurface
. The type of each component in the resultingFMECompositeSurface
is determined as described above.If the input is a MultiSurface, the resulting
FMEGeometry
is aFMEMultiSurface
. The type of each component in the resultingFMEMultiSurface
is determined as described above.If the input is a Box, Extrusion, or BRepSolid, the resulting
FMEGeometry
is aFMEBRepSolid
.If the input is a MultiArea, the resulting
IFMEGeometry
is aFMEMultiSurface
. The type of each component in the resultingFMEMultiSurface
is determined as described above.If the input is a Mesh, the resulting
FMEGeometry
is aFMEMultiSurface
.
For the case of
FMEArea
, the triangulation will occur with respect to the x- and y-coordinates, the z values are ignored, yet they will be retained in the output. If there are any errors an exception will be thrown.
- Parameters:
geometry (FMEGeometry) – The geometry to triangulate to the surface.
- Return type:
- Returns:
Note: This method returns a terminal geometry type of the
FMEGeometry
; i.e. one of the leaf classes in theFMEGeometry
inheritance graph. For example, aFMETriangleStrip
is returned if the geometry truly is a triangle strip.- Raises:
FMEException – An exception is raised if an error occurred.