RINGMesh
Version 5.0.0
A programming library for geological model meshes
|
Try repairing a supposedly invalid GeoModel. More...
#include <geomodel_builder_repair.h>
Public Types | |
enum | RepairMode { ALL, BASIC, COLOCATED_VERTICES, DEGENERATE_FACETS_EDGES, LINE_BOUNDARY_ORDER, CONTACTS, ISOLATED_VERTICES } |
Public Member Functions | |
void | repair (RepairMode repair_mode) |
Repair a GeoModel according a repair mode. More... | |
Private Member Functions | |
ringmesh_disable_copy_and_move (GeoModelBuilderRepair) | |
ringmesh_template_assert_2d_or_3d (DIMENSION) | |
GeoModelBuilderRepair (GeoModelBuilder< DIMENSION > &builder, GeoModel< DIMENSION > &geomodel) | |
~GeoModelBuilderRepair ()=default | |
void | geomodel_mesh_repair () |
void | remove_colocated_entity_vertices_and_update_gm () |
void | remove_degenerate_polygons_and_edges_and_update_gm () |
void | repair_line_boundary_vertex_order () |
For all the lines in the geomodel, switch line boundaries if the way of their indices does not follow the way of the vertex indices. More... | |
void | remove_isolated_vertices () |
remove isolated vertices on GeoModelMeshEntities More... | |
void | remove_isolated_vertices_base () |
void | remove_isolated_vertices_on_mesh_entity (const GeoModelMeshEntity< DIMENSION > &geomodel_mesh_entity) |
remove isolated vertices on a GeoModelMeshEntity More... | |
index_t | repair_line_mesh (const Line< DIMENSION > &line) |
Detect and remove degenerate edges in a. More... | |
std::vector< bool > | line_detect_degenerate_edges (const Line< DIMENSION > &line, std::vector< index_t > &colocated_vertices) |
std::vector< index_t > | surface_detect_degenerate_polygons (const Surface< DIMENSION > &surface, std::vector< index_t > &colocated_vertices) |
bool | polygon_is_degenerate (const Surface< DIMENSION > &surface, index_t polygon_id, std::vector< index_t > &colocated_vertices) |
Tests whether a polygon is degenerate. More... | |
index_t | detect_degenerate_polygons (const Surface< DIMENSION > &surface) |
Detect and remove degenerated polygons in a Surface. More... | |
void | remove_degenerate_polygons_and_edges (std::set< gmme_id > &to_remove) |
Remove degenerate polygons and edges from the Surface and Line of the geomodel. More... | |
void | remove_colocated_entity_vertices (std::set< gmme_id > &to_remove) |
Remove colocated vertices of the geomodel. More... | |
std::set< index_t > | vertices_on_inside_boundary (const gmme_id &E_id) |
bool | edge_is_degenerate (const Line< DIMENSION > &line, index_t edge, const std::vector< index_t > &colocated_vertices) |
Checks if an edge is degenerate. More... | |
void | build_contacts () |
template<> | |
void | remove_isolated_vertices () |
template<> | |
void | remove_isolated_vertices () |
Private Attributes | |
GeoModelBuilder< DIMENSION > & | builder_ |
GeoModel< DIMENSION > & | geomodel_ |
GeoModelAccess< DIMENSION > | geomodel_access_ |
Friends | |
class | GeoModelBuilderBase< DIMENSION > |
class | GeoModelBuilder< DIMENSION > |
Try repairing a supposedly invalid GeoModel.
Remove colocated vertices in all GeoModelMeshEntity. Remove degenerated edges and polygons in Surfaces and Lines.
Definition at line 64 of file geomodel_builder_repair.h.
enum RINGMesh::GeoModelBuilderRepair::RepairMode |
Enumeration of the different repair modes.
Enumerator | |
---|---|
ALL | |
BASIC | |
COLOCATED_VERTICES | |
DEGENERATE_FACETS_EDGES | |
LINE_BOUNDARY_ORDER | |
CONTACTS | |
ISOLATED_VERTICES |
Definition at line 75 of file geomodel_builder_repair.h.
|
private |
Definition at line 52 of file geomodel_builder_repair.cpp.
|
privatedefault |
|
private |
Definition at line 547 of file geomodel_builder_repair.cpp.
|
private |
Detect and remove degenerated polygons in a Surface.
[in,out] | surface | Surface to check for potential degenerate polygons. |
surface
. Definition at line 275 of file geomodel_builder_repair.cpp.
|
private |
Checks if an edge is degenerate.
An edge is degenerate if both vertices are colocated.
[in] | line | Line to check the edge edge . |
[in] | edge | edge index in Line line . |
[in] | colocated_vertices | contains the colocated mapping of the Line. |
Definition at line 534 of file geomodel_builder_repair.cpp.
|
private |
All implemented repair for a GeoModel.
Definition at line 92 of file geomodel_builder_repair.cpp.
|
private |
Definition at line 291 of file geomodel_builder_repair.cpp.
|
private |
Tests whether a polygon is degenerate.
[in] | surface | the Surface that the polygon belongs to |
[in] | polygon_id | the index of the polygon in S |
[out] | colocated_vertices | contains the found colocated vertices in f if any. |
f
has duplicated vertices, false otherwise Definition at line 232 of file geomodel_builder_repair.cpp.
|
private |
Remove colocated vertices of the geomodel.
[out] | to_remove | gmme_t of the entities of the geomodel that are empty once degenerate entities are removed |
Definition at line 438 of file geomodel_builder_repair.cpp.
|
private |
Remove the colocated vertices in all the GeoModelMeshEntities within the GeoModel. GeoModelMeshEntities without any vertex anymore (after the removal of the vertices) are removed off the GeoModel.
Definition at line 118 of file geomodel_builder_repair.cpp.
|
private |
Remove degenerate polygons and edges from the Surface and Line of the geomodel.
[out] | to_remove | gmme_t of the entities (Surface and Line) of the geomodel that are empty once degenerate entities are removed |
Definition at line 324 of file geomodel_builder_repair.cpp.
|
private |
Remove the degenerated polygons in all the Surfaces and all the degenerate edges in all the Lines within the GeoModel. Degeneration is due to colocated vertices. Surfaces and Lines without any vertex anymore (after the removal of the vertices) are removed off the GeoModel.
TODO when it will works, use GeoModelBuilderRemoval::remove_entities_and_dependencies
Definition at line 134 of file geomodel_builder_repair.cpp.
|
private |
remove isolated vertices on GeoModelMeshEntities
|
private |
Definition at line 169 of file geomodel_builder_repair.cpp.
|
private |
Definition at line 186 of file geomodel_builder_repair.cpp.
|
private |
Definition at line 199 of file geomodel_builder_repair.cpp.
|
private |
remove isolated vertices on a GeoModelMeshEntity
[in] | geomodel_mesh_entity | The GeoModelMeshEntity to repair |
Definition at line 209 of file geomodel_builder_repair.cpp.
void RINGMesh::GeoModelBuilderRepair< DIMENSION >::repair | ( | RepairMode | repair_mode | ) |
Repair a GeoModel according a repair mode.
[in] | repair_mode | repair mode to apply. |
Definition at line 61 of file geomodel_builder_repair.cpp.
|
private |
For all the lines in the geomodel, switch line boundaries if the way of their indices does not follow the way of the vertex indices.
Definition at line 153 of file geomodel_builder_repair.cpp.
|
private |
Detect and remove degenerate edges in a.
line. |
We have a problem if some vertices are left isolated If we remove them here we can kill all indices correspondances
Definition at line 305 of file geomodel_builder_repair.cpp.
|
private |
|
private |
|
private |
Definition at line 261 of file geomodel_builder_repair.cpp.
|
private |
Get the indices of the duplicated vertices that are on an inside border. Only the vertex with the biggest index are added.
[in] | E_id | GeoModelMeshEntity to check. |
Definition at line 382 of file geomodel_builder_repair.cpp.
|
friend |
Definition at line 69 of file geomodel_builder_repair.h.
|
friend |
Definition at line 68 of file geomodel_builder_repair.h.
|
private |
Definition at line 224 of file geomodel_builder_repair.h.
|
private |
Definition at line 225 of file geomodel_builder_repair.h.
|
private |
Definition at line 226 of file geomodel_builder_repair.h.