mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-03-16 03:51:27 +05:00
0020230: Memory performance improvement.
This commit is contained in:
parent
7141475d33
commit
3de8fc904f
@ -18,7 +18,7 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
#ifdef WNT
|
#ifdef WNT
|
||||||
#pragma warning( disable:4786 )
|
#pragma warning( disable:4786 )
|
||||||
#endif
|
#endif
|
||||||
@ -1245,8 +1245,10 @@ GEOM::GEOM_IGroupOperations_ptr GEOM_Gen_i::GetIGroupOperations(CORBA::Long theS
|
|||||||
GEOM::GEOM_Object_ptr GEOM_Gen_i::AddSubShape (GEOM::GEOM_Object_ptr theMainShape,
|
GEOM::GEOM_Object_ptr GEOM_Gen_i::AddSubShape (GEOM::GEOM_Object_ptr theMainShape,
|
||||||
const GEOM::ListOfLong& theIndices)
|
const GEOM::ListOfLong& theIndices)
|
||||||
{
|
{
|
||||||
if(theMainShape == NULL || theIndices.length() < 1) return GEOM::GEOM_Object::_nil();
|
if (CORBA::is_nil(theMainShape) || theIndices.length() < 1)
|
||||||
Handle(GEOM_Object) aMainsShape = _impl->GetObject(theMainShape->GetStudyID(), theMainShape->GetEntry());
|
return GEOM::GEOM_Object::_nil();
|
||||||
|
CORBA::String_var entry = theMainShape->GetEntry();
|
||||||
|
Handle(GEOM_Object) aMainsShape = _impl->GetObject(theMainShape->GetStudyID(), entry);
|
||||||
if (aMainsShape.IsNull()) return GEOM::GEOM_Object::_nil();
|
if (aMainsShape.IsNull()) return GEOM::GEOM_Object::_nil();
|
||||||
|
|
||||||
Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1, theIndices.length());
|
Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1, theIndices.length());
|
||||||
@ -1306,7 +1308,7 @@ GEOM::GEOM_Object_ptr GEOM_Gen_i::GetObject (CORBA::Long theStudyID, const char*
|
|||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var obj;
|
GEOM::GEOM_Object_var obj;
|
||||||
Handle(GEOM_Object) handle_object = _impl->GetObject(theStudyID, (char*)theEntry);
|
Handle(GEOM_Object) handle_object = _impl->GetObject(theStudyID, (char*)theEntry);
|
||||||
if (handle_object.IsNull()) return NULL;
|
if (handle_object.IsNull()) return obj._retn();
|
||||||
|
|
||||||
TCollection_AsciiString stringIOR = handle_object->GetIOR();
|
TCollection_AsciiString stringIOR = handle_object->GetIOR();
|
||||||
if (stringIOR.Length() > 1) {
|
if (stringIOR.Length() > 1) {
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
#include <Standard_Stream.hxx>
|
#include <Standard_Stream.hxx>
|
||||||
|
|
||||||
#include "GEOM_IBlocksOperations_i.hh"
|
#include "GEOM_IBlocksOperations_i.hh"
|
||||||
@ -71,18 +71,11 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeQuad
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theEdge1 == NULL || theEdge2 == NULL ||
|
|
||||||
theEdge3 == NULL || theEdge4 == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference edges
|
//Get the reference edges
|
||||||
Handle(GEOM_Object) anEdge1 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) anEdge1 = GetObjectImpl(theEdge1);
|
||||||
(theEdge1->GetStudyID(), theEdge1->GetEntry());
|
Handle(GEOM_Object) anEdge2 = GetObjectImpl(theEdge2);
|
||||||
Handle(GEOM_Object) anEdge2 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) anEdge3 = GetObjectImpl(theEdge3);
|
||||||
(theEdge2->GetStudyID(), theEdge2->GetEntry());
|
Handle(GEOM_Object) anEdge4 = GetObjectImpl(theEdge4);
|
||||||
Handle(GEOM_Object) anEdge3 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theEdge3->GetStudyID(), theEdge3->GetEntry());
|
|
||||||
Handle(GEOM_Object) anEdge4 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theEdge4->GetStudyID(), theEdge4->GetEntry());
|
|
||||||
|
|
||||||
if (anEdge1.IsNull() || anEdge2.IsNull() ||
|
if (anEdge1.IsNull() || anEdge2.IsNull() ||
|
||||||
anEdge3.IsNull() || anEdge4.IsNull()) return aGEOMObject._retn();
|
anEdge3.IsNull() || anEdge4.IsNull()) return aGEOMObject._retn();
|
||||||
@ -109,13 +102,9 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeQuad2Edges
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theEdge1 == NULL || theEdge2 == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference edges
|
//Get the reference edges
|
||||||
Handle(GEOM_Object) anEdge1 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) anEdge1 = GetObjectImpl(theEdge1);
|
||||||
(theEdge1->GetStudyID(), theEdge1->GetEntry());
|
Handle(GEOM_Object) anEdge2 = GetObjectImpl(theEdge2);
|
||||||
Handle(GEOM_Object) anEdge2 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theEdge2->GetStudyID(), theEdge2->GetEntry());
|
|
||||||
|
|
||||||
if (anEdge1.IsNull() || anEdge2.IsNull()) return aGEOMObject._retn();
|
if (anEdge1.IsNull() || anEdge2.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
@ -142,18 +131,11 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeQuad4Vertices
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (thePnt1 == NULL || thePnt2 == NULL ||
|
|
||||||
thePnt3 == NULL || thePnt4 == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference points
|
//Get the reference points
|
||||||
Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
|
||||||
(thePnt1->GetStudyID(), thePnt1->GetEntry());
|
Handle(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
|
||||||
Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
|
||||||
(thePnt2->GetStudyID(), thePnt2->GetEntry());
|
Handle(GEOM_Object) aPnt4 = GetObjectImpl(thePnt4);
|
||||||
Handle(GEOM_Object) aPnt3 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(thePnt3->GetStudyID(), thePnt3->GetEntry());
|
|
||||||
Handle(GEOM_Object) aPnt4 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(thePnt4->GetStudyID(), thePnt4->GetEntry());
|
|
||||||
|
|
||||||
if (aPnt1.IsNull() || aPnt2.IsNull() ||
|
if (aPnt1.IsNull() || aPnt2.IsNull() ||
|
||||||
aPnt3.IsNull() || aPnt4.IsNull()) return aGEOMObject._retn();
|
aPnt3.IsNull() || aPnt4.IsNull()) return aGEOMObject._retn();
|
||||||
@ -182,23 +164,13 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeHexa
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theFace1 == NULL || theFace2 == NULL ||
|
|
||||||
theFace3 == NULL || theFace4 == NULL ||
|
|
||||||
theFace5 == NULL || theFace6 == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference Faces
|
//Get the reference Faces
|
||||||
Handle(GEOM_Object) anFace1 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) anFace1 = GetObjectImpl(theFace1);
|
||||||
(theFace1->GetStudyID(), theFace1->GetEntry());
|
Handle(GEOM_Object) anFace2 = GetObjectImpl(theFace2);
|
||||||
Handle(GEOM_Object) anFace2 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) anFace3 = GetObjectImpl(theFace3);
|
||||||
(theFace2->GetStudyID(), theFace2->GetEntry());
|
Handle(GEOM_Object) anFace4 = GetObjectImpl(theFace4);
|
||||||
Handle(GEOM_Object) anFace3 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) anFace5 = GetObjectImpl(theFace5);
|
||||||
(theFace3->GetStudyID(), theFace3->GetEntry());
|
Handle(GEOM_Object) anFace6 = GetObjectImpl(theFace6);
|
||||||
Handle(GEOM_Object) anFace4 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theFace4->GetStudyID(), theFace4->GetEntry());
|
|
||||||
Handle(GEOM_Object) anFace5 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theFace5->GetStudyID(), theFace5->GetEntry());
|
|
||||||
Handle(GEOM_Object) anFace6 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theFace6->GetStudyID(), theFace6->GetEntry());
|
|
||||||
|
|
||||||
if (anFace1.IsNull() || anFace2.IsNull() ||
|
if (anFace1.IsNull() || anFace2.IsNull() ||
|
||||||
anFace3.IsNull() || anFace4.IsNull() ||
|
anFace3.IsNull() || anFace4.IsNull() ||
|
||||||
@ -226,13 +198,9 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeHexa2Faces
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theFace1 == NULL || theFace2 == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference Faces
|
//Get the reference Faces
|
||||||
Handle(GEOM_Object) anFace1 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) anFace1 = GetObjectImpl(theFace1);
|
||||||
(theFace1->GetStudyID(), theFace1->GetEntry());
|
Handle(GEOM_Object) anFace2 = GetObjectImpl(theFace2);
|
||||||
Handle(GEOM_Object) anFace2 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theFace2->GetStudyID(), theFace2->GetEntry());
|
|
||||||
|
|
||||||
if (anFace1.IsNull() || anFace2.IsNull()) return aGEOMObject._retn();
|
if (anFace1.IsNull() || anFace2.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
@ -258,12 +226,8 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeBlockCompound
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theCompound == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference Compound
|
//Get the reference Compound
|
||||||
Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aCompound = GetObjectImpl(theCompound);
|
||||||
(theCompound->GetStudyID(), theCompound->GetEntry());
|
|
||||||
|
|
||||||
if (aCompound.IsNull()) return aGEOMObject._retn();
|
if (aCompound.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Create the Blocks Compound
|
//Create the Blocks Compound
|
||||||
@ -291,12 +255,8 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetPoint (GEOM::GEOM_Object_ptr
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference Objects
|
//Get the reference Objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull()) return aGEOMObject._retn();
|
if (aShape.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Create the Point
|
//Create the Point
|
||||||
@ -322,16 +282,10 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetEdge (GEOM::GEOM_Object_ptr t
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL ||
|
|
||||||
thePoint1 == NULL || thePoint2 == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference Objects
|
//Get the reference Objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
|
||||||
Handle(GEOM_Object) aPoint1 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
|
||||||
(thePoint1->GetStudyID(), thePoint1->GetEntry());
|
|
||||||
Handle(GEOM_Object) aPoint2 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(thePoint2->GetStudyID(), thePoint2->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() ||
|
if (aShape.IsNull() ||
|
||||||
aPoint1.IsNull() || aPoint2.IsNull()) return aGEOMObject._retn();
|
aPoint1.IsNull() || aPoint2.IsNull()) return aGEOMObject._retn();
|
||||||
@ -358,13 +312,9 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetEdgeNearPoint (GEOM::GEOM_Obj
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL || thePoint == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference Objects
|
//Get the reference Objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) aPoint = GetObjectImpl(thePoint);
|
||||||
Handle(GEOM_Object) aPoint = GetOperations()->GetEngine()->GetObject
|
|
||||||
(thePoint->GetStudyID(), thePoint->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() || aPoint.IsNull()) return aGEOMObject._retn();
|
if (aShape.IsNull() || aPoint.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
@ -394,21 +344,12 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetFaceByPoints
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL ||
|
|
||||||
thePoint1 == NULL || thePoint2 == NULL ||
|
|
||||||
thePoint3 == NULL || thePoint4 == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference Objects
|
//Get the reference Objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
|
||||||
Handle(GEOM_Object) aPoint1 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
|
||||||
(thePoint1->GetStudyID(), thePoint1->GetEntry());
|
Handle(GEOM_Object) aPoint3 = GetObjectImpl(thePoint3);
|
||||||
Handle(GEOM_Object) aPoint2 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aPoint4 = GetObjectImpl(thePoint4);
|
||||||
(thePoint2->GetStudyID(), thePoint2->GetEntry());
|
|
||||||
Handle(GEOM_Object) aPoint3 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(thePoint3->GetStudyID(), thePoint3->GetEntry());
|
|
||||||
Handle(GEOM_Object) aPoint4 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(thePoint4->GetStudyID(), thePoint4->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() ||
|
if (aShape.IsNull() ||
|
||||||
aPoint1.IsNull() || aPoint2.IsNull() ||
|
aPoint1.IsNull() || aPoint2.IsNull() ||
|
||||||
@ -438,16 +379,10 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetFaceByEdges
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL ||
|
|
||||||
theEdge1 == NULL || theEdge2 == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference Objects
|
//Get the reference Objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) anEdge1 = GetObjectImpl(theEdge1);
|
||||||
Handle(GEOM_Object) anEdge1 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) anEdge2 = GetObjectImpl(theEdge2);
|
||||||
(theEdge1->GetStudyID(), theEdge1->GetEntry());
|
|
||||||
Handle(GEOM_Object) anEdge2 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theEdge2->GetStudyID(), theEdge2->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() ||
|
if (aShape.IsNull() ||
|
||||||
anEdge1.IsNull() || anEdge2.IsNull()) return aGEOMObject._retn();
|
anEdge1.IsNull() || anEdge2.IsNull()) return aGEOMObject._retn();
|
||||||
@ -474,13 +409,9 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetOppositeFace (GEOM::GEOM_Obje
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL || theFace == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference Objects
|
//Get the reference Objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) aFace = GetObjectImpl(theFace);
|
||||||
Handle(GEOM_Object) aFace = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theFace->GetStudyID(), theFace->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() || aFace.IsNull()) return aGEOMObject._retn();
|
if (aShape.IsNull() || aFace.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
@ -506,13 +437,9 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetFaceNearPoint (GEOM::GEOM_Obj
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL || thePoint == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference Objects
|
//Get the reference Objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) aPoint = GetObjectImpl(thePoint);
|
||||||
Handle(GEOM_Object) aPoint = GetOperations()->GetEngine()->GetObject
|
|
||||||
(thePoint->GetStudyID(), thePoint->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() || aPoint.IsNull()) return aGEOMObject._retn();
|
if (aShape.IsNull() || aPoint.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
@ -538,13 +465,9 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetFaceByNormale (GEOM::GEOM_Obj
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL || theVector == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference Objects
|
//Get the reference Objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) aVector = GetObjectImpl(theVector);
|
||||||
Handle(GEOM_Object) aVector = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theVector->GetStudyID(), theVector->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() || aVector.IsNull()) return aGEOMObject._retn();
|
if (aShape.IsNull() || aVector.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
@ -572,12 +495,8 @@ GEOM::ListOfGO* GEOM_IBlocksOperations_i::ExplodeCompoundOfBlocks
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theCompound == NULL) return aSeq._retn();
|
|
||||||
|
|
||||||
//Get the reference Compound
|
//Get the reference Compound
|
||||||
Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aCompound = GetObjectImpl(theCompound);
|
||||||
(theCompound->GetStudyID(), theCompound->GetEntry());
|
|
||||||
|
|
||||||
if (aCompound.IsNull()) return aSeq._retn();
|
if (aCompound.IsNull()) return aSeq._retn();
|
||||||
|
|
||||||
//Explode
|
//Explode
|
||||||
@ -611,12 +530,8 @@ CORBA::Boolean GEOM_IBlocksOperations_i::IsCompoundOfBlocks
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theCompound == NULL) return isComp;
|
|
||||||
|
|
||||||
//Get the reference Compound
|
//Get the reference Compound
|
||||||
Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aCompound = GetObjectImpl(theCompound);
|
||||||
(theCompound->GetStudyID(), theCompound->GetEntry());
|
|
||||||
|
|
||||||
if (aCompound.IsNull()) return isComp;
|
if (aCompound.IsNull()) return isComp;
|
||||||
|
|
||||||
//Check
|
//Check
|
||||||
@ -646,12 +561,8 @@ CORBA::Boolean GEOM_IBlocksOperations_i::CheckCompoundOfBlocks
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theCompound == NULL) return isComp;
|
|
||||||
|
|
||||||
//Get the reference Compound
|
//Get the reference Compound
|
||||||
Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aCompound = GetObjectImpl(theCompound);
|
||||||
(theCompound->GetStudyID(), theCompound->GetEntry());
|
|
||||||
|
|
||||||
if (aCompound.IsNull()) return isComp;
|
if (aCompound.IsNull()) return isComp;
|
||||||
|
|
||||||
//Check
|
//Check
|
||||||
@ -725,9 +636,7 @@ char* GEOM_IBlocksOperations_i::PrintBCErrors
|
|||||||
const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors)
|
const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors)
|
||||||
{
|
{
|
||||||
//Get the reference Compound
|
//Get the reference Compound
|
||||||
if (theCompound == NULL) return NULL;
|
Handle(GEOM_Object) aCompound = GetObjectImpl(theCompound);
|
||||||
Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theCompound->GetStudyID(), theCompound->GetEntry());
|
|
||||||
if (aCompound.IsNull()) return NULL;
|
if (aCompound.IsNull()) return NULL;
|
||||||
|
|
||||||
// Convert the errors sequence
|
// Convert the errors sequence
|
||||||
@ -785,12 +694,8 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::RemoveExtraEdges (GEOM::GEOM_Obj
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference Objects
|
//Get the reference Objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull()) return aGEOMObject._retn();
|
if (aShape.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the result
|
//Get the result
|
||||||
@ -814,12 +719,8 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::CheckAndImprove (GEOM::GEOM_Obje
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theCompound == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference Objects
|
//Get the reference Objects
|
||||||
Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aCompound = GetObjectImpl(theCompound);
|
||||||
(theCompound->GetStudyID(), theCompound->GetEntry());
|
|
||||||
|
|
||||||
if (aCompound.IsNull()) return aGEOMObject._retn();
|
if (aCompound.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the result
|
//Get the result
|
||||||
@ -844,13 +745,9 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetBlockNearPoint (GEOM::GEOM_Ob
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theCompound == NULL || thePoint == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference Objects
|
//Get the reference Objects
|
||||||
Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aCompound = GetObjectImpl(theCompound);
|
||||||
(theCompound->GetStudyID(), theCompound->GetEntry());
|
Handle(GEOM_Object) aPoint = GetObjectImpl(thePoint);
|
||||||
Handle(GEOM_Object) aPoint = GetOperations()->GetEngine()->GetObject
|
|
||||||
(thePoint->GetStudyID(), thePoint->GetEntry());
|
|
||||||
|
|
||||||
if (aCompound.IsNull() || aPoint.IsNull()) return aGEOMObject._retn();
|
if (aCompound.IsNull() || aPoint.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
@ -876,12 +773,8 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetBlockByParts (GEOM::GEOM_Obje
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theCompound == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference Compound
|
//Get the reference Compound
|
||||||
Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aCompound = GetObjectImpl(theCompound);
|
||||||
(theCompound->GetStudyID(), theCompound->GetEntry());
|
|
||||||
|
|
||||||
if (aCompound.IsNull()) return aGEOMObject._retn();
|
if (aCompound.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the parts
|
//Get the parts
|
||||||
@ -890,9 +783,7 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetBlockByParts (GEOM::GEOM_Obje
|
|||||||
|
|
||||||
aLen = theParts.length();
|
aLen = theParts.length();
|
||||||
for (ind = 0; ind < aLen; ind++) {
|
for (ind = 0; ind < aLen; ind++) {
|
||||||
if (theParts[ind] == NULL) return aGEOMObject._retn();
|
Handle(GEOM_Object) aSh = GetObjectImpl(theParts[ind]);
|
||||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theParts[ind]->GetStudyID(), theParts[ind]->GetEntry());
|
|
||||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||||
aParts->Append(aSh);
|
aParts->Append(aSh);
|
||||||
}
|
}
|
||||||
@ -919,12 +810,8 @@ GEOM::ListOfGO* GEOM_IBlocksOperations_i::GetBlocksByParts (GEOM::GEOM_Object_pt
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theCompound == NULL) return aSeq._retn();
|
|
||||||
|
|
||||||
//Get the reference Compound
|
//Get the reference Compound
|
||||||
Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aCompound = GetObjectImpl(theCompound);
|
||||||
(theCompound->GetStudyID(), theCompound->GetEntry());
|
|
||||||
|
|
||||||
if (aCompound.IsNull()) return aSeq._retn();
|
if (aCompound.IsNull()) return aSeq._retn();
|
||||||
|
|
||||||
//Get the parts
|
//Get the parts
|
||||||
@ -933,9 +820,7 @@ GEOM::ListOfGO* GEOM_IBlocksOperations_i::GetBlocksByParts (GEOM::GEOM_Object_pt
|
|||||||
|
|
||||||
aLen = theParts.length();
|
aLen = theParts.length();
|
||||||
for (ind = 0; ind < aLen; ind++) {
|
for (ind = 0; ind < aLen; ind++) {
|
||||||
if (theParts[ind] == NULL) return aSeq._retn();
|
Handle(GEOM_Object) aSh = GetObjectImpl(theParts[ind]);
|
||||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theParts[ind]->GetStudyID(), theParts[ind]->GetEntry());
|
|
||||||
if (aSh.IsNull()) return aSeq._retn();
|
if (aSh.IsNull()) return aSeq._retn();
|
||||||
aParts->Append(aSh);
|
aParts->Append(aSh);
|
||||||
}
|
}
|
||||||
@ -970,12 +855,8 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeMultiTransformation1D
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theBlock == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the object itself and the vector of translation
|
//Get the object itself and the vector of translation
|
||||||
Handle(GEOM_Object) aBasicObject = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theBlock);
|
||||||
(theBlock->GetStudyID(), theBlock->GetEntry());
|
|
||||||
|
|
||||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the transformation
|
//Perform the transformation
|
||||||
@ -1005,12 +886,8 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeMultiTransformation2D
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theBlock == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
Handle(GEOM_Object) aBasicObject = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theBlock);
|
||||||
(theBlock->GetStudyID(), theBlock->GetEntry());
|
|
||||||
|
|
||||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the transformation
|
//Perform the transformation
|
||||||
@ -1035,12 +912,8 @@ GEOM::ListOfGO* GEOM_IBlocksOperations_i::Propagate (GEOM::GEOM_Object_ptr theSh
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL) return aSeq._retn();
|
|
||||||
|
|
||||||
//Get the reference Shape
|
//Get the reference Shape
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull()) return aSeq._retn();
|
if (aShape.IsNull()) return aSeq._retn();
|
||||||
|
|
||||||
//Get the Propagation chains
|
//Get the Propagation chains
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
#include <Standard_Stream.hxx>
|
#include <Standard_Stream.hxx>
|
||||||
|
|
||||||
#include "GEOM_IBooleanOperations_i.hh"
|
#include "GEOM_IBooleanOperations_i.hh"
|
||||||
@ -70,15 +70,9 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakeBoolean
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape1 == NULL || theShape2 == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference shapes
|
//Get the reference shapes
|
||||||
CORBA::String_var entry=theShape1->GetEntry();
|
Handle(GEOM_Object) aSh1 = GetObjectImpl(theShape1);
|
||||||
Handle(GEOM_Object) aSh1 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aSh2 = GetObjectImpl(theShape2);
|
||||||
(theShape1->GetStudyID(), entry);
|
|
||||||
entry=theShape2->GetEntry();
|
|
||||||
Handle(GEOM_Object) aSh2 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theShape2->GetStudyID(), entry);
|
|
||||||
|
|
||||||
if (aSh1.IsNull() || aSh2.IsNull()) return aGEOMObject._retn();
|
if (aSh1.IsNull() || aSh2.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
@ -120,9 +114,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartition
|
|||||||
//Get the shapes
|
//Get the shapes
|
||||||
aLen = theShapes.length();
|
aLen = theShapes.length();
|
||||||
for (ind = 0; ind < aLen; ind++) {
|
for (ind = 0; ind < aLen; ind++) {
|
||||||
if (theShapes[ind] == NULL) return aGEOMObject._retn();
|
Handle(GEOM_Object) aSh = GetObjectImpl(theShapes[ind]);
|
||||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theShapes[ind]->GetStudyID(), theShapes[ind]->GetEntry());
|
|
||||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||||
aShapes->Append(aSh);
|
aShapes->Append(aSh);
|
||||||
}
|
}
|
||||||
@ -130,9 +122,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartition
|
|||||||
//Get the tools
|
//Get the tools
|
||||||
aLen = theTools.length();
|
aLen = theTools.length();
|
||||||
for (ind = 0; ind < aLen; ind++) {
|
for (ind = 0; ind < aLen; ind++) {
|
||||||
if (theTools[ind] == NULL) return aGEOMObject._retn();
|
Handle(GEOM_Object) aSh = GetObjectImpl(theTools[ind]);
|
||||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theTools[ind]->GetStudyID(), theTools[ind]->GetEntry());
|
|
||||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||||
aTools->Append(aSh);
|
aTools->Append(aSh);
|
||||||
}
|
}
|
||||||
@ -140,9 +130,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartition
|
|||||||
//Get the keep inside shapes
|
//Get the keep inside shapes
|
||||||
aLen = theKeepIns.length();
|
aLen = theKeepIns.length();
|
||||||
for (ind = 0; ind < aLen; ind++) {
|
for (ind = 0; ind < aLen; ind++) {
|
||||||
if (theKeepIns[ind] == NULL) return aGEOMObject._retn();
|
Handle(GEOM_Object) aSh = GetObjectImpl(theKeepIns[ind]);
|
||||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theKeepIns[ind]->GetStudyID(), theKeepIns[ind]->GetEntry());
|
|
||||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||||
aKeepIns->Append(aSh);
|
aKeepIns->Append(aSh);
|
||||||
}
|
}
|
||||||
@ -150,9 +138,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartition
|
|||||||
//Get the remove inside shapes
|
//Get the remove inside shapes
|
||||||
aLen = theRemoveIns.length();
|
aLen = theRemoveIns.length();
|
||||||
for (ind = 0; ind < aLen; ind++) {
|
for (ind = 0; ind < aLen; ind++) {
|
||||||
if (theRemoveIns[ind] == NULL) return aGEOMObject._retn();
|
Handle(GEOM_Object) aSh = GetObjectImpl(theRemoveIns[ind]);
|
||||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theRemoveIns[ind]->GetStudyID(), theRemoveIns[ind]->GetEntry());
|
|
||||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||||
aRemIns->Append(aSh);
|
aRemIns->Append(aSh);
|
||||||
}
|
}
|
||||||
@ -208,9 +194,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartitionNonSelfIntersected
|
|||||||
//Get the shapes
|
//Get the shapes
|
||||||
aLen = theShapes.length();
|
aLen = theShapes.length();
|
||||||
for (ind = 0; ind < aLen; ind++) {
|
for (ind = 0; ind < aLen; ind++) {
|
||||||
if (theShapes[ind] == NULL) return aGEOMObject._retn();
|
Handle(GEOM_Object) aSh = GetObjectImpl(theShapes[ind]);
|
||||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theShapes[ind]->GetStudyID(), theShapes[ind]->GetEntry());
|
|
||||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||||
aShapes->Append(aSh);
|
aShapes->Append(aSh);
|
||||||
}
|
}
|
||||||
@ -218,9 +202,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartitionNonSelfIntersected
|
|||||||
//Get the tools
|
//Get the tools
|
||||||
aLen = theTools.length();
|
aLen = theTools.length();
|
||||||
for (ind = 0; ind < aLen; ind++) {
|
for (ind = 0; ind < aLen; ind++) {
|
||||||
if (theTools[ind] == NULL) return aGEOMObject._retn();
|
Handle(GEOM_Object) aSh = GetObjectImpl(theTools[ind]);
|
||||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theTools[ind]->GetStudyID(), theTools[ind]->GetEntry());
|
|
||||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||||
aTools->Append(aSh);
|
aTools->Append(aSh);
|
||||||
}
|
}
|
||||||
@ -228,9 +210,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartitionNonSelfIntersected
|
|||||||
//Get the keep inside shapes
|
//Get the keep inside shapes
|
||||||
aLen = theKeepIns.length();
|
aLen = theKeepIns.length();
|
||||||
for (ind = 0; ind < aLen; ind++) {
|
for (ind = 0; ind < aLen; ind++) {
|
||||||
if (theKeepIns[ind] == NULL) return aGEOMObject._retn();
|
Handle(GEOM_Object) aSh = GetObjectImpl(theKeepIns[ind]);
|
||||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theKeepIns[ind]->GetStudyID(), theKeepIns[ind]->GetEntry());
|
|
||||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||||
aKeepIns->Append(aSh);
|
aKeepIns->Append(aSh);
|
||||||
}
|
}
|
||||||
@ -238,9 +218,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartitionNonSelfIntersected
|
|||||||
//Get the remove inside shapes
|
//Get the remove inside shapes
|
||||||
aLen = theRemoveIns.length();
|
aLen = theRemoveIns.length();
|
||||||
for (ind = 0; ind < aLen; ind++) {
|
for (ind = 0; ind < aLen; ind++) {
|
||||||
if (theRemoveIns[ind] == NULL) return aGEOMObject._retn();
|
Handle(GEOM_Object) aSh = GetObjectImpl(theRemoveIns[ind]);
|
||||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theRemoveIns[ind]->GetStudyID(), theRemoveIns[ind]->GetEntry());
|
|
||||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||||
aRemIns->Append(aSh);
|
aRemIns->Append(aSh);
|
||||||
}
|
}
|
||||||
@ -280,13 +258,9 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakeHalfPartition
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL || thePlane == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference shapes
|
//Get the reference shapes
|
||||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aSh = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) aPl = GetObjectImpl(thePlane);
|
||||||
Handle(GEOM_Object) aPl = GetOperations()->GetEngine()->GetObject
|
|
||||||
(thePlane->GetStudyID(), thePlane->GetEntry());
|
|
||||||
|
|
||||||
if (aSh.IsNull() || aPl.IsNull()) return aGEOMObject._retn();
|
if (aSh.IsNull() || aPl.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
#include <Standard_Stream.hxx>
|
#include <Standard_Stream.hxx>
|
||||||
|
|
||||||
#include "GEOM_ICurvesOperations_i.hh"
|
#include "GEOM_ICurvesOperations_i.hh"
|
||||||
@ -74,13 +74,11 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeCirclePntVecR
|
|||||||
//Get the arguments
|
//Get the arguments
|
||||||
Handle(GEOM_Object) aPnt, aVec;
|
Handle(GEOM_Object) aPnt, aVec;
|
||||||
if (!CORBA::is_nil(thePnt)) {
|
if (!CORBA::is_nil(thePnt)) {
|
||||||
aPnt = GetOperations()->GetEngine()->GetObject
|
aPnt = GetObjectImpl(thePnt);
|
||||||
(thePnt->GetStudyID(), thePnt->GetEntry());
|
|
||||||
if (aPnt.IsNull()) return aGEOMObject._retn();
|
if (aPnt.IsNull()) return aGEOMObject._retn();
|
||||||
}
|
}
|
||||||
if (!CORBA::is_nil(theVec)) {
|
if (!CORBA::is_nil(theVec)) {
|
||||||
aVec = GetOperations()->GetEngine()->GetObject
|
aVec = GetObjectImpl(theVec);
|
||||||
(theVec->GetStudyID(), theVec->GetEntry());
|
|
||||||
if (aVec.IsNull()) return aGEOMObject._retn();
|
if (aVec.IsNull()) return aGEOMObject._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,15 +105,10 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeCircleThreePnt
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (thePnt1 == NULL || thePnt2 == NULL || thePnt3 == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference points
|
//Get the reference points
|
||||||
Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
|
||||||
(thePnt1->GetStudyID(), thePnt1->GetEntry());
|
Handle(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
|
||||||
Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
|
||||||
(thePnt2->GetStudyID(), thePnt2->GetEntry());
|
|
||||||
Handle(GEOM_Object) aPnt3 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(thePnt3->GetStudyID(), thePnt3->GetEntry());
|
|
||||||
|
|
||||||
if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
|
if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
@ -142,15 +135,10 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeCircleCenter2Pnt
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (thePnt1 == NULL || thePnt2 == NULL || thePnt3 == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference points
|
//Get the reference points
|
||||||
Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
|
||||||
(thePnt1->GetStudyID(), thePnt1->GetEntry());
|
Handle(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
|
||||||
Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
|
||||||
(thePnt2->GetStudyID(), thePnt2->GetEntry());
|
|
||||||
Handle(GEOM_Object) aPnt3 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(thePnt3->GetStudyID(), thePnt3->GetEntry());
|
|
||||||
|
|
||||||
if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
|
if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
@ -183,13 +171,11 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeEllipse
|
|||||||
//Get the arguments
|
//Get the arguments
|
||||||
Handle(GEOM_Object) aPnt, aVec, aVecMaj;
|
Handle(GEOM_Object) aPnt, aVec, aVecMaj;
|
||||||
if (!CORBA::is_nil(thePnt)) {
|
if (!CORBA::is_nil(thePnt)) {
|
||||||
aPnt = GetOperations()->GetEngine()->GetObject
|
aPnt = GetObjectImpl(thePnt);
|
||||||
(thePnt->GetStudyID(), thePnt->GetEntry());
|
|
||||||
if (aPnt.IsNull()) return aGEOMObject._retn();
|
if (aPnt.IsNull()) return aGEOMObject._retn();
|
||||||
}
|
}
|
||||||
if (!CORBA::is_nil(theVec)) {
|
if (!CORBA::is_nil(theVec)) {
|
||||||
aVec = GetOperations()->GetEngine()->GetObject
|
aVec = GetObjectImpl(theVec);
|
||||||
(theVec->GetStudyID(), theVec->GetEntry());
|
|
||||||
if (aVec.IsNull()) return aGEOMObject._retn();
|
if (aVec.IsNull()) return aGEOMObject._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,18 +211,15 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeEllipseVec
|
|||||||
//Get the arguments
|
//Get the arguments
|
||||||
Handle(GEOM_Object) aPnt, aVec, aVecMaj;
|
Handle(GEOM_Object) aPnt, aVec, aVecMaj;
|
||||||
if (!CORBA::is_nil(thePnt)) {
|
if (!CORBA::is_nil(thePnt)) {
|
||||||
aPnt = GetOperations()->GetEngine()->GetObject
|
aPnt = GetObjectImpl(thePnt);
|
||||||
(thePnt->GetStudyID(), thePnt->GetEntry());
|
|
||||||
if (aPnt.IsNull()) return aGEOMObject._retn();
|
if (aPnt.IsNull()) return aGEOMObject._retn();
|
||||||
}
|
}
|
||||||
if (!CORBA::is_nil(theVec)) {
|
if (!CORBA::is_nil(theVec)) {
|
||||||
aVec = GetOperations()->GetEngine()->GetObject
|
aVec = GetObjectImpl(theVec);
|
||||||
(theVec->GetStudyID(), theVec->GetEntry());
|
|
||||||
if (aVec.IsNull()) return aGEOMObject._retn();
|
if (aVec.IsNull()) return aGEOMObject._retn();
|
||||||
}
|
}
|
||||||
if (!CORBA::is_nil(theVecMaj)) {
|
if (!CORBA::is_nil(theVecMaj)) {
|
||||||
aVecMaj = GetOperations()->GetEngine()->GetObject
|
aVecMaj = GetObjectImpl(theVecMaj);
|
||||||
(theVecMaj->GetStudyID(), theVecMaj->GetEntry());
|
|
||||||
if (aVecMaj.IsNull()) return aGEOMObject._retn();
|
if (aVecMaj.IsNull()) return aGEOMObject._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,15 +247,10 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeArc
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (thePnt1 == NULL || thePnt2 == NULL || thePnt3 == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference points
|
//Get the reference points
|
||||||
Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
|
||||||
(thePnt1->GetStudyID(), thePnt1->GetEntry());
|
Handle(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
|
||||||
Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
|
||||||
(thePnt2->GetStudyID(), thePnt2->GetEntry());
|
|
||||||
Handle(GEOM_Object) aPnt3 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(thePnt3->GetStudyID(), thePnt3->GetEntry());
|
|
||||||
|
|
||||||
if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
|
if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
@ -302,15 +280,10 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeArcCenter
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (thePnt1 == NULL || thePnt2 == NULL || thePnt3 == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference points
|
//Get the reference points
|
||||||
Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
|
||||||
(thePnt1->GetStudyID(), thePnt1->GetEntry());
|
Handle(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
|
||||||
Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
|
||||||
(thePnt2->GetStudyID(), thePnt2->GetEntry());
|
|
||||||
Handle(GEOM_Object) aPnt3 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(thePnt3->GetStudyID(), thePnt3->GetEntry());
|
|
||||||
|
|
||||||
if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
|
if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
@ -338,15 +311,10 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeArcOfEllipse
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (thePnt1 == NULL || thePnt2 == NULL || thePnt3 == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference points
|
//Get the reference points
|
||||||
Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
|
||||||
(thePnt1->GetStudyID(), thePnt1->GetEntry());
|
Handle(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
|
||||||
Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
|
||||||
(thePnt2->GetStudyID(), thePnt2->GetEntry());
|
|
||||||
Handle(GEOM_Object) aPnt3 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(thePnt3->GetStudyID(), thePnt3->GetEntry());
|
|
||||||
|
|
||||||
if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
|
if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
@ -377,11 +345,7 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakePolyline
|
|||||||
int aLen = thePoints.length();
|
int aLen = thePoints.length();
|
||||||
list<Handle(GEOM_Object)> aPoints;
|
list<Handle(GEOM_Object)> aPoints;
|
||||||
for (; ind < aLen; ind++) {
|
for (; ind < aLen; ind++) {
|
||||||
if (thePoints[ind] == NULL) return aGEOMObject._retn();
|
Handle(GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]);
|
||||||
|
|
||||||
Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject
|
|
||||||
(thePoints[ind]->GetStudyID(), thePoints[ind]->GetEntry());
|
|
||||||
|
|
||||||
if (aPnt.IsNull()) return aGEOMObject._retn();
|
if (aPnt.IsNull()) return aGEOMObject._retn();
|
||||||
aPoints.push_back(aPnt);
|
aPoints.push_back(aPnt);
|
||||||
}
|
}
|
||||||
@ -413,11 +377,7 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSplineBezier
|
|||||||
int aLen = thePoints.length();
|
int aLen = thePoints.length();
|
||||||
list<Handle(GEOM_Object)> aPoints;
|
list<Handle(GEOM_Object)> aPoints;
|
||||||
for (; ind < aLen; ind++) {
|
for (; ind < aLen; ind++) {
|
||||||
if (thePoints[ind] == NULL) return aGEOMObject._retn();
|
Handle(GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]);
|
||||||
|
|
||||||
Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject
|
|
||||||
(thePoints[ind]->GetStudyID(), thePoints[ind]->GetEntry());
|
|
||||||
|
|
||||||
if (aPnt.IsNull()) return aGEOMObject._retn();
|
if (aPnt.IsNull()) return aGEOMObject._retn();
|
||||||
aPoints.push_back(aPnt);
|
aPoints.push_back(aPnt);
|
||||||
}
|
}
|
||||||
@ -449,11 +409,7 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSplineInterpolation
|
|||||||
int aLen = thePoints.length();
|
int aLen = thePoints.length();
|
||||||
list<Handle(GEOM_Object)> aPoints;
|
list<Handle(GEOM_Object)> aPoints;
|
||||||
for (; ind < aLen; ind++) {
|
for (; ind < aLen; ind++) {
|
||||||
if (thePoints[ind] == NULL) return aGEOMObject._retn();
|
Handle(GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]);
|
||||||
|
|
||||||
Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject
|
|
||||||
(thePoints[ind]->GetStudyID(), thePoints[ind]->GetEntry());
|
|
||||||
|
|
||||||
if (aPnt.IsNull()) return aGEOMObject._retn();
|
if (aPnt.IsNull()) return aGEOMObject._retn();
|
||||||
aPoints.push_back(aPnt);
|
aPoints.push_back(aPnt);
|
||||||
}
|
}
|
||||||
@ -530,8 +486,7 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSketcherOnPlane
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
Handle(GEOM_Object) aWorkingPlane = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aWorkingPlane = GetObjectImpl(theWorkingPlane);
|
||||||
(theWorkingPlane->GetStudyID(), theWorkingPlane->GetEntry());
|
|
||||||
|
|
||||||
// Make Sketcher
|
// Make Sketcher
|
||||||
Handle(GEOM_Object) anObject =
|
Handle(GEOM_Object) anObject =
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
#include <Standard_Stream.hxx>
|
#include <Standard_Stream.hxx>
|
||||||
|
|
||||||
#include "GEOM_IGroupOperations_i.hh"
|
#include "GEOM_IGroupOperations_i.hh"
|
||||||
@ -62,18 +62,18 @@ GEOM_IGroupOperations_i::~GEOM_IGroupOperations_i()
|
|||||||
* CreateGroup
|
* CreateGroup
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOM::GEOM_Object_ptr GEOM_IGroupOperations_i::CreateGroup(GEOM::GEOM_Object_ptr theMainShape, CORBA::Long theShapeType)
|
GEOM::GEOM_Object_ptr GEOM_IGroupOperations_i::CreateGroup(GEOM::GEOM_Object_ptr theMainShape,
|
||||||
|
CORBA::Long theShapeType)
|
||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theMainShape == NULL || theShapeType < 0) return aGEOMObject._retn();
|
if (theShapeType < 0) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the reference shape
|
//Get the reference shape
|
||||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject(theMainShape->GetStudyID(), theMainShape->GetEntry());
|
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theMainShape);
|
||||||
|
|
||||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Create the Fillet
|
//Create the Fillet
|
||||||
@ -94,14 +94,11 @@ void GEOM_IGroupOperations_i::AddObject(GEOM::GEOM_Object_ptr theGroup, CORBA::L
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theGroup == NULL) return;
|
|
||||||
|
|
||||||
//Get the reference group
|
//Get the reference group
|
||||||
Handle(GEOM_Object) aGroupRef = GetOperations()->GetEngine()->GetObject(theGroup->GetStudyID(), theGroup->GetEntry());
|
Handle(GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
|
||||||
if (aGroupRef.IsNull()) return;
|
if (aGroupRef.IsNull()) return;
|
||||||
|
|
||||||
GetOperations()->AddObject(aGroupRef, theSubShapeId);
|
GetOperations()->AddObject(aGroupRef, theSubShapeId);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -114,15 +111,11 @@ void GEOM_IGroupOperations_i::RemoveObject(GEOM::GEOM_Object_ptr theGroup, CORBA
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theGroup == NULL) return;
|
|
||||||
|
|
||||||
//Get the reference group
|
//Get the reference group
|
||||||
Handle(GEOM_Object) aGroupRef = GetOperations()->GetEngine()->GetObject(theGroup->GetStudyID(), theGroup->GetEntry());
|
Handle(GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
|
||||||
if (aGroupRef.IsNull()) return;
|
if (aGroupRef.IsNull()) return;
|
||||||
|
|
||||||
GetOperations()->RemoveObject(aGroupRef, theSubShapeId);
|
GetOperations()->RemoveObject(aGroupRef, theSubShapeId);
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -136,11 +129,8 @@ void GEOM_IGroupOperations_i::UnionList (GEOM::GEOM_Object_ptr theGroup,
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theGroup == NULL) return;
|
|
||||||
|
|
||||||
//Get the reference group
|
//Get the reference group
|
||||||
Handle(GEOM_Object) aGroupRef = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
|
||||||
(theGroup->GetStudyID(), theGroup->GetEntry());
|
|
||||||
if (aGroupRef.IsNull()) return;
|
if (aGroupRef.IsNull()) return;
|
||||||
|
|
||||||
//Get sub-shape to add
|
//Get sub-shape to add
|
||||||
@ -148,16 +138,13 @@ void GEOM_IGroupOperations_i::UnionList (GEOM::GEOM_Object_ptr theGroup,
|
|||||||
|
|
||||||
int ind, aLen = theSubShapes.length();
|
int ind, aLen = theSubShapes.length();
|
||||||
for (ind = 0; ind < aLen; ind++) {
|
for (ind = 0; ind < aLen; ind++) {
|
||||||
if (theSubShapes[ind] == NULL) return;
|
Handle(GEOM_Object) aSh = GetObjectImpl(theSubShapes[ind]);
|
||||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theSubShapes[ind]->GetStudyID(), theSubShapes[ind]->GetEntry());
|
|
||||||
if (aSh.IsNull()) return;
|
if (aSh.IsNull()) return;
|
||||||
aSubShapes->Append(aSh);
|
aSubShapes->Append(aSh);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Perform the operation
|
//Perform the operation
|
||||||
GetOperations()->UnionList(aGroupRef, aSubShapes);
|
GetOperations()->UnionList(aGroupRef, aSubShapes);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -171,11 +158,8 @@ void GEOM_IGroupOperations_i::DifferenceList (GEOM::GEOM_Object_ptr theGroup,
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theGroup == NULL) return;
|
|
||||||
|
|
||||||
//Get the reference group
|
//Get the reference group
|
||||||
Handle(GEOM_Object) aGroupRef = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
|
||||||
(theGroup->GetStudyID(), theGroup->GetEntry());
|
|
||||||
if (aGroupRef.IsNull()) return;
|
if (aGroupRef.IsNull()) return;
|
||||||
|
|
||||||
//Get sub-shape to remove
|
//Get sub-shape to remove
|
||||||
@ -183,16 +167,13 @@ void GEOM_IGroupOperations_i::DifferenceList (GEOM::GEOM_Object_ptr theGroup,
|
|||||||
|
|
||||||
int ind, aLen = theSubShapes.length();
|
int ind, aLen = theSubShapes.length();
|
||||||
for (ind = 0; ind < aLen; ind++) {
|
for (ind = 0; ind < aLen; ind++) {
|
||||||
if (theSubShapes[ind] == NULL) return;
|
Handle(GEOM_Object) aSh = GetObjectImpl(theSubShapes[ind]);
|
||||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theSubShapes[ind]->GetStudyID(), theSubShapes[ind]->GetEntry());
|
|
||||||
if (aSh.IsNull()) return;
|
if (aSh.IsNull()) return;
|
||||||
aSubShapes->Append(aSh);
|
aSubShapes->Append(aSh);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Perform the operation
|
//Perform the operation
|
||||||
GetOperations()->DifferenceList(aGroupRef, aSubShapes);
|
GetOperations()->DifferenceList(aGroupRef, aSubShapes);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -206,11 +187,8 @@ void GEOM_IGroupOperations_i::UnionIDs (GEOM::GEOM_Object_ptr theGroup,
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theGroup == NULL) return;
|
|
||||||
|
|
||||||
//Get the reference group
|
//Get the reference group
|
||||||
Handle(GEOM_Object) aGroupRef = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
|
||||||
(theGroup->GetStudyID(), theGroup->GetEntry());
|
|
||||||
if (aGroupRef.IsNull()) return;
|
if (aGroupRef.IsNull()) return;
|
||||||
|
|
||||||
//Get sub-shape to add
|
//Get sub-shape to add
|
||||||
@ -237,11 +215,8 @@ void GEOM_IGroupOperations_i::DifferenceIDs (GEOM::GEOM_Object_ptr theGroup,
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theGroup == NULL) return;
|
|
||||||
|
|
||||||
//Get the reference group
|
//Get the reference group
|
||||||
Handle(GEOM_Object) aGroupRef = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
|
||||||
(theGroup->GetStudyID(), theGroup->GetEntry());
|
|
||||||
if (aGroupRef.IsNull()) return;
|
if (aGroupRef.IsNull()) return;
|
||||||
|
|
||||||
//Get sub-shape to remove
|
//Get sub-shape to remove
|
||||||
@ -267,11 +242,8 @@ CORBA::Long GEOM_IGroupOperations_i::GetType(GEOM::GEOM_Object_ptr theGroup)
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theGroup == NULL) return -1;
|
|
||||||
|
|
||||||
//Get the reference group
|
//Get the reference group
|
||||||
Handle(GEOM_Object) aGroupRef = GetOperations()->GetEngine()->GetObject(theGroup->GetStudyID(), theGroup->GetEntry());
|
Handle(GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
|
||||||
|
|
||||||
if (aGroupRef.IsNull()) return -1;
|
if (aGroupRef.IsNull()) return -1;
|
||||||
|
|
||||||
return GetOperations()->GetType(aGroupRef);
|
return GetOperations()->GetType(aGroupRef);
|
||||||
@ -289,10 +261,8 @@ GEOM::GEOM_Object_ptr GEOM_IGroupOperations_i::GetMainShape(GEOM::GEOM_Object_pt
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theGroup == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference group
|
//Get the reference group
|
||||||
Handle(GEOM_Object) aGroupRef = GetOperations()->GetEngine()->GetObject(theGroup->GetStudyID(), theGroup->GetEntry());
|
Handle(GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
|
||||||
if (aGroupRef.IsNull()) return aGEOMObject._retn();
|
if (aGroupRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
Handle(GEOM_Object) anObject = GetOperations()->GetMainShape(aGroupRef);
|
Handle(GEOM_Object) anObject = GetOperations()->GetMainShape(aGroupRef);
|
||||||
@ -313,10 +283,8 @@ GEOM::ListOfLong* GEOM_IGroupOperations_i::GetObjects(GEOM::GEOM_Object_ptr theG
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theGroup == NULL) return aList._retn();
|
|
||||||
|
|
||||||
//Get the reference group
|
//Get the reference group
|
||||||
Handle(GEOM_Object) aGroupRef = GetOperations()->GetEngine()->GetObject(theGroup->GetStudyID(), theGroup->GetEntry());
|
Handle(GEOM_Object) aGroupRef = GetObjectImpl(theGroup);
|
||||||
if (aGroupRef.IsNull()) return aList._retn();
|
if (aGroupRef.IsNull()) return aList._retn();
|
||||||
|
|
||||||
aList = new GEOM::ListOfLong;
|
aList = new GEOM::ListOfLong;
|
||||||
@ -329,4 +297,3 @@ GEOM::ListOfLong* GEOM_IGroupOperations_i::GetObjects(GEOM::GEOM_Object_ptr theG
|
|||||||
|
|
||||||
return aList._retn();
|
return aList._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
#include <Standard_Stream.hxx>
|
#include <Standard_Stream.hxx>
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
@ -113,18 +113,13 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::ProcessShape (GEOM::GEOM_Object
|
|||||||
// Set a not done flag
|
// Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
// Check parameters
|
|
||||||
if ( CORBA::is_nil(theObject) )
|
|
||||||
return aGEOMObject._retn();
|
|
||||||
|
|
||||||
// Check if theOperations has more than 0 elements and theParams and theValues have the same length
|
// Check if theOperations has more than 0 elements and theParams and theValues have the same length
|
||||||
// if ( theOperations.length() <= 0 || theParams.length() != theValues.length() )
|
//if (theOperations.length() <= 0 || theParams.length() != theValues.length())
|
||||||
// return aGEOMObject._retn();
|
// return aGEOMObject._retn();
|
||||||
|
|
||||||
// Get the object itself
|
// Get the object itself
|
||||||
Handle(GEOM_Object) anObject =
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
|
if (anObject.IsNull())
|
||||||
if ( anObject.IsNull() )
|
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
// Perform
|
// Perform
|
||||||
@ -231,16 +226,13 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::SuppressFaces (GEOM::GEOM_Objec
|
|||||||
// Set a not done flag
|
// Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
// Check parameters
|
|
||||||
if ( CORBA::is_nil(theObject) ) // if theFaces is empty - it's OK, it means that ALL faces must be removed
|
|
||||||
return aGEOMObject._retn();
|
|
||||||
|
|
||||||
// Get the object itself
|
// Get the object itself
|
||||||
Handle(GEOM_Object) anObject =
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
|
|
||||||
if (anObject.IsNull())
|
if (anObject.IsNull())
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
|
// if theFaces is empty - it's OK, it means that ALL faces must be removed
|
||||||
|
|
||||||
// Perform
|
// Perform
|
||||||
Handle(GEOM_Object) aNewObject =
|
Handle(GEOM_Object) aNewObject =
|
||||||
GetOperations()->SuppressFaces( anObject, Convert( theFaces ) );
|
GetOperations()->SuppressFaces( anObject, Convert( theFaces ) );
|
||||||
@ -264,13 +256,8 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::CloseContour (GEOM::GEOM_Object
|
|||||||
// Set a not done flag
|
// Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
// Check parameters
|
|
||||||
if ( CORBA::is_nil(theObject) )
|
|
||||||
return aGEOMObject._retn();
|
|
||||||
|
|
||||||
// Get the object itself
|
// Get the object itself
|
||||||
Handle(GEOM_Object) anObject =
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
|
|
||||||
if (anObject.IsNull())
|
if (anObject.IsNull())
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
@ -296,16 +283,13 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::RemoveIntWires (GEOM::GEOM_Obje
|
|||||||
// Set a not done flag
|
// Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
// Check parameters
|
|
||||||
if ( CORBA::is_nil(theObject) ) // if theWires is empty - it's OK, it means that ALL wires should be removed
|
|
||||||
return aGEOMObject._retn();
|
|
||||||
|
|
||||||
// Get the object itself
|
// Get the object itself
|
||||||
Handle(GEOM_Object) anObject =
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
|
|
||||||
if (anObject.IsNull())
|
if (anObject.IsNull())
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
|
// if theWires is empty - it's OK, it means that ALL wires should be removed
|
||||||
|
|
||||||
// Perform
|
// Perform
|
||||||
Handle(GEOM_Object) aNewObject =
|
Handle(GEOM_Object) aNewObject =
|
||||||
GetOperations()->RemoveIntWires( anObject, Convert( theWires ) );
|
GetOperations()->RemoveIntWires( anObject, Convert( theWires ) );
|
||||||
@ -328,16 +312,13 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::FillHoles (GEOM::GEOM_Object_pt
|
|||||||
// Set a not done flag
|
// Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
// Check parameters
|
|
||||||
if ( CORBA::is_nil(theObject) ) // if theWires is empty - it's OK, it means that ALL wires should be removed
|
|
||||||
return aGEOMObject._retn();
|
|
||||||
|
|
||||||
// Get the object itself
|
// Get the object itself
|
||||||
Handle(GEOM_Object) anObject =
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
|
|
||||||
if (anObject.IsNull())
|
if (anObject.IsNull())
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
|
// if theWires is empty - it's OK, it means that ALL wires should be removed
|
||||||
|
|
||||||
// Perform
|
// Perform
|
||||||
Handle(GEOM_Object) aNewObject =
|
Handle(GEOM_Object) aNewObject =
|
||||||
GetOperations()->FillHoles( anObject, Convert( theWires ) );
|
GetOperations()->FillHoles( anObject, Convert( theWires ) );
|
||||||
@ -361,12 +342,11 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::Sew (GEOM::GEOM_Object_ptr theO
|
|||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
if ( CORBA::is_nil(theObject) || theTolerance < 0 )
|
if (theTolerance < 0)
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
// Get the object itself
|
// Get the object itself
|
||||||
Handle(GEOM_Object) anObject =
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
|
|
||||||
if (anObject.IsNull())
|
if (anObject.IsNull())
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
@ -395,12 +375,11 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::DivideEdge (GEOM::GEOM_Object_p
|
|||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
if ( CORBA::is_nil(theObject) || theValue < 0 || theValue > 1 )
|
if (theValue < 0 || theValue > 1)
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
// Get the object itself
|
// Get the object itself
|
||||||
Handle(GEOM_Object) anObject =
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
|
|
||||||
if (anObject.IsNull())
|
if (anObject.IsNull())
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
@ -428,12 +407,8 @@ CORBA::Boolean GEOM_IHealingOperations_i::GetFreeBoundary ( GEOM::GEOM_Object_pt
|
|||||||
// Set a not done flag
|
// Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if ( CORBA::is_nil(theObject) )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// Get the object itself
|
// Get the object itself
|
||||||
Handle(GEOM_Object) anObject =
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
|
|
||||||
if (anObject.IsNull())
|
if (anObject.IsNull())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -477,8 +452,7 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::ChangeOrientation (GEOM::GEOM_O
|
|||||||
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
||||||
|
|
||||||
// Get the object itself
|
// Get the object itself
|
||||||
Handle(GEOM_Object) anObject =
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
|
|
||||||
if (anObject.IsNull())
|
if (anObject.IsNull())
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
@ -505,13 +479,8 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::ChangeOrientationCopy (GEOM::GE
|
|||||||
// Set a not done flag
|
// Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
// Check parameters
|
|
||||||
if ( CORBA::is_nil(theObject) )
|
|
||||||
return aGEOMObject._retn();
|
|
||||||
|
|
||||||
// Get the object itself
|
// Get the object itself
|
||||||
Handle(GEOM_Object) anObject =
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
|
|
||||||
if (anObject.IsNull())
|
if (anObject.IsNull())
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
@ -523,4 +492,3 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::ChangeOrientationCopy (GEOM::GE
|
|||||||
|
|
||||||
return GetObject(aNewObject);
|
return GetObject(aNewObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
#ifdef WNT
|
#ifdef WNT
|
||||||
#pragma warning( disable:4786 )
|
#pragma warning( disable:4786 )
|
||||||
#endif
|
#endif
|
||||||
@ -72,13 +72,8 @@ GEOM::GEOM_Object_ptr GEOM_IInsertOperations_i::MakeCopy(GEOM::GEOM_Object_ptr t
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theOriginal == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference shape
|
//Get the reference shape
|
||||||
Handle(GEOM_Object) anOriginal =
|
Handle(GEOM_Object) anOriginal = GetObjectImpl(theOriginal);
|
||||||
GetOperations()->GetEngine()->GetObject(theOriginal->GetStudyID(),
|
|
||||||
theOriginal->GetEntry());
|
|
||||||
|
|
||||||
if (anOriginal.IsNull()) return aGEOMObject._retn();
|
if (anOriginal.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Create the copy
|
//Create the copy
|
||||||
@ -104,13 +99,8 @@ void GEOM_IInsertOperations_i::Export
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theOriginal == NULL) return;
|
|
||||||
|
|
||||||
//Get the reference shape
|
//Get the reference shape
|
||||||
Handle(GEOM_Object) anOriginal =
|
Handle(GEOM_Object) anOriginal = GetObjectImpl(theOriginal);
|
||||||
GetOperations()->GetEngine()->GetObject(theOriginal->GetStudyID(),
|
|
||||||
theOriginal->GetEntry());
|
|
||||||
|
|
||||||
if (anOriginal.IsNull()) return;
|
if (anOriginal.IsNull()) return;
|
||||||
|
|
||||||
//Export the shape to the file
|
//Export the shape to the file
|
||||||
@ -119,8 +109,6 @@ void GEOM_IInsertOperations_i::Export
|
|||||||
GetOperations()->Export(anOriginal, aFileName, aFormatName);
|
GetOperations()->Export(anOriginal, aFileName, aFormatName);
|
||||||
free(aFileName);
|
free(aFileName);
|
||||||
free(aFormatName);
|
free(aFormatName);
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
#include <Standard_Stream.hxx>
|
#include <Standard_Stream.hxx>
|
||||||
|
|
||||||
#include "GEOM_ILocalOperations_i.hh"
|
#include "GEOM_ILocalOperations_i.hh"
|
||||||
@ -64,12 +64,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletAll
|
|||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theShape == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference shape
|
//Get the reference shape
|
||||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
|
|
||||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Create the Fillet
|
//Create the Fillet
|
||||||
@ -92,11 +88,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletEdges
|
|||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theShape == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference shape
|
//Get the reference shape
|
||||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the reference edges
|
//Get the reference edges
|
||||||
@ -127,11 +120,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletEdgesR1R2
|
|||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theShape == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference shape
|
//Get the reference shape
|
||||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the reference edges
|
//Get the reference edges
|
||||||
@ -162,11 +152,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletFaces
|
|||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theShape == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference shape
|
//Get the reference shape
|
||||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the reference faces
|
//Get the reference faces
|
||||||
@ -197,11 +184,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletFacesR1R2
|
|||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theShape == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference shape
|
//Get the reference shape
|
||||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the reference faces
|
//Get the reference faces
|
||||||
@ -232,11 +216,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFillet2D
|
|||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theShape == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference shape
|
//Get the reference shape
|
||||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the reference vertex
|
//Get the reference vertex
|
||||||
@ -266,12 +247,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferAll
|
|||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theShape == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference shape
|
//Get the reference shape
|
||||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
|
|
||||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Create the Chamfer
|
//Create the Chamfer
|
||||||
@ -295,11 +272,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferEdge
|
|||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theShape == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference shape
|
//Get the reference shape
|
||||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Create the Chamfer
|
//Create the Chamfer
|
||||||
@ -322,11 +296,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferEdgeAD
|
|||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theShape == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference shape
|
//Get the reference shape
|
||||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Create the Chamfer
|
//Create the Chamfer
|
||||||
@ -350,11 +321,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferFaces
|
|||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theShape == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference shape
|
//Get the reference shape
|
||||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the reference faces
|
//Get the reference faces
|
||||||
@ -385,11 +353,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferFacesAD
|
|||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theShape == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference shape
|
//Get the reference shape
|
||||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the reference faces
|
//Get the reference faces
|
||||||
@ -421,11 +386,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferEdges
|
|||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theShape == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference shape
|
//Get the reference shape
|
||||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the reference edges
|
//Get the reference edges
|
||||||
@ -457,11 +419,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferEdgesAD
|
|||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theShape == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference shape
|
//Get the reference shape
|
||||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the reference edges
|
//Get the reference edges
|
||||||
@ -493,11 +452,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeArchimede (GEOM::GEOM_Object_
|
|||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theShape == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference shape
|
//Get the reference shape
|
||||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Create the Archimede
|
//Create the Archimede
|
||||||
@ -517,13 +473,9 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeArchimede (GEOM::GEOM_Object_
|
|||||||
CORBA::Long GEOM_ILocalOperations_i::GetSubShapeIndex
|
CORBA::Long GEOM_ILocalOperations_i::GetSubShapeIndex
|
||||||
(GEOM::GEOM_Object_ptr theShape, GEOM::GEOM_Object_ptr theSubShape)
|
(GEOM::GEOM_Object_ptr theShape, GEOM::GEOM_Object_ptr theSubShape)
|
||||||
{
|
{
|
||||||
if (theShape == NULL || theSubShape == NULL) return -1;
|
|
||||||
|
|
||||||
//Get the reference shapes
|
//Get the reference shapes
|
||||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) aSubShapeRef = GetObjectImpl(theSubShape);
|
||||||
Handle(GEOM_Object) aSubShapeRef = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theSubShape->GetStudyID(), theSubShape->GetEntry());
|
|
||||||
if (aShapeRef.IsNull() || aSubShapeRef.IsNull()) return -1;
|
if (aShapeRef.IsNull() || aSubShapeRef.IsNull()) return -1;
|
||||||
|
|
||||||
//Get the unique ID of <theSubShape> inside <theShape>
|
//Get the unique ID of <theSubShape> inside <theShape>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
#include "GEOM_IOperations_i.hh"
|
#include "GEOM_IOperations_i.hh"
|
||||||
|
|
||||||
#include "GEOM_Engine.hxx"
|
#include "GEOM_Engine.hxx"
|
||||||
@ -131,10 +131,11 @@ void GEOM_IOperations_i::AbortOperation()
|
|||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOM::GEOM_Object_ptr GEOM_IOperations_i::GetObject(Handle(GEOM_Object) theObject)
|
GEOM::GEOM_Object_ptr GEOM_IOperations_i::GetObject(Handle(GEOM_Object) theObject)
|
||||||
{
|
{
|
||||||
if(theObject.IsNull()) return NULL;
|
GEOM::GEOM_Object_var GO;
|
||||||
|
if (theObject.IsNull()) return GO._retn();
|
||||||
TCollection_AsciiString anEntry;
|
TCollection_AsciiString anEntry;
|
||||||
TDF_Tool::Entry(theObject->GetEntry(), anEntry);
|
TDF_Tool::Entry(theObject->GetEntry(), anEntry);
|
||||||
GEOM::GEOM_Object_var GO = _engine->GetObject(theObject->GetDocID(), anEntry.ToCString());
|
GO = _engine->GetObject(theObject->GetDocID(), anEntry.ToCString());
|
||||||
return GO._retn();
|
return GO._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
#include <Standard_Stream.hxx>
|
#include <Standard_Stream.hxx>
|
||||||
|
|
||||||
#include "GEOM_IShapesOperations_i.hh"
|
#include "GEOM_IShapesOperations_i.hh"
|
||||||
@ -70,13 +70,9 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeEdge
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (thePnt1 == NULL || thePnt2 == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference points
|
//Get the reference points
|
||||||
Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
|
||||||
(thePnt1->GetStudyID(), thePnt1->GetEntry());
|
Handle(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
|
||||||
Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(thePnt2->GetStudyID(), thePnt2->GetEntry());
|
|
||||||
|
|
||||||
if (aPnt1.IsNull() || aPnt2.IsNull()) return aGEOMObject._retn();
|
if (aPnt1.IsNull() || aPnt2.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
@ -107,9 +103,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeWire
|
|||||||
//Get the shapes
|
//Get the shapes
|
||||||
aLen = theEdgesAndWires.length();
|
aLen = theEdgesAndWires.length();
|
||||||
for (ind = 0; ind < aLen; ind++) {
|
for (ind = 0; ind < aLen; ind++) {
|
||||||
if (theEdgesAndWires[ind] == NULL) return aGEOMObject._retn();
|
Handle(GEOM_Object) aSh = GetObjectImpl(theEdgesAndWires[ind]);
|
||||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theEdgesAndWires[ind]->GetStudyID(), theEdgesAndWires[ind]->GetEntry());
|
|
||||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||||
aShapes.push_back(aSh);
|
aShapes.push_back(aSh);
|
||||||
}
|
}
|
||||||
@ -137,12 +131,8 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeFace
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theWire == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference wire
|
//Get the reference wire
|
||||||
Handle(GEOM_Object) aWire = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aWire = GetObjectImpl(theWire);
|
||||||
(theWire->GetStudyID(), theWire->GetEntry());
|
|
||||||
|
|
||||||
if (aWire.IsNull()) return aGEOMObject._retn();
|
if (aWire.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Create the Face
|
//Create the Face
|
||||||
@ -173,9 +163,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeFaceWires
|
|||||||
//Get the shapes
|
//Get the shapes
|
||||||
aLen = theWires.length();
|
aLen = theWires.length();
|
||||||
for (ind = 0; ind < aLen; ind++) {
|
for (ind = 0; ind < aLen; ind++) {
|
||||||
if (theWires[ind] == NULL) return aGEOMObject._retn();
|
Handle(GEOM_Object) aSh = GetObjectImpl(theWires[ind]);
|
||||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theWires[ind]->GetStudyID(), theWires[ind]->GetEntry());
|
|
||||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||||
aShapes.push_back(aSh);
|
aShapes.push_back(aSh);
|
||||||
}
|
}
|
||||||
@ -208,9 +196,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeShell
|
|||||||
//Get the shapes
|
//Get the shapes
|
||||||
aLen = theFacesAndShells.length();
|
aLen = theFacesAndShells.length();
|
||||||
for (ind = 0; ind < aLen; ind++) {
|
for (ind = 0; ind < aLen; ind++) {
|
||||||
if (theFacesAndShells[ind] == NULL) return aGEOMObject._retn();
|
Handle(GEOM_Object) aSh = GetObjectImpl(theFacesAndShells[ind]);
|
||||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theFacesAndShells[ind]->GetStudyID(), theFacesAndShells[ind]->GetEntry());
|
|
||||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||||
aShapes.push_back(aSh);
|
aShapes.push_back(aSh);
|
||||||
}
|
}
|
||||||
@ -237,12 +223,8 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeSolidShell
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShell == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShell = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShell = GetObjectImpl(theShell);
|
||||||
(theShell->GetStudyID(), theShell->GetEntry());
|
|
||||||
|
|
||||||
if (aShell.IsNull()) return aGEOMObject._retn();
|
if (aShell.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Create the Solid
|
//Create the Solid
|
||||||
@ -272,9 +254,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeSolidShells
|
|||||||
//Get the shapes
|
//Get the shapes
|
||||||
aLen = theShells.length();
|
aLen = theShells.length();
|
||||||
for (ind = 0; ind < aLen; ind++) {
|
for (ind = 0; ind < aLen; ind++) {
|
||||||
if (theShells[ind] == NULL) return aGEOMObject._retn();
|
Handle(GEOM_Object) aSh = GetObjectImpl(theShells[ind]);
|
||||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theShells[ind]->GetStudyID(), theShells[ind]->GetEntry());
|
|
||||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||||
aShapes.push_back(aSh);
|
aShapes.push_back(aSh);
|
||||||
}
|
}
|
||||||
@ -307,9 +287,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeCompound
|
|||||||
//Get the shapes
|
//Get the shapes
|
||||||
aLen = theShapes.length();
|
aLen = theShapes.length();
|
||||||
for (ind = 0; ind < aLen; ind++) {
|
for (ind = 0; ind < aLen; ind++) {
|
||||||
if (theShapes[ind] == NULL) return aGEOMObject._retn();
|
Handle(GEOM_Object) aSh = GetObjectImpl(theShapes[ind]);
|
||||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theShapes[ind]->GetStudyID(), theShapes[ind]->GetEntry());
|
|
||||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||||
aShapes.push_back(aSh);
|
aShapes.push_back(aSh);
|
||||||
}
|
}
|
||||||
@ -338,12 +316,8 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeGlueFaces
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull()) return aGEOMObject._retn();
|
if (aShape.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the gluing
|
//Perform the gluing
|
||||||
@ -372,11 +346,8 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetGlueFaces
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL) return aSeq._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
if (aShape.IsNull()) return aSeq._retn();
|
if (aShape.IsNull()) return aSeq._retn();
|
||||||
|
|
||||||
Handle(TColStd_HSequenceOfTransient) aHSeq =
|
Handle(TColStd_HSequenceOfTransient) aHSeq =
|
||||||
@ -412,12 +383,8 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeGlueFacesByList
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull()) return aGEOMObject._retn();
|
if (aShape.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
int ind, aLen;
|
int ind, aLen;
|
||||||
@ -425,9 +392,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeGlueFacesByList
|
|||||||
//Get the shapes
|
//Get the shapes
|
||||||
aLen = theFaces.length();
|
aLen = theFaces.length();
|
||||||
for (ind = 0; ind < aLen; ind++) {
|
for (ind = 0; ind < aLen; ind++) {
|
||||||
if (theFaces[ind] == NULL) return aGEOMObject._retn();
|
Handle(GEOM_Object) aSh = GetObjectImpl(theFaces[ind]);
|
||||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theFaces[ind]->GetStudyID(), theFaces[ind]->GetEntry());
|
|
||||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||||
aFaces.push_back(aSh);
|
aFaces.push_back(aSh);
|
||||||
}
|
}
|
||||||
@ -454,10 +419,9 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::MakeExplode (GEOM::GEOM_Object_ptr the
|
|||||||
const CORBA::Boolean isSorted)
|
const CORBA::Boolean isSorted)
|
||||||
{
|
{
|
||||||
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
|
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
|
||||||
if (theShape == NULL) return aSeq._retn();
|
|
||||||
|
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
if (aShape.IsNull()) return aSeq._retn();
|
||||||
|
|
||||||
Handle(TColStd_HSequenceOfTransient) aHSeq =
|
Handle(TColStd_HSequenceOfTransient) aHSeq =
|
||||||
GetOperations()->MakeExplode(aShape, theShapeType, isSorted);
|
GetOperations()->MakeExplode(aShape, theShapeType, isSorted);
|
||||||
@ -482,10 +446,9 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::SubShapeAllIDs (GEOM::GEOM_Object_pt
|
|||||||
const CORBA::Boolean isSorted)
|
const CORBA::Boolean isSorted)
|
||||||
{
|
{
|
||||||
GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
|
GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
|
||||||
if (theShape == NULL) return aSeq._retn();
|
|
||||||
|
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
if (aShape.IsNull()) return aSeq._retn();
|
||||||
|
|
||||||
Handle(TColStd_HSequenceOfInteger) aHSeq =
|
Handle(TColStd_HSequenceOfInteger) aHSeq =
|
||||||
GetOperations()->SubShapeAllIDs(aShape, theShapeType, isSorted);
|
GetOperations()->SubShapeAllIDs(aShape, theShapeType, isSorted);
|
||||||
@ -513,12 +476,8 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetSubShape
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theMainShape == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theMainShape);
|
||||||
(theMainShape->GetStudyID(), theMainShape->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull()) return aGEOMObject._retn();
|
if (aShape.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
Handle(GEOM_Object) anObject = GetOperations()->GetSubShape(aShape, theID);
|
Handle(GEOM_Object) anObject = GetOperations()->GetSubShape(aShape, theID);
|
||||||
@ -536,13 +495,10 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetSubShape
|
|||||||
CORBA::Long GEOM_IShapesOperations_i::GetSubShapeIndex
|
CORBA::Long GEOM_IShapesOperations_i::GetSubShapeIndex
|
||||||
(GEOM::GEOM_Object_ptr theMainShape, GEOM::GEOM_Object_ptr theSubShape)
|
(GEOM::GEOM_Object_ptr theMainShape, GEOM::GEOM_Object_ptr theSubShape)
|
||||||
{
|
{
|
||||||
if (theMainShape == NULL || theSubShape == NULL) return -1;
|
|
||||||
|
|
||||||
//Get the reference shapes
|
//Get the reference shapes
|
||||||
Handle(GEOM_Object) aMainShapeRef = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aMainShapeRef = GetObjectImpl(theMainShape);
|
||||||
(theMainShape->GetStudyID(), theMainShape->GetEntry());
|
Handle(GEOM_Object) aSubShapeRef = GetObjectImpl(theSubShape);
|
||||||
Handle(GEOM_Object) aSubShapeRef = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theSubShape->GetStudyID(), theSubShape->GetEntry());
|
|
||||||
if (aMainShapeRef.IsNull() || aSubShapeRef.IsNull()) return -1;
|
if (aMainShapeRef.IsNull() || aSubShapeRef.IsNull()) return -1;
|
||||||
|
|
||||||
//Get the unique ID of <theSubShape> inside <theMainShape>
|
//Get the unique ID of <theSubShape> inside <theMainShape>
|
||||||
@ -561,13 +517,10 @@ CORBA::Long GEOM_IShapesOperations_i::GetSubShapeIndex
|
|||||||
CORBA::Long GEOM_IShapesOperations_i::GetTopologyIndex
|
CORBA::Long GEOM_IShapesOperations_i::GetTopologyIndex
|
||||||
(GEOM::GEOM_Object_ptr theMainShape, GEOM::GEOM_Object_ptr theSubShape)
|
(GEOM::GEOM_Object_ptr theMainShape, GEOM::GEOM_Object_ptr theSubShape)
|
||||||
{
|
{
|
||||||
if (theMainShape == NULL || theSubShape == NULL) return -1;
|
|
||||||
|
|
||||||
//Get the reference shapes
|
//Get the reference shapes
|
||||||
Handle(GEOM_Object) aMainShapeRef = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aMainShapeRef = GetObjectImpl(theMainShape);
|
||||||
(theMainShape->GetStudyID(), theMainShape->GetEntry());
|
Handle(GEOM_Object) aSubShapeRef = GetObjectImpl(theSubShape);
|
||||||
Handle(GEOM_Object) aSubShapeRef = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theSubShape->GetStudyID(), theSubShape->GetEntry());
|
|
||||||
if (aMainShapeRef.IsNull() || aSubShapeRef.IsNull()) return -1;
|
if (aMainShapeRef.IsNull() || aSubShapeRef.IsNull()) return -1;
|
||||||
|
|
||||||
//Get an ID of <theSubShape>, unique among all sub-shapes of <theMainShape> of the same type
|
//Get an ID of <theSubShape>, unique among all sub-shapes of <theMainShape> of the same type
|
||||||
@ -585,12 +538,8 @@ CORBA::Long GEOM_IShapesOperations_i::GetTopologyIndex
|
|||||||
//=============================================================================
|
//=============================================================================
|
||||||
char* GEOM_IShapesOperations_i::GetShapeTypeString (GEOM::GEOM_Object_ptr theShape)
|
char* GEOM_IShapesOperations_i::GetShapeTypeString (GEOM::GEOM_Object_ptr theShape)
|
||||||
{
|
{
|
||||||
if (theShape == NULL) return NULL;
|
|
||||||
|
|
||||||
//Get the reference shape
|
//Get the reference shape
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull()) return NULL;
|
if (aShape.IsNull()) return NULL;
|
||||||
|
|
||||||
// Get shape parameters
|
// Get shape parameters
|
||||||
@ -605,10 +554,8 @@ char* GEOM_IShapesOperations_i::GetShapeTypeString (GEOM::GEOM_Object_ptr theSha
|
|||||||
//=============================================================================
|
//=============================================================================
|
||||||
CORBA::Long GEOM_IShapesOperations_i::NumberOfFaces (GEOM::GEOM_Object_ptr theShape)
|
CORBA::Long GEOM_IShapesOperations_i::NumberOfFaces (GEOM::GEOM_Object_ptr theShape)
|
||||||
{
|
{
|
||||||
if (theShape == NULL) return -1;
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
|
if (aShape.IsNull()) return -1;
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
|
|
||||||
CORBA::Long aNb = GetOperations()->NumberOfFaces(aShape);
|
CORBA::Long aNb = GetOperations()->NumberOfFaces(aShape);
|
||||||
if (!GetOperations()->IsDone()) return -1;
|
if (!GetOperations()->IsDone()) return -1;
|
||||||
@ -623,10 +570,8 @@ CORBA::Long GEOM_IShapesOperations_i::NumberOfFaces (GEOM::GEOM_Object_ptr theSh
|
|||||||
//=============================================================================
|
//=============================================================================
|
||||||
CORBA::Long GEOM_IShapesOperations_i::NumberOfEdges (GEOM::GEOM_Object_ptr theShape)
|
CORBA::Long GEOM_IShapesOperations_i::NumberOfEdges (GEOM::GEOM_Object_ptr theShape)
|
||||||
{
|
{
|
||||||
if (theShape == NULL) return -1;
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
|
if (aShape.IsNull()) return -1;
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
|
|
||||||
CORBA::Long aNb = GetOperations()->NumberOfEdges(aShape);
|
CORBA::Long aNb = GetOperations()->NumberOfEdges(aShape);
|
||||||
if (!GetOperations()->IsDone()) return -1;
|
if (!GetOperations()->IsDone()) return -1;
|
||||||
@ -647,12 +592,8 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::ChangeOrientation
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull()) return aGEOMObject._retn();
|
if (aShape.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Create the Solid
|
//Create the Solid
|
||||||
@ -674,10 +615,9 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::GetFreeFacesIDs (GEOM::GEOM_Object_p
|
|||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
|
GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
|
||||||
if (theShape == NULL) return aSeq._retn();
|
|
||||||
|
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
if (aShape.IsNull()) return aSeq._retn();
|
||||||
|
|
||||||
Handle(TColStd_HSequenceOfInteger) aHSeq =
|
Handle(TColStd_HSequenceOfInteger) aHSeq =
|
||||||
GetOperations()->GetFreeFacesIDs(aShape);
|
GetOperations()->GetFreeFacesIDs(aShape);
|
||||||
@ -705,16 +645,11 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetSharedShapes
|
|||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
|
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
|
||||||
if (theShape1 == NULL ||
|
|
||||||
theShape2 == NULL) return aSeq._retn();
|
|
||||||
|
|
||||||
Handle(GEOM_Object) aShape1 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape1 = GetObjectImpl(theShape1);
|
||||||
(theShape1->GetStudyID(), theShape1->GetEntry());
|
Handle(GEOM_Object) aShape2 = GetObjectImpl(theShape2);
|
||||||
Handle(GEOM_Object) aShape2 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theShape2->GetStudyID(), theShape2->GetEntry());
|
|
||||||
|
|
||||||
if (aShape1.IsNull() ||
|
if (aShape1.IsNull() || aShape2.IsNull()) return aSeq._retn();
|
||||||
aShape2.IsNull()) return aSeq._retn();
|
|
||||||
|
|
||||||
Handle(TColStd_HSequenceOfTransient) aHSeq =
|
Handle(TColStd_HSequenceOfTransient) aHSeq =
|
||||||
GetOperations()->GetSharedShapes(aShape1, aShape2, theShapeType);
|
GetOperations()->GetSharedShapes(aShape1, aShape2, theShapeType);
|
||||||
@ -772,13 +707,9 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnPlane
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL || theAx1 == NULL) return aSeq._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) anAx1 = GetObjectImpl(theAx1);
|
||||||
Handle(GEOM_Object) anAx1 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theAx1->GetStudyID(), theAx1->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() || anAx1.IsNull()) return aSeq._retn();
|
if (aShape.IsNull() || anAx1.IsNull()) return aSeq._retn();
|
||||||
|
|
||||||
@ -813,15 +744,10 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnPlaneWithLocation
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL || theAx1 == NULL || thePnt == NULL) return aSeq._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) anAx1 = GetObjectImpl(theAx1);
|
||||||
Handle(GEOM_Object) anAx1 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) anPnt = GetObjectImpl(thePnt);
|
||||||
(theAx1->GetStudyID(), theAx1->GetEntry());
|
|
||||||
Handle(GEOM_Object) anPnt = GetOperations()->GetEngine()->GetObject
|
|
||||||
(thePnt->GetStudyID(), thePnt->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return aSeq._retn();
|
if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return aSeq._retn();
|
||||||
|
|
||||||
@ -856,13 +782,9 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnCylinder
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL || theAxis == NULL) return aSeq._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) anAxis = GetObjectImpl(theAxis);
|
||||||
Handle(GEOM_Object) anAxis = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theAxis->GetStudyID(), theAxis->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() || anAxis.IsNull()) return aSeq._retn();
|
if (aShape.IsNull() || anAxis.IsNull()) return aSeq._retn();
|
||||||
|
|
||||||
@ -897,13 +819,9 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnSphere
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL || theCenter == NULL) return aSeq._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) aCenter = GetObjectImpl(theCenter);
|
||||||
Handle(GEOM_Object) aCenter = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theCenter->GetStudyID(), theCenter->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() || aCenter.IsNull()) return aSeq._retn();
|
if (aShape.IsNull() || aCenter.IsNull()) return aSeq._retn();
|
||||||
|
|
||||||
@ -940,30 +858,18 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnQuadrangle
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL ||
|
|
||||||
theTopLeftPoint == NULL ||
|
|
||||||
theTopRigthPoint == NULL ||
|
|
||||||
theBottomLeftPoint == NULL ||
|
|
||||||
theBottomRigthPoint == NULL )
|
|
||||||
return aSeq._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) aTopLeftPoint = GetObjectImpl(theTopLeftPoint);
|
||||||
Handle(GEOM_Object) aTopLeftPoint = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aTopRigthPoint = GetObjectImpl(theTopRigthPoint);
|
||||||
(theShape->GetStudyID(), theTopLeftPoint->GetEntry());
|
Handle(GEOM_Object) aBottomLeftPoint = GetObjectImpl(theBottomLeftPoint);
|
||||||
Handle(GEOM_Object) aTopRigthPoint = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aBottomRigthPoint = GetObjectImpl(theBottomRigthPoint);
|
||||||
(theShape->GetStudyID(), theTopRigthPoint->GetEntry());
|
|
||||||
Handle(GEOM_Object) aBottomLeftPoint = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theShape->GetStudyID(), theBottomLeftPoint->GetEntry());
|
|
||||||
Handle(GEOM_Object) aBottomRigthPoint = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theShape->GetStudyID(), theBottomRigthPoint->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() ||
|
if (aShape.IsNull() ||
|
||||||
aTopLeftPoint.IsNull() ||
|
aTopLeftPoint.IsNull() ||
|
||||||
aTopRigthPoint.IsNull() ||
|
aTopRigthPoint.IsNull() ||
|
||||||
aBottomLeftPoint.IsNull() ||
|
aBottomLeftPoint.IsNull() ||
|
||||||
aBottomRigthPoint.IsNull() )
|
aBottomRigthPoint.IsNull())
|
||||||
return aSeq._retn();
|
return aSeq._retn();
|
||||||
|
|
||||||
//Get Shapes On Quadrangle
|
//Get Shapes On Quadrangle
|
||||||
@ -998,13 +904,9 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnPlaneIDs
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL || theAx1 == NULL) return aSeq._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) anAx1 = GetObjectImpl(theAx1);
|
||||||
Handle(GEOM_Object) anAx1 = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theAx1->GetStudyID(), theAx1->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() || anAx1.IsNull()) return aSeq._retn();
|
if (aShape.IsNull() || anAx1.IsNull()) return aSeq._retn();
|
||||||
|
|
||||||
@ -1039,21 +941,17 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnPlaneWithLocationIDs
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL || theAx1 == NULL || thePnt == NULL) return aSeq._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) anAx1 = GetObjectImpl(theAx1);
|
||||||
Handle(GEOM_Object) anAx1 = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) anPnt = GetObjectImpl(thePnt);
|
||||||
(theAx1->GetStudyID(), theAx1->GetEntry());
|
|
||||||
Handle(GEOM_Object) anPnt = GetOperations()->GetEngine()->GetObject
|
|
||||||
(thePnt->GetStudyID(), thePnt->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return aSeq._retn();
|
if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return aSeq._retn();
|
||||||
|
|
||||||
//Get Shapes On Plane
|
//Get Shapes On Plane
|
||||||
Handle(TColStd_HSequenceOfInteger) aHSeq =
|
Handle(TColStd_HSequenceOfInteger) aHSeq =
|
||||||
GetOperations()->GetShapesOnPlaneWithLocationIDs(aShape, theShapeType, anAx1, anPnt, ShapeState(theState));
|
GetOperations()->GetShapesOnPlaneWithLocationIDs(aShape, theShapeType,
|
||||||
|
anAx1, anPnt, ShapeState(theState));
|
||||||
if (!GetOperations()->IsDone() || aHSeq.IsNull())
|
if (!GetOperations()->IsDone() || aHSeq.IsNull())
|
||||||
return aSeq._retn();
|
return aSeq._retn();
|
||||||
|
|
||||||
@ -1082,13 +980,9 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnCylinderIDs
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL || theAxis == NULL) return aSeq._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) anAxis = GetObjectImpl(theAxis);
|
||||||
Handle(GEOM_Object) anAxis = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theAxis->GetStudyID(), theAxis->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() || anAxis.IsNull()) return aSeq._retn();
|
if (aShape.IsNull() || anAxis.IsNull()) return aSeq._retn();
|
||||||
|
|
||||||
@ -1123,13 +1017,9 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnSphereIDs
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL || theCenter == NULL) return aSeq._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) aCenter = GetObjectImpl(theCenter);
|
||||||
Handle(GEOM_Object) aCenter = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theCenter->GetStudyID(), theCenter->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() || aCenter.IsNull()) return aSeq._retn();
|
if (aShape.IsNull() || aCenter.IsNull()) return aSeq._retn();
|
||||||
|
|
||||||
@ -1166,24 +1056,12 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnQuadrangleIDs
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL ||
|
|
||||||
theTopLeftPoint == NULL ||
|
|
||||||
theTopRigthPoint == NULL ||
|
|
||||||
theBottomLeftPoint == NULL ||
|
|
||||||
theBottomRigthPoint == NULL )
|
|
||||||
return aSeq._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) aTopLeftPoint = GetObjectImpl(theTopLeftPoint);
|
||||||
Handle(GEOM_Object) aTopLeftPoint = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aTopRigthPoint = GetObjectImpl(theTopRigthPoint);
|
||||||
(theShape->GetStudyID(), theTopLeftPoint->GetEntry());
|
Handle(GEOM_Object) aBottomLeftPoint = GetObjectImpl(theBottomLeftPoint);
|
||||||
Handle(GEOM_Object) aTopRigthPoint = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aBottomRigthPoint = GetObjectImpl(theBottomRigthPoint);
|
||||||
(theShape->GetStudyID(), theTopRigthPoint->GetEntry());
|
|
||||||
Handle(GEOM_Object) aBottomLeftPoint = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theShape->GetStudyID(), theBottomLeftPoint->GetEntry());
|
|
||||||
Handle(GEOM_Object) aBottomRigthPoint = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theShape->GetStudyID(), theBottomRigthPoint->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() ||
|
if (aShape.IsNull() ||
|
||||||
aTopLeftPoint.IsNull() ||
|
aTopLeftPoint.IsNull() ||
|
||||||
@ -1224,14 +1102,9 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnBox
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if ( theShape == NULL || theBox == NULL )
|
|
||||||
return aSeq._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) aBox = GetObjectImpl(theBox);
|
||||||
Handle(GEOM_Object) aBox = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theShape->GetStudyID(), theBox->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() || aBox.IsNull() )
|
if (aShape.IsNull() || aBox.IsNull() )
|
||||||
return aSeq._retn();
|
return aSeq._retn();
|
||||||
@ -1266,14 +1139,9 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnBoxIDs
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if ( theShape == NULL || theBox == NULL )
|
|
||||||
return aSeq._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) aBox = GetObjectImpl(theBox);
|
||||||
Handle(GEOM_Object) aBox = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theShape->GetStudyID(), theBox->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() || aBox.IsNull() )
|
if (aShape.IsNull() || aBox.IsNull() )
|
||||||
return aSeq._retn();
|
return aSeq._retn();
|
||||||
@ -1309,14 +1177,9 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnShape
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if ( theShape == NULL || theCheckShape == NULL )
|
|
||||||
return aSeq._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) aCheckShape = GetObjectImpl(theCheckShape);
|
||||||
Handle(GEOM_Object) aCheckShape = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theShape->GetStudyID(), theCheckShape->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() || aCheckShape.IsNull() )
|
if (aShape.IsNull() || aCheckShape.IsNull() )
|
||||||
return aSeq._retn();
|
return aSeq._retn();
|
||||||
@ -1353,14 +1216,9 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetShapesOnShapeAsCompound
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if ( theShape == NULL || theCheckShape == NULL )
|
|
||||||
return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) aCheckShape = GetObjectImpl(theCheckShape);
|
||||||
Handle(GEOM_Object) aCheckShape = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theShape->GetStudyID(), theCheckShape->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() || aCheckShape.IsNull() )
|
if (aShape.IsNull() || aCheckShape.IsNull() )
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
@ -1392,14 +1250,9 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnShapeIDs
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if ( theShape == NULL || theCheckShape == NULL )
|
|
||||||
return aSeq._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
Handle(GEOM_Object) aCheckShape = GetObjectImpl(theCheckShape);
|
||||||
Handle(GEOM_Object) aCheckShape = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theShape->GetStudyID(), theCheckShape->GetEntry());
|
|
||||||
|
|
||||||
if (aShape.IsNull() || aCheckShape.IsNull() )
|
if (aShape.IsNull() || aCheckShape.IsNull() )
|
||||||
return aSeq._retn();
|
return aSeq._retn();
|
||||||
@ -1433,14 +1286,9 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetInPlace
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShapeWhere == NULL ||
|
|
||||||
theShapeWhat == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShapeWhere = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
|
||||||
(theShapeWhere->GetStudyID(), theShapeWhere->GetEntry());
|
Handle(GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
|
||||||
Handle(GEOM_Object) aShapeWhat = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theShapeWhat->GetStudyID(), theShapeWhat->GetEntry());
|
|
||||||
|
|
||||||
if (aShapeWhere.IsNull() ||
|
if (aShapeWhere.IsNull() ||
|
||||||
aShapeWhat.IsNull()) return aGEOMObject._retn();
|
aShapeWhat.IsNull()) return aGEOMObject._retn();
|
||||||
@ -1468,14 +1316,9 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetInPlaceByHistory
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShapeWhere == NULL ||
|
|
||||||
theShapeWhat == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShapeWhere = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
|
||||||
(theShapeWhere->GetStudyID(), theShapeWhere->GetEntry());
|
Handle(GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
|
||||||
Handle(GEOM_Object) aShapeWhat = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theShapeWhat->GetStudyID(), theShapeWhat->GetEntry());
|
|
||||||
|
|
||||||
if (aShapeWhere.IsNull() ||
|
if (aShapeWhere.IsNull() ||
|
||||||
aShapeWhat.IsNull()) return aGEOMObject._retn();
|
aShapeWhat.IsNull()) return aGEOMObject._retn();
|
||||||
@ -1503,14 +1346,9 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetSame
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShapeWhere == NULL ||
|
|
||||||
theShapeWhat == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the reference objects
|
//Get the reference objects
|
||||||
Handle(GEOM_Object) aShapeWhere = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
|
||||||
(theShapeWhere->GetStudyID(), theShapeWhere->GetEntry());
|
Handle(GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
|
||||||
Handle(GEOM_Object) aShapeWhat = GetOperations()->GetEngine()->GetObject
|
|
||||||
(theShapeWhat->GetStudyID(), theShapeWhat->GetEntry());
|
|
||||||
|
|
||||||
if (aShapeWhere.IsNull() ||
|
if (aShapeWhere.IsNull() ||
|
||||||
aShapeWhat.IsNull()) return aGEOMObject._retn();
|
aShapeWhat.IsNull()) return aGEOMObject._retn();
|
||||||
@ -1523,4 +1361,3 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetSame
|
|||||||
|
|
||||||
return GetObject(anObject);
|
return GetObject(anObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
#include <Standard_Stream.hxx>
|
#include <Standard_Stream.hxx>
|
||||||
|
|
||||||
#include "GEOM_ITransformOperations_i.hh"
|
#include "GEOM_ITransformOperations_i.hh"
|
||||||
@ -75,10 +75,10 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateTwoPoints
|
|||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (thePoint1 == NULL || thePoint2 == NULL || theObject == NULL) return aGEOMObject._retn();
|
if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
|
||||||
|
|
||||||
//check if the object is a subshape
|
//check if the object is a subshape
|
||||||
if(!theObject->IsMainShape()) {
|
if (!theObject->IsMainShape()) {
|
||||||
GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
|
GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
}
|
}
|
||||||
@ -86,21 +86,15 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateTwoPoints
|
|||||||
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) anObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the first point of translation
|
//Get the first point of translation
|
||||||
CORBA::String_var aP1Entry = thePoint1->GetEntry();
|
Handle(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
|
||||||
Handle(GEOM_Object) aPoint1 =
|
|
||||||
GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), aP1Entry);
|
|
||||||
if (aPoint1.IsNull()) return aGEOMObject._retn();
|
if (aPoint1.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the second point of translation
|
//Get the second point of translation
|
||||||
CORBA::String_var aP2Entry = thePoint2->GetEntry();
|
Handle(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
|
||||||
Handle(GEOM_Object) aPoint2 =
|
|
||||||
GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), aP2Entry);
|
|
||||||
if (aPoint2.IsNull()) return aGEOMObject._retn();
|
if (aPoint2.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the translation
|
//Perform the translation
|
||||||
@ -124,24 +118,16 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateTwoPointsCopy
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (thePoint1 == NULL || thePoint2 == NULL || theObject == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) aBasicObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the first point of translation
|
//Get the first point of translation
|
||||||
CORBA::String_var aP1Entry = thePoint1->GetEntry();
|
Handle(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
|
||||||
Handle(GEOM_Object) aPoint1 =
|
|
||||||
GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), aP1Entry);
|
|
||||||
if (aPoint1.IsNull()) return aGEOMObject._retn();
|
if (aPoint1.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the second point of translation
|
//Get the second point of translation
|
||||||
CORBA::String_var aP2Entry = thePoint2->GetEntry();
|
Handle(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
|
||||||
Handle(GEOM_Object) aPoint2 =
|
|
||||||
GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), aP2Entry);
|
|
||||||
if (aPoint2.IsNull()) return aGEOMObject._retn();
|
if (aPoint2.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Create the translated shape
|
//Create the translated shape
|
||||||
@ -164,12 +150,12 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateDXDYDZ
|
|||||||
{
|
{
|
||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
GEOM::GEOM_Object_var aGEOMObject ;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theObject == NULL) return aGEOMObject._retn();
|
if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
|
||||||
|
|
||||||
//check if the object is a subshape
|
//check if the object is a subshape
|
||||||
if(!theObject->IsMainShape()) {
|
if (!theObject->IsMainShape()) {
|
||||||
GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
|
GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
}
|
}
|
||||||
@ -177,9 +163,7 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateDXDYDZ
|
|||||||
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) anObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the translation
|
//Perform the translation
|
||||||
@ -188,7 +172,6 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateDXDYDZ
|
|||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* TranslateDXDYDZCopy
|
* TranslateDXDYDZCopy
|
||||||
@ -203,12 +186,8 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateDXDYDZCopy
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theObject == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) aBasicObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Create the translated shape
|
//Create the translated shape
|
||||||
@ -220,7 +199,6 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateDXDYDZCopy
|
|||||||
return GetObject(anObject);
|
return GetObject(anObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* TranslateVector
|
* TranslateVector
|
||||||
@ -234,10 +212,10 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateVector
|
|||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theObject == NULL || theVector == NULL) return aGEOMObject._retn();
|
if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
|
||||||
|
|
||||||
//check if the object is a subshape
|
//check if the object is a subshape
|
||||||
if(!theObject->IsMainShape()) {
|
if (!theObject->IsMainShape()) {
|
||||||
GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
|
GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
}
|
}
|
||||||
@ -245,15 +223,11 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateVector
|
|||||||
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) anObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the vector of translation
|
//Get the vector of translation
|
||||||
CORBA::String_var aVEntry = theVector->GetEntry();
|
Handle(GEOM_Object) aVector = GetObjectImpl(theVector);
|
||||||
Handle(GEOM_Object) aVector =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), aVEntry);
|
|
||||||
if (aVector.IsNull()) return aGEOMObject._retn();
|
if (aVector.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the translation
|
//Perform the translation
|
||||||
@ -276,18 +250,12 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateVectorCopy
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theObject == NULL || theVector == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) aBasicObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the vector of translation
|
//Get the vector of translation
|
||||||
CORBA::String_var aVEntry = theVector->GetEntry();
|
Handle(GEOM_Object) aVector = GetObjectImpl(theVector);
|
||||||
Handle(GEOM_Object) aVector =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), aVEntry);
|
|
||||||
if (aVector.IsNull()) return aGEOMObject._retn();
|
if (aVector.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the translation
|
//Perform the translation
|
||||||
@ -312,7 +280,7 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateVectorDistance
|
|||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
GetOperations()->SetNotDone(); //Set a not done flag
|
GetOperations()->SetNotDone(); //Set a not done flag
|
||||||
|
|
||||||
if (theObject == NULL || theVector == NULL) return aGEOMObject._retn();
|
if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
|
||||||
|
|
||||||
//check if the object is a subshape
|
//check if the object is a subshape
|
||||||
if (!theCopy && !theObject->IsMainShape()) {
|
if (!theCopy && !theObject->IsMainShape()) {
|
||||||
@ -324,15 +292,11 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateVectorDistance
|
|||||||
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) aBasicObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the vector of translation
|
//Get the vector of translation
|
||||||
CORBA::String_var aVecEntry = theVector->GetEntry();
|
Handle(GEOM_Object) aVector = GetObjectImpl(theVector);
|
||||||
Handle(GEOM_Object) aVector =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), aVecEntry);
|
|
||||||
if (aVector.IsNull()) return aGEOMObject._retn();
|
if (aVector.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the translation
|
//Perform the translation
|
||||||
@ -362,10 +326,10 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::Rotate (GEOM::GEOM_Object_ptr
|
|||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theObject == NULL || theAxis == NULL) return aGEOMObject._retn();
|
if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
|
||||||
|
|
||||||
//check if the object is a subshape
|
//check if the object is a subshape
|
||||||
if(!theObject->IsMainShape()) {
|
if (!theObject->IsMainShape()) {
|
||||||
GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
|
GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
}
|
}
|
||||||
@ -373,15 +337,11 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::Rotate (GEOM::GEOM_Object_ptr
|
|||||||
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) anObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the axis of revolution
|
//Get the axis of revolution
|
||||||
CORBA::String_var anAEntry = theAxis->GetEntry();
|
Handle(GEOM_Object) anAxis = GetObjectImpl(theAxis);
|
||||||
Handle(GEOM_Object) anAxis =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theAxis->GetStudyID(), anAEntry);
|
|
||||||
if (anAxis.IsNull()) return aGEOMObject._retn();
|
if (anAxis.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the rotation
|
//Perform the rotation
|
||||||
@ -404,18 +364,12 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateCopy (GEOM::GEOM_Object
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theObject == NULL || theAxis == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) aBasicObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the axis of rotation
|
//Get the axis of rotation
|
||||||
CORBA::String_var anAEntry = theAxis->GetEntry();
|
Handle(GEOM_Object) anAxis = GetObjectImpl(theAxis);
|
||||||
Handle(GEOM_Object) anAxis =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theAxis->GetStudyID(), anAEntry);
|
|
||||||
if (anAxis.IsNull()) return aGEOMObject._retn();
|
if (anAxis.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the rotation
|
//Perform the rotation
|
||||||
@ -426,7 +380,6 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateCopy (GEOM::GEOM_Object
|
|||||||
return GetObject(anObject);
|
return GetObject(anObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* MirrorPlane
|
* MirrorPlane
|
||||||
@ -441,7 +394,7 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPlane
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theObject == NULL || thePlane == NULL) return aGEOMObject._retn();
|
if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
|
||||||
|
|
||||||
//check if the object is a subshape
|
//check if the object is a subshape
|
||||||
if (!theObject->IsMainShape()) {
|
if (!theObject->IsMainShape()) {
|
||||||
@ -450,15 +403,11 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPlane
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) anObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the plane
|
//Get the plane
|
||||||
CORBA::String_var aPlnEntry = thePlane->GetEntry();
|
Handle(GEOM_Object) aPlane = GetObjectImpl(thePlane);
|
||||||
Handle(GEOM_Object) aPlane =
|
|
||||||
GetOperations()->GetEngine()->GetObject(thePlane->GetStudyID(), aPlnEntry);
|
|
||||||
if (aPlane.IsNull()) return aGEOMObject._retn();
|
if (aPlane.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the mirror
|
//Perform the mirror
|
||||||
@ -481,18 +430,12 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPlaneCopy
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theObject == NULL || thePlane == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) aBasicObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the vector of translation
|
//Get the vector of translation
|
||||||
CORBA::String_var aPlnEntry = thePlane->GetEntry();
|
Handle(GEOM_Object) aPlane = GetObjectImpl(thePlane);
|
||||||
Handle(GEOM_Object) aPlane =
|
|
||||||
GetOperations()->GetEngine()->GetObject(thePlane->GetStudyID(), aPlnEntry);
|
|
||||||
if (aPlane.IsNull()) return aGEOMObject._retn();
|
if (aPlane.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the mirror
|
//Perform the mirror
|
||||||
@ -517,24 +460,20 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorAxis
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theObject == NULL || theAxis == NULL) return aGEOMObject._retn();
|
if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
|
||||||
|
|
||||||
//check if the object is a subshape
|
//check if the object is a subshape
|
||||||
if(!theObject->IsMainShape()) {
|
if (!theObject->IsMainShape()) {
|
||||||
GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
|
GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) anObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the axis
|
//Get the axis
|
||||||
CORBA::String_var anAEntry = theAxis->GetEntry();
|
Handle(GEOM_Object) aAxis = GetObjectImpl(theAxis);
|
||||||
Handle(GEOM_Object) aAxis =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theAxis->GetStudyID(), anAEntry);
|
|
||||||
if (aAxis.IsNull()) return aGEOMObject._retn();
|
if (aAxis.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the mirror
|
//Perform the mirror
|
||||||
@ -557,18 +496,12 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorAxisCopy
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theObject == NULL || theAxis == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) aBasicObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the vector of translation
|
//Get the vector of translation
|
||||||
CORBA::String_var anAEntry = theAxis->GetEntry();
|
Handle(GEOM_Object) aAxis = GetObjectImpl(theAxis);
|
||||||
Handle(GEOM_Object) aAxis =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theAxis->GetStudyID(), anAEntry);
|
|
||||||
if (aAxis.IsNull()) return aGEOMObject._retn();
|
if (aAxis.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the mirror
|
//Perform the mirror
|
||||||
@ -593,7 +526,7 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPoint
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theObject == NULL || thePoint == NULL) return aGEOMObject._retn();
|
if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
|
||||||
|
|
||||||
//check if the object is a subshape
|
//check if the object is a subshape
|
||||||
if (!theObject->IsMainShape()) {
|
if (!theObject->IsMainShape()) {
|
||||||
@ -602,15 +535,11 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPoint
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) anObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the point
|
//Get the point
|
||||||
CORBA::String_var aPntEntry = thePoint->GetEntry();
|
Handle(GEOM_Object) aPoint = GetObjectImpl(thePoint);
|
||||||
Handle(GEOM_Object) aPoint =
|
|
||||||
GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), aPntEntry);
|
|
||||||
if (aPoint.IsNull()) return aGEOMObject._retn();
|
if (aPoint.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the mirror
|
//Perform the mirror
|
||||||
@ -633,18 +562,12 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPointCopy
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theObject == NULL || thePoint == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) aBasicObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the vector of translation
|
//Get the vector of translation
|
||||||
CORBA::String_var aPntEntry = thePoint->GetEntry();
|
Handle(GEOM_Object) aPoint = GetObjectImpl(thePoint);
|
||||||
Handle(GEOM_Object) aPoint =
|
|
||||||
GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), aPntEntry);
|
|
||||||
if (aPoint.IsNull()) return aGEOMObject._retn();
|
if (aPoint.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the mirror
|
//Perform the mirror
|
||||||
@ -655,7 +578,6 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPointCopy
|
|||||||
return GetObject(anObject);
|
return GetObject(anObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* OffsetShape
|
* OffsetShape
|
||||||
@ -670,7 +592,7 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::OffsetShape
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theObject == NULL) return aGEOMObject._retn();
|
if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
|
||||||
|
|
||||||
//check if the object is a subshape
|
//check if the object is a subshape
|
||||||
if (!theObject->IsMainShape()) {
|
if (!theObject->IsMainShape()) {
|
||||||
@ -679,9 +601,7 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::OffsetShape
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Get the basic object
|
//Get the basic object
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) aBasicObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Create the offset shape
|
//Create the offset shape
|
||||||
@ -704,12 +624,8 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::OffsetShapeCopy
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theObject == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the basic object
|
//Get the basic object
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) aBasicObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Create the offset shape
|
//Create the offset shape
|
||||||
@ -720,7 +636,6 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::OffsetShapeCopy
|
|||||||
return GetObject(anObject);
|
return GetObject(anObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* ScaleShape
|
* ScaleShape
|
||||||
@ -745,16 +660,13 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShape
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) anObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the point
|
//Get the point
|
||||||
Handle(GEOM_Object) aPoint;
|
Handle(GEOM_Object) aPoint;
|
||||||
if (!thePoint->_is_nil()) {
|
if (!thePoint->_is_nil()) {
|
||||||
CORBA::String_var aPntEntry = thePoint->GetEntry();
|
aPoint = GetObjectImpl(thePoint);
|
||||||
aPoint = GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), aPntEntry);
|
|
||||||
if (aPoint.IsNull()) return aGEOMObject._retn();
|
if (aPoint.IsNull()) return aGEOMObject._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -779,19 +691,14 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShapeCopy
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theObject->_is_nil()) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the basic object
|
//Get the basic object
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) aBasicObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the point
|
//Get the point
|
||||||
Handle(GEOM_Object) aPoint;
|
Handle(GEOM_Object) aPoint;
|
||||||
if (!thePoint->_is_nil()) {
|
if (!thePoint->_is_nil()) {
|
||||||
CORBA::String_var aPntEntry = thePoint->GetEntry();
|
aPoint = GetObjectImpl(thePoint);
|
||||||
aPoint = GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), aPntEntry);
|
|
||||||
if (aPoint.IsNull()) return aGEOMObject._retn();
|
if (aPoint.IsNull()) return aGEOMObject._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -830,16 +737,13 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShapeAlongAxes
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) anObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the point
|
//Get the point
|
||||||
Handle(GEOM_Object) aPoint;
|
Handle(GEOM_Object) aPoint;
|
||||||
if (!thePoint->_is_nil()) {
|
if (!thePoint->_is_nil()) {
|
||||||
CORBA::String_var aPntEntry = thePoint->GetEntry();
|
aPoint = GetObjectImpl(thePoint);
|
||||||
aPoint = GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), aPntEntry);
|
|
||||||
if (aPoint.IsNull()) return aGEOMObject._retn();
|
if (aPoint.IsNull()) return aGEOMObject._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -867,19 +771,14 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShapeAlongAxesCopy
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theObject->_is_nil()) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the basic object
|
//Get the basic object
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) aBasicObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the point
|
//Get the point
|
||||||
Handle(GEOM_Object) aPoint;
|
Handle(GEOM_Object) aPoint;
|
||||||
if (!thePoint->_is_nil()) {
|
if (!thePoint->_is_nil()) {
|
||||||
CORBA::String_var aPntEntry = thePoint->GetEntry();
|
aPoint = GetObjectImpl(thePoint);
|
||||||
aPoint = GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), aPntEntry);
|
|
||||||
if (aPoint.IsNull()) return aGEOMObject._retn();
|
if (aPoint.IsNull()) return aGEOMObject._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -907,7 +806,7 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::PositionShape
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theObject == NULL || theEndLCS == NULL)
|
if (CORBA::is_nil(theObject) || CORBA::is_nil(theEndLCS))
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
//check if the object is a subshape
|
//check if the object is a subshape
|
||||||
@ -917,23 +816,18 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::PositionShape
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Get the basic object
|
//Get the basic object
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) anObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the Start LCS (may be NULL for positioning from global LCS)
|
//Get the Start LCS (may be NULL for positioning from global LCS)
|
||||||
Handle(GEOM_Object) aStartLCS = NULL;
|
Handle(GEOM_Object) aStartLCS;
|
||||||
if (theStartLCS != NULL && !CORBA::is_nil(theStartLCS)) {
|
if (!CORBA::is_nil(theStartLCS)) {
|
||||||
CORBA::String_var aStartLCSEntry = theStartLCS->GetEntry();
|
aStartLCS = GetObjectImpl(theStartLCS);
|
||||||
aStartLCS = GetOperations()->GetEngine()->GetObject(theStartLCS->GetStudyID(), aStartLCSEntry);
|
|
||||||
if (aStartLCS.IsNull()) return aGEOMObject._retn();
|
if (aStartLCS.IsNull()) return aGEOMObject._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Get the End LCS
|
//Get the End LCS
|
||||||
CORBA::String_var anEndLCSEntry = theEndLCS->GetEntry();
|
Handle(GEOM_Object) aEndLCS = GetObjectImpl(theEndLCS);
|
||||||
Handle(GEOM_Object) aEndLCS =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theEndLCS->GetStudyID(), anEndLCSEntry);
|
|
||||||
if (aEndLCS.IsNull()) return aGEOMObject._retn();
|
if (aEndLCS.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the Position
|
//Perform the Position
|
||||||
@ -957,27 +851,19 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::PositionShapeCopy
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theObject == NULL || theEndLCS == NULL)
|
|
||||||
return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the basic object
|
//Get the basic object
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) aBasicObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the Start LCS (may be NULL for positioning from global LCS)
|
//Get the Start LCS (may be NULL for positioning from global LCS)
|
||||||
Handle(GEOM_Object) aStartLCS = NULL;
|
Handle(GEOM_Object) aStartLCS;
|
||||||
if (theStartLCS != NULL && !CORBA::is_nil(theStartLCS)) {
|
if (!CORBA::is_nil(theStartLCS)) {
|
||||||
CORBA::String_var aStartLCSEntry = theStartLCS->GetEntry();
|
aStartLCS = GetObjectImpl(theStartLCS);
|
||||||
aStartLCS = GetOperations()->GetEngine()->GetObject(theStartLCS->GetStudyID(), aStartLCSEntry);
|
|
||||||
if (aStartLCS.IsNull()) return aGEOMObject._retn();
|
if (aStartLCS.IsNull()) return aGEOMObject._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Get the End LCS
|
//Get the End LCS
|
||||||
CORBA::String_var anEndLCSEntry = theEndLCS->GetEntry();
|
Handle(GEOM_Object) aEndLCS = GetObjectImpl(theEndLCS);
|
||||||
Handle(GEOM_Object) aEndLCS =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theEndLCS->GetStudyID(), anEndLCSEntry);
|
|
||||||
if (aEndLCS.IsNull()) return aGEOMObject._retn();
|
if (aEndLCS.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the position
|
//Perform the position
|
||||||
@ -1006,19 +892,12 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::PositionAlongPath
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theObject == NULL || thePath == NULL)
|
|
||||||
return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the basic object
|
//Get the basic object
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) aBasicObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the path object
|
//Get the path object
|
||||||
CORBA::String_var aPathEntry = thePath->GetEntry();
|
Handle(GEOM_Object) aPathObject = GetObjectImpl(thePath);
|
||||||
Handle(GEOM_Object) aPathObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), aPathEntry);
|
|
||||||
if (aPathObject.IsNull()) return aGEOMObject._retn();
|
if (aPathObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the position
|
//Perform the position
|
||||||
@ -1045,18 +924,12 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiTranslate1D
|
|||||||
|
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theObject == NULL || theVector == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) aBasicObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the vector of translation
|
//Get the vector of translation
|
||||||
CORBA::String_var aVecEntry = theVector->GetEntry();
|
Handle(GEOM_Object) aVector = GetObjectImpl(theVector);
|
||||||
Handle(GEOM_Object) aVector =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), aVecEntry);
|
|
||||||
if (aVector.IsNull()) return aGEOMObject._retn();
|
if (aVector.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the translation
|
//Perform the translation
|
||||||
@ -1085,24 +958,16 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiTranslate2D (GEOM::GEOM_
|
|||||||
|
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theObject == NULL || theVector1 == NULL || theVector2 == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) aBasicObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the vector1 of translation
|
//Get the vector1 of translation
|
||||||
CORBA::String_var aVec1Entry = theVector1->GetEntry();
|
Handle(GEOM_Object) aVector1 = GetObjectImpl(theVector1);
|
||||||
Handle(GEOM_Object) aVector1 =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theVector1->GetStudyID(), aVec1Entry);
|
|
||||||
if (aVector1.IsNull()) return aGEOMObject._retn();
|
if (aVector1.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the vector2 of translation
|
//Get the vector2 of translation
|
||||||
CORBA::String_var aVec2Entry = theVector2->GetEntry();
|
Handle(GEOM_Object) aVector2 = GetObjectImpl(theVector2);
|
||||||
Handle(GEOM_Object) aVector2 =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theVector2->GetStudyID(), aVec2Entry);
|
|
||||||
if (aVector2.IsNull()) return aGEOMObject._retn();
|
if (aVector2.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the translation
|
//Perform the translation
|
||||||
@ -1127,18 +992,12 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiRotate1D (GEOM::GEOM_Obj
|
|||||||
|
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theObject == NULL || theVector == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) aBasicObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the a directon of rotation
|
//Get the a directon of rotation
|
||||||
CORBA::String_var aVecEntry = theVector->GetEntry();
|
Handle(GEOM_Object) aVector = GetObjectImpl(theVector);
|
||||||
Handle(GEOM_Object) aVector =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), aVecEntry);
|
|
||||||
if (aVector.IsNull()) return aGEOMObject._retn();
|
if (aVector.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the rotation
|
//Perform the rotation
|
||||||
@ -1165,18 +1024,12 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiRotate2D (GEOM::GEOM_Obj
|
|||||||
|
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theObject == NULL || theVector == NULL) return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) aBasicObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the a directon of rotation
|
//Get the a directon of rotation
|
||||||
CORBA::String_var aVecEntry = theVector->GetEntry();
|
Handle(GEOM_Object) aVector = GetObjectImpl(theVector);
|
||||||
Handle(GEOM_Object) aVector =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), aVecEntry);
|
|
||||||
if (aVector.IsNull()) return aGEOMObject._retn();
|
if (aVector.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the rotation
|
//Perform the rotation
|
||||||
@ -1202,7 +1055,7 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateThreePoints
|
|||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theCentPoint == NULL || thePoint1 == NULL || thePoint2 == NULL || theObject == NULL)
|
if (CORBA::is_nil(theObject))
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
//check if the object is a subshape
|
//check if the object is a subshape
|
||||||
@ -1214,27 +1067,19 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateThreePoints
|
|||||||
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) anObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the central point of rotation
|
//Get the central point of rotation
|
||||||
CORBA::String_var aCPEntry = theCentPoint->GetEntry();
|
Handle(GEOM_Object) aCentPoint = GetObjectImpl(theCentPoint);
|
||||||
Handle(GEOM_Object) aCentPoint =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theCentPoint->GetStudyID(), aCPEntry);
|
|
||||||
if (aCentPoint.IsNull()) return aGEOMObject._retn();
|
if (aCentPoint.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the first point
|
//Get the first point
|
||||||
CORBA::String_var aP1Entry = thePoint1->GetEntry();
|
Handle(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
|
||||||
Handle(GEOM_Object) aPoint1 =
|
|
||||||
GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), aP1Entry);
|
|
||||||
if (aPoint1.IsNull()) return aGEOMObject._retn();
|
if (aPoint1.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the second point
|
//Get the second point
|
||||||
CORBA::String_var aP2Entry = thePoint2->GetEntry();
|
Handle(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
|
||||||
Handle(GEOM_Object) aPoint2 =
|
|
||||||
GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), aP2Entry);
|
|
||||||
if (aPoint2.IsNull()) return aGEOMObject._retn();
|
if (aPoint2.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the translation
|
//Perform the translation
|
||||||
@ -1259,31 +1104,20 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateThreePointsCopy
|
|||||||
//Set a not done flag
|
//Set a not done flag
|
||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theCentPoint == NULL || thePoint1 == NULL || thePoint2 == NULL || theObject == NULL)
|
|
||||||
return aGEOMObject._retn();
|
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) aBasicObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the central point of rotation
|
//Get the central point of rotation
|
||||||
CORBA::String_var aCPEntry = theCentPoint->GetEntry();
|
Handle(GEOM_Object) aCentPoint = GetObjectImpl(theCentPoint);
|
||||||
Handle(GEOM_Object) aCentPoint =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theCentPoint->GetStudyID(), aCPEntry);
|
|
||||||
if (aCentPoint.IsNull()) return aGEOMObject._retn();
|
if (aCentPoint.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the first point
|
//Get the first point
|
||||||
CORBA::String_var aP1Entry = thePoint1->GetEntry();
|
Handle(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
|
||||||
Handle(GEOM_Object) aPoint1 =
|
|
||||||
GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), aP1Entry);
|
|
||||||
if (aPoint1.IsNull()) return aGEOMObject._retn();
|
if (aPoint1.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Get the second point
|
//Get the second point
|
||||||
CORBA::String_var aP2Entry = thePoint2->GetEntry();
|
Handle(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
|
||||||
Handle(GEOM_Object) aPoint2 =
|
|
||||||
GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), aP2Entry);
|
|
||||||
if (aPoint2.IsNull()) return aGEOMObject._retn();
|
if (aPoint2.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the rotation
|
//Perform the rotation
|
||||||
@ -1307,20 +1141,12 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RecomputeObject
|
|||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
GEOM::GEOM_Object_var aGEOMObject;
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
if (theObject == NULL) return aGEOMObject._retn();
|
if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
|
||||||
|
|
||||||
//check if the object is a subshape
|
|
||||||
//if (!theObject->IsMainShape()) {
|
|
||||||
// GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
|
|
||||||
// return aGEOMObject._retn();
|
|
||||||
//}
|
|
||||||
|
|
||||||
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
||||||
|
|
||||||
//Get the object itself
|
//Get the object itself
|
||||||
CORBA::String_var anEntry = theObject->GetEntry();
|
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||||
Handle(GEOM_Object) anObject =
|
|
||||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
|
||||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
//Perform the recomputation
|
//Perform the recomputation
|
||||||
|
Loading…
x
Reference in New Issue
Block a user