copyleft.do_meshes_intersect
do_meshes_intersect(V1, F1, V2, F2)
Finds whether two surface triangle meshes intersect.
Given two triangle meshes A and B, uses exact predicates to compute whether any pair of triangles triA and triB intersect one another.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
V1 |
numpy double array
|
Matrix of vertex coordinates of the first mesh |
required |
F1 |
numpy int array
|
Matrix of triangle indices of the first mesh |
required |
V2 |
numpy double array
|
Matrix of vertex coordinates of the second mesh |
required |
F2 |
numpy int array
|
Matrix of triangle indices of the second mesh |
required |
Returns:
Name | Type | Description |
---|---|---|
b |
bool
|
True if the meshes have non-trivial intersection, False otherwise |
inters |
numpy int array
|
One pair of intersecting triangle indices. |
See Also
mesh_boolean.
Notes
The algorithm stops when it finds one intersection; therefore, the output is not a complete list of all intersecting triangles
Examples:
# Meshes in v,f and u,g
b, inters = gpytoolbox.do_meshes_intersect(v,f,u,g)
Source code in src/gpytoolbox/copyleft/do_meshes_intersect.py
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 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 |
|