Version: 8.3.0
TNodeDistributor Class Reference

Class computing layers distribution using data of StdMeshers_LayerDistribution hypothesis. More...

Inheritance diagram for TNodeDistributor:

Public Types

enum  EMeshError { MEr_OK = 0, MEr_HOLES, MEr_BAD_ORI, MEr_EMPTY }
 
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
}
 
enum  hypothesis_type {
  PARAM_ALGO, ALGO_0D, ALGO_1D, ALGO_2D,
  ALGO_3D
}
 

Public Member Functions

bool Compute (vector< double > &positions, gp_Pnt pIn, gp_Pnt pOut, SMESH_Mesh &aMesh, const StdMeshers_LayerDistribution *hyp)
 
virtual bool CheckHypothesis (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, SMESH_Hypothesis::Hypothesis_Status &aStatus)
 Check hypothesis definition to mesh a shape. More...
 
virtual bool Compute (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape)
 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)
 evaluates size of prospective mesh on a shape More...
 
virtual void CancelCompute ()
 Pass CancelCompute() to a child algorithm. 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...
 
virtual void SetEventListener (SMESH_subMesh *subMesh)
 Sets event listener to submeshes if necessary. More...
 
void SubmeshRestored (SMESH_subMesh *subMesh)
 Allow algo to do something after persistent restoration. More...
 
const FeaturesGetFeatures () const
 
virtual std::ostream & SaveTo (std::ostream &save)
 Saves nothing in a stream. More...
 
virtual std::istream & LoadFrom (std::istream &load)
 Loads nothing from a stream. More...
 
const std::vector< std::string > & GetCompatibleHypothesis ()
 Returns all types of compatible hypotheses. More...
 
virtual double GetProgress () const
 If possible, returns progress of computation [0.,1. 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...
 
virtual bool SetParametersByMesh (const SMESH_Mesh *theMesh, const TopoDS_Shape &theShape)
 Just return false as the algorithm does not hold parameters values. More...
 
virtual bool SetParametersByDefaults (const TDefaults &dflts, const SMESH_Mesh *theMesh=0)
 Initialize my parameter values by default parameters. More...
 
SMESH_ComputeErrorPtr GetComputeError () const
 return compute error More...
 
void InitComputeError ()
 initialize compute error etc. More...
 
double GetProgressByTic () const
 Return compute progress by nb of calls of this method. More...
 
std::vector< SMESH_subMesh * > & SubMeshesToCompute ()
 Return a vector of sub-meshes to Compute() More...
 
bool OnlyUnaryInput () const
 
bool NeedDiscreteBoundary () const
 
bool NeedShape () const
 
bool SupportSubmeshes () const
 
bool NeedLowerHyps (int dim) const
 
int NumberOfPoints (SMESH_Mesh &aMesh, const TopoDS_Wire &W)
 
virtual int GetDim () const
 
int GetStudyId () const
 
SMESH_GenGetGen () const
 
virtual int GetShapeType () const
 
virtual const char * GetLibName () const
 
virtual void NotifySubMeshesHypothesisModification ()
 
void SetLibName (const char *theLibName)
 
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. More...
 
virtual bool IsAuxiliary () const
 Return true if me is an auxiliary hypothesis. More...
 
SMESH_MeshGetMeshByPersistentID (int id)
 Find a mesh with given persistent ID. More...
 
const char * GetName () const
 
int GetID () const
 
int GetType () const
 
bool IsSameName (const SMESHDS_Hypothesis &other) const
 Compare types of hypotheses. More...
 
virtual bool operator== (const SMESHDS_Hypothesis &other) const
 Equality. More...
 
bool operator!= (const SMESHDS_Hypothesis &other) const
 

Static Public Member Functions

static TNodeDistributorGetDistributor (SMESH_Mesh &aMesh)
 
static const FeaturesGetFeatures (const std::string &algoType)
 Returns a structure describing algorithm features. 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 double EdgeLength (const TopoDS_Edge &E)
 Compute length of an edge. More...
 
static GeomAbs_Shape Continuity (const TopoDS_Edge &E1, const TopoDS_Edge &E2)
 Return continuity of two edges. 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 IsStraight (const TopoDS_Edge &E, const bool degenResult=false)
 Return true if an edge can be considered straight. More...
 
static bool isDegenerated (const TopoDS_Edge &E, const bool checkLength=false)
 Return true if an edge has no 3D curve. 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 SMESH_Mesh *mesh)
 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. More...
 
static EMeshError GetMeshError (SMESH_subMesh *subMesh)
 Finds topological errors of a sub-mesh. More...
 
static bool IsStatusFatal (Hypothesis_Status theStatus)
 

Protected Types

