remove_point#

Polyline.remove_point(position, tolerance=1e-09)[source]#

Remove a point from an existing polyline by position.

You must enter the exact position of the vertex as a list of [x, y, z] coordinates in the object’s coordinate system.

Parameters:
positionlist

List of [x, y, z] coordinates specifying the vertex to remove.

tolerancefloat, optional

Absolute tolerance of the comparison of a specified position to the vertex positions. The default is 1e-9.

Returns:
bool

True when successful, False when failed.

References

>>> oEditor.DeletePolylinePoint

Examples

Use floating point values for the vertex positions.

>>> P = modeler.create_polyline([[0, 1, 2], [0, 2, 3], [2, 1, 4]])
>>> P.remove_point([0, 1, 2])

Use string expressions for the vertex position.

>>> P = modeler.create_polyline([[0, 1, 2], [0, 2, 3], [2, 1, 4]])
>>> P.remove_point(["0mm", "1mm", "2mm"])

Use string expressions for the vertex position and include an absolute tolerance when searching for the vertex to be removed.

>>> P = modeler.create_polyline([[0, 1, 2], [0, 2, 3], [2, 1, 4]])
>>> P.remove_point(["0mm", "1mm", "2mm"],tolerance=1e-6)