X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOM_I%2FGEOM_IShapesOperations_i.cc;h=310111aaa864daf96a8f939de445d7d7977c0da4;hb=8b1511ff6327ae63c450b10e49714d3c83577eda;hp=7a0fff924cda77b0124ad9cd63a8a7a8a753376c;hpb=d6bfd123a2177c0ee1207303bdbf7e4404797e8a;p=modules%2Fgeom.git diff --git a/src/GEOM_I/GEOM_IShapesOperations_i.cc b/src/GEOM_I/GEOM_IShapesOperations_i.cc index 7a0fff924..310111aaa 100644 --- a/src/GEOM_I/GEOM_IShapesOperations_i.cc +++ b/src/GEOM_I/GEOM_IShapesOperations_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 @@ -85,6 +85,34 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeEdge return GetObject(anObject); } +//============================================================================= +/*! + * MakeEdgeWire + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeEdgeWire + (GEOM::GEOM_Object_ptr theWire, + const CORBA::Double theLinearTolerance, + const CORBA::Double theAngularTolerance) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + //Get the source wire + Handle(GEOM_Object) aWire = GetObjectImpl(theWire); + + if (aWire.IsNull()) return aGEOMObject._retn(); + + //Create the Edge + Handle(GEOM_Object) anObject = GetOperations()->MakeEdgeWire(aWire, theLinearTolerance, theAngularTolerance); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + //============================================================================= /*! * MakeWire @@ -229,8 +257,11 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeSolidShell Handle(GEOM_Object) aShell = GetObjectImpl(theShell); if (aShell.IsNull()) return aGEOMObject._retn(); + std::list aShapes; + aShapes.push_back(aShell); + //Create the Solid - Handle(GEOM_Object) anObject = GetOperations()->MakeSolidShell(aShell); + Handle(GEOM_Object) anObject = GetOperations()->MakeSolidShells(aShapes); if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn(); @@ -410,6 +441,31 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeGlueFacesByList return GetObject(anObject); } +//============================================================================= +/*! + * GetExistingSubObjects + */ +//============================================================================= +GEOM::ListOfGO* GEOM_IShapesOperations_i::GetExistingSubObjects (GEOM::GEOM_Object_ptr theShape, + CORBA::Boolean theGroupsOnly) +{ + GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO; + + Handle(GEOM_Object) aShape = GetObjectImpl(theShape); + if (aShape.IsNull()) return aSeq._retn(); + + Handle(TColStd_HSequenceOfTransient) aHSeq = + GetOperations()->GetExistingSubObjects(aShape, theGroupsOnly); + if (!GetOperations()->IsDone() || aHSeq.IsNull()) + return aSeq._retn(); + + Standard_Integer aLength = aHSeq->Length(); + aSeq->length(aLength); + for (Standard_Integer i = 1; i <= aLength; i++) + aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i))); + + return aSeq._retn(); +} //============================================================================= /*!