enum  HypothesisType {
  LOCAL_LENGTH, MAX_LENGTH, NB_SEGMENTS, BEG_END_LENGTH,
  DEFLECTION, ARITHMETIC_1D, FIXED_POINTS_1D, ADAPTIVE,
  GEOMETRIC_1D, DISTRIB_PROPAGATION, NONE
}
 
enum  ValueIndex {
  SCALE_FACTOR_IND = 0, BEG_LENGTH_IND = 0, END_LENGTH_IND = 1, DEFLECTION_IND = 0,
  PRECISION_IND = 1
}
 
enum  IValueIndex { NB_SEGMENTS_IND = 0, DISTR_TYPE_IND = 1, CONV_MODE_IND = 2 }
 
enum  VValueIndex { TAB_FUNC_IND = 0 }
 
enum  SValueIndex { EXPR_FUNC_IND = 0 }
 

Protected Member Functions

 TNodeDistributor (int hypId, int studyId, SMESH_Gen *gen)
 
virtual const list< const
SMESHDS_Hypothesis * > & 
GetUsedHypothesis (SMESH_Mesh &, const TopoDS_Shape &, const bool)
 See comments in SMESH_Algo.cxx. More...
 
virtual bool computeInternalParameters (SMESH_Mesh &theMesh, Adaptor3d_Curve &theC3d, double theLength, double theFirstU, double theLastU, std::list< double > &theParameters, const bool theReverse, bool theConsiderPropagation=false)
 
virtual void redistributeNearVertices (SMESH_Mesh &theMesh, Adaptor3d_Curve &theC3d, double theLength, std::list< double > &theParameters, const TopoDS_Vertex &theVf, const TopoDS_Vertex &theVl)
 Tune parameters to fit "SegmentLengthAroundVertex" hypothesis. More...
 
bool error (int error, const SMESH_Comment &comment="")
 store error and comment and then return ( error == COMPERR_OK ) More...
 
bool error (const SMESH_Comment &comment="")
 store COMPERR_ALGO_FAILED error and comment and then return false More...
 
bool error (SMESH_ComputeErrorPtr error)
 store error and return error->IsOK() More...
 
void addBadInputElement (const SMDS_MeshElement *elem)
 store a bad input element preventing computation, which may be a temporary one i.e. More...
 
void addBadInputElements (const SMESHDS_SubMesh *sm, const bool addNodes=false)
 

Static Protected Member Functions

static const
StdMeshers_SegmentLengthAroundVertex
getVertexHyp (SMESH_Mesh &theMesh, const TopoDS_Vertex &theV)
 Return StdMeshers_SegmentLengthAroundVertex assigned to vertex. More...
 

Protected Attributes

HypothesisType _hypType
 
const StdMeshers_FixedPoints1D_fpHyp
 
const StdMeshers_Adaptive1D_adaptiveHyp
 
double _value [2]
 
int _ivalue [3]
 
std::vector< double > _vvalue [1]
 
std::string _svalue [1]
 
std::vector< int_revEdgesIDs
 
TopoDS_Shape _mainEdge
 
const SMESH_HypoFilter_compatibleAllHypFilter
 
const SMESH_HypoFilter_compatibleNoAuxHypFilter
 
std::vector< std::string > _compatibleHypothesis
 
std::list< const
SMESHDS_Hypothesis * > 
_appliedHypList
 
std::list< const
SMESHDS_Hypothesis * > 
_usedHypList
 
bool _onlyUnaryInput
 
bool _requireDiscreteBoundary
 
bool _requireShape
 
bool _supportSubmeshes
 
bool _neededLowerHyps [4]
 
bool _quadraticMesh
 
int _error
 SMESH_ComputeErrorName or anything algo specific. More...
 
std::string _comment
 any text explaining what is wrong in Compute() More...
 
std::list< const
SMDS_MeshElement * > 
_badInputElements
 to explain COMPERR_BAD_INPUT_MESH More...
 
volatile bool _computeCanceled
 is set to True while computing to stop it More...
 
double _progress
 
int _progressTic
 
std::vector< SMESH_subMesh * > _smToCompute
 
SMESH_Gen_gen
 
int _studyId
 
int _shapeType
 
int _param_algo_dim
 
std::string _name
 
int _hypId
 
hypothesis_type _type
 

Private Attributes

list< const SMESHDS_Hypothesis * > myUsedHyps
 

Detailed Description

Class computing layers distribution using data of StdMeshers_LayerDistribution hypothesis.

Member Enumeration Documentation

enum SMESH_Algo::EMeshError
inherited
Enumerator
MEr_OK 
MEr_HOLES 
MEr_BAD_ORI 
MEr_EMPTY 
Enumerator
HYP_OK 
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 
Enumerator
PARAM_ALGO 
ALGO_0D 
ALGO_1D 
ALGO_2D 
ALGO_3D 
enum StdMeshers_Regular_1D::HypothesisType
protectedinherited
Enumerator
LOCAL_LENGTH 
MAX_LENGTH 
NB_SEGMENTS 
BEG_END_LENGTH 
DEFLECTION 
ARITHMETIC_1D 
FIXED_POINTS_1D 
ADAPTIVE 
GEOMETRIC_1D 
DISTRIB_PROPAGATION 
NONE 
enum StdMeshers_Regular_1D::IValueIndex
protectedinherited
Enumerator
NB_SEGMENTS_IND 
DISTR_TYPE_IND 
CONV_MODE_IND 
enum StdMeshers_Regular_1D::SValueIndex
protectedinherited
Enumerator
EXPR_FUNC_IND 
enum StdMeshers_Regular_1D::ValueIndex
protectedinherited
Enumerator
SCALE_FACTOR_IND 
BEG_LENGTH_IND 
END_LENGTH_IND 
DEFLECTION_IND 
PRECISION_IND 
enum StdMeshers_Regular_1D::VValueIndex
protectedinherited
Enumerator
TAB_FUNC_IND 

Constructor & Destructor Documentation

TNodeDistributor::TNodeDistributor ( int  hypId,
int  studyId,
SMESH_Gen gen 
)
protected

Referenced by GetDistributor().

Member Function Documentation

void SMESH_Algo::addBadInputElement ( const SMDS_MeshElement elem)
protectedinherited

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 StdMeshers_Projection_2D::Compute().

void SMESH_Algo::addBadInputElements ( const SMESHDS_SubMesh sm,
const bool  addNodes = false 
)
protectedinherited
void StdMeshers_Regular_1D::CancelCompute ( )
virtualinherited

Pass CancelCompute() to a child algorithm.

Reimplemented from SMESH_Algo.

References SMESH_Algo::CancelCompute().

bool StdMeshers_Regular_1D::CheckHypothesis ( SMESH_Mesh aMesh,
const TopoDS_Shape &  aShape,
SMESH_Hypothesis::Hypothesis_Status aStatus 
)
virtualinherited

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.

Implements SMESH_Algo.

Reimplemented in StdMeshers_QuadFromMedialAxis_1D2D::Algo1D.

References StdMeshers::StdMeshers_NumberOfSegments::ConversionMode(), StdMeshers_NumberOfSegments::DT_ExprFunc, StdMeshers_NumberOfSegments::DT_Regular, StdMeshers_NumberOfSegments::DT_Scale, StdMeshers_NumberOfSegments::DT_TabFunc, StdMeshers::StdMeshers_Geometric1D::GetCommonRatio(), StdMeshers::StdMeshers_Deflection1D::GetDeflection(), StdMeshers::StdMeshers_NumberOfSegments::GetDistrType(), StdMeshers::StdMeshers_NumberOfSegments::GetExpressionFunction(), StdMeshers_Propagation::GetFilter(), StdMeshers::StdMeshers_LocalLength::GetLength(), StdMeshers::StdMeshers_MaxLength::GetLength(), StdMeshers::StdMeshers_Arithmetic1D::GetLength(), StdMeshers::StdMeshers_StartEndLength::GetLength(), SMESHDS_Hypothesis::GetName(), SMESH::SMESH_Hypothesis::GetName(), StdMeshers::StdMeshers_NumberOfSegments::GetNumberOfSegments(), StdMeshers::StdMeshers_LocalLength::GetPrecision(), StdMeshers::Reversible1D::GetReversedEdges(), StdMeshers::StdMeshers_NumberOfSegments::GetScaleFactor(), StdMeshers::StdMeshers_Geometric1D::GetStartLength(), StdMeshers::StdMeshers_NumberOfSegments::GetTableFunction(), StdMeshers::StdMeshers_MaxLength::GetUsePreestimatedLength(), SMESH::HYP_INCOMPAT_HYPS, SMESH_Hypothesis::HYP_INCOMPATIBLE, SMESH_Hypothesis::HYP_MISSING, SMESH_Hypothesis::HYP_OK, SMESH::HYP_OK, SMESH_HypoFilter::IsOk(), and SMESHDS_Hypothesis::IsSameName().

Referenced by StdMeshers_QuadFromMedialAxis_1D2D::Algo1D::CheckHypothesis(), and Compute().

bool StdMeshers_Regular_1D::Compute ( SMESH_Mesh aMesh,
const TopoDS_Shape &  aShape 
)
virtualinherited

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

Implements SMESH_Algo.

Reimplemented in StdMeshers_CompositeSegment_1D.

