RINGMesh
Version 5.0.0
A programming library for geological model meshes
|
#include <geomodel_builder_geometry.h>
Public Member Functions | |
virtual | ~GeoModelBuilderGeometryBase ()=default |
void | clear_geomodel_mesh () |
void | change_mesh_data_structure (const gmme_id &id, const MeshType type) |
Transfer general mesh information from one mesh data structure to another one. More... | |
std::unique_ptr< PointSetMeshBuilder< DIMENSION > > | create_corner_builder (index_t corner_id) |
Create a PointMeshBuilder for a given corner. More... | |
std::unique_ptr< LineMeshBuilder< DIMENSION > > | create_line_builder (index_t line_id) |
Create a LineMeshBuilder for a given line. More... | |
std::unique_ptr< SurfaceMeshBuilder< DIMENSION > > | create_surface_builder (index_t surface_id) |
Create a Mesh2DBuilder for a given surface. More... | |
virtual void | copy_meshes (const GeoModel< DIMENSION > &from) |
Copy all entity meshes from the input geomodel. More... | |
void | copy_meshes (const GeoModel< DIMENSION > &from, const MeshEntityType &entity_type) |
void | copy_mesh (const GeoModel< DIMENSION > &from, const gmme_id &mesh_entity) |
void | assign_mesh_to_entity (const MeshBase< DIMENSION > &mesh, const gmme_id &to) |
Set entity geometry from geometrical positions | |
void | set_mesh_entity_vertex (const gmme_id &entity_id, index_t v, const vecn< DIMENSION > &point, bool update) |
Sets a vertex coordinates of a GeoModelMeshEntity. More... | |
void | set_mesh_entity_vertices (const gmme_id &entity_id, const std::vector< vecn< DIMENSION > > &points, bool clear) |
Adds vertices to the mesh. More... | |
void | set_corner (index_t corner_id, const vecn< DIMENSION > &point) |
Sets the coordinates of a given existing Corner. More... | |
void | set_line (index_t line_id, const std::vector< vecn< DIMENSION > > &vertices) |
Sets the mesh of a given existing Line. More... | |
void | set_surface_geometry (index_t surface_id, const std::vector< vecn< DIMENSION > > &surface_vertices, const std::vector< index_t > &surface_polygons, const std::vector< index_t > &surface_polygon_ptr) |
Sets the points and polygons for a surface. More... | |
Set entity geometry using global GeoModel vertices | |
void | set_mesh_entity_vertex (const gmme_id &entity_id, index_t v, index_t geomodel_vertex) |
Sets the geometrical position of a vertex from a geomodel vertex. More... | |
void | set_mesh_entity_vertices (const gmme_id &entity_id, const std::vector< index_t > &geomodel_vertices, bool clear) |
Adds vertices to the mesh. More... | |
void | set_corner (index_t corner_id, index_t geomodel_vertex_id) |
Sets the vertex for a Corner. Store the info in the geomodel vertices. More... | |
void | set_line (index_t line_id, const std::vector< index_t > &unique_vertices) |
Sets one Line vertices. Store the info in the geomodel vertices. More... | |
Set entity geometry using GeoModelMeshEntity vertices | |
void | set_surface_geometry (index_t surface_id, const std::vector< index_t > &polygons, const std::vector< index_t > &polygon_ptr) |
Sets the polygons of a surface. More... | |
void | set_surface_element_geometry (index_t surface_id, index_t polygon_id, const std::vector< index_t > &corners) |
Create entity element | |
index_t | create_mesh_entity_vertices (const gmme_id &entity_id, index_t nb_vertices) |
Creates new vertices to the mesh. More... | |
index_t | create_surface_polygon (index_t surface_id, const std::vector< index_t > &vertex_indices) |
Delete mesh element entities | |
void | delete_mesh_entity_mesh (const gmme_id &E_id) |
virtual void | delete_mesh_entity_isolated_vertices (const gmme_id &E_id) |
void | delete_mesh_entity_vertices (const gmme_id &E_id, const std::vector< bool > &to_delete) |
void | delete_corner_vertex (index_t corner_id) |
void | delete_line_edges (index_t line_id, const std::vector< bool > &to_delete, bool remove_isolated_vertices) |
void | delete_surface_polygons (index_t surface_id, const std::vector< bool > &to_delete, bool remove_isolated_vertices) |
Private Member Functions | |
ringmesh_disable_copy_and_move (GeoModelBuilderGeometryBase) | |
ringmesh_template_assert_2d_or_3d (DIMENSION) | |
Friends | |
class | GeoModelBuilderBase< DIMENSION > |
class | GeoModelBuilder< DIMENSION > |
Misc | |
GeoModelBuilder< DIMENSION > & | builder_ |
GeoModel< DIMENSION > & | geomodel_ |
GeoModelAccess< DIMENSION > | geomodel_access_ |
void | set_surface_element_adjacency (index_t surface_id, index_t polygon_id, const std::vector< index_t > &adjacents) |
void | compute_surface_adjacencies (index_t surface_id, bool recompute_adjacency=true) |
Computes and sets the adjacencies between the polygons. More... | |
void | cut_surfaces_by_internal_lines () |
void | cut_surface_by_line (index_t surface_id, index_t line_id) |
Cuts a Surface along a Line assuming that the edges of the Line are edges of the Surface. More... | |
GeoModelBuilderGeometryBase (GeoModelBuilder< DIMENSION > &builder, GeoModel< DIMENSION > &geomodel) | |
void | duplicate_surface_vertices_along_line (index_t surface_id, index_t line_id) |
Duplicates the surface vertices along the fake boundary (NO_ID adjacencies but shared vertices) and duplicate the vertices. More... | |
index_t | disconnect_surface_polygons_along_line_edges (index_t surface_id, index_t line_id) |
void | update_polygon_vertex (index_t surface_id, const std::vector< index_t > &polygons, index_t old_vertex, index_t new_vertex) |
Definition at line 60 of file geomodel_builder_geometry.h.
|
virtualdefault |
|
protected |
Definition at line 264 of file geomodel_builder_geometry.cpp.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::assign_mesh_to_entity | ( | const MeshBase< DIMENSION > & | mesh, |
const gmme_id & | to | ||
) |
Definition at line 807 of file geomodel_builder_geometry.cpp.
|
inline |
Transfer general mesh information from one mesh data structure to another one.
[in] | id | the GeoModelMeshEntity id to operate on |
[in] | type | the new mesh data structure type |
Definition at line 77 of file geomodel_builder_geometry.h.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::clear_geomodel_mesh | ( | ) |
Definition at line 273 of file geomodel_builder_geometry.cpp.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::compute_surface_adjacencies | ( | index_t | surface_id, |
bool | recompute_adjacency = true |
||
) |
Computes and sets the adjacencies between the polygons.
The adjacent polygon is given for each vertex of each polygon for the edge starting at this vertex. If there is no neighbor inside the same Surface adjacent is set to NO_ID
[in] | surface_id | Index of the surface |
[in] | recompute_adjacency | If true, recompute the existing adjacencies |
Definition at line 613 of file geomodel_builder_geometry.cpp.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::copy_mesh | ( | const GeoModel< DIMENSION > & | from, |
const gmme_id & | mesh_entity | ||
) |
Definition at line 798 of file geomodel_builder_geometry.cpp.
|
virtual |
Copy all entity meshes from the input geomodel.
Definition at line 279 of file geomodel_builder_geometry.cpp.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::copy_meshes | ( | const GeoModel< DIMENSION > & | from, |
const MeshEntityType & | entity_type | ||
) |
Definition at line 788 of file geomodel_builder_geometry.cpp.
|
inline |
Create a PointMeshBuilder for a given corner.
[in] | corner_id | the corner index |
Definition at line 93 of file geomodel_builder_geometry.h.
|
inline |
Create a LineMeshBuilder for a given line.
[in] | line_id | the line index |
Definition at line 112 of file geomodel_builder_geometry.h.
index_t RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::create_mesh_entity_vertices | ( | const gmme_id & | entity_id, |
index_t | nb_vertices | ||
) |
Creates new vertices to the mesh.
[in] | entity_id | Entity index |
[in] | nb_vertices | Number of vertices to create |
Definition at line 358 of file geomodel_builder_geometry.cpp.
|
inline |
Create a Mesh2DBuilder for a given surface.
[in] | surface_id | the surface index |
Definition at line 132 of file geomodel_builder_geometry.h.
index_t RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::create_surface_polygon | ( | index_t | surface_id, |
const std::vector< index_t > & | vertex_indices | ||
) |
Definition at line 502 of file geomodel_builder_geometry.cpp.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::cut_surface_by_line | ( | index_t | surface_id, |
index_t | line_id | ||
) |
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::cut_surfaces_by_internal_lines | ( | ) |
Definition at line 636 of file geomodel_builder_geometry.cpp.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::delete_corner_vertex | ( | index_t | corner_id | ) |
Definition at line 566 of file geomodel_builder_geometry.cpp.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::delete_line_edges | ( | index_t | line_id, |
const std::vector< bool > & | to_delete, | ||
bool | remove_isolated_vertices | ||
) |
Definition at line 575 of file geomodel_builder_geometry.cpp.
|
virtual |
Reimplemented in RINGMesh::GeoModelBuilderGeometry< 3 >.
Definition at line 524 of file geomodel_builder_geometry.cpp.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::delete_mesh_entity_mesh | ( | const gmme_id & | E_id | ) |
Definition at line 511 of file geomodel_builder_geometry.cpp.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::delete_mesh_entity_vertices | ( | const gmme_id & | E_id, |
const std::vector< bool > & | to_delete | ||
) |
Definition at line 554 of file geomodel_builder_geometry.cpp.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::delete_surface_polygons | ( | index_t | surface_id, |
const std::vector< bool > & | to_delete, | ||
bool | remove_isolated_vertices | ||
) |
Definition at line 585 of file geomodel_builder_geometry.cpp.
|
protected |
Definition at line 722 of file geomodel_builder_geometry.cpp.
|
protected |
Duplicates the surface vertices along the fake boundary (NO_ID adjacencies but shared vertices) and duplicate the vertices.
Definition at line 675 of file geomodel_builder_geometry.cpp.
|
private |
|
private |
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::set_corner | ( | index_t | corner_id, |
const vecn< DIMENSION > & | point | ||
) |
Sets the coordinates of a given existing Corner.
[in] | corner_id | the index of the corner in the GeoModel |
[in] | point | the coordinates to set |
Definition at line 398 of file geomodel_builder_geometry.cpp.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::set_corner | ( | index_t | corner_id, |
index_t | geomodel_vertex_id | ||
) |
Sets the vertex for a Corner. Store the info in the geomodel vertices.
[in] | corner_id | Index of the corner |
[in] | geomodel_vertex_id | Index of the vertex in the geomodel |
Definition at line 453 of file geomodel_builder_geometry.cpp.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::set_line | ( | index_t | line_id, |
const std::vector< vecn< DIMENSION > > & | vertices | ||
) |
Sets the mesh of a given existing Line.
[in] | line_id | the index of the line in the GeoModel |
[in] | vertices | the coordinates to set |
Definition at line 408 of file geomodel_builder_geometry.cpp.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::set_line | ( | index_t | line_id, |
const std::vector< index_t > & | unique_vertices | ||
) |
Sets one Line vertices. Store the info in the geomodel vertices.
[in] | id | Line index |
[in] | unique_vertices | Indices in the geomodel of the unique vertices with which to build the Line |
Definition at line 463 of file geomodel_builder_geometry.cpp.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::set_mesh_entity_vertex | ( | const gmme_id & | entity_id, |
index_t | v, | ||
const vecn< DIMENSION > & | point, | ||
bool | update | ||
) |
Sets a vertex coordinates of a GeoModelMeshEntity.
[in] | entity_id | the entity to edit |
[in] | v | the index of the vertex in the entity |
[in] | point | the coordinates to set |
[in] | update | if true, updates all the colocated vertices to the new coordinates (i.e. if edit a Corner coordinates, it will updates its Lines, Surfaces...) |
Definition at line 288 of file geomodel_builder_geometry.cpp.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::set_mesh_entity_vertex | ( | const gmme_id & | entity_id, |
index_t | v, | ||
index_t | geomodel_vertex | ||
) |
Sets the geometrical position of a vertex from a geomodel vertex.
[in] | entity_id | Entity index |
[in] | v | Index of the vertex to modify |
[in] | geomodel_vertex | Index in GeoModelMeshVertices of the vertex giving the new position |
Definition at line 315 of file geomodel_builder_geometry.cpp.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::set_mesh_entity_vertices | ( | const gmme_id & | entity_id, |
const std::vector< vecn< DIMENSION > > & | points, | ||
bool | clear | ||
) |
Adds vertices to the mesh.
No update of the geomodel vertices is done
[in] | id | Entity index |
[in] | points | Geometric positions of the vertices to add |
[in] | clear | If true the mesh is cleared, keeping its attributes |
Definition at line 329 of file geomodel_builder_geometry.cpp.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::set_mesh_entity_vertices | ( | const gmme_id & | entity_id, |
const std::vector< index_t > & | geomodel_vertices, | ||
bool | clear | ||
) |
Adds vertices to the mesh.
No update of the geomodel vertices is done
[in] | entity_id | Entity index |
[in] | geomodel_vertices | Geometric positions of the vertices to add |
[in] | clear | If true the mesh if cleared, keeping its attributes |
Definition at line 371 of file geomodel_builder_geometry.cpp.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::set_surface_element_adjacency | ( | index_t | surface_id, |
index_t | polygon_id, | ||
const std::vector< index_t > & | adjacents | ||
) |
Definition at line 597 of file geomodel_builder_geometry.cpp.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::set_surface_element_geometry | ( | index_t | surface_id, |
index_t | polygon_id, | ||
const std::vector< index_t > & | corners | ||
) |
Definition at line 486 of file geomodel_builder_geometry.cpp.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::set_surface_geometry | ( | index_t | surface_id, |
const std::vector< vecn< DIMENSION > > & | surface_vertices, | ||
const std::vector< index_t > & | surface_polygons, | ||
const std::vector< index_t > & | surface_polygon_ptr | ||
) |
Sets the points and polygons for a surface.
If polygon_adjacencies are not given they are computed.
[in] | surface_id | Index of the surface |
[in] | surface_vertices | Coordinates of the vertices |
[in] | surface_polygons | Indices in the vertices vector to build polygons |
[in] | surface_polygon_ptr | Pointer to the beginning of a polygon in surface_polygons |
Definition at line 427 of file geomodel_builder_geometry.cpp.
void RINGMesh::GeoModelBuilderGeometryBase< DIMENSION >::set_surface_geometry | ( | index_t | surface_id, |
const std::vector< index_t > & | polygons, | ||
const std::vector< index_t > & | polygon_ptr | ||
) |
Sets the polygons of a surface.
[in] | surface_id | Index of the surface |
[in] | polygons | Indices of the mesh vertices defining the polygons |
[in] | polygon_ptr | Pointer to the beginning of a polygon in polygons |
Definition at line 441 of file geomodel_builder_geometry.cpp.
|
protected |
Definition at line 763 of file geomodel_builder_geometry.cpp.
|
friend |
Definition at line 65 of file geomodel_builder_geometry.h.
|
friend |
Definition at line 64 of file geomodel_builder_geometry.h.
|
protected |
Definition at line 386 of file geomodel_builder_geometry.h.
|
protected |
Definition at line 387 of file geomodel_builder_geometry.h.
|
protected |
Definition at line 388 of file geomodel_builder_geometry.h.