X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOM_I%2FGEOM_IHealingOperations_i.cc;h=cdd3f1efec13f02368601a86dfef46afbaa98045;hb=refs%2Ftags%2FV3_2_6;hp=2190a7eb205e89d47931bc412ddfdc8e1b66ff12;hpb=dc8466f4ed277f900171b2b7c39fd63a8433c63f;p=modules%2Fgeom.git diff --git a/src/GEOM_I/GEOM_IHealingOperations_i.cc b/src/GEOM_I/GEOM_IHealingOperations_i.cc index 2190a7eb2..cdd3f1efe 100644 --- a/src/GEOM_I/GEOM_IHealingOperations_i.cc +++ b/src/GEOM_I/GEOM_IHealingOperations_i.cc @@ -1,5 +1,25 @@ +// Copyright (C) 2005 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 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 +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +#include + #include -using namespace std; #include "GEOM_IHealingOperations_i.hh" #include "GEOM_Engine.hxx" @@ -434,3 +454,71 @@ CORBA::Boolean GEOM_IHealingOperations_i::GetFreeBoundary ( GEOM::GEOM_Object_pt return true; } + + +//============================================================================= +/*! + * ChangeOrientation + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::ChangeOrientation (GEOM::GEOM_Object_ptr theObject) +{ + GEOM::GEOM_Object_var aGEOMObject; + + // Set a not done flag + GetOperations()->SetNotDone(); + + // Check parameters + if ( CORBA::is_nil(theObject) ) + return aGEOMObject._retn(); + + aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject); + + // Get the object itself + Handle(GEOM_Object) anObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (anObject.IsNull()) + return aGEOMObject._retn(); + + // Perform +// Handle(GEOM_Object) aNewObject = + GetOperations()->ChangeOrientation( anObject ); +// if (!GetOperations()->IsDone() || aNewObject.IsNull()) +// return aGEOMObject._retn(); + + //return GetObject(aNewObject); + return aGEOMObject._retn(); +} + + +//============================================================================= +/*! + * ChangeOrientationCopy + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::ChangeOrientationCopy (GEOM::GEOM_Object_ptr theObject) +{ + GEOM::GEOM_Object_var aGEOMObject; + + // Set a not done flag + GetOperations()->SetNotDone(); + + // Check parameters + if ( CORBA::is_nil(theObject) ) + return aGEOMObject._retn(); + + // Get the object itself + Handle(GEOM_Object) anObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (anObject.IsNull()) + return aGEOMObject._retn(); + + // Perform + Handle(GEOM_Object) aNewObject = + GetOperations()->ChangeOrientationCopy( anObject ); + if (!GetOperations()->IsDone() || aNewObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(aNewObject); +} +