References SMESHDS_Mesh::AddEdge(), SMESHDS_Mesh::AddNode(), COMPERR_BAD_INPUT_MESH, Edge, Handle(), SMESHDS_Mesh::MeshElements(), SMDS_MeshNode::NbInverseElements(), SMESHDS_Mesh::RemoveFreeElement(), SMESHDS_Mesh::RemoveFreeNode(), SMESHDS_Mesh::RemoveNode(), SMESHDS_Mesh::SetMeshElementOnShape(), SMESHDS_Mesh::SetNodeOnEdge(), SMESHDS_Mesh::ShapeToIndex(), and SMESH_Algo::VertexNode().

Referenced by StdMeshers_CompositeSegment_1D::Compute().

virtual bool SMESH_Algo::Compute ( SMESH_Mesh aMesh,
SMESH_MesherHelper aHelper 
)
virtualinherited

Computes mesh without geometry.

Parameters
aMesh- the mesh
aHelper- helper that must be used for adding elements to
Return values
bool- is a success

The method is called if ( !aMesh->HasShapeToMesh() )

Reimplemented in StdMeshers_Hexa_3D, and StdMeshers_HexaFromSkin_3D.

bool TNodeDistributor::Compute ( vector< double > &  positions,
gp_Pnt  pIn,
gp_Pnt  pOut,
SMESH_Mesh aMesh,
const StdMeshers_LayerDistribution hyp 
)
bool StdMeshers_Regular_1D::computeInternalParameters ( SMESH_Mesh theMesh,
Adaptor3d_Curve theC3d,
double  theLength,
double  theFirstU,
double  theLastU,
std::list< double > &  theParameters,
const bool  theReverse,
bool  theConsiderPropagation = false 
)
protectedvirtualinherited
GeomAbs_Shape SMESH_Algo::Continuity ( const TopoDS_Edge &  theE1,
const TopoDS_Edge &  theE2 
)
staticinherited

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

References OCC_CATCH_SIGNALS.

virtual bool SMESH_Hypothesis::DataDependOnParams ( ) const
virtualinherited

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.

Reimplemented in StdMeshers_ImportSource1D.

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

store COMPERR_ALGO_FAILED error and comment and then return false

References COMPERR_ALGO_FAILED, and SMESH_Algo::error().

Referenced by SMESH_Algo::error().

bool SMESH_Algo::error ( SMESH_ComputeErrorPtr  error)
protectedinherited

store error and return error->IsOK()

store error and return ( error == COMPERR_OK )

bool StdMeshers_Regular_1D::Evaluate ( SMESH_Mesh aMesh,
const TopoDS_Shape &  aShape,
MapShapeNbElems aResMap 
)
virtualinherited

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

Implements SMESH_Algo.

References COMPERR_ALGO_FAILED, Edge, Handle(), SMDSEntity_Edge, SMDSEntity_Last, SMDSEntity_Node, and SMDSEntity_Quad_Edge.

const list< const SMESHDS_Hypothesis * > & SMESH_Algo::GetAppliedHypothesis ( SMESH_Mesh aMesh,
const TopoDS_Shape &  aShape,
const bool  ignoreAuxiliary = true 
) const
inherited

Returns a list of compatible hypotheses assigned to a shape in a mesh.

List the relevant hypothesis associated to the 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 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)

Relevant hypothesis have a name (type) listed in the algorithm. Hypothesis associated to father shape -are not- taken into account (see GetUsedHypothesis)

References me.

const SMESH_HypoFilter * SMESH_Algo::GetCompatibleHypoFilter ( const bool  ignoreAuxiliary) const
inherited

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(), SMESH_HypoFilter::HasName(), SMESH_HypoFilter::Init(), SMESH_HypoFilter::IsAuxiliary(), me, and SMESH_HypoFilter::Or().

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

Returns all types of compatible hypotheses.

SMESH_ComputeErrorPtr SMESH_Algo::GetComputeError ( ) const
inherited

return compute error

References SMESH_ComputeError::New().

Referenced by StdMeshers_Hexa_3D::Compute().

int SMESH_Hypothesis::GetDim ( ) const
virtualinherited
const SMESH_Algo::Features & SMESH_Algo::GetFeatures ( const std::string &  algoType)
staticinherited
const Features& SMESH_Algo::GetFeatures ( ) const
inherited
SMESH_Gen* SMESH_Hypothesis::GetGen ( ) const
inherited
int SMESHDS_Hypothesis::GetID ( ) const
inherited
virtual const char* SMESH_Hypothesis::GetLibName ( ) const
virtualinherited
SMESH_Mesh * SMESH_Hypothesis::GetMeshByPersistentID ( int  id)
inherited

Find a mesh with given persistent ID.

References studyContextStruct::mapMesh.

bool SMESH_Algo::GetNodeParamOnEdge ( const SMESHDS_Mesh theMesh,
const TopoDS_Edge &  theEdge,
std::vector< double > &  theParams 
)
staticinherited

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_Position::GetTypeOfPosition(), SMDS_EdgePosition::GetUParameter(), SMESHDS_Mesh::MeshElements(), second, and SMDS_TOP_EDGE.

