curvey.triangulation¤
triangulation
¤
Triangulation
¤
A set of triangles defined by vertex coordinates and connectivity array
Parameters:
Name | Type | Description | Default |
---|---|---|---|
points |
PointsLike
|
|
required |
faces |
TrisLike
|
|
required |
Source code in src\curvey\triangulation.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
|
boundary_edges: curvey.edges.Edges
cached
property
¤
Edges on the boundary of the triangulation
Boundary edges are edges that only belong to one triangle.
edge: ndarray
cached
property
¤
A (n_tris, 2, 2)
array of edge vectors
self.edge[i, 0]
and self.edge[i, 1]
are the unnormalized edge vectors of the first
two edges in triangle i
.
edges: ndarray
cached
property
¤
A (n_faces * 3, 2)
array of edge connectivity
faces: ndarray = asanyarray(faces)
instance-attribute
¤
(n_faces, 3)
integer array of vertex indices.
is_boundary_vertex: ndarray
cached
property
¤
`(n_points,) vector of booleans True if the vertex is on the triangulation boundary
n_faces: int
property
¤
Number of triangles
n_points: int
property
¤
Number of points
points: ndarray = asanyarray(points)
instance-attribute
¤
(n_points, 2)
array of vertex coordinates.
shapely: shapely.MultiPolygon
cached
property
¤
A shapely.MultiPolygon
of trangles
signed_area: ndarray
cached
property
¤
A length n_tris
vector of signed triangle areas
tree: shapely.STRtree
cached
property
¤
A shapely.STRtree
of the triangles
boundary_loops(idx_name: str | None = None) -> Iterator[curvey.curve.Curve]
¤
Iterate over directed boundary loops
Parameters:
Name | Type | Description | Default |
---|---|---|---|
idx_name |
str | None
|
If supplied, the original point index is stored in the curve metadata parameter
named |
None
|
Yields:
Name | Type | Description |
---|---|---|
loop |
Curve
|
Boundary loop as a |
Source code in src\curvey\triangulation.py
plot_tris(ax: Axes | None = None, **kwargs) -> tuple[Line2D, Line2D]
¤
Plot the triangulation
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ax |
Axes | None
|
Axes to plot in, default current axes. |
None
|
**kwargs |
Passed to |
{}
|
Source code in src\curvey\triangulation.py
reverse() -> Triangulation
¤
signed_distance(points: PointsLike) -> ndarray
¤
Signed distance from the boundary
Signed distance is positive if the point is outside the triangulation, negative inside, and zero if the point is on the boundary.