23 #ifndef _SMESH_CONTROLSDEF_HXX_
24 #define _SMESH_CONTROLSDEF_HXX_
30 #include <BRepClass3d_SolidClassifier.hxx>
31 #include <Bnd_B3d.hxx>
32 #include <GeomAPI_ProjectPointOnCurve.hxx>
33 #include <GeomAPI_ProjectPointOnSurf.hxx>
34 #include <Quantity_Color.hxx>
35 #include <TColStd_MapOfInteger.hxx>
36 #include <TColStd_SequenceOfInteger.hxx>
37 #include <TCollection_AsciiString.hxx>
39 #include <TopoDS_Face.hxx>
46 #include <boost/shared_ptr.hpp>
75 template <
class InputIterator>
84 const gp_XYZ& operator()(
size_type n)
const;
90 void push_back(
const gp_XYZ& v);
116 void SetMesh(
const SMDS_Mesh* theMesh );
118 bool IsMeshModified();
128 virtual void SetMesh(
const SMDS_Mesh* theMesh );
129 virtual double GetValue(
long theElementId );
131 void GetHistogram(
int nbIntervals,
132 std::vector<int>& nbEvents,
133 std::vector<double>& funValues,
134 const std::vector<int>& elements,
135 const double* minmax=0,
136 const bool isLogarithmic =
false);
138 virtual double GetBadRate(
double Value,
int nbNodes )
const = 0;
139 long GetPrecision()
const;
140 void SetPrecision(
const long thePrecision );
141 double Round(
const double & value );
159 virtual double GetValue(
long theElementId );
161 virtual double GetBadRate(
double Value,
int nbNodes )
const;
172 virtual double GetValue(
long theElementId );
174 virtual double GetBadRate(
double Value,
int nbNodes )
const;
185 virtual double GetValue(
long theElementId );
186 virtual double GetBadRate(
double Value,
int nbNodes )
const;
198 virtual double GetBadRate(
double Value,
int nbNodes )
const;
209 virtual double GetValue(
long theElementId );
211 virtual double GetBadRate(
double Value,
int nbNodes )
const;
222 virtual double GetValue(
long theElementId );
224 virtual double GetBadRate(
double Value,
int nbNodes )
const;
236 virtual double GetBadRate(
double Value,
int nbNodes )
const;
240 double ComputeA(
const gp_XYZ&,
const gp_XYZ&,
const gp_XYZ&,
const gp_XYZ& )
const;
251 virtual double GetBadRate(
double Value,
int nbNodes )
const;
262 virtual double GetBadRate(
double Value,
int nbNodes )
const;
274 virtual double GetBadRate(
double Value,
int nbNodes )
const;
286 virtual double GetBadRate(
double Value,
int nbNodes )
const;
296 virtual double GetValue(
long theElementId );
297 virtual double GetBadRate(
double Value,
int nbNodes )
const;
302 Value(
double theLength,
long thePntId1,
long thePntId2);
306 void GetValues(
TValues& theValues);
316 virtual double GetValue(
long theElementId );
318 virtual double GetBadRate(
double Value,
int nbNodes )
const;
328 virtual double GetValue(
long theElementId );
330 virtual double GetBadRate(
double Value,
int nbNodes )
const;
334 Value(
long thePntId1,
long thePntId2);
339 void GetValues(
MValues& theValues);
349 virtual double GetValue(
long theElementId );
350 virtual double GetBadRate(
double Value,
int nbNodes )
const;
360 virtual double GetValue(
long theNodeId );
361 virtual double GetBadRate(
double Value,
int nbNodes )
const;
378 virtual void SetMesh(
const SMDS_Mesh* theMesh );
379 virtual bool IsSatisfy(
long theElementId );
400 virtual void SetMesh(
const SMDS_Mesh* theMesh );
401 virtual bool IsSatisfy(
long theElementId );
430 virtual void SetMesh(
const SMDS_Mesh* theMesh );
431 virtual bool IsSatisfy(
long theElementId );
447 virtual void SetMesh(
const SMDS_Mesh* theMesh );
448 virtual bool IsSatisfy(
long theElementId );
463 virtual void SetMesh(
const SMDS_Mesh* theMesh );
464 virtual bool IsSatisfy(
long theElementId );
488 virtual bool IsSatisfy(
long theElementId );
504 virtual bool IsSatisfy(
long theElementId );
521 virtual bool IsSatisfy(
long theElementId );
537 virtual bool IsSatisfy(
long theElementId );
551 virtual void SetMesh(
const SMDS_Mesh* theMesh );
552 virtual bool IsSatisfy(
long theElementId );
554 static bool IsFreeEdge(
const SMDS_MeshNode** theNodes,
const int theFaceId );
559 Border(
long theElemId,
long thePntId1,
long thePntId2);
563 void GetBoreders(
TBorders& theBorders);
579 virtual void SetMesh(
const SMDS_Mesh* theMesh );
580 virtual bool IsSatisfy(
long theNodeId );
601 virtual void SetMesh(
const SMDS_Mesh* theMesh );
602 virtual bool IsSatisfy(
long theNodeId );
606 bool AddToRange(
long theEntityId );
607 void GetRangeStr( TCollection_AsciiString& );
608 bool SetRangeStr(
const TCollection_AsciiString& );
631 virtual void SetMesh(
const SMDS_Mesh* theMesh );
632 virtual void SetMargin(
double theValue);
634 virtual bool IsSatisfy(
long theElementId ) = 0;
651 virtual bool IsSatisfy(
long theElementId );
662 virtual bool IsSatisfy(
long theElementId );
675 virtual bool IsSatisfy(
long theElementId );
676 virtual void SetTolerance(
double theTol );
677 virtual double GetTolerance();
694 virtual bool IsSatisfy(
long theElementId );
695 virtual void SetMesh(
const SMDS_Mesh* theMesh );
713 virtual void SetMesh(
const SMDS_Mesh* theMesh );
731 virtual bool IsSatisfy(
long theElementId );
742 virtual bool IsSatisfy(
long theElementId );
781 virtual void SetMesh(
const SMDS_Mesh* theMesh );
783 virtual bool IsSatisfy(
long theElementId );
786 void SetAngleTolerance(
const double theAngToler );
787 double GetAngleTolerance()
const;
788 void SetIsOnlyManifold(
const bool theIsOnly );
789 void SetStartElem(
const long theStartElemId );
796 TColStd_MapOfInteger& theResFaces );
799 void expandBoundary(
TMapOfLink& theMapOfBoundary,
805 void getFacesByLink(
const Link& theLink,
830 virtual void SetMesh(
const SMDS_Mesh* theMesh );
831 virtual bool IsSatisfy(
long theElementId );
835 void SetStoreName(
const std::string& sn );
854 virtual void SetMesh(
const SMDS_Mesh* theMesh );
855 virtual bool IsSatisfy(
long theElementId );
858 void SetTolerance(
const double theToler );
859 double GetTolerance()
const;
860 void SetSurface(
const TopoDS_Shape& theShape,
862 void SetUseBoundaries(
bool theUse );
895 virtual void SetMesh (
const SMDS_Mesh* theMesh);
896 virtual bool IsSatisfy (
long theElementId);
899 void SetTolerance (
const double theToler);
900 double GetTolerance()
const;
901 void SetAllNodes (
bool theAllNodes);
903 void SetShape (
const TopoDS_Shape& theShape,
909 struct OctreeClassifier;
911 void clearClassifiers();
942 virtual void SetMesh(
const SMDS_Mesh* theMesh );
943 virtual void SetGeom(
const TopoDS_Shape& theShape );
945 virtual bool IsSatisfy(
long theElementId );
950 TopoDS_Shape GetShape();
953 void SetTolerance(
double );
954 double GetTolerance();
980 virtual void SetMesh(
const SMDS_Mesh* theMesh );
981 virtual void SetGeom(
const TopoDS_Shape& theShape );
983 virtual bool IsSatisfy(
long theElementId );
988 TopoDS_Shape GetShape();
991 void SetTolerance(
double );
992 double GetTolerance();
1015 virtual void SetMesh(
const SMDS_Mesh* theMesh );
1016 virtual bool IsSatisfy(
long theElementId );
1031 virtual void SetMesh(
const SMDS_Mesh* theMesh );
1032 virtual bool IsSatisfy(
long theElementId );
1050 virtual void SetMesh(
const SMDS_Mesh* theMesh );
1051 virtual bool IsSatisfy(
long theElementId );
1054 void SetColorStr(
const TCollection_AsciiString& );
1055 void GetColorStr( TCollection_AsciiString& )
const;
1074 virtual void SetMesh(
const SMDS_Mesh* theMesh );
1075 virtual bool IsSatisfy(
long theElementId );
1103 virtual void SetMesh(
const SMDS_Mesh* theMesh );
1104 virtual bool IsSatisfy(
long theElementId );
1123 void SetNode(
int nodeID );
1124 void SetPoint(
double x,
double y,
double z );
1125 int GetNode()
const;
1126 std::vector<double> GetPoint()
const;
1131 virtual void SetMesh(
const SMDS_Mesh* theMesh );
1132 virtual bool IsSatisfy(
long theElementId );
1161 GetElementsId(
const SMDS_Mesh* theMesh,
1166 GetElementsId(
const SMDS_Mesh* theMesh,