X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOM_I%2FGEOM_ITransformOperations_i.cc;h=568c0e010a9914cc422c2df06b27134a45aa1384;hb=9e31f81bd01bd5b327b61de1fa28dd1d7ef82ca5;hp=ef24cb3901d7191809c32f4c917c6b3faf9fa1c8;hpb=3de8fc904fe26298ae139b2f688258747aafe5b5;p=modules%2Fgeom.git diff --git a/src/GEOM_I/GEOM_ITransformOperations_i.cc b/src/GEOM_I/GEOM_ITransformOperations_i.cc index ef24cb390..568c0e010 100644 --- a/src/GEOM_I/GEOM_ITransformOperations_i.cc +++ b/src/GEOM_I/GEOM_ITransformOperations_i.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2010 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 @@ -1129,6 +1129,37 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateThreePointsCopy return GetObject(anObject); } +//============================================================================= +/*! + * TransformLikeOtherCopy + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TransformLikeOtherCopy + (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theSample) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + //Get the object itself + Handle(GEOM_Object) anObject = GetObjectImpl(theObject); + if (anObject.IsNull()) return aGEOMObject._retn(); + + //Get the sample object + Handle(GEOM_Object) aSample = GetObjectImpl(theSample); + if (aSample.IsNull()) return aGEOMObject._retn(); + + //Perform the transformation + Handle(GEOM_Object) aResObject = + GetOperations()->TransformLikeOtherCopy(anObject, aSample); + if (!GetOperations()->IsDone() || aResObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(aResObject); +} + //============================================================================= /*! * RecomputeObject