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) |
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 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... | |
Root of all algorithms.
Methods of the class are grouped into several parts:
Creates algorithm.
hypId | - algorithm ID |
studyId | - study ID |
gen | - SMESH_Gen |
|
virtual |
Destructor.
|
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().
|
protected |
References addBadInputElement(), SMESHDS_SubMesh::GetElements(), and SMESHDS_SubMesh::GetNodes().
Referenced by StdMeshers_Projection_2D::Compute().
|
virtual |
Sets _computeCanceled to true. It's usage depends on implementation of a particular mesher.
Reimplemented in NETGENPlugin_NETGEN_2D, NETGENPlugin_NETGEN_2D3D, NETGENPlugin_NETGEN_2D_ONLY, NETGENPlugin_NETGEN_3D, and StdMeshers_Regular_1D.
Referenced by NETGENPlugin_NETGEN_2D::CancelCompute(), NETGENPlugin_NETGEN_2D3D::CancelCompute(), NETGENPlugin_NETGEN_2D_ONLY::CancelCompute(), NETGENPlugin_NETGEN_3D::CancelCompute(), StdMeshers_Regular_1D::CancelCompute(), and SMESH_subMesh::ComputeStateEngine().
|
pure virtual |
Check hypothesis definition to mesh a shape.
aMesh | - the mesh |
aShape | - the shape |
aStatus | - check result |
bool | - true if hypothesis is well defined |
Textual description of a problem can be stored in _comment field.
Implemented in NETGENPlugin_NETGEN_2D_ONLY, StdMeshers_Cartesian_3D, StdMeshers_CompositeHexa_3D, StdMeshers_HexaFromSkin_3D, StdMeshers_QuadFromMedialAxis_1D2D, StdMeshers_Quadrangle_2D, NETGENPlugin_NETGEN_2D, NETGENPlugin_NETGEN_2D3D, NETGENPlugin_NETGEN_3D, StdMeshers_Hexa_3D, StdMeshers_Import_1D, StdMeshers_Import_1D2D, StdMeshers_MEFISTO_2D, StdMeshers_PolygonPerFace_2D, StdMeshers_Prism_3D, StdMeshers_Projection_1D, StdMeshers_Projection_2D, StdMeshers_Projection_3D, StdMeshers_RadialPrism_3D, StdMeshers_RadialQuadrangle_1D2D, StdMeshers_Regular_1D, StdMeshers_SegmentAroundVertex_0D, StdMeshers_UseExisting_2D, StdMeshers_UseExisting_1D, and StdMeshers_QuadFromMedialAxis_1D2D::Algo1D.
Referenced by SMESH_subMesh::AlgoStateEngine(), SMESH_subMesh::ComputeStateEngine(), and SMESH_subMesh::Evaluate().
|
pure virtual |
Computes mesh on a shape.
aMesh | - the mesh |
aShape | - the shape |
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 NETGENPlugin_NETGEN_2D, NETGENPlugin_NETGEN_2D3D, NETGENPlugin_NETGEN_2D_ONLY, NETGENPlugin_NETGEN_3D, StdMeshers_Cartesian_3D, StdMeshers_CompositeHexa_3D, StdMeshers_CompositeSegment_1D, StdMeshers_Hexa_3D, StdMeshers_HexaFromSkin_3D, StdMeshers_Import_1D, StdMeshers_Import_1D2D, StdMeshers_MEFISTO_2D, StdMeshers_PolygonPerFace_2D, StdMeshers_Prism_3D, StdMeshers_Projection_1D, StdMeshers_Projection_1D2D, StdMeshers_Projection_2D, StdMeshers_Projection_3D, StdMeshers_QuadFromMedialAxis_1D2D, StdMeshers_Quadrangle_2D, StdMeshers_RadialPrism_3D, StdMeshers_RadialQuadrangle_1D2D, StdMeshers_Regular_1D, StdMeshers_SegmentAroundVertex_0D, StdMeshers_UseExisting_2D, and StdMeshers_UseExisting_1D.
Referenced by SMESH_subMesh::ComputeStateEngine().
|
virtual |
Computes mesh without geometry.
aMesh | - the mesh |
aHelper | - helper that must be used for adding elements to \aaMesh |
bool | - is a success |
The method is called if ( !aMesh->HasShapeToMesh() )
aMesh | - the mesh |
aHelper | - helper that must be used for adding elements to \aaMesh |
bool | - is a success |
Reimplemented in NETGENPlugin_NETGEN_3D, StdMeshers_Hexa_3D, and StdMeshers_HexaFromSkin_3D.
References error().
|
static |
Return continuity of two edges.
E1 | - the 1st edge |
E2 | - the 2nd edge |
GeomAbs_Shape | - regularity at the junction between E1 and E2 |
|
static |
Compute length of an edge.
E | - the edge |
double | - the length |
Compute length of an edge
Referenced by NETGENPlugin_Mesher::Compute(), StdMeshers_Projection_1D::Compute(), StdMeshers_Regular_1D::Compute(), NETGENPlugin_Mesher::Evaluate(), NETGENPlugin_NETGEN_2D_ONLY::Evaluate(), StdMeshers_Regular_1D::Evaluate(), StdMeshers_ProjectionUtils::FindFaceAssociation(), SMESH_MesherHelper::LoadNodeColumns(), StdMeshers_AutomaticLength::SetParametersByMesh(), and StdMeshers_FaceSide::StdMeshers_FaceSide().
|
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().
|
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().
|
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().
|
pure virtual |
evaluates size of prospective mesh on a shape
aMesh | - the mesh |
aShape | - the shape |
aResMap | - prospective number of elements by SMDSAbs_ElementType by a sub-mesh |
bool | - is a success |
Implemented in NETGENPlugin_NETGEN_2D, NETGENPlugin_NETGEN_2D3D, NETGENPlugin_NETGEN_2D_ONLY, NETGENPlugin_NETGEN_3D, StdMeshers_Cartesian_3D, StdMeshers_CompositeHexa_3D, StdMeshers_Hexa_3D, StdMeshers_HexaFromSkin_3D, StdMeshers_Import_1D, StdMeshers_Import_1D2D, StdMeshers_MEFISTO_2D, StdMeshers_PolygonPerFace_2D, StdMeshers_Prism_3D, StdMeshers_Projection_1D, StdMeshers_Projection_1D2D, StdMeshers_Projection_2D, StdMeshers_Projection_3D, StdMeshers_QuadFromMedialAxis_1D2D, StdMeshers_Quadrangle_2D, StdMeshers_RadialPrism_3D, StdMeshers_RadialQuadrangle_1D2D, StdMeshers_Regular_1D, StdMeshers_SegmentAroundVertex_0D, StdMeshers_UseExisting_2D, and StdMeshers_UseExisting_1D.
Referenced by SMESH_subMesh::Evaluate().
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.
aMesh | - the mesh |
aShape | - the shape |
ignoreAuxiliary | - do not include auxiliary hypotheses in the list |
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().
const SMESH_HypoFilter * SMESH_Algo::GetCompatibleHypoFilter | ( | const bool | ignoreAuxiliary | ) | const |
Returns the filter recognizing only compatible hypotheses.
ignoreAuxiliary | - make filter ignore compatible auxiliary hypotheses |
SMESH_HypoFilter* | - the filter that can be NULL |
ignoreAuxiliary | - make filter ignore auxiliary hypotheses |
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().
const vector< string > & SMESH_Algo::GetCompatibleHypothesis | ( | ) |
Returns all types of compatible hypotheses.
SMESH_ComputeErrorPtr SMESH_Algo::GetComputeError | ( | ) | const |
return compute error
References SMESH_ComputeError::New().
Referenced by StdMeshers_Hexa_3D::Compute(), StdMeshers_RadialQuadrangle_1D2D::Compute(), StdMeshers_RadialQuadrangle_1D2D::computeLayerPositions(), StdMeshers_RadialPrism_3D::computeLayerPositions(), and SMESH_subMesh::ComputeStateEngine().
const Features & SMESH_Algo::GetFeatures | ( | ) | const |
References GetFeatures().
Referenced by GetFeatures().
|
static |
Returns a structure describing algorithm features.
Return Data of the algorithm.
References error(), and SMESH_Gen::GetPluginXMLPaths().
Referenced by StdMeshers_ProjectionUtils::SourceNotComputedError().
|
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().
|
static |
Fill vector of node parameters on geometrical edge, including vertex nodes.
theMesh | - The mesh containing nodes |
theEdge | - The geometrical edge of interest |
theParams | - The resulting vector of sorted node parameters |
bool | - false if not all parameters are OK |
theMesh | - The mesh containing nodes |
theEdge | - The geometrical edge of interest |
theParams | - The resulting vector of sorted node parameters |
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().
|
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.
double SMESH_Algo::GetProgressByTic | ( | ) | const |
Return compute progress by nb of calls of this method.
|
static |
Fill map of node parameter on geometrical edge to node it-self.
Fill vector of node parameters on geometrical edge, including vertex nodes.
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 |
bool | - false if not all parameters are OK |
theMesh | - The mesh containing nodes |
theEdge | - The geometrical edge of interest |
theParams | - The resulting vector of sorted node parameters |
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().
|
virtual |
Returns a list of compatible hypotheses used to mesh a shape.
aMesh | - the mesh |
aShape | - the shape |
ignoreAuxiliary | - do not include auxiliary hypotheses in the list |
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 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().
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().
|
static |
Return true if an edge can be considered as a continuation of another.
Referenced by StdMeshers_Quadrangle_2D::checkNbEdgesForEvaluate().
|
static |
Return true if an edge has no 3D curve.
Referenced by SMESH_subMesh::checkComputeError(), StdMeshers_Quadrangle_2D::CheckNbEdges(), SMESH_Gen::Compute(), NETGENPlugin_NETGEN_2D_ONLY::Compute(), StdMeshers_Cartesian_3D::Compute(), StdMeshers_Import_1D2D::Compute(), SMESH_subMesh::ComputeStateEngine(), SMESH_MeshEditor::ExtrusionAlongTrack(), 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().
Return true if an edge can be considered straight.
References draftgeoutils.general::v1().
|
virtual |
Loads nothing from a stream.
load | - the stream |
std::ostream | & - the stream |
Implements SMESHDS_Hypothesis.
bool SMESH_Algo::NeedDiscreteBoundary | ( | ) | const |
Referenced by SMESH_subMesh::cleanDependsOn().
bool SMESH_Algo::NeedShape | ( | ) | const |
Referenced by SMESH_subMesh::AlgoStateEngine().
int SMESH_Algo::NumberOfPoints | ( | SMESH_Mesh & | aMesh, |
const TopoDS_Wire & | W | ||
) |
References SMESH_Mesh::GetSubMesh(), SMESH_subMesh::GetSubMeshDS(), and SMESHDS_SubMesh::NbNodes().
bool SMESH_Algo::OnlyUnaryInput | ( | ) | const |
|
virtual |
Saves nothing in a stream.
save | - the stream |
std::ostream | & - the stream |
Usually an algoritm has nothing to save
Implements SMESHDS_Hypothesis.
References OfflineRenderingUtils::save().
|
virtual |
Sets event listener to submeshes if necessary.
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
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().
|
virtual |
Initialize my parameter values by default parameters.
bool | - true if parameter values have been successfully defined |
Implements SMESH_Hypothesis.
|
virtual |
Just return false as the algorithm does not hold parameters values.
Implements SMESH_Hypothesis.
std::vector< SMESH_subMesh * > & SMESH_Algo::SubMeshesToCompute | ( | ) |
Return a vector of sub-meshes to Compute()
Referenced by SMESH_subMesh::ComputeStateEngine().
|
virtual |
Allow algo to do something after persistent restoration.
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().
bool SMESH_Algo::SupportSubmeshes | ( | ) | const |
|
static |
Return the node built on a vertex. A node moved to other geometry by MergeNodes() is also returned.
V | - the vertex |
mesh | - mesh |
const | SMDS_MeshNode* - found node or NULL |
References SMESH_MesherHelper::GetAncestors(), and VertexNode().
|
static |
Return the node built on a vertex.
V | - the vertex |
meshDS | - mesh data structure |
const | SMDS_MeshNode* - found node or NULL |
V | - the vertex |
meshDS | - mesh |
const | SMDS_MeshNode* - found node or NULL |
References SMESHDS_Mesh::MeshElements().
Referenced by NETGENPlugin_Mesher::AddIntVerticesInFaces(), NETGENPlugin_NETGEN_3D::Compute(), StdMeshers_CompositeSegment_1D::Compute(), StdMeshers_Import_1D::Compute(), StdMeshers_Import_1D2D::Compute(), StdMeshers_Projection_1D::Compute(), StdMeshers_RadialQuadrangle_1D2D::Compute(), StdMeshers_Regular_1D::Compute(), SMESH_MeshEditor::ExtrusionAlongTrack(), NETGENPlugin_Mesher::FillSMesh(), StdMeshers_ProjectionUtils::FindMatchingNodesOnFaces(), StdMeshers_Quadrangle_2D::getEnforcedUV(), StdMeshers_FaceSide::GetFaceWires(), GetNodeParamOnEdge(), GetSortedNodesOnEdge(), SMESH_MesherHelper::IsStructured(), VertexNode(), and StdMeshers_FaceSide::VertexNode().
|
static |
Return the node built on a vertex. A node moved to other geometry by MergeNodes() is also returned.
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 |
const | SMDS_MeshNode* - found node or NULL |
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 |
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().