RINGMesh  Version 5.0.0
A programming library for geological model meshes
RINGMesh::GeoModelBuilderTSolid Class Referencefinal

Builds a meshed GeoModel from a Gocad TSolid (file.so) More...

#include <geomodel_builder_gocad.h>

Inheritance diagram for RINGMesh::GeoModelBuilderTSolid:
RINGMesh::GeoModelBuilderGocad RINGMesh::GeoModelBuilderFile< DIMENSION > RINGMesh::GeoModelBuilder< DIMENSION > RINGMesh::GeoModelBuilderBase< DIMENSION >

Public Types

enum  TSolidType { TSolidType::TSOLID, TSolidType::LIGHT_TSOLID }
 

Public Member Functions

 GeoModelBuilderTSolid (GeoModel3D &geomodel, std::string filename)
 
- Public Member Functions inherited from RINGMesh::GeoModelBuilderGocad
 GeoModelBuilderGocad (GeoModel3D &geomodel, std::string filename)
 
void read_file ()
 Parses the file and loads the GeoModel. More...
 
- Public Member Functions inherited from RINGMesh::GeoModelBuilderFile< DIMENSION >
 GeoModelBuilderFile (GeoModel< DIMENSION > &geomodel, std::string filename)
 
void build_geomodel ()
 
- Public Member Functions inherited from RINGMesh::GeoModelBuilderBase< DIMENSION >
virtual ~GeoModelBuilderBase ()=default
 
void end_geomodel ()
 Finish up geomodel building and complete missing information. More...
 
void build_corners_from_lines ()
 
void build_lines_and_corners_from_surfaces ()
 

Static Public Attributes

static const index_t NB_TYPE = 2
 

Protected Attributes

TSolidLoadingStorage tsolid_load_storage_
 
- Protected Attributes inherited from RINGMesh::GeoModelBuilderGocad
GEO::LineInput file_line_ { filename_ }
 
- Protected Attributes inherited from RINGMesh::GeoModelBuilderFile< DIMENSION >
std::string filename_ {}
 
- Protected Attributes inherited from RINGMesh::GeoModelBuilderBase< DIMENSION >
GeoModel< DIMENSION > & geomodel_
 
GeoModelAccess< DIMENSION > geomodel_access_
 

Private Member Functions

void read_number_of_vertices ()
 
void read_type ()
 
void load_file () final
 
void read_file ()
 
void read_line () final
 Reads the first word of the current line (keyword) and executes the good action with the information of the line. More...
 
void compute_surface_internal_borders (index_t surface_id, const std::vector< std::unique_ptr< NNSearch3D > > &surface_nns, const std::vector< Box3D > &surface_boxes)
 Computes internal borders of a given surface. More...
 
void compute_polygon_edge_centers_nn_and_surface_boxes (std::vector< std::unique_ptr< NNSearch3D > > &surface_nns, std::vector< Box3D > &surface_boxes) const
 Computes the NNSearchs of the centers of polygon edges for each surface and their Box3d. More...
 
void compute_surfaces_internal_borders ()
 Computes internal borders of the geomodel surfaces. More...
 

Private Attributes

TSolidType file_type_ { TSolidType::TSOLID }
 
std::array< std::unique_ptr< GeoModelBuilderTSolidImpl >, NB_TYPEtype_impl_
 

Friends

class RINGMesh::GocadLineParser
 

Additional Inherited Members

- Public Attributes inherited from RINGMesh::GeoModelBuilderBase< DIMENSION >
GeoModelBuilderTopology< DIMENSION > topology
 
GeoModelBuilderGeometry< DIMENSION > geometry
 
GeoModelBuilderGeology< DIMENSION > geology
 
GeoModelBuilderRemoval< DIMENSION > removal
 
GeoModelBuilderRepair< DIMENSION > repair
 
GeoModelBuilderCopy< DIMENSION > copy
 
GeoModelBuilderInfo< DIMENSION > info
 
- Protected Member Functions inherited from RINGMesh::GeoModelBuilderBase< DIMENSION >
 GeoModelBuilderBase (GeoModelBuilder< DIMENSION > &builder, GeoModel< DIMENSION > &geomodel)
 
void cut_geomodel_on_internal_boundaries ()
 
template<>
void cut_geomodel_on_internal_boundaries ()
 
template<>
void cut_geomodel_on_internal_boundaries ()
 

Detailed Description

Builds a meshed GeoModel from a Gocad TSolid (file.so)

