Wrapper around `Shewchuk's triangle `_. Attributes: points (:class:`numpy.ndarray`): 3D or 2D points to be triangulated. If points are embedded in 3D, they must be coplanar. segments (:class:`numpy.ndarray`): n by 2
| 2 | from .meshio import form_mesh |
| 3 | |
| 4 | class triangle(PyMesh.triangle): |
| 5 | """ Wrapper around `Shewchuk's triangle |
| 6 | <https://www.cs.cmu.edu/~quake/triangle.html>`_. |
| 7 | |
| 8 | Attributes: |
| 9 | points (:class:`numpy.ndarray`): 3D or 2D points to be triangulated. |
| 10 | If points are embedded in 3D, they must be coplanar. |
| 11 | |
| 12 | segments (:class:`numpy.ndarray`): n by 2 matrix of indices into points. |
| 13 | together ``points`` and ``segments`` defines a Planar Straight Line |
| 14 | Graph (PSLG) that triangles accepts. |
| 15 | |
| 16 | triangles (:class:`numpy.ndarray`): m by 3 matrix of indices into |
| 17 | points. When ``segments`` is empty and ``triangles`` is non-empty, |
| 18 | use triangle to refine the existing triangulation. |
| 19 | |
| 20 | holes (:class:`numpy.ndarray`): h by dim matrix of points representing |
| 21 | hole points. Alternatively, one can set ``auto_hole_detection`` to |
| 22 | True to infer holes from the input PSLG's orientation. |
| 23 | |
| 24 | min_angle (``float``): Lower bound on angle in degrees. Default is 20 |
| 25 | degress. Setting ``min_angle`` > 20.7 will loose the theoretical |
| 26 | guarentee of termination, although it often works fine in practice. |
| 27 | However, setting ``min_angle`` > 34 tends to cause triangle to not |
| 28 | terminate in practice. |
| 29 | |
| 30 | max_area (``float``): Max triangle area. Default is unbounded. |
| 31 | |
| 32 | max_areas (:class:`numpy.ndarray`): Max area scalar field. It should |
| 33 | have the same length as triangles. Not used by default. |
| 34 | |
| 35 | keep_convex_hull (``boolean``): Whether to keep all triangles inside of |
| 36 | the convex hull. Default is false. |
| 37 | |
| 38 | conforming_delaunay (``boolean``): Whether to enforce conforming |
| 39 | Delaunay triangulation. Default is false (i.e. use constrained |
| 40 | Delaunay triangulation). |
| 41 | |
| 42 | exact_arithmetic (``boolean``): Whether to use exact predicates. |
| 43 | Defeault is true. |
| 44 | |
| 45 | split_boundary (``boolean``): Whether to allow boundary to be split. |
| 46 | Default is false. |
| 47 | |
| 48 | max_num_steiner_points (``int``): The maximum number of Steiner points. |
| 49 | Default is -1 (i.e. unbounded). |
| 50 | |
| 51 | verbosity (``int``): How much info should triangle output? |
| 52 | |
| 53 | 0. no output |
| 54 | 1. normal level of output |
| 55 | 2. verbose output |
| 56 | 3. vertex-by-vertex details |
| 57 | 4. you must be debugging the triangle code |
| 58 | |
| 59 | algorithm (``str``): The Delaunay triangulation algorithm to use. |
| 60 | Choices are: |
| 61 |
no outgoing calls