* Constructor
*/
//=============================================================================
-AdvancedEngine_IOperations::AdvancedEngine_IOperations(GEOM_Engine* theEngine, int theDocID) :
- GEOM_IOperations(theEngine, theDocID)
+AdvancedEngine_IOperations::AdvancedEngine_IOperations(GEOM_Engine* theEngine) :
+ GEOM_IOperations(theEngine)
{
MESSAGE("AdvancedEngine_IOperations::AdvancedEngine_IOperations");
- myBasicOperations = new GEOMImpl_IBasicOperations(GetEngine(), GetDocID());
- myBooleanOperations = new GEOMImpl_IBooleanOperations(GetEngine(), GetDocID());
- myShapesOperations = new GEOMImpl_IShapesOperations(GetEngine(), GetDocID());
- myTransformOperations = new GEOMImpl_ITransformOperations(GetEngine(), GetDocID());
- myBlocksOperations = new GEOMImpl_IBlocksOperations(GetEngine(), GetDocID());
- my3DPrimOperations = new GEOMImpl_I3DPrimOperations(GetEngine(), GetDocID());
- myLocalOperations = new GEOMImpl_ILocalOperations(GetEngine(), GetDocID());
- myHealingOperations = new GEOMImpl_IHealingOperations(GetEngine(), GetDocID());
- myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine(), GetDocID());
+ myBasicOperations = new GEOMImpl_IBasicOperations(GetEngine());
+ myBooleanOperations = new GEOMImpl_IBooleanOperations(GetEngine());
+ myShapesOperations = new GEOMImpl_IShapesOperations(GetEngine());
+ myTransformOperations = new GEOMImpl_ITransformOperations(GetEngine());
+ myBlocksOperations = new GEOMImpl_IBlocksOperations(GetEngine());
+ my3DPrimOperations = new GEOMImpl_I3DPrimOperations(GetEngine());
+ myLocalOperations = new GEOMImpl_ILocalOperations(GetEngine());
+ myHealingOperations = new GEOMImpl_IHealingOperations(GetEngine());
+ myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine());
}
//=============================================================================
return false;
}
- gp_Trsf aTrsfInv = aTrsf.Inverted();
-
// int expectedGroups = 0;
// if (shapeType == TSHAPE_BASIC)
// if (Abs(theR2+theW2-theR1-theW1) <= Precision::Approximation())
if (aGroup.IsNull())
continue;
+ gp_Trsf aTrsfInv = aTrsf.Inverted();
TopoDS_Shape aGroupShape = aGroup->GetValue();
BRepBuilderAPI_Transform aTransformationShapeInv (aGroupShape, aTrsfInv, Standard_False);
TopoDS_Shape aGroupShapeTrsfInv = aTransformationShapeInv.Shape();
// Default value=3
aFinder.SetNbPntsMin(3);
// Sets the maximal number of inner points for edges or faces.
- // It is usefull for the cases when this number is very big (e.g =2000) to improve
+ // It is useful for the cases when this number is very big (e.g =2000) to improve
// the performance. If this value =0, all inner points will be taken into account.
// Default value=0
aFinder.SetNbPntsMax(100);
// Get faces that are laying on conical faces.
if (aConicalFaces.IsEmpty() == Standard_False) {
Handle(GEOM_Object) aCone =
- GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+ GetEngine()->AddObject(GEOM_TSHAPE);
Handle(GEOM_Function) aFunction =
aCone->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
TopTools_ListIteratorOfListOfShape aFIter(aConicalFaces);
TopoDS_Shape aShape = Te3->GetValue();
theShape->GetLastFunction()->SetValue(aShape);
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return false;
}
MESSAGE("AdvancedEngine_IOperations::MakePipeTShape");
SetErrorCode(KO);
//Add a new object
- Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+ Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
//Add a new shape function with parameters
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
aFunction->SetValue(aResShape);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
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 object
- Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+ Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
/////////////////
// TSHAPE CODE
/////////////////
aFunction->SetValue(aResShape);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
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 object
- Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+ Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
//Add a new shape function with parameters
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_CHAMFER);
if (aFunction.IsNull()) return NULL;
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
try {
aChamfer = myLocalOperations->MakeChamferEdges(aShape, theW, theH, theEdges);
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (aChamfer.IsNull()) {
aFunction->SetValue(aResShape);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
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 object
- Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+ Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
//Add a new shape function with parameters
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_CHAMFER);
if (aFunction.IsNull()) return NULL;
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
try {
aChamfer = myLocalOperations->MakeChamferEdges(aShape, theW, theH, theEdges);
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (aChamfer.IsNull()) {
aFunction->SetValue(aResShape);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
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 object
- Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+ Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
//Add a new shape function with parameters
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_FILLET);
if (aFunction.IsNull()) return NULL;
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
try {
aFillet = myLocalOperations->MakeFilletEdges(aShape, theRF, theEdges);
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (aFillet.IsNull()) {
aFunction->SetValue(aResShape);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
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 object
- Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+ Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
//Add a new shape function with parameters
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_FILLET);
if (aFunction.IsNull()) return NULL;
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
try {
aFillet = myLocalOperations->MakeFilletEdges(aShape, theRF, theEdges);
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
if (aFillet.IsNull()) {
aFunction->SetValue(aResShape);
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}
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 object
- Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDDISK);
+ Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_DIVIDEDDISK);
//Add a new shape function with parameters
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_DividedDiskDriver::GetID(), DIVIDEDDISK_R_RATIO);
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 object
- Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDDISK);
+ Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_DIVIDEDDISK);
//Add a new shape function with parameters
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_DividedDiskDriver::GetID(), DIVIDEDDISK_R_VECTOR_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;
}
SetErrorCode(KO);
//Add a new object
- Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDCYLINDER);
+ Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_DIVIDEDCYLINDER);
Handle(GEOM_Object) aBaseShape = MakeDividedDisk(theR, 67.0, 1, thePattern);
aBaseShape->GetLastFunction()->SetDescription(""); // Erase dump of MakeDividedDisk
SetErrorCode(KO);
//Add a new object
- Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_SMOOTHINGSURFACE);
+ Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_SMOOTHINGSURFACE);
//Add a new shape function with parameters
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_SmoothingSurfaceDriver::GetID(), SMOOTHINGSURFACE_LPOINTS);
return NULL;
}
}
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
+ catch (Standard_Failure& aFail) {
+ SetErrorCode(aFail.GetMessageString());
return NULL;
}