#include <SMESH_Gen.hxx>
Data Structures | |
struct | TAlgoStateError |
Public Types | |
enum | ComputeFlags { SHAPE_ONLY = 1, UPWARD = 2, COMPACT_MESH = 4, SHAPE_ONLY_UPWARD = 3 } |
Public Member Functions | |
SMESH_Gen () | |
Constructor. More... | |
~SMESH_Gen () | |
Destructor. More... | |
SMESH_Mesh * | CreateMesh (int theStudyId, bool theIsEmbeddedMode) throw (SALOME_Exception) |
Creates a mesh in a study. More... | |
bool | Compute (::SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, const int aFlags=COMPACT_MESH, const ::MeshDimension aDim=::MeshDim_3D, TSetOfInt *aShapesId=0) |
Computes aMesh on aShape. More... | |
void | PrepareCompute (::SMESH_Mesh &aMesh, const TopoDS_Shape &aShape) |
Prepare Compute a mesh. More... | |
void | CancelCompute (::SMESH_Mesh &aMesh, const TopoDS_Shape &aShape) |
const SMESH_subMesh * | GetCurrentSubMesh () const |
Returns a sub-mesh being currently computed. 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) |
StudyContextStruct * | GetStudyContext (int studyId) |
Returns StudyContextStruct for a study. More... | |
SMESH_Algo * | GetAlgo (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, TopoDS_Shape *assignedTo=0) |
SMESH_Algo * | GetAlgo (SMESH_subMesh *aSubMesh, TopoDS_Shape *assignedTo=0) |
int | GetANewId () |
Genarate a new id unique within this Gen. More... | |
Static Public Member Functions | |
static int | GetShapeDim (const TopAbs_ShapeEnum &aShapeType) |
Return shape dimension by TopAbs_ShapeEnum. More... | |
static int | GetShapeDim (const TopoDS_Shape &aShape) |
static bool | IsGlobalHypothesis (const SMESH_Hypothesis *theHyp, SMESH_Mesh &aMesh) |
static std::vector< std::string > | GetPluginXMLPaths () |
Return paths to xml files of plugins. More... | |
Private Member Functions | |
void | setCurrentSubMesh (SMESH_subMesh *sm) |
Sets a sub-mesh being currently computed. More... | |
void | resetCurrentSubMesh () |
Private Attributes | |
int | _localId |
std::map< int, StudyContextStruct * > | _mapStudyContext |
int | _hypId |
int | _segmentation |
int | _nbSegments |
volatile bool | _compute_canceled |
std::list< SMESH_subMesh * > | _sm_current |
SMESH_Gen::SMESH_Gen | ( | ) |
Constructor.
References SMDS_Mesh::_meshList.
SMESH_Gen::~SMESH_Gen | ( | ) |
Destructor.
References studyContextStruct::mapHypothesis, and studyContextStruct::myDocument.
void SMESH_Gen::CancelCompute | ( | ::SMESH_Mesh & | aMesh, |
const TopoDS_Shape & | aShape | ||
) |
bool SMESH_Gen::CheckAlgoState | ( | SMESH_Mesh & | aMesh, |
const TopoDS_Shape & | aShape | ||
) |
bool SMESH_Gen::Compute | ( | ::SMESH_Mesh & | aMesh, |
const TopoDS_Shape & | aShape, | ||
const int | aFlags = COMPACT_MESH , |
||
const ::MeshDimension | aDim = ::MeshDim_3D , |
||
TSetOfInt * | aShapesId = 0 |
||
) |
Computes aMesh on aShape.
aMesh | - the mesh. |
aShape | - the shape. |
aFlags | - ComputeFlags. By default compute the whole mesh and compact at the end. |
aDim | - upper level dimension of the mesh computation (for preview) |
aShapesId | - list of shapes with computed mesh entities (elements or nodes) |
bool | - true if none sub-mesh failed to compute |
SMESH_Mesh * SMESH_Gen::CreateMesh | ( | int | theStudyId, |
bool | theIsEmbeddedMode | ||
) | throw (SALOME_Exception) |
Creates a mesh in a study.
if (theIsEmbeddedMode) { mesh modification commands are not logged }
References studyContextStruct::mapMesh, and studyContextStruct::myDocument.
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
aMesh | - the mesh |
aShape | - the shape |
aResMap | - map for prospective numbers of elements |
bool | - is a success |
SMESH_Algo* SMESH_Gen::GetAlgo | ( | SMESH_Mesh & | aMesh, |
const TopoDS_Shape & | aShape, | ||
TopoDS_Shape * | assignedTo = 0 |
||
) |
SMESH_Algo* SMESH_Gen::GetAlgo | ( | SMESH_subMesh * | aSubMesh, |
TopoDS_Shape * | assignedTo = 0 |
||
) |
bool SMESH_Gen::GetAlgoState | ( | SMESH_Mesh & | aMesh, |
const TopoDS_Shape & | aShape, | ||
std::list< SMESH_Gen::TAlgoStateError > & | theErrors | ||
) |
int SMESH_Gen::GetANewId | ( | ) |
Genarate a new id unique within this Gen.
Referenced by StdMeshers_Adaptive1D_i::StdMeshers_Adaptive1D_i(), StdMeshers_Cartesian_3D_i::StdMeshers_Cartesian_3D_i(), StdMeshers_CartesianParameters3D_i::StdMeshers_CartesianParameters3D_i(), StdMeshers_Geometric1D_i::StdMeshers_Geometric1D_i(), StdMeshers_LayerDistribution2D_i::StdMeshers_LayerDistribution2D_i(), StdMeshers_NumberOfLayers2D_i::StdMeshers_NumberOfLayers2D_i(), StdMeshers_PolygonPerFace_2D_i::StdMeshers_PolygonPerFace_2D_i(), StdMeshers_UseExisting_1D_i::StdMeshers_UseExisting_1D_i(), and StdMeshers_UseExisting_2D_i::StdMeshers_UseExisting_2D_i().
int SMESH_Gen::GetBoundaryBoxSegmentation | ( | ) | const |
const SMESH_subMesh * SMESH_Gen::GetCurrentSubMesh | ( | ) | const |
Returns a sub-mesh being currently computed.
int SMESH_Gen::GetDefaultNbSegments | ( | ) | const |
|
static |
Return paths to xml files of plugins.
Referenced by _pyHypothesisReader::_pyHypothesisReader(), and SMESH_Algo::GetFeatures().
|
static |
Return shape dimension by TopAbs_ShapeEnum.
References MeshDim_0D, MeshDim_1D, MeshDim_2D, and MeshDim_3D.
Referenced by SMESH_subMesh::CanAddHypothesis(), checkMissing(), SMESH_subMesh::cleanDependants(), SMESH_subMesh::cleanDependsOn(), SMESH_subMesh::DumpAlgoState(), SMESH_subMesh::Evaluate(), SMESH_subMesh::IsApplicableHypotesis(), SMESH_subMesh::IsMeshComputed(), SMESH_HypoFilter::IsMoreLocalThanPredicate::IsOk(), SMESH_Mesh::RemoveHypothesis(), SMESH_subMesh::removeSubMeshElementsAndNodes(), StdMeshers_ProjectionUtils::SourceNotComputedError(), and SMESH_subMesh::SubMeshesComputed().
|
static |
References GetShapeDim().
Referenced by GetShapeDim().
StudyContextStruct * SMESH_Gen::GetStudyContext | ( | int | studyId | ) |
Returns StudyContextStruct for a study.
References studyContextStruct::myDocument.
|
static |
References SMESH_HypoFilter::Is().
void SMESH_Gen::PrepareCompute | ( | ::SMESH_Mesh & | aMesh, |
const TopoDS_Shape & | aShape | ||
) |
Prepare Compute a mesh.
|
private |
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.
|
private |
Sets a sub-mesh being currently computed.
An algorithm can call Compute() for a sub-shape, hence we keep a stack of sub-meshes
void SMESH_Gen::SetDefaultNbSegments | ( | int | nb | ) |
Sets default number of segments per edge.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |