Version: 9.12.0
GEOM_IMeasureOperations_i.hh
Go to the documentation of this file.
1 // Copyright (C) 2007-2023 CEA, EDF, 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 
35 
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);
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 theTolerance,
56  CORBA::Double& theLength,
57  CORBA::Double& theSurfArea,
58  CORBA::Double& theVolume);
59 
60  GEOM::GEOM_Object_ptr GetCentreOfMass (GEOM::GEOM_Object_ptr theShape);
61 
62  GEOM::GEOM_Object_ptr GetNormal (GEOM::GEOM_Object_ptr theFace,
63  GEOM::GEOM_Object_ptr theOptionalPoint);
64 
65  GEOM::GEOM_Object_ptr GetVertexByIndex (GEOM::GEOM_Object_ptr theObject,
66  CORBA::Long theIndex,
67  CORBA::Boolean theUseOri);
68 
69  void GetInertia (GEOM::GEOM_Object_ptr theShape,
70  CORBA::Double& I11, CORBA::Double& I12, CORBA::Double& I13,
71  CORBA::Double& I21, CORBA::Double& I22, CORBA::Double& I23,
72  CORBA::Double& I31, CORBA::Double& I32, CORBA::Double& I33,
73  CORBA::Double& Ix , CORBA::Double& Iy , CORBA::Double& Iz);
74 
75  void GetBoundingBox (GEOM::GEOM_Object_ptr theShape,
76  CORBA::Boolean precise,
77  CORBA::Double& Xmin, CORBA::Double& Xmax,
78  CORBA::Double& Ymin, CORBA::Double& Ymax,
79  CORBA::Double& Zmin, CORBA::Double& Zmax);
80 
81  GEOM::GEOM_Object_ptr MakeBoundingBox (GEOM::GEOM_Object_ptr theShape,
82  CORBA::Boolean precise);
83 
84  void GetTolerance (GEOM::GEOM_Object_ptr theShape,
85  CORBA::Double& FaceMin, CORBA::Double& FaceMax,
86  CORBA::Double& EdgeMin, CORBA::Double& EdgeMax,
87  CORBA::Double& VertMin, CORBA::Double& VertMax);
88 
89  CORBA::Boolean CheckShape
90  (GEOM::GEOM_Object_ptr theShape,
91  GEOM::GEOM_IMeasureOperations::ShapeErrors_out theErrors);
92 
93  CORBA::Boolean CheckShapeWithGeometry
94  (GEOM::GEOM_Object_ptr theShape,
95  GEOM::GEOM_IMeasureOperations::ShapeErrors_out theErrors);
96 
97  char* PrintShapeErrors
98  ( GEOM::GEOM_Object_ptr theShape,
100 
101  CORBA::Boolean CheckSelfIntersections (GEOM::GEOM_Object_ptr theShape,
102  CORBA::Long theCheckLevel,
103  GEOM::ListOfLong_out theIntersections);
104 
105  CORBA::Boolean CheckSelfIntersectionsFast (GEOM::GEOM_Object_ptr theShape,
106  CORBA::Float theDeflection,
107  CORBA::Double theTolerance,
108  GEOM::ListOfLong_out theIntersections);
109 
110  CORBA::Boolean CheckBOPArguments (GEOM::GEOM_Object_ptr theShape);
111 
112  CORBA::Boolean FastIntersect (GEOM::GEOM_Object_ptr theShape1,
113  GEOM::GEOM_Object_ptr theShape2,
114  CORBA::Double theTolerance,
115  CORBA::Float theDeflection,
116  GEOM::ListOfLong_out theIntersections1,
117  GEOM::ListOfLong_out theIntersections2);
118 
119  char* IsGoodForSolid (GEOM::GEOM_Object_ptr theShape);
120 
121  char* WhatIs (GEOM::GEOM_Object_ptr theShape);
122 
123  GEOM::ListOfBool* AreCoordsInside (GEOM::GEOM_Object_ptr theShape,
124  const GEOM::ListOfDouble& theCoords,
125  CORBA::Double theTolerance);
126 
127  CORBA::Double GetMinDistance (GEOM::GEOM_Object_ptr theShape1,
128  GEOM::GEOM_Object_ptr theShape2,
129  CORBA::Double& X1, CORBA::Double& Y1, CORBA::Double& Z1,
130  CORBA::Double& X2, CORBA::Double& Y2, CORBA::Double& Z2);
131 
132  CORBA::Long ClosestPoints (GEOM::GEOM_Object_ptr theShape1,
133  GEOM::GEOM_Object_ptr theShape2,
134  GEOM::ListOfDouble_out theCoords);
135 
136  void PointCoordinates (GEOM::GEOM_Object_ptr theShape,
137  CORBA::Double& X, CORBA::Double& Y, CORBA::Double& Z);
138 
139  CORBA::Double GetAngle (GEOM::GEOM_Object_ptr theShape1,
140  GEOM::GEOM_Object_ptr theShape2);
141 
142  CORBA::Double GetAngleBtwVectors (GEOM::GEOM_Object_ptr theShape1,
143  GEOM::GEOM_Object_ptr theShape2);
144 
145  GEOM::ListOfGO* PatchFace(GEOM::GEOM_Object_ptr theShape);
146 
147  // Methods for receiving radiuses of curvature of curves and surfaces
148  // in the given point
149  CORBA::Double CurveCurvatureByParam (GEOM::GEOM_Object_ptr theCurve,
150  CORBA::Double theParam);
151 
152  CORBA::Double CurveCurvatureByPoint (GEOM::GEOM_Object_ptr theCurve,
153  GEOM::GEOM_Object_ptr thePoint);
154 
155  CORBA::Double MaxSurfaceCurvatureByParam (GEOM::GEOM_Object_ptr theSurf,
156  CORBA::Double theUParam,
157  CORBA::Double theVParam);
158 
159  CORBA::Double MaxSurfaceCurvatureByPoint (GEOM::GEOM_Object_ptr theSurf,
160  GEOM::GEOM_Object_ptr thePoint);
161 
162  CORBA::Double MinSurfaceCurvatureByParam (GEOM::GEOM_Object_ptr theSurf,
163  CORBA::Double theUParam,
164  CORBA::Double theVParam);
165 
166  CORBA::Double MinSurfaceCurvatureByPoint (GEOM::GEOM_Object_ptr theSurf,
167  GEOM::GEOM_Object_ptr thePoint);
168 
169  GEOM::GEOM_Object_ptr SurfaceCurvatureByPointAndDirection (GEOM::GEOM_Object_ptr theSurf,
170  GEOM::GEOM_Object_ptr thePoint,
171  GEOM::GEOM_Object_ptr theDirection);
172 
173  // Methods to convert X,Y,Z coordinates of point to U,V parameters on surface and back
174  GEOM::ListOfDouble* XYZtoUV(GEOM::GEOM_Object_ptr theSurf,
175  const GEOM::ListOfDouble& theXYZlist,
176  CORBA::Boolean theIsNormalized);
177 
178  GEOM::ListOfDouble* UVtoXYZ(GEOM::GEOM_Object_ptr theSurf,
179  const GEOM::ListOfDouble& theUVlist,
180  CORBA::Boolean theIsNormalized);
181 
182  // Methods for class CheckConformity
185 
188  const CORBA::Long theShapeType1,
189  const CORBA::Long theShapeType2);
190 
191  GEOM::ListOfGO* SmallEdges(const GEOM::GEOM_IMeasureOperations::CheckResults& theResuts);
192 
195  const CORBA::Long theShapeType,
196  const CORBA::Long theSubShapeType,
197  const CORBA::Double theTolerance);
198 
199  GEOM::GEOM_IMeasureOperations::CheckResults* CheckConformityShape(GEOM::GEOM_Object_ptr theShape);
200 
201  CORBA::Double UpdateTolerance(GEOM::GEOM_Object_ptr theShape);
202 
203  // Methods to compute proximity between two shapes
204  GEOM::GEOM_Object_ptr ShapeProximityCalculator (GEOM::GEOM_Object_ptr theShape1,
205  GEOM::GEOM_Object_ptr theShape2);
206  void SetShapeSampling(GEOM::GEOM_Object_ptr theCalculator,
207  GEOM::GEOM_Object_ptr theShape,
208  CORBA::Long theNbSamples);
209  CORBA::Double GetCoarseProximity(GEOM::GEOM_Object_ptr theCalculator);
210  CORBA::Double GetPreciseProximity(GEOM::GEOM_Object_ptr theCalculator);
211 
213  { return (::GEOMImpl_IMeasureOperations*)GetImpl(); }
214 
215 private:
216  void ConvertToList(const GEOM::GEOM_IMeasureOperations::CheckResults& theResuts,
217  std::list <GEOMImpl_IMeasureOperations::FailedChecks>& theListOfResults);
218 };
219 
220 #endif
#define GEOM_I_EXPORT
Definition: GEOM_GEOM_I.hxx:33
Definition: GEOMImpl_IMeasureOperations.hxx:42
Definition: GEOM_IMeasureOperations_i.hh:39
::GEOMImpl_IMeasureOperations * GetOperations()
Definition: GEOM_IMeasureOperations_i.hh:212
Definition: GEOM_IOperations_i.hh:37
::GEOM_IOperations * GetImpl()
Definition: GEOM_IOperations_i.hh:60
shape_kind
Definition: GEOM_Gen.idl:4250
sequence< CheckResult > CheckResults
Definition: GEOM_Gen.idl:4807
sequence< ShapeError > ShapeErrors
Sequence of all shape defects.
Definition: GEOM_Gen.idl:4528
sequence< PairOfShape > SequenceOfPairOfShape
Definition: GEOM_Gen.idl:4806
Standard_EXPORT gp_Ax3 GetPosition(const TopoDS_Shape &theShape)
Get Local Coordinate System, corresponding to the given shape.
Definition: GEOMUtils.cxx:342
Standard_EXPORT bool CheckBOPArguments(const TopoDS_Shape &theShape)
Check boolean and partition operations arguments.
Definition: GEOMUtils.cxx:1164
Standard_EXPORT bool CheckShape(TopoDS_Shape &shape, bool checkGeometry=false)
Check shape.
Definition: GEOMUtils.cxx:1157
Standard_EXPORT Standard_Real GetMinDistance(const TopoDS_Shape &theShape1, const TopoDS_Shape &theShape2, gp_Pnt &thePnt1, gp_Pnt &thePnt2)
Computes minumal distance between two shapes.
Definition: GEOMUtils.cxx:961
sequence< boolean > ListOfBool
Definition: GEOM_Gen.idl:255
sequence< double > ListOfDouble
Definition: GEOM_Gen.idl:257
sequence< GEOM_Object > ListOfGO
Definition: GEOM_Gen.idl:265