Definition at line 545 of file geomodel_builder_gocad.h.

Member Enumeration Documentation

◆ TSolidType

Enumerator
TSOLID 
LIGHT_TSOLID 

Definition at line 549 of file geomodel_builder_gocad.h.

Constructor & Destructor Documentation

◆ GeoModelBuilderTSolid()

RINGMesh::GeoModelBuilderTSolid::GeoModelBuilderTSolid ( GeoModel3D &  geomodel,
std::string  filename 
)

Definition at line 1685 of file geomodel_builder_gocad.cpp.

Member Function Documentation

◆ compute_polygon_edge_centers_nn_and_surface_boxes()

void RINGMesh::GeoModelBuilderTSolid::compute_polygon_edge_centers_nn_and_surface_boxes ( std::vector< std::unique_ptr< NNSearch3D > > &  surface_nns,
std::vector< Box3D > &  surface_boxes 
) const
private

Computes the NNSearchs of the centers of polygon edges for each surface and their Box3d.

Parameters
[in]geomodelGeoModel to consider
[out]surface_nnsUnique pointers to the NNSearchs of surfaces
[out]surface_boxesBounding Box of surfaces

Definition at line 1804 of file geomodel_builder_gocad.cpp.

◆ compute_surface_internal_borders()

void RINGMesh::GeoModelBuilderTSolid::compute_surface_internal_borders ( index_t  surface_id,
const std::vector< std::unique_ptr< NNSearch3D > > &  surface_nns,
const std::vector< Box3D > &  surface_boxes 
)
private

Computes internal borders of a given surface.

A surface polygon edge is an internal border if it is shared by at least two surfaces. Adjacency of such a polygon edge is set to GEO::NO_FACET.

Parameters
[in]geomodelGeoModel to consider
[in]surface_idIndex of the surface
[in]surface_nnsUnique pointers to the NNSearchs of surfaces

Definition at line 1772 of file geomodel_builder_gocad.cpp.

◆ compute_surfaces_internal_borders()

void RINGMesh::GeoModelBuilderTSolid::compute_surfaces_internal_borders ( )
private

Computes internal borders of the geomodel surfaces.

An surface polygon edge is an internal border if it is shared by at least two surfaces. Adjacency of such a polygon edge is set to GEO::NO_FACET.

Parameters
[in]geomodelGeoModel to consider

Definition at line 1825 of file geomodel_builder_gocad.cpp.

◆ load_file()

void RINGMesh::GeoModelBuilderTSolid::load_file ( )
finalprivatevirtual

◆ read_file()

void RINGMesh::GeoModelBuilderTSolid::read_file ( )
private

Definition at line 1756 of file geomodel_builder_gocad.cpp.

◆ read_line()

void RINGMesh::GeoModelBuilderTSolid::read_line ( )
finalprivatevirtual

Reads the first word of the current line (keyword) and executes the good action with the information of the line.

Uses the TsolidLineParser factory

Implements RINGMesh::GeoModelBuilderGocad.

Definition at line 1763 of file geomodel_builder_gocad.cpp.

◆ read_number_of_vertices()

void RINGMesh::GeoModelBuilderTSolid::read_number_of_vertices ( )
private

Definition at line 1695 of file geomodel_builder_gocad.cpp.

◆ read_type()

void RINGMesh::GeoModelBuilderTSolid::read_type ( )
private

Definition at line 1730 of file geomodel_builder_gocad.cpp.

Friends And Related Function Documentation

◆ RINGMesh::GocadLineParser

Definition at line 611 of file geomodel_builder_gocad.h.

Member Data Documentation

◆ file_type_

TSolidType RINGMesh::GeoModelBuilderTSolid::file_type_ { TSolidType::TSOLID }
private

Definition at line 607 of file geomodel_builder_gocad.h.

◆ NB_TYPE

const index_t RINGMesh::GeoModelBuilderTSolid::NB_TYPE = 2
static

Definition at line 548 of file geomodel_builder_gocad.h.

◆ tsolid_load_storage_

TSolidLoadingStorage RINGMesh::GeoModelBuilderTSolid::tsolid_load_storage_
protected

Definition at line 604 of file geomodel_builder_gocad.h.

◆ type_impl_

std::array< std::unique_ptr< GeoModelBuilderTSolidImpl >, NB_TYPE > RINGMesh::GeoModelBuilderTSolid::type_impl_
private

Definition at line 609 of file geomodel_builder_gocad.h.


The documentation for this class was generated from the following files: