SALOME - SMESH
SMESH_Gen Class Reference

#include <SMESH_Gen.hxx>

Collaboration diagram for SMESH_Gen:
Collaboration graph

Data Structures

struct  TAlgoStateError
 

Public Member Functions

 SMESH_Gen ()
 
 ~SMESH_Gen ()
 
SMESH_MeshCreateMesh (int theStudyId, bool theIsEmbeddedMode) throw ( SMESH_Exception )
 
bool Compute (::SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, const bool anUpward=false, const ::MeshDimension aDim=::MeshDim_3D, TSetOfInt *aShapesId=0)
 Computes aMesh on aShape. More...
 
bool Evaluate (::SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, MapShapeNbElems &aResMap, const bool anUpward=false, TSetOfInt *aShapesId=0)
 evaluates size of prospective mesh on a shape More...
 
bool CheckAlgoState (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape)
 
void SetBoundaryBoxSegmentation (int theNbSegments)
 Sets number of segments per diagonal of boundary box of geometry by which default segment length of appropriate 1D hypotheses is defined. More...
 
int GetBoundaryBoxSegmentation () const
 
void SetDefaultNbSegments (int nb)
 Sets default number of segments per edge. More...
 
int GetDefaultNbSegments () const
 
bool GetAlgoState (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, std::list< SMESH_Gen::TAlgoStateError > &theErrors)
 
StudyContextStructGetStudyContext (int studyId)
 
SMESH_AlgoGetAlgo (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, TopoDS_Shape *assignedTo=0)
 
int GetANewId ()
 

Static Public Member Functions

static int GetShapeDim (const TopAbs_ShapeEnum &aShapeType)
 
static int GetShapeDim (const TopoDS_Shape &aShape)
 
static bool IsGlobalHypothesis (const SMESH_Hypothesis *theHyp, SMESH_Mesh &aMesh)
 

Data Fields

std::map< int, SMESH_Algo *> _mapAlgo
 
std::map< int, SMESH_0D_Algo *> _map0D_Algo
 
std::map< int, SMESH_1D_Algo *> _map1D_Algo
 
std::map< int, SMESH_2D_Algo *> _map2D_Algo
 
std::map< int, SMESH_3D_Algo *> _map3D_Algo
 

Private Attributes

int _localId
 
std::map< int, StudyContextStruct *> _mapStudyContext
 
int _hypId
 
int _segmentation
 
int _nbSegments
 

Detailed Description

Definition at line 62 of file SMESH_Gen.hxx.

Constructor & Destructor Documentation

◆ SMESH_Gen()

SMESH_Gen::SMESH_Gen ( )

◆ ~SMESH_Gen()

SMESH_Gen::~SMESH_Gen ( )

Member Function Documentation

◆ CreateMesh()

SMESH_Mesh* SMESH_Gen::CreateMesh ( int  theStudyId,
bool  theIsEmbeddedMode 
)
throw (SMESH_Exception
)

◆ Compute()

bool SMESH_Gen::Compute ( ::SMESH_Mesh aMesh,
const TopoDS_Shape &  aShape,
const bool  anUpward = false,
const ::MeshDimension  aDim = ::MeshDim_3D,
TSetOfInt aShapesId = 0 
)

Computes aMesh on aShape.

Parameters
anUpward- compute from vertices up to more complex shape (internal usage)
aDim- upper level dimension of the mesh computation
aShapesId- list of shapes with computed mesh entities (elements or nodes)
Return values
bool- true if none submesh failed to compute

◆ Evaluate()

bool SMESH_Gen::Evaluate ( ::SMESH_Mesh aMesh,
const TopoDS_Shape &  aShape,
MapShapeNbElems aResMap,
const bool  anUpward = false,
TSetOfInt aShapesId = 0 
)

evaluates size of prospective mesh on a shape

Parameters
aMesh- the mesh
aShape- the shape
aResMap- map for prospective numbers of elements
Return values
bool- is a success

