Triangulator3¶
from acron.core import Triangulator3
- class Triangulator3¶
Bases:
Bases:
TriangulatorThis is an extension of Triangulator to handle polygons with three- dimensional points. It assumes all of the points lie in a single plane, and internally projects the supplied points into 2-D for passing to the underlying Triangulator object.
Inheritance diagram
digraph inheritancec53755f033 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "Triangulator" [URL="acron.core.Triangulator.html#acron.core.Triangulator",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "Triangulator" [arrowsize=0.75,style=""]; "Triangulator3" [URL="acron.core.Triangulator3.html#acron.core.Triangulator3",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "Triangulator" -> "Triangulator3" [arrowsize=0.75,style=""]; }- __init__()¶
- add_vertex()¶
Adds a new vertex to the vertex pool. Returns the vertex index number.
Adds a new vertex to the vertex pool. Returns the vertex index number.
- clear()¶
Removes all vertices and polygon specifications from the Triangulator, and prepares it to start over.
- get_num_vertices()¶
Returns the number of vertices in the pool. Note that the Triangulator might append new vertices, in addition to those added by the user, if any of the polygon is self-intersecting, or if any of the holes intersect some part of the polygon edges.
- get_plane()¶
Returns the plane of the polygon. This is only available after calling
triangulate().
- get_vertex()¶
Returns the nth vertex.
- property plane LPlaned¶
Returns the plane of the polygon. This is only available after calling
triangulate().
- triangulate()¶
Does the work of triangulating the specified polygon. After this call, you may retrieve the new triangles one at a time by iterating through get_triangle_v0/1/2().