Salome HOME
Merge with version on tag OCC-V2_1_0d
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IMeasureOperations.hxx
1
2 #ifndef _GEOMImpl_IMeasureOperations_HXX_
3 #define _GEOMImpl_IMeasureOperations_HXX_
4
5 #include "GEOM_IOperations.hxx"
6
7 #include <BRepCheck_Analyzer.hxx>
8 #include <TopTools_HSequenceOfShape.hxx>
9 #include <TopTools_DataMapOfShapeListOfShape.hxx>
10 #include <TCollection_AsciiString.hxx>
11
12 class GEOM_Engine;
13 class Handle(GEOM_Object);
14
15 class GEOMImpl_IMeasureOperations : public GEOM_IOperations {
16  public:
17   GEOMImpl_IMeasureOperations(GEOM_Engine* theEngine, int theDocID);
18   ~GEOMImpl_IMeasureOperations();
19
20   Handle(GEOM_Object) GetCentreOfMass (Handle(GEOM_Object) theShape);
21
22   void GetBasicProperties (Handle(GEOM_Object) theShape,
23                            Standard_Real& theLength,
24                            Standard_Real& theSurfArea,
25                            Standard_Real& theVolume);
26
27   void GetInertia (Handle(GEOM_Object) theShape,
28                    Standard_Real& I11, Standard_Real& I12, Standard_Real& I13,
29                    Standard_Real& I21, Standard_Real& I22, Standard_Real& I23,
30                    Standard_Real& I31, Standard_Real& I32, Standard_Real& I33,
31                    Standard_Real& Ix , Standard_Real& Iy , Standard_Real& Iz);
32
33   void GetBoundingBox (Handle(GEOM_Object) theShape,
34                        Standard_Real& Xmin, Standard_Real& Xmax,
35                        Standard_Real& Ymin, Standard_Real& Ymax,
36                        Standard_Real& Zmin, Standard_Real& Zmax);
37
38   void GetTolerance (Handle(GEOM_Object) theShape,
39                      Standard_Real& FaceMin, Standard_Real& FaceMax,
40                      Standard_Real& EdgeMin, Standard_Real& EdgeMax,
41                      Standard_Real& VertMin, Standard_Real& VertMax);
42
43   bool CheckShape (Handle(GEOM_Object)      theShape,
44                    TCollection_AsciiString& theDump);
45
46   TCollection_AsciiString WhatIs (Handle(GEOM_Object) theShape);
47
48   Standard_Real GetMinDistance (Handle(GEOM_Object) theShape1, Handle(GEOM_Object) theShape2,
49                                 Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1,
50                                 Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2);
51
52  void PointCoordinates( Handle(GEOM_Object) theShape,
53                         Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ );
54  
55  private:
56   void StructuralDump (const BRepCheck_Analyzer& theAna,
57                        const TopoDS_Shape&       theShape,
58                        TCollection_AsciiString&  theDump);
59
60   void GetProblemShapes (const BRepCheck_Analyzer&           theAna,
61                          const TopoDS_Shape&                 theShape,
62                          Handle(TopTools_HSequenceOfShape)&  sl,
63                          Handle(TColStd_HArray1OfInteger)&   NbProblems,
64                          TopTools_DataMapOfShapeListOfShape& theMap);
65
66   void GetProblemSub (const BRepCheck_Analyzer&           theAna,
67                       const TopoDS_Shape&                 theShape,
68                       Handle(TopTools_HSequenceOfShape)&  sl,
69                       Handle(TColStd_HArray1OfInteger)&   NbProblems,
70                       const TopAbs_ShapeEnum              Subtype,
71                       TopTools_DataMapOfShapeListOfShape& theMap);
72 };
73
74 #endif