Referenced by StdMeshers_Projection_1D::Compute(), StdMeshers_Projection_1D::Evaluate(), StdMeshers_Geometric1D::SetParametersByMesh(), StdMeshers_Deflection1D::SetParametersByMesh(), StdMeshers_MaxLength::SetParametersByMesh(), StdMeshers_LocalLength::SetParametersByMesh(), StdMeshers_StartEndLength::SetParametersByMesh(), and StdMeshers_Arithmetic1D::SetParametersByMesh().

double SMESH_Algo::GetProgress ( ) const
virtualinherited

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

]

double SMESH_Algo::GetProgressByTic ( ) const
inherited

Return compute progress by nb of calls of this method.

int SMESH_Hypothesis::GetShapeType ( ) const
virtualinherited
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 
)
staticinherited

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_Position::GetTypeOfPosition(), SMDS_EdgePosition::GetUParameter(), SMESH_MesherHelper::IsMedium(), SMESHDS_Mesh::MeshElements(), SMESHDS_SubMesh::NbElements(), SMESHDS_SubMesh::NbNodes(), and SMDS_TOP_EDGE.

Referenced by VISCOUS_3D::_ViscousBuilder::addBoundaryElements(), StdMeshers_Regular_1D::computeInternalParameters(), SMESH_Pattern::findExistingNodes(), SMESH_MesherHelper::IsStructured(), SMESH_MesherHelper::LoadNodeColumns(), VISCOUS_3D::_ViscousBuilder::shrink(), and _FaceSide::StoreNodes().

int SMESH_Hypothesis::GetStudyId ( ) const
inherited
int SMESHDS_Hypothesis::GetType ( ) const
inherited
const list< const SMESHDS_Hypothesis * > & SMESH_Algo::GetUsedHypothesis ( SMESH_Mesh aMesh,
const TopoDS_Shape &  aShape,
const bool  ignoreAuxiliary = true 
) const
virtualinherited

Returns a list of compatible hypotheses used to mesh a shape.

List the hypothesis used by the algorithm associated to the 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.

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 me.

Referenced by StdMeshers_SegmentAroundVertex_0D::CheckHypothesis(), and StdMeshers_Regular_1D::GetUsedHypothesis().

virtual const list<const SMESHDS_Hypothesis *>& TNodeDistributor::GetUsedHypothesis ( SMESH_Mesh aMesh,
const TopoDS_Shape &  aShape,
const bool  ignoreAuxiliary 
)
protectedvirtual

See comments in SMESH_Algo.cxx.

Reimplemented from StdMeshers_Regular_1D.

References myUsedHyps.

const StdMeshers_SegmentLengthAroundVertex * StdMeshers_Regular_1D::getVertexHyp ( SMESH_Mesh theMesh,
const TopoDS_Vertex &  theV 
)
staticprotectedinherited

Return StdMeshers_SegmentLengthAroundVertex assigned to vertex.

References SMESH_HypoFilter::HasName().

void SMESH_Algo::InitComputeError ( )
inherited

initialize compute error etc.

initialize compute error before call of Compute()

before call of Compute()

References COMPERR_OK.

Referenced by StdMeshers_Hexa_3D::Compute().

virtual bool SMESH_Hypothesis::IsAuxiliary ( ) const
virtualinherited

Return true if me is an auxiliary hypothesis.

Return values
bool- auxiliary or not

An auxiliary hypothesis is optional, i.e. an algorithm can work without it and another hypothesis of the same dimension can be assigned to the shape

References SMESHDS_Hypothesis::GetType().

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

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

Referenced by StdMeshers_Quadrangle_2D::checkNbEdgesForEvaluate(), and _QuadFaceGrid::Init().

bool SMESHDS_Hypothesis::IsSameName ( const SMESHDS_Hypothesis other) const
inherited

Compare types of hypotheses.

References SMESHDS_Hypothesis::_name.

Referenced by StdMeshers_Regular_1D::CheckHypothesis().

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

Return true if an edge can be considered straight.

References Min().

Referenced by Handle(), and VISCOUS_3D::_ViscousBuilder::limitMaxLenByCurvature().

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

Loads nothing from a stream.

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

Implements SMESHDS_Hypothesis.

bool SMESH_Algo::NeedDiscreteBoundary ( ) const
inherited
bool SMESH_Algo::NeedLowerHyps ( int  dim) const
inherited
bool SMESH_Algo::NeedShape ( ) const
inherited
void SMESH_Hypothesis::NotifySubMeshesHypothesisModification ( )
virtualinherited
int SMESH_Algo::NumberOfPoints ( SMESH_Mesh aMesh,
const TopoDS_Wire &  W 
)
inherited

References Edge.

