-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#include <Standard_Stream.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include <GEOMImpl_I3DPrimOperations.hxx>
#include "utilities.h"
-#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
#include <TFunction_DriverTable.hxx>
* constructor:
*/
//=============================================================================
-GEOMImpl_I3DPrimOperations::GEOMImpl_I3DPrimOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_I3DPrimOperations::GEOMImpl_I3DPrimOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
{
MESSAGE("GEOMImpl_I3DPrimOperations::GEOMImpl_I3DPrimOperations");
- myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine(), GetDocID());
+ myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine());
}
//=============================================================================
SetErrorCode(KO);
//Add a new Box object
- Handle(GEOM_Object) aBox = GetEngine()->AddObject(GetDocID(), GEOM_BOX);
+ Handle(GEOM_Object) aBox = GetEngine()->AddObject(GEOM_BOX);
//Add a new Box function with DX_DY_DZ parameters
Handle(GEOM_Function) aFunction = aBox->AddFunction(GEOMImpl_BoxDriver::GetID(), BOX_DX_DY_DZ);
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
//Add a new Box object
- Handle(GEOM_Object) aBox = GetEngine()->AddObject(GetDocID(), GEOM_BOX);
+ Handle(GEOM_Object) aBox = GetEngine()->AddObject(GEOM_BOX);
//Add a new Box function for creation a box relatively to two points
Handle(GEOM_Function) aFunction = aBox->AddFunction(GEOMImpl_BoxDriver::GetID(), BOX_TWO_PNT);
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (theH == 0 || theW == 0) return NULL;
//Add a new Face object
- Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+ Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
//Add a new Box function for creation a box relatively to two points
Handle(GEOM_Function) aFunction = aFace->AddFunction(GEOMImpl_FaceDriver::GetID(), FACE_H_W);
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (theObj.IsNull()) return NULL;
//Add a new Face object
- Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+ Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
//Add a new Box function for creation a box relatively to two points
Handle(GEOM_Function) aFunction = aFace->AddFunction(GEOMImpl_FaceDriver::GetID(), FACE_OBJ_H_W);
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
//Add a new Disk object
- Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+ Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GEOM_FACE);
//Add a new Disk function for creation a disk relatively to point and vector
Handle(GEOM_Function) aFunction =
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
//Add a new Disk object
- Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+ Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GEOM_FACE);
//Add a new Disk function for creation a disk relatively to three points
Handle(GEOM_Function) aFunction =
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (theR == 0 ) return NULL;
//Add a new Disk object
- Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+ Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GEOM_FACE);
//Add a new Box function for creation a box relatively to two points
Handle(GEOM_Function) aFunction = aDisk->AddFunction(GEOMImpl_DiskDriver::GetID(), DISK_R);
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
SetErrorCode(KO);
//Add a new Cylinder object
- Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
+ Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GEOM_CYLINDER);
//Add a new Cylinder function with R and H parameters
Handle(GEOM_Function) aFunction = aCylinder->AddFunction(GEOMImpl_CylinderDriver::GetID(), CYLINDER_R_H);
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
SetErrorCode(KO);
//Add a new Cylinder object
- Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
+ Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GEOM_CYLINDER);
//Add a new Cylinder function with R and H parameters
Handle(GEOM_Function) aFunction = aCylinder->AddFunction(GEOMImpl_CylinderDriver::GetID(), CYLINDER_R_H_A);
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
//Add a new Cylinder object
- Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
+ Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GEOM_CYLINDER);
//Add a new Cylinder function for creation a cylinder relatively to point and vector
Handle(GEOM_Function) aFunction =
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
//Add a new Cylinder object
- Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
+ Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GEOM_CYLINDER);
//Add a new Cylinder function for creation a cylinder relatively to point and vector
Handle(GEOM_Function) aFunction =
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
SetErrorCode(KO);
//Add a new Cone object
- Handle(GEOM_Object) aCone = GetEngine()->AddObject(GetDocID(), GEOM_CONE);
+ Handle(GEOM_Object) aCone = GetEngine()->AddObject(GEOM_CONE);
//Add a new Cone function with R and H parameters
Handle(GEOM_Function) aFunction =
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
//Add a new Cone object
- Handle(GEOM_Object) aCone = GetEngine()->AddObject(GetDocID(), GEOM_CONE);
+ Handle(GEOM_Object) aCone = GetEngine()->AddObject(GEOM_CONE);
//Add a new Cone function for creation a cone relatively to point and vector
Handle(GEOM_Function) aFunction =
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
SetErrorCode(KO);
//Add a new Sphere object
- Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GetDocID(), GEOM_SPHERE);
+ Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GEOM_SPHERE);
//Add a new Sphere function with R parameter
Handle(GEOM_Function) aFunction = aSphere->AddFunction(GEOMImpl_SphereDriver::GetID(), SPHERE_R);
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (thePnt.IsNull()) return NULL;
//Add a new Point object
- Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GetDocID(), GEOM_SPHERE);
+ Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GEOM_SPHERE);
//Add a new Sphere function for creation a sphere relatively to point
Handle(GEOM_Function) aFunction = aSphere->AddFunction(GEOMImpl_SphereDriver::GetID(), SPHERE_PNT_R);
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
SetErrorCode(KO);
//Add a new Torus object
- Handle(GEOM_Object) anEll = GetEngine()->AddObject(GetDocID(), GEOM_TORUS);
+ Handle(GEOM_Object) anEll = GetEngine()->AddObject(GEOM_TORUS);
//Add a new Torus function
Handle(GEOM_Function) aFunction =
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
//Add a new Torus object
- Handle(GEOM_Object) anEll = GetEngine()->AddObject(GetDocID(), GEOM_TORUS);
+ Handle(GEOM_Object) anEll = GetEngine()->AddObject(GEOM_TORUS);
//Add a new Torus function
Handle(GEOM_Function) aFunction =
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (theBase.IsNull() || theVec.IsNull()) return NULL;
//Add a new Prism object
- Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
+ Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
//Add a new Prism function for creation a Prism relatively to vector
Handle(GEOM_Function) aFunction =
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (theBase.IsNull() || theVec.IsNull()) return NULL;
//Add a new Prism object
- Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
+ Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
//Add a new Prism function for creation a Prism relatively to vector
Handle(GEOM_Function) aFunction =
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (theBase.IsNull() || thePoint1.IsNull() || thePoint2.IsNull()) return NULL;
//Add a new Prism object
- Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
+ Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
//Add a new Prism function for creation a Prism relatively to two points
Handle(GEOM_Function) aFunction =
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (theBase.IsNull() || thePoint1.IsNull() || thePoint2.IsNull()) return NULL;
//Add a new Prism object
- Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
+ Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
//Add a new Prism function for creation a Prism relatively to two points
Handle(GEOM_Function) aFunction =
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (theBase.IsNull()) return NULL;
//Add a new Prism object
- Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
+ Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
//Add a new Prism function for creation a Prism by DXDYDZ
Handle(GEOM_Function) aFunction =
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (theBase.IsNull()) return NULL;
//Add a new Prism object
- Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
+ Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
//Add a new Prism function for creation a Prism by DXDYDZ
Handle(GEOM_Function) aFunction =
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if ( theFuse )
{
//Add a new Extruded Boss object
- aPrism = GetEngine()->AddObject(GetDocID(), GEOM_EXTRUDED_BOSS);
+ aPrism = GetEngine()->AddObject(GEOM_EXTRUDED_BOSS);
}
else
{
//Add a new Extruded Cut object
- aPrism = GetEngine()->AddObject(GetDocID(), GEOM_EXTRUDED_CUT);
+ aPrism = GetEngine()->AddObject(GEOM_EXTRUDED_CUT);
}
//Add a new Prism function for the creation of a Draft Prism feature
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (theBase.IsNull() || thePath.IsNull()) return NULL;
//Add a new Pipe object
- Handle(GEOM_Object) aPipe = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
+ Handle(GEOM_Object) aPipe = GetEngine()->AddObject(GEOM_PIPE);
//Add a new Pipe function
Handle(GEOM_Function) aFunction =
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (theBase.IsNull() || theAxis.IsNull()) return NULL;
//Add a new Revolution object
- Handle(GEOM_Object) aRevolution = GetEngine()->AddObject(GetDocID(), GEOM_REVOLUTION);
+ Handle(GEOM_Object) aRevolution = GetEngine()->AddObject(GEOM_REVOLUTION);
//Add a new Revolution function for creation a revolution relatively to axis
Handle(GEOM_Function) aFunction =
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (theBase.IsNull() || theAxis.IsNull()) return NULL;
//Add a new Revolution object
- Handle(GEOM_Object) aRevolution = GetEngine()->AddObject(GetDocID(), GEOM_REVOLUTION);
+ Handle(GEOM_Object) aRevolution = GetEngine()->AddObject(GEOM_REVOLUTION);
//Add a new Revolution function for creation a revolution relatively to axis
Handle(GEOM_Function) aFunction =
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return NULL;
}
//Add a new Filling object
- Handle(GEOM_Object) aFilling = GetEngine()->AddObject(GetDocID(), GEOM_FILLING);
+ Handle(GEOM_Object) aFilling = GetEngine()->AddObject(GEOM_FILLING);
//Add a new Filling function for creation a filling from a compound
Handle(GEOM_Function) aFunction = aFilling->AddFunction(GEOMImpl_FillingDriver::GetID(), BASIC_FILLING);
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- if (strcmp(aFail->GetMessageString(), "Geom_BSplineSurface") == 0)
+ catch (Standard_Failure& aFail) {
+ if (strcmp(aFail.GetMessageString(), "Geom_BSplineSurface") == 0)
SetErrorCode("B-Spline surface construction failed");
else
- SetErrorCode(aFail->GetMessageString());
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
return anObj;
//Add a new ThruSections object
- Handle(GEOM_Object) aThruSect = GetEngine()->AddObject(GetDocID(), GEOM_THRUSECTIONS);
+ Handle(GEOM_Object) aThruSect = GetEngine()->AddObject(GEOM_THRUSECTIONS);
//Add a new ThruSections function
return anObj;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return anObj;
}
Standard_Integer nbLocs = (theLocations.IsNull() ? 0 :theLocations->Length());
//Add a new Pipe object
- Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
+ Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GEOM_PIPE);
//Add a new Pipe function
try {
OCC_CATCH_SIGNALS;
if (!GetSolver()->ComputeFunction(aFunction)) {
- SetErrorCode("Pipe with defferent section driver failed");
+ SetErrorCode("Pipe with different section driver failed");
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
Standard_Integer nbLocs = (theLocations.IsNull() ? 0 :theLocations->Length());
//Add a new Pipe object
- Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
+ Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GEOM_PIPE);
//Add a new Pipe function
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
Standard_Integer nbLocs = (theLocations.IsNull() ? 0 :theLocations->Length());
//Add a new Pipe object
- Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
+ Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GEOM_PIPE);
//Add a new Pipe function
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (theBase.IsNull() || thePath.IsNull() || theVec.IsNull()) return NULL;
//Add a new Pipe object
- Handle(GEOM_Object) aPipe = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
+ Handle(GEOM_Object) aPipe = GetEngine()->AddObject(GEOM_PIPE);
//Add a new Pipe function
Handle(GEOM_Function) aFunction =
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (isCopy)
{
//Add a new Copy object
- aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+ aCopy = GetEngine()->AddObject(theObject->GetType());
aFunction = aCopy->AddFunction(GEOMImpl_OffsetDriver::GetID(), OFFSET_THICKENING_COPY);
}
else
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (theShape.IsNull() || theBase1.IsNull() || theBase2.IsNull()) return NULL;
// Add a new Path object
- Handle(GEOM_Object) aPath = GetEngine()->AddObject(GetDocID(), GEOM_PIPE_PATH);
+ Handle(GEOM_Object) aPath = GetEngine()->AddObject(GEOM_PIPE_PATH);
// Add a new Path function
Handle(GEOM_Function) aFunction =
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+ catch (Standard_Failure& aFail) {
SetErrorCode("RestorePath: inappropriate arguments given");
return NULL;
}
return NULL;
// Add a new Path object
- Handle(GEOM_Object) aPath = GetEngine()->AddObject(GetDocID(), GEOM_PIPE_PATH);
+ Handle(GEOM_Object) aPath = GetEngine()->AddObject(GEOM_PIPE_PATH);
// Add a new Path function
Handle(GEOM_Function) aFunction =
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+ catch (Standard_Failure& aFail) {
SetErrorCode("RestorePath: inappropriate arguments given");
return NULL;
}