Salome HOME
Synchronize adm files
[modules/geom.git] / src / GEOM_I / GEOM_IMeasureOperations_i.hh
1 // Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 #ifndef _GEOM_IMeasureOperations_i_HeaderFile
24 #define _GEOM_IMeasureOperations_i_HeaderFile
25
26 #include "GEOMImpl_Gen.hxx"
27
28 #include <SALOMEconfig.h>
29
30 #include CORBA_SERVER_HEADER(GEOM_Gen)
31 #include "GEOM_IOperations_i.hh"
32 #include "GEOM_Object_i.hh"
33
34 #include "GEOMImpl_IMeasureOperations.hxx"
35
36 class GEOM_I_EXPORT GEOM_IMeasureOperations_i :
37     public virtual POA_GEOM::GEOM_IMeasureOperations,
38     public virtual GEOM_IOperations_i
39 {
40  public:
41   GEOM_IMeasureOperations_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine,
42                             ::GEOMImpl_IMeasureOperations* theImpl);
43   ~GEOM_IMeasureOperations_i();
44
45   GEOM::GEOM_IKindOfShape::shape_kind KindOfShape (GEOM::GEOM_Object_ptr  theShape,
46                                                    GEOM::ListOfLong_out   theIntegers,
47                                                    GEOM::ListOfDouble_out theDoubles);
48
49   void GetPosition (GEOM::GEOM_Object_ptr theShape,
50                     CORBA::Double& Ox, CORBA::Double& Oy, CORBA::Double& Oz,
51                     CORBA::Double& Zx, CORBA::Double& Zy, CORBA::Double& Zz,
52                     CORBA::Double& Xx, CORBA::Double& Xy, CORBA::Double& Xz);
53
54   void GetBasicProperties (GEOM::GEOM_Object_ptr theShape,
55                            CORBA::Double& theLength,
56                            CORBA::Double& theSurfArea,
57                            CORBA::Double& theVolume);
58
59   GEOM::GEOM_Object_ptr GetCentreOfMass (GEOM::GEOM_Object_ptr theShape);
60
61   GEOM::GEOM_Object_ptr GetNormal (GEOM::GEOM_Object_ptr theFace,
62                                    GEOM::GEOM_Object_ptr theOptionalPoint);
63
64   GEOM::GEOM_Object_ptr GetVertexByIndex (GEOM::GEOM_Object_ptr theObject,
65                                           CORBA::Long theIndex);
66
67   void GetInertia (GEOM::GEOM_Object_ptr theShape,
68                    CORBA::Double& I11, CORBA::Double& I12, CORBA::Double& I13,
69                    CORBA::Double& I21, CORBA::Double& I22, CORBA::Double& I23,
70                    CORBA::Double& I31, CORBA::Double& I32, CORBA::Double& I33,
71                    CORBA::Double& Ix , CORBA::Double& Iy , CORBA::Double& Iz);
72
73   void GetBoundingBox (GEOM::GEOM_Object_ptr theShape,
74                        CORBA::Boolean precise,
75                        CORBA::Double& Xmin, CORBA::Double& Xmax,
76                        CORBA::Double& Ymin, CORBA::Double& Ymax,
77                        CORBA::Double& Zmin, CORBA::Double& Zmax);
78
79   GEOM::GEOM_Object_ptr MakeBoundingBox (GEOM::GEOM_Object_ptr theShape,
80                                          CORBA::Boolean precise);
81
82   void GetTolerance (GEOM::GEOM_Object_ptr theShape,
83                      CORBA::Double& FaceMin, CORBA::Double& FaceMax,
84                      CORBA::Double& EdgeMin, CORBA::Double& EdgeMax,
85                      CORBA::Double& VertMin, CORBA::Double& VertMax);
86
87   CORBA::Boolean CheckShape
88              (GEOM::GEOM_Object_ptr                          theShape,
89               GEOM::GEOM_IMeasureOperations::ShapeErrors_out theErrors);
90
91   CORBA::Boolean CheckShapeWithGeometry
92              (GEOM::GEOM_Object_ptr                          theShape,
93               GEOM::GEOM_IMeasureOperations::ShapeErrors_out theErrors);
94
95   char* PrintShapeErrors
96              (      GEOM::GEOM_Object_ptr                       theShape,
97               const GEOM::GEOM_IMeasureOperations::ShapeErrors &theErrors);
98
99   CORBA::Boolean CheckSelfIntersections (GEOM::GEOM_Object_ptr theShape,
100                                          GEOM::ListOfLong_out  theIntersections);
101
102   char* IsGoodForSolid (GEOM::GEOM_Object_ptr theShape);
103
104   char* WhatIs (GEOM::GEOM_Object_ptr theShape);
105
106   GEOM::ListOfBool* AreCoordsInside (GEOM::GEOM_Object_ptr theShape,
107                                      const GEOM::ListOfDouble& theCoords,
108                                      CORBA::Double theTolerance);
109
110   CORBA::Double GetMinDistance (GEOM::GEOM_Object_ptr theShape1,
111                                 GEOM::GEOM_Object_ptr theShape2,
112                                 CORBA::Double& X1, CORBA::Double& Y1, CORBA::Double& Z1,
113                                 CORBA::Double& X2, CORBA::Double& Y2, CORBA::Double& Z2);
114
115   CORBA::Long ClosestPoints (GEOM::GEOM_Object_ptr theShape1,
116                              GEOM::GEOM_Object_ptr theShape2,
117                              GEOM::ListOfDouble_out theCoords);
118
119   void PointCoordinates (GEOM::GEOM_Object_ptr theShape,
120                          CORBA::Double& X, CORBA::Double& Y, CORBA::Double& Z);
121
122   CORBA::Double GetAngle (GEOM::GEOM_Object_ptr theShape1,
123                           GEOM::GEOM_Object_ptr theShape2);
124
125   CORBA::Double GetAngleBtwVectors (GEOM::GEOM_Object_ptr theShape1,
126                                     GEOM::GEOM_Object_ptr theShape2);
127
128   // Methods for recieving radiuses of curvature of curves and surfaces
129   // in the given point
130   CORBA::Double CurveCurvatureByParam (GEOM::GEOM_Object_ptr theCurve,
131                                        CORBA::Double theParam);
132
133   CORBA::Double CurveCurvatureByPoint (GEOM::GEOM_Object_ptr theCurve,
134                                        GEOM::GEOM_Object_ptr thePoint);
135
136   CORBA::Double MaxSurfaceCurvatureByParam (GEOM::GEOM_Object_ptr theSurf,
137                                             CORBA::Double theUParam,
138                                             CORBA::Double theVParam);
139
140   CORBA::Double MaxSurfaceCurvatureByPoint (GEOM::GEOM_Object_ptr theSurf,
141                                             GEOM::GEOM_Object_ptr thePoint);
142
143   CORBA::Double MinSurfaceCurvatureByParam (GEOM::GEOM_Object_ptr theSurf,
144                                             CORBA::Double theUParam,
145                                             CORBA::Double theVParam);
146
147   CORBA::Double MinSurfaceCurvatureByPoint (GEOM::GEOM_Object_ptr theSurf,
148                                             GEOM::GEOM_Object_ptr thePoint);
149
150   ::GEOMImpl_IMeasureOperations* GetOperations()
151   { return (::GEOMImpl_IMeasureOperations*)GetImpl(); }
152 };
153
154 #endif