SMESH_Algo Class Referenceabstract

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_HypoFilterGetCompatibleHypoFilter (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 FeaturesGetFeatures () 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_GenGetGen () const
 
char * GetLastParameters () const
 
virtual const char * GetLibName () const
 
SMESH_MeshGetMeshByPersistentID (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)
 
virtual bool SetParametersByDefaults (const TDefaults &dflts, const SMESH_Mesh *theMesh=0)=0
 Initialize my parameter values by default parameters. More...
 
virtual bool SetParametersByMesh (const SMESH_Mesh *theMesh, const TopoDS_Shape &theShape)=0
 Initialize my parameter values by the mesh built on the geometry. More...
 
 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...
 
virtual std::istream & LoadFrom (std::istream &load)=0
 
bool operator!= (const SMESHDS_Hypothesis &other) const
 
virtual bool operator== (const SMESHDS_Hypothesis &other) const
 
virtual std::ostream & SaveTo (std::ostream &save)=0
 
 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 FeaturesGetFeatures (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_MeshNodeVertexNode (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_MeshNodeVertexNode (const TopoDS_Vertex &V, const SMESHDS_Mesh *meshDS)
 Return the node built on a vertex. More...
 
static const SMDS_MeshNodeVertexNode (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

Enumerator
MEr_OK 
MEr_HOLES 
MEr_BAD_ORI 
MEr_EMPTY 

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()

SMESH_Algo::~SMESH_Algo ( )
virtual

Destructor.

Member Function Documentation

◆ addBadInputElement()

void SMESH_Algo::addBadInputElement ( const SMDS_MeshElement elem)
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()

void SMESH_Algo::addBadInputElements ( const SMESHDS_SubMesh sm,
const bool  addNodes = false 
)
protected

◆ CancelCompute()

◆ CheckHypothesis()

◆ Compute() [1/2]

◆ Compute() [2/2]

bool SMESH_Algo::Compute ( SMESH_Mesh aMesh,
SMESH_MesherHelper aHelper 
)
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()

GeomAbs_Shape SMESH_Algo::Continuity ( TopoDS_Edge  E1,
TopoDS_Edge  E2 
)
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()

◆ error() [1/3]

bool SMESH_Algo::error ( const SMESH_Comment comment = "")
protected

store COMPERR_ALGO_FAILED error and comment and then return false

Referenced by femmesh.gmshtools.GmshTools::read_and_set_new_mesh(), FreeCADInit.FCADLogger::report(), and femmesh.gmshtools.GmshTools::run_gmsh_with_geo().

◆ error() [2/3]

bool SMESH_Algo::error ( int  error,
const SMESH_Comment comment = "" 
)
protected

store error and comment and then return ( error == COMPERR_OK )

References error().

Referenced by StdMeshers_Quadrangle_2D::addEnforcedNodes(), NETGENPlugin_NETGEN_2D_ONLY::CheckHypothesis(), StdMeshers_Quadrangle_2D::CheckHypothesis(), NETGENPlugin_NETGEN_2D::CheckHypothesis(), NETGENPlugin_NETGEN_3D::CheckHypothesis(), StdMeshers_Hexa_3D::CheckHypothesis(), StdMeshers_MEFISTO_2D::CheckHypothesis(), StdMeshers_Projection_2D::CheckHypothesis(), StdMeshers_Regular_1D::CheckHypothesis(), StdMeshers_Quadrangle_2D::CheckNbEdges(), StdMeshers_Quadrangle_2D::checkNbEdgesForEvaluate(), NETGENPlugin_NETGEN_2D_ONLY::Compute(), NETGENPlugin_NETGEN_3D::Compute(), StdMeshers_Cartesian_3D::Compute(), StdMeshers_CompositeHexa_3D::Compute(), StdMeshers_CompositeSegment_1D::Compute(), StdMeshers_Hexa_3D::Compute(), StdMeshers_Import_1D::Compute(), StdMeshers_Import_1D2D::Compute(), StdMeshers_MEFISTO_2D::Compute(), StdMeshers_PolygonPerFace_2D::Compute(), StdMeshers_Projection_1D::Compute(), StdMeshers_Projection_1D2D::Compute(), StdMeshers_Projection_2D::Compute(), StdMeshers_Projection_3D::Compute(), StdMeshers_QuadFromMedialAxis_1D2D::Compute(), StdMeshers_Quadrangle_2D::Compute(), StdMeshers_RadialQuadrangle_1D2D::Compute(), StdMeshers_Regular_1D::Compute(), Compute(), StdMeshers_HexaFromSkin_3D::Compute(), NETGENPlugin_NETGEN_3D::compute(), TNodeDistributor::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_HexaFromSkin_3D::Evaluate(), StdMeshers_Import_1D::Evaluate(), StdMeshers_Import_1D2D::Evaluate(), StdMeshers_PolygonPerFace_2D::Evaluate(), StdMeshers_Prism_3D::Evaluate(), StdMeshers_Projection_1D::Evaluate(), StdMeshers_Projection_1D2D::Evaluate(), StdMeshers_Projection_2D::Evaluate(), StdMeshers_Projection_3D::Evaluate(), StdMeshers_RadialQuadrangle_1D2D::Evaluate(), StdMeshers_Regular_1D::Evaluate(), StdMeshers_Quadrangle_2D::getEnforcedUV(), GetFeatures(), StdMeshers_MEFISTO_2D::LoadPoints(), femmesh.gmshtools.GmshTools::read_and_set_new_mesh(), FreeCADInit.FCADLogger::report(), femmesh.gmshtools.GmshTools::run_gmsh_with_geo(), and StdMeshers_Quadrangle_2D::setNormalizedGrid().

◆ error() [3/3]

bool SMESH_Algo::error ( SMESH_ComputeErrorPtr  error)
protected

store error and return error->IsOK()

store error and return ( error == COMPERR_OK )

References error().

Referenced by femmesh.gmshtools.GmshTools::read_and_set_new_mesh(), FreeCADInit.FCADLogger::report(), and femmesh.gmshtools.GmshTools::run_gmsh_with_geo().

◆ 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
conststd::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(), GetUsedHypothesis(), StdMeshers_Regular_1D::GetUsedHypothesis(), SMESH_Mesh::IsUsedHypothesis(), and SMESH_Mesh::NotifySubMeshesHypothesisModification().

◆ GetCompatibleHypothesis()

const vector< string > & SMESH_Algo::GetCompatibleHypothesis ( )

Returns all types of compatible hypotheses.

◆ GetComputeError()

◆ GetFeatures() [1/2]

const Features & SMESH_Algo::GetFeatures ( ) const

References GetFeatures().

Referenced by GetFeatures().

◆ GetFeatures() [2/2]

const SMESH_Algo::Features & SMESH_Algo::GetFeatures ( const std::string &  algoType)
static

Returns a structure describing algorithm features.

Return Data of the algorithm.

References error(), and SMESH_Gen::GetPluginXMLPaths().

Referenced by StdMeshers_ProjectionUtils::SourceNotComputedError().

◆ GetMeshError()

◆ GetNodeParamOnEdge()

bool SMESH_Algo::GetNodeParamOnEdge ( const SMESHDS_Mesh theMesh,
const TopoDS_Edge &  theEdge,
std::vector< double > &  theParams 
)
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_Arithmetic1D::SetParametersByMesh(), StdMeshers_Deflection1D::SetParametersByMesh(), StdMeshers_Geometric1D::SetParametersByMesh(), StdMeshers_LocalLength::SetParametersByMesh(), StdMeshers_MaxLength::SetParametersByMesh(), and StdMeshers_StartEndLength::SetParametersByMesh().

◆ GetProgress()

double SMESH_Algo::GetProgress ( ) const
virtual

If possible, returns progress of computation [0.,1.].

Reimplemented in NETGENPlugin_NETGEN_2D, NETGENPlugin_NETGEN_2D3D, NETGENPlugin_NETGEN_2D_ONLY, and NETGENPlugin_NETGEN_3D.

◆ GetProgressByTic()

double SMESH_Algo::GetProgressByTic ( ) const

Return compute progress by nb of calls of this method.

◆ GetSortedNodesOnEdge()

bool SMESH_Algo::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 
)
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(), draftgeoutils.general::v1(), and VertexNode().

Referenced by StdMeshers_RadialQuadrangle_1D2D::Compute(), StdMeshers_Regular_1D::computeInternalParameters(), SMESH_MesherHelper::IsStructured(), and SMESH_MesherHelper::LoadNodeColumns().

◆ GetUsedHypothesis()

const list< const SMESHDS_Hypothesis * > & SMESH_Algo::GetUsedHypothesis ( SMESH_Mesh aMesh,
const TopoDS_Shape &  aShape,
const bool  ignoreAuxiliary = true 
) const
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
conststd::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 NETGENPlugin_NETGEN_2D_ONLY::CheckHypothesis(), StdMeshers_Cartesian_3D::CheckHypothesis(), StdMeshers_QuadFromMedialAxis_1D2D::CheckHypothesis(), StdMeshers_Quadrangle_2D::CheckHypothesis(), NETGENPlugin_NETGEN_2D::CheckHypothesis(), NETGENPlugin_NETGEN_2D3D::CheckHypothesis(), NETGENPlugin_NETGEN_3D::CheckHypothesis(), StdMeshers_Hexa_3D::CheckHypothesis(), StdMeshers_Import_1D::CheckHypothesis(), StdMeshers_Import_1D2D::CheckHypothesis(), StdMeshers_MEFISTO_2D::CheckHypothesis(), StdMeshers_Projection_1D::CheckHypothesis(), StdMeshers_Projection_2D::CheckHypothesis(), StdMeshers_Projection_3D::CheckHypothesis(), StdMeshers_RadialPrism_3D::CheckHypothesis(), StdMeshers_RadialQuadrangle_1D2D::CheckHypothesis(), StdMeshers_SegmentAroundVertex_0D::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(), NETGENPlugin_NETGEN_2D_ONLY::Compute(), StdMeshers_Hexa_3D::Compute(), and SMESH_subMesh::ComputeStateEngine().

◆ IsContinuous()

static bool SMESH_Algo::IsContinuous ( const TopoDS_Edge &  E1,
const TopoDS_Edge &  E2 
)
static

Return true if an edge can be considered as a continuation of another.

Referenced by StdMeshers_Quadrangle_2D::checkNbEdgesForEvaluate().

◆ isDegenerated()

◆ IsStraight()

bool SMESH_Algo::IsStraight ( const TopoDS_Edge &  E,
const bool  degenResult = false 
)
static

Return true if an edge can be considered straight.

References draftgeoutils.general::v1().

◆ LoadFrom()

istream & SMESH_Algo::LoadFrom ( std::istream &  load)
virtual

Loads nothing from a stream.

Parameters
load- the stream
Return values
std::ostream& - the stream

Implements SMESHDS_Hypothesis.

◆ NeedDiscreteBoundary()

◆ NeedLowerHyps()

bool SMESH_Algo::NeedLowerHyps ( int  dim) const

◆ NeedShape()

bool SMESH_Algo::NeedShape ( ) const

◆ NumberOfPoints()

int SMESH_Algo::NumberOfPoints ( SMESH_Mesh aMesh,
const TopoDS_Wire &  W 
)

◆ OnlyUnaryInput()

◆ SaveTo()

ostream & SMESH_Algo::SaveTo ( std::ostream &  save)
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()

void SMESH_Algo::SetEventListener ( SMESH_subMesh subMesh)
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_Cartesian_3D, StdMeshers_CompositeSegment_1D, StdMeshers_Import_1D, StdMeshers_Import_1D2D, StdMeshers_QuadFromMedialAxis_1D2D, StdMeshers_Regular_1D, StdMeshers_Projection_1D, StdMeshers_Projection_1D2D, StdMeshers_Projection_2D, and StdMeshers_Projection_3D.

Referenced by SMESH_subMesh::AlgoStateEngine().

◆ SetParametersByDefaults()

bool SMESH_Algo::SetParametersByDefaults ( const TDefaults dflts,
const SMESH_Mesh theMesh = 0 
)
virtual

Initialize my parameter values by default parameters.

Return values
bool- true if parameter values have been successfully defined

Implements SMESH_Hypothesis.

◆ SetParametersByMesh()

bool SMESH_Algo::SetParametersByMesh ( const SMESH_Mesh theMesh,
const TopoDS_Shape &  theShape 
)
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()

void SMESH_Algo::SubmeshRestored ( SMESH_subMesh subMesh)
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_Import_1D, StdMeshers_Import_1D2D, StdMeshers_RadialQuadrangle_1D2D, and StdMeshers_Regular_1D.

Referenced by SMESH_subMesh::ComputeStateEngine().

◆ SupportSubmeshes()

◆ VertexNode() [1/3]

const SMDS_MeshNode * SMESH_Algo::VertexNode ( const TopoDS_Vertex &  V,
const SMESH_Mesh mesh 
)
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
constSMDS_MeshNode* - found node or NULL

References SMESH_MesherHelper::GetAncestors(), and VertexNode().

◆ VertexNode() [2/3]

const SMDS_MeshNode * SMESH_Algo::VertexNode ( const TopoDS_Vertex &  V,
const SMESHDS_Mesh meshDS 
)
static

◆ VertexNode() [3/3]

const SMDS_MeshNode * SMESH_Algo::VertexNode ( const TopoDS_Vertex &  V,
const SMESHDS_SubMesh edgeSM,
const SMESH_Mesh mesh,
const bool  checkV = true 
)
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
constSMDS_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
constSMDS_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: