1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #ifndef _GEOMImpl_IMeasureOperations_HXX_
22 #define _GEOMImpl_IMeasureOperations_HXX_
24 #include "GEOM_IOperations.hxx"
26 #include <BRepCheck_Analyzer.hxx>
27 #include <TopoDS_Shape.hxx>
28 #include <TopTools_HSequenceOfShape.hxx>
29 #include <TopTools_DataMapOfShapeListOfShape.hxx>
30 #include <TCollection_AsciiString.hxx>
34 class Handle(GEOM_Object);
36 class GEOMImpl_IMeasureOperations : public GEOM_IOperations {
38 Standard_EXPORT GEOMImpl_IMeasureOperations(GEOM_Engine* theEngine, int theDocID);
39 Standard_EXPORT ~GEOMImpl_IMeasureOperations();
41 Standard_EXPORT void GetPosition (Handle(GEOM_Object) theShape,
42 Standard_Real& Ox, Standard_Real& Oy, Standard_Real& Oz,
43 Standard_Real& Zx, Standard_Real& Zy, Standard_Real& Zz,
44 Standard_Real& Xx, Standard_Real& Xy, Standard_Real& Xz);
46 Standard_EXPORT Handle(GEOM_Object) GetCentreOfMass (Handle(GEOM_Object) theShape);
48 Standard_EXPORT void GetBasicProperties (Handle(GEOM_Object) theShape,
49 Standard_Real& theLength,
50 Standard_Real& theSurfArea,
51 Standard_Real& theVolume);
53 Standard_EXPORT void GetInertia (Handle(GEOM_Object) theShape,
54 Standard_Real& I11, Standard_Real& I12, Standard_Real& I13,
55 Standard_Real& I21, Standard_Real& I22, Standard_Real& I23,
56 Standard_Real& I31, Standard_Real& I32, Standard_Real& I33,
57 Standard_Real& Ix , Standard_Real& Iy , Standard_Real& Iz);
59 Standard_EXPORT void GetBoundingBox (Handle(GEOM_Object) theShape,
60 Standard_Real& Xmin, Standard_Real& Xmax,
61 Standard_Real& Ymin, Standard_Real& Ymax,
62 Standard_Real& Zmin, Standard_Real& Zmax);
64 Standard_EXPORT void GetTolerance (Handle(GEOM_Object) theShape,
65 Standard_Real& FaceMin, Standard_Real& FaceMax,
66 Standard_Real& EdgeMin, Standard_Real& EdgeMax,
67 Standard_Real& VertMin, Standard_Real& VertMax);
69 Standard_EXPORT bool CheckShape (Handle(GEOM_Object) theShape,
70 const Standard_Boolean theIsCheckGeom,
71 TCollection_AsciiString& theDump);
73 Standard_EXPORT TCollection_AsciiString WhatIs (Handle(GEOM_Object) theShape);
75 Standard_EXPORT Standard_Real GetMinDistance (Handle(GEOM_Object) theShape1,
76 Handle(GEOM_Object) theShape2,
77 Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1,
78 Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2);
80 Standard_EXPORT void PointCoordinates(Handle(GEOM_Object) theShape,
81 Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ );
84 Standard_EXPORT static gp_Ax3 GetPosition (const TopoDS_Shape& theShape);
87 void StructuralDump (const BRepCheck_Analyzer& theAna,
88 const TopoDS_Shape& theShape,
89 TCollection_AsciiString& theDump);
91 void GetProblemShapes (const BRepCheck_Analyzer& theAna,
92 const TopoDS_Shape& theShape,
93 Handle(TopTools_HSequenceOfShape)& sl,
94 Handle(TColStd_HArray1OfInteger)& NbProblems,
95 TopTools_DataMapOfShapeListOfShape& theMap);
97 void GetProblemSub (const BRepCheck_Analyzer& theAna,
98 const TopoDS_Shape& theShape,
99 Handle(TopTools_HSequenceOfShape)& sl,
100 Handle(TColStd_HArray1OfInteger)& NbProblems,
101 const TopAbs_ShapeEnum Subtype,
102 TopTools_DataMapOfShapeListOfShape& theMap);