bool SMESH_Algo::OnlyUnaryInput ( ) const
inherited
bool SMESHDS_Hypothesis::operator!= ( const SMESHDS_Hypothesis other) const
inherited
bool SMESHDS_Hypothesis::operator== ( const SMESHDS_Hypothesis other) const
virtualinherited

Equality.

References SMESHDS_Hypothesis::_name.

void StdMeshers_Regular_1D::redistributeNearVertices ( SMESH_Mesh theMesh,
Adaptor3d_Curve theC3d,
double  theLength,
std::list< double > &  theParameters,
const TopoDS_Vertex &  theVf,
const TopoDS_Vertex &  theVl 
)
protectedvirtualinherited

Tune parameters to fit "SegmentLengthAroundVertex" hypothesis.

Parameters
theC3d- wire curve
theLength- curve length
theParameters- internal nodes parameters to modify
theVf- 1st vertex
theVl- 2nd vertex

References compensateError(), StdMeshers::StdMeshers_SegmentLengthAroundVertex::GetLength(), and Min().

ostream & SMESH_Algo::SaveTo ( std::ostream &  save)
virtualinherited

Saves nothing in a stream.

Usually an algorithm has nothing to save.

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

Implements SMESHDS_Hypothesis.

void StdMeshers_Regular_1D::SetEventListener ( SMESH_subMesh subMesh)
virtualinherited

Sets event listener to submeshes if necessary.

Class used to clean mesh on edges when 0D hyp modified.

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.

Common approach doesn't work when 0D algo is missing because the 0D hyp is considered as not participating in computation whereas it is used by 1D algo.

Clean mesh on edges

Parameters
event- algo_event or compute_event itself (of SMESH_subMesh)
eventType- ALGO_EVENT or COMPUTE_EVENT (of SMESH_subMesh)
subMesh- the submesh where the event occurs

Sets event listener to vertex submeshes

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.

Reimplemented from SMESH_Algo.

Reimplemented in StdMeshers_CompositeSegment_1D.

References StdMeshers_Propagation::SetPropagationMgr().

Referenced by StdMeshers_CompositeSegment_1D::SetEventListener().

void SMESH_Hypothesis::SetLibName ( const char *  theLibName)
inherited
bool SMESH_Algo::SetParametersByDefaults ( const TDefaults dflts,
const SMESH_Mesh theMesh = 0 
)
virtualinherited

Initialize my parameter values by default parameters.

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

Implements SMESH_Hypothesis.

bool SMESH_Algo::SetParametersByMesh ( const SMESH_Mesh theMesh,
const TopoDS_Shape &  theShape 
)
virtualinherited

Just return false as the algorithm does not hold parameters values.

Implements SMESH_Hypothesis.

std::vector<SMESH_subMesh*>& SMESH_Algo::SubMeshesToCompute ( )
inherited

Return a vector of sub-meshes to Compute()

void StdMeshers_Regular_1D::SubmeshRestored ( SMESH_subMesh subMesh)
virtualinherited

Allow algo to do something after persistent restoration.

Do nothing.

Parameters
subMesh- restored submesh

This method is called only if a submesh has HYP_OK algo_state.

Reimplemented from SMESH_Algo.

bool SMESH_Algo::SupportSubmeshes ( ) const
inherited
const SMDS_MeshNode * SMESH_Algo::VertexNode ( const TopoDS_Vertex &  V,
const SMESHDS_Mesh meshDS 
)
staticinherited

Return the node built on a vertex.

Parameters
V- the vertex
meshDS- mesh data structure
Return values
constSMDS_MeshNode* - found node or NULL
Parameters
V- the vertex
meshDS- mesh
Return values
constSMDS_MeshNode* - found node or NULL
See Also
SMESH_MesherHelper::GetSubShapeByNode( const SMDS_MeshNode*, SMESHDS_Mesh* )

References SMESHDS_Mesh::MeshElements().

Referenced by StdMeshers_CompositeSegment_1D::Compute(), StdMeshers_Import_1D::Compute(), StdMeshers_Import_1D2D::Compute(), StdMeshers_Regular_1D::Compute(), StdMeshers_Prism_3D::computeWalls(), SMESH_Pattern::findExistingNodes(), StdMeshers_ProjectionUtils::FindMatchingNodesOnFaces(), StdMeshers_Quadrangle_2D::getEnforcedUV(), StdMeshers_FaceSide::GetFaceWires(), SMESH_MesherHelper::IsStructured(), VISCOUS_3D::_ViscousBuilder::makeLayer(), and StdMeshers_FaceSide::VertexNode().

const SMDS_MeshNode * SMESH_Algo::VertexNode ( const TopoDS_Vertex &  V,
const SMESH_Mesh mesh 
)
staticinherited

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

