Detects and retriangulates a set of coplanar facets for MeshSurfaceIntersection.
More...
#include <geogram/mesh/mesh_surface_intersection_internal.h>
Detects and retriangulates a set of coplanar facets for MeshSurfaceIntersection.
Definition at line 493 of file mesh_surface_intersection_internal.h.
◆ CoplanarFacets()
GEO::CoplanarFacets::CoplanarFacets |
( |
MeshSurfaceIntersection & |
I, |
|
|
bool |
clear_attributes, |
|
|
double |
angle_tolerance = 0.0 |
|
) |
| |
Constructs a CoplanarFacets object associated with a MeshSurfaceIntersection.
No set of facets is identified. One needs to call get().
- Parameters
-
[in] | I | a reference to the MeshSurfaceIntersection |
[in] | clear_attributes | if set, resets facet_chart and keep_vertex |
[in] | angle_tolerance | angle tolerance for detecting coplanar facets and colinear edges (in degrees) |
◆ edges_are_colinear()
Tests whether two edges are co-linear.
- Parameters
-
[in] | P1,P2,P3 | the vertices of the two edges |
- Return values
-
true | if [P1,P2] and [P2,P3] are co-linear, and P2 is between P1 and p3 |
false | otherwise |
uses angle_tolerance specified to the constructor (if set to zero, uses exact computation)
◆ find_coplanar_facets()
void GEO::CoplanarFacets::find_coplanar_facets |
( |
| ) |
|
|
protected |
Finds all the pairs of coplanar facets.
Initializes c_is_coplanar_[], a vector of booleans indexed by facet corners.
◆ get()
Gets the set of coplanar facets from a given facet and group id.
Uses the "group" facets attribute. If f's
group is uninitialized (NO_INDEX), determines the facets of the group geometrically and initializes the attribute, else gets the facets based on the attribute.
- Parameters
-
[in] | f | the facet |
[in] | group_id | the facet group id |
◆ mark_facets()
void GEO::CoplanarFacets::mark_facets |
( |
vector< index_t > & |
facet_is_marked | ) |
|
|
inline |
Marks the facets.
- Parameters
-
[out] | facet_is_marked | on exit, set to 1 for facets present in the list of coplanar facets. Needs to be of size mesh_.facets.nb(). |
Definition at line 624 of file mesh_surface_intersection_internal.h.
◆ mark_vertices_to_keep()
void GEO::CoplanarFacets::mark_vertices_to_keep |
( |
| ) |
|
Marks the vertices that need to be kept in the simplified facets.
A vertex is kept if it is incident to at least two non-colinear edges on the border. The status of the vertices is stored in the "keep" vertex attribute.
◆ nb_facets()
index_t GEO::CoplanarFacets::nb_facets |
( |
| ) |
|
|
inline |
◆ save_borders()
void GEO::CoplanarFacets::save_borders |
( |
const std::string & |
filename | ) |
|
For debugging purposes, saves border edges to a file.
- Parameters
-
[in] | filename | the file where to store the borders. |
◆ save_facet_group()
void GEO::CoplanarFacets::save_facet_group |
( |
const std::string & |
filename | ) |
|
For debugging purposes, saves all the facets of the group to a file.
- Parameters
-
[in] | filename | the file where to store the facets of the group. |
◆ triangle_normal_axis()
Gets the coordinate along which one can project a triangle without creating degeneracies.
- Parameters
-
[in] | p1,p2,p3 | the three vertices of the triangle, with exact homogeneous coordinates. |
- Returns
- one of {0,1,2}
◆ triangles_are_coplanar()
Tests whether two adjacent triangles are coplanar.
This is used to determine the facets that can be merged
- Parameters
-
[in] | P1,P2,P3,P4 | the vertices of the triangles, as points with exact homogeneous coordinates. The two triangles are P1 , P2 , P3 and P2 , P1 , P4 |
- Return values
-
true | if the two triangles are coplanar |
false | otherwise |
uses angle_tolerance specified to the constructor (if set to zero, uses exact computation)
◆ triangulate()
void GEO::CoplanarFacets::triangulate |
( |
| ) |
|
Triangulates the kept vertices.
One can get the triangle through the (public) CDT member (ExactCDT2d).
The documentation for this class was generated from the following file: