28 #ifndef _SMESH_ALGO_HXX_
29 #define _SMESH_ALGO_HXX_
38 #include <GeomAbs_Shape.hxx>
92 bool IsCompatible(
const Features& algo2 )
const;
97 static const Features& GetFeatures(
const std::string& algoType );
120 virtual std::ostream &
SaveTo(std::ostream & save);
127 virtual std::istream &
LoadFrom(std::istream & load);
132 const std::vector < std::string > & GetCompatibleHypothesis();
143 virtual bool CheckHypothesis(
SMESH_Mesh& aMesh,
144 const TopoDS_Shape& aShape,
156 virtual bool Compute(
SMESH_Mesh & aMesh,
const TopoDS_Shape & aShape) = 0;
172 virtual void CancelCompute();
177 virtual double GetProgress()
const;
186 virtual bool Evaluate(
SMESH_Mesh & aMesh,
const TopoDS_Shape & aShape,
202 virtual const std::list <const SMESHDS_Hypothesis *> &
204 const TopoDS_Shape & aShape,
205 const bool ignoreAuxiliary=
true)
const;
217 const std::list <const SMESHDS_Hypothesis *> &
219 const TopoDS_Shape & aShape,
220 const bool ignoreAuxiliary=
true)
const;
226 const SMESH_HypoFilter* GetCompatibleHypoFilter(
const bool ignoreAuxiliary)
const;
241 void InitComputeError();
245 double GetProgressByTic()
const;
317 static bool GetNodeParamOnEdge(
const SMESHDS_Mesh* theMesh,
318 const TopoDS_Edge& theEdge,
319 std::vector< double > & theParams);
330 static bool GetSortedNodesOnEdge(
const SMESHDS_Mesh* theMesh,
331 const TopoDS_Edge& theEdge,
332 const bool ignoreMediumNodes,
333 std::map< double, const SMDS_MeshNode* > & theNodes,
341 static double EdgeLength(
const TopoDS_Edge & E);
343 int NumberOfPoints(
SMESH_Mesh& aMesh,
const TopoDS_Wire& W);
351 static GeomAbs_Shape Continuity(
const TopoDS_Edge& E1,
const TopoDS_Edge& E2);
356 static bool IsContinuous(
const TopoDS_Edge & E1,
const TopoDS_Edge & E2) {
357 return ( Continuity( E1, E2 ) >= GeomAbs_G1 );
362 static bool IsStraight(
const TopoDS_Edge & E,
const bool degenResult=
false );
366 static bool isDegenerated(
const TopoDS_Edge & E,
const bool checkLength=
false );
394 static const SMDS_MeshNode* VertexNode(
const TopoDS_Vertex& V,
397 const bool checkV=
true);
399 enum EMeshError { MEr_OK = 0, MEr_HOLES, MEr_BAD_ORI, MEr_EMPTY };
429 const bool addNodes=
false);
447 bool _neededLowerHyps[4];
488 const TopoDS_Face& face);