X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOM_I%2FGEOM_IMeasureOperations_i.hh;h=ded2f9c4122e45132d67ff728d43475315f14a24;hb=9f730900596e9412f431c23b2bd985063814a750;hp=1aace732a454d0f52dd370a2a5746baa13ad549d;hpb=392885c1a8d50369708bbe5e6b44033ed8b8ba51;p=modules%2Fgeom.git diff --git a/src/GEOM_I/GEOM_IMeasureOperations_i.hh b/src/GEOM_I/GEOM_IMeasureOperations_i.hh index 1aace732a..ded2f9c41 100644 --- a/src/GEOM_I/GEOM_IMeasureOperations_i.hh +++ b/src/GEOM_I/GEOM_IMeasureOperations_i.hh @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2022 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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. +// 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, 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 -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef _GEOM_IMeasureOperations_i_HeaderFile #define _GEOM_IMeasureOperations_i_HeaderFile @@ -38,87 +39,173 @@ class GEOM_I_EXPORT GEOM_IMeasureOperations_i : { public: GEOM_IMeasureOperations_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, - ::GEOMImpl_IMeasureOperations* theImpl); + ::GEOMImpl_IMeasureOperations* theImpl); ~GEOM_IMeasureOperations_i(); GEOM::GEOM_IKindOfShape::shape_kind KindOfShape (GEOM::GEOM_Object_ptr theShape, - GEOM::ListOfLong_out theIntegers, - GEOM::ListOfDouble_out theDoubles); + GEOM::ListOfLong_out theIntegers, + GEOM::ListOfDouble_out theDoubles); void GetPosition (GEOM::GEOM_Object_ptr theShape, - CORBA::Double& Ox, CORBA::Double& Oy, CORBA::Double& Oz, - CORBA::Double& Zx, CORBA::Double& Zy, CORBA::Double& Zz, - CORBA::Double& Xx, CORBA::Double& Xy, CORBA::Double& Xz); + CORBA::Double& Ox, CORBA::Double& Oy, CORBA::Double& Oz, + CORBA::Double& Zx, CORBA::Double& Zy, CORBA::Double& Zz, + CORBA::Double& Xx, CORBA::Double& Xy, CORBA::Double& Xz); void GetBasicProperties (GEOM::GEOM_Object_ptr theShape, - CORBA::Double& theLength, - CORBA::Double& theSurfArea, - CORBA::Double& theVolume); + CORBA::Double theTolerance, + CORBA::Double& theLength, + CORBA::Double& theSurfArea, + CORBA::Double& theVolume); GEOM::GEOM_Object_ptr GetCentreOfMass (GEOM::GEOM_Object_ptr theShape); GEOM::GEOM_Object_ptr GetNormal (GEOM::GEOM_Object_ptr theFace, - GEOM::GEOM_Object_ptr theOptionalPoint); + GEOM::GEOM_Object_ptr theOptionalPoint); + + GEOM::GEOM_Object_ptr GetVertexByIndex (GEOM::GEOM_Object_ptr theObject, + CORBA::Long theIndex, + CORBA::Boolean theUseOri); void GetInertia (GEOM::GEOM_Object_ptr theShape, - CORBA::Double& I11, CORBA::Double& I12, CORBA::Double& I13, - CORBA::Double& I21, CORBA::Double& I22, CORBA::Double& I23, - CORBA::Double& I31, CORBA::Double& I32, CORBA::Double& I33, - CORBA::Double& Ix , CORBA::Double& Iy , CORBA::Double& Iz); + CORBA::Double& I11, CORBA::Double& I12, CORBA::Double& I13, + CORBA::Double& I21, CORBA::Double& I22, CORBA::Double& I23, + CORBA::Double& I31, CORBA::Double& I32, CORBA::Double& I33, + CORBA::Double& Ix , CORBA::Double& Iy , CORBA::Double& Iz); void GetBoundingBox (GEOM::GEOM_Object_ptr theShape, - CORBA::Double& Xmin, CORBA::Double& Xmax, - CORBA::Double& Ymin, CORBA::Double& Ymax, - CORBA::Double& Zmin, CORBA::Double& Zmax); + 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::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, + GEOM::GEOM_IMeasureOperations::ShapeErrors_out theErrors); + + CORBA::Boolean CheckShapeWithGeometry + (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_IMeasureOperations::ShapeErrors_out theErrors); + + char* PrintShapeErrors + ( GEOM::GEOM_Object_ptr theShape, + const GEOM::GEOM_IMeasureOperations::ShapeErrors &theErrors); - CORBA::Boolean CheckShape (GEOM::GEOM_Object_ptr theShape, - CORBA::String_out theDescription); + CORBA::Boolean CheckSelfIntersections (GEOM::GEOM_Object_ptr theShape, + CORBA::Long theCheckLevel, + GEOM::ListOfLong_out theIntersections); - CORBA::Boolean CheckShapeWithGeometry (GEOM::GEOM_Object_ptr theShape, - CORBA::String_out theDescription); + 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); + GEOM::ListOfBool* AreCoordsInside (GEOM::GEOM_Object_ptr theShape, + const GEOM::ListOfDouble& theCoords, + CORBA::Double theTolerance); + CORBA::Double GetMinDistance (GEOM::GEOM_Object_ptr theShape1, - GEOM::GEOM_Object_ptr theShape2, + GEOM::GEOM_Object_ptr theShape2, 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); + CORBA::Double& X, CORBA::Double& Y, CORBA::Double& Z); CORBA::Double GetAngle (GEOM::GEOM_Object_ptr theShape1, - GEOM::GEOM_Object_ptr theShape2); + GEOM::GEOM_Object_ptr theShape2); - // Methods for recieving radiuses of curvature of curves and surfaces + CORBA::Double GetAngleBtwVectors (GEOM::GEOM_Object_ptr theShape1, + GEOM::GEOM_Object_ptr theShape2); + + 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); + CORBA::Double theParam); CORBA::Double CurveCurvatureByPoint (GEOM::GEOM_Object_ptr theCurve, - GEOM::GEOM_Object_ptr thePoint); + GEOM::GEOM_Object_ptr thePoint); CORBA::Double MaxSurfaceCurvatureByParam (GEOM::GEOM_Object_ptr theSurf, - CORBA::Double theUParam, - CORBA::Double theVParam); + CORBA::Double theUParam, + CORBA::Double theVParam); CORBA::Double MaxSurfaceCurvatureByPoint (GEOM::GEOM_Object_ptr theSurf, - GEOM::GEOM_Object_ptr thePoint); + GEOM::GEOM_Object_ptr thePoint); CORBA::Double MinSurfaceCurvatureByParam (GEOM::GEOM_Object_ptr theSurf, - CORBA::Double theUParam, - CORBA::Double theVParam); + CORBA::Double theUParam, + CORBA::Double theVParam); CORBA::Double MinSurfaceCurvatureByPoint (GEOM::GEOM_Object_ptr theSurf, - GEOM::GEOM_Object_ptr thePoint); + 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 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 & theListOfResults); }; #endif