◆ CheckAlgoState()

bool SMESH_Gen::CheckAlgoState ( SMESH_Mesh aMesh,
const TopoDS_Shape &  aShape 
)

◆ SetBoundaryBoxSegmentation()

void SMESH_Gen::SetBoundaryBoxSegmentation ( int  theNbSegments)

Sets number of segments per diagonal of boundary box of geometry by which default segment length of appropriate 1D hypotheses is defined.

Definition at line 105 of file SMESH_Gen.hxx.

◆ GetBoundaryBoxSegmentation()

int SMESH_Gen::GetBoundaryBoxSegmentation ( ) const

Definition at line 106 of file SMESH_Gen.hxx.

◆ SetDefaultNbSegments()

void SMESH_Gen::SetDefaultNbSegments ( int  nb)

Sets default number of segments per edge.

Definition at line 110 of file SMESH_Gen.hxx.

◆ GetDefaultNbSegments()

int SMESH_Gen::GetDefaultNbSegments ( ) const

Definition at line 111 of file SMESH_Gen.hxx.

◆ GetAlgoState()

bool SMESH_Gen::GetAlgoState ( SMESH_Mesh aMesh,
const TopoDS_Shape &  aShape,
std::list< SMESH_Gen::TAlgoStateError > &  theErrors 
)

◆ GetStudyContext()

StudyContextStruct* SMESH_Gen::GetStudyContext ( int  studyId)

◆ GetShapeDim() [1/2]

static int SMESH_Gen::GetShapeDim ( const TopAbs_ShapeEnum &  aShapeType)
static

◆ GetShapeDim() [2/2]

static int SMESH_Gen::GetShapeDim ( const TopoDS_Shape &  aShape)
static

Definition at line 136 of file SMESH_Gen.hxx.

◆ GetAlgo()

SMESH_Algo* SMESH_Gen::GetAlgo ( SMESH_Mesh aMesh,
const TopoDS_Shape &  aShape,
TopoDS_Shape *  assignedTo = 0 
)

◆ IsGlobalHypothesis()

static bool SMESH_Gen::IsGlobalHypothesis ( const SMESH_Hypothesis theHyp,
SMESH_Mesh aMesh 
)
static

◆ GetANewId()

int SMESH_Gen::GetANewId ( )

Field Documentation

◆ _mapAlgo

std::map< int, SMESH_Algo * > SMESH_Gen::_mapAlgo

Definition at line 143 of file SMESH_Gen.hxx.

◆ _map0D_Algo

std::map< int, SMESH_0D_Algo * > SMESH_Gen::_map0D_Algo

Definition at line 144 of file SMESH_Gen.hxx.

◆ _map1D_Algo

std::map< int, SMESH_1D_Algo * > SMESH_Gen::_map1D_Algo

Definition at line 145 of file SMESH_Gen.hxx.

◆ _map2D_Algo

std::map< int, SMESH_2D_Algo * > SMESH_Gen::_map2D_Algo

Definition at line 146 of file SMESH_Gen.hxx.

◆ _map3D_Algo

std::map< int, SMESH_3D_Algo * > SMESH_Gen::_map3D_Algo

Definition at line 147 of file SMESH_Gen.hxx.

◆ _localId

int SMESH_Gen::_localId
private

Definition at line 151 of file SMESH_Gen.hxx.

◆ _mapStudyContext

std::map< int, StudyContextStruct * > SMESH_Gen::_mapStudyContext
private

Definition at line 152 of file SMESH_Gen.hxx.

◆ _hypId

int SMESH_Gen::_hypId
private

Definition at line 155 of file SMESH_Gen.hxx.

◆ _segmentation

int SMESH_Gen::_segmentation
private

Definition at line 159 of file SMESH_Gen.hxx.

◆ _nbSegments

int SMESH_Gen::_nbSegments
private

Definition at line 161 of file SMESH_Gen.hxx.