Back to index

salome-geom  6.5.0
GEOM_IMeasureOperations_i.cc
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 #include <Standard_Stream.hxx>
00024 
00025 #include "GEOM_IMeasureOperations_i.hh"
00026 
00027 #include "utilities.h"
00028 #include "OpUtil.hxx"
00029 
00030 #include "GEOM_Engine.hxx"
00031 #include "GEOM_Object.hxx"
00032 
00033 //=============================================================================
00037 //=============================================================================
00038 GEOM_IMeasureOperations_i::GEOM_IMeasureOperations_i (PortableServer::POA_ptr thePOA,
00039                                                       GEOM::GEOM_Gen_ptr theEngine,
00040                                                       ::GEOMImpl_IMeasureOperations* theImpl)
00041 :GEOM_IOperations_i(thePOA, theEngine, theImpl)
00042 {
00043   MESSAGE("GEOM_IMeasureOperations_i::GEOM_IMeasureOperations_i");
00044 }
00045 
00046 //=============================================================================
00050 //=============================================================================
00051 GEOM_IMeasureOperations_i::~GEOM_IMeasureOperations_i()
00052 {
00053   MESSAGE("GEOM_IMeasureOperations_i::~GEOM_IMeasureOperations_i");
00054 }
00055 
00056 //=============================================================================
00060 //=============================================================================
00061 GEOM::GEOM_IKindOfShape::shape_kind GEOM_IMeasureOperations_i::KindOfShape
00062                                    (GEOM::GEOM_Object_ptr  theShape,
00063                                     GEOM::ListOfLong_out   theIntegers,
00064                                     GEOM::ListOfDouble_out theDoubles)
00065 {
00066   GEOMImpl_IMeasureOperations::ShapeKind aKind = GEOMImpl_IMeasureOperations::SK_NO_SHAPE;
00067 
00068   // allocate the CORBA arrays
00069   GEOM::ListOfLong_var anIntegersArray = new GEOM::ListOfLong();
00070   GEOM::ListOfDouble_var aDoublesArray = new GEOM::ListOfDouble();
00071 
00072   //Get the reference shape
00073   Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
00074 
00075   if (!aShape.IsNull()) {
00076     Handle(TColStd_HSequenceOfInteger) anIntegers = new TColStd_HSequenceOfInteger;
00077     Handle(TColStd_HSequenceOfReal)    aDoubles   = new TColStd_HSequenceOfReal;
00078 
00079     // Detect kind of shape and parameters
00080     aKind = GetOperations()->KindOfShape(aShape, anIntegers, aDoubles);
00081 
00082     int nbInts = anIntegers->Length();
00083     int nbDbls = aDoubles->Length();
00084 
00085     anIntegersArray->length(nbInts);
00086     aDoublesArray->length(nbDbls);
00087 
00088     for (int ii = 0; ii < nbInts; ii++) {
00089       anIntegersArray[ii] = anIntegers->Value(ii + 1);
00090     }
00091     for (int id = 0; id < nbDbls; id++) {
00092       aDoublesArray[id] = aDoubles->Value(id + 1);
00093     }
00094   }
00095 
00096   // initialize out-parameters with local arrays
00097   theIntegers = anIntegersArray._retn();
00098   theDoubles  = aDoublesArray._retn();
00099   return (GEOM::GEOM_IKindOfShape::shape_kind)aKind;
00100 }
00101 
00102 //=============================================================================
00106 //=============================================================================
00107 void GEOM_IMeasureOperations_i::GetPosition
00108                  (GEOM::GEOM_Object_ptr theShape,
00109                   CORBA::Double& Ox, CORBA::Double& Oy, CORBA::Double& Oz,
00110                   CORBA::Double& Zx, CORBA::Double& Zy, CORBA::Double& Zz,
00111                   CORBA::Double& Xx, CORBA::Double& Xy, CORBA::Double& Xz)
00112 {
00113   //Set a not done flag
00114   GetOperations()->SetNotDone();
00115 
00116   //Set default values: global CS
00117   Ox = Oy = Oz = Zx = Zy = Xy = Xz = 0.;
00118   Zz = Xx = 1.;
00119 
00120   //Get the reference shape
00121   Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
00122   if (aShape.IsNull()) return;
00123 
00124   // Get shape parameters
00125   GetOperations()->GetPosition(aShape, Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz);
00126 }
00127 
00128 //=============================================================================
00132 //=============================================================================
00133 GEOM::GEOM_Object_ptr GEOM_IMeasureOperations_i::GetCentreOfMass
00134                                               (GEOM::GEOM_Object_ptr theShape)
00135 {
00136   GEOM::GEOM_Object_var aGEOMObject;
00137 
00138   //Set a not done flag
00139   GetOperations()->SetNotDone();
00140 
00141   //Get the reference shape
00142   Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
00143   if (aShape.IsNull()) return aGEOMObject._retn();
00144 
00145   // Make Point - centre of mass of theShape
00146   Handle(GEOM_Object) anObject = GetOperations()->GetCentreOfMass(aShape);
00147   if (!GetOperations()->IsDone() || anObject.IsNull())
00148     return aGEOMObject._retn();
00149 
00150   return GetObject(anObject);
00151 }
00152 
00153 //=============================================================================
00157 //=============================================================================
00158 GEOM::GEOM_Object_ptr GEOM_IMeasureOperations_i::GetVertexByIndex
00159   (GEOM::GEOM_Object_ptr theShape, CORBA::Long theIndex)
00160 {
00161   GEOM::GEOM_Object_var aGEOMObject;
00162 
00163   //Set a not done flag
00164   GetOperations()->SetNotDone();
00165 
00166   //Get the reference shape
00167   Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
00168   if ( aShape.IsNull() ) return aGEOMObject._retn();
00169 
00170   // Get vertex by index
00171   Handle(GEOM_Object) anObject = GetOperations()->GetVertexByIndex(aShape, theIndex);
00172   if (!GetOperations()->IsDone() || anObject.IsNull())
00173     return aGEOMObject._retn();
00174 
00175   return GetObject(anObject);
00176 }
00177 
00178 //=============================================================================
00182 //=============================================================================
00183 GEOM::GEOM_Object_ptr GEOM_IMeasureOperations_i::GetNormal
00184                                        (GEOM::GEOM_Object_ptr theFace,
00185                                         GEOM::GEOM_Object_ptr theOptionalPoint)
00186 {
00187   GEOM::GEOM_Object_var aGEOMObject;
00188 
00189   //Set a not done flag
00190   GetOperations()->SetNotDone();
00191 
00192   //Get the reference shape
00193   Handle(GEOM_Object) aFace = GetObjectImpl(theFace);
00194   if (aFace.IsNull()) return aGEOMObject._retn();
00195 
00196   // Get the OptionalPoint (can be not defined)
00197   Handle(GEOM_Object) anOptionalPoint = GetObjectImpl(theOptionalPoint);
00198 
00199   // Make Vector - normal to theFace (in point theOptionalPoint if the face is not planar)
00200   Handle(GEOM_Object) anObject = GetOperations()->GetNormal(aFace, anOptionalPoint);
00201   if (!GetOperations()->IsDone() || anObject.IsNull())
00202     return aGEOMObject._retn();
00203 
00204   return GetObject(anObject);
00205 }
00206 
00207 //=============================================================================
00211 //=============================================================================
00212 void GEOM_IMeasureOperations_i::GetBasicProperties (GEOM::GEOM_Object_ptr theShape,
00213                                                     CORBA::Double& theLength,
00214                                                     CORBA::Double& theSurfArea,
00215                                                     CORBA::Double& theVolume)
00216 {
00217   //Set a not done flag
00218   GetOperations()->SetNotDone();
00219 
00220   //Get the reference shape
00221   Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
00222   if (aShape.IsNull()) return;
00223 
00224   // Get shape parameters
00225   GetOperations()->GetBasicProperties(aShape, theLength, theSurfArea, theVolume);
00226 }
00227 
00228 //=============================================================================
00232 //=============================================================================
00233 void GEOM_IMeasureOperations_i::GetInertia
00234   (GEOM::GEOM_Object_ptr theShape,
00235    CORBA::Double& I11, CORBA::Double& I12, CORBA::Double& I13,
00236    CORBA::Double& I21, CORBA::Double& I22, CORBA::Double& I23,
00237    CORBA::Double& I31, CORBA::Double& I32, CORBA::Double& I33,
00238    CORBA::Double& Ix , CORBA::Double& Iy , CORBA::Double& Iz)
00239 {
00240   //Set a not done flag
00241   GetOperations()->SetNotDone();
00242 
00243   //Get the reference shape
00244   Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
00245   if (aShape.IsNull()) return;
00246 
00247   // Get shape parameters
00248   GetOperations()->GetInertia(aShape,
00249                               I11, I12, I13,
00250                               I21, I22, I23,
00251                               I31, I32, I33,
00252                               Ix , Iy , Iz);
00253 }
00254 
00255 //=============================================================================
00259 //=============================================================================
00260 void GEOM_IMeasureOperations_i::GetBoundingBox (GEOM::GEOM_Object_ptr theShape,
00261                                                 CORBA::Double& Xmin, CORBA::Double& Xmax,
00262                                                 CORBA::Double& Ymin, CORBA::Double& Ymax,
00263                                                 CORBA::Double& Zmin, CORBA::Double& Zmax)
00264 {
00265   //Set a not done flag
00266   GetOperations()->SetNotDone();
00267 
00268   //Get the reference shape
00269   Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
00270   if (aShape.IsNull()) return;
00271 
00272   // Get shape parameters
00273   GetOperations()->GetBoundingBox(aShape, Xmin, Xmax, Ymin, Ymax, Zmin, Zmax);
00274 }
00275 
00276 //=============================================================================
00280 //=============================================================================
00281 void GEOM_IMeasureOperations_i::GetTolerance
00282                                 (GEOM::GEOM_Object_ptr theShape,
00283                                  CORBA::Double& FaceMin, CORBA::Double& FaceMax,
00284                                  CORBA::Double& EdgeMin, CORBA::Double& EdgeMax,
00285                                  CORBA::Double& VertMin, CORBA::Double& VertMax)
00286 {
00287   //Set a not done flag
00288   GetOperations()->SetNotDone();
00289 
00290   //Get the reference shape
00291   Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
00292   if (aShape.IsNull()) return;
00293 
00294   // Get shape parameters
00295   GetOperations()->GetTolerance(aShape,
00296                                 FaceMin, FaceMax,
00297                                 EdgeMin, EdgeMax,
00298                                 VertMin, VertMax);
00299 }
00300 
00301 //=============================================================================
00305 //=============================================================================
00306 CORBA::Boolean GEOM_IMeasureOperations_i::CheckShape (GEOM::GEOM_Object_ptr theShape,
00307                                                       CORBA::String_out     theDescription)
00308 {
00309   //Set a not done flag
00310   GetOperations()->SetNotDone();
00311 
00312   if (CORBA::is_nil(theShape))
00313   {
00314     theDescription = CORBA::string_dup("null");
00315     return 0;
00316   }
00317 
00318   //Get the reference shape
00319   Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
00320 
00321   if (aShape.IsNull())
00322   {
00323     theDescription = CORBA::string_dup("null2");
00324     return 0;
00325   }
00326 
00327   // Get shape parameters
00328   TCollection_AsciiString aDump;
00329   if (GetOperations()->CheckShape(aShape, /*check_geom = */false, aDump))
00330   {
00331     theDescription = CORBA::string_dup("OK");
00332     return 1;
00333   }
00334   theDescription = CORBA::string_dup(aDump.ToCString());
00335   return 0;
00336 }
00337 
00338 CORBA::Boolean GEOM_IMeasureOperations_i::CheckShapeWithGeometry (GEOM::GEOM_Object_ptr theShape,
00339                                                                   CORBA::String_out     theDescription)
00340 {
00341   //Set a not done flag
00342   GetOperations()->SetNotDone();
00343 
00344   if (CORBA::is_nil(theShape))
00345   {
00346     theDescription = CORBA::string_dup("null");
00347     return 0;
00348   }
00349 
00350   //Get the reference shape
00351   Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
00352 
00353   if (aShape.IsNull())
00354   {
00355     theDescription = CORBA::string_dup("null2");
00356     return 0;
00357   }
00358 
00359   // Get shape parameters
00360   TCollection_AsciiString aDump;
00361   if (GetOperations()->CheckShape(aShape, /*check_geom = */true, aDump))
00362   {
00363     theDescription = CORBA::string_dup("OK");
00364     return 1;
00365   }
00366   theDescription = CORBA::string_dup(aDump.ToCString());
00367   return 0;
00368 }
00369 
00370 //=============================================================================
00374 //=============================================================================
00375 CORBA::Boolean GEOM_IMeasureOperations_i::CheckSelfIntersections (GEOM::GEOM_Object_ptr theShape,
00376                                                                   GEOM::ListOfLong_out  theIntersections)
00377 {
00378   // Set a not done flag
00379   GetOperations()->SetNotDone();
00380 
00381   bool isGood = false;
00382 
00383   // Allocate the CORBA arrays
00384   GEOM::ListOfLong_var anIntegersArray = new GEOM::ListOfLong();
00385 
00386   // Get the reference shape
00387   Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
00388 
00389   if (!aShape.IsNull()) {
00390     Handle(TColStd_HSequenceOfInteger) anIntegers = new TColStd_HSequenceOfInteger;
00391 
00392     // Detect self-intersections
00393     isGood = GetOperations()->CheckSelfIntersections(aShape, anIntegers);
00394 
00395     int nbInts = anIntegers->Length();
00396 
00397     anIntegersArray->length(nbInts);
00398 
00399     for (int ii = 0; ii < nbInts; ii++) {
00400       anIntegersArray[ii] = anIntegers->Value(ii + 1);
00401     }
00402   }
00403 
00404   // Initialize out-parameters with local arrays
00405   theIntersections = anIntegersArray._retn();
00406   return isGood;
00407 }
00408 
00409 //=============================================================================
00413 //=============================================================================
00414 char* GEOM_IMeasureOperations_i::IsGoodForSolid (GEOM::GEOM_Object_ptr theShape)
00415 {
00416   //Set a not done flag
00417   GetOperations()->SetNotDone();
00418 
00419   //Get the reference shape
00420   Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
00421   if (aShape.IsNull()) return CORBA::string_dup("WRN_NULL_OBJECT_OR_SHAPE");
00422 
00423   // Get shape parameters
00424   TCollection_AsciiString aDescription = GetOperations()->IsGoodForSolid(aShape);
00425   return CORBA::string_dup(aDescription.ToCString());
00426 }
00427 
00428 //=============================================================================
00432 //=============================================================================
00433 char* GEOM_IMeasureOperations_i::WhatIs (GEOM::GEOM_Object_ptr theShape)
00434 {
00435   //Set a not done flag
00436   GetOperations()->SetNotDone();
00437 
00438   //Get the reference shape
00439   Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
00440   if (aShape.IsNull()) return NULL;
00441 
00442   // Get shape parameters
00443   TCollection_AsciiString aDescription = GetOperations()->WhatIs(aShape);
00444   return CORBA::string_dup(aDescription.ToCString());
00445 }
00446 
00447 //=============================================================================
00451 //=============================================================================
00452 GEOM::ListOfBool* GEOM_IMeasureOperations_i::AreCoordsInside (GEOM::GEOM_Object_ptr theShape,
00453                                                               const GEOM::ListOfDouble& theCoords,
00454                                                               CORBA::Double tolerance)
00455 {
00456   //Set a not done flag
00457   GetOperations()->SetNotDone();
00458   
00459   unsigned int nb_points = theCoords.length()/3;
00460 
00461   GEOM::ListOfBool_var aResults = new GEOM::ListOfBool;
00462   aResults->length(nb_points);
00463   
00464   Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
00465   
00466   std::vector<double> tmp(3*nb_points);
00467   for (int i = 0; i < 3*nb_points; i++)
00468     tmp[i] = theCoords[i];
00469   std::vector<bool> res = GetOperations()->AreCoordsInside(aShape, tmp, tolerance);
00470   for (int i = 0; i < nb_points; i++)
00471     aResults[i] = i < res.size() ? res[i] : false;
00472   return aResults._retn();
00473 }
00474 
00475 //=============================================================================
00479 //=============================================================================
00480 CORBA::Double GEOM_IMeasureOperations_i::GetMinDistance
00481   (GEOM::GEOM_Object_ptr theShape1, GEOM::GEOM_Object_ptr theShape2,
00482    CORBA::Double& X1, CORBA::Double& Y1, CORBA::Double& Z1,
00483    CORBA::Double& X2, CORBA::Double& Y2, CORBA::Double& Z2)
00484 {
00485   //Set a not done flag
00486   GetOperations()->SetNotDone();
00487 
00488   //Get the reference shape
00489   Handle(GEOM_Object) aShape1 = GetObjectImpl(theShape1);
00490   Handle(GEOM_Object) aShape2 = GetObjectImpl(theShape2);
00491   if (aShape1.IsNull() || aShape2.IsNull()) return -1.0;
00492 
00493   // Get shape parameters
00494   return GetOperations()->GetMinDistance(aShape1, aShape2, X1, Y1, Z1, X2, Y2, Z2);
00495 }
00496 
00497 //=============================================================================
00501 //=============================================================================
00502 void GEOM_IMeasureOperations_i::PointCoordinates (GEOM::GEOM_Object_ptr theShape,
00503                                                   CORBA::Double& X, CORBA::Double& Y, CORBA::Double& Z)
00504 
00505 {
00506   //Set a not done flag
00507   GetOperations()->SetNotDone();
00508 
00509   //Get the reference shape
00510   Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
00511   if (aShape.IsNull())
00512     return;
00513 
00514   // Get shape parameters
00515   GetOperations()->PointCoordinates( aShape, X, Y, Z );
00516 }
00517 
00518 //=============================================================================
00522 //=============================================================================
00523 CORBA::Double GEOM_IMeasureOperations_i::GetAngle (GEOM::GEOM_Object_ptr theShape1,
00524                                                    GEOM::GEOM_Object_ptr theShape2)
00525 {
00526   //Set a not done flag
00527   GetOperations()->SetNotDone();
00528 
00529   //Get the reference shapes
00530   Handle(GEOM_Object) aShape1 = GetObjectImpl(theShape1);
00531   Handle(GEOM_Object) aShape2 = GetObjectImpl(theShape2);
00532   if (aShape1.IsNull() || aShape2.IsNull()) return -1.0;
00533 
00534   // Get the angle
00535   return GetOperations()->GetAngle(aShape1, aShape2);
00536 }
00537 
00538 //=============================================================================
00542 //=============================================================================
00543 CORBA::Double GEOM_IMeasureOperations_i::GetAngleBtwVectors (GEOM::GEOM_Object_ptr theShape1,
00544                                                              GEOM::GEOM_Object_ptr theShape2)
00545 {
00546   //Set a not done flag
00547   GetOperations()->SetNotDone();
00548 
00549   //Get the reference shapes
00550   Handle(GEOM_Object) aShape1 = GetObjectImpl(theShape1);
00551   Handle(GEOM_Object) aShape2 = GetObjectImpl(theShape2);
00552   if (aShape1.IsNull() || aShape2.IsNull()) return -1.0;
00553 
00554   // Get the angle
00555   return GetOperations()->GetAngleBtwVectors(aShape1, aShape2);
00556 }
00557 
00558 
00559 //=============================================================================
00563 //=============================================================================
00564 CORBA::Double GEOM_IMeasureOperations_i::CurveCurvatureByParam
00565                        (GEOM::GEOM_Object_ptr theCurve, CORBA::Double theParam)
00566 {
00567   //Set a not done flag
00568   GetOperations()->SetNotDone();
00569 
00570   //Get the reference shape
00571   Handle(GEOM_Object) aShape = GetObjectImpl(theCurve);
00572   if(aShape.IsNull()) return -1.0;
00573 
00574   return GetOperations()->CurveCurvatureByParam(aShape,theParam);
00575 }
00576 
00577 //=============================================================================
00581 //=============================================================================
00582 CORBA::Double GEOM_IMeasureOperations_i::CurveCurvatureByPoint
00583                (GEOM::GEOM_Object_ptr theCurve, GEOM::GEOM_Object_ptr thePoint)
00584 {
00585   //Set a not done flag
00586   GetOperations()->SetNotDone();
00587 
00588   //Get the reference shape
00589   Handle(GEOM_Object) aShape = GetObjectImpl(theCurve);
00590   Handle(GEOM_Object) aPoint = GetObjectImpl(thePoint);
00591   if( aShape.IsNull() || aPoint.IsNull() ) return -1.0;
00592 
00593   return GetOperations()->CurveCurvatureByPoint(aShape,aPoint);
00594 }
00595 
00596 
00597 //=============================================================================
00601 //=============================================================================
00602 CORBA::Double GEOM_IMeasureOperations_i::MaxSurfaceCurvatureByParam
00603                                                 (GEOM::GEOM_Object_ptr theSurf,
00604                                                  CORBA::Double theUParam,
00605                                                  CORBA::Double theVParam)
00606 {
00607   //Set a not done flag
00608   GetOperations()->SetNotDone();
00609 
00610   //Get the reference shape
00611   Handle(GEOM_Object) aShape = GetObjectImpl(theSurf);
00612   if(aShape.IsNull()) return -1.0;
00613 
00614   return GetOperations()->MaxSurfaceCurvatureByParam(aShape,theUParam,theVParam);
00615 }
00616 
00617 //=============================================================================
00621 //=============================================================================
00622 CORBA::Double GEOM_IMeasureOperations_i::MaxSurfaceCurvatureByPoint
00623                 (GEOM::GEOM_Object_ptr theSurf, GEOM::GEOM_Object_ptr thePoint)
00624 {
00625   //Set a not done flag
00626   GetOperations()->SetNotDone();
00627 
00628   //Get the reference shape
00629   Handle(GEOM_Object) aShape = GetObjectImpl(theSurf);
00630   Handle(GEOM_Object) aPoint = GetObjectImpl(thePoint);
00631   if( aShape.IsNull() || aPoint.IsNull() ) return -1.0;
00632 
00633   return GetOperations()->MaxSurfaceCurvatureByPoint(aShape,aPoint);
00634 }
00635 
00636 //=============================================================================
00640 //=============================================================================
00641 CORBA::Double GEOM_IMeasureOperations_i::MinSurfaceCurvatureByParam
00642                                                 (GEOM::GEOM_Object_ptr theSurf,
00643                                                  CORBA::Double theUParam,
00644                                                  CORBA::Double theVParam)
00645 {
00646   //Set a not done flag
00647   GetOperations()->SetNotDone();
00648 
00649   //Get the reference shape
00650   Handle(GEOM_Object) aShape = GetObjectImpl(theSurf);
00651   if (aShape.IsNull()) return -1.0;
00652 
00653   return GetOperations()->MinSurfaceCurvatureByParam(aShape,theUParam,theVParam);
00654 }
00655 
00656 //=============================================================================
00660 //=============================================================================
00661 CORBA::Double GEOM_IMeasureOperations_i::MinSurfaceCurvatureByPoint
00662                 (GEOM::GEOM_Object_ptr theSurf, GEOM::GEOM_Object_ptr thePoint)
00663 {
00664   //Set a not done flag
00665   GetOperations()->SetNotDone();
00666 
00667   //Get the reference shape
00668   Handle(GEOM_Object) aShape = GetObjectImpl(theSurf);
00669   Handle(GEOM_Object) aPoint = GetObjectImpl(thePoint);
00670   if (aShape.IsNull() || aPoint.IsNull()) return -1.0;
00671 
00672   return GetOperations()->MinSurfaceCurvatureByPoint(aShape,aPoint);
00673 }