validation
triwarp.validation
Mesh diagnostics: topological/geometric validity predicates and their per-element masks.
is_edge_manifold
is_edge_manifold(
faces: array[int32],
allow_boundary_edges: bool = True,
*,
edges_sorted: Array2dInt32 | None = None,
n_vertices: int | None = None,
) -> bool
Whether every undirected mesh edge is shared by a manifold number of faces.
Counts how many faces share each undirected edge. With allow_boundary_edges=True an edge is
manifold when it belongs to one or two faces; with allow_boundary_edges=False it must belong
to exactly two faces (no boundary or non-manifold edges), matching Open3D's IsEdgeManifold.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
faces
|
array[int32]
|
Length- |
required |
allow_boundary_edges
|
bool
|
When |
True
|
edges_sorted
|
Array2dInt32 | None
|
Optional precomputed |
None
|
n_vertices
|
int | None
|
Optional vertex count (the edge-hash base). When |
None
|
Returns:
| Type | Description |
|---|---|
bool
|
|
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If |
See Also
Notes
Equivalent to open3d.geometry.TriangleMesh.is_edge_manifold; libigl is_edge_manifold
corresponds to the allow_boundary_edges=True case.
Deliberately not all(edge_manifold_mask(faces)), unlike the other is_* / *_mask
pairs here: this reduces the per-edge counts directly, where the mask additionally needs
unique_1d's inverse and a per-face gather pass. Delegating would add both to the cheap path.
Source code in triwarp/validation.py
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 | |
edge_manifold_mask
edge_manifold_mask(
faces: array[int32],
allow_boundary_edges: bool = True,
*,
edges_sorted: Array2dInt32 | None = None,
) -> wp.array[wp.bool]
Per-face flag: whether all three of each face's undirected edges are edge-manifold.
An edge is manifold when shared by one or two faces (allow_boundary_edges=True) or by
exactly two faces (allow_boundary_edges=False); a face is flagged True only when all
three of its edges qualify. This is a per-face collapse of libigl's BF (its per-corner
is_edge_manifold matrix), and
is_edge_manifold is True iff every entry of
this mask is True.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
faces
|
array[int32]
|
Length- |
required |
allow_boundary_edges
|
bool
|
When |
True
|
edges_sorted
|
Array2dInt32 | None
|
Optional precomputed |
None
|
Returns:
| Type | Description |
|---|---|
array[bool]
|
Length |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If |
See Also
Source code in triwarp/validation.py
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 | |
is_vertex_manifold
is_vertex_manifold(
faces: array[int32],
*,
face_adjacency: Array2dInt32 | None = None,
face_adjacency_edges: Array2dInt32 | None = None,
) -> bool
Whether every referenced vertex has a single edge-connected fan of faces.
A vertex is manifold when the faces incident to it form one connected group under
"shares an edge through this vertex" adjacency; two fans meeting only at the vertex (a bow-tie)
are non-manifold. Unreferenced vertices in [0, max(faces)] are treated as non-manifold,
matching libigl's is_vertex_manifold and Open3D's IsVertexManifold.
The check builds the corner graph (node 3 * f + k per face corner), links the corresponding
corners of edge-adjacent faces, and requires all corners of each vertex to fall in one connected
component.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
faces
|
array[int32]
|
Length- |
required |
face_adjacency
|
Array2dInt32 | None
|
Optional precomputed |
None
|
face_adjacency_edges
|
Array2dInt32 | None
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
bool
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If exactly one of |
RuntimeError
|
If |
Notes
Corner adjacency is derived from
face_adjacency, which pairs faces across edges shared by
exactly two faces; on edge-non-manifold meshes (an edge shared by three or more faces) read the
result together with is_edge_manifold. Equivalent
to libigl is_vertex_manifold. The output is sized to max(faces) + 1 so unreferenced
vertices in that range count as non-manifold; use
vertex_manifold_mask for a per-vertex flag
sized to a caller-provided vertex buffer.
Source code in triwarp/validation.py
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | |
vertex_manifold_mask
vertex_manifold_mask(
vertices: array[vec3], faces: array[int32]
) -> wp.array[wp.bool]
Per-vertex flag: whether each vertex has a single edge-connected fan of faces.
A vertex is manifold when the faces incident to it form one connected group under
"shares an edge through this vertex" adjacency; two fans meeting only at the vertex (a bow-tie)
are non-manifold. Unreferenced vertices are flagged False, matching libigl's
is_vertex_manifold per-vertex output B and Open3D's GetNonManifoldVertices.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vertices
|
array[vec3]
|
|
required |
faces
|
array[int32]
|
Length- |
required |
Returns:
| Type | Description |
|---|---|
array[bool]
|
Length |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If |
See Also
Source code in triwarp/validation.py
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | |
is_self_intersecting
is_self_intersecting(
mesh: Mesh, *, max_triangle_collisions: int = 32
) -> bool
Whether any two non-adjacent triangles of the mesh intersect.
Broad phase queries each triangle's AABB against mesh's BVH for candidate overlaps;
narrow phase runs Moller's interval test on each candidate pair, skipping pairs that share a
vertex. Mirrors Open3D's IsSelfIntersecting (AABB pre-test followed by a triangle-triangle
test on non-neighbouring faces). Coplanar and merely touching pairs are not intersections
-- contact alone does not count.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mesh
|
Mesh
|
Mesh to test; |
required |
max_triangle_collisions
|
int
|
Broad-phase candidate cap per query triangle. Raise this for meshes with many triangles packed into overlapping bounding boxes. |
32
|
Returns:
| Type | Description |
|---|---|
bool
|
|
Notes
Equivalent to open3d.geometry.TriangleMesh.is_self_intersecting.
Source code in triwarp/validation.py
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 | |
face_self_intersecting_mask
face_self_intersecting_mask(
vertices: array[vec3],
faces: array[int32],
*,
max_triangle_collisions: int = 32,
mesh: Mesh | None = None,
) -> wp.array[wp.bool]
Per-face flag: whether each triangle intersects some non-adjacent triangle.
Broad phase builds a warp.Mesh and queries each triangle's AABB for candidate overlaps;
narrow phase runs Moller's interval test on each candidate pair (skipping pairs that share a
vertex), and both faces of every intersecting pair are flagged.
is_self_intersecting is True iff any entry
of this mask is True.
A pair that is coplanar, or that touches without crossing, is not an intersection.
The narrow phase runs in float64 on the float32 vertices, and the reason is worth
knowing rather than taking as caution: widening is lossless, so the geometry is unchanged, and
what the precision buys is the decisions -- the sign of a plane distance and the overlap of two
intervals. Audited face for face against an independent float64 Moller implementation over
the six self-intersecting parametric surfaces plus a self-intersecting torus, at a
scale-relative tolerance of 1e-9:
| input | reference | this | second library | pymeshfix |
|---|---|---|---|---|
boy |
177 | 177 | 177 | 436 (cut) |
klein |
203 | 203 | 203 | 203 |
bohemian_dome |
161 | 161 | 161, 1 wrong either way | 168 |
figure8_klein |
174 | 174 | 190, 16 wrong | 336 (cut) |
torus (16x16) |
64 | 64 | 64 | 64 |
cross_cap |
73 | 74 | 74 | 336 (cut) |
roman |
154 | 158 | 158 | 514 (cut) |
Exact on five of seven, and identical to the second library on the other two -- where both
differ from the reference by 4 faces or fewer, all of them a vertex lying on the other
triangle's plane, which is a tolerance choice rather than a fact. In float32 the same audit
read 20 false positives and 88 false negatives on roman alone, 2 and 4 on the torus, and 1
false negative on the dome. The cost is ~4 % of this call (the narrow phase is 6-8 % of it and
doubles).
The pymeshfix column is the newest and it reads two ways at once. Where it analyses the mesh it
was handed, it agrees exactly -- 203 on klein, 64 on the torus -- and on the tangency
class it lands 7 faces away, the same order as every other implementation. The four rows marked
(cut) are not disagreements: its loader repairs connectivity before anything else and cuts the
orientation-reversing seam of a non-orientable surface, taking boy from 1 483 to 1 559
vertices at an unchanged 2 964 faces. That leaves two coincident sheets where the surface had
one, and every face along the cut then genuinely does intersect. So a comparison against it has
to establish that the load changed nothing before it means anything.
Where a comparison against another library is wanted on the singular-curve class (roman,
cross_cap), compare counts, not sets: which faces sit exactly on a tangency is the part
no two implementations agree on.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vertices
|
array[vec3]
|
|
required |
faces
|
array[int32]
|
Length- |
required |
max_triangle_collisions
|
int
|
Broad-phase candidate cap per query triangle. Raise this for meshes with many triangles packed into overlapping bounding boxes. |
32
|
mesh
|
Mesh | None
|
A |
None
|
Returns:
| Type | Description |
|---|---|
array[bool]
|
Length |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If |
See Also
Source code in triwarp/validation.py
387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 | |
is_winding_consistent
is_winding_consistent(faces: array[int32]) -> bool
Whether every shared edge is traversed in opposite directions by its two faces.
A mesh has consistent winding when, for each edge shared by two faces, the two faces list the
edge's endpoints in opposite order (so their normals agree locally). This is a property of the
current winding, unlike is_orientable, which allows
faces to be flipped. Matches trimesh.Trimesh.is_winding_consistent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
faces
|
array[int32]
|
Length- |
required |
Returns:
| Type | Description |
|---|---|
bool
|
|
Source code in triwarp/validation.py
564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 | |
edge_winding_consistent_mask
edge_winding_consistent_mask(
faces: array[int32],
edges: Array2dInt32 | None = None,
edges_sorted: Array2dInt32 | None = None,
) -> wp.array[wp.bool]
Per shared-edge flag: whether an undirected edge's two faces traverse it in opposite directions.
Built over the undirected edges shared by exactly two faces (edge groups of length two). An
entry is True when the two directed half-edges are reversed (locally consistent normals);
boundary and non-manifold edges have no entry.
is_winding_consistent is True iff every
entry is True.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
faces
|
array[int32]
|
Length- |
required |
edges
|
Array2dInt32 | None
|
Optional precomputed |
None
|
edges_sorted
|
Array2dInt32 | None
|
Optional precomputed sorted (min-first) edges in the same row order. Built from |
None
|
Returns:
| Type | Description |
|---|---|
array[bool]
|
Length |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If |
See Also
Source code in triwarp/validation.py
601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 | |
face_orientation_bits
face_orientation_bits(
faces: array[int32],
) -> tuple[
wp.array[wp.int32],
twt.Array2dInt32,
wp.array[wp.int32],
int,
]
Per-face Z2 orientation bits (relative to each component seed) plus signed face-adjacency edges.
orient[f] is 0 for a face that agrees with its connected component's seed and 1 for
a face that must be flipped to agree — the flip mask consumed by
face_flip_mask and
make_winding_consistent. m is the number of
face-adjacency rows; when m == 0 the returned signed_edges / signs are empty.
Assumes n_faces > 0 (callers guard).
This is a lower-level primitive (the underlying orientation engine behind
is_orientable and
face_flip_mask) exposed for callers that
need the raw flip bits together with the propagation edges, such as
triwarp.repair.make_winding_consistent.
The bits are solved, not propagated: orient is the Z2 potential of the signed
face-adjacency graph, computed by a parity-carrying union-find
(connected_component_parity_from_edges) in a fixed three launches. Cost
therefore depends on the mesh's size, not on the diameter of its face-adjacency graph.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
faces
|
array[int32]
|
Length- |
required |
Returns:
| Name | Type | Description |
|---|---|---|
orient |
array[int32]
|
Length |
signed_edges |
Array2dInt32
|
|
signs |
array[int32]
|
Length |
m |
int
|
Number of face-adjacency rows. |
See Also
Source code in triwarp/validation.py
668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 | |
is_orientable
is_orientable(faces: array[int32]) -> bool
Whether the faces admit a consistent orientation (allowing per-face flips).
A mesh is orientable when each face can be assigned a flip bit so that every pair of
edge-adjacent faces traverses their shared edge in opposite directions. This is a topological
property independent of the current winding, matching Open3D's IsOrientable.
Each face-adjacency edge carries a Z2 flip bit; the check seeds one bit per connected component, propagates bits across adjacencies, then verifies that no adjacency violates its constraint (a contradiction means non-orientable).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
faces
|
array[int32]
|
Length- |
required |
Returns:
| Type | Description |
|---|---|
bool
|
|
Notes
Equivalent to open3d.geometry.TriangleMesh.is_orientable. Unlike
is_winding_consistent, orientability allows
individual faces to be flipped, so a consistently-orientable mesh with inconsistent winding
still returns True.
Source code in triwarp/validation.py
752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 | |
face_flip_mask
face_flip_mask(faces: array[int32]) -> wp.array[wp.bool]
Per-face flag: whether a face must be flipped to make winding consistent within its patch.
Runs the Z2 orientation propagation over the face-adjacency graph (seeding one arbitrary
reference face per connected component) and returns True for every face whose winding
disagrees with its component's seed. Applying these flips yields a consistently wound mesh, so
this is the per-face flip mask consumed by
make_winding_consistent. A mesh that is already
consistently wound yields an all-False mask.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
faces
|
array[int32]
|
Length- |
required |
Returns:
| Type | Description |
|---|---|
array[bool]
|
Length |
Notes
The reference orientation is arbitrary per connected component, so on a non-orientable patch the
mask is still a best-effort flood-fill (matching trimesh.repair.fix_winding).
This is a different flip from
face_flipped_mask, which is about the UV
domain: this mask flags a triangle whose index order must be reversed to agree with its patch,
a property of the 3D connectivity that ignores geometry entirely, while that one flags a
triangle whose UV image has negative signed area. Neither implies the other.
Source code in triwarp/validation.py
806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 | |
is_watertight
is_watertight(
vertices: array[vec3],
faces: array[int32],
*,
edges_sorted: Array2dInt32 | None = None,
mesh: Mesh | None = None,
) -> bool
Whether the mesh bounds a closed volume with no self-intersections.
Follows Open3D's IsWatertight: the mesh must be edge-manifold with no boundary edges,
vertex-manifold, and free of self-intersections.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vertices
|
array[vec3]
|
|
required |
faces
|
array[int32]
|
Length- |
required |
edges_sorted
|
Array2dInt32 | None
|
Optional precomputed |
None
|
mesh
|
Mesh | None
|
A |
None
|
Returns:
| Type | Description |
|---|---|
bool
|
|
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If |
Notes
Equivalent to open3d.geometry.TriangleMesh.is_watertight. For the cheaper "every edge shared
by exactly two faces" test (trimesh semantics) use
is_edge_manifold with
allow_boundary_edges=False.
This is not the predicate form of
face_watertight_mask, despite the names: that
mask is trimesh's per-face edge test, while this is Open3D's three-part composition, so
all(face_watertight_mask(faces)) is the first of the three conditions and not this
function. Every other is_* / *_mask pair in this module does relate that way.
Source code in triwarp/validation.py
856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 | |
face_watertight_mask
face_watertight_mask(
faces: array[int32],
edges_sorted: Array2dInt32 | None = None,
) -> wp.array[wp.bool]
Per-face flag: whether all three of a face's undirected edges are shared by exactly two faces.
This is edge_manifold_mask with
allow_boundary_edges=False: a face is True only when none of its edges is a boundary
edge (used once) or a non-manifold edge (used three or more times). The faces that break
watertightness (trimesh's broken_faces) are flatnonzero(~face_watertight_mask(faces)).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
faces
|
array[int32]
|
Length- |
required |
edges_sorted
|
Array2dInt32 | None
|
Optional precomputed |
None
|
Returns:
| Type | Description |
|---|---|
array[bool]
|
Length |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If |
See Also
Source code in triwarp/validation.py
944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 | |
is_volume
is_volume(
vertices: array[vec3],
faces: array[int32],
*,
edges: Array2dInt32 | None = None,
edges_sorted: Array2dInt32 | None = None,
) -> bool
Whether the mesh is a valid closed volume with outward-facing normals.
Follows trimesh.Trimesh.is_volume: the mesh must be watertight (every undirected edge
shared by exactly two faces), winding-consistent, and enclose a positive signed volume (normals
point outward). A mesh with inward-facing normals encloses a negative signed volume and is
reported False.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vertices
|
array[vec3]
|
|
required |
faces
|
array[int32]
|
Length- |
required |
edges
|
Array2dInt32 | None
|
Optional precomputed |
None
|
edges_sorted
|
Array2dInt32 | None
|
Optional precomputed |
None
|
Returns:
| Type | Description |
|---|---|
bool
|
|
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If |
See Also
make_volume
Produce one: flip whatever fails this test.
volume
Measure one, once this returns True.
is_winding_consistent
is_watertight
is_orientable
trimesh.Trimesh.is_volume
Notes
Watertightness here is trimesh's "every undirected edge shared by exactly two faces" (each
sorted edge forms a group of two), and winding consistency requires the two directed copies of
every shared edge to be reversed. The signed volume is the sum of per-face signed tetrahedron
volumes dot(v0, cross(v1, v2)) / 6 measured from the origin; for a closed surface this is
independent of the reference point and its sign encodes the normal orientation.
Source code in triwarp/validation.py
982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 | |
face_defective_mask
face_defective_mask(
vertices: array[vec3],
faces: array[int32],
*,
min_quality: float | None = 0.02,
max_normal_angle: float | None = None,
max_fold_angle: float | None = None,
face_normals: array[vec3] | None = None,
) -> wp.array[wp.bool]
Flag faces that are thin, misoriented relative to their neighbourhood, or folded over it.
The three criteria are independent and a face is flagged if any enabled one fires; each is
disabled by passing None. This is the detector behind
repair.remove_folded_faces -- unlike the rest of this
module it needs geometry rather than topology, which is why it takes vertices and has no
is_* counterpart: "defective" is a threshold question, not a property of the mesh.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vertices
|
array[vec3]
|
|
required |
faces
|
array[int32]
|
Length- |
required |
min_quality
|
float | None
|
Flag a face whose |
0.02
|
max_normal_angle
|
float | None
|
Flag a face whose normal is more than this many degrees from the direction of the sum of
its edge-neighbours' normals — the local consensus. This catches a single face inserted the
wrong way round in an otherwise consistent patch. MeshLab's |
None
|
max_fold_angle
|
float | None
|
Flag a face that meets some neighbour at more than this many degrees — a fold, where
the two triangles lie almost on top of each other with opposing normals. Of the two faces at
such an edge only the one facing against its own wider neighbourhood is flagged, since
only one of them is the mistake; a face whose neighbours give it no consensus (an isolated
face, or a strip of exactly three) is therefore never flagged on this criterion alone.
MeshLab's |
None
|
face_normals
|
array[vec3] | None
|
Optional length- |
None
|
Returns:
| Type | Description |
|---|---|
array[bool]
|
Length- |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
RuntimeError
|
If |
Notes
Matches MeshLab's compute_selection_bad_faces; the three parameters are its aratio,
nfratio and folded_faces_angle_threshold.
See Also
repair.remove_folded_faces
Deletes the folded ones.
Trimesh.face_normals
Caches what face_normals wants.
repair.remove_degenerate_faces
Deletes the fully degenerate ones, on an exact test rather than a threshold.
triwarp.triangles.face_quality
The thinness measure min_quality gates on.
Source code in triwarp/validation.py
1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 | |