fmeobjects.FMEGeometryTools.closeCurve3D¶
-
FMEGeometryTools.closeCurve3D(curve, mode)¶ This function closes the curve in 3D if it is not already closed. If the curve is not 3D, it forces the curve to be 3D with default z value of 0.0. A closed curve is defined as one where the start and end points are equal in all X, Y and Z coordinates. The returned geometry may or may not be the original object that was passed in. If
Noneis passed in, nothing will be done andNonewill be returned. If a different object is returned, the original object will be destroyed. There are 3 modes that the function uses in deciding how to close the curve, namelyFME_CLOSE_3D_EXTEND_MODE,FME_CLOSE_3D_AVERAGE_MODEandFME_CLOSE_3D_EXTEND_OR_AVERAGE_Z_MODE.- In
FME_CLOSE_3D_AVERAGE_MODE, the curve is closed by modifying the current start and end points of the curve to be the average of the two points. - In
FME_CLOSE_3D_EXTEND_MODE, this method will add a straight segment from the end point to the start point to force the curve closed. - In
FME_CLOSE_3D_EXTEND_OR_AVERAGE_Z_MODE, the curve is closed using the AVERAGE mode if the start and end points only differ in Z. Otherwise, the EXTEND MODE is used.
Parameters: Return type: Returns: The closed curve. Note: This method returns a terminal geometry type of the
FMECurve; i.e. one of the leaf classes in theFMECurveinheritance graph. For example, aFMEPathis returned if the geometry truly is a path.Raises: FMEException – An exception is raised if an error occurred.
- In