-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016 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
#include <TColStd_HSequenceOfTransient.hxx>
#include <TColStd_HArray1OfInteger.hxx>
+/**
+ * This function converts GEOM::comparison_condition type into
+ * GEOMUtils::ComparisonCondition type.
+ *
+ * \param theCondition the condition of GEOM::comparison_condition type
+ * \return the condition of GEOMUtils::ComparisonCondition type.
+ */
+static GEOMUtils::ComparisonCondition ComparisonCondition
+ (const GEOM::comparison_condition theCondition)
+{
+ GEOMUtils::ComparisonCondition aResult = GEOMUtils::CC_GT;
+
+ switch (theCondition) {
+ case GEOM::CC_GE:
+ aResult = GEOMUtils::CC_GE;
+ break;
+ case GEOM::CC_LT:
+ aResult = GEOMUtils::CC_LT;
+ break;
+ case GEOM::CC_LE:
+ aResult = GEOMUtils::CC_LE;
+ break;
+ default:
+ break;
+ }
+
+ return aResult;
+}
+
//=============================================================================
/*!
* constructor:
GetOperations()->SetNotDone();
//Get the reference points
- Handle(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
- Handle(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
+ Handle(::GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
+ Handle(::GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
if (aPnt1.IsNull() || aPnt2.IsNull()) return aGEOMObject._retn();
//Create the Edge
- Handle(GEOM_Object) anObject = GetOperations()->MakeEdge(aPnt1, aPnt2);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeEdge(aPnt1, aPnt2);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference curve
- Handle(GEOM_Object) aRefCurve = GetObjectImpl(theCurve);
+ Handle(::GEOM_Object) aRefCurve = GetObjectImpl(theCurve);
if (aRefCurve.IsNull()) return aGEOMObject._retn();
//Get the reference point (can be NULL)
- Handle(GEOM_Object) aRefPoint;
+ Handle(::GEOM_Object) aRefPoint;
if (!CORBA::is_nil(theStartPoint)) {
aRefPoint = GetObjectImpl(theStartPoint);
}
//Create the point
- Handle(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeEdgeOnCurveByLength(aRefCurve, theLength, aRefPoint);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the source wire
- Handle(GEOM_Object) aWire = GetObjectImpl(theWire);
+ Handle(::GEOM_Object) aWire = GetObjectImpl(theWire);
if (aWire.IsNull()) return aGEOMObject._retn();
//Create the Edge
- Handle(GEOM_Object) anObject = GetOperations()->MakeEdgeWire(aWire, theLinearTolerance, theAngularTolerance);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeEdgeWire(aWire, theLinearTolerance, theAngularTolerance);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
int ind, aLen;
- std::list<Handle(GEOM_Object)> aShapes;
+ std::list<Handle(::GEOM_Object)> aShapes;
//Get the shapes
aLen = theEdgesAndWires.length();
for (ind = 0; ind < aLen; ind++) {
- Handle(GEOM_Object) aSh = GetObjectImpl(theEdgesAndWires[ind]);
+ Handle(::GEOM_Object) aSh = GetObjectImpl(theEdgesAndWires[ind]);
if (aSh.IsNull()) return aGEOMObject._retn();
aShapes.push_back(aSh);
}
// Make Solid
- Handle(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeWire(aShapes, theTolerance);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference wire
- Handle(GEOM_Object) aWire = GetObjectImpl(theWire);
+ Handle(::GEOM_Object) aWire = GetObjectImpl(theWire);
if (aWire.IsNull()) return aGEOMObject._retn();
//Create the Face
- Handle(GEOM_Object) anObject = GetOperations()->MakeFace(aWire, isPlanarWanted);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeFace(aWire, isPlanarWanted);
//if (!GetOperations()->IsDone() || anObject.IsNull())
// enable warning status
if (anObject.IsNull())
GetOperations()->SetNotDone();
int ind, aLen;
- std::list<Handle(GEOM_Object)> aShapes;
+ std::list<Handle(::GEOM_Object)> aShapes;
//Get the shapes
aLen = theWires.length();
for (ind = 0; ind < aLen; ind++) {
- Handle(GEOM_Object) aSh = GetObjectImpl(theWires[ind]);
+ Handle(::GEOM_Object) aSh = GetObjectImpl(theWires[ind]);
if (aSh.IsNull()) return aGEOMObject._retn();
aShapes.push_back(aSh);
}
// Make Face
- Handle(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeFaceWires(aShapes, isPlanarWanted);
//if (!GetOperations()->IsDone() || anObject.IsNull())
// enable warning status
GetOperations()->SetNotDone();
//Get the reference face and wire
- Handle(GEOM_Object) aFace = GetObjectImpl(theFace);
- Handle(GEOM_Object) aWire = GetObjectImpl(theWire);
+ Handle(::GEOM_Object) aFace = GetObjectImpl(theFace);
+ Handle(::GEOM_Object) aWire = GetObjectImpl(theWire);
if (aFace.IsNull() || aWire.IsNull()) {
return aGEOMObject._retn();
}
//Create the Face
- Handle(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeFaceFromSurface(aFace, aWire);
if (anObject.IsNull()) {
GetOperations()->SetNotDone();
//Get the shapes
- std::list<Handle(GEOM_Object)> aConstraints;
+ std::list<Handle(::GEOM_Object)> aConstraints;
for( int ind = 0; ind < theConstraints.length(); ind++ ) {
- Handle(GEOM_Object) anObject = GetObjectImpl( theConstraints[ind] );
+ Handle(::GEOM_Object) anObject = GetObjectImpl( theConstraints[ind] );
aConstraints.push_back(anObject);
}
// Make Face
- Handle(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeFaceWithConstraints( aConstraints );
// enable warning status
GetOperations()->SetNotDone();
int ind, aLen;
- std::list<Handle(GEOM_Object)> aShapes;
+ std::list<Handle(::GEOM_Object)> aShapes;
//Get the shapes
aLen = theFacesAndShells.length();
for (ind = 0; ind < aLen; ind++) {
- Handle(GEOM_Object) aSh = GetObjectImpl(theFacesAndShells[ind]);
+ Handle(::GEOM_Object) aSh = GetObjectImpl(theFacesAndShells[ind]);
if (aSh.IsNull()) return aGEOMObject._retn();
aShapes.push_back(aSh);
}
// Make Solid
- Handle(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeShell(aShapes);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShell = GetObjectImpl(theShell);
+ Handle(::GEOM_Object) aShell = GetObjectImpl(theShell);
if (aShell.IsNull()) return aGEOMObject._retn();
- std::list<Handle(GEOM_Object)> aShapes;
+ std::list<Handle(::GEOM_Object)> aShapes;
aShapes.push_back(aShell);
//Create the Solid
- Handle(GEOM_Object) anObject = GetOperations()->MakeSolidShells(aShapes);
+ Handle(::GEOM_Object) anObject = GetOperations()->MakeSolidShells(aShapes);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
int ind, aLen;
- std::list<Handle(GEOM_Object)> aShapes;
+ std::list<Handle(::GEOM_Object)> aShapes;
//Get the shapes
aLen = theShells.length();
for (ind = 0; ind < aLen; ind++) {
- Handle(GEOM_Object) aSh = GetObjectImpl(theShells[ind]);
+ Handle(::GEOM_Object) aSh = GetObjectImpl(theShells[ind]);
if (aSh.IsNull()) return aGEOMObject._retn();
aShapes.push_back(aSh);
}
// Make Solid
- Handle(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeSolidShells(aShapes);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
int ind, aLen;
- std::list<Handle(GEOM_Object)> aShapes;
+ std::list<Handle(::GEOM_Object)> aShapes;
//Get the shapes
aLen = theShapes.length();
for (ind = 0; ind < aLen; ind++) {
- Handle(GEOM_Object) aSh = GetObjectImpl(theShapes[ind]);
+ Handle(::GEOM_Object) aSh = GetObjectImpl(theShapes[ind]);
if (aSh.IsNull()) return aGEOMObject._retn();
aShapes.push_back(aSh);
}
// Make Solid
- Handle(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeCompound(aShapes);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
int ind, aLen;
- std::list<Handle(GEOM_Object)> aShapes;
+ std::list<Handle(::GEOM_Object)> aShapes;
//Get the shapes
aLen = theFacesOrShells.length();
for (ind = 0; ind < aLen; ind++) {
- Handle(GEOM_Object) aSh = GetObjectImpl(theFacesOrShells[ind]);
+ ::Handle(::GEOM_Object) aSh = GetObjectImpl(theFacesOrShells[ind]);
if (aSh.IsNull()) return aGEOMObject._retn();
aShapes.push_back(aSh);
}
// Make Solid
- Handle(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeSolidFromConnectedFaces(aShapes, isIntersect);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- std::list< Handle(GEOM_Object) > aShapes;
+ std::list< Handle(::GEOM_Object) > aShapes;
if (! GetListOfObjectsImpl( theShapes, aShapes ))
return aGEOMObject._retn();
//Perform the gluing
- Handle(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeGlueFaces(aShapes, theTolerance, doKeepNonSolids);
//if (!GetOperations()->IsDone() || anObject.IsNull())
// to allow warning
GetOperations()->SetNotDone();
//Get the reference objects
- std::list< Handle(GEOM_Object) > aShapes;
+ std::list< Handle(::GEOM_Object) > aShapes;
if (! GetListOfObjectsImpl( theShapes, aShapes ))
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)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- std::list< Handle(GEOM_Object) > aShapes;
+ std::list< Handle(::GEOM_Object) > aShapes;
if (! GetListOfObjectsImpl( theShapes, aShapes ))
return aGEOMObject._retn();
//Get the shapes
- std::list<Handle(GEOM_Object)> aFaces;
+ std::list<Handle(::GEOM_Object)> aFaces;
if (! GetListOfObjectsImpl( theFaces, aFaces ))
return aGEOMObject._retn();
//Perform the gluing
- Handle(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeGlueFacesByList(aShapes, theTolerance, aFaces,
doKeepNonSolids, doGlueAllEdges);
//if (!GetOperations()->IsDone() || anObject.IsNull())
GetOperations()->SetNotDone();
//Get the reference objects
- std::list< Handle(GEOM_Object) > aShapes;
+ std::list< Handle(::GEOM_Object) > aShapes;
if (! GetListOfObjectsImpl( theShapes, aShapes ))
return aGEOMObject._retn();
//Perform the gluing
- Handle(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeGlueEdges(aShapes, theTolerance);
//if (!GetOperations()->IsDone() || anObject.IsNull())
// to allow warning
GetOperations()->SetNotDone();
//Get the reference objects
- std::list< Handle(GEOM_Object) > aShapes;
+ std::list< Handle(::GEOM_Object) > aShapes;
if (! GetListOfObjectsImpl( theShapes, aShapes ))
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)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- std::list< Handle(GEOM_Object) > aShapes;
+ std::list< Handle(::GEOM_Object) > aShapes;
if (! GetListOfObjectsImpl( theShapes, aShapes ))
return aGEOMObject._retn();
//Get the shapes
- std::list<Handle(GEOM_Object)> anEdges;
+ std::list<Handle(::GEOM_Object)> anEdges;
if (! GetListOfObjectsImpl( theEdges, anEdges ))
return aGEOMObject._retn();
//Perform the gluing
- Handle(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->MakeGlueEdgesByList(aShapes, theTolerance, anEdges);
//if (!GetOperations()->IsDone() || anObject.IsNull())
// to allow warning
{
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aSeq._retn();
Handle(TColStd_HSequenceOfTransient) aHSeq =
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)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
{
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aSeq._retn();
Handle(TColStd_HSequenceOfTransient) aHSeq =
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)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
{
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aSeq._retn();
Handle(TColStd_HSequenceOfTransient) aHSeq =
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)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
{
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aSeq._retn();
Handle(TColStd_HSequenceOfTransient) aHSeq =
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)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
{
GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aSeq._retn();
Handle(TColStd_HSequenceOfInteger) aHSeq =
{
GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aSeq._retn();
Handle(TColStd_HSequenceOfInteger) aHSeq =
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShape = GetObjectImpl(theMainShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theMainShape);
if (aShape.IsNull()) return aGEOMObject._retn();
- Handle(GEOM_Object) anObject = GetOperations()->GetSubShape(aShape, theID);
+ Handle(::GEOM_Object) anObject = GetOperations()->GetSubShape(aShape, theID);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
if (theIndices.length() < 1)
return aSeq._retn();
- Handle(GEOM_Object) aShape = GetObjectImpl(theMainShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theMainShape);
if (aShape.IsNull()) return aSeq._retn();
Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger (1, theIndices.length());
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (i = 0; i < aLength; i++)
- aSeq[i] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i+1)));
+ aSeq[i] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i+1)));
return aSeq._retn();
}
(GEOM::GEOM_Object_ptr theMainShape, GEOM::GEOM_Object_ptr theSubShape)
{
//Get the reference shapes
- Handle(GEOM_Object) aMainShapeRef = GetObjectImpl(theMainShape);
- Handle(GEOM_Object) aSubShapeRef = GetObjectImpl(theSubShape);
+ Handle(::GEOM_Object) aMainShapeRef = GetObjectImpl(theMainShape);
+ Handle(::GEOM_Object) aSubShapeRef = GetObjectImpl(theSubShape);
if (aMainShapeRef.IsNull() || aSubShapeRef.IsNull()) return -1;
GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
//Get the reference main shape
- Handle(GEOM_Object) aMainShapeRef = GetObjectImpl(theMainShape);
+ Handle(::GEOM_Object) aMainShapeRef = GetObjectImpl(theMainShape);
if (aMainShapeRef.IsNull()) return aSeq._retn();
//Get the subshapes
- std::list<Handle(GEOM_Object)> aShapes;
+ std::list<Handle(::GEOM_Object)> aShapes;
int aLen = theSubShapes.length();
for (int ind = 0; ind < aLen; ind++) {
- Handle(GEOM_Object) aSh = GetObjectImpl(theSubShapes[ind]);
+ Handle(::GEOM_Object) aSh = GetObjectImpl(theSubShapes[ind]);
if (aSh.IsNull())
{
MESSAGE("NULL shape")
(GEOM::GEOM_Object_ptr theMainShape, GEOM::GEOM_Object_ptr theSubShape)
{
//Get the reference shapes
- Handle(GEOM_Object) aMainShapeRef = GetObjectImpl(theMainShape);
- Handle(GEOM_Object) aSubShapeRef = GetObjectImpl(theSubShape);
+ Handle(::GEOM_Object) aMainShapeRef = GetObjectImpl(theMainShape);
+ Handle(::GEOM_Object) aSubShapeRef = GetObjectImpl(theSubShape);
if (aMainShapeRef.IsNull() || aSubShapeRef.IsNull()) return -1;
char* GEOM_IShapesOperations_i::GetShapeTypeString (GEOM::GEOM_Object_ptr theShape)
{
//Get the reference shape
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return NULL;
// Get shape parameters
GEOM::GEOM_Object_ptr theObject,
const CORBA::Long theObjectIndex)
{
- Handle(GEOM_Object) aSubObject = GetObjectImpl( theSubObject );
- Handle(GEOM_Object) anObject = GetObjectImpl( theObject );
+ Handle(::GEOM_Object) aSubObject = GetObjectImpl( theSubObject );
+ Handle(::GEOM_Object) anObject = GetObjectImpl( theObject );
if( anObject.IsNull() || aSubObject.IsNull() )
return false;
CORBA::Long GEOM_IShapesOperations_i::NumberOfSubShapes (GEOM::GEOM_Object_ptr theShape,
const CORBA::Long theShapeType)
{
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return -1;
CORBA::Long aNb = GetOperations()->NumberOfSubShapes(aShape, theShapeType);
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aGEOMObject._retn();
//Create the Solid
- Handle(GEOM_Object) anObject = GetOperations()->ReverseShape(aShape);
+ Handle(::GEOM_Object) anObject = GetOperations()->ReverseShape(aShape);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
if (aShape.IsNull()) return aSeq._retn();
Handle(TColStd_HSequenceOfInteger) aHSeq =
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
- Handle(GEOM_Object) aShape1 = GetObjectImpl(theShape1);
- Handle(GEOM_Object) aShape2 = GetObjectImpl(theShape2);
+ Handle(::GEOM_Object) aShape1 = GetObjectImpl(theShape1);
+ Handle(::GEOM_Object) aShape2 = GetObjectImpl(theShape2);
if (aShape1.IsNull() || aShape2.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)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
//Get the shapes
- std::list<Handle(GEOM_Object)> aShapes;
+ std::list<Handle(::GEOM_Object)> aShapes;
if (! GetListOfObjectsImpl( theShapes, aShapes ))
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)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
- Handle(GEOM_Object) anAx1 = GetObjectImpl(theAx1);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) anAx1 = GetObjectImpl(theAx1);
if (aShape.IsNull() || anAx1.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)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
- Handle(GEOM_Object) anAx1 = GetObjectImpl(theAx1);
- Handle(GEOM_Object) anPnt = GetObjectImpl(thePnt);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) anAx1 = GetObjectImpl(theAx1);
+ Handle(::GEOM_Object) anPnt = GetObjectImpl(thePnt);
if (aShape.IsNull() || anAx1.IsNull() || anPnt.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)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
- Handle(GEOM_Object) anAxis = GetObjectImpl(theAxis);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) anAxis = GetObjectImpl(theAxis);
if (aShape.IsNull() || anAxis.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)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
- Handle(GEOM_Object) anAxis = GetObjectImpl(theAxis);
- Handle(GEOM_Object) aPnt = GetObjectImpl(thePnt);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) anAxis = GetObjectImpl(theAxis);
+ Handle(::GEOM_Object) aPnt = GetObjectImpl(thePnt);
if (aShape.IsNull() || anAxis.IsNull() || aPnt.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)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
- Handle(GEOM_Object) aCenter = GetObjectImpl(theCenter);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aCenter = GetObjectImpl(theCenter);
if (aShape.IsNull() || aCenter.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)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
- Handle(GEOM_Object) aTopLeftPoint = GetObjectImpl(theTopLeftPoint);
- Handle(GEOM_Object) aTopRigthPoint = GetObjectImpl(theTopRigthPoint);
- Handle(GEOM_Object) aBottomLeftPoint = GetObjectImpl(theBottomLeftPoint);
- Handle(GEOM_Object) aBottomRigthPoint = GetObjectImpl(theBottomRigthPoint);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aTopLeftPoint = GetObjectImpl(theTopLeftPoint);
+ Handle(::GEOM_Object) aTopRigthPoint = GetObjectImpl(theTopRigthPoint);
+ Handle(::GEOM_Object) aBottomLeftPoint = GetObjectImpl(theBottomLeftPoint);
+ Handle(::GEOM_Object) aBottomRigthPoint = GetObjectImpl(theBottomRigthPoint);
if (aShape.IsNull() ||
aTopLeftPoint.IsNull() ||
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)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
- Handle(GEOM_Object) anAx1 = GetObjectImpl(theAx1);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) anAx1 = GetObjectImpl(theAx1);
if (aShape.IsNull() || anAx1.IsNull()) return aSeq._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
- Handle(GEOM_Object) anAx1 = GetObjectImpl(theAx1);
- Handle(GEOM_Object) anPnt = GetObjectImpl(thePnt);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) anAx1 = GetObjectImpl(theAx1);
+ Handle(::GEOM_Object) anPnt = GetObjectImpl(thePnt);
if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return aSeq._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
- Handle(GEOM_Object) anAxis = GetObjectImpl(theAxis);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) anAxis = GetObjectImpl(theAxis);
if (aShape.IsNull() || anAxis.IsNull()) return aSeq._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
- Handle(GEOM_Object) anAxis = GetObjectImpl(theAxis);
- Handle(GEOM_Object) aPnt = GetObjectImpl(thePnt);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) anAxis = GetObjectImpl(theAxis);
+ Handle(::GEOM_Object) aPnt = GetObjectImpl(thePnt);
if (aShape.IsNull() || anAxis.IsNull() || aPnt.IsNull()) return aSeq._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
- Handle(GEOM_Object) aCenter = GetObjectImpl(theCenter);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aCenter = GetObjectImpl(theCenter);
if (aShape.IsNull() || aCenter.IsNull()) return aSeq._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
- Handle(GEOM_Object) aTopLeftPoint = GetObjectImpl(theTopLeftPoint);
- Handle(GEOM_Object) aTopRigthPoint = GetObjectImpl(theTopRigthPoint);
- Handle(GEOM_Object) aBottomLeftPoint = GetObjectImpl(theBottomLeftPoint);
- Handle(GEOM_Object) aBottomRigthPoint = GetObjectImpl(theBottomRigthPoint);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aTopLeftPoint = GetObjectImpl(theTopLeftPoint);
+ Handle(::GEOM_Object) aTopRigthPoint = GetObjectImpl(theTopRigthPoint);
+ Handle(::GEOM_Object) aBottomLeftPoint = GetObjectImpl(theBottomLeftPoint);
+ Handle(::GEOM_Object) aBottomRigthPoint = GetObjectImpl(theBottomRigthPoint);
if (aShape.IsNull() ||
aTopLeftPoint.IsNull() ||
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
- Handle(GEOM_Object) aBox = GetObjectImpl(theBox);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aBox = GetObjectImpl(theBox);
if (aShape.IsNull() || aBox.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)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
- Handle(GEOM_Object) aBox = GetObjectImpl(theBox);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aBox = GetObjectImpl(theBox);
if (aShape.IsNull() || aBox.IsNull() )
return aSeq._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
- Handle(GEOM_Object) aCheckShape = GetObjectImpl(theCheckShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aCheckShape = GetObjectImpl(theCheckShape);
if (aShape.IsNull() || aCheckShape.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)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
- Handle(GEOM_Object) aCheckShape = GetObjectImpl(theCheckShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aCheckShape = GetObjectImpl(theCheckShape);
if (aShape.IsNull() || aCheckShape.IsNull() )
return aGEOMObject._retn();
//Get Shapes On Shape
- Handle(GEOM_Object) anObject = GetOperations()->GetShapesOnShapeAsCompound
+ Handle(::GEOM_Object) anObject = GetOperations()->GetShapesOnShapeAsCompound
(aCheckShape,aShape, theShapeType,ShapeState(theState));
if (anObject.IsNull())
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
- Handle(GEOM_Object) aCheckShape = GetObjectImpl(theCheckShape);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aCheckShape = GetObjectImpl(theCheckShape);
if (aShape.IsNull() || aCheckShape.IsNull() )
return aSeq._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
- Handle(GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
+ Handle(::GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
+ Handle(::GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
if (aShapeWhere.IsNull() ||
aShapeWhat.IsNull()) return aGEOMObject._retn();
//Get Shapes in place of aShapeWhat
- Handle(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetInPlace(aShapeWhere, aShapeWhat);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
- Handle(GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
+ Handle(::GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
+ Handle(::GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
if (aShapeWhere.IsNull() ||
aShapeWhat.IsNull()) return aGEOMObject._retn();
//Get Shapes in place of aShapeWhat
- Handle(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetInPlaceOld(aShapeWhere, aShapeWhat);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
- Handle(GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
+ Handle(::GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
+ Handle(::GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
if (aShapeWhere.IsNull() ||
aShapeWhat.IsNull()) return aGEOMObject._retn();
//Get Shapes in place of aShapeWhat
- Handle(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetInPlaceByHistory(aShapeWhere, aShapeWhat);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
- Handle(GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
+ Handle(::GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
+ Handle(::GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
if (aShapeWhere.IsNull() ||
aShapeWhat.IsNull()) return aGEOMObject._retn();
//Get Shapes in place of aShapeWhat
- Handle(GEOM_Object) anObject =
+ Handle(::GEOM_Object) anObject =
GetOperations()->GetSame(aShapeWhere, aShapeWhat);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
//Get the reference objects
- Handle(GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
- Handle(GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
+ Handle(::GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
+ Handle(::GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
if (aShapeWhere.IsNull() ||
aShapeWhat.IsNull()) return aSeq._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) anEdge = GetObjectImpl(theEdge);
+ Handle(::GEOM_Object) anEdge = GetObjectImpl(theEdge);
if (anEdge.IsNull()) {
return aGEOMObject._retn();
}
//Get Shapes in place of aShapeWhat
- Handle(GEOM_Object) aNewEdge =
+ Handle(::GEOM_Object) aNewEdge =
GetOperations()->ExtendEdge(anEdge, theMin, theMax);
if (!GetOperations()->IsDone() || aNewEdge.IsNull()) {
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aFace = GetObjectImpl(theFace);
+ Handle(::GEOM_Object) aFace = GetObjectImpl(theFace);
if (aFace.IsNull()) {
return aGEOMObject._retn();
}
//Get Shapes in place of aShapeWhat
- Handle(GEOM_Object) aNewFace =
+ Handle(::GEOM_Object) aNewFace =
GetOperations()->ExtendFace(aFace, theUMin, theUMax, theVMin, theVMax);
if (!GetOperations()->IsDone() || aNewFace.IsNull()) {
GetOperations()->SetNotDone();
//Get the reference object
- Handle(GEOM_Object) aFace = GetObjectImpl(theFace);
+ Handle(::GEOM_Object) aFace = GetObjectImpl(theFace);
if (aFace.IsNull()) {
return aGEOMObject._retn();
}
//Get Shapes in place of aShapeWhat
- Handle(GEOM_Object) aNewFace = GetOperations()->MakeSurfaceFromFace(aFace);
+ Handle(::GEOM_Object) aNewFace = GetOperations()->MakeSurfaceFromFace(aFace);
if (!GetOperations()->IsDone() || aNewFace.IsNull()) {
return aGEOMObject._retn();
GetOperations()->SetNotDone();
//Get the reference objects
- Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
- Handle(GEOM_Object) aStartPoint = GetObjectImpl(theStartPoint);
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+ Handle(::GEOM_Object) aStartPoint = GetObjectImpl(theStartPoint);
if (aShape.IsNull() || aStartPoint.IsNull()) {
return aSeq._retn();
aSeq->length(aLength);
for (i = 1; i <= aLength; i++) {
- aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
+ }
+
+ return aSeq._retn();
+}
+
+//=============================================================================
+/*!
+ * GetSubShapesWithTolerance
+ */
+//=============================================================================
+GEOM::ListOfGO* GEOM_IShapesOperations_i::GetSubShapesWithTolerance
+ (GEOM::GEOM_Object_ptr theShape,
+ CORBA::Short theShapeType,
+ GEOM::comparison_condition theCondition,
+ CORBA::Double theTolerance)
+{
+ GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+ //Set a not done flag
+ GetOperations()->SetNotDone();
+
+ //Get the reference objects
+ Handle(::GEOM_Object) aShape = GetObjectImpl(theShape);
+
+ if (aShape.IsNull()) {
+ return aSeq._retn();
+ }
+
+ //Get Shapes On Shape
+ const GEOMUtils::ComparisonCondition aCondition =
+ ComparisonCondition(theCondition);
+ Handle(TColStd_HSequenceOfTransient) aHSeq =
+ GetOperations()->GetSubShapesWithTolerance
+ (aShape, theShapeType, aCondition, theTolerance);
+
+ if (!GetOperations()->IsDone() || aHSeq.IsNull())
+ return aSeq._retn();
+
+ const Standard_Integer aLength = aHSeq->Length();
+ Standard_Integer i;
+
+ aSeq->length(aLength);
+
+ for (i = 1; i <= aLength; i++) {
+ aSeq[i-1] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i)));
}
return aSeq._retn();
}
+
+//=============================================================================
+/*!
+ * MakeExtraction
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeExtraction
+ (GEOM::GEOM_Object_ptr theShape,
+ const GEOM::ListOfLong &theSubShapeIDs,
+ GEOM::GEOM_IShapesOperations::ExtractionStats_out theStats)
+{
+ GEOM::GEOM_Object_var aGEOMObject;
+
+ //Set a not done flag
+ theStats = new GEOM::GEOM_IShapesOperations::ExtractionStats;
+ GetOperations()->SetNotDone();
+
+ //Get the reference object
+ Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
+
+ if (aShape.IsNull()) {
+ return aGEOMObject._retn();
+ }
+
+ const int aNbIDs = theSubShapeIDs.length();
+
+ if (aNbIDs == 0) {
+ return aGEOMObject._retn();
+ }
+
+ int i;
+ Handle(TColStd_HArray1OfInteger) anArray =
+ new TColStd_HArray1OfInteger (1, aNbIDs);
+
+ for (i = 0; i < aNbIDs; i++) {
+ anArray->SetValue(i + 1, theSubShapeIDs[i]);
+ }
+
+ //Get Shapes in place of aShapeWhat
+ std::list<GEOMImpl_IShapesOperations::ExtractionStat> aStats;
+ Handle(GEOM_Object) aResult =
+ GetOperations()->MakeExtraction(aShape, anArray, aStats);
+
+ if (!GetOperations()->IsDone() || aResult.IsNull()) {
+ return aGEOMObject._retn();
+ }
+
+ // Convert statistics.
+ const int aNbStats = aStats.size();
+
+ theStats->length(aNbStats);
+
+ // fill the local CORBA array with values from lists
+ std::list<GEOMImpl_IShapesOperations::ExtractionStat>::const_iterator
+ anIt = aStats.begin();
+
+ for (i = 0; anIt != aStats.end(); i++, anIt++) {
+ GEOM::GEOM_IShapesOperations::ExtractionStat_var aResStat =
+ new GEOM::GEOM_IShapesOperations::ExtractionStat;
+
+ // Copy type
+ switch (anIt->type) {
+ case GEOMImpl_IShapesOperations::EST_Removed:
+ aResStat->type = GEOM::GEOM_IShapesOperations::EST_Removed;
+ break;
+ case GEOMImpl_IShapesOperations::EST_Modified:
+ aResStat->type = GEOM::GEOM_IShapesOperations::EST_Modified;
+ break;
+ case GEOMImpl_IShapesOperations::EST_Added:
+ aResStat->type = GEOM::GEOM_IShapesOperations::EST_Added;
+ break;
+ default:
+ break;
+ }
+
+ // Copy the list of IDs
+ std::list<Standard_Integer> aIDList = anIt->indices;
+ GEOM::ListOfLong_var aResIDList = new GEOM::ListOfLong;
+
+ aResIDList->length(aIDList.size());
+
+ std::list<Standard_Integer>::iterator anIDIt = aIDList.begin();
+ int j = 0;
+
+ for (; anIDIt != aIDList.end(); j++, anIDIt++) {
+ aResIDList[j] = *anIDIt;
+ }
+
+ aResStat->indices = aResIDList;
+
+ theStats[(_CORBA_ULong)i] = aResStat;
+ }
+
+ return GetObject(aResult);
+}