#include <SMESH_Gen.hxx>
Classes | |
struct | TAlgoStateError |
Public Member Functions | |
void | CancelCompute (::SMESH_Mesh &aMesh, const TopoDS_Shape &aShape) |
bool | CheckAlgoState (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape) |
bool | Compute (::SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, const bool aShapeOnly=false, const bool anUpward=false, const ::MeshDimension aDim=::MeshDim_3D, TSetOfInt *aShapesId=0) |
Computes aMesh on aShape. More... | |
SMESH_Mesh * | CreateMesh (int theStudyId, bool theIsEmbeddedMode) |
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... | |
SMESH_Algo * | GetAlgo (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, TopoDS_Shape *assignedTo=0) |
SMESH_Algo * | GetAlgo (SMESH_subMesh *aSubMesh, TopoDS_Shape *assignedTo=0) |
bool | GetAlgoState (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, std::list< SMESH_Gen::TAlgoStateError > &theErrors) |
int | GetANewId () |
int | GetBoundaryBoxSegmentation () const |
const SMESH_subMesh * | GetCurrentSubMesh () const |
Returns a sub-mesh being currently computed. More... | |
int | GetDefaultNbSegments () const |
StudyContextStruct * | GetStudyContext (int studyId) |
void | PrepareCompute (::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... | |
void | SetDefaultNbSegments (int nb) |
Sets default number of segments per edge. More... | |
SMESH_Gen () | |
~SMESH_Gen () | |
Static Public Member Functions | |
static std::vector< std::string > | GetPluginXMLPaths () |
Return paths to xml files of plugins. More... | |
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) |
SMESH_Gen::SMESH_Gen | ( | ) |
Constructor
SMESH_Gen::~SMESH_Gen | ( | ) |
Destructor
void SMESH_Gen::CancelCompute | ( | ::SMESH_Mesh & | aMesh, |
const TopoDS_Shape & | aShape | ||
) |
Cancel Compute a mesh
References SMESH_subMesh::COMPUTE_CANCELED, and GetCurrentSubMesh().
bool SMESH_Gen::CheckAlgoState | ( | SMESH_Mesh & | aMesh, |
const TopoDS_Shape & | aShape | ||
) |
References GetAlgoState().
bool SMESH_Gen::Compute | ( | ::SMESH_Mesh & | aMesh, |
const TopoDS_Shape & | aShape, | ||
const bool | aShapeOnly = false , |
||
const bool | anUpward = false , |
||
const ::MeshDimension | aDim = ::MeshDim_3D , |
||
TSetOfInt * | aShapesId = 0 |
||
) |
Computes aMesh on aShape.
aShapeOnly | - if true, algo->OnlyUnaryInput() feature is ignored and only aShape is computed. |
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) |
bool | - true if none submesh failed to compute |
References SMESH_subMesh::CHECK_COMPUTE_STATE, SMESHDS_Mesh::compactMesh(), Compute(), SMESH_subMesh::COMPUTE, SMESH_subMesh::COMPUTE_SUBMESH, SMESH_subMesh::ComputeStateEngine(), SMESH_subMesh::FAILED_TO_COMPUTE, SMESH_MesherHelper::FixQuadraticElements(), GetAlgo(), SMESH_subMesh::GetComputeError(), SMESH_subMesh::GetComputeState(), SMESH_subMesh::getDependsOnIterator(), SMESH_Mesh::GetHypothesis(), SMESH_subMesh::GetId(), SMESH_Mesh::GetMeshDS(), GetShapeDim(), SMESH_Mesh::GetShapeToMesh(), SMESH_Mesh::GetSubMesh(), SMESH_subMesh::GetSubShape(), SMESH_Mesh::HasShapeToMesh(), SMESH_HypoFilter::IsAlgo(), SMESH_HypoFilter::IsApplicableTo(), SMESH_Algo::isDegenerated(), SMESH_HypoFilter::IsMoreLocalThan(), SMESH_MesherHelper::IsQuadraticMesh(), SMESH_MesherHelper::LINEAR, SMESH_Algo::NeedDiscreteBoundary(), SMESH_subMesh::READY_TO_COMPUTE, SMESH_Mesh::SortByMeshOrder(), and SMESH_Algo::SupportSubmeshes().
Referenced by Fem::FemMesh::compute(), Compute(), MeshPart::Mesher::createMesh(), and StdMeshers_ProjectionUtils::MakeComputed().
SMESH_Mesh * SMESH_Gen::CreateMesh | ( | int | theStudyId, |
bool | theIsEmbeddedMode | ||
) |
Creates a mesh in a study. if (theIsEmbeddedMode) { mesh modification commands are not logged }
References GetStudyContext(), studyContextStruct::mapMesh, and studyContextStruct::myDocument.
Referenced by MeshPart::Mesher::createMesh(), Fem::FemMesh::FemMesh(), and Fem::FemMesh::operator=().
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 |
Evaluate a mesh
References Evaluate(), SMESH_subMesh::Evaluate(), GetAlgo(), SMESH_subMesh::getDependsOnIterator(), SMESH_Mesh::GetHypothesis(), SMESH_subMesh::GetId(), GetShapeDim(), SMESH_Mesh::GetSubMesh(), SMESH_subMesh::GetSubShape(), SMESH_Mesh::HasShapeToMesh(), SMESH_HypoFilter::IsAlgo(), SMESH_HypoFilter::IsApplicableTo(), SMESH_HypoFilter::IsMoreLocalThan(), SMESH_Algo::NeedDiscreteBoundary(), SMESH_Mesh::SortByMeshOrder(), and SMESH_Algo::SupportSubmeshes().
Referenced by Evaluate().
SMESH_Algo * SMESH_Gen::GetAlgo | ( | SMESH_Mesh & | aMesh, |
const TopoDS_Shape & | aShape, | ||
TopoDS_Shape * | assignedTo = 0 |
||
) |
Finds algo to mesh a shape. Optionally returns a shape the found algo is bound to
References GetAlgo(), and SMESH_Mesh::GetSubMesh().
Referenced by SMESH_subMesh::AlgoStateEngine(), Compute(), Evaluate(), GetAlgo(), and StdMeshers_CompositeSegment_1D::GetFaceSide().
SMESH_Algo * SMESH_Gen::GetAlgo | ( | SMESH_subMesh * | aSubMesh, |
TopoDS_Shape * | assignedTo = 0 |
||
) |
Finds algo to mesh a sub-mesh. Optionally returns a shape the found algo is bound to
References SMESH_MesherHelper::GetAncestors(), SMESH_subMesh::GetFather(), SMESH_MesherHelper::GetGroupType(), SMESH_Mesh::GetHypothesis(), SMESH_Mesh::GetShapeToMesh(), SMESH_Mesh::GetSubMesh(), SMESH_subMesh::GetSubShape(), SMESH_HypoFilter::IsAlgo(), SMESH_Mesh::IsOrderOK(), and SMESH_MesherHelper::NbAncestors().
bool SMESH_Gen::GetAlgoState | ( | SMESH_Mesh & | aMesh, |
const TopoDS_Shape & | aShape, | ||
std::list< SMESH_Gen::TAlgoStateError > & | theErrors | ||
) |
References SMESH_subMesh::GetAlgoState(), SMESH_subMesh::getDependsOnIterator(), SMESH_Hypothesis::GetDim(), SMESHDS_Mesh::GetHypothesis(), SMESH_Mesh::GetMeshDS(), SMESH_Mesh::GetSubMesh(), SMESH_subMesh::GetSubShape(), SMESHDS_Hypothesis::GetType(), SMESH_Mesh::HasShapeToMesh(), SMESH_Hypothesis::HYP_MISSING, SMESH_Mesh::IsNotConformAllowed(), SMESH_subMesh::NO_ALGO, SMESHDS_Hypothesis::PARAM_ALGO, and SMESHDS_Mesh::ShapeToMesh().
Referenced by CheckAlgoState().
int SMESH_Gen::GetANewId | ( | ) |
Genarate a new id unique withing this Gen
Referenced by StdMeshers_Hexa_3D::Compute().
int SMESH_Gen::GetBoundaryBoxSegmentation | ( | ) | const |
Referenced by StdMeshers_Regular_1D::CheckHypothesis().
const SMESH_subMesh * SMESH_Gen::GetCurrentSubMesh | ( | ) | const |
Returns a sub-mesh being currently computed.
Referenced by CancelCompute().
int SMESH_Gen::GetDefaultNbSegments | ( | ) | const |
|
static |
Return paths to xml files of plugins.
Referenced by SMESH_Algo::GetFeatures().
|
static |
Return shape dimension by TopAbs_ShapeEnum.
Referenced by SMESH_Mesh::AddHypothesis(), SMESH_subMesh::CanAddHypothesis(), SMESH_subMesh::cleanDependants(), SMESH_subMesh::cleanDependsOn(), Compute(), SMESH_subMesh::DumpAlgoState(), Evaluate(), SMESH_subMesh::Evaluate(), SMESH_subMesh::IsApplicableHypotesis(), SMESH_subMesh::IsMeshComputed(), SMESH_HypoFilter::IsMoreLocalThanPredicate::IsOk(), StdMeshers_ProjectionUtils::MakeComputed(), NETGENPlugin_Mesher::PrepareOCCgeometry(), SMESH_Mesh::RemoveHypothesis(), SMESH_subMesh::removeSubMeshElementsAndNodes(), StdMeshers_ProjectionSource3D::SetSource3DShape(), StdMeshers_ProjectionUtils::SourceNotComputedError(), and SMESH_subMesh::SubMeshesComputed().
|
static |
StudyContextStruct * SMESH_Gen::GetStudyContext | ( | int | studyId | ) |
Returns StudyContextStruct for a study
References studyContextStruct::myDocument.
Referenced by CreateMesh(), and SMESH_Hypothesis::SMESH_Hypothesis().
|
static |
void SMESH_Gen::PrepareCompute | ( | ::SMESH_Mesh & | aMesh, |
const TopoDS_Shape & | aShape | ||
) |
Prepare Compute a mesh
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.
void SMESH_Gen::SetDefaultNbSegments | ( | int | nb | ) |
Sets default number of segments per edge.