mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-15 01:58:36 +05:00
Bug 0020230: Memory performance improvement.
This commit is contained in:
parent
84e1f83f51
commit
30418b8db8
@ -18,7 +18,7 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#ifdef WNT
|
||||
#pragma warning( disable:4786 )
|
||||
#endif
|
||||
@ -1230,8 +1230,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,
|
||||
const GEOM::ListOfLong& theIndices)
|
||||
{
|
||||
if(theMainShape == NULL || theIndices.length() < 1) return GEOM::GEOM_Object::_nil();
|
||||
Handle(GEOM_Object) aMainsShape = _impl->GetObject(theMainShape->GetStudyID(), theMainShape->GetEntry());
|
||||
if (CORBA::is_nil(theMainShape) || theIndices.length() < 1)
|
||||
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();
|
||||
|
||||
Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1, theIndices.length());
|
||||
@ -1291,7 +1293,7 @@ GEOM::GEOM_Object_ptr GEOM_Gen_i::GetObject (CORBA::Long theStudyID, const char*
|
||||
{
|
||||
GEOM::GEOM_Object_var obj;
|
||||
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();
|
||||
if (stringIOR.Length() > 1) {
|
||||
|
@ -18,7 +18,7 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#include <Standard_Stream.hxx>
|
||||
|
||||
#include "GEOM_I3DPrimOperations_i.hh"
|
||||
@ -87,13 +87,8 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeBoxTwoPnt
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (thePnt1 == NULL || thePnt2 == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference points
|
||||
Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt1->GetStudyID(), thePnt1->GetEntry());
|
||||
Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt2->GetStudyID(), thePnt2->GetEntry());
|
||||
Handle(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
|
||||
Handle(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
|
||||
|
||||
if (aPnt1.IsNull() || aPnt2.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -140,13 +135,9 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeCylinderPntVecRH
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (thePnt == NULL || theVec == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference points
|
||||
Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt->GetStudyID(), thePnt->GetEntry());
|
||||
Handle(GEOM_Object) aVec = GetOperations()->GetEngine()->GetObject
|
||||
(theVec->GetStudyID(), theVec->GetEntry());
|
||||
Handle(GEOM_Object) aPnt = GetObjectImpl(thePnt);
|
||||
Handle(GEOM_Object) aVec = GetObjectImpl(theVec);
|
||||
|
||||
if (aPnt.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -194,13 +185,9 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeConePntVecR1R2H
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (thePnt == NULL || theVec == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference points
|
||||
Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt->GetStudyID(), thePnt->GetEntry());
|
||||
Handle(GEOM_Object) aVec = GetOperations()->GetEngine()->GetObject
|
||||
(theVec->GetStudyID(), theVec->GetEntry());
|
||||
Handle(GEOM_Object) aPnt = GetObjectImpl(thePnt);
|
||||
Handle(GEOM_Object) aVec = GetObjectImpl(theVec);
|
||||
|
||||
if (aPnt.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -246,12 +233,8 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeSpherePntR
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (thePnt == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference point
|
||||
CORBA::String_var entry=thePnt->GetEntry();
|
||||
Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt->GetStudyID(), entry);
|
||||
Handle(GEOM_Object) aPnt = GetObjectImpl(thePnt);
|
||||
|
||||
if (aPnt.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -300,13 +283,9 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeTorusPntVecRR
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (thePnt == NULL || theVec == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference points
|
||||
Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt->GetStudyID(), thePnt->GetEntry());
|
||||
Handle(GEOM_Object) aVec = GetOperations()->GetEngine()->GetObject
|
||||
(theVec->GetStudyID(), theVec->GetEntry());
|
||||
Handle(GEOM_Object) aPnt = GetObjectImpl(thePnt);
|
||||
Handle(GEOM_Object) aVec = GetObjectImpl(theVec);
|
||||
|
||||
if (aPnt.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -333,13 +312,9 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePrismVecH
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theBase == NULL || theVec == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aBase = GetOperations()->GetEngine()->GetObject
|
||||
(theBase->GetStudyID(), theBase->GetEntry());
|
||||
Handle(GEOM_Object) aVec = GetOperations()->GetEngine()->GetObject
|
||||
(theVec->GetStudyID(), theVec->GetEntry());
|
||||
Handle(GEOM_Object) aBase = GetObjectImpl(theBase);
|
||||
Handle(GEOM_Object) aVec = GetObjectImpl(theVec);
|
||||
|
||||
if (aBase.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -366,13 +341,9 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePrismVecH2Ways
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theBase == NULL || theVec == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aBase = GetOperations()->GetEngine()->GetObject
|
||||
(theBase->GetStudyID(), theBase->GetEntry());
|
||||
Handle(GEOM_Object) aVec = GetOperations()->GetEngine()->GetObject
|
||||
(theVec->GetStudyID(), theVec->GetEntry());
|
||||
Handle(GEOM_Object) aBase = GetObjectImpl(theBase);
|
||||
Handle(GEOM_Object) aVec = GetObjectImpl(theVec);
|
||||
|
||||
if (aBase.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -400,16 +371,10 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePrismTwoPnt
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theBase == NULL || thePoint1 == NULL || thePoint2 == NULL)
|
||||
return aGEOMObject._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aBase = GetOperations()->GetEngine()->GetObject
|
||||
(theBase->GetStudyID(), theBase->GetEntry());
|
||||
Handle(GEOM_Object) aPoint1 = GetOperations()->GetEngine()->GetObject
|
||||
(thePoint1->GetStudyID(), thePoint1->GetEntry());
|
||||
Handle(GEOM_Object) aPoint2 = GetOperations()->GetEngine()->GetObject
|
||||
(thePoint2->GetStudyID(), thePoint2->GetEntry());
|
||||
Handle(GEOM_Object) aBase = GetObjectImpl(theBase);
|
||||
Handle(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
|
||||
Handle(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
|
||||
|
||||
if (aBase.IsNull() || aPoint1.IsNull() || aPoint2.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
@ -438,16 +403,10 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePrismTwoPnt2Ways
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theBase == NULL || thePoint1 == NULL || thePoint2 == NULL)
|
||||
return aGEOMObject._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aBase = GetOperations()->GetEngine()->GetObject
|
||||
(theBase->GetStudyID(), theBase->GetEntry());
|
||||
Handle(GEOM_Object) aPoint1 = GetOperations()->GetEngine()->GetObject
|
||||
(thePoint1->GetStudyID(), thePoint1->GetEntry());
|
||||
Handle(GEOM_Object) aPoint2 = GetOperations()->GetEngine()->GetObject
|
||||
(thePoint2->GetStudyID(), thePoint2->GetEntry());
|
||||
Handle(GEOM_Object) aBase = GetObjectImpl(theBase);
|
||||
Handle(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
|
||||
Handle(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
|
||||
|
||||
if (aBase.IsNull() || aPoint1.IsNull() || aPoint2.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
@ -474,13 +433,9 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePipe
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theBase == NULL || thePath == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aBase = GetOperations()->GetEngine()->GetObject
|
||||
(theBase->GetStudyID(), theBase->GetEntry());
|
||||
Handle(GEOM_Object) aPath = GetOperations()->GetEngine()->GetObject
|
||||
(thePath->GetStudyID(), thePath->GetEntry());
|
||||
Handle(GEOM_Object) aBase = GetObjectImpl(theBase);
|
||||
Handle(GEOM_Object) aPath = GetObjectImpl(thePath);
|
||||
|
||||
if (aBase.IsNull() || aPath.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -507,13 +462,9 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeRevolutionAxisAngle
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theBase == NULL || theAxis == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aBase = GetOperations()->GetEngine()->GetObject
|
||||
(theBase->GetStudyID(), theBase->GetEntry());
|
||||
Handle(GEOM_Object) anAxis = GetOperations()->GetEngine()->GetObject
|
||||
(theAxis->GetStudyID(), theAxis->GetEntry());
|
||||
Handle(GEOM_Object) aBase = GetObjectImpl(theBase);
|
||||
Handle(GEOM_Object) anAxis = GetObjectImpl(theAxis);
|
||||
|
||||
if (aBase.IsNull() || anAxis.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -540,13 +491,9 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeRevolutionAxisAngle2Ways
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theBase == NULL || theAxis == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aBase = GetOperations()->GetEngine()->GetObject
|
||||
(theBase->GetStudyID(), theBase->GetEntry());
|
||||
Handle(GEOM_Object) anAxis = GetOperations()->GetEngine()->GetObject
|
||||
(theAxis->GetStudyID(), theAxis->GetEntry());
|
||||
Handle(GEOM_Object) aBase = GetObjectImpl(theBase);
|
||||
Handle(GEOM_Object) anAxis = GetObjectImpl(theAxis);
|
||||
|
||||
if (aBase.IsNull() || anAxis.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -577,16 +524,14 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeFilling(GEOM::GEOM_Object_pt
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
|
||||
if (aShape.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the Solid
|
||||
Handle(GEOM_Object) anObject = GetOperations()->MakeFilling(aShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, theApprox);
|
||||
Handle(GEOM_Object) anObject = GetOperations()->MakeFilling
|
||||
(aShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, theApprox);
|
||||
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
@ -613,9 +558,7 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeThruSections(const GEOM::Lis
|
||||
//Get the shapes
|
||||
aLen = theSeqSections.length();
|
||||
for (ind = 0; ind < aLen; ind++) {
|
||||
if (theSeqSections[ind] == NULL) continue;
|
||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
||||
(theSeqSections[ind]->GetStudyID(), theSeqSections[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aSh = GetObjectImpl(theSeqSections[ind]);
|
||||
if (!aSh.IsNull())
|
||||
aSeqSections->Append(aSh);
|
||||
}
|
||||
@ -636,7 +579,8 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeThruSections(const GEOM::Lis
|
||||
* MakePipeWithDifferentSections
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePipeWithDifferentSections(const GEOM::ListOfGO& theBases,
|
||||
GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePipeWithDifferentSections
|
||||
(const GEOM::ListOfGO& theBases,
|
||||
const GEOM::ListOfGO& theLocations,
|
||||
GEOM::GEOM_Object_ptr thePath,
|
||||
CORBA::Boolean theWithContact,
|
||||
@ -657,21 +601,17 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePipeWithDifferentSections(co
|
||||
if (aNbLocs && aNbBases != aNbLocs)
|
||||
return aGEOMObject._retn();
|
||||
|
||||
Handle(GEOM_Object) aPath = GetOperations()->GetEngine()->GetObject
|
||||
(thePath->GetStudyID(), thePath->GetEntry());
|
||||
Handle(GEOM_Object) aPath = GetObjectImpl(thePath);
|
||||
if (aPath.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
for (ind = 0; ind < aNbBases; ind++) {
|
||||
if (theBases[ind] == NULL) continue;
|
||||
Handle(GEOM_Object) aBase = GetOperations()->GetEngine()->GetObject(theBases[ind]->GetStudyID(),
|
||||
theBases[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aBase = GetObjectImpl(theBases[ind]);
|
||||
if (aBase.IsNull())
|
||||
continue;
|
||||
if (aNbLocs)
|
||||
{
|
||||
Handle(GEOM_Object) aLoc = GetOperations()->GetEngine()->GetObject
|
||||
(theLocations[ind]->GetStudyID(), theLocations[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aLoc = GetObjectImpl(theLocations[ind]);
|
||||
if (aLoc.IsNull())
|
||||
continue;
|
||||
aSeqLocations->Append(aLoc);
|
||||
@ -722,20 +662,16 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePipeWithShellSections
|
||||
if (aNbLocs && aNbBases != aNbLocs)
|
||||
return aGEOMObject._retn();
|
||||
|
||||
Handle(GEOM_Object) aPath = GetOperations()->GetEngine()->GetObject
|
||||
(thePath->GetStudyID(), thePath->GetEntry());
|
||||
Handle(GEOM_Object) aPath = GetObjectImpl(thePath);
|
||||
if (aPath.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
for (ind = 0; ind < aNbBases; ind++) {
|
||||
if (theBases[ind] == NULL) continue;
|
||||
Handle(GEOM_Object) aBase = GetOperations()->GetEngine()->
|
||||
GetObject(theBases[ind]->GetStudyID(), theBases[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aBase = GetObjectImpl(theBases[ind]);
|
||||
if (aBase.IsNull())
|
||||
continue;
|
||||
if (aNbLocs) {
|
||||
Handle(GEOM_Object) aLoc = GetOperations()->GetEngine()->GetObject
|
||||
(theLocations[ind]->GetStudyID(), theLocations[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aLoc = GetObjectImpl(theLocations[ind]);
|
||||
if (aLoc.IsNull())
|
||||
continue;
|
||||
aSeqLocations->Append(aLoc);
|
||||
@ -743,8 +679,7 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePipeWithShellSections
|
||||
aSeqBases->Append(aBase);
|
||||
|
||||
if (aNbSubBases >= aNbBases) {
|
||||
Handle(GEOM_Object) aSubBase = GetOperations()->GetEngine()->
|
||||
GetObject(theSubBases[ind]->GetStudyID(), theSubBases[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aSubBase = GetObjectImpl(theSubBases[ind]);
|
||||
if (aSubBase.IsNull()) {
|
||||
aSeqSubBases->Clear();
|
||||
aNbSubBases = 0;
|
||||
@ -752,7 +687,6 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePipeWithShellSections
|
||||
}
|
||||
aSeqSubBases->Append(aSubBase);
|
||||
}
|
||||
|
||||
}
|
||||
if (!aSeqBases->Length())
|
||||
return aGEOMObject._retn();
|
||||
@ -794,14 +728,11 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePipeShellsWithoutPath
|
||||
return aGEOMObject._retn();
|
||||
|
||||
for (ind = 0; ind < aNbBases; ind++) {
|
||||
if (theBases[ind] == NULL) continue;
|
||||
Handle(GEOM_Object) aBase = GetOperations()->GetEngine()->
|
||||
GetObject(theBases[ind]->GetStudyID(), theBases[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aBase = GetObjectImpl(theBases[ind]);
|
||||
if (aBase.IsNull())
|
||||
continue;
|
||||
if (aNbLocs) {
|
||||
Handle(GEOM_Object) aLoc = GetOperations()->GetEngine()->GetObject
|
||||
(theLocations[ind]->GetStudyID(), theLocations[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aLoc = GetObjectImpl(theLocations[ind]);
|
||||
if (aLoc.IsNull())
|
||||
continue;
|
||||
aSeqLocations->Append(aLoc);
|
||||
@ -838,15 +769,10 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePipeBiNormalAlongVector
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theBase == NULL || thePath == NULL || theVec == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aBase = GetOperations()->GetEngine()->GetObject
|
||||
(theBase->GetStudyID(), theBase->GetEntry());
|
||||
Handle(GEOM_Object) aPath = GetOperations()->GetEngine()->GetObject
|
||||
(thePath->GetStudyID(), thePath->GetEntry());
|
||||
Handle(GEOM_Object) aVec = GetOperations()->GetEngine()->GetObject
|
||||
(theVec->GetStudyID(), theVec->GetEntry());
|
||||
Handle(GEOM_Object) aBase = GetObjectImpl(theBase);
|
||||
Handle(GEOM_Object) aPath = GetObjectImpl(thePath);
|
||||
Handle(GEOM_Object) aVec = GetObjectImpl(theVec);
|
||||
|
||||
if (aBase.IsNull() || aPath.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#include <Standard_Stream.hxx>
|
||||
|
||||
#include "GEOM_IBasicOperations_i.hh"
|
||||
@ -68,7 +68,6 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointXYZ
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
//Create the point
|
||||
|
||||
Handle(GEOM_Object) anObject = GetOperations()->MakePointXYZ(theX, theY, theZ);
|
||||
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
@ -89,18 +88,13 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointWithReference
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if(theReference == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference point
|
||||
|
||||
Handle(GEOM_Object) aRefernce = GetOperations()->GetEngine()->GetObject
|
||||
(theReference->GetStudyID(), theReference->GetEntry());
|
||||
if (aRefernce.IsNull()) return aGEOMObject._retn();
|
||||
Handle(GEOM_Object) aReference = GetObjectImpl(theReference);
|
||||
if (aReference.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the point
|
||||
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->MakePointWithReference(aRefernce, theX, theY, theZ);
|
||||
GetOperations()->MakePointWithReference(aReference, theX, theY, theZ);
|
||||
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
@ -120,18 +114,12 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnLinesIntersection
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theLine1 == NULL || theLine2 == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference Lines
|
||||
|
||||
Handle(GEOM_Object) aRef1 = GetOperations()->GetEngine()->GetObject
|
||||
(theLine1->GetStudyID(), theLine1->GetEntry());
|
||||
Handle(GEOM_Object) aRef2 = GetOperations()->GetEngine()->GetObject
|
||||
(theLine2->GetStudyID(), theLine2->GetEntry());
|
||||
Handle(GEOM_Object) aRef1 = GetObjectImpl(theLine1);
|
||||
Handle(GEOM_Object) aRef2 = GetObjectImpl(theLine2);
|
||||
if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the point
|
||||
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->MakePointOnLinesIntersection(aRef1, aRef2);
|
||||
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||
@ -140,7 +128,6 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnLinesIntersection
|
||||
return GetObject(anObject);
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* MakePointOnCurve
|
||||
@ -154,25 +141,19 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnCurve
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theCurve == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference curve
|
||||
|
||||
Handle(GEOM_Object) aRefernce = GetOperations()->GetEngine()->GetObject
|
||||
(theCurve->GetStudyID(), theCurve->GetEntry());
|
||||
if (aRefernce.IsNull()) return aGEOMObject._retn();
|
||||
Handle(GEOM_Object) aReference = GetObjectImpl(theCurve);
|
||||
if (aReference.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the point
|
||||
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->MakePointOnCurve(aRefernce, theParameter);
|
||||
GetOperations()->MakePointOnCurve(aReference, theParameter);
|
||||
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
return GetObject(anObject);
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* MakePointOnSurface
|
||||
@ -188,16 +169,13 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnSurface
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theSurface == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference surface
|
||||
Handle(GEOM_Object) aRefernce = GetOperations()->GetEngine()->GetObject
|
||||
(theSurface->GetStudyID(), theSurface->GetEntry());
|
||||
if (aRefernce.IsNull()) return aGEOMObject._retn();
|
||||
Handle(GEOM_Object) aReference = GetObjectImpl(theSurface);
|
||||
if (aReference.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the point
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->MakePointOnSurface(aRefernce, theUParameter, theVParameter);
|
||||
GetOperations()->MakePointOnSurface(aReference, theUParameter, theVParameter);
|
||||
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
@ -218,25 +196,19 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeTangentOnCurve
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theCurve == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference curve
|
||||
Handle(GEOM_Object) aReference = GetObjectImpl(theCurve);
|
||||
if (aReference.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
Handle(GEOM_Object) aRefernce = GetOperations()->GetEngine()->GetObject
|
||||
(theCurve->GetStudyID(), theCurve->GetEntry());
|
||||
if (aRefernce.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the point
|
||||
|
||||
//Create the vector
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->MakeTangentOnCurve(aRefernce, theParameter);
|
||||
GetOperations()->MakeTangentOnCurve(aReference, theParameter);
|
||||
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
return GetObject(anObject);
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* MakeVectorDXDYDZ
|
||||
@ -272,20 +244,13 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeVectorTwoPnt
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (thePnt1 == NULL || thePnt2 == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference points
|
||||
|
||||
Handle(GEOM_Object) aRef1 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt1->GetStudyID(), thePnt1->GetEntry());
|
||||
Handle(GEOM_Object) aRef2 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt2->GetStudyID(), thePnt2->GetEntry());
|
||||
Handle(GEOM_Object) aRef1 = GetObjectImpl(thePnt1);
|
||||
Handle(GEOM_Object) aRef2 = GetObjectImpl(thePnt2);
|
||||
if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the vector
|
||||
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->MakeVectorTwoPnt(aRef1, aRef2);
|
||||
Handle(GEOM_Object) anObject = GetOperations()->MakeVectorTwoPnt(aRef1, aRef2);
|
||||
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
@ -306,20 +271,13 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeLine
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (thePnt == NULL || theDir == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference objects
|
||||
|
||||
Handle(GEOM_Object) aRef1 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt->GetStudyID(), thePnt->GetEntry());
|
||||
Handle(GEOM_Object) aRef2 = GetOperations()->GetEngine()->GetObject
|
||||
(theDir->GetStudyID(), theDir->GetEntry());
|
||||
Handle(GEOM_Object) aRef1 = GetObjectImpl(thePnt);
|
||||
Handle(GEOM_Object) aRef2 = GetObjectImpl(theDir);
|
||||
if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the Line
|
||||
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->MakeLine(aRef1, aRef2);
|
||||
Handle(GEOM_Object) anObject = GetOperations()->MakeLine(aRef1, aRef2);
|
||||
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
@ -339,20 +297,13 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeLineTwoPnt
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (thePnt1 == NULL || thePnt2 == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference points
|
||||
|
||||
Handle(GEOM_Object) aRef1 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt1->GetStudyID(), thePnt1->GetEntry());
|
||||
Handle(GEOM_Object) aRef2 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt2->GetStudyID(), thePnt2->GetEntry());
|
||||
Handle(GEOM_Object) aRef1 = GetObjectImpl(thePnt1);
|
||||
Handle(GEOM_Object) aRef2 = GetObjectImpl(thePnt2);
|
||||
if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the Line
|
||||
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->MakeLineTwoPnt(aRef1, aRef2);
|
||||
Handle(GEOM_Object) anObject = GetOperations()->MakeLineTwoPnt(aRef1, aRef2);
|
||||
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
@ -372,18 +323,12 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeLineTwoFaces
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theFace1 == NULL || theFace2 == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference points
|
||||
|
||||
Handle(GEOM_Object) aRef1 = GetOperations()->GetEngine()->GetObject
|
||||
(theFace1->GetStudyID(), theFace1->GetEntry());
|
||||
Handle(GEOM_Object) aRef2 = GetOperations()->GetEngine()->GetObject
|
||||
(theFace2->GetStudyID(), theFace2->GetEntry());
|
||||
Handle(GEOM_Object) aRef1 = GetObjectImpl(theFace1);
|
||||
Handle(GEOM_Object) aRef2 = GetObjectImpl(theFace2);
|
||||
if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the Line
|
||||
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->MakeLineTwoFaces(aRef1, aRef2);
|
||||
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||
@ -392,6 +337,7 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeLineTwoFaces
|
||||
return GetObject(anObject);
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* MakePlanePntVec
|
||||
@ -406,18 +352,12 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlanePntVec
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (thePnt == NULL || theVec == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the references
|
||||
|
||||
Handle(GEOM_Object) aRef1 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt->GetStudyID(), thePnt->GetEntry());
|
||||
Handle(GEOM_Object) aRef2 = GetOperations()->GetEngine()->GetObject
|
||||
(theVec->GetStudyID(), theVec->GetEntry());
|
||||
Handle(GEOM_Object) aRef1 = GetObjectImpl(thePnt);
|
||||
Handle(GEOM_Object) aRef2 = GetObjectImpl(theVec);
|
||||
if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the plane
|
||||
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->MakePlanePntVec(aRef1, aRef2, theTrimSize);
|
||||
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||
@ -440,22 +380,14 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlaneThreePnt
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (thePnt1 == NULL || thePnt2 == NULL || thePnt3 == NULL)
|
||||
return aGEOMObject._retn();
|
||||
|
||||
//Get the reference points
|
||||
|
||||
Handle(GEOM_Object) aRef1 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt1->GetStudyID(), thePnt1->GetEntry());
|
||||
Handle(GEOM_Object) aRef2 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt2->GetStudyID(), thePnt2->GetEntry());
|
||||
Handle(GEOM_Object) aRef3 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt3->GetStudyID(), thePnt3->GetEntry());
|
||||
Handle(GEOM_Object) aRef1 = GetObjectImpl(thePnt1);
|
||||
Handle(GEOM_Object) aRef2 = GetObjectImpl(thePnt2);
|
||||
Handle(GEOM_Object) aRef3 = GetObjectImpl(thePnt3);
|
||||
if (aRef1.IsNull() || aRef2.IsNull() || aRef3.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
//Create the plane
|
||||
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->MakePlaneThreePnt(aRef1, aRef2, aRef3, theTrimSize);
|
||||
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||
@ -477,16 +409,11 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlaneFace
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theFace == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference face
|
||||
|
||||
Handle(GEOM_Object) aRef = GetOperations()->GetEngine()->GetObject
|
||||
(theFace->GetStudyID(), theFace->GetEntry());
|
||||
Handle(GEOM_Object) aRef = GetObjectImpl(theFace);
|
||||
if (aRef.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the plane
|
||||
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->MakePlaneFace(aRef, theTrimSize);
|
||||
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||
@ -538,16 +465,11 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeTangentPlaneOnFace
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theFace == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference face
|
||||
|
||||
Handle(GEOM_Object) aRef = GetOperations()->GetEngine()->GetObject
|
||||
(theFace->GetStudyID(), theFace->GetEntry());
|
||||
Handle(GEOM_Object) aRef = GetObjectImpl(theFace);
|
||||
if (aRef.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the plane
|
||||
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->MakeTangentPlaneOnFace(aRef, theParameterU,theParameterV,theTrimSize);
|
||||
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||
@ -555,4 +477,3 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeTangentPlaneOnFace
|
||||
|
||||
return GetObject(anObject);
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#include <Standard_Stream.hxx>
|
||||
|
||||
#include "GEOM_IBlocksOperations_i.hh"
|
||||
@ -73,18 +73,11 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeQuad
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theEdge1 == NULL || theEdge2 == NULL ||
|
||||
theEdge3 == NULL || theEdge4 == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference edges
|
||||
Handle(GEOM_Object) anEdge1 = GetOperations()->GetEngine()->GetObject
|
||||
(theEdge1->GetStudyID(), theEdge1->GetEntry());
|
||||
Handle(GEOM_Object) anEdge2 = GetOperations()->GetEngine()->GetObject
|
||||
(theEdge2->GetStudyID(), theEdge2->GetEntry());
|
||||
Handle(GEOM_Object) anEdge3 = GetOperations()->GetEngine()->GetObject
|
||||
(theEdge3->GetStudyID(), theEdge3->GetEntry());
|
||||
Handle(GEOM_Object) anEdge4 = GetOperations()->GetEngine()->GetObject
|
||||
(theEdge4->GetStudyID(), theEdge4->GetEntry());
|
||||
Handle(GEOM_Object) anEdge1 = GetObjectImpl(theEdge1);
|
||||
Handle(GEOM_Object) anEdge2 = GetObjectImpl(theEdge2);
|
||||
Handle(GEOM_Object) anEdge3 = GetObjectImpl(theEdge3);
|
||||
Handle(GEOM_Object) anEdge4 = GetObjectImpl(theEdge4);
|
||||
|
||||
if (anEdge1.IsNull() || anEdge2.IsNull() ||
|
||||
anEdge3.IsNull() || anEdge4.IsNull()) return aGEOMObject._retn();
|
||||
@ -111,13 +104,9 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeQuad2Edges
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theEdge1 == NULL || theEdge2 == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference edges
|
||||
Handle(GEOM_Object) anEdge1 = GetOperations()->GetEngine()->GetObject
|
||||
(theEdge1->GetStudyID(), theEdge1->GetEntry());
|
||||
Handle(GEOM_Object) anEdge2 = GetOperations()->GetEngine()->GetObject
|
||||
(theEdge2->GetStudyID(), theEdge2->GetEntry());
|
||||
Handle(GEOM_Object) anEdge1 = GetObjectImpl(theEdge1);
|
||||
Handle(GEOM_Object) anEdge2 = GetObjectImpl(theEdge2);
|
||||
|
||||
if (anEdge1.IsNull() || anEdge2.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -144,18 +133,11 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeQuad4Vertices
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (thePnt1 == NULL || thePnt2 == NULL ||
|
||||
thePnt3 == NULL || thePnt4 == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference points
|
||||
Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt1->GetStudyID(), thePnt1->GetEntry());
|
||||
Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt2->GetStudyID(), thePnt2->GetEntry());
|
||||
Handle(GEOM_Object) aPnt3 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt3->GetStudyID(), thePnt3->GetEntry());
|
||||
Handle(GEOM_Object) aPnt4 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt4->GetStudyID(), thePnt4->GetEntry());
|
||||
Handle(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
|
||||
Handle(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
|
||||
Handle(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
|
||||
Handle(GEOM_Object) aPnt4 = GetObjectImpl(thePnt4);
|
||||
|
||||
if (aPnt1.IsNull() || aPnt2.IsNull() ||
|
||||
aPnt3.IsNull() || aPnt4.IsNull()) return aGEOMObject._retn();
|
||||
@ -184,23 +166,13 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeHexa
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theFace1 == NULL || theFace2 == NULL ||
|
||||
theFace3 == NULL || theFace4 == NULL ||
|
||||
theFace5 == NULL || theFace6 == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference Faces
|
||||
Handle(GEOM_Object) anFace1 = GetOperations()->GetEngine()->GetObject
|
||||
(theFace1->GetStudyID(), theFace1->GetEntry());
|
||||
Handle(GEOM_Object) anFace2 = GetOperations()->GetEngine()->GetObject
|
||||
(theFace2->GetStudyID(), theFace2->GetEntry());
|
||||
Handle(GEOM_Object) anFace3 = GetOperations()->GetEngine()->GetObject
|
||||
(theFace3->GetStudyID(), theFace3->GetEntry());
|
||||
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());
|
||||
Handle(GEOM_Object) anFace1 = GetObjectImpl(theFace1);
|
||||
Handle(GEOM_Object) anFace2 = GetObjectImpl(theFace2);
|
||||
Handle(GEOM_Object) anFace3 = GetObjectImpl(theFace3);
|
||||
Handle(GEOM_Object) anFace4 = GetObjectImpl(theFace4);
|
||||
Handle(GEOM_Object) anFace5 = GetObjectImpl(theFace5);
|
||||
Handle(GEOM_Object) anFace6 = GetObjectImpl(theFace6);
|
||||
|
||||
if (anFace1.IsNull() || anFace2.IsNull() ||
|
||||
anFace3.IsNull() || anFace4.IsNull() ||
|
||||
@ -228,13 +200,9 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeHexa2Faces
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theFace1 == NULL || theFace2 == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference Faces
|
||||
Handle(GEOM_Object) anFace1 = GetOperations()->GetEngine()->GetObject
|
||||
(theFace1->GetStudyID(), theFace1->GetEntry());
|
||||
Handle(GEOM_Object) anFace2 = GetOperations()->GetEngine()->GetObject
|
||||
(theFace2->GetStudyID(), theFace2->GetEntry());
|
||||
Handle(GEOM_Object) anFace1 = GetObjectImpl(theFace1);
|
||||
Handle(GEOM_Object) anFace2 = GetObjectImpl(theFace2);
|
||||
|
||||
if (anFace1.IsNull() || anFace2.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -260,12 +228,8 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeBlockCompound
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theCompound == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference Compound
|
||||
Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject
|
||||
(theCompound->GetStudyID(), theCompound->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aCompound = GetObjectImpl(theCompound);
|
||||
if (aCompound.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the Blocks Compound
|
||||
@ -293,12 +257,8 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetPoint (GEOM::GEOM_Object_ptr
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference Objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
if (aShape.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the Point
|
||||
@ -324,16 +284,10 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetEdge (GEOM::GEOM_Object_ptr t
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL ||
|
||||
thePoint1 == NULL || thePoint2 == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference Objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aPoint1 = GetOperations()->GetEngine()->GetObject
|
||||
(thePoint1->GetStudyID(), thePoint1->GetEntry());
|
||||
Handle(GEOM_Object) aPoint2 = GetOperations()->GetEngine()->GetObject
|
||||
(thePoint2->GetStudyID(), thePoint2->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
|
||||
Handle(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
|
||||
|
||||
if (aShape.IsNull() ||
|
||||
aPoint1.IsNull() || aPoint2.IsNull()) return aGEOMObject._retn();
|
||||
@ -360,13 +314,9 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetEdgeNearPoint (GEOM::GEOM_Obj
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL || thePoint == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference Objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aPoint = GetOperations()->GetEngine()->GetObject
|
||||
(thePoint->GetStudyID(), thePoint->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) aPoint = GetObjectImpl(thePoint);
|
||||
|
||||
if (aShape.IsNull() || aPoint.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -396,21 +346,12 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetFaceByPoints
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL ||
|
||||
thePoint1 == NULL || thePoint2 == NULL ||
|
||||
thePoint3 == NULL || thePoint4 == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference Objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aPoint1 = GetOperations()->GetEngine()->GetObject
|
||||
(thePoint1->GetStudyID(), thePoint1->GetEntry());
|
||||
Handle(GEOM_Object) aPoint2 = GetOperations()->GetEngine()->GetObject
|
||||
(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());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
|
||||
Handle(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
|
||||
Handle(GEOM_Object) aPoint3 = GetObjectImpl(thePoint3);
|
||||
Handle(GEOM_Object) aPoint4 = GetObjectImpl(thePoint4);
|
||||
|
||||
if (aShape.IsNull() ||
|
||||
aPoint1.IsNull() || aPoint2.IsNull() ||
|
||||
@ -440,16 +381,10 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetFaceByEdges
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL ||
|
||||
theEdge1 == NULL || theEdge2 == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference Objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) anEdge1 = GetOperations()->GetEngine()->GetObject
|
||||
(theEdge1->GetStudyID(), theEdge1->GetEntry());
|
||||
Handle(GEOM_Object) anEdge2 = GetOperations()->GetEngine()->GetObject
|
||||
(theEdge2->GetStudyID(), theEdge2->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) anEdge1 = GetObjectImpl(theEdge1);
|
||||
Handle(GEOM_Object) anEdge2 = GetObjectImpl(theEdge2);
|
||||
|
||||
if (aShape.IsNull() ||
|
||||
anEdge1.IsNull() || anEdge2.IsNull()) return aGEOMObject._retn();
|
||||
@ -476,13 +411,9 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetOppositeFace (GEOM::GEOM_Obje
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL || theFace == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference Objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aFace = GetOperations()->GetEngine()->GetObject
|
||||
(theFace->GetStudyID(), theFace->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) aFace = GetObjectImpl(theFace);
|
||||
|
||||
if (aShape.IsNull() || aFace.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -508,13 +439,9 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetFaceNearPoint (GEOM::GEOM_Obj
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL || thePoint == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference Objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aPoint = GetOperations()->GetEngine()->GetObject
|
||||
(thePoint->GetStudyID(), thePoint->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) aPoint = GetObjectImpl(thePoint);
|
||||
|
||||
if (aShape.IsNull() || aPoint.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -540,13 +467,9 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetFaceByNormale (GEOM::GEOM_Obj
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL || theVector == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference Objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aVector = GetOperations()->GetEngine()->GetObject
|
||||
(theVector->GetStudyID(), theVector->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) aVector = GetObjectImpl(theVector);
|
||||
|
||||
if (aShape.IsNull() || aVector.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -574,12 +497,8 @@ GEOM::ListOfGO* GEOM_IBlocksOperations_i::ExplodeCompoundOfBlocks
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theCompound == NULL) return aSeq._retn();
|
||||
|
||||
//Get the reference Compound
|
||||
Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject
|
||||
(theCompound->GetStudyID(), theCompound->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aCompound = GetObjectImpl(theCompound);
|
||||
if (aCompound.IsNull()) return aSeq._retn();
|
||||
|
||||
//Explode
|
||||
@ -613,12 +532,8 @@ CORBA::Boolean GEOM_IBlocksOperations_i::IsCompoundOfBlocks
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theCompound == NULL) return isComp;
|
||||
|
||||
//Get the reference Compound
|
||||
Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject
|
||||
(theCompound->GetStudyID(), theCompound->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aCompound = GetObjectImpl(theCompound);
|
||||
if (aCompound.IsNull()) return isComp;
|
||||
|
||||
//Check
|
||||
@ -648,12 +563,8 @@ CORBA::Boolean GEOM_IBlocksOperations_i::CheckCompoundOfBlocks
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theCompound == NULL) return isComp;
|
||||
|
||||
//Get the reference Compound
|
||||
Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject
|
||||
(theCompound->GetStudyID(), theCompound->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aCompound = GetObjectImpl(theCompound);
|
||||
if (aCompound.IsNull()) return isComp;
|
||||
|
||||
//Check
|
||||
@ -727,9 +638,7 @@ char* GEOM_IBlocksOperations_i::PrintBCErrors
|
||||
const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors)
|
||||
{
|
||||
//Get the reference Compound
|
||||
if (theCompound == NULL) return NULL;
|
||||
Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject
|
||||
(theCompound->GetStudyID(), theCompound->GetEntry());
|
||||
Handle(GEOM_Object) aCompound = GetObjectImpl(theCompound);
|
||||
if (aCompound.IsNull()) return NULL;
|
||||
|
||||
// Convert the errors sequence
|
||||
@ -787,12 +696,8 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::RemoveExtraEdges (GEOM::GEOM_Obj
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference Objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
if (aShape.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the result
|
||||
@ -816,12 +721,8 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::CheckAndImprove (GEOM::GEOM_Obje
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theCompound == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference Objects
|
||||
Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject
|
||||
(theCompound->GetStudyID(), theCompound->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aCompound = GetObjectImpl(theCompound);
|
||||
if (aCompound.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the result
|
||||
@ -846,13 +747,9 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetBlockNearPoint (GEOM::GEOM_Ob
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theCompound == NULL || thePoint == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference Objects
|
||||
Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject
|
||||
(theCompound->GetStudyID(), theCompound->GetEntry());
|
||||
Handle(GEOM_Object) aPoint = GetOperations()->GetEngine()->GetObject
|
||||
(thePoint->GetStudyID(), thePoint->GetEntry());
|
||||
Handle(GEOM_Object) aCompound = GetObjectImpl(theCompound);
|
||||
Handle(GEOM_Object) aPoint = GetObjectImpl(thePoint);
|
||||
|
||||
if (aCompound.IsNull() || aPoint.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -878,12 +775,8 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetBlockByParts (GEOM::GEOM_Obje
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theCompound == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference Compound
|
||||
Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject
|
||||
(theCompound->GetStudyID(), theCompound->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aCompound = GetObjectImpl(theCompound);
|
||||
if (aCompound.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the parts
|
||||
@ -892,9 +785,7 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetBlockByParts (GEOM::GEOM_Obje
|
||||
|
||||
aLen = theParts.length();
|
||||
for (ind = 0; ind < aLen; ind++) {
|
||||
if (theParts[ind] == NULL) return aGEOMObject._retn();
|
||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
||||
(theParts[ind]->GetStudyID(), theParts[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aSh = GetObjectImpl(theParts[ind]);
|
||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||
aParts->Append(aSh);
|
||||
}
|
||||
@ -921,12 +812,8 @@ GEOM::ListOfGO* GEOM_IBlocksOperations_i::GetBlocksByParts (GEOM::GEOM_Object_pt
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theCompound == NULL) return aSeq._retn();
|
||||
|
||||
//Get the reference Compound
|
||||
Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject
|
||||
(theCompound->GetStudyID(), theCompound->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aCompound = GetObjectImpl(theCompound);
|
||||
if (aCompound.IsNull()) return aSeq._retn();
|
||||
|
||||
//Get the parts
|
||||
@ -935,9 +822,7 @@ GEOM::ListOfGO* GEOM_IBlocksOperations_i::GetBlocksByParts (GEOM::GEOM_Object_pt
|
||||
|
||||
aLen = theParts.length();
|
||||
for (ind = 0; ind < aLen; ind++) {
|
||||
if (theParts[ind] == NULL) return aSeq._retn();
|
||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
||||
(theParts[ind]->GetStudyID(), theParts[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aSh = GetObjectImpl(theParts[ind]);
|
||||
if (aSh.IsNull()) return aSeq._retn();
|
||||
aParts->Append(aSh);
|
||||
}
|
||||
@ -972,12 +857,8 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeMultiTransformation1D
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theBlock == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the object itself and the vector of translation
|
||||
Handle(GEOM_Object) aBasicObject = GetOperations()->GetEngine()->GetObject
|
||||
(theBlock->GetStudyID(), theBlock->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theBlock);
|
||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the transformation
|
||||
@ -1007,12 +888,8 @@ GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeMultiTransformation2D
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theBlock == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the object itself
|
||||
Handle(GEOM_Object) aBasicObject = GetOperations()->GetEngine()->GetObject
|
||||
(theBlock->GetStudyID(), theBlock->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theBlock);
|
||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the transformation
|
||||
@ -1037,12 +914,8 @@ GEOM::ListOfGO* GEOM_IBlocksOperations_i::Propagate (GEOM::GEOM_Object_ptr theSh
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL) return aSeq._retn();
|
||||
|
||||
//Get the reference Shape
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
if (aShape.IsNull()) return aSeq._retn();
|
||||
|
||||
//Get the Propagation chains
|
||||
|
@ -18,7 +18,7 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#include <Standard_Stream.hxx>
|
||||
|
||||
#include "GEOM_IBooleanOperations_i.hh"
|
||||
@ -70,15 +70,9 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakeBoolean
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape1 == NULL || theShape2 == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference shapes
|
||||
CORBA::String_var entry=theShape1->GetEntry();
|
||||
Handle(GEOM_Object) aSh1 = GetOperations()->GetEngine()->GetObject
|
||||
(theShape1->GetStudyID(), entry);
|
||||
entry=theShape2->GetEntry();
|
||||
Handle(GEOM_Object) aSh2 = GetOperations()->GetEngine()->GetObject
|
||||
(theShape2->GetStudyID(), entry);
|
||||
Handle(GEOM_Object) aSh1 = GetObjectImpl(theShape1);
|
||||
Handle(GEOM_Object) aSh2 = GetObjectImpl(theShape2);
|
||||
|
||||
if (aSh1.IsNull() || aSh2.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -120,9 +114,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartition
|
||||
//Get the shapes
|
||||
aLen = theShapes.length();
|
||||
for (ind = 0; ind < aLen; ind++) {
|
||||
if (theShapes[ind] == NULL) return aGEOMObject._retn();
|
||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
||||
(theShapes[ind]->GetStudyID(), theShapes[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aSh = GetObjectImpl(theShapes[ind]);
|
||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||
aShapes->Append(aSh);
|
||||
}
|
||||
@ -130,9 +122,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartition
|
||||
//Get the tools
|
||||
aLen = theTools.length();
|
||||
for (ind = 0; ind < aLen; ind++) {
|
||||
if (theTools[ind] == NULL) return aGEOMObject._retn();
|
||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
||||
(theTools[ind]->GetStudyID(), theTools[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aSh = GetObjectImpl(theTools[ind]);
|
||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||
aTools->Append(aSh);
|
||||
}
|
||||
@ -140,9 +130,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartition
|
||||
//Get the keep inside shapes
|
||||
aLen = theKeepIns.length();
|
||||
for (ind = 0; ind < aLen; ind++) {
|
||||
if (theKeepIns[ind] == NULL) return aGEOMObject._retn();
|
||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
||||
(theKeepIns[ind]->GetStudyID(), theKeepIns[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aSh = GetObjectImpl(theKeepIns[ind]);
|
||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||
aKeepIns->Append(aSh);
|
||||
}
|
||||
@ -150,9 +138,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartition
|
||||
//Get the remove inside shapes
|
||||
aLen = theRemoveIns.length();
|
||||
for (ind = 0; ind < aLen; ind++) {
|
||||
if (theRemoveIns[ind] == NULL) return aGEOMObject._retn();
|
||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
||||
(theRemoveIns[ind]->GetStudyID(), theRemoveIns[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aSh = GetObjectImpl(theRemoveIns[ind]);
|
||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||
aRemIns->Append(aSh);
|
||||
}
|
||||
@ -208,9 +194,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartitionNonSelfIntersected
|
||||
//Get the shapes
|
||||
aLen = theShapes.length();
|
||||
for (ind = 0; ind < aLen; ind++) {
|
||||
if (theShapes[ind] == NULL) return aGEOMObject._retn();
|
||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
||||
(theShapes[ind]->GetStudyID(), theShapes[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aSh = GetObjectImpl(theShapes[ind]);
|
||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||
aShapes->Append(aSh);
|
||||
}
|
||||
@ -218,9 +202,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartitionNonSelfIntersected
|
||||
//Get the tools
|
||||
aLen = theTools.length();
|
||||
for (ind = 0; ind < aLen; ind++) {
|
||||
if (theTools[ind] == NULL) return aGEOMObject._retn();
|
||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
||||
(theTools[ind]->GetStudyID(), theTools[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aSh = GetObjectImpl(theTools[ind]);
|
||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||
aTools->Append(aSh);
|
||||
}
|
||||
@ -228,9 +210,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartitionNonSelfIntersected
|
||||
//Get the keep inside shapes
|
||||
aLen = theKeepIns.length();
|
||||
for (ind = 0; ind < aLen; ind++) {
|
||||
if (theKeepIns[ind] == NULL) return aGEOMObject._retn();
|
||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
||||
(theKeepIns[ind]->GetStudyID(), theKeepIns[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aSh = GetObjectImpl(theKeepIns[ind]);
|
||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||
aKeepIns->Append(aSh);
|
||||
}
|
||||
@ -238,9 +218,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartitionNonSelfIntersected
|
||||
//Get the remove inside shapes
|
||||
aLen = theRemoveIns.length();
|
||||
for (ind = 0; ind < aLen; ind++) {
|
||||
if (theRemoveIns[ind] == NULL) return aGEOMObject._retn();
|
||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
||||
(theRemoveIns[ind]->GetStudyID(), theRemoveIns[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aSh = GetObjectImpl(theRemoveIns[ind]);
|
||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||
aRemIns->Append(aSh);
|
||||
}
|
||||
@ -280,13 +258,9 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakeHalfPartition
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL || thePlane == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference shapes
|
||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aPl = GetOperations()->GetEngine()->GetObject
|
||||
(thePlane->GetStudyID(), thePlane->GetEntry());
|
||||
Handle(GEOM_Object) aSh = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) aPl = GetObjectImpl(thePlane);
|
||||
|
||||
if (aSh.IsNull() || aPl.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#include <Standard_Stream.hxx>
|
||||
|
||||
#include "GEOM_ICurvesOperations_i.hh"
|
||||
@ -69,13 +69,9 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeCirclePntVecR
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (thePnt == NULL || theVec == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference points
|
||||
Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt->GetStudyID(), thePnt->GetEntry());
|
||||
Handle(GEOM_Object) aVec = GetOperations()->GetEngine()->GetObject
|
||||
(theVec->GetStudyID(), theVec->GetEntry());
|
||||
Handle(GEOM_Object) aPnt = GetObjectImpl(thePnt);
|
||||
Handle(GEOM_Object) aVec = GetObjectImpl(theVec);
|
||||
|
||||
if (aPnt.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -102,15 +98,10 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeCircleThreePnt
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (thePnt1 == NULL || thePnt2 == NULL || thePnt3 == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference points
|
||||
Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt1->GetStudyID(), thePnt1->GetEntry());
|
||||
Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt2->GetStudyID(), thePnt2->GetEntry());
|
||||
Handle(GEOM_Object) aPnt3 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt3->GetStudyID(), thePnt3->GetEntry());
|
||||
Handle(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
|
||||
Handle(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
|
||||
Handle(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
|
||||
|
||||
if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -137,15 +128,10 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeCircleCenter2Pnt
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (thePnt1 == NULL || thePnt2 == NULL || thePnt3 == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference points
|
||||
Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt1->GetStudyID(), thePnt1->GetEntry());
|
||||
Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt2->GetStudyID(), thePnt2->GetEntry());
|
||||
Handle(GEOM_Object) aPnt3 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt3->GetStudyID(), thePnt3->GetEntry());
|
||||
Handle(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
|
||||
Handle(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
|
||||
Handle(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
|
||||
|
||||
if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -171,13 +157,9 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeEllipse
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (thePnt == NULL || theVec == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the arguments
|
||||
Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt->GetStudyID(), thePnt->GetEntry());
|
||||
Handle(GEOM_Object) aVec = GetOperations()->GetEngine()->GetObject
|
||||
(theVec->GetStudyID(), theVec->GetEntry());
|
||||
Handle(GEOM_Object) aPnt = GetObjectImpl(thePnt);
|
||||
Handle(GEOM_Object) aVec = GetObjectImpl(theVec);
|
||||
Handle(GEOM_Object) aVecMaj;
|
||||
|
||||
if (aPnt.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
|
||||
@ -207,14 +189,11 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeEllipseVec
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
//Get the arguments
|
||||
Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt->GetStudyID(), thePnt->GetEntry());
|
||||
Handle(GEOM_Object) aVec = GetOperations()->GetEngine()->GetObject
|
||||
(theVec->GetStudyID(), theVec->GetEntry());
|
||||
Handle(GEOM_Object) aPnt = GetObjectImpl(thePnt);
|
||||
Handle(GEOM_Object) aVec = GetObjectImpl(theVec);
|
||||
Handle(GEOM_Object) aVecMaj;
|
||||
if (!CORBA::is_nil(theVecMaj)) {
|
||||
aVecMaj = GetOperations()->GetEngine()->GetObject
|
||||
(theVecMaj->GetStudyID(), theVecMaj->GetEntry());
|
||||
aVecMaj = GetObjectImpl(theVecMaj);
|
||||
if (aVecMaj.IsNull()) return aGEOMObject._retn();
|
||||
}
|
||||
|
||||
@ -242,15 +221,10 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeArc
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (thePnt1 == NULL || thePnt2 == NULL || thePnt3 == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference points
|
||||
Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt1->GetStudyID(), thePnt1->GetEntry());
|
||||
Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt2->GetStudyID(), thePnt2->GetEntry());
|
||||
Handle(GEOM_Object) aPnt3 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt3->GetStudyID(), thePnt3->GetEntry());
|
||||
Handle(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
|
||||
Handle(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
|
||||
Handle(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
|
||||
|
||||
if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -280,15 +254,10 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeArcCenter
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (thePnt1 == NULL || thePnt2 == NULL || thePnt3 == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference points
|
||||
Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt1->GetStudyID(), thePnt1->GetEntry());
|
||||
Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt2->GetStudyID(), thePnt2->GetEntry());
|
||||
Handle(GEOM_Object) aPnt3 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt3->GetStudyID(), thePnt3->GetEntry());
|
||||
Handle(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
|
||||
Handle(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
|
||||
Handle(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
|
||||
|
||||
if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -300,6 +269,7 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeArcCenter
|
||||
|
||||
return GetObject(anObject);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* MakePolyline
|
||||
@ -318,11 +288,7 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakePolyline
|
||||
int aLen = thePoints.length();
|
||||
list<Handle(GEOM_Object)> aPoints;
|
||||
for (; ind < aLen; ind++) {
|
||||
if (thePoints[ind] == NULL) return aGEOMObject._retn();
|
||||
|
||||
Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject
|
||||
(thePoints[ind]->GetStudyID(), thePoints[ind]->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]);
|
||||
if (aPnt.IsNull()) return aGEOMObject._retn();
|
||||
aPoints.push_back(aPnt);
|
||||
}
|
||||
@ -354,11 +320,7 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSplineBezier
|
||||
int aLen = thePoints.length();
|
||||
list<Handle(GEOM_Object)> aPoints;
|
||||
for (; ind < aLen; ind++) {
|
||||
if (thePoints[ind] == NULL) return aGEOMObject._retn();
|
||||
|
||||
Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject
|
||||
(thePoints[ind]->GetStudyID(), thePoints[ind]->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]);
|
||||
if (aPnt.IsNull()) return aGEOMObject._retn();
|
||||
aPoints.push_back(aPnt);
|
||||
}
|
||||
@ -390,11 +352,7 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSplineInterpolation
|
||||
int aLen = thePoints.length();
|
||||
list<Handle(GEOM_Object)> aPoints;
|
||||
for (; ind < aLen; ind++) {
|
||||
if (thePoints[ind] == NULL) return aGEOMObject._retn();
|
||||
|
||||
Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject
|
||||
(thePoints[ind]->GetStudyID(), thePoints[ind]->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]);
|
||||
if (aPnt.IsNull()) return aGEOMObject._retn();
|
||||
aPoints.push_back(aPnt);
|
||||
}
|
||||
@ -446,8 +404,7 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSketcherOnPlane
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
Handle(GEOM_Object) aWorkingPlane = GetOperations()->GetEngine()->GetObject
|
||||
(theWorkingPlane->GetStudyID(), theWorkingPlane->GetEntry());
|
||||
Handle(GEOM_Object) aWorkingPlane = GetObjectImpl(theWorkingPlane);
|
||||
|
||||
// Make Sketcher
|
||||
Handle(GEOM_Object) anObject =
|
||||
|
@ -18,7 +18,7 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#include <Standard_Stream.hxx>
|
||||
|
||||
#include "GEOM_IGroupOperations_i.hh"
|
||||
@ -62,18 +62,18 @@ GEOM_IGroupOperations_i::~GEOM_IGroupOperations_i()
|
||||
* 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;
|
||||
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theMainShape == NULL || theShapeType < 0) return aGEOMObject._retn();
|
||||
if (theShapeType < 0) return aGEOMObject._retn();
|
||||
|
||||
//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();
|
||||
|
||||
//Create the Fillet
|
||||
@ -94,14 +94,11 @@ void GEOM_IGroupOperations_i::AddObject(GEOM::GEOM_Object_ptr theGroup, CORBA::L
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theGroup == NULL) return;
|
||||
|
||||
//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;
|
||||
|
||||
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
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theGroup == NULL) return;
|
||||
|
||||
//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;
|
||||
|
||||
GetOperations()->RemoveObject(aGroupRef, theSubShapeId);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -136,11 +129,8 @@ void GEOM_IGroupOperations_i::UnionList (GEOM::GEOM_Object_ptr theGroup,
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theGroup == NULL) return;
|
||||
|
||||
//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;
|
||||
|
||||
//Get sub-shape to add
|
||||
@ -148,16 +138,13 @@ void GEOM_IGroupOperations_i::UnionList (GEOM::GEOM_Object_ptr theGroup,
|
||||
|
||||
int ind, aLen = theSubShapes.length();
|
||||
for (ind = 0; ind < aLen; ind++) {
|
||||
if (theSubShapes[ind] == NULL) return;
|
||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
||||
(theSubShapes[ind]->GetStudyID(), theSubShapes[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aSh = GetObjectImpl(theSubShapes[ind]);
|
||||
if (aSh.IsNull()) return;
|
||||
aSubShapes->Append(aSh);
|
||||
}
|
||||
|
||||
//Perform the operation
|
||||
GetOperations()->UnionList(aGroupRef, aSubShapes);
|
||||
return;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -171,11 +158,8 @@ void GEOM_IGroupOperations_i::DifferenceList (GEOM::GEOM_Object_ptr theGroup,
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theGroup == NULL) return;
|
||||
|
||||
//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;
|
||||
|
||||
//Get sub-shape to remove
|
||||
@ -183,16 +167,13 @@ void GEOM_IGroupOperations_i::DifferenceList (GEOM::GEOM_Object_ptr theGroup,
|
||||
|
||||
int ind, aLen = theSubShapes.length();
|
||||
for (ind = 0; ind < aLen; ind++) {
|
||||
if (theSubShapes[ind] == NULL) return;
|
||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
||||
(theSubShapes[ind]->GetStudyID(), theSubShapes[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aSh = GetObjectImpl(theSubShapes[ind]);
|
||||
if (aSh.IsNull()) return;
|
||||
aSubShapes->Append(aSh);
|
||||
}
|
||||
|
||||
//Perform the operation
|
||||
GetOperations()->DifferenceList(aGroupRef, aSubShapes);
|
||||
return;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -206,11 +187,8 @@ void GEOM_IGroupOperations_i::UnionIDs (GEOM::GEOM_Object_ptr theGroup,
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theGroup == NULL) return;
|
||||
|
||||
//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;
|
||||
|
||||
//Get sub-shape to add
|
||||
@ -237,11 +215,8 @@ void GEOM_IGroupOperations_i::DifferenceIDs (GEOM::GEOM_Object_ptr theGroup,
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theGroup == NULL) return;
|
||||
|
||||
//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;
|
||||
|
||||
//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
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theGroup == NULL) return -1;
|
||||
|
||||
//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;
|
||||
|
||||
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
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theGroup == NULL) return aGEOMObject._retn();
|
||||
|
||||
//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();
|
||||
|
||||
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
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theGroup == NULL) return aList._retn();
|
||||
|
||||
//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();
|
||||
|
||||
aList = new GEOM::ListOfLong;
|
||||
@ -329,4 +297,3 @@ GEOM::ListOfLong* GEOM_IGroupOperations_i::GetObjects(GEOM::GEOM_Object_ptr theG
|
||||
|
||||
return aList._retn();
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#include <Standard_Stream.hxx>
|
||||
|
||||
#include <list>
|
||||
@ -115,17 +115,12 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::ProcessShape (GEOM::GEOM_Object
|
||||
// Set a not done flag
|
||||
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
|
||||
//if (theOperations.length() <= 0 || theParams.length() != theValues.length())
|
||||
// return aGEOMObject._retn();
|
||||
|
||||
// Get the object itself
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
@ -233,16 +228,13 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::SuppressFaces (GEOM::GEOM_Objec
|
||||
// Set a not done flag
|
||||
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
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
// if theFaces is empty - it's OK, it means that ALL faces must be removed
|
||||
|
||||
// Perform
|
||||
Handle(GEOM_Object) aNewObject =
|
||||
GetOperations()->SuppressFaces( anObject, Convert( theFaces ) );
|
||||
@ -266,13 +258,8 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::CloseContour (GEOM::GEOM_Object
|
||||
// Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
// Check parameters
|
||||
if ( CORBA::is_nil(theObject) )
|
||||
return aGEOMObject._retn();
|
||||
|
||||
// Get the object itself
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
@ -298,16 +285,13 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::RemoveIntWires (GEOM::GEOM_Obje
|
||||
// Set a not done flag
|
||||
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
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
// if theWires is empty - it's OK, it means that ALL wires should be removed
|
||||
|
||||
// Perform
|
||||
Handle(GEOM_Object) aNewObject =
|
||||
GetOperations()->RemoveIntWires( anObject, Convert( theWires ) );
|
||||
@ -330,16 +314,13 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::FillHoles (GEOM::GEOM_Object_pt
|
||||
// Set a not done flag
|
||||
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
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
// if theWires is empty - it's OK, it means that ALL wires should be removed
|
||||
|
||||
// Perform
|
||||
Handle(GEOM_Object) aNewObject =
|
||||
GetOperations()->FillHoles( anObject, Convert( theWires ) );
|
||||
@ -363,12 +344,11 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::Sew (GEOM::GEOM_Object_ptr theO
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
// Check parameters
|
||||
if ( CORBA::is_nil(theObject) || theTolerance < 0 )
|
||||
if (theTolerance < 0)
|
||||
return aGEOMObject._retn();
|
||||
|
||||
// Get the object itself
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
@ -397,12 +377,11 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::DivideEdge (GEOM::GEOM_Object_p
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
// Check parameters
|
||||
if ( CORBA::is_nil(theObject) || theValue < 0 || theValue > 1 )
|
||||
if (theValue < 0 || theValue > 1)
|
||||
return aGEOMObject._retn();
|
||||
|
||||
// Get the object itself
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
@ -430,12 +409,8 @@ CORBA::Boolean GEOM_IHealingOperations_i::GetFreeBoundary ( GEOM::GEOM_Object_pt
|
||||
// Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if ( CORBA::is_nil(theObject) )
|
||||
return false;
|
||||
|
||||
// Get the object itself
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull())
|
||||
return false;
|
||||
|
||||
@ -479,8 +454,7 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::ChangeOrientation (GEOM::GEOM_O
|
||||
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
||||
|
||||
// Get the object itself
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
@ -507,13 +481,8 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::ChangeOrientationCopy (GEOM::GE
|
||||
// Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
// Check parameters
|
||||
if ( CORBA::is_nil(theObject) )
|
||||
return aGEOMObject._retn();
|
||||
|
||||
// Get the object itself
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
@ -525,4 +494,3 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::ChangeOrientationCopy (GEOM::GE
|
||||
|
||||
return GetObject(aNewObject);
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#ifdef WNT
|
||||
#pragma warning( disable:4786 )
|
||||
#endif
|
||||
@ -72,13 +72,8 @@ GEOM::GEOM_Object_ptr GEOM_IInsertOperations_i::MakeCopy(GEOM::GEOM_Object_ptr t
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theOriginal == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) anOriginal =
|
||||
GetOperations()->GetEngine()->GetObject(theOriginal->GetStudyID(),
|
||||
theOriginal->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) anOriginal = GetObjectImpl(theOriginal);
|
||||
if (anOriginal.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the copy
|
||||
@ -104,13 +99,8 @@ void GEOM_IInsertOperations_i::Export
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theOriginal == NULL) return;
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) anOriginal =
|
||||
GetOperations()->GetEngine()->GetObject(theOriginal->GetStudyID(),
|
||||
theOriginal->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) anOriginal = GetObjectImpl(theOriginal);
|
||||
if (anOriginal.IsNull()) return;
|
||||
|
||||
//Export the shape to the file
|
||||
@ -119,8 +109,6 @@ void GEOM_IInsertOperations_i::Export
|
||||
GetOperations()->Export(anOriginal, aFileName, aFormatName);
|
||||
free(aFileName);
|
||||
free(aFormatName);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
@ -18,7 +18,7 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#include <Standard_Stream.hxx>
|
||||
|
||||
#include "GEOM_ILocalOperations_i.hh"
|
||||
@ -66,12 +66,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletAll
|
||||
{
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
|
||||
if (theShape == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the Fillet
|
||||
@ -94,11 +90,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletEdges
|
||||
{
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
|
||||
if (theShape == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference edges
|
||||
@ -129,11 +122,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletEdgesR1R2
|
||||
{
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
|
||||
if (theShape == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference edges
|
||||
@ -164,11 +154,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletFaces
|
||||
{
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
|
||||
if (theShape == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference faces
|
||||
@ -199,11 +186,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletFacesR1R2
|
||||
{
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
|
||||
if (theShape == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference faces
|
||||
@ -233,12 +217,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferAll
|
||||
{
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
|
||||
if (theShape == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the Chamfer
|
||||
@ -262,11 +242,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferEdge
|
||||
{
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
|
||||
if (theShape == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the Chamfer
|
||||
@ -289,11 +266,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferEdgeAD
|
||||
{
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
|
||||
if (theShape == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the Chamfer
|
||||
@ -317,11 +291,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferFaces
|
||||
{
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
|
||||
if (theShape == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference faces
|
||||
@ -352,11 +323,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferFacesAD
|
||||
{
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
|
||||
if (theShape == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference faces
|
||||
@ -388,11 +356,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferEdges
|
||||
{
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
|
||||
if (theShape == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference edges
|
||||
@ -424,11 +389,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferEdgesAD
|
||||
{
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
|
||||
if (theShape == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference edges
|
||||
@ -460,11 +422,8 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeArchimede (GEOM::GEOM_Object_
|
||||
{
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
|
||||
if (theShape == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the Archimede
|
||||
@ -484,13 +443,9 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeArchimede (GEOM::GEOM_Object_
|
||||
CORBA::Long GEOM_ILocalOperations_i::GetSubShapeIndex
|
||||
(GEOM::GEOM_Object_ptr theShape, GEOM::GEOM_Object_ptr theSubShape)
|
||||
{
|
||||
if (theShape == NULL || theSubShape == NULL) return -1;
|
||||
|
||||
//Get the reference shapes
|
||||
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aSubShapeRef = GetOperations()->GetEngine()->GetObject
|
||||
(theSubShape->GetStudyID(), theSubShape->GetEntry());
|
||||
Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) aSubShapeRef = GetObjectImpl(theSubShape);
|
||||
if (aShapeRef.IsNull() || aSubShapeRef.IsNull()) return -1;
|
||||
|
||||
//Get the unique ID of <theSubShape> inside <theShape>
|
||||
|
@ -18,7 +18,7 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#include <Standard_Stream.hxx>
|
||||
|
||||
#include "GEOM_IMeasureOperations_i.hh"
|
||||
@ -69,8 +69,7 @@ GEOM::GEOM_IKindOfShape::shape_kind GEOM_IMeasureOperations_i::KindOfShape
|
||||
GEOM::ListOfDouble_var aDoublesArray = new GEOM::ListOfDouble();
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
|
||||
if (!aShape.IsNull()) {
|
||||
Handle(TColStd_HSequenceOfInteger) anIntegers = new TColStd_HSequenceOfInteger;
|
||||
@ -117,12 +116,8 @@ void GEOM_IMeasureOperations_i::GetPosition
|
||||
Ox = Oy = Oz = Zx = Zy = Xy = Xz = 0.;
|
||||
Zz = Xx = 1.;
|
||||
|
||||
if (theShape == NULL) return;
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
if (aShape.IsNull()) return;
|
||||
|
||||
// Get shape parameters
|
||||
@ -142,12 +137,8 @@ GEOM::GEOM_Object_ptr GEOM_IMeasureOperations_i::GetCentreOfMass
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (CORBA::is_nil(theShape)) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
if (aShape.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
// Make Point - centre of mass of theShape
|
||||
@ -172,20 +163,14 @@ GEOM::GEOM_Object_ptr GEOM_IMeasureOperations_i::GetNormal
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (CORBA::is_nil(theFace)) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aFace = GetOperations()->GetEngine()->GetObject
|
||||
(theFace->GetStudyID(), theFace->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aFace = GetObjectImpl(theFace);
|
||||
if (aFace.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
// Get the OptionalPoint (can be not defined)
|
||||
Handle(GEOM_Object) anOptionalPoint = GetObjectImpl(theOptionalPoint);
|
||||
|
||||
// Make Vector - normal to theFace (in point theOptionalPoint if the face is not planar)
|
||||
Handle(GEOM_Object) anOptionalPoint;
|
||||
if (!CORBA::is_nil(theOptionalPoint)) {
|
||||
anOptionalPoint = GetOperations()->GetEngine()->GetObject
|
||||
(theOptionalPoint->GetStudyID(), theOptionalPoint->GetEntry());
|
||||
}
|
||||
Handle(GEOM_Object) anObject = GetOperations()->GetNormal(aFace, anOptionalPoint);
|
||||
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
@ -206,12 +191,8 @@ void GEOM_IMeasureOperations_i::GetBasicProperties (GEOM::GEOM_Object_ptr theSha
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL) return;
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
if (aShape.IsNull()) return;
|
||||
|
||||
// Get shape parameters
|
||||
@ -233,12 +214,8 @@ void GEOM_IMeasureOperations_i::GetInertia
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL) return;
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
if (aShape.IsNull()) return;
|
||||
|
||||
// Get shape parameters
|
||||
@ -262,12 +239,8 @@ void GEOM_IMeasureOperations_i::GetBoundingBox (GEOM::GEOM_Object_ptr theShape,
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL) return;
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
if (aShape.IsNull()) return;
|
||||
|
||||
// Get shape parameters
|
||||
@ -288,12 +261,8 @@ void GEOM_IMeasureOperations_i::GetTolerance
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL) return;
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
if (aShape.IsNull()) return;
|
||||
|
||||
// Get shape parameters
|
||||
@ -314,15 +283,14 @@ CORBA::Boolean GEOM_IMeasureOperations_i::CheckShape (GEOM::GEOM_Object_ptr theS
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL)
|
||||
if (CORBA::is_nil(theShape))
|
||||
{
|
||||
theDescription = CORBA::string_dup("null");
|
||||
return 0;
|
||||
}
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
|
||||
if (aShape.IsNull())
|
||||
{
|
||||
@ -347,15 +315,14 @@ CORBA::Boolean GEOM_IMeasureOperations_i::CheckShapeWithGeometry (GEOM::GEOM_Obj
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL)
|
||||
if (CORBA::is_nil(theShape))
|
||||
{
|
||||
theDescription = CORBA::string_dup("null");
|
||||
return 0;
|
||||
}
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
|
||||
if (aShape.IsNull())
|
||||
{
|
||||
@ -384,12 +351,8 @@ char* GEOM_IMeasureOperations_i::WhatIs (GEOM::GEOM_Object_ptr theShape)
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL) return NULL;
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
if (aShape.IsNull()) return NULL;
|
||||
|
||||
// Get shape parameters
|
||||
@ -410,14 +373,9 @@ CORBA::Double GEOM_IMeasureOperations_i::GetMinDistance
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape1 == NULL || theShape2 == NULL) return -1.0;
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShape1 = GetOperations()->GetEngine()->GetObject
|
||||
(theShape1->GetStudyID(), theShape1->GetEntry());
|
||||
Handle(GEOM_Object) aShape2 = GetOperations()->GetEngine()->GetObject
|
||||
(theShape2->GetStudyID(), theShape2->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape1 = GetObjectImpl(theShape1);
|
||||
Handle(GEOM_Object) aShape2 = GetObjectImpl(theShape2);
|
||||
if (aShape1.IsNull() || aShape2.IsNull()) return -1.0;
|
||||
|
||||
// Get shape parameters
|
||||
@ -436,13 +394,8 @@ void GEOM_IMeasureOperations_i::PointCoordinates (GEOM::GEOM_Object_ptr theShape
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if ( theShape->_is_nil() )
|
||||
return;
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject(
|
||||
theShape->GetStudyID(), theShape->GetEntry() );
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
if (aShape.IsNull())
|
||||
return;
|
||||
|
||||
@ -461,14 +414,9 @@ CORBA::Double GEOM_IMeasureOperations_i::GetAngle (GEOM::GEOM_Object_ptr theShap
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape1 == NULL || theShape2 == NULL) return -1.0;
|
||||
|
||||
//Get the reference shapes
|
||||
Handle(GEOM_Object) aShape1 = GetOperations()->GetEngine()->GetObject
|
||||
(theShape1->GetStudyID(), theShape1->GetEntry());
|
||||
Handle(GEOM_Object) aShape2 = GetOperations()->GetEngine()->GetObject
|
||||
(theShape2->GetStudyID(), theShape2->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape1 = GetObjectImpl(theShape1);
|
||||
Handle(GEOM_Object) aShape2 = GetObjectImpl(theShape2);
|
||||
if (aShape1.IsNull() || aShape2.IsNull()) return -1.0;
|
||||
|
||||
// Get the angle
|
||||
@ -487,18 +435,13 @@ CORBA::Double GEOM_IMeasureOperations_i::CurveCurvatureByParam
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if(theCurve==NULL) return -1.0;
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theCurve->GetStudyID(), theCurve->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theCurve);
|
||||
if(aShape.IsNull()) return -1.0;
|
||||
|
||||
return GetOperations()->CurveCurvatureByParam(aShape,theParam);
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* CurveCurvatureByPoint
|
||||
@ -510,14 +453,9 @@ CORBA::Double GEOM_IMeasureOperations_i::CurveCurvatureByPoint
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if( theCurve==NULL || thePoint==NULL ) return -1.0;
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theCurve->GetStudyID(), theCurve->GetEntry());
|
||||
Handle(GEOM_Object) aPoint = GetOperations()->GetEngine()->GetObject
|
||||
(thePoint->GetStudyID(), thePoint->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theCurve);
|
||||
Handle(GEOM_Object) aPoint = GetObjectImpl(thePoint);
|
||||
if( aShape.IsNull() || aPoint.IsNull() ) return -1.0;
|
||||
|
||||
return GetOperations()->CurveCurvatureByPoint(aShape,aPoint);
|
||||
@ -537,18 +475,13 @@ CORBA::Double GEOM_IMeasureOperations_i::MaxSurfaceCurvatureByParam
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if(theSurf==NULL) return -1.0;
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theSurf->GetStudyID(), theSurf->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theSurf);
|
||||
if(aShape.IsNull()) return -1.0;
|
||||
|
||||
return GetOperations()->MaxSurfaceCurvatureByParam(aShape,theUParam,theVParam);
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* MaxSurfaceCurvatureByPoint
|
||||
@ -560,20 +493,14 @@ CORBA::Double GEOM_IMeasureOperations_i::MaxSurfaceCurvatureByPoint
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if( theSurf==NULL || thePoint==NULL ) return -1.0;
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theSurf->GetStudyID(), theSurf->GetEntry());
|
||||
Handle(GEOM_Object) aPoint = GetOperations()->GetEngine()->GetObject
|
||||
(thePoint->GetStudyID(), thePoint->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theSurf);
|
||||
Handle(GEOM_Object) aPoint = GetObjectImpl(thePoint);
|
||||
if( aShape.IsNull() || aPoint.IsNull() ) return -1.0;
|
||||
|
||||
return GetOperations()->MaxSurfaceCurvatureByPoint(aShape,aPoint);
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* MinSurfaceCurvatureByParam
|
||||
@ -587,18 +514,13 @@ CORBA::Double GEOM_IMeasureOperations_i::MinSurfaceCurvatureByParam
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if(theSurf==NULL) return -1.0;
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theSurf->GetStudyID(), theSurf->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theSurf);
|
||||
if (aShape.IsNull()) return -1.0;
|
||||
|
||||
return GetOperations()->MinSurfaceCurvatureByParam(aShape,theUParam,theVParam);
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* MinSurfaceCurvatureByPoint
|
||||
@ -610,14 +532,9 @@ CORBA::Double GEOM_IMeasureOperations_i::MinSurfaceCurvatureByPoint
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if( theSurf==NULL || thePoint==NULL ) return -1.0;
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theSurf->GetStudyID(), theSurf->GetEntry());
|
||||
Handle(GEOM_Object) aPoint = GetOperations()->GetEngine()->GetObject
|
||||
(thePoint->GetStudyID(), thePoint->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theSurf);
|
||||
Handle(GEOM_Object) aPoint = GetObjectImpl(thePoint);
|
||||
if (aShape.IsNull() || aPoint.IsNull()) return -1.0;
|
||||
|
||||
return GetOperations()->MinSurfaceCurvatureByPoint(aShape,aPoint);
|
||||
|
@ -18,7 +18,7 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#include "GEOM_IOperations_i.hh"
|
||||
|
||||
#include "GEOM_Engine.hxx"
|
||||
@ -131,9 +131,26 @@ void GEOM_IOperations_i::AbortOperation()
|
||||
//=============================================================================
|
||||
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;
|
||||
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();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* GetObjectImpl
|
||||
*/
|
||||
//=============================================================================
|
||||
Handle(GEOM_Object) GEOM_IOperations_i::GetObjectImpl(GEOM::GEOM_Object_ptr theObject)
|
||||
{
|
||||
Handle(GEOM_Object) anImpl;
|
||||
if (!CORBA::is_nil(theObject)) {
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
anImpl = GetImpl()->GetEngine()->GetObject
|
||||
(theObject->GetStudyID(), anEntry);
|
||||
}
|
||||
return anImpl;
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ class GEOM_I_EXPORT GEOM_IOperations_i : public virtual POA_GEOM::GEOM_IOperatio
|
||||
virtual CORBA::Long GetStudyID();
|
||||
|
||||
virtual GEOM::GEOM_Object_ptr GetObject(Handle(GEOM_Object) theObject);
|
||||
virtual Handle(GEOM_Object) GetObjectImpl(GEOM::GEOM_Object_ptr theObject);
|
||||
|
||||
virtual void StartOperation();
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#include <Standard_Stream.hxx>
|
||||
|
||||
#include "GEOM_IShapesOperations_i.hh"
|
||||
@ -72,13 +72,9 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeEdge
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (thePnt1 == NULL || thePnt2 == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference points
|
||||
Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt1->GetStudyID(), thePnt1->GetEntry());
|
||||
Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt2->GetStudyID(), thePnt2->GetEntry());
|
||||
Handle(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
|
||||
Handle(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
|
||||
|
||||
if (aPnt1.IsNull() || aPnt2.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
@ -109,9 +105,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeWire
|
||||
//Get the shapes
|
||||
aLen = theEdgesAndWires.length();
|
||||
for (ind = 0; ind < aLen; ind++) {
|
||||
if (theEdgesAndWires[ind] == NULL) return aGEOMObject._retn();
|
||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
||||
(theEdgesAndWires[ind]->GetStudyID(), theEdgesAndWires[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aSh = GetObjectImpl(theEdgesAndWires[ind]);
|
||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||
aShapes.push_back(aSh);
|
||||
}
|
||||
@ -139,12 +133,8 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeFace
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theWire == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference wire
|
||||
Handle(GEOM_Object) aWire = GetOperations()->GetEngine()->GetObject
|
||||
(theWire->GetStudyID(), theWire->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aWire = GetObjectImpl(theWire);
|
||||
if (aWire.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the Face
|
||||
@ -175,9 +165,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeFaceWires
|
||||
//Get the shapes
|
||||
aLen = theWires.length();
|
||||
for (ind = 0; ind < aLen; ind++) {
|
||||
if (theWires[ind] == NULL) return aGEOMObject._retn();
|
||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
||||
(theWires[ind]->GetStudyID(), theWires[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aSh = GetObjectImpl(theWires[ind]);
|
||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||
aShapes.push_back(aSh);
|
||||
}
|
||||
@ -210,9 +198,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeShell
|
||||
//Get the shapes
|
||||
aLen = theFacesAndShells.length();
|
||||
for (ind = 0; ind < aLen; ind++) {
|
||||
if (theFacesAndShells[ind] == NULL) return aGEOMObject._retn();
|
||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
||||
(theFacesAndShells[ind]->GetStudyID(), theFacesAndShells[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aSh = GetObjectImpl(theFacesAndShells[ind]);
|
||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||
aShapes.push_back(aSh);
|
||||
}
|
||||
@ -239,12 +225,8 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeSolidShell
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShell == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShell = GetOperations()->GetEngine()->GetObject
|
||||
(theShell->GetStudyID(), theShell->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShell = GetObjectImpl(theShell);
|
||||
if (aShell.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the Solid
|
||||
@ -274,9 +256,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeSolidShells
|
||||
//Get the shapes
|
||||
aLen = theShells.length();
|
||||
for (ind = 0; ind < aLen; ind++) {
|
||||
if (theShells[ind] == NULL) return aGEOMObject._retn();
|
||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
||||
(theShells[ind]->GetStudyID(), theShells[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aSh = GetObjectImpl(theShells[ind]);
|
||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||
aShapes.push_back(aSh);
|
||||
}
|
||||
@ -309,9 +289,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeCompound
|
||||
//Get the shapes
|
||||
aLen = theShapes.length();
|
||||
for (ind = 0; ind < aLen; ind++) {
|
||||
if (theShapes[ind] == NULL) return aGEOMObject._retn();
|
||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
||||
(theShapes[ind]->GetStudyID(), theShapes[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aSh = GetObjectImpl(theShapes[ind]);
|
||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||
aShapes.push_back(aSh);
|
||||
}
|
||||
@ -340,12 +318,8 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeGlueFaces
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
if (aShape.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the gluing
|
||||
@ -374,11 +348,8 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetGlueFaces
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL) return aSeq._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
if (aShape.IsNull()) return aSeq._retn();
|
||||
|
||||
Handle(TColStd_HSequenceOfTransient) aHSeq =
|
||||
@ -414,12 +385,8 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeGlueFacesByList
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
if (aShape.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
int ind, aLen;
|
||||
@ -427,9 +394,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeGlueFacesByList
|
||||
//Get the shapes
|
||||
aLen = theFaces.length();
|
||||
for (ind = 0; ind < aLen; ind++) {
|
||||
if (theFaces[ind] == NULL) return aGEOMObject._retn();
|
||||
Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
|
||||
(theFaces[ind]->GetStudyID(), theFaces[ind]->GetEntry());
|
||||
Handle(GEOM_Object) aSh = GetObjectImpl(theFaces[ind]);
|
||||
if (aSh.IsNull()) return aGEOMObject._retn();
|
||||
aFaces.push_back(aSh);
|
||||
}
|
||||
@ -456,10 +421,9 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::MakeExplode (GEOM::GEOM_Object_ptr the
|
||||
const CORBA::Boolean isSorted)
|
||||
{
|
||||
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
|
||||
if (theShape == NULL) return aSeq._retn();
|
||||
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
if (aShape.IsNull()) return aSeq._retn();
|
||||
|
||||
Handle(TColStd_HSequenceOfTransient) aHSeq =
|
||||
GetOperations()->MakeExplode(aShape, theShapeType, isSorted);
|
||||
@ -484,10 +448,9 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::SubShapeAllIDs (GEOM::GEOM_Object_pt
|
||||
const CORBA::Boolean isSorted)
|
||||
{
|
||||
GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
|
||||
if (theShape == NULL) return aSeq._retn();
|
||||
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
if (aShape.IsNull()) return aSeq._retn();
|
||||
|
||||
Handle(TColStd_HSequenceOfInteger) aHSeq =
|
||||
GetOperations()->SubShapeAllIDs(aShape, theShapeType, isSorted);
|
||||
@ -515,12 +478,8 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetSubShape
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theMainShape == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theMainShape->GetStudyID(), theMainShape->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theMainShape);
|
||||
if (aShape.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
Handle(GEOM_Object) anObject = GetOperations()->GetSubShape(aShape, theID);
|
||||
@ -538,13 +497,10 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetSubShape
|
||||
CORBA::Long GEOM_IShapesOperations_i::GetSubShapeIndex
|
||||
(GEOM::GEOM_Object_ptr theMainShape, GEOM::GEOM_Object_ptr theSubShape)
|
||||
{
|
||||
if (theMainShape == NULL || theSubShape == NULL) return -1;
|
||||
|
||||
//Get the reference shapes
|
||||
Handle(GEOM_Object) aMainShapeRef = GetOperations()->GetEngine()->GetObject
|
||||
(theMainShape->GetStudyID(), theMainShape->GetEntry());
|
||||
Handle(GEOM_Object) aSubShapeRef = GetOperations()->GetEngine()->GetObject
|
||||
(theSubShape->GetStudyID(), theSubShape->GetEntry());
|
||||
Handle(GEOM_Object) aMainShapeRef = GetObjectImpl(theMainShape);
|
||||
Handle(GEOM_Object) aSubShapeRef = GetObjectImpl(theSubShape);
|
||||
|
||||
if (aMainShapeRef.IsNull() || aSubShapeRef.IsNull()) return -1;
|
||||
|
||||
//Get the unique ID of <theSubShape> inside <theMainShape>
|
||||
@ -563,13 +519,10 @@ CORBA::Long GEOM_IShapesOperations_i::GetSubShapeIndex
|
||||
CORBA::Long GEOM_IShapesOperations_i::GetTopologyIndex
|
||||
(GEOM::GEOM_Object_ptr theMainShape, GEOM::GEOM_Object_ptr theSubShape)
|
||||
{
|
||||
if (theMainShape == NULL || theSubShape == NULL) return -1;
|
||||
|
||||
//Get the reference shapes
|
||||
Handle(GEOM_Object) aMainShapeRef = GetOperations()->GetEngine()->GetObject
|
||||
(theMainShape->GetStudyID(), theMainShape->GetEntry());
|
||||
Handle(GEOM_Object) aSubShapeRef = GetOperations()->GetEngine()->GetObject
|
||||
(theSubShape->GetStudyID(), theSubShape->GetEntry());
|
||||
Handle(GEOM_Object) aMainShapeRef = GetObjectImpl(theMainShape);
|
||||
Handle(GEOM_Object) aSubShapeRef = GetObjectImpl(theSubShape);
|
||||
|
||||
if (aMainShapeRef.IsNull() || aSubShapeRef.IsNull()) return -1;
|
||||
|
||||
//Get an ID of <theSubShape>, unique among all sub-shapes of <theMainShape> of the same type
|
||||
@ -587,12 +540,8 @@ CORBA::Long GEOM_IShapesOperations_i::GetTopologyIndex
|
||||
//=============================================================================
|
||||
char* GEOM_IShapesOperations_i::GetShapeTypeString (GEOM::GEOM_Object_ptr theShape)
|
||||
{
|
||||
if (theShape == NULL) return NULL;
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
if (aShape.IsNull()) return NULL;
|
||||
|
||||
// Get shape parameters
|
||||
@ -607,10 +556,8 @@ char* GEOM_IShapesOperations_i::GetShapeTypeString (GEOM::GEOM_Object_ptr theSha
|
||||
//=============================================================================
|
||||
CORBA::Long GEOM_IShapesOperations_i::NumberOfFaces (GEOM::GEOM_Object_ptr theShape)
|
||||
{
|
||||
if (theShape == NULL) return -1;
|
||||
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
if (aShape.IsNull()) return -1;
|
||||
|
||||
CORBA::Long aNb = GetOperations()->NumberOfFaces(aShape);
|
||||
if (!GetOperations()->IsDone()) return -1;
|
||||
@ -625,10 +572,8 @@ CORBA::Long GEOM_IShapesOperations_i::NumberOfFaces (GEOM::GEOM_Object_ptr theSh
|
||||
//=============================================================================
|
||||
CORBA::Long GEOM_IShapesOperations_i::NumberOfEdges (GEOM::GEOM_Object_ptr theShape)
|
||||
{
|
||||
if (theShape == NULL) return -1;
|
||||
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
if (aShape.IsNull()) return -1;
|
||||
|
||||
CORBA::Long aNb = GetOperations()->NumberOfEdges(aShape);
|
||||
if (!GetOperations()->IsDone()) return -1;
|
||||
@ -649,12 +594,8 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::ChangeOrientation
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
if (aShape.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the Solid
|
||||
@ -676,10 +617,9 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::GetFreeFacesIDs (GEOM::GEOM_Object_p
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
|
||||
if (theShape == NULL) return aSeq._retn();
|
||||
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
if (aShape.IsNull()) return aSeq._retn();
|
||||
|
||||
Handle(TColStd_HSequenceOfInteger) aHSeq =
|
||||
GetOperations()->GetFreeFacesIDs(aShape);
|
||||
@ -707,16 +647,11 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetSharedShapes
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
|
||||
if (theShape1 == NULL ||
|
||||
theShape2 == NULL) return aSeq._retn();
|
||||
|
||||
Handle(GEOM_Object) aShape1 = GetOperations()->GetEngine()->GetObject
|
||||
(theShape1->GetStudyID(), theShape1->GetEntry());
|
||||
Handle(GEOM_Object) aShape2 = GetOperations()->GetEngine()->GetObject
|
||||
(theShape2->GetStudyID(), theShape2->GetEntry());
|
||||
Handle(GEOM_Object) aShape1 = GetObjectImpl(theShape1);
|
||||
Handle(GEOM_Object) aShape2 = GetObjectImpl(theShape2);
|
||||
|
||||
if (aShape1.IsNull() ||
|
||||
aShape2.IsNull()) return aSeq._retn();
|
||||
if (aShape1.IsNull() || aShape2.IsNull()) return aSeq._retn();
|
||||
|
||||
Handle(TColStd_HSequenceOfTransient) aHSeq =
|
||||
GetOperations()->GetSharedShapes(aShape1, aShape2, theShapeType);
|
||||
@ -774,13 +709,9 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnPlane
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL || theAx1 == NULL) return aSeq._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) anAx1 = GetOperations()->GetEngine()->GetObject
|
||||
(theAx1->GetStudyID(), theAx1->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) anAx1 = GetObjectImpl(theAx1);
|
||||
|
||||
if (aShape.IsNull() || anAx1.IsNull()) return aSeq._retn();
|
||||
|
||||
@ -815,15 +746,10 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnPlaneWithLocation
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL || theAx1 == NULL || thePnt == NULL) return aSeq._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) anAx1 = GetOperations()->GetEngine()->GetObject
|
||||
(theAx1->GetStudyID(), theAx1->GetEntry());
|
||||
Handle(GEOM_Object) anPnt = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt->GetStudyID(), thePnt->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) anAx1 = GetObjectImpl(theAx1);
|
||||
Handle(GEOM_Object) anPnt = GetObjectImpl(thePnt);
|
||||
|
||||
if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return aSeq._retn();
|
||||
|
||||
@ -858,13 +784,9 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnCylinder
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL || theAxis == NULL) return aSeq._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) anAxis = GetOperations()->GetEngine()->GetObject
|
||||
(theAxis->GetStudyID(), theAxis->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) anAxis = GetObjectImpl(theAxis);
|
||||
|
||||
if (aShape.IsNull() || anAxis.IsNull()) return aSeq._retn();
|
||||
|
||||
@ -899,13 +821,9 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnSphere
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL || theCenter == NULL) return aSeq._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aCenter = GetOperations()->GetEngine()->GetObject
|
||||
(theCenter->GetStudyID(), theCenter->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) aCenter = GetObjectImpl(theCenter);
|
||||
|
||||
if (aShape.IsNull() || aCenter.IsNull()) return aSeq._retn();
|
||||
|
||||
@ -942,24 +860,12 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnQuadrangle
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL ||
|
||||
theTopLeftPoint == NULL ||
|
||||
theTopRigthPoint == NULL ||
|
||||
theBottomLeftPoint == NULL ||
|
||||
theBottomRigthPoint == NULL )
|
||||
return aSeq._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aTopLeftPoint = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theTopLeftPoint->GetEntry());
|
||||
Handle(GEOM_Object) aTopRigthPoint = GetOperations()->GetEngine()->GetObject
|
||||
(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());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) aTopLeftPoint = GetObjectImpl(theTopLeftPoint);
|
||||
Handle(GEOM_Object) aTopRigthPoint = GetObjectImpl(theTopRigthPoint);
|
||||
Handle(GEOM_Object) aBottomLeftPoint = GetObjectImpl(theBottomLeftPoint);
|
||||
Handle(GEOM_Object) aBottomRigthPoint = GetObjectImpl(theBottomRigthPoint);
|
||||
|
||||
if (aShape.IsNull() ||
|
||||
aTopLeftPoint.IsNull() ||
|
||||
@ -1000,13 +906,9 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnPlaneIDs
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL || theAx1 == NULL) return aSeq._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) anAx1 = GetOperations()->GetEngine()->GetObject
|
||||
(theAx1->GetStudyID(), theAx1->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) anAx1 = GetObjectImpl(theAx1);
|
||||
|
||||
if (aShape.IsNull() || anAx1.IsNull()) return aSeq._retn();
|
||||
|
||||
@ -1041,21 +943,17 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnPlaneWithLocationIDs
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL || theAx1 == NULL || thePnt == NULL) return aSeq._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) anAx1 = GetOperations()->GetEngine()->GetObject
|
||||
(theAx1->GetStudyID(), theAx1->GetEntry());
|
||||
Handle(GEOM_Object) anPnt = GetOperations()->GetEngine()->GetObject
|
||||
(thePnt->GetStudyID(), thePnt->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) anAx1 = GetObjectImpl(theAx1);
|
||||
Handle(GEOM_Object) anPnt = GetObjectImpl(thePnt);
|
||||
|
||||
if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return aSeq._retn();
|
||||
|
||||
//Get Shapes On Plane
|
||||
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())
|
||||
return aSeq._retn();
|
||||
|
||||
@ -1084,13 +982,9 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnCylinderIDs
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL || theAxis == NULL) return aSeq._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) anAxis = GetOperations()->GetEngine()->GetObject
|
||||
(theAxis->GetStudyID(), theAxis->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) anAxis = GetObjectImpl(theAxis);
|
||||
|
||||
if (aShape.IsNull() || anAxis.IsNull()) return aSeq._retn();
|
||||
|
||||
@ -1125,13 +1019,9 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnSphereIDs
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL || theCenter == NULL) return aSeq._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aCenter = GetOperations()->GetEngine()->GetObject
|
||||
(theCenter->GetStudyID(), theCenter->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) aCenter = GetObjectImpl(theCenter);
|
||||
|
||||
if (aShape.IsNull() || aCenter.IsNull()) return aSeq._retn();
|
||||
|
||||
@ -1168,24 +1058,12 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnQuadrangleIDs
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShape == NULL ||
|
||||
theTopLeftPoint == NULL ||
|
||||
theTopRigthPoint == NULL ||
|
||||
theBottomLeftPoint == NULL ||
|
||||
theBottomRigthPoint == NULL )
|
||||
return aSeq._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aTopLeftPoint = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theTopLeftPoint->GetEntry());
|
||||
Handle(GEOM_Object) aTopRigthPoint = GetOperations()->GetEngine()->GetObject
|
||||
(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());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) aTopLeftPoint = GetObjectImpl(theTopLeftPoint);
|
||||
Handle(GEOM_Object) aTopRigthPoint = GetObjectImpl(theTopRigthPoint);
|
||||
Handle(GEOM_Object) aBottomLeftPoint = GetObjectImpl(theBottomLeftPoint);
|
||||
Handle(GEOM_Object) aBottomRigthPoint = GetObjectImpl(theBottomRigthPoint);
|
||||
|
||||
if (aShape.IsNull() ||
|
||||
aTopLeftPoint.IsNull() ||
|
||||
@ -1226,14 +1104,9 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnBox
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if ( theShape == NULL || theBox == NULL )
|
||||
return aSeq._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aBox = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theBox->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) aBox = GetObjectImpl(theBox);
|
||||
|
||||
if (aShape.IsNull() || aBox.IsNull() )
|
||||
return aSeq._retn();
|
||||
@ -1268,14 +1141,9 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnBoxIDs
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if ( theShape == NULL || theBox == NULL )
|
||||
return aSeq._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aBox = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theBox->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) aBox = GetObjectImpl(theBox);
|
||||
|
||||
if (aShape.IsNull() || aBox.IsNull() )
|
||||
return aSeq._retn();
|
||||
@ -1311,14 +1179,9 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnShape
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if ( theShape == NULL || theCheckShape == NULL )
|
||||
return aSeq._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aCheckShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theCheckShape->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) aCheckShape = GetObjectImpl(theCheckShape);
|
||||
|
||||
if (aShape.IsNull() || aCheckShape.IsNull() )
|
||||
return aSeq._retn();
|
||||
@ -1355,14 +1218,9 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetShapesOnShapeAsCompound
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if ( theShape == NULL || theCheckShape == NULL )
|
||||
return aGEOMObject._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aCheckShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theCheckShape->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) aCheckShape = GetObjectImpl(theCheckShape);
|
||||
|
||||
if (aShape.IsNull() || aCheckShape.IsNull() )
|
||||
return aGEOMObject._retn();
|
||||
@ -1394,14 +1252,9 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnShapeIDs
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if ( theShape == NULL || theCheckShape == NULL )
|
||||
return aSeq._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theShape->GetEntry());
|
||||
Handle(GEOM_Object) aCheckShape = GetOperations()->GetEngine()->GetObject
|
||||
(theShape->GetStudyID(), theCheckShape->GetEntry());
|
||||
Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
|
||||
Handle(GEOM_Object) aCheckShape = GetObjectImpl(theCheckShape);
|
||||
|
||||
if (aShape.IsNull() || aCheckShape.IsNull() )
|
||||
return aSeq._retn();
|
||||
@ -1435,14 +1288,9 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetInPlace
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShapeWhere == NULL ||
|
||||
theShapeWhat == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShapeWhere = GetOperations()->GetEngine()->GetObject
|
||||
(theShapeWhere->GetStudyID(), theShapeWhere->GetEntry());
|
||||
Handle(GEOM_Object) aShapeWhat = GetOperations()->GetEngine()->GetObject
|
||||
(theShapeWhat->GetStudyID(), theShapeWhat->GetEntry());
|
||||
Handle(GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
|
||||
Handle(GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
|
||||
|
||||
if (aShapeWhere.IsNull() ||
|
||||
aShapeWhat.IsNull()) return aGEOMObject._retn();
|
||||
@ -1470,14 +1318,9 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetInPlaceByHistory
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShapeWhere == NULL ||
|
||||
theShapeWhat == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShapeWhere = GetOperations()->GetEngine()->GetObject
|
||||
(theShapeWhere->GetStudyID(), theShapeWhere->GetEntry());
|
||||
Handle(GEOM_Object) aShapeWhat = GetOperations()->GetEngine()->GetObject
|
||||
(theShapeWhat->GetStudyID(), theShapeWhat->GetEntry());
|
||||
Handle(GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
|
||||
Handle(GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
|
||||
|
||||
if (aShapeWhere.IsNull() ||
|
||||
aShapeWhat.IsNull()) return aGEOMObject._retn();
|
||||
@ -1505,14 +1348,9 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetSame
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theShapeWhere == NULL ||
|
||||
theShapeWhat == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the reference objects
|
||||
Handle(GEOM_Object) aShapeWhere = GetOperations()->GetEngine()->GetObject
|
||||
(theShapeWhere->GetStudyID(), theShapeWhere->GetEntry());
|
||||
Handle(GEOM_Object) aShapeWhat = GetOperations()->GetEngine()->GetObject
|
||||
(theShapeWhat->GetStudyID(), theShapeWhat->GetEntry());
|
||||
Handle(GEOM_Object) aShapeWhere = GetObjectImpl(theShapeWhere);
|
||||
Handle(GEOM_Object) aShapeWhat = GetObjectImpl(theShapeWhat);
|
||||
|
||||
if (aShapeWhere.IsNull() ||
|
||||
aShapeWhat.IsNull()) return aGEOMObject._retn();
|
||||
@ -1525,4 +1363,3 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetSame
|
||||
|
||||
return GetObject(anObject);
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#include <Standard_Stream.hxx>
|
||||
|
||||
#include "GEOM_ITransformOperations_i.hh"
|
||||
@ -75,7 +75,7 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateTwoPoints
|
||||
GetOperations()->SetNotDone();
|
||||
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
|
||||
if (!theObject->IsMainShape()) {
|
||||
@ -86,21 +86,15 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateTwoPoints
|
||||
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the first point of translation
|
||||
CORBA::String_var aP1Entry = thePoint1->GetEntry();
|
||||
Handle(GEOM_Object) aPoint1 =
|
||||
GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), aP1Entry);
|
||||
Handle(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
|
||||
if (aPoint1.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the second point of translation
|
||||
CORBA::String_var aP2Entry = thePoint2->GetEntry();
|
||||
Handle(GEOM_Object) aPoint2 =
|
||||
GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), aP2Entry);
|
||||
Handle(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
|
||||
if (aPoint2.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the translation
|
||||
@ -124,24 +118,16 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateTwoPointsCopy
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (thePoint1 == NULL || thePoint2 == NULL || theObject == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) aBasicObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the first point of translation
|
||||
CORBA::String_var aP1Entry = thePoint1->GetEntry();
|
||||
Handle(GEOM_Object) aPoint1 =
|
||||
GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), aP1Entry);
|
||||
Handle(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
|
||||
if (aPoint1.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the second point of translation
|
||||
CORBA::String_var aP2Entry = thePoint2->GetEntry();
|
||||
Handle(GEOM_Object) aPoint2 =
|
||||
GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), aP2Entry);
|
||||
Handle(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
|
||||
if (aPoint2.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the translated shape
|
||||
@ -166,7 +152,7 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateDXDYDZ
|
||||
GetOperations()->SetNotDone();
|
||||
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()) {
|
||||
@ -177,9 +163,7 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateDXDYDZ
|
||||
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the translation
|
||||
@ -188,7 +172,6 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateDXDYDZ
|
||||
return aGEOMObject._retn();
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* TranslateDXDYDZCopy
|
||||
@ -203,12 +186,8 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateDXDYDZCopy
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theObject == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) aBasicObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the translated shape
|
||||
@ -220,7 +199,6 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateDXDYDZCopy
|
||||
return GetObject(anObject);
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* TranslateVector
|
||||
@ -234,7 +212,7 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateVector
|
||||
GetOperations()->SetNotDone();
|
||||
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
|
||||
if (!theObject->IsMainShape()) {
|
||||
@ -245,15 +223,11 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateVector
|
||||
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the vector of translation
|
||||
CORBA::String_var aVEntry = theVector->GetEntry();
|
||||
Handle(GEOM_Object) aVector =
|
||||
GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), aVEntry);
|
||||
Handle(GEOM_Object) aVector = GetObjectImpl(theVector);
|
||||
if (aVector.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the translation
|
||||
@ -276,18 +250,12 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateVectorCopy
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theObject == NULL || theVector == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) aBasicObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the vector of translation
|
||||
CORBA::String_var aVEntry = theVector->GetEntry();
|
||||
Handle(GEOM_Object) aVector =
|
||||
GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), aVEntry);
|
||||
Handle(GEOM_Object) aVector = GetObjectImpl(theVector);
|
||||
if (aVector.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the translation
|
||||
@ -312,7 +280,7 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateVectorDistance
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
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
|
||||
if (!theCopy && !theObject->IsMainShape()) {
|
||||
@ -324,15 +292,11 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateVectorDistance
|
||||
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) aBasicObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the vector of translation
|
||||
CORBA::String_var aVecEntry = theVector->GetEntry();
|
||||
Handle(GEOM_Object) aVector =
|
||||
GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), aVecEntry);
|
||||
Handle(GEOM_Object) aVector = GetObjectImpl(theVector);
|
||||
if (aVector.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the translation
|
||||
@ -362,7 +326,7 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::Rotate (GEOM::GEOM_Object_ptr
|
||||
GetOperations()->SetNotDone();
|
||||
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
|
||||
if (!theObject->IsMainShape()) {
|
||||
@ -373,15 +337,11 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::Rotate (GEOM::GEOM_Object_ptr
|
||||
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the axis of revolution
|
||||
CORBA::String_var anAEntry = theAxis->GetEntry();
|
||||
Handle(GEOM_Object) anAxis =
|
||||
GetOperations()->GetEngine()->GetObject(theAxis->GetStudyID(), anAEntry);
|
||||
Handle(GEOM_Object) anAxis = GetObjectImpl(theAxis);
|
||||
if (anAxis.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the rotation
|
||||
@ -404,18 +364,12 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateCopy (GEOM::GEOM_Object
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theObject == NULL || theAxis == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) aBasicObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the axis of rotation
|
||||
CORBA::String_var anAEntry = theAxis->GetEntry();
|
||||
Handle(GEOM_Object) anAxis =
|
||||
GetOperations()->GetEngine()->GetObject(theAxis->GetStudyID(), anAEntry);
|
||||
Handle(GEOM_Object) anAxis = GetObjectImpl(theAxis);
|
||||
if (anAxis.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the rotation
|
||||
@ -426,7 +380,6 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateCopy (GEOM::GEOM_Object
|
||||
return GetObject(anObject);
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* MirrorPlane
|
||||
@ -441,7 +394,7 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPlane
|
||||
//Set a not done flag
|
||||
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
|
||||
if (!theObject->IsMainShape()) {
|
||||
@ -450,15 +403,11 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPlane
|
||||
}
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the plane
|
||||
CORBA::String_var aPlnEntry = thePlane->GetEntry();
|
||||
Handle(GEOM_Object) aPlane =
|
||||
GetOperations()->GetEngine()->GetObject(thePlane->GetStudyID(), aPlnEntry);
|
||||
Handle(GEOM_Object) aPlane = GetObjectImpl(thePlane);
|
||||
if (aPlane.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the mirror
|
||||
@ -481,18 +430,12 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPlaneCopy
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theObject == NULL || thePlane == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) aBasicObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the vector of translation
|
||||
CORBA::String_var aPlnEntry = thePlane->GetEntry();
|
||||
Handle(GEOM_Object) aPlane =
|
||||
GetOperations()->GetEngine()->GetObject(thePlane->GetStudyID(), aPlnEntry);
|
||||
Handle(GEOM_Object) aPlane = GetObjectImpl(thePlane);
|
||||
if (aPlane.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the mirror
|
||||
@ -517,7 +460,7 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorAxis
|
||||
//Set a not done flag
|
||||
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
|
||||
if (!theObject->IsMainShape()) {
|
||||
@ -526,15 +469,11 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorAxis
|
||||
}
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the axis
|
||||
CORBA::String_var anAEntry = theAxis->GetEntry();
|
||||
Handle(GEOM_Object) aAxis =
|
||||
GetOperations()->GetEngine()->GetObject(theAxis->GetStudyID(), anAEntry);
|
||||
Handle(GEOM_Object) aAxis = GetObjectImpl(theAxis);
|
||||
if (aAxis.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the mirror
|
||||
@ -557,18 +496,12 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorAxisCopy
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theObject == NULL || theAxis == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) aBasicObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the vector of translation
|
||||
CORBA::String_var anAEntry = theAxis->GetEntry();
|
||||
Handle(GEOM_Object) aAxis =
|
||||
GetOperations()->GetEngine()->GetObject(theAxis->GetStudyID(), anAEntry);
|
||||
Handle(GEOM_Object) aAxis = GetObjectImpl(theAxis);
|
||||
if (aAxis.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the mirror
|
||||
@ -593,7 +526,7 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPoint
|
||||
//Set a not done flag
|
||||
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
|
||||
if (!theObject->IsMainShape()) {
|
||||
@ -602,15 +535,11 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPoint
|
||||
}
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the point
|
||||
CORBA::String_var aPntEntry = thePoint->GetEntry();
|
||||
Handle(GEOM_Object) aPoint =
|
||||
GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), aPntEntry);
|
||||
Handle(GEOM_Object) aPoint = GetObjectImpl(thePoint);
|
||||
if (aPoint.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the mirror
|
||||
@ -633,18 +562,12 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPointCopy
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theObject == NULL || thePoint == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) aBasicObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the vector of translation
|
||||
CORBA::String_var aPntEntry = thePoint->GetEntry();
|
||||
Handle(GEOM_Object) aPoint =
|
||||
GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), aPntEntry);
|
||||
Handle(GEOM_Object) aPoint = GetObjectImpl(thePoint);
|
||||
if (aPoint.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the mirror
|
||||
@ -655,7 +578,6 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPointCopy
|
||||
return GetObject(anObject);
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* OffsetShape
|
||||
@ -670,7 +592,7 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::OffsetShape
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theObject == NULL) return aGEOMObject._retn();
|
||||
if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
|
||||
|
||||
//check if the object is a subshape
|
||||
if (!theObject->IsMainShape()) {
|
||||
@ -679,9 +601,7 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::OffsetShape
|
||||
}
|
||||
|
||||
//Get the basic object
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) aBasicObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the offset shape
|
||||
@ -704,12 +624,8 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::OffsetShapeCopy
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theObject == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the basic object
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) aBasicObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Create the offset shape
|
||||
@ -720,7 +636,6 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::OffsetShapeCopy
|
||||
return GetObject(anObject);
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* ScaleShape
|
||||
@ -745,16 +660,13 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShape
|
||||
}
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the point
|
||||
Handle(GEOM_Object) aPoint;
|
||||
if (!thePoint->_is_nil()) {
|
||||
CORBA::String_var aPntEntry = thePoint->GetEntry();
|
||||
aPoint = GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), aPntEntry);
|
||||
aPoint = GetObjectImpl(thePoint);
|
||||
if (aPoint.IsNull()) return aGEOMObject._retn();
|
||||
}
|
||||
|
||||
@ -779,19 +691,14 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShapeCopy
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theObject->_is_nil()) return aGEOMObject._retn();
|
||||
|
||||
//Get the basic object
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) aBasicObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the point
|
||||
Handle(GEOM_Object) aPoint;
|
||||
if (!thePoint->_is_nil()) {
|
||||
CORBA::String_var aPntEntry = thePoint->GetEntry();
|
||||
aPoint = GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), aPntEntry);
|
||||
aPoint = GetObjectImpl(thePoint);
|
||||
if (aPoint.IsNull()) return aGEOMObject._retn();
|
||||
}
|
||||
|
||||
@ -830,16 +737,13 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShapeAlongAxes
|
||||
}
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the point
|
||||
Handle(GEOM_Object) aPoint;
|
||||
if (!thePoint->_is_nil()) {
|
||||
CORBA::String_var aPntEntry = thePoint->GetEntry();
|
||||
aPoint = GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), aPntEntry);
|
||||
aPoint = GetObjectImpl(thePoint);
|
||||
if (aPoint.IsNull()) return aGEOMObject._retn();
|
||||
}
|
||||
|
||||
@ -867,19 +771,14 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShapeAlongAxesCopy
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theObject->_is_nil()) return aGEOMObject._retn();
|
||||
|
||||
//Get the basic object
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) aBasicObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the point
|
||||
Handle(GEOM_Object) aPoint;
|
||||
if (!thePoint->_is_nil()) {
|
||||
CORBA::String_var aPntEntry = thePoint->GetEntry();
|
||||
aPoint = GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), aPntEntry);
|
||||
aPoint = GetObjectImpl(thePoint);
|
||||
if (aPoint.IsNull()) return aGEOMObject._retn();
|
||||
}
|
||||
|
||||
@ -907,7 +806,7 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::PositionShape
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theObject == NULL || theEndLCS == NULL)
|
||||
if (CORBA::is_nil(theObject) || CORBA::is_nil(theEndLCS))
|
||||
return aGEOMObject._retn();
|
||||
|
||||
//check if the object is a subshape
|
||||
@ -917,23 +816,18 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::PositionShape
|
||||
}
|
||||
|
||||
//Get the basic object
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the Start LCS (may be NULL for positioning from global LCS)
|
||||
Handle(GEOM_Object) aStartLCS = NULL;
|
||||
if (theStartLCS != NULL && !CORBA::is_nil(theStartLCS)) {
|
||||
CORBA::String_var aStartLCSEntry = theStartLCS->GetEntry();
|
||||
aStartLCS = GetOperations()->GetEngine()->GetObject(theStartLCS->GetStudyID(), aStartLCSEntry);
|
||||
Handle(GEOM_Object) aStartLCS;
|
||||
if (!CORBA::is_nil(theStartLCS)) {
|
||||
aStartLCS = GetObjectImpl(theStartLCS);
|
||||
if (aStartLCS.IsNull()) return aGEOMObject._retn();
|
||||
}
|
||||
|
||||
//Get the End LCS
|
||||
CORBA::String_var anEndLCSEntry = theEndLCS->GetEntry();
|
||||
Handle(GEOM_Object) aEndLCS =
|
||||
GetOperations()->GetEngine()->GetObject(theEndLCS->GetStudyID(), anEndLCSEntry);
|
||||
Handle(GEOM_Object) aEndLCS = GetObjectImpl(theEndLCS);
|
||||
if (aEndLCS.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the Position
|
||||
@ -957,27 +851,19 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::PositionShapeCopy
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theObject == NULL || theEndLCS == NULL)
|
||||
return aGEOMObject._retn();
|
||||
|
||||
//Get the basic object
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) aBasicObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the Start LCS (may be NULL for positioning from global LCS)
|
||||
Handle(GEOM_Object) aStartLCS = NULL;
|
||||
if (theStartLCS != NULL && !CORBA::is_nil(theStartLCS)) {
|
||||
CORBA::String_var aStartLCSEntry = theStartLCS->GetEntry();
|
||||
aStartLCS = GetOperations()->GetEngine()->GetObject(theStartLCS->GetStudyID(), aStartLCSEntry);
|
||||
Handle(GEOM_Object) aStartLCS;
|
||||
if (!CORBA::is_nil(theStartLCS)) {
|
||||
aStartLCS = GetObjectImpl(theStartLCS);
|
||||
if (aStartLCS.IsNull()) return aGEOMObject._retn();
|
||||
}
|
||||
|
||||
//Get the End LCS
|
||||
CORBA::String_var anEndLCSEntry = theEndLCS->GetEntry();
|
||||
Handle(GEOM_Object) aEndLCS =
|
||||
GetOperations()->GetEngine()->GetObject(theEndLCS->GetStudyID(), anEndLCSEntry);
|
||||
Handle(GEOM_Object) aEndLCS = GetObjectImpl(theEndLCS);
|
||||
if (aEndLCS.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the position
|
||||
@ -1004,18 +890,12 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiTranslate1D
|
||||
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
|
||||
if (theObject == NULL || theVector == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) aBasicObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the vector of translation
|
||||
CORBA::String_var aVecEntry = theVector->GetEntry();
|
||||
Handle(GEOM_Object) aVector =
|
||||
GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), aVecEntry);
|
||||
Handle(GEOM_Object) aVector = GetObjectImpl(theVector);
|
||||
if (aVector.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the translation
|
||||
@ -1044,24 +924,16 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiTranslate2D (GEOM::GEOM_
|
||||
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
|
||||
if (theObject == NULL || theVector1 == NULL || theVector2 == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) aBasicObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the vector1 of translation
|
||||
CORBA::String_var aVec1Entry = theVector1->GetEntry();
|
||||
Handle(GEOM_Object) aVector1 =
|
||||
GetOperations()->GetEngine()->GetObject(theVector1->GetStudyID(), aVec1Entry);
|
||||
Handle(GEOM_Object) aVector1 = GetObjectImpl(theVector1);
|
||||
if (aVector1.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the vector2 of translation
|
||||
CORBA::String_var aVec2Entry = theVector2->GetEntry();
|
||||
Handle(GEOM_Object) aVector2 =
|
||||
GetOperations()->GetEngine()->GetObject(theVector2->GetStudyID(), aVec2Entry);
|
||||
Handle(GEOM_Object) aVector2 = GetObjectImpl(theVector2);
|
||||
if (aVector2.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the translation
|
||||
@ -1086,18 +958,12 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiRotate1D (GEOM::GEOM_Obj
|
||||
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
|
||||
if (theObject == NULL || theVector == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) aBasicObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the a directon of rotation
|
||||
CORBA::String_var aVecEntry = theVector->GetEntry();
|
||||
Handle(GEOM_Object) aVector =
|
||||
GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), aVecEntry);
|
||||
Handle(GEOM_Object) aVector = GetObjectImpl(theVector);
|
||||
if (aVector.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the rotation
|
||||
@ -1124,18 +990,12 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiRotate2D (GEOM::GEOM_Obj
|
||||
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
|
||||
if (theObject == NULL || theVector == NULL) return aGEOMObject._retn();
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) aBasicObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the a directon of rotation
|
||||
CORBA::String_var aVecEntry = theVector->GetEntry();
|
||||
Handle(GEOM_Object) aVector =
|
||||
GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), aVecEntry);
|
||||
Handle(GEOM_Object) aVector = GetObjectImpl(theVector);
|
||||
if (aVector.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the rotation
|
||||
@ -1161,7 +1021,7 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateThreePoints
|
||||
GetOperations()->SetNotDone();
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
|
||||
if (theCentPoint == NULL || thePoint1 == NULL || thePoint2 == NULL || theObject == NULL)
|
||||
if (CORBA::is_nil(theObject))
|
||||
return aGEOMObject._retn();
|
||||
|
||||
//check if the object is a subshape
|
||||
@ -1173,27 +1033,19 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateThreePoints
|
||||
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the central point of rotation
|
||||
CORBA::String_var aCPEntry = theCentPoint->GetEntry();
|
||||
Handle(GEOM_Object) aCentPoint =
|
||||
GetOperations()->GetEngine()->GetObject(theCentPoint->GetStudyID(), aCPEntry);
|
||||
Handle(GEOM_Object) aCentPoint = GetObjectImpl(theCentPoint);
|
||||
if (aCentPoint.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the first point
|
||||
CORBA::String_var aP1Entry = thePoint1->GetEntry();
|
||||
Handle(GEOM_Object) aPoint1 =
|
||||
GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), aP1Entry);
|
||||
Handle(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
|
||||
if (aPoint1.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the second point
|
||||
CORBA::String_var aP2Entry = thePoint2->GetEntry();
|
||||
Handle(GEOM_Object) aPoint2 =
|
||||
GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), aP2Entry);
|
||||
Handle(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
|
||||
if (aPoint2.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the translation
|
||||
@ -1218,31 +1070,20 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateThreePointsCopy
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
if (theCentPoint == NULL || thePoint1 == NULL || thePoint2 == NULL || theObject == NULL)
|
||||
return aGEOMObject._retn();
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) aBasicObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the central point of rotation
|
||||
CORBA::String_var aCPEntry = theCentPoint->GetEntry();
|
||||
Handle(GEOM_Object) aCentPoint =
|
||||
GetOperations()->GetEngine()->GetObject(theCentPoint->GetStudyID(), aCPEntry);
|
||||
Handle(GEOM_Object) aCentPoint = GetObjectImpl(theCentPoint);
|
||||
if (aCentPoint.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the first point
|
||||
CORBA::String_var aP1Entry = thePoint1->GetEntry();
|
||||
Handle(GEOM_Object) aPoint1 =
|
||||
GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), aP1Entry);
|
||||
Handle(GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
|
||||
if (aPoint1.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Get the second point
|
||||
CORBA::String_var aP2Entry = thePoint2->GetEntry();
|
||||
Handle(GEOM_Object) aPoint2 =
|
||||
GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), aP2Entry);
|
||||
Handle(GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
|
||||
if (aPoint2.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the rotation
|
||||
@ -1266,20 +1107,12 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RecomputeObject
|
||||
GetOperations()->SetNotDone();
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
|
||||
if (theObject == NULL) return aGEOMObject._retn();
|
||||
|
||||
//check if the object is a subshape
|
||||
//if (!theObject->IsMainShape()) {
|
||||
// GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
|
||||
// return aGEOMObject._retn();
|
||||
//}
|
||||
if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
|
||||
|
||||
aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
|
||||
|
||||
//Get the object itself
|
||||
CORBA::String_var anEntry = theObject->GetEntry();
|
||||
Handle(GEOM_Object) anObject =
|
||||
GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry);
|
||||
Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
|
||||
if (anObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
//Perform the recomputation
|
||||
|
Loading…
Reference in New Issue
Block a user