Salome HOME
[bos #40619][CEA] Add Fuzzy parameter to partition and boolean operators
[modules/geom.git] / src / GEOM_I / GEOM_IMeasureOperations_i.hh
index 4534dc45e76cd670c73b82bdd281157bf12a15c4..e1cd715ad8320990c82b468005a3b8acf9733133 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -52,6 +52,7 @@ class GEOM_I_EXPORT GEOM_IMeasureOperations_i :
                     CORBA::Double& Xx, CORBA::Double& Xy, CORBA::Double& Xz);
 
   void GetBasicProperties (GEOM::GEOM_Object_ptr theShape,
+                           CORBA::Double  theTolerance,
                            CORBA::Double& theLength,
                            CORBA::Double& theSurfArea,
                            CORBA::Double& theVolume);
@@ -62,7 +63,8 @@ class GEOM_I_EXPORT GEOM_IMeasureOperations_i :
                                    GEOM::GEOM_Object_ptr theOptionalPoint);
 
   GEOM::GEOM_Object_ptr GetVertexByIndex (GEOM::GEOM_Object_ptr theObject,
-                                          CORBA::Long theIndex);
+                                          CORBA::Long           theIndex,
+                                          CORBA::Boolean        theUseOri);
 
   void GetInertia (GEOM::GEOM_Object_ptr theShape,
                    CORBA::Double& I11, CORBA::Double& I12, CORBA::Double& I13,
@@ -71,24 +73,49 @@ class GEOM_I_EXPORT GEOM_IMeasureOperations_i :
                    CORBA::Double& Ix , CORBA::Double& Iy , CORBA::Double& Iz);
 
   void GetBoundingBox (GEOM::GEOM_Object_ptr theShape,
+                       CORBA::Boolean precise,
                        CORBA::Double& Xmin, CORBA::Double& Xmax,
                        CORBA::Double& Ymin, CORBA::Double& Ymax,
                        CORBA::Double& Zmin, CORBA::Double& Zmax);
 
+  GEOM::GEOM_Object_ptr MakeBoundingBox (GEOM::GEOM_Object_ptr theShape,
+                                         CORBA::Boolean precise);
+
   void GetTolerance (GEOM::GEOM_Object_ptr theShape,
                      CORBA::Double& FaceMin, CORBA::Double& FaceMax,
                      CORBA::Double& EdgeMin, CORBA::Double& EdgeMax,
                      CORBA::Double& VertMin, CORBA::Double& VertMax);
 
-  CORBA::Boolean CheckShape (GEOM::GEOM_Object_ptr theShape,
-                             CORBA::String_out     theDescription);
+  CORBA::Boolean CheckShape
+             (GEOM::GEOM_Object_ptr                          theShape,
+              GEOM::GEOM_IMeasureOperations::ShapeErrors_out theErrors);
+
+  CORBA::Boolean CheckShapeWithGeometry
+             (GEOM::GEOM_Object_ptr                          theShape,
+              GEOM::GEOM_IMeasureOperations::ShapeErrors_out theErrors);
 
-  CORBA::Boolean CheckShapeWithGeometry (GEOM::GEOM_Object_ptr theShape,
-                                         CORBA::String_out     theDescription);
+  char* PrintShapeErrors
+             (      GEOM::GEOM_Object_ptr                       theShape,
+              const GEOM::GEOM_IMeasureOperations::ShapeErrors &theErrors);
 
   CORBA::Boolean CheckSelfIntersections (GEOM::GEOM_Object_ptr theShape,
+                                         CORBA::Long           theCheckLevel,
                                          GEOM::ListOfLong_out  theIntersections);
 
+  CORBA::Boolean CheckSelfIntersectionsFast (GEOM::GEOM_Object_ptr theShape,
+                                            CORBA::Float          theDeflection,
+                                            CORBA::Double         theTolerance,
+                                            GEOM::ListOfLong_out  theIntersections);
+
+  CORBA::Boolean CheckBOPArguments (GEOM::GEOM_Object_ptr theShape);
+
+  CORBA::Boolean FastIntersect (GEOM::GEOM_Object_ptr theShape1,
+                                GEOM::GEOM_Object_ptr theShape2,
+                                CORBA::Double         theTolerance,
+                                CORBA::Float         theDeflection,
+                                GEOM::ListOfLong_out  theIntersections1,
+                                GEOM::ListOfLong_out  theIntersections2);
+
   char* IsGoodForSolid (GEOM::GEOM_Object_ptr theShape);
 
   char* WhatIs (GEOM::GEOM_Object_ptr theShape);
@@ -102,6 +129,10 @@ class GEOM_I_EXPORT GEOM_IMeasureOperations_i :
                                 CORBA::Double& X1, CORBA::Double& Y1, CORBA::Double& Z1,
                                 CORBA::Double& X2, CORBA::Double& Y2, CORBA::Double& Z2);
 
+  CORBA::Long ClosestPoints (GEOM::GEOM_Object_ptr theShape1,
+                             GEOM::GEOM_Object_ptr theShape2,
+                             GEOM::ListOfDouble_out theCoords);
+
   void PointCoordinates (GEOM::GEOM_Object_ptr theShape,
                          CORBA::Double& X, CORBA::Double& Y, CORBA::Double& Z);
 
@@ -111,7 +142,9 @@ class GEOM_I_EXPORT GEOM_IMeasureOperations_i :
   CORBA::Double GetAngleBtwVectors (GEOM::GEOM_Object_ptr theShape1,
                                     GEOM::GEOM_Object_ptr theShape2);
 
-  // Methods for recieving radiuses of curvature of curves and surfaces
+  GEOM::ListOfGO* PatchFace(GEOM::GEOM_Object_ptr theShape);
+
+  // Methods for receiving radiuses of curvature of curves and surfaces
   // in the given point
   CORBA::Double CurveCurvatureByParam (GEOM::GEOM_Object_ptr theCurve,
                                        CORBA::Double theParam);
@@ -133,8 +166,55 @@ class GEOM_I_EXPORT GEOM_IMeasureOperations_i :
   CORBA::Double MinSurfaceCurvatureByPoint (GEOM::GEOM_Object_ptr theSurf,
                                             GEOM::GEOM_Object_ptr thePoint);
 
+  GEOM::GEOM_Object_ptr SurfaceCurvatureByPointAndDirection (GEOM::GEOM_Object_ptr theSurf,
+                                                             GEOM::GEOM_Object_ptr thePoint,
+                                                             GEOM::GEOM_Object_ptr theDirection);
+
+  // Methods to convert X,Y,Z coordinates of point to U,V parameters on surface and back
+  GEOM::ListOfDouble* XYZtoUV(GEOM::GEOM_Object_ptr     theSurf,
+                              const GEOM::ListOfDouble& theXYZlist,
+                              CORBA::Boolean            theIsNormalized);
+
+  GEOM::ListOfDouble* UVtoXYZ(GEOM::GEOM_Object_ptr     theSurf,
+                              const GEOM::ListOfDouble& theUVlist,
+                              CORBA::Boolean            theIsNormalized);
+
+  // Methods for class CheckConformity
+  GEOM::GEOM_IMeasureOperations::SequenceOfPairOfShape* SelfIntersected2D(
+                               const GEOM::GEOM_IMeasureOperations::CheckResults& theResuts);
+
+  GEOM::GEOM_IMeasureOperations::SequenceOfPairOfShape* InterferingSubshapes(
+                                                  const GEOM::GEOM_IMeasureOperations::CheckResults& theResuts,
+                                                  const CORBA::Long theShapeType1,
+                                                  const CORBA::Long theShapeType2);
+
+  GEOM::ListOfGO* SmallEdges(const GEOM::GEOM_IMeasureOperations::CheckResults& theResuts);
+
+  GEOM::GEOM_IMeasureOperations::SequenceOfPairOfShape* DistantShapes(
+      const GEOM::GEOM_IMeasureOperations::CheckResults& theResuts,
+      const CORBA::Long theShapeType,
+      const CORBA::Long theSubShapeType,
+      const CORBA::Double theTolerance);
+
+  GEOM::GEOM_IMeasureOperations::CheckResults* CheckConformityShape(GEOM::GEOM_Object_ptr theShape);
+
+  CORBA::Double UpdateTolerance(GEOM::GEOM_Object_ptr theShape);
+
+  // Methods to compute proximity between two shapes
+  GEOM::GEOM_Object_ptr ShapeProximityCalculator (GEOM::GEOM_Object_ptr theShape1,
+                                                  GEOM::GEOM_Object_ptr theShape2);
+  void SetShapeSampling(GEOM::GEOM_Object_ptr theCalculator,
+                        GEOM::GEOM_Object_ptr theShape,
+                        CORBA::Long theNbSamples);
+  CORBA::Double GetCoarseProximity(GEOM::GEOM_Object_ptr theCalculator);
+  CORBA::Double GetPreciseProximity(GEOM::GEOM_Object_ptr theCalculator);
+
   ::GEOMImpl_IMeasureOperations* GetOperations()
   { return (::GEOMImpl_IMeasureOperations*)GetImpl(); }
+
+private:
+  void ConvertToList(const GEOM::GEOM_IMeasureOperations::CheckResults& theResuts,
+                     std::list <GEOMImpl_IMeasureOperations::FailedChecks>& theListOfResults);
 };
 
 #endif