Join modifications from branch BR_For_OCT_611: migration to OCCT6.1.1 with new exception handling and improved threads support.

This commit is contained in:
jfa 2006-09-04 11:33:22 +00:00
parent cb4b4dddf0
commit eb709eb142
17 changed files with 408 additions and 21 deletions

View File

@ -55,6 +55,7 @@
#include <map>
#include <string>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
static GEOM_Engine* TheEngine = NULL;
@ -214,6 +215,9 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) theMainShape,
aSSI.SetIndices(theIndices);
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
GEOM_Solver aSolver (GEOM_Engine::GetEngine());
if (!aSolver.ComputeFunction(aFunction)) {
MESSAGE("GEOM_Engine::AddSubShape Error: Can't build a sub shape");

View File

@ -54,6 +54,7 @@
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
#define ARGUMENT_LABEL 1
@ -165,7 +166,10 @@ TopoDS_Shape GEOM_Function::GetValue()
if(anObject.IsNull()) return aShape;
if(!anObject->IsMainShape()) {
try {
GEOM_Solver aSolver(GEOM_Engine::GetEngine());
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
GEOM_Solver aSolver(GEOM_Engine::GetEngine());
if (!aSolver.ComputeFunction(this)) {
MESSAGE("GEOM_Object::GetValue Error : Can't build a sub shape");
return aShape;

View File

@ -60,6 +60,7 @@
#include <GEOMImpl_IThruSections.hxx>
#include <GEOMImpl_IPipeDiffSect.hxx>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
//=============================================================================
@ -111,6 +112,9 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeBoxDXDYDZ (double theDX, dou
//Compute the box value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Box driver failed");
return NULL;
@ -165,6 +169,9 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeBoxTwoPnt (Handle(GEOM_Objec
//Compute the Box value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Box driver failed");
return NULL;
@ -211,6 +218,9 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderRH (double theR, dou
//Compute the Cylinder value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Cylinder driver failed");
return NULL;
@ -269,6 +279,9 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderPntVecRH (Handle(GEO
//Compute the Cylinder value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Cylinder driver failed");
return NULL;
@ -318,6 +331,9 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeConeR1R2H (double theR1, dou
//Compute the Cone value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Cone driver failed");
return NULL;
@ -378,6 +394,9 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeConePntVecR1R2H (Handle(GEOM
//Compute the Cone value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Cone driver failed");
return NULL;
@ -423,6 +442,9 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeSphereR (double theR)
//Compute the Sphere value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Sphere driver failed");
return NULL;
@ -475,6 +497,9 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeSpherePntR (Handle(GEOM_Obje
//Compute the Sphere value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Sphere driver failed");
return NULL;
@ -523,6 +548,9 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeTorusRR
//Compute the Torus value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Torus driver failed");
return NULL;
@ -580,6 +608,9 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeTorusPntVecRR
//Compute the Torus value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Torus driver failed");
return NULL;
@ -637,6 +668,9 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismVecH (Handle(GEOM_Objec
//Compute the Prism value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//SetErrorCode("Prism driver failed");
SetErrorCode("Extrusion can not be created, check input data");
@ -695,6 +729,9 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismTwoPnt
//Compute the Prism value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//SetErrorCode("Prism driver failed");
SetErrorCode("Extrusion can not be created, check input data");
@ -751,6 +788,9 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePipe (Handle(GEOM_Object) th
//Compute the Pipe value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Pipe driver failed");
return NULL;
@ -808,6 +848,9 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeRevolutionAxisAngle (Handle(
//Compute the Revolution value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Revolution driver failed");
return NULL;
@ -860,6 +903,9 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeSolidShell (Handle(GEOM_Obje
//Compute the Solid value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Solid driver failed");
return NULL;
@ -916,6 +962,9 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFilling
//Compute the Solid value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Filling driver failed");
return NULL;
@ -1002,6 +1051,9 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeThruSections(
//Compute the ThruSections value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("ThruSections driver failed");
return anObj;
@ -1124,6 +1176,9 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePipeWithDifferentSections(
//Compute the Pipe value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Pipe with defferent section driver failed");
return anObj;

View File

@ -47,6 +47,7 @@
#include <GEOMImpl_Types.hxx>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
//=============================================================================
@ -100,6 +101,9 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointXYZ
//Compute the point value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Point driver failed");
return NULL;
@ -152,6 +156,9 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointWithReference
//Compute the point value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Point driver failed");
return NULL;
@ -202,6 +209,9 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointOnCurve
//Compute the point value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Point driver failed");
return NULL;
@ -252,6 +262,9 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeTangentOnCurve
//Compute the vector value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Vector driver failed");
return NULL;
@ -300,6 +313,9 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeVectorDXDYDZ
//Compute the Vector value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Vector driver failed");
return NULL;
@ -352,6 +368,9 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeVectorTwoPnt
//Compute the Vector value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Vector driver failed");
return NULL;
@ -405,6 +424,9 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeLine
//Compute the Line value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Line driver failed");
return NULL;
@ -457,6 +479,9 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeLineTwoPnt
//Compute the Line value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Line driver failed");
return NULL;
@ -514,6 +539,9 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlaneThreePnt
//Compute the Plane value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Plane driver failed");
return NULL;
@ -568,6 +596,9 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlanePntVec
//Compute the Plane value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Plane driver failed");
return NULL;
@ -619,6 +650,9 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlaneFace
//Compute the Plane value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Plane driver failed");
return NULL;
@ -670,6 +704,9 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeMarker
//Compute the marker value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Marker driver failed");
return NULL;
@ -728,6 +765,9 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeTangentPlaneOnFace(const Hand
//Compute the Plane value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Plane driver failed");
return NULL;

View File

@ -94,6 +94,7 @@
#include <Precision.hxx>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
//=============================================================================
@ -161,6 +162,9 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad
//Compute the Face value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Block driver failed to compute a face");
return NULL;
@ -216,6 +220,9 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad2Edges
//Compute the Face value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Block driver failed to compute a face");
return NULL;
@ -278,6 +285,9 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad4Vertices
//Compute the Face value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Block driver failed to compute a face");
return NULL;
@ -347,6 +357,9 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeHexa
//Compute the Block value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Block driver failed to compute a block");
return NULL;
@ -403,6 +416,9 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeHexa2Faces
//Compute the Block value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Block driver failed to compute a block");
return NULL;
@ -456,6 +472,9 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeBlockCompound
//Compute the Blocks Compound value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Block driver failed to compute a blocks compound");
return NULL;
@ -585,6 +604,9 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetEdge
//Compute the Edge value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
TopTools_IndexedDataMapOfShapeListOfShape MVE;
GEOMImpl_Block6Explorer::MapShapesAndAncestors
(aBlockOrComp, TopAbs_VERTEX, TopAbs_EDGE, MVE);
@ -688,6 +710,9 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetEdgeNearPoint
//Compute the Edge value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
TopoDS_Shape aShape;
TopoDS_Vertex aVert = TopoDS::Vertex(anArg);
@ -817,6 +842,9 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetFaceByPoints
//Compute the Face value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
TopoDS_Shape aShape;
TopTools_IndexedDataMapOfShapeListOfShape MVF;
@ -949,6 +977,9 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetFaceByEdges
//Compute the Face value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
TopoDS_Shape aShape;
TopTools_IndexedDataMapOfShapeListOfShape MEF;
@ -1071,6 +1102,9 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetOppositeFace
//Compute the Face value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
TopoDS_Shape aShape;
GEOMImpl_Block6Explorer aBlockTool;
@ -1134,6 +1168,9 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetFaceNearPoint
//Compute the Face value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
TopoDS_Shape aShape;
TopoDS_Vertex aVert = TopoDS::Vertex(anArg);
@ -1323,6 +1360,9 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetFaceByNormale
//Compute the Face value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
TopoDS_Shape aShape;
TopoDS_Edge anEdge = TopoDS::Edge(anArg);
@ -1436,6 +1476,9 @@ Standard_Boolean GEOMImpl_IBlocksOperations::IsCompoundOfBlocks
//Check
isCompOfBlocks = Standard_True;
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
TopTools_MapOfShape mapShape;
TopExp_Explorer exp (aBlockOrComp, TopAbs_SOLID);
for (; exp.More(); exp.Next()) {
@ -2288,6 +2331,9 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::RemoveExtraEdges
//Compute the fixed shape
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Block driver failed to remove extra edges of the given shape");
return NULL;
@ -2337,6 +2383,9 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::CheckAndImprove
//Compute the fixed shape
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Block driver failed to improve the given blocks compound");
return NULL;
@ -2386,6 +2435,9 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IBlocksOperations::ExplodeCompound
// Explode
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
TopExp_Explorer exp (aBlockOrComp, TopAbs_SOLID);
for (; exp.More(); exp.Next()) {
if (mapShape.Add(exp.Current())) {
@ -2478,6 +2530,9 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetBlockNearPoint
//Compute the Block value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
TopoDS_Shape aShape;
TopoDS_Vertex aVert = TopoDS::Vertex(anArg);
@ -2654,6 +2709,9 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetBlockByParts
//Compute the Block value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
// 1. Explode compound on solids
TopTools_MapOfShape mapShape;
Standard_Integer nbSolids = 0;
@ -2770,6 +2828,9 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IBlocksOperations::GetBlocksByPart
//Get the Blocks
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
TopTools_MapOfShape mapShape;
Standard_Integer nbSolids = 0;
TopExp_Explorer exp (aBlockOrComp, TopAbs_SOLID);
@ -2890,6 +2951,9 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeMultiTransformation1D
//Compute the transformation
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Block driver failed to make multi-transformation");
return NULL;
@ -2951,6 +3015,9 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeMultiTransformation2D
//Compute the transformation
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Block driver failed to make multi-transformation");
return NULL;

View File

@ -36,6 +36,7 @@
#include "utilities.h"
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
//=============================================================================
@ -105,6 +106,9 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeBoolean (Handle(GEOM_Object
//Compute the Boolean value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Boolean driver failed");
return NULL;
@ -260,6 +264,9 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakePartition
//Compute the Partition
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Partition driver failed");
return NULL;
@ -330,6 +337,9 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeHalfPartition
//Compute the Partition value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Partition driver failed");
return NULL;

View File

@ -44,6 +44,7 @@
#include <TDF_Tool.hxx>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
//=============================================================================
@ -106,6 +107,9 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakePolyline (list<Handle(GEOM_O
//Compute the Polyline value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Polyline driver failed");
return NULL;
@ -170,6 +174,9 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCircleThreePnt (Handle(GEOM_
//Compute the Circle value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Circle driver failed");
return NULL;
@ -225,6 +232,9 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCirclePntVecR
//Compute the Circle value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Circle driver failed");
return NULL;
@ -282,6 +292,9 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeEllipse
//Compute the Ellipse value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Ellipse driver failed");
return NULL;
@ -339,6 +352,9 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeArc (Handle(GEOM_Object) the
//Compute the Arc value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Arc driver failed");
return NULL;
@ -396,6 +412,9 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineBezier
//Compute the Spline value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Spline driver failed");
return NULL;
@ -460,6 +479,9 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineInterpolation
//Compute the Spline value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Spline driver failed");
return NULL;
@ -521,6 +543,9 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSketcher
//Compute the Sketcher value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Sketcher driver failed");
return NULL;
@ -580,6 +605,9 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSketcherOnPlane
//Compute the Sketcher value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Sketcher driver failed");
return NULL;

View File

@ -46,8 +46,6 @@
#include <TColStd_ListOfInteger.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
//=============================================================================
/*!
* constructor:

View File

@ -49,6 +49,7 @@
#include <TDF_Tool.hxx>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
@ -134,8 +135,10 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::ShapeProcess (Handle(GEOM_Objec
}
//Compute the translation
try
{
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction))
{
SetErrorCode("Shape Healing algorithm failed");
@ -341,8 +344,10 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::SuppressFaces
HI.SetOriginal( aLastFunction );
//Compute the translation
try
{
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction))
{
SetErrorCode("Healing driver failed");
@ -410,8 +415,10 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::CloseContour
HI.SetOriginal( aLastFunction );
//Compute the translation
try
{
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction))
{
SetErrorCode("Healing driver failed");
@ -477,8 +484,10 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::RemoveIntWires
HI.SetOriginal( aLastFunction );
//Compute the translation
try
{
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction))
{
SetErrorCode("Healing driver failed");
@ -543,8 +552,10 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::FillHoles (Handle(GEOM_Object)
HI.SetOriginal( aLastFunction );
//Compute the translation
try
{
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction))
{
SetErrorCode("Healing driver failed");
@ -609,8 +620,10 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::Sew (Handle(GEOM_Object) theObj
HI.SetOriginal( aLastFunction );
//Compute the translation
try
{
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction))
{
SetErrorCode("Healing driver failed");
@ -670,8 +683,10 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::DivideEdge (Handle(GEOM_Object)
HI.SetOriginal( aLastFunction );
//Compute the translation
try
{
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction))
{
SetErrorCode("Healing driver failed");
@ -812,6 +827,9 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::ChangeOrientation (Handle(GEOM_
//Compute the translation
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Healing driver failed");
return NULL;
@ -867,6 +885,9 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::ChangeOrientationCopy (Handle(G
//Compute the translation
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Healing driver failed");
return NULL;

View File

@ -42,6 +42,7 @@
#include <GEOMImpl_Types.hxx>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
//=============================================================================
@ -98,6 +99,9 @@ Handle(GEOM_Object) GEOMImpl_IInsertOperations::MakeCopy(Handle(GEOM_Object) the
//Compute the Copy value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Copy driver failed");
return NULL;
@ -155,6 +159,9 @@ void GEOMImpl_IInsertOperations::Export
//Perform the Export
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Export driver failed");
return;
@ -210,6 +217,9 @@ Handle(GEOM_Object) GEOMImpl_IInsertOperations::Import
//Perform the Import
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Import driver failed");
return NULL;

View File

@ -51,6 +51,7 @@
#include <TopoDS_TShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
//=============================================================================
@ -106,6 +107,9 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletAll
//Compute the Fillet value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Fillet driver failed");
return NULL;
@ -164,6 +168,9 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletEdges
//Compute the Fillet value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Fillet driver failed");
return NULL;
@ -230,6 +237,9 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletFaces
//Compute the Fillet value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Fillet driver failed");
return NULL;
@ -287,6 +297,9 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferAll (Handle(GEOM_Objec
//Compute the Chamfer value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Chamfer driver failed");
return NULL;
@ -341,6 +354,9 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdge
//Compute the Chamfer value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Chamfer driver failed");
return NULL;
@ -402,6 +418,9 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferFaces
//Compute the Chamfer value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Chamfer driver failed");
return NULL;
@ -463,6 +482,9 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeArchimede (Handle(GEOM_Object
//Compute the Archimede value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Archimede driver failed");
return NULL;

View File

@ -67,6 +67,7 @@
#include <Geom_Plane.hxx>
#include <gp_Pln.hxx>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
//=============================================================================
@ -167,6 +168,10 @@ void GEOMImpl_IMeasureOperations::GetPosition
}
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
gp_Ax3 anAx3 = GetPosition(aShape);
gp_Pnt anOri = anAx3.Location();
@ -219,6 +224,9 @@ Handle(GEOM_Object) GEOMImpl_IMeasureOperations::GetCentreOfMass
//Compute the CentreOfMass value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Measure driver failed to compute centre of mass");
return NULL;
@ -263,6 +271,9 @@ void GEOMImpl_IMeasureOperations::GetBasicProperties (Handle(GEOM_Object) theSha
//Compute the parameters
GProp_GProps LProps, SProps;
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
BRepGProp::LinearProperties(aShape, LProps);
theLength = LProps.Mass();
@ -316,6 +327,9 @@ void GEOMImpl_IMeasureOperations::GetInertia
GProp_GProps System;
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (aShape.ShapeType() == TopAbs_VERTEX ||
aShape.ShapeType() == TopAbs_EDGE ||
aShape.ShapeType() == TopAbs_WIRE) {
@ -380,6 +394,9 @@ void GEOMImpl_IMeasureOperations::GetBoundingBox
Bnd_Box B;
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
BRepBndLib::Add(aShape, B);
B.Get(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax);
}
@ -422,6 +439,9 @@ void GEOMImpl_IMeasureOperations::GetTolerance
FaceMax = EdgeMax = VertMax = -RealLast();
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
for (TopExp_Explorer ExF (aShape, TopAbs_FACE); ExF.More(); ExF.Next()) {
TopoDS_Face Face = TopoDS::Face(ExF.Current());
T = BRep_Tool::Tolerance(Face);
@ -481,6 +501,9 @@ bool GEOMImpl_IMeasureOperations::CheckShape (Handle(GEOM_Object) theShape,
//Compute the parameters
bool isValid = false;
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
BRepCheck_Analyzer ana (aShape, theIsCheckGeom);
if (ana.IsValid()) {
theDump.Clear();
@ -531,6 +554,9 @@ TCollection_AsciiString GEOMImpl_IMeasureOperations::WhatIs (Handle(GEOM_Object)
Astr = Astr + " Number of sub-shapes : \n";
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
int iType, nbTypes [TopAbs_SHAPE];
for (iType = 0; iType < TopAbs_SHAPE; ++iType)
nbTypes[iType] = 0;
@ -601,6 +627,9 @@ Standard_Real GEOMImpl_IMeasureOperations::GetMinDistance
//Compute the parameters
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
BRepExtrema_DistShapeShape dst (aShape1, aShape2);
if (dst.IsDone()) {
gp_Pnt PMin1, PMin2, P1, P2;
@ -654,8 +683,10 @@ void GEOMImpl_IMeasureOperations::PointCoordinates( Handle(GEOM_Object) theShape
return;
}
try
{
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
theX = aPnt.X();
theY = aPnt.Y();

View File

@ -95,6 +95,7 @@
#include <vector>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
//=============================================================================
@ -152,6 +153,9 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeEdge
//Compute the Edge value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Vector driver failed");
return NULL;
@ -216,6 +220,9 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFace (Handle(GEOM_Object) th
//Compute the Face value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Shape driver failed to compute a face");
return NULL;
@ -277,6 +284,9 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFaceWires
//Compute the shape
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Shape driver failed");
return NULL;
@ -360,6 +370,9 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeSolidShell (Handle(GEOM_Obje
//Compute the Solid value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Solid driver failed");
return NULL;
@ -432,6 +445,9 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeShape
//Compute the shape
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Shape driver failed");
return NULL;
@ -496,6 +512,9 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeGlueFaces
//Compute the sub-shape value
Standard_Boolean isWarning = Standard_False;
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Shape driver failed to glue faces");
return NULL;
@ -947,6 +966,9 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::ReverseShape(Handle(GEOM_Object)
//Compute the sub-shape value
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Shape driver failed to reverse shape");
return NULL;

View File

@ -49,6 +49,7 @@
#include <GEOMImpl_Types.hxx>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
//=============================================================================
@ -109,6 +110,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateTwoPoints
//Compute the translation
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Translation driver failed");
return NULL;
@ -159,6 +163,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateDXDYDZ
//Compute the translation
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Translation driver failed");
return NULL;
@ -212,6 +219,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateTwoPointsCopy
//Compute the translation
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Translation driver failed");
return NULL;
@ -264,6 +274,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateDXDYDZCopy
//Compute the translation
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Translation driver failed");
return NULL;
@ -316,6 +329,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateVector
//Compute the translation
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Translation driver failed");
return NULL;
@ -367,6 +383,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateVectorCopy
//Compute the translation
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Translation driver failed");
return NULL;
@ -420,6 +439,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Translate1D
//Compute the translation
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Translation driver failed");
return NULL;
@ -480,6 +502,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Translate2D (Handle(GEOM_Obje
//Compute the translation
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Translation driver failed");
return NULL;
@ -533,6 +558,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorPlane
//Compute the mirror
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Mirror driver failed");
return NULL;
@ -583,6 +611,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorPlaneCopy
//Compute the mirror
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Mirror driver failed");
return NULL;
@ -634,6 +665,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorPoint
//Compute the mirror
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Mirror driver failed");
return NULL;
@ -684,6 +718,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorPointCopy
//Compute the mirror
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Mirror driver failed");
return NULL;
@ -735,6 +772,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorAxis
//Compute the mirror
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Mirror driver failed");
return NULL;
@ -785,6 +825,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorAxisCopy
//Compute the mirror
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Mirror driver failed");
return NULL;
@ -834,6 +877,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::OffsetShape
//Compute the offset
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Offset driver failed");
return NULL;
@ -885,6 +931,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::OffsetShapeCopy
//Compute the offset
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Offset driver failed");
return NULL;
@ -938,6 +987,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::ScaleShape
//Compute the scale
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Scale driver failed");
return NULL;
@ -990,6 +1042,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::ScaleShapeCopy
//Compute the scale
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Scale driver failed");
return NULL;
@ -1044,6 +1099,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::PositionShape
//Compute the Position
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Position driver failed");
return NULL;
@ -1100,6 +1158,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::PositionShapeCopy
//Compute the position
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Position driver failed");
return NULL;
@ -1153,6 +1214,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate (Handle(GEOM_Object) t
//Compute the translation
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Rotate driver failed");
return NULL;
@ -1203,6 +1267,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::RotateCopy (Handle(GEOM_Objec
//Compute the translation
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Rotate driver failed");
return NULL;
@ -1255,6 +1322,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate1D (Handle(GEOM_Object)
//Compute the translation
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Rotate driver failed");
return NULL;
@ -1313,6 +1383,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate2D (Handle(GEOM_Object)
//Compute the translation
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Rotate driver failed");
return NULL;

View File

@ -43,7 +43,6 @@
#include <TopoDS_Iterator.hxx>
#include <BRep_Tool.hxx>
#include <Precision.hxx>
#include <Standard_ErrorHandler.hxx>
#include "GEOMImpl_Types.hxx"
#include <qlabel.h>

View File

@ -37,7 +37,6 @@
#include <BRepAdaptor_Curve.hxx>
#include <BRepPrimAPI_MakeRevol.hxx>
#include <TopExp_Explorer.hxx>
#include <Standard_ErrorHandler.hxx>
#include "GEOMImpl_Types.hxx"
#include <qlabel.h>

View File

@ -34,6 +34,7 @@
#include <TopoDS_Compound.hxx>
#include <TopoDS_Shape.hxx>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
#ifdef WNT
@ -64,6 +65,9 @@ SALOME_WNT_EXPORT
BRep_Builder B;
B.MakeCompound( compound );
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
#endif
IFSelect_ReturnStatus status = aReader.ReadFile(theFileName.ToCString());
if (status == IFSelect_RetDone) {