Salome HOME
2edf60025c3324e3851e4f3185c1ea95b24b5622
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IMeasureOperations.hxx
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 // 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either 
7 // version 2.1 of the License.
8 // 
9 // This library is distributed in the hope that it will be useful 
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 // Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public  
15 // License along with this library; if not, write to the Free Software 
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 //
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20
21 #ifndef _GEOMImpl_IMeasureOperations_HXX_
22 #define _GEOMImpl_IMeasureOperations_HXX_
23
24 #include "GEOM_IOperations.hxx"
25
26 #include <BRepCheck_Analyzer.hxx>
27 #include <TopTools_HSequenceOfShape.hxx>
28 #include <TopTools_DataMapOfShapeListOfShape.hxx>
29 #include <TCollection_AsciiString.hxx>
30
31 class GEOM_Engine;
32 class Handle(GEOM_Object);
33
34 class GEOMImpl_IMeasureOperations : public GEOM_IOperations {
35  public:
36   Standard_EXPORT GEOMImpl_IMeasureOperations(GEOM_Engine* theEngine, int theDocID);
37   Standard_EXPORT ~GEOMImpl_IMeasureOperations();
38
39   Standard_EXPORT Handle(GEOM_Object) GetCentreOfMass (Handle(GEOM_Object) theShape);
40
41   Standard_EXPORT void GetBasicProperties (Handle(GEOM_Object) theShape,
42                                            Standard_Real& theLength,
43                                            Standard_Real& theSurfArea,
44                                            Standard_Real& theVolume);
45
46   Standard_EXPORT void GetInertia (Handle(GEOM_Object) theShape,
47                                    Standard_Real& I11, Standard_Real& I12, Standard_Real& I13,
48                                    Standard_Real& I21, Standard_Real& I22, Standard_Real& I23,
49                                    Standard_Real& I31, Standard_Real& I32, Standard_Real& I33,
50                                    Standard_Real& Ix , Standard_Real& Iy , Standard_Real& Iz);
51
52   Standard_EXPORT void GetBoundingBox (Handle(GEOM_Object) theShape,
53                                        Standard_Real& Xmin, Standard_Real& Xmax,
54                                        Standard_Real& Ymin, Standard_Real& Ymax,
55                                        Standard_Real& Zmin, Standard_Real& Zmax);
56
57   Standard_EXPORT void GetTolerance (Handle(GEOM_Object) theShape,
58                                      Standard_Real& FaceMin, Standard_Real& FaceMax,
59                                      Standard_Real& EdgeMin, Standard_Real& EdgeMax,
60                                      Standard_Real& VertMin, Standard_Real& VertMax);
61
62   Standard_EXPORT bool CheckShape (Handle(GEOM_Object)      theShape,
63                                    const Standard_Boolean   theIsCheckGeom,
64                                    TCollection_AsciiString& theDump);
65
66   Standard_EXPORT TCollection_AsciiString WhatIs (Handle(GEOM_Object) theShape);
67
68   Standard_EXPORT Standard_Real GetMinDistance (Handle(GEOM_Object) theShape1,
69                                                 Handle(GEOM_Object) theShape2,
70                                                 Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1,
71                                                 Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2);
72
73   Standard_EXPORT void PointCoordinates(Handle(GEOM_Object) theShape,
74                                         Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ );
75
76  private:
77   void StructuralDump (const BRepCheck_Analyzer& theAna,
78                        const TopoDS_Shape&       theShape,
79                        TCollection_AsciiString&  theDump);
80
81   void GetProblemShapes (const BRepCheck_Analyzer&           theAna,
82                          const TopoDS_Shape&                 theShape,
83                          Handle(TopTools_HSequenceOfShape)&  sl,
84                          Handle(TColStd_HArray1OfInteger)&   NbProblems,
85                          TopTools_DataMapOfShapeListOfShape& theMap);
86
87   void GetProblemSub (const BRepCheck_Analyzer&           theAna,
88                       const TopoDS_Shape&                 theShape,
89                       Handle(TopTools_HSequenceOfShape)&  sl,
90                       Handle(TColStd_HArray1OfInteger)&   NbProblems,
91                       const TopAbs_ShapeEnum              Subtype,
92                       TopTools_DataMapOfShapeListOfShape& theMap);
93 };
94
95 #endif