static const SMDS_MeshNode* SMESH_Algo::VertexNode ( const TopoDS_Vertex &  V,
const SMESHDS_SubMesh edgeSM,
const SMESH_Mesh mesh,
const bool  checkV = true 
)
staticinherited

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

Field Documentation

const StdMeshers_Adaptive1D* StdMeshers_Regular_1D::_adaptiveHyp
protectedinherited
std::list<const SMESHDS_Hypothesis *> SMESH_Algo::_appliedHypList
protectedinherited
std::list<const SMDS_MeshElement*> SMESH_Algo::_badInputElements
protectedinherited

to explain COMPERR_BAD_INPUT_MESH

std::string SMESH_Algo::_comment
protectedinherited

any text explaining what is wrong in Compute()

const SMESH_HypoFilter* SMESH_Algo::_compatibleAllHypFilter
protectedinherited

Referenced by SMESH_Algo::SMESH_Algo().

const SMESH_HypoFilter* SMESH_Algo::_compatibleNoAuxHypFilter
protectedinherited

Referenced by SMESH_Algo::SMESH_Algo().

volatile bool SMESH_Algo::_computeCanceled
protectedinherited

is set to True while computing to stop it

int SMESH_Algo::_error
protectedinherited

SMESH_ComputeErrorName or anything algo specific.

Referenced by SMESH_Algo::SMESH_Algo().

const StdMeshers_FixedPoints1D* StdMeshers_Regular_1D::_fpHyp
protectedinherited
SMESH_Gen* SMESH_Hypothesis::_gen
protectedinherited
int SMESHDS_Hypothesis::_hypId
protectedinherited
HypothesisType StdMeshers_Regular_1D::_hypType
protectedinherited
int StdMeshers_Regular_1D::_ivalue[3]
protectedinherited
TopoDS_Shape StdMeshers_Regular_1D::_mainEdge
protectedinherited
std::string SMESHDS_Hypothesis::_name
protectedinherited

Referenced by SMESHDS_Hypothesis::IsSameName(), SMESHDS_Hypothesis::operator==(), StdMeshers_Adaptive1D::StdMeshers_Adaptive1D(), StdMeshers_Arithmetic1D::StdMeshers_Arithmetic1D(), StdMeshers_AutomaticLength::StdMeshers_AutomaticLength(), StdMeshers_Cartesian_3D::StdMeshers_Cartesian_3D(), StdMeshers_CartesianParameters3D::StdMeshers_CartesianParameters3D(), StdMeshers_CompositeHexa_3D::StdMeshers_CompositeHexa_3D(), StdMeshers_CompositeSegment_1D::StdMeshers_CompositeSegment_1D(), StdMeshers_Deflection1D::StdMeshers_Deflection1D(), StdMeshers_FixedPoints1D::StdMeshers_FixedPoints1D(), StdMeshers_Geometric1D::StdMeshers_Geometric1D(), StdMeshers_Hexa_3D::StdMeshers_Hexa_3D(), StdMeshers_HexaFromSkin_3D::StdMeshers_HexaFromSkin_3D(), StdMeshers_Import_1D::StdMeshers_Import_1D(), StdMeshers_Import_1D2D::StdMeshers_Import_1D2D(), StdMeshers_ImportSource1D::StdMeshers_ImportSource1D(), StdMeshers_ImportSource2D::StdMeshers_ImportSource2D(), StdMeshers_LayerDistribution::StdMeshers_LayerDistribution(), StdMeshers_LayerDistribution2D::StdMeshers_LayerDistribution2D(), StdMeshers_LengthFromEdges::StdMeshers_LengthFromEdges(), StdMeshers_LocalLength::StdMeshers_LocalLength(), StdMeshers_MaxElementArea::StdMeshers_MaxElementArea(), StdMeshers_MaxElementVolume::StdMeshers_MaxElementVolume(), StdMeshers_MaxLength::StdMeshers_MaxLength(), StdMeshers_MEFISTO_2D::StdMeshers_MEFISTO_2D(), StdMeshers_NotConformAllowed::StdMeshers_NotConformAllowed(), StdMeshers_NumberOfLayers::StdMeshers_NumberOfLayers(), StdMeshers_NumberOfLayers2D::StdMeshers_NumberOfLayers2D(), StdMeshers_NumberOfSegments::StdMeshers_NumberOfSegments(), StdMeshers_PolygonPerFace_2D::StdMeshers_PolygonPerFace_2D(), StdMeshers_Prism_3D::StdMeshers_Prism_3D(), StdMeshers_Projection_1D::StdMeshers_Projection_1D(), StdMeshers_Projection_1D2D::StdMeshers_Projection_1D2D(), StdMeshers_Projection_2D::StdMeshers_Projection_2D(), StdMeshers_Projection_3D::StdMeshers_Projection_3D(), StdMeshers_ProjectionSource1D::StdMeshers_ProjectionSource1D(), StdMeshers_ProjectionSource2D::StdMeshers_ProjectionSource2D(), StdMeshers_ProjectionSource3D::StdMeshers_ProjectionSource3D(), StdMeshers_Propagation::StdMeshers_Propagation(), StdMeshers_PropagOfDistribution::StdMeshers_PropagOfDistribution(), StdMeshers_QuadFromMedialAxis_1D2D::StdMeshers_QuadFromMedialAxis_1D2D(), StdMeshers_Quadrangle_2D::StdMeshers_Quadrangle_2D(), StdMeshers_QuadrangleParams::StdMeshers_QuadrangleParams(), StdMeshers_QuadranglePreference::StdMeshers_QuadranglePreference(), StdMeshers_QuadraticMesh::StdMeshers_QuadraticMesh(), StdMeshers_RadialPrism_3D::StdMeshers_RadialPrism_3D(), StdMeshers_RadialQuadrangle_1D2D::StdMeshers_RadialQuadrangle_1D2D(), StdMeshers_Regular_1D::StdMeshers_Regular_1D(), StdMeshers_StartEndLength::StdMeshers_StartEndLength(), StdMeshers_ViscousLayers::StdMeshers_ViscousLayers(), and StdMeshers_ViscousLayers2D::StdMeshers_ViscousLayers2D().

