28 #ifndef _SMESH_ALGO_HXX_ 29 #define _SMESH_ALGO_HXX_ 37 #include <TopoDS_Shape.hxx> 38 #include <TopoDS_Edge.hxx> 39 #include <GeomAbs_Shape.hxx> 82 virtual std::ostream &
SaveTo(std::ostream & save);
89 virtual std::istream &
LoadFrom(std::istream & load);
94 const std::vector < std::string > & GetCompatibleHypothesis();
103 virtual bool CheckHypothesis(
SMESH_Mesh& aMesh,
104 const TopoDS_Shape& aShape,
116 virtual bool Compute(
SMESH_Mesh & aMesh,
const TopoDS_Shape & aShape) = 0;
135 virtual bool Evaluate(
SMESH_Mesh & aMesh,
const TopoDS_Shape & aShape,
151 virtual const std::list <const SMESHDS_Hypothesis *> &
153 const TopoDS_Shape & aShape,
154 const bool ignoreAuxiliary=
true);
166 const std::list <const SMESHDS_Hypothesis *> &
168 const TopoDS_Shape & aShape,
169 const bool ignoreAuxiliary=
true);
177 const bool ignoreAuxiliary)
const;
190 void InitComputeError();
253 static bool GetNodeParamOnEdge(
const SMESHDS_Mesh* theMesh,
254 const TopoDS_Edge& theEdge,
255 std::vector< double > & theParams);
264 static bool GetSortedNodesOnEdge(
const SMESHDS_Mesh* theMesh,
265 const TopoDS_Edge& theEdge,
266 const bool ignoreMediumNodes,
267 std::map< double, const SMDS_MeshNode* > & theNodes);
275 static bool IsReversedSubMesh (
const TopoDS_Face& theFace,
282 static double EdgeLength(
const TopoDS_Edge & E);
290 static GeomAbs_Shape Continuity(
const TopoDS_Edge & E1,
const TopoDS_Edge & E2);
295 static bool IsContinuous(
const TopoDS_Edge & E1,
const TopoDS_Edge & E2) {
296 return ( Continuity( E1, E2 ) >= GeomAbs_G1 );
305 static const SMDS_MeshNode* VertexNode(
const TopoDS_Vertex& V,
std::list< const SMDS_MeshElement * > _badInputElements
to explain COMPERR_BAD_INPUT_MESH
std::list< const SMESHDS_Hypothesis * > _usedHypList
boost::shared_ptr< SMESH_ComputeError > SMESH_ComputeErrorPtr
bool OnlyUnaryInput() const
int _error
SMESH_ComputeErrorName or anything algo specific.
std::string _comment
any text explaining what is wrong in Compute()
bool SupportSubmeshes() const
bool NeedDescretBoundary() const
static bool IsContinuous(const TopoDS_Edge &E1, const TopoDS_Edge &E2)
Return true if an edge can be considered as a continuation of another.
std::map< SMESH_subMesh *, std::vector< int > > MapShapeNbElems
virtual std::istream & LoadFrom(std::istream &load)=0
virtual bool SetParametersByDefaults(const TDefaults &dflts, const SMESH_Mesh *theMesh=0)=0
Initialize my parameter values by default parameters.
virtual std::ostream & SaveTo(std::ostream &save)=0
virtual bool SetParametersByMesh(const SMESH_Mesh *theMesh, const TopoDS_Shape &theShape)=0
Initialize my parameter values by the mesh built on the geometry.
std::vector< std::string > _compatibleHypothesis
std::map< SMESH_subMesh *, std::vector< int > >::iterator MapShapeNbElemsItr
bool error(const SMESH_Comment &comment="")
store COMPERR_ALGO_FAILED error and comment and then return false
bool _requireDescretBoundary
std::list< const SMESHDS_Hypothesis * > _appliedHypList
algo failed for some reason