Root of all algorithms. More...
#include <SMESH_Algo.hxx>
Classes | |
struct | Features |
Structure describing algorithm features. More... | |
Public Types | |
enum | EMeshError { MEr_OK = 0, MEr_HOLES, MEr_BAD_ORI, MEr_EMPTY } |
Public Types inherited from SMESH_Hypothesis | |
enum | Hypothesis_Status { HYP_OK = 0, HYP_MISSING, HYP_CONCURENT, HYP_BAD_PARAMETER, HYP_HIDDEN_ALGO, HYP_HIDING_ALGO, HYP_UNKNOWN_FATAL, HYP_INCOMPATIBLE, HYP_NOTCONFORM, HYP_ALREADY_EXIST, HYP_BAD_DIM, HYP_BAD_SUBSHAPE, HYP_BAD_GEOMETRY, HYP_NEED_SHAPE, HYP_INCOMPAT_HYPS } |
Public Types inherited from SMESHDS_Hypothesis | |
enum | hypothesis_type { PARAM_ALGO, ALGO_0D, ALGO_1D, ALGO_2D, ALGO_3D } |
Public Member Functions | |
virtual void | CancelCompute () |
Sets _computeCanceled to true. It's usage depends on implementation of a particular mesher. More... | |
virtual bool | CheckHypothesis (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, SMESH_Hypothesis::Hypothesis_Status &aStatus)=0 |
Check hypothesis definition to mesh a shape. More... | |
virtual bool | Compute (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape)=0 |
Computes mesh on a shape. More... | |
virtual bool | Compute (SMESH_Mesh &aMesh, SMESH_MesherHelper *aHelper) |
Computes mesh without geometry. More... | |
virtual bool | Evaluate (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, MapShapeNbElems &aResMap)=0 |
evaluates size of prospective mesh on a shape More... | |
const std::list< const SMESHDS_Hypothesis * > & | GetAppliedHypothesis (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, const bool ignoreAuxiliary=true) const |
Returns a list of compatible hypotheses assigned to a shape in a mesh. More... | |
const SMESH_HypoFilter * | GetCompatibleHypoFilter (const bool ignoreAuxiliary) const |
Returns the filter recognizing only compatible hypotheses. More... | |
const std::vector< std::string > & | GetCompatibleHypothesis () |
Returns all types of compatible hypotheses. More... | |
SMESH_ComputeErrorPtr | GetComputeError () const |
return compute error More... | |
const Features & | GetFeatures () const |
virtual double | GetProgress () const |
If possible, returns progress of computation [0.,1.]. More... | |
double | GetProgressByTic () const |
Return compute progress by nb of calls of this method. More... | |
virtual const std::list< const SMESHDS_Hypothesis * > & | GetUsedHypothesis (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, const bool ignoreAuxiliary=true) const |
Returns a list of compatible hypotheses used to mesh a shape. More... | |
void | InitComputeError () |
initialize compute error etc. before call of Compute() More... | |
virtual std::istream & | LoadFrom (std::istream &load) |
Loads nothing from a stream. More... | |
bool | NeedDiscreteBoundary () const |
bool | NeedLowerHyps (int dim) const |
bool | NeedShape () const |
int | NumberOfPoints (SMESH_Mesh &aMesh, const TopoDS_Wire &W) |
bool | OnlyUnaryInput () const |
virtual std::ostream & | SaveTo (std::ostream &save) |
Saves nothing in a stream. More... | |
virtual void | SetEventListener (SMESH_subMesh *subMesh) |
Sets event listener to submeshes if necessary. More... | |
virtual bool | SetParametersByDefaults (const TDefaults &dflts, const SMESH_Mesh *theMesh=0) |
Initialize my parameter values by default parameters. More... | |
virtual bool | SetParametersByMesh (const SMESH_Mesh *theMesh, const TopoDS_Shape &theShape) |
Just return false as the algorithm does not hold parameters values. More... | |
SMESH_Algo (int hypId, int studyId, SMESH_Gen *gen) | |
Creates algorithm. More... | |
std::vector< SMESH_subMesh * > & | SubMeshesToCompute () |
virtual void | SubmeshRestored (SMESH_subMesh *subMesh) |
Allow algo to do something after persistent restoration. More... | |
bool | SupportSubmeshes () const |
virtual | ~ SMESH_Algo () |
Destructor. More... | |
Public Member Functions inherited from SMESH_Hypothesis | |
void | ClearParameters () |
virtual bool | DataDependOnParams () const |
The returned value is used by NotifySubMeshesHypothesisModification() to decide to call subMesh->AlgoStateEngine( MODIF_HYP, hyp ) or not if subMesh is ready to be computed (algo+hyp==OK) but not yet computed. True result is reasonable for example if EventListeners depend on parameters of hypothesis. More... | |
virtual int | GetDim () const |
SMESH_Gen * | GetGen () const |
char * | GetLastParameters () const |
virtual const char * | GetLibName () const |
SMESH_Mesh * | GetMeshByPersistentID (int id) |
Find a mesh with given persistent ID. More... | |
char * | GetParameters () const |
virtual int | GetShapeType () const |
int | GetStudyId () const |
virtual bool | IsAuxiliary () const |
Return true if me is an auxiliary hypothesis. More... | |
virtual void | NotifySubMeshesHypothesisModification () |
void | SetLastParameters (const char *theParameters) |
void | SetLibName (const char *theLibName) |
void | SetParameters (const char *theParameters) |
SMESH_Hypothesis (int hypId, int studyId, SMESH_Gen *gen) | |
virtual | ~SMESH_Hypothesis () |
Public Member Functions inherited from SMESHDS_Hypothesis | |
int | GetID () const |
const char * | GetName () const |
int | GetType () const |
bool | IsSameName (const SMESHDS_Hypothesis &other) const |
Compare types of hypotheses. More... | |
bool | operator!= (const SMESHDS_Hypothesis &other) const |
virtual bool | operator== (const SMESHDS_Hypothesis &other) const |
SMESHDS_Hypothesis (int hypId) | |
virtual | ~SMESHDS_Hypothesis () |
Static Public Member Functions | |
static GeomAbs_Shape | Continuity (TopoDS_Edge E1, TopoDS_Edge E2) |
Return continuity of two edges. More... | |
static double | EdgeLength (const TopoDS_Edge &E) |
Compute length of an edge. More... | |
static const Features & | GetFeatures (const std::string &algoType) |
Returns a structure describing algorithm features. More... | |
static EMeshError | GetMeshError (SMESH_subMesh *subMesh) |
Finds topological errors of a sub-mesh. More... | |
static bool | GetNodeParamOnEdge (const SMESHDS_Mesh *theMesh, const TopoDS_Edge &theEdge, std::vector< double > &theParams) |
Fill vector of node parameters on geometrical edge, including vertex nodes. More... | |
static bool | GetSortedNodesOnEdge (const SMESHDS_Mesh *theMesh, const TopoDS_Edge &theEdge, const bool ignoreMediumNodes, std::map< double, const SMDS_MeshNode * > &theNodes, const SMDSAbs_ElementType typeToCheck=SMDSAbs_All) |
Fill map of node parameter on geometrical edge to node it-self. More... | |
static bool | IsContinuous (const TopoDS_Edge &E1, const TopoDS_Edge &E2) |
Return true if an edge can be considered as a continuation of another. More... | |
static bool | isDegenerated (const TopoDS_Edge &E) |
Return true if an edge has no 3D curve. More... | |
static bool | IsStraight (const TopoDS_Edge &E, const bool degenResult=false) |
Return true if an edge can be considered straight. More... | |
static const SMDS_MeshNode * | VertexNode (const TopoDS_Vertex &V, const SMESH_Mesh *mesh) |
Return the node built on a vertex. A node moved to other geometry by MergeNodes() is also returned. More... | |
static const SMDS_MeshNode * | VertexNode (const TopoDS_Vertex &V, const SMESHDS_Mesh *meshDS) |
Return the node built on a vertex. More... | |
static const SMDS_MeshNode * | VertexNode (const TopoDS_Vertex &V, const SMESHDS_SubMesh *edgeSM, const SMESH_Mesh *mesh, const bool checkV=true) |
Return the node built on a vertex. A node moved to other geometry by MergeNodes() is also returned. More... | |
Static Public Member Functions inherited from SMESH_Hypothesis | |
static bool | IsStatusFatal (Hypothesis_Status theStatus) |
Protected Member Functions | |
void | addBadInputElement (const SMDS_MeshElement *elem) |
store a bad input element preventing computation, which may be a temporary one i.e. not residing the mesh, then it will be deleted by InitComputeError() More... | |
void | addBadInputElements (const SMESHDS_SubMesh *sm, const bool addNodes=false) |
bool | error (const SMESH_Comment &comment="") |
store COMPERR_ALGO_FAILED error and comment and then return false More... | |
bool | error (int error, const SMESH_Comment &comment="") |
store error and comment and then return ( error == COMPERR_OK ) More... | |
bool | error (SMESH_ComputeErrorPtr error) |
store error and return error->IsOK() More... | |
Detailed Description
Root of all algorithms.
Methods of the class are grouped into several parts:
- main lifecycle methods, like Compute()
- methods describing features of the algorithm, like NeedShape()
- methods related to dependencies between sub-meshes imposed by the algorith
- static utilities, like EdgeLength()
Member Enumeration Documentation
◆ EMeshError
Constructor & Destructor Documentation
◆ SMESH_Algo()
SMESH_Algo::SMESH_Algo | ( | int | hypId, |
int | studyId, | ||
SMESH_Gen * | gen | ||
) |
Creates algorithm.
- Parameters
-
hypId - algorithm ID studyId - study ID gen - SMESH_Gen
◆ ~ SMESH_Algo()
|
virtual |
Destructor.
Member Function Documentation
◆ addBadInputElement()
|
protected |
store a bad input element preventing computation, which may be a temporary one i.e. not residing the mesh, then it will be deleted by InitComputeError()
Referenced by addBadInputElements(), and StdMeshers_Projection_2D::Compute().
◆ addBadInputElements()
|
protected |
References addBadInputElement(), SMESHDS_SubMesh::GetElements(), and SMESHDS_SubMesh::GetNodes().
Referenced by StdMeshers_Projection_2D::Compute().
◆ CancelCompute()
|
virtual |
Sets _computeCanceled to true. It's usage depends on implementation of a particular mesher.
Reimplemented in NETGENPlugin_NETGEN_3D, StdMeshers_Regular_1D, NETGENPlugin_NETGEN_2D_ONLY, NETGENPlugin_NETGEN_2D, and NETGENPlugin_NETGEN_2D3D.
Referenced by NETGENPlugin_NETGEN_2D3D::CancelCompute(), NETGENPlugin_NETGEN_2D::CancelCompute(), NETGENPlugin_NETGEN_2D_ONLY::CancelCompute(), StdMeshers_Regular_1D::CancelCompute(), NETGENPlugin_NETGEN_3D::CancelCompute(), and SMESH_subMesh::ComputeStateEngine().
◆ CheckHypothesis()
|
pure virtual |
Check hypothesis definition to mesh a shape.
- Parameters
-
aMesh - the mesh aShape - the shape aStatus - check result
- Return values
-
bool - true if hypothesis is well defined
Textual description of a problem can be stored in _comment field.
Implemented in StdMeshers_Prism_3D, StdMeshers_QuadFromMedialAxis_1D2D::Algo1D, StdMeshers_UseExisting_1D, StdMeshers_MEFISTO_2D, NETGENPlugin_NETGEN_3D, StdMeshers_RadialPrism_3D, StdMeshers_Hexa_3D, StdMeshers_Regular_1D, NETGENPlugin_NETGEN_2D, StdMeshers_RadialQuadrangle_1D2D, NETGENPlugin_NETGEN_2D3D, StdMeshers_Import_1D, StdMeshers_Import_1D2D, StdMeshers_Projection_1D, StdMeshers_SegmentAroundVertex_0D, StdMeshers_Projection_2D, StdMeshers_Projection_3D, StdMeshers_UseExisting_2D, StdMeshers_PolygonPerFace_2D, StdMeshers_Quadrangle_2D, StdMeshers_CompositeHexa_3D, NETGENPlugin_NETGEN_2D_ONLY, StdMeshers_Cartesian_3D, StdMeshers_QuadFromMedialAxis_1D2D, and StdMeshers_HexaFromSkin_3D.
Referenced by SMESH_subMesh::AlgoStateEngine(), SMESH_subMesh::ComputeStateEngine(), and SMESH_subMesh::Evaluate().
◆ Compute() [1/2]
|
pure virtual |
Computes mesh on a shape.
- Parameters
-
aMesh - the mesh aShape - the shape
- Return values
-
bool - is a success
Algorithms that !NeedDiscreteBoundary() || !OnlyUnaryInput() are to set SMESH_ComputeError returned by SMESH_submesh::GetComputeError() to report problematic sub-shapes
Implemented in StdMeshers_Prism_3D, StdMeshers_Quadrangle_2D, StdMeshers_UseExisting_1D, StdMeshers_MEFISTO_2D, NETGENPlugin_NETGEN_3D, StdMeshers_RadialPrism_3D, NETGENPlugin_NETGEN_2D_ONLY, StdMeshers_Hexa_3D, StdMeshers_Regular_1D, NETGENPlugin_NETGEN_2D, StdMeshers_Cartesian_3D, StdMeshers_RadialQuadrangle_1D2D, NETGENPlugin_NETGEN_2D3D, StdMeshers_CompositeHexa_3D, StdMeshers_Import_1D, StdMeshers_Import_1D2D, StdMeshers_Projection_1D, StdMeshers_SegmentAroundVertex_0D, StdMeshers_Projection_2D, StdMeshers_QuadFromMedialAxis_1D2D, StdMeshers_HexaFromSkin_3D, StdMeshers_Projection_3D, StdMeshers_CompositeSegment_1D, StdMeshers_UseExisting_2D, StdMeshers_PolygonPerFace_2D, and StdMeshers_Projection_1D2D.
Referenced by SMESH_subMesh::ComputeStateEngine().
◆ Compute() [2/2]
|
virtual |
Computes mesh without geometry.
- Parameters
-
aMesh - the mesh aHelper - helper that must be used for adding elements to \aaMesh
- Return values
-
bool - is a success
The method is called if ( !aMesh->HasShapeToMesh() )
- Parameters
-
aMesh - the mesh aHelper - helper that must be used for adding elements to \aaMesh
- Return values
-
bool - is a success
Reimplemented in NETGENPlugin_NETGEN_3D, StdMeshers_Hexa_3D, and StdMeshers_HexaFromSkin_3D.
References error().
◆ Continuity()
|
static |
Return continuity of two edges.
- Parameters
-
E1 - the 1st edge E2 - the 2nd edge
- Return values
-
GeomAbs_Shape - regularity at the junction between E1 and E2
◆ EdgeLength()
|
static |
Compute length of an edge.
- Parameters
-
E - the edge
- Return values
-
double - the length
Compute length of an edge
Referenced by StdMeshers_Projection_1D::Compute(), StdMeshers_Regular_1D::Compute(), NETGENPlugin_Mesher::Compute(), StdMeshers_Regular_1D::Evaluate(), NETGENPlugin_NETGEN_2D_ONLY::Evaluate(), NETGENPlugin_Mesher::Evaluate(), StdMeshers_ProjectionUtils::FindFaceAssociation(), SMESH_MesherHelper::LoadNodeColumns(), StdMeshers_AutomaticLength::SetParametersByMesh(), and StdMeshers_FaceSide::StdMeshers_FaceSide().
◆ error() [1/3]
|
protected |
store COMPERR_ALGO_FAILED error and comment and then return false
Referenced by FreeCADInit.FCADLogger::report().
◆ error() [2/3]
|
protected |
store error and comment and then return ( error == COMPERR_OK )
Referenced by StdMeshers_Quadrangle_2D::addEnforcedNodes(), StdMeshers_Projection_2D::CheckHypothesis(), StdMeshers_Regular_1D::CheckHypothesis(), StdMeshers_Quadrangle_2D::CheckNbEdges(), StdMeshers_Quadrangle_2D::checkNbEdgesForEvaluate(), StdMeshers_Projection_1D2D::Compute(), StdMeshers_HexaFromSkin_3D::Compute(), StdMeshers_PolygonPerFace_2D::Compute(), StdMeshers_CompositeSegment_1D::Compute(), StdMeshers_Projection_3D::Compute(), StdMeshers_Projection_2D::Compute(), StdMeshers_QuadFromMedialAxis_1D2D::Compute(), StdMeshers_Import_1D::Compute(), StdMeshers_Projection_1D::Compute(), StdMeshers_Import_1D2D::Compute(), StdMeshers_CompositeHexa_3D::Compute(), StdMeshers_RadialQuadrangle_1D2D::Compute(), StdMeshers_Cartesian_3D::Compute(), StdMeshers_Regular_1D::Compute(), StdMeshers_Hexa_3D::Compute(), StdMeshers_RadialPrism_3D::Compute(), StdMeshers_MEFISTO_2D::Compute(), StdMeshers_Quadrangle_2D::Compute(), Compute(), TNodeDistributor::Compute(), StdMeshers_Prism_3D::Compute(), StdMeshers_Regular_1D::computeInternalParameters(), StdMeshers_RadialQuadrangle_1D2D::computeLayerPositions(), StdMeshers_RadialPrism_3D::computeLayerPositions(), StdMeshers_Quadrangle_2D::computeQuadDominant(), StdMeshers_Quadrangle_2D::computeQuadPref(), StdMeshers_Quadrangle_2D::computeReduced(), error(), StdMeshers_Projection_1D2D::Evaluate(), StdMeshers_PolygonPerFace_2D::Evaluate(), StdMeshers_HexaFromSkin_3D::Evaluate(), StdMeshers_Projection_3D::Evaluate(), StdMeshers_Projection_2D::Evaluate(), StdMeshers_Import_1D2D::Evaluate(), StdMeshers_Import_1D::Evaluate(), StdMeshers_Projection_1D::Evaluate(), StdMeshers_RadialQuadrangle_1D2D::Evaluate(), StdMeshers_Regular_1D::Evaluate(), StdMeshers_Prism_3D::Evaluate(), StdMeshers_Quadrangle_2D::getEnforcedUV(), StdMeshers_MEFISTO_2D::LoadPoints(), FreeCADInit.FCADLogger::report(), and StdMeshers_Quadrangle_2D::setNormalizedGrid().
◆ error() [3/3]
|
protected |
store error and return error->IsOK()
store error and return ( error == COMPERR_OK )
References error().
Referenced by FreeCADInit.FCADLogger::report().
◆ Evaluate()
|
pure virtual |
evaluates size of prospective mesh on a shape
- Parameters
-
aMesh - the mesh aShape - the shape aResMap - prospective number of elements by SMDSAbs_ElementType by a sub-mesh
- Return values
-
bool - is a success
Implemented in StdMeshers_Prism_3D, StdMeshers_Quadrangle_2D, NETGENPlugin_NETGEN_3D, StdMeshers_UseExisting_1D, StdMeshers_MEFISTO_2D, NETGENPlugin_NETGEN_2D_ONLY, NETGENPlugin_NETGEN_2D, NETGENPlugin_NETGEN_2D3D, StdMeshers_Hexa_3D, StdMeshers_RadialPrism_3D, StdMeshers_Regular_1D, StdMeshers_Cartesian_3D, StdMeshers_RadialQuadrangle_1D2D, StdMeshers_CompositeHexa_3D, StdMeshers_Projection_1D, StdMeshers_QuadFromMedialAxis_1D2D, StdMeshers_SegmentAroundVertex_0D, StdMeshers_Import_1D, StdMeshers_Import_1D2D, StdMeshers_Projection_2D, StdMeshers_HexaFromSkin_3D, StdMeshers_Projection_3D, StdMeshers_UseExisting_2D, StdMeshers_PolygonPerFace_2D, and StdMeshers_Projection_1D2D.
Referenced by SMESH_subMesh::Evaluate().
◆ GetAppliedHypothesis()
const list< const SMESHDS_Hypothesis * > & SMESH_Algo::GetAppliedHypothesis | ( | SMESH_Mesh & | aMesh, |
const TopoDS_Shape & | aShape, | ||
const bool | ignoreAuxiliary = true |
||
) | const |
Returns a list of compatible hypotheses assigned to a shape in a mesh.
- Parameters
-
aMesh - the mesh aShape - the shape ignoreAuxiliary - do not include auxiliary hypotheses in the list
- Return values
-
const std::list <const SMESHDS_Hypothesis*> - hypotheses list
List the relevant hypothesis associated to the shape. Relevant hypothesis have a name (type) listed in the algorithm. Hypothesis associated to father shape -are not- taken into account (see GetUsedHypothesis)
List the relevant hypothesis associated to the shape. Relevant hypothesis have a name (type) listed in the algorithm. Hypothesis associated to father shape -are not- taken into account (see GetUsedHypothesis)
References GetCompatibleHypoFilter(), and SMESH_Mesh::GetHypotheses().
◆ GetCompatibleHypoFilter()
const SMESH_HypoFilter * SMESH_Algo::GetCompatibleHypoFilter | ( | const bool | ignoreAuxiliary | ) | const |
Returns the filter recognizing only compatible hypotheses.
- Parameters
-
ignoreAuxiliary - make filter ignore compatible auxiliary hypotheses
- Return values
-
SMESH_HypoFilter* - the filter that can be NULL
- Parameters
-
ignoreAuxiliary - make filter ignore auxiliary hypotheses
- Return values
-
SMESH_HypoFilter* - the filter that can be NULL
References SMESH_HypoFilter::AndNot(), and SMESH_HypoFilter::IsAuxiliary().
Referenced by StdMeshers_RadialQuadrangle_1D2D::computeLayerPositions(), GetAppliedHypothesis(), StdMeshers_Regular_1D::GetUsedHypothesis(), GetUsedHypothesis(), SMESH_Mesh::IsUsedHypothesis(), and SMESH_Mesh::NotifySubMeshesHypothesisModification().
◆ GetCompatibleHypothesis()
const vector< string > & SMESH_Algo::GetCompatibleHypothesis | ( | ) |
Returns all types of compatible hypotheses.
◆ GetComputeError()
SMESH_ComputeErrorPtr SMESH_Algo::GetComputeError | ( | ) | const |
return compute error
References SMESH_ComputeError::New().
Referenced by StdMeshers_RadialQuadrangle_1D2D::Compute(), StdMeshers_Hexa_3D::Compute(), StdMeshers_RadialQuadrangle_1D2D::computeLayerPositions(), StdMeshers_RadialPrism_3D::computeLayerPositions(), and SMESH_subMesh::ComputeStateEngine().
◆ GetFeatures() [1/2]
const Features& SMESH_Algo::GetFeatures | ( | ) | const |
References GetFeatures().
Referenced by GetFeatures().
◆ GetFeatures() [2/2]
|
static |
Returns a structure describing algorithm features.
Return Data of the algorithm.
References SMESH_Gen::GetPluginXMLPaths().
Referenced by StdMeshers_ProjectionUtils::SourceNotComputedError().
◆ GetMeshError()
|
static |
Finds topological errors of a sub-mesh.
References SMESHDS_SubMesh::GetElements(), SMDS_VolumeTool::GetFaceNodes(), SMDS_MeshElement::GetNode(), SMDS_MeshNode::GetPosition(), SMESH_subMesh::GetSubMeshDS(), SMESH_subMesh::GetSubShape(), SMDS_Position::GetTypeOfPosition(), SMDS_VolumeTool::IsFreeFace(), MEr_EMPTY, MEr_HOLES, MEr_OK, SMDS_MeshElement::NbCornerNodes(), SMDS_VolumeTool::NbFaceNodes(), SMDS_VolumeTool::NbFaces(), SMESH_TLink::node1(), SMESH_TLink::node2(), and SMDS_VolumeTool::Set().
Referenced by NETGENPlugin_Mesher::Compute().
◆ GetNodeParamOnEdge()
|
static |
Fill vector of node parameters on geometrical edge, including vertex nodes.
- Parameters
-
theMesh - The mesh containing nodes theEdge - The geometrical edge of interest theParams - The resulting vector of sorted node parameters
- Return values
-
bool - false if not all parameters are OK
- Warning
- Nodes moved to other geometry by MergeNodes() are NOT returned.
- Parameters
-
theMesh - The mesh containing nodes theEdge - The geometrical edge of interest theParams - The resulting vector of sorted node parameters
- Return values
-
bool - false if not all parameters are OK
References SMESHDS_SubMesh::GetElements(), SMESHDS_SubMesh::GetNodes(), SMDS_MeshNode::GetPosition(), SMDS_EdgePosition::GetUParameter(), SMESHDS_Mesh::MeshElements(), and VertexNode().
Referenced by StdMeshers_Projection_1D::Compute(), StdMeshers_RadialQuadrangle_1D2D::computeLayerPositions(), StdMeshers_Projection_1D::Evaluate(), StdMeshers_Geometric1D::SetParametersByMesh(), StdMeshers_Deflection1D::SetParametersByMesh(), StdMeshers_MaxLength::SetParametersByMesh(), StdMeshers_LocalLength::SetParametersByMesh(), StdMeshers_StartEndLength::SetParametersByMesh(), and StdMeshers_Arithmetic1D::SetParametersByMesh().
◆ GetProgress()
|
virtual |
If possible, returns progress of computation [0.,1.].
Reimplemented in NETGENPlugin_NETGEN_3D, NETGENPlugin_NETGEN_2D_ONLY, NETGENPlugin_NETGEN_2D, and NETGENPlugin_NETGEN_2D3D.
◆ GetProgressByTic()
double SMESH_Algo::GetProgressByTic | ( | ) | const |
Return compute progress by nb of calls of this method.
◆ GetSortedNodesOnEdge()
|
static |
Fill map of node parameter on geometrical edge to node it-self.
Fill vector of node parameters on geometrical edge, including vertex nodes.
- Parameters
-
theMesh - The mesh containing nodes theEdge - The geometrical edge of interest theNodes - The resulting map ignoreMediumNodes - to store medium nodes of quadratic elements or not typeToCheck - type of elements to check for medium nodes
- Return values
-
bool - false if not all parameters are OK
- Warning
- Nodes moved to other geometry by MergeNodes() are NOT returned.
- Parameters
-
theMesh - The mesh containing nodes theEdge - The geometrical edge of interest theParams - The resulting vector of sorted node parameters
- Return values
-
bool - false if not all parameters are OK
References SMESHDS_SubMesh::GetNodes(), SMDS_MeshNode::GetPosition(), SMDS_EdgePosition::GetUParameter(), SMESH_MesherHelper::IsMedium(), SMESHDS_Mesh::MeshElements(), SMESHDS_SubMesh::NbElements(), SMESHDS_SubMesh::NbNodes(), and VertexNode().
Referenced by StdMeshers_RadialQuadrangle_1D2D::Compute(), StdMeshers_Regular_1D::computeInternalParameters(), SMESH_MesherHelper::IsStructured(), and SMESH_MesherHelper::LoadNodeColumns().
◆ GetUsedHypothesis()
|
virtual |
Returns a list of compatible hypotheses used to mesh a shape.
- Parameters
-
aMesh - the mesh aShape - the shape ignoreAuxiliary - do not include auxiliary hypotheses in the list
- Return values
-
const std::list <const SMESHDS_Hypothesis*> - hypotheses list
List the hypothesis used by the algorithm associated to the shape. Hypothesis associated to father shape -are- taken into account (see GetAppliedHypothesis). Relevant hypothesis have a name (type) listed in the algorithm. This method could be surcharged by specific algorithms, in case of several hypothesis simultaneously applicable.
List the hypothesis used by the algorithm associated to the shape. Hypothesis associated to father shape -are- taken into account (see GetAppliedHypothesis). Relevant hypothesis have a name (type) listed in the algorithm. This method could be surcharged by specific algorithms, in case of several hypothesis simultaneously applicable.
References GetCompatibleHypoFilter(), and SMESH_Mesh::GetHypotheses().
Referenced by StdMeshers_Projection_3D::CheckHypothesis(), StdMeshers_QuadFromMedialAxis_1D2D::CheckHypothesis(), StdMeshers_Projection_2D::CheckHypothesis(), StdMeshers_Projection_1D::CheckHypothesis(), StdMeshers_SegmentAroundVertex_0D::CheckHypothesis(), StdMeshers_Cartesian_3D::CheckHypothesis(), StdMeshers_RadialPrism_3D::CheckHypothesis(), SMESH_subMesh::getCollection(), StdMeshers_CompositeSegment_1D::GetFaceSide(), StdMeshers_Regular_1D::GetUsedHypothesis(), StdMeshers_Regular_1D::getVertexHyp(), and StdMeshers_ProjectionUtils::MakeComputed().
◆ InitComputeError()
void SMESH_Algo::InitComputeError | ( | ) |
initialize compute error etc. before call of Compute()
initialize compute error before call of Compute()
Referenced by SMESH_subMesh::AlgoStateEngine(), StdMeshers_Hexa_3D::Compute(), StdMeshers_Prism_3D::Compute(), and SMESH_subMesh::ComputeStateEngine().
◆ IsContinuous()
|
static |
Return true if an edge can be considered as a continuation of another.
Referenced by StdMeshers_Quadrangle_2D::checkNbEdgesForEvaluate().
◆ isDegenerated()
|
static |
Return true if an edge has no 3D curve.
Referenced by SMESH_subMesh::checkComputeError(), StdMeshers_Quadrangle_2D::CheckNbEdges(), StdMeshers_Import_1D2D::Compute(), StdMeshers_Cartesian_3D::Compute(), NETGENPlugin_NETGEN_2D_ONLY::Compute(), SMESH_Gen::Compute(), SMESH_subMesh::ComputeStateEngine(), SMESH_MeshEditor::ExtrusionAlongTrack(), NETGENPlugin_Mesher::FillNgMesh(), StdMeshers_ProjectionUtils::FindFaceAssociation(), VISCOUS_3D::getConcaveVertices(), StdMeshers_Quadrangle_2D::getCorners(), VISCOUS_3D::getFaceDir(), StdMeshers_PrismAsBlock::GetLayersTransformation(), StdMeshers_Quadrangle_2D::IsApplicable(), VISCOUS_3D::isConcave(), and SMESH_MesherHelper::SetSubShape().
◆ IsStraight()
Return true if an edge can be considered straight.
◆ LoadFrom()
|
virtual |
Loads nothing from a stream.
- Parameters
-
load - the stream
- Return values
-
std::ostream & - the stream
Implements SMESHDS_Hypothesis.
◆ NeedDiscreteBoundary()
bool SMESH_Algo::NeedDiscreteBoundary | ( | ) | const |
◆ NeedLowerHyps()
bool SMESH_Algo::NeedLowerHyps | ( | int | dim | ) | const |
Referenced by SMESH_subMesh::cleanDependsOn().
◆ NeedShape()
bool SMESH_Algo::NeedShape | ( | ) | const |
Referenced by SMESH_subMesh::AlgoStateEngine().
◆ NumberOfPoints()
int SMESH_Algo::NumberOfPoints | ( | SMESH_Mesh & | aMesh, |
const TopoDS_Wire & | W | ||
) |
References SMESH_Mesh::GetSubMesh(), SMESH_subMesh::GetSubMeshDS(), and SMESHDS_SubMesh::NbNodes().
◆ OnlyUnaryInput()
bool SMESH_Algo::OnlyUnaryInput | ( | ) | const |
◆ SaveTo()
|
virtual |
Saves nothing in a stream.
- Parameters
-
save - the stream
- Return values
-
std::ostream & - the stream
Usually an algoritm has nothing to save
Implements SMESHDS_Hypothesis.
References OfflineRenderingUtils::save().
◆ SetEventListener()
|
virtual |
Sets event listener to submeshes if necessary.
- Parameters
-
subMesh - submesh where algo is set
This method is called when a submesh gets HYP_OK algo_state. After being set, event listener is notified on each event of a submesh. By default none listener is set
- Parameters
-
subMesh - submesh where algo is set
After being set, event listener is notified on each event of a submesh. By default non listener is set
Reimplemented in StdMeshers_Projection_1D, StdMeshers_Projection_2D, StdMeshers_Projection_3D, StdMeshers_Projection_1D2D, StdMeshers_Regular_1D, StdMeshers_Cartesian_3D, StdMeshers_QuadFromMedialAxis_1D2D, StdMeshers_CompositeSegment_1D, StdMeshers_Import_1D, and StdMeshers_Import_1D2D.
Referenced by SMESH_subMesh::AlgoStateEngine().
◆ SetParametersByDefaults()
|
virtual |
Initialize my parameter values by default parameters.
- Return values
-
bool - true if parameter values have been successfully defined
Implements SMESH_Hypothesis.
◆ SetParametersByMesh()
|
virtual |
Just return false as the algorithm does not hold parameters values.
Implements SMESH_Hypothesis.
◆ SubMeshesToCompute()
std::vector<SMESH_subMesh*>& SMESH_Algo::SubMeshesToCompute | ( | ) |
Return a vector of sub-meshes to Compute()
Referenced by SMESH_subMesh::ComputeStateEngine().
◆ SubmeshRestored()
|
virtual |
Allow algo to do something after persistent restoration.
- Parameters
-
subMesh - restored submesh
This method is called only if a submesh has HYP_OK algo_state.
Reimplemented in StdMeshers_Regular_1D, StdMeshers_RadialQuadrangle_1D2D, StdMeshers_Import_1D, and StdMeshers_Import_1D2D.
Referenced by SMESH_subMesh::ComputeStateEngine().
◆ SupportSubmeshes()
bool SMESH_Algo::SupportSubmeshes | ( | ) | const |
◆ VertexNode() [1/3]
|
static |
Return the node built on a vertex. A node moved to other geometry by MergeNodes() is also returned.
- Parameters
-
V - the vertex mesh - mesh
- Return values
-
const SMDS_MeshNode* - found node or NULL
References SMESH_MesherHelper::GetAncestors(), and VertexNode().
◆ VertexNode() [2/3]
|
static |
Return the node built on a vertex.
- Parameters
-
V - the vertex meshDS - mesh data structure
- Return values
-
const SMDS_MeshNode* - found node or NULL
- Parameters
-
V - the vertex meshDS - mesh
- Return values
-
const SMDS_MeshNode* - found node or NULL
- See also
- SMESH_MesherHelper::GetSubShapeByNode( const SMDS_MeshNode*, SMESHDS_Mesh* )
References SMESHDS_Mesh::MeshElements().
Referenced by NETGENPlugin_Mesher::AddIntVerticesInFaces(), NETGENPlugin_Mesher::AddIntVerticesInSolids(), StdMeshers_CompositeSegment_1D::Compute(), StdMeshers_Import_1D::Compute(), StdMeshers_Import_1D2D::Compute(), StdMeshers_Projection_1D::Compute(), StdMeshers_RadialQuadrangle_1D2D::Compute(), StdMeshers_Regular_1D::Compute(), NETGENPlugin_NETGEN_3D::Compute(), SMESH_MeshEditor::ExtrusionAlongTrack(), NETGENPlugin_Mesher::FillSMesh(), StdMeshers_ProjectionUtils::FindMatchingNodesOnFaces(), StdMeshers_Quadrangle_2D::getEnforcedUV(), StdMeshers_FaceSide::GetFaceWires(), GetNodeParamOnEdge(), GetSortedNodesOnEdge(), SMESH_MesherHelper::IsStructured(), StdMeshers_FaceSide::VertexNode(), and VertexNode().
◆ VertexNode() [3/3]
|
static |
Return the node built on a vertex. A node moved to other geometry by MergeNodes() is also returned.
- Parameters
-
V - the vertex edgeSM - sub-mesh of a meshed EDGE sharing the vertex mesh - the mesh checkV - if true
, presence of a node on the vertex is checked
- Return values
-
const SMDS_MeshNode* - found node or NULL
- Parameters
-
V - the vertex edgeSM - sub-mesh of a meshed EDGE sharing the vertex checkV - if true
, presence of a node on the vertex is checked
- Return values
-
const SMDS_MeshNode* - found node or NULL
References SMDS_MeshElement::begin_nodes(), SMDS_MeshElement::end_nodes(), SMESHDS_SubMesh::GetElements(), SMESHDS_SubMesh::GetID(), SMESH_MesherHelper::GetNodeU(), SMESHDS_SubMesh::GetParent(), SMDS_MeshElement::getshapeId(), SMESH_MesherHelper::GetSubShapeByNode(), SMDS_MeshElement::GetType(), SMESHDS_Mesh::IndexToShape(), SMESH_MesherHelper::IsSubShape(), SMESHDS_SubMesh::NbElements(), and VertexNode().
The documentation for this class was generated from the following files:
- src/3rdParty/salomesmesh/inc/SMESH_Algo.hxx
- src/3rdParty/salomesmesh/src/SMESH/SMESH_Algo.cpp