-using namespace std;
+using namespace std;
#include "GEOM_IShapesOperations_i.hh"
/*!
* MakeEdge
*/
-//=============================================================================
+//=============================================================================
GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeEdge
(GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr thePnt2)
{
if (aPnt1.IsNull() || aPnt2.IsNull()) return aGEOMObject._retn();
- //Create the Edge
+ //Create the Edge
Handle(GEOM_Object) anObject = GetOperations()->MakeEdge(aPnt1, aPnt2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
/*!
* MakeWire
*/
-//=============================================================================
+//=============================================================================
GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeWire
(const GEOM::ListOfGO& theEdgesAndWires)
{
/*!
* MakeFace
*/
-//=============================================================================
+//=============================================================================
GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeFace
(GEOM::GEOM_Object_ptr theWire, CORBA::Boolean isPlanarWanted)
{
if (aWire.IsNull()) return aGEOMObject._retn();
- //Create the Face
+ //Create the Face
Handle(GEOM_Object) anObject = GetOperations()->MakeFace(aWire, isPlanarWanted);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
/*!
* MakeFaceWires
*/
-//=============================================================================
+//=============================================================================
GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeFaceWires
(const GEOM::ListOfGO& theWires,
CORBA::Boolean isPlanarWanted)
/*!
* MakeShell
*/
-//=============================================================================
+//=============================================================================
GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeShell
(const GEOM::ListOfGO& theFacesAndShells)
{
/*!
* MakeSolidShell
*/
-//=============================================================================
+//=============================================================================
GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeSolidShell
(GEOM::GEOM_Object_ptr theShell)
{
/*!
* MakeSolidShells
*/
-//=============================================================================
+//=============================================================================
GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeSolidShells
(const GEOM::ListOfGO& theShells)
{
/*!
* MakeCompound
*/
-//=============================================================================
+//=============================================================================
GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeCompound
(const GEOM::ListOfGO& theShapes)
{
/*!
* MakeGlueFaces
*/
-//=============================================================================
+//=============================================================================
GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeGlueFaces
- (GEOM::GEOM_Object_ptr theShape,
- const CORBA::Double theTolerance)
+ (GEOM::GEOM_Object_ptr theShape,
+ const CORBA::Double theTolerance)
{
GEOM::GEOM_Object_var aGEOMObject;
return aSeq._retn();
}
+//=============================================================================
+/*!
+ * GetSubShape
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetSubShape
+ (GEOM::GEOM_Object_ptr theMainShape,
+ const CORBA::Long theID)
+{
+ GEOM::GEOM_Object_var aGEOMObject;
+
+ //Set a not done flag
+ GetOperations()->SetNotDone();
+
+ if (theMainShape == NULL) return aGEOMObject._retn();
+
+ //Get the reference objects
+ Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
+ (theMainShape->GetStudyID(), theMainShape->GetEntry());
+
+ if (aShape.IsNull()) return aGEOMObject._retn();
+
+ Handle(GEOM_Object) anObject = GetOperations()->GetSubShape(aShape, theID);
+ if (!GetOperations()->IsDone() || anObject.IsNull())
+ return aGEOMObject._retn();
+
+ return GetObject(anObject);
+}
+
//=============================================================================
/*!
* NumberOfFaces
/*!
* ReverseOrientation
*/
-//=============================================================================
+//=============================================================================
GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::ChangeOrientation
(GEOM::GEOM_Object_ptr theShape)
{