59 template < index_t DIMENSION >
70 void clear_geomodel_mesh();
81 geomodel_access_.modifiable_mesh_entity(
id ) );
92 std::unique_ptr< PointSetMeshBuilder< DIMENSION > >
97 geomodel_access_.modifiable_mesh_entity(
id );
117 geomodel_access_.modifiable_mesh_entity(
id );
131 std::unique_ptr< SurfaceMeshBuilder< DIMENSION > >
136 geomodel_access_.modifiable_mesh_entity(
id );
156 void assign_mesh_to_entity(
173 void set_mesh_entity_vertex(
const gmme_id& entity_id,
185 void set_mesh_entity_vertices(
const gmme_id& entity_id,
215 void set_surface_geometry( index_t surface_id,
217 const std::vector< index_t >& surface_polygons,
218 const std::vector< index_t >& surface_polygon_ptr );
234 void set_mesh_entity_vertex(
235 const gmme_id& entity_id, index_t v, index_t geomodel_vertex );
245 void set_mesh_entity_vertices(
const gmme_id& entity_id,
246 const std::vector< index_t >& geomodel_vertices,
256 void set_corner( index_t corner_id, index_t geomodel_vertex_id );
267 index_t line_id,
const std::vector< index_t >& unique_vertices );
282 void set_surface_geometry( index_t surface_id,
283 const std::vector< index_t >& polygons,
284 const std::vector< index_t >& polygon_ptr );
286 void set_surface_element_geometry( index_t surface_id,
288 const std::vector< index_t >& corners );
301 index_t create_mesh_entity_vertices(
302 const gmme_id& entity_id, index_t nb_vertices );
304 index_t create_surface_polygon(
305 index_t surface_id,
const std::vector< index_t >& vertex_indices );
312 void delete_mesh_entity_mesh(
const gmme_id& E_id );
313 virtual void delete_mesh_entity_isolated_vertices(
315 void delete_mesh_entity_vertices(
316 const gmme_id& E_id,
const std::vector< bool >& to_delete );
317 void delete_corner_vertex( index_t corner_id );
318 void delete_line_edges( index_t line_id,
319 const std::vector< bool >& to_delete,
320 bool remove_isolated_vertices );
321 void delete_surface_polygons( index_t surface_id,
322 const std::vector< bool >& to_delete,
323 bool remove_isolated_vertices );
330 void set_surface_element_adjacency( index_t surface_id,
332 const std::vector< index_t >& adjacents );
346 void compute_surface_adjacencies(
347 index_t surface_id,
bool recompute_adjacency =
true );
349 void cut_surfaces_by_internal_lines();
358 void cut_surface_by_line( index_t surface_id, index_t line_id );
368 void duplicate_surface_vertices_along_line(
369 index_t surface_id, index_t line_id );
377 index_t disconnect_surface_polygons_along_line_edges(
378 index_t surface_id, index_t line_id );
380 void update_polygon_vertex( index_t surface_id,
381 const std::vector< index_t >& polygons,
383 index_t new_vertex );
393 template < index_t DIMENSION >
426 gmme_id id( Region3D::type_name_static(), region_id );
427 GeoModelMeshEntity3D& region =
428 geomodel_access_.modifiable_mesh_entity(
id );
429 GeoModelMeshEntityAccess3D region_access( region );
431 *region_access.modifiable_mesh() );
435 void copy_meshes(
const GeoModel3D& geomodel )
override;
437 void set_region_element_geometry( index_t region_id,
439 const std::vector< index_t >& corners );
448 void set_region_geometry( index_t region_id,
449 const std::vector< vec3 >& points,
450 const std::vector< index_t >& tetras );
452 index_t create_region_cell( index_t region_id,
454 const std::vector< index_t >& vertex_indices );
463 index_t create_region_cells(
464 index_t region_id,
CellType type, index_t nb_cells );
466 void delete_region_cells( index_t region_id,
467 const std::vector< bool >& to_delete,
468 bool remove_isolated_vertices );
480 void compute_region_adjacencies(
481 index_t region_id,
bool recompute_adjacency =
true );
483 void cut_regions_by_internal_surfaces();
485 void cut_region_by_surface( index_t region_id, index_t surface_id );
487 void delete_mesh_entity_isolated_vertices(
488 const gmme_id& E_id )
override;
492 GeoModelBuilder3D& builder, GeoModel3D& geomodel )
497 void assign_region_tet_mesh(
498 index_t region_id,
const std::vector< index_t >& tet_vertices );
500 void update_cell_vertex( index_t region_id,
501 const std::vector< index_t >& cells,
503 index_t new_vertex );
505 void duplicate_region_vertices_along_surface(
506 index_t region_id, index_t surface_id );
508 index_t disconnect_region_cells_along_surface_polygons(
509 index_t region_id, index_t surface_id );
#define ringmesh_disable_copy_and_move(Class)
void change_mesh_data_structure(const gmme_id &id, const MeshType type)
Transfer general mesh information from one mesh data structure to another one.
Abstract base class for GeoModelMeshEntity.
GEO::vecng< DIMENSION, double > vecn
static std::unique_ptr< LineMeshBuilder > create_builder(LineMesh< DIMENSION > &mesh)
static std::unique_ptr< PointSetMeshBuilder< DIMENSION > > create_builder(PointSetMesh< DIMENSION > &mesh)
std::unique_ptr< SurfaceMeshBuilder< DIMENSION > > create_surface_builder(index_t surface_id)
Create a Mesh2DBuilder for a given surface.
Base class to build or edit a GeoModel.
#define ringmesh_template_assert_2d_or_3d(type)
A GeoModelEntity of type CORNER.
void change_mesh_data_structure(const MeshType &type)
static std::unique_ptr< VolumeMeshBuilder< DIMENSION > > create_builder(VolumeMesh< DIMENSION > &mesh)
encapsulate adimensional mesh functionalities in order to provide an API on which we base the RINGMes...
std::unique_ptr< PointSetMeshBuilder< DIMENSION > > create_corner_builder(index_t corner_id)
Create a PointMeshBuilder for a given corner.
The MeshEntityType described the type of the meshed entities There are 4 MeshEntityTypes correspondin...
GeoModel< DIMENSION > & geomodel_
Classes to build GeoModel from various inputs.
A GeoModelEntity of type LINE.
std::unique_ptr< LineMeshBuilder< DIMENSION > > create_line_builder(index_t line_id)
Create a LineMeshBuilder for a given line.
GeoModelBuilderGeometry(GeoModelBuilder3D &builder, GeoModel3D &geomodel)
static std::unique_ptr< SurfaceMeshBuilder< DIMENSION > > create_builder(SurfaceMesh< DIMENSION > &mesh)
GeoModelAccess< DIMENSION > geomodel_access_
This template is a specialization of a gme_id to the GeoModelMeshEntity.
GeoModelBuilder< DIMENSION > & builder_
std::unique_ptr< VolumeMeshBuilder3D > create_region_builder(index_t region_id)
Create a Mesh3DBuilder for a given region.
FORWARD_DECLARATION_DIMENSION_CLASS(GeoModelMeshEntityAccess)
GeoModelBuilderGeometry(GeoModelBuilder< DIMENSION > &builder, GeoModel< DIMENSION > &geomodel)
std::shared_ptr< MeshBase< DIMENSION > > & modifiable_mesh()