int SMESH_Hypothesis::_param_algo_dim
protectedinherited

Referenced by SMESH_Hypothesis::SMESH_Hypothesis(), StdMeshers_Adaptive1D::StdMeshers_Adaptive1D(), StdMeshers_Arithmetic1D::StdMeshers_Arithmetic1D(), StdMeshers_AutomaticLength::StdMeshers_AutomaticLength(), StdMeshers_CartesianParameters3D::StdMeshers_CartesianParameters3D(), StdMeshers_Deflection1D::StdMeshers_Deflection1D(), StdMeshers_FixedPoints1D::StdMeshers_FixedPoints1D(), StdMeshers_ImportSource1D::StdMeshers_ImportSource1D(), StdMeshers_ImportSource2D::StdMeshers_ImportSource2D(), StdMeshers_LayerDistribution::StdMeshers_LayerDistribution(), StdMeshers_LayerDistribution2D::StdMeshers_LayerDistribution2D(), StdMeshers_LengthFromEdges::StdMeshers_LengthFromEdges(), StdMeshers_LocalLength::StdMeshers_LocalLength(), StdMeshers_MaxElementArea::StdMeshers_MaxElementArea(), StdMeshers_MaxElementVolume::StdMeshers_MaxElementVolume(), StdMeshers_MaxLength::StdMeshers_MaxLength(), StdMeshers_NotConformAllowed::StdMeshers_NotConformAllowed(), StdMeshers_NumberOfLayers::StdMeshers_NumberOfLayers(), StdMeshers_NumberOfLayers2D::StdMeshers_NumberOfLayers2D(), StdMeshers_NumberOfSegments::StdMeshers_NumberOfSegments(), StdMeshers_ProjectionSource1D::StdMeshers_ProjectionSource1D(), StdMeshers_ProjectionSource2D::StdMeshers_ProjectionSource2D(), StdMeshers_ProjectionSource3D::StdMeshers_ProjectionSource3D(), StdMeshers_Propagation::StdMeshers_Propagation(), StdMeshers_QuadrangleParams::StdMeshers_QuadrangleParams(), StdMeshers_QuadranglePreference::StdMeshers_QuadranglePreference(), StdMeshers_QuadraticMesh::StdMeshers_QuadraticMesh(), StdMeshers_Reversible1D::StdMeshers_Reversible1D(), StdMeshers_StartEndLength::StdMeshers_StartEndLength(), StdMeshers_ViscousLayers::StdMeshers_ViscousLayers(), and StdMeshers_ViscousLayers2D::StdMeshers_ViscousLayers2D().

double SMESH_Algo::_progress
protectedinherited
int SMESH_Algo::_progressTic
protectedinherited
bool SMESH_Algo::_quadraticMesh
protectedinherited
bool SMESH_Algo::_requireShape
protectedinherited
std::vector<int> StdMeshers_Regular_1D::_revEdgesIDs
protectedinherited
std::vector<SMESH_subMesh*> SMESH_Algo::_smToCompute
protectedinherited
int SMESH_Hypothesis::_studyId
protectedinherited
std::string StdMeshers_Regular_1D::_svalue[1]
protectedinherited
double StdMeshers_Regular_1D::_value[2]
protectedinherited
std::vector<double> StdMeshers_Regular_1D::_vvalue[1]
protectedinherited
list<const SMESHDS_Hypothesis *> TNodeDistributor::myUsedHyps
private

Referenced by Compute(), and GetUsedHypothesis().