Fix quickly for OCCT 7.6 WASM

This commit is contained in:
Louis Gombert 2024-08-13 10:12:46 +00:00
parent bf00dde03c
commit ac65da58f1
24 changed files with 187 additions and 187 deletions

View File

@ -43,7 +43,7 @@
#include <Basics_OCCTVersion.hxx> #include <Basics_OCCTVersion.hxx>
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
#include <BRepAdaptor_HSurface.hxx> #include <BRepAdaptor_HSurface.hxx>
#else #else
#include <BRepAdaptor_Surface.hxx> #include <BRepAdaptor_Surface.hxx>
@ -123,7 +123,7 @@ TopoDS_Shape AdvancedEngine_SmoothingSurfaceDriver::MakeSmoothingSurfaceUnClosed
GeomPlate_BuildPlateSurface aBuilder(3,10); GeomPlate_BuildPlateSurface aBuilder(3,10);
// ** Initialization of surface // ** Initialization of surface
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
Handle(BRepAdaptor_HSurface) HSI = new BRepAdaptor_HSurface(); Handle(BRepAdaptor_HSurface) HSI = new BRepAdaptor_HSurface();
HSI->ChangeSurface().Initialize(aInitShape); HSI->ChangeSurface().Initialize(aInitShape);
aBuilder.LoadInitSurface( BRep_Tool::Surface(HSI->ChangeSurface().Face())); aBuilder.LoadInitSurface( BRep_Tool::Surface(HSI->ChangeSurface().Face()));

View File

@ -73,7 +73,7 @@
#include <TColGeom_HArray2OfSurface.hxx> #include <TColGeom_HArray2OfSurface.hxx>
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
#include <GeomAdaptor_HSurface.hxx> #include <GeomAdaptor_HSurface.hxx>
#else #else
#include <GeomAdaptor_Surface.hxx> #include <GeomAdaptor_Surface.hxx>
@ -89,7 +89,7 @@
#include <Geom_SurfaceOfLinearExtrusion.hxx> #include <Geom_SurfaceOfLinearExtrusion.hxx>
#include <Geom_RectangularTrimmedSurface.hxx> #include <Geom_RectangularTrimmedSurface.hxx>
#include <BRepAdaptor_Surface.hxx> #include <BRepAdaptor_Surface.hxx>
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
#include <BRepAdaptor_HSurface.hxx> #include <BRepAdaptor_HSurface.hxx>
#endif #endif
#include <LocalAnalysis_SurfaceContinuity.hxx> #include <LocalAnalysis_SurfaceContinuity.hxx>
@ -306,7 +306,7 @@ static Standard_Boolean IsTangentFaces(const TopoDS_Edge& theEdge,
// Computation of the number of samples on the edge. // Computation of the number of samples on the edge.
BRepAdaptor_Surface aBAS(theFace); BRepAdaptor_Surface aBAS(theFace);
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
Handle(BRepAdaptor_HSurface) aBAHS = new BRepAdaptor_HSurface(aBAS); Handle(BRepAdaptor_HSurface) aBAHS = new BRepAdaptor_HSurface(aBAS);
#else #else
Handle(BRepAdaptor_Surface) aBAHS = new BRepAdaptor_Surface(aBAS); Handle(BRepAdaptor_Surface) aBAHS = new BRepAdaptor_Surface(aBAS);
@ -913,7 +913,7 @@ Standard_Boolean BlockFix_UnionFaces::IsSameDomain(const TopoDS_Face& aFace,
if (S1->IsKind(STANDARD_TYPE(Geom_ElementarySurface)) && if (S1->IsKind(STANDARD_TYPE(Geom_ElementarySurface)) &&
S2->IsKind(STANDARD_TYPE(Geom_ElementarySurface))) S2->IsKind(STANDARD_TYPE(Geom_ElementarySurface)))
{ {
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
Handle(GeomAdaptor_HSurface) aGA1 = new GeomAdaptor_HSurface(S1); Handle(GeomAdaptor_HSurface) aGA1 = new GeomAdaptor_HSurface(S1);
Handle(GeomAdaptor_HSurface) aGA2 = new GeomAdaptor_HSurface(S2); Handle(GeomAdaptor_HSurface) aGA2 = new GeomAdaptor_HSurface(S2);
#else #else

View File

@ -1059,7 +1059,7 @@ Standard_Integer GEOMAlgo_AlgoTools::PointCloudInFace(const TopoDS_Face& theFace
const int theNbPnts, const int theNbPnts,
TopoDS_Compound& theCompound) TopoDS_Compound& theCompound)
{ {
#if OCC_VERSION_LARGE < 0x07050304 #if 1
return -1; return -1;
#else #else
ShapeUpgrade_ShapeDivideArea tool (theFace); ShapeUpgrade_ShapeDivideArea tool (theFace);
@ -1568,7 +1568,7 @@ void ModifyFacesForGlobalResult(const TopoDS_Face& theInputFace,
Standard_Integer aNbFacesInLocalResult; Standard_Integer aNbFacesInLocalResult;
if (aNumberToSplit > 1) if (aNumberToSplit > 1)
{ {
#if OCC_VERSION_LARGE < 0x07050304 #if 1
aNbFacesInLocalResult = 0; aNbFacesInLocalResult = 0;
#else #else
ShapeUpgrade_ShapeDivideArea aLocalTool (aUnifiedShape); ShapeUpgrade_ShapeDivideArea aLocalTool (aUnifiedShape);
@ -1648,7 +1648,7 @@ void ModifyFacesForGlobalResult(const TopoDS_Face& theInputFace,
Standard_Integer aNumberToSplit = (theIsToAddFaces)? aMaxNbFaces + (aDiff-aSum) : aMaxNbFaces - (aDiff-aSum); Standard_Integer aNumberToSplit = (theIsToAddFaces)? aMaxNbFaces + (aDiff-aSum) : aMaxNbFaces - (aDiff-aSum);
if (aNumberToSplit > 1) if (aNumberToSplit > 1)
{ {
#if OCC_VERSION_LARGE < 0x07050304 #if 1
aNumberToSplit = 1; aNumberToSplit = 1;
#else #else
ShapeUpgrade_ShapeDivideArea aLocalTool (aUnifiedShape); ShapeUpgrade_ShapeDivideArea aLocalTool (aUnifiedShape);

View File

@ -73,7 +73,7 @@ class GEOMAlgo_ShellSolidBuilder : public BOPAlgo_Builder {
protected: protected:
Standard_EXPORT Standard_EXPORT
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
virtual void PerformInternal(const BOPAlgo_PaveFiller& theFiller); virtual void PerformInternal(const BOPAlgo_PaveFiller& theFiller);
#else #else
virtual void PerformInternal(const BOPAlgo_PaveFiller& theFiller, virtual void PerformInternal(const BOPAlgo_PaveFiller& theFiller,
@ -101,7 +101,7 @@ GEOMAlgo_ShellSolidBuilder::~GEOMAlgo_ShellSolidBuilder()
//function : PerformInternal //function : PerformInternal
//purpose : //purpose :
//======================================================================= //=======================================================================
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFiller) void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFiller)
#else #else
void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFiller, void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFiller,
@ -124,7 +124,7 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi
return; return;
} }
#if OCC_VERSION_LARGE >= 0x07070000 #if OCC_VERSION_LARGE >= 0x07060000
Message_ProgressScope aPS(theRange, "Building the result of Boolean operation", 100); Message_ProgressScope aPS(theRange, "Building the result of Boolean operation", 100);
// //
BOPAlgo_PISteps aSteps (PIOperation_Last); BOPAlgo_PISteps aSteps (PIOperation_Last);
@ -133,7 +133,7 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi
// 3. Fill Images // 3. Fill Images
// 3.1 Vertice // 3.1 Vertice
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
FillImagesVertices(); FillImagesVertices();
#else #else
FillImagesVertices(aPS.Next(aSteps.GetStep(PIOperation_TreatVertices))); FillImagesVertices(aPS.Next(aSteps.GetStep(PIOperation_TreatVertices)));
@ -147,7 +147,7 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi
return; return;
} }
// 3.2 Edges // 3.2 Edges
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
FillImagesEdges(); FillImagesEdges();
#else #else
FillImagesEdges(aPS.Next(aSteps.GetStep(PIOperation_TreatEdges))); FillImagesEdges(aPS.Next(aSteps.GetStep(PIOperation_TreatEdges)));
@ -162,7 +162,7 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi
} }
// //
// 3.3 Wires // 3.3 Wires
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
FillImagesContainers(TopAbs_WIRE); FillImagesContainers(TopAbs_WIRE);
#else #else
FillImagesContainers(TopAbs_WIRE, aPS.Next(aSteps.GetStep(PIOperation_TreatWires))); FillImagesContainers(TopAbs_WIRE, aPS.Next(aSteps.GetStep(PIOperation_TreatWires)));
@ -177,7 +177,7 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi
} }
// 3.4 Faces // 3.4 Faces
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
FillImagesFaces(); FillImagesFaces();
#else #else
FillImagesFaces(aPS.Next(aSteps.GetStep(PIOperation_TreatFaces))); FillImagesFaces(aPS.Next(aSteps.GetStep(PIOperation_TreatFaces)));

View File

@ -180,7 +180,7 @@ void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType)
//function : PostTreat //function : PostTreat
//purpose : //purpose :
//======================================================================= //=======================================================================
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
void GEOMAlgo_Splitter::PostTreat() void GEOMAlgo_Splitter::PostTreat()
#else #else
void GEOMAlgo_Splitter::PostTreat(const Message_ProgressRange& theRange) void GEOMAlgo_Splitter::PostTreat(const Message_ProgressRange& theRange)
@ -286,7 +286,7 @@ void GEOMAlgo_Splitter::PostTreat(const Message_ProgressRange& theRange)
myShape=aLS.First(); myShape=aLS.First();
} }
// //
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
BOPAlgo_Builder::PostTreat(); BOPAlgo_Builder::PostTreat();
#else #else
BOPAlgo_Builder::PostTreat(theRange); BOPAlgo_Builder::PostTreat(theRange);

View File

@ -87,7 +87,7 @@ class GEOMAlgo_Splitter : public BOPAlgo_Builder
virtual void BuildResult(const TopAbs_ShapeEnum theType); virtual void BuildResult(const TopAbs_ShapeEnum theType);
Standard_EXPORT Standard_EXPORT
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
virtual void PostTreat(); virtual void PostTreat();
#else #else
virtual void PostTreat(const Message_ProgressRange& theRange); virtual void PostTreat(const Message_ProgressRange& theRange);

View File

@ -28,7 +28,7 @@
#include "GEOM_Object.hxx" #include "GEOM_Object.hxx"
#include "GEOM_PythonDump.hxx" #include "GEOM_PythonDump.hxx"
#if OCC_VERSION_LARGE > 0x07050303 #if 0
#include <ShapeAnalysis_CanonicalRecognition.hxx> #include <ShapeAnalysis_CanonicalRecognition.hxx>
#endif #endif
@ -77,7 +77,7 @@ bool GEOMImpl_ICanonicalRecognition::isPlane(const Handle(GEOM_Object)& theShape
return false; return false;
} }
#if OCC_VERSION_LARGE < 0x07050304 #if 1
SetErrorCode("Shape type detection aborted. Improper OCCT version: please, use OCCT 7.5.3p5 or newer."); SetErrorCode("Shape type detection aborted. Improper OCCT version: please, use OCCT 7.5.3p5 or newer.");
return false; return false;
#else #else
@ -106,7 +106,7 @@ bool GEOMImpl_ICanonicalRecognition::isSphere(const Handle(GEOM_Object)& theShap
return false; return false;
} }
#if OCC_VERSION_LARGE < 0x07050304 #if 1
SetErrorCode("Shape type detection aborted. Improper OCCT version: please, use OCCT 7.5.3p5 or newer."); SetErrorCode("Shape type detection aborted. Improper OCCT version: please, use OCCT 7.5.3p5 or newer.");
return false; return false;
#else #else
@ -135,7 +135,7 @@ bool GEOMImpl_ICanonicalRecognition::isCone(const Handle(GEOM_Object)& theShape,
return false; return false;
} }
#if OCC_VERSION_LARGE < 0x07050304 #if 1
SetErrorCode("Shape type detection aborted. Improper OCCT version: please, use OCCT 7.5.3p5 or newer."); SetErrorCode("Shape type detection aborted. Improper OCCT version: please, use OCCT 7.5.3p5 or newer.");
return false; return false;
#else #else
@ -164,7 +164,7 @@ bool GEOMImpl_ICanonicalRecognition::isCylinder(const Handle(GEOM_Object)& theSh
return false; return false;
} }
#if OCC_VERSION_LARGE < 0x07050304 #if 1
SetErrorCode("Shape type detection aborted. Improper OCCT version: please, use OCCT 7.5.3p5 or newer."); SetErrorCode("Shape type detection aborted. Improper OCCT version: please, use OCCT 7.5.3p5 or newer.");
return false; return false;
#else #else
@ -193,7 +193,7 @@ bool GEOMImpl_ICanonicalRecognition::isLine(const Handle(GEOM_Object)& theEdge,
return false; return false;
} }
#if OCC_VERSION_LARGE < 0x07050304 #if 1
SetErrorCode("Shape type detection aborted. Improper OCCT version: please, use OCCT 7.5.3p5 or newer."); SetErrorCode("Shape type detection aborted. Improper OCCT version: please, use OCCT 7.5.3p5 or newer.");
return false; return false;
#else #else
@ -222,7 +222,7 @@ bool GEOMImpl_ICanonicalRecognition::isCircle(const Handle(GEOM_Object)& theEdge
return false; return false;
} }
#if OCC_VERSION_LARGE < 0x07050304 #if 1
SetErrorCode("Shape type detection aborted. Improper OCCT version: please, use OCCT 7.5.3p5 or newer."); SetErrorCode("Shape type detection aborted. Improper OCCT version: please, use OCCT 7.5.3p5 or newer.");
return false; return false;
#else #else
@ -251,7 +251,7 @@ bool GEOMImpl_ICanonicalRecognition::isEllipse(const Handle(GEOM_Object)& theEdg
return false; return false;
} }
#if OCC_VERSION_LARGE < 0x07050304 #if 1
SetErrorCode("Shape type detection aborted. Improper OCCT version: please, use OCCT 7.5.3p5 or newer."); SetErrorCode("Shape type detection aborted. Improper OCCT version: please, use OCCT 7.5.3p5 or newer.");
return false; return false;
#else #else

View File

@ -113,7 +113,7 @@ Standard_Integer GEOMImpl_LineDriver::Execute(Handle(TFunction_Logbook)& log) co
} }
BRepAlgoAPI_Section E (aShape1, aShape2, Standard_False); BRepAlgoAPI_Section E (aShape1, aShape2, Standard_False);
E.Approximation(Standard_True); E.Approximation(Standard_True);
#if OCC_VERSION_LARGE >= 0x07070000 #if OCC_VERSION_LARGE >= 0x07060000
E.ComputePCurveOn1(Standard_True); E.ComputePCurveOn1(Standard_True);
E.ComputePCurveOn2(Standard_True); E.ComputePCurveOn2(Standard_True);
#endif #endif

View File

@ -87,7 +87,7 @@
#include <Geom_Conic.hxx> #include <Geom_Conic.hxx>
#include <Geom_BSplineCurve.hxx> #include <Geom_BSplineCurve.hxx>
#include <Geom_BSplineSurface.hxx> #include <Geom_BSplineSurface.hxx>
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
#include <GeomAdaptor_HCurve.hxx> #include <GeomAdaptor_HCurve.hxx>
#else #else
#include <GeomAdaptor_Curve.hxx> #include <GeomAdaptor_Curve.hxx>
@ -166,7 +166,7 @@ static GeomFill_Trihedron EvaluateBestSweepMode(const TopoDS_Shape& Spine)
Standard_Real fpar, lpar; Standard_Real fpar, lpar;
Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, fpar, lpar); Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, fpar, lpar);
GeomAdaptor_Curve GAcurve(aCurve, fpar, lpar); GeomAdaptor_Curve GAcurve(aCurve, fpar, lpar);
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
Handle(GeomAdaptor_HCurve) GAHcurve = new GeomAdaptor_HCurve(GAcurve); Handle(GeomAdaptor_HCurve) GAHcurve = new GeomAdaptor_HCurve(GAcurve);
#else #else
Handle(GeomAdaptor_Curve) GAHcurve = new GeomAdaptor_Curve(GAcurve); Handle(GeomAdaptor_Curve) GAHcurve = new GeomAdaptor_Curve(GAcurve);

View File

@ -319,7 +319,7 @@ Standard_Integer GEOMImpl_PointDriver::Execute(Handle(TFunction_Logbook)& log) c
} }
else else
{ {
#if OCC_VERSION_LARGE < 0x07050304 #if 1
Standard_NotImplemented::Raise("Point cloud creation aborted. Improper OCCT version: please, use OCCT 7.5.3p4 or newer."); Standard_NotImplemented::Raise("Point cloud creation aborted. Improper OCCT version: please, use OCCT 7.5.3p4 or newer.");
#else #else
if (GEOMAlgo_AlgoTools::PointCloudInFace(F, aNbPnts, aCompound) < 0) if (GEOMAlgo_AlgoTools::PointCloudInFace(F, aNbPnts, aCompound) < 0)

View File

@ -33,7 +33,7 @@
#include <GEOM_Function.hxx> #include <GEOM_Function.hxx>
#include <GEOMUtils.hxx> #include <GEOMUtils.hxx>
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
#include <GEOMUtils_HTrsfCurve2d.hxx> #include <GEOMUtils_HTrsfCurve2d.hxx>
#else #else
#include <GEOMUtils_TrsfCurve2d.hxx> #include <GEOMUtils_TrsfCurve2d.hxx>
@ -668,7 +668,7 @@ TopoDS_Shape GEOMImpl_ProjectionDriver::projectOnCylinder
} }
// Transform the curve to cylinder's parametric space. // Transform the curve to cylinder's parametric space.
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
Handle(GEOMUtils::HTrsfCurve2d) aTrsfCurve = Handle(GEOMUtils::HTrsfCurve2d) aTrsfCurve =
new GEOMUtils::HTrsfCurve2d(aCurve, aPar[0], aPar[1], aTrsf2d); new GEOMUtils::HTrsfCurve2d(aCurve, aPar[0], aPar[1], aTrsf2d);
#else #else

View File

@ -274,156 +274,156 @@ const Standard_GUID& GEOMImpl_ShapeProximityDriver::GetID()
//======================================================================= //=======================================================================
Standard_Integer GEOMImpl_ShapeProximityDriver::Execute(Handle(TFunction_Logbook)& log) const Standard_Integer GEOMImpl_ShapeProximityDriver::Execute(Handle(TFunction_Logbook)& log) const
{ {
if (Label().IsNull()) // if (Label().IsNull())
return 0; // return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); // Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
GEOMImpl_IProximity aProximity (aFunction); // GEOMImpl_IProximity aProximity (aFunction);
Handle(GEOM_Function) aShapeFunc1, aShapeFunc2; // Handle(GEOM_Function) aShapeFunc1, aShapeFunc2;
aProximity.GetShapes(aShapeFunc1, aShapeFunc2); // aProximity.GetShapes(aShapeFunc1, aShapeFunc2);
if (aShapeFunc1.IsNull() || aShapeFunc2.IsNull()) // if (aShapeFunc1.IsNull() || aShapeFunc2.IsNull())
return 0; // return 0;
TopoDS_Shape aShape1 = aShapeFunc1->GetValue(); // TopoDS_Shape aShape1 = aShapeFunc1->GetValue();
TopoDS_Shape aShape2 = aShapeFunc2->GetValue(); // TopoDS_Shape aShape2 = aShapeFunc2->GetValue();
Standard_Real aValue = -1.0; // Standard_Real aValue = -1.0;
if (aFunction->GetType() == PROXIMITY_COARSE) // if (aFunction->GetType() == PROXIMITY_COARSE)
{ // {
// tessellate shapes if there is no mesh exists // // tessellate shapes if there is no mesh exists
tessellateShape(aShape1); // tessellateShape(aShape1);
tessellateShape(aShape2); // tessellateShape(aShape2);
// compute proximity basing on the tessellation // // compute proximity basing on the tessellation
BRepExtrema_ShapeProximity aCalcProx; // BRepExtrema_ShapeProximity aCalcProx;
aCalcProx.LoadShape1(aShape1); // aCalcProx.LoadShape1(aShape1);
aCalcProx.LoadShape2(aShape2); // aCalcProx.LoadShape2(aShape2);
aCalcProx.SetNbSamples1(aProximity.GetNbSamples(PROXIMITY_ARG_SAMPLES1)); // aCalcProx.SetNbSamples1(aProximity.GetNbSamples(PROXIMITY_ARG_SAMPLES1));
aCalcProx.SetNbSamples2(aProximity.GetNbSamples(PROXIMITY_ARG_SAMPLES2)); // aCalcProx.SetNbSamples2(aProximity.GetNbSamples(PROXIMITY_ARG_SAMPLES2));
aCalcProx.Perform(); // aCalcProx.Perform();
if (aCalcProx.IsDone()) // if (aCalcProx.IsDone())
{ // {
aValue = aCalcProx.Proximity(); // aValue = aCalcProx.Proximity();
aProximity.SetProximityPoints(aCalcProx.ProximityPoint1(), // aProximity.SetProximityPoints(aCalcProx.ProximityPoint1(),
aCalcProx.ProximityPoint2()); // aCalcProx.ProximityPoint2());
aProximity.SetStatusOfPoints((Standard_Integer)aCalcProx.ProxPntStatus1(), // aProximity.SetStatusOfPoints((Standard_Integer)aCalcProx.ProxPntStatus1(),
(Standard_Integer)aCalcProx.ProxPntStatus2()); // (Standard_Integer)aCalcProx.ProxPntStatus2());
} // }
else // else
Standard_ConstructionError::Raise("Failed to compute coarse proximity"); // Standard_ConstructionError::Raise("Failed to compute coarse proximity");
} // }
else if (aFunction->GetType() == PROXIMITY_PRECISE) // else if (aFunction->GetType() == PROXIMITY_PRECISE)
{ // {
// coarse proximity value // // coarse proximity value
// in some cases this value cannot be precised // // in some cases this value cannot be precised
// it can be precised only if at least one point is in the middle of the shape // // it can be precised only if at least one point is in the middle of the shape
aValue = aProximity.GetValue(); // aValue = aProximity.GetValue();
TopAbs_ShapeEnum aType1 = aShape1.ShapeType(); // TopAbs_ShapeEnum aType1 = aShape1.ShapeType();
TopAbs_ShapeEnum aType2 = aShape2.ShapeType(); // TopAbs_ShapeEnum aType2 = aShape2.ShapeType();
gp_Pnt aPnt1, aPnt2; // gp_Pnt aPnt1, aPnt2;
BRepExtrema_ProximityDistTool::ProxPnt_Status aStatus1, aStatus2; // BRepExtrema_ProximityDistTool::ProxPnt_Status aStatus1, aStatus2;
Standard_Integer intStatus1, intStatus2; // Standard_Integer intStatus1, intStatus2;
aProximity.GetProximityPoints(aPnt1, aPnt2); // aProximity.GetProximityPoints(aPnt1, aPnt2);
aProximity.GetStatusOfPoints(intStatus1, intStatus2); // aProximity.GetStatusOfPoints(intStatus1, intStatus2);
aStatus1 = (BRepExtrema_ProximityDistTool::ProxPnt_Status)intStatus1; // aStatus1 = (BRepExtrema_ProximityDistTool::ProxPnt_Status)intStatus1;
aStatus2 = (BRepExtrema_ProximityDistTool::ProxPnt_Status)intStatus2; // aStatus2 = (BRepExtrema_ProximityDistTool::ProxPnt_Status)intStatus2;
if (aType1 == TopAbs_EDGE) // if (aType1 == TopAbs_EDGE)
{ // {
if (aType2 == TopAbs_EDGE) // if (aType2 == TopAbs_EDGE)
{ // {
if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE && // if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE) // aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
{ // {
aValue = extremaEE(TopoDS::Edge(aShape1), TopoDS::Edge(aShape2), aPnt1, aPnt2); // aValue = extremaEE(TopoDS::Edge(aShape1), TopoDS::Edge(aShape2), aPnt1, aPnt2);
} // }
else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER && // else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER &&
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE) // aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
{ // {
aValue = extremaPE(aPnt1, TopoDS::Edge(aShape2), aPnt2); // aValue = extremaPE(aPnt1, TopoDS::Edge(aShape2), aPnt2);
} // }
else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE && // else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER) // aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER)
{ // {
aValue = extremaPE(aPnt2, TopoDS::Edge(aShape1), aPnt1); // aValue = extremaPE(aPnt2, TopoDS::Edge(aShape1), aPnt1);
} // }
} // }
else if (aType2 == TopAbs_FACE) // else if (aType2 == TopAbs_FACE)
{ // {
if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE && // if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE) // aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
{ // {
aValue = extremaEF(TopoDS::Edge(aShape1), TopoDS::Face(aShape2), aPnt1, aPnt2); // aValue = extremaEF(TopoDS::Edge(aShape1), TopoDS::Face(aShape2), aPnt1, aPnt2);
} // }
else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER && // else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER &&
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE) // aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
{ // {
aValue = extremaPF(aPnt1, TopoDS::Face(aShape2), aPnt2); // aValue = extremaPF(aPnt1, TopoDS::Face(aShape2), aPnt2);
} // }
else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE && // else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER) // aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER)
{ // {
aValue = extremaPE(aPnt2, TopoDS::Edge(aShape1), aPnt1); // aValue = extremaPE(aPnt2, TopoDS::Edge(aShape1), aPnt1);
} // }
} // }
} // }
else if (aType1 == TopAbs_FACE) // else if (aType1 == TopAbs_FACE)
{ // {
if (aType2 == TopAbs_EDGE) // if (aType2 == TopAbs_EDGE)
{ // {
if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE && // if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE) // aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
{ // {
aValue = extremaEF(TopoDS::Edge(aShape2), TopoDS::Face(aShape1), aPnt2, aPnt1); // aValue = extremaEF(TopoDS::Edge(aShape2), TopoDS::Face(aShape1), aPnt2, aPnt1);
} // }
else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER && // else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER &&
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE) // aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
{ // {
aValue = extremaPE(aPnt1, TopoDS::Edge(aShape2), aPnt2); // aValue = extremaPE(aPnt1, TopoDS::Edge(aShape2), aPnt2);
} // }
else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE && // else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER) // aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER)
{ // {
aValue = extremaPF(aPnt2, TopoDS::Face(aShape1), aPnt1); // aValue = extremaPF(aPnt2, TopoDS::Face(aShape1), aPnt1);
} // }
} // }
else if (aType2 == TopAbs_FACE) // else if (aType2 == TopAbs_FACE)
{ // {
if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE && // if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE) // aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
{ // {
aValue = extremaFF(TopoDS::Face(aShape1), TopoDS::Face(aShape2), aPnt1, aPnt2); // aValue = extremaFF(TopoDS::Face(aShape1), TopoDS::Face(aShape2), aPnt1, aPnt2);
} // }
else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER && // else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER &&
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE) // aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
{ // {
aValue = extremaPF(aPnt1, TopoDS::Face(aShape2), aPnt2); // aValue = extremaPF(aPnt1, TopoDS::Face(aShape2), aPnt2);
} // }
else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE && // else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER) // aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER)
{ // {
aValue = extremaPF(aPnt2, TopoDS::Face(aShape1), aPnt1); // aValue = extremaPF(aPnt2, TopoDS::Face(aShape1), aPnt1);
} // }
} // }
} // }
if (aValue >= 0) // if (aValue >= 0)
aProximity.SetProximityPoints(aPnt1, aPnt2); // aProximity.SetProximityPoints(aPnt1, aPnt2);
else // else
Standard_ConstructionError::Raise("Failed to compute precise proximity"); // Standard_ConstructionError::Raise("Failed to compute precise proximity");
} // }
else // else
{ // {
Standard_ConstructionError::Raise("incorrect algorithm"); // Standard_ConstructionError::Raise("incorrect algorithm");
} // }
aProximity.SetValue(aValue); // aProximity.SetValue(aValue);
log->SetTouched(Label()); // log->SetTouched(Label());
return 1; return 1;
} }

View File

@ -993,7 +993,7 @@ Standard_Real GEOMUtils::GetMinDistance
// skl 30.06.2008 // skl 30.06.2008
// additional workaround for bugs 19899, 19908 and 19910 from Mantis // additional workaround for bugs 19899, 19908 and 19910 from Mantis
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
aResult = GEOMUtils::GetMinDistanceSingular(theShape1, theShape2, thePnt1, thePnt2); aResult = GEOMUtils::GetMinDistanceSingular(theShape1, theShape2, thePnt1, thePnt2);
#endif #endif

View File

@ -20,7 +20,7 @@
#include <Basics_OCCTVersion.hxx> #include <Basics_OCCTVersion.hxx>
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
#include <GEOMUtils_HTrsfCurve2d.hxx> #include <GEOMUtils_HTrsfCurve2d.hxx>

View File

@ -23,7 +23,7 @@
#include <Basics_OCCTVersion.hxx> #include <Basics_OCCTVersion.hxx>
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
#include <GEOMUtils_TrsfCurve2d.hxx> #include <GEOMUtils_TrsfCurve2d.hxx>

View File

@ -23,7 +23,7 @@
#include <Geom2d_BezierCurve.hxx> #include <Geom2d_BezierCurve.hxx>
#include <Geom2d_BSplineCurve.hxx> #include <Geom2d_BSplineCurve.hxx>
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
#include <GEOMUtils_HTrsfCurve2d.hxx> #include <GEOMUtils_HTrsfCurve2d.hxx>
#else #else
IMPLEMENT_STANDARD_RTTIEXT(GEOMUtils::TrsfCurve2d, Adaptor2d_Curve2d) IMPLEMENT_STANDARD_RTTIEXT(GEOMUtils::TrsfCurve2d, Adaptor2d_Curve2d)
@ -142,7 +142,7 @@ void GEOMUtils::TrsfCurve2d::Intervals(TColStd_Array1OfReal &T,
//function : Trim //function : Trim
//purpose : //purpose :
//======================================================================= //=======================================================================
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
Handle(Adaptor2d_HCurve2d) GEOMUtils::TrsfCurve2d::Trim Handle(Adaptor2d_HCurve2d) GEOMUtils::TrsfCurve2d::Trim
(const Standard_Real First, const Standard_Real Last, (const Standard_Real First, const Standard_Real Last,
const Standard_Real /*Tol*/) const const Standard_Real /*Tol*/) const

View File

@ -39,7 +39,7 @@ namespace GEOMUtils
*/ */
class TrsfCurve2d : public Adaptor2d_Curve2d class TrsfCurve2d : public Adaptor2d_Curve2d
{ {
#if OCC_VERSION_LARGE >= 0x07070000 #if OCC_VERSION_LARGE >= 0x07060000
DEFINE_STANDARD_RTTIEXT(TrsfCurve2d, Adaptor2d_Curve2d) DEFINE_STANDARD_RTTIEXT(TrsfCurve2d, Adaptor2d_Curve2d)
#endif #endif
@ -114,7 +114,7 @@ namespace GEOMUtils
/** /**
* Redefined method from the base class. * Redefined method from the base class.
*/ */
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
Standard_EXPORT Handle(Adaptor2d_HCurve2d) Trim Standard_EXPORT Handle(Adaptor2d_HCurve2d) Trim
#else #else
Standard_EXPORT Handle(Adaptor2d_Curve2d) Trim Standard_EXPORT Handle(Adaptor2d_Curve2d) Trim
@ -243,7 +243,7 @@ namespace GEOMUtils
}; };
#if OCC_VERSION_LARGE >= 0x07070000 #if OCC_VERSION_LARGE >= 0x07060000
DEFINE_STANDARD_HANDLE(TrsfCurve2d, Adaptor2d_Curve2d) DEFINE_STANDARD_HANDLE(TrsfCurve2d, Adaptor2d_Curve2d)
#endif #endif

View File

@ -168,7 +168,7 @@ Standard_Integer IGESPlugin_ExportDriver::Execute(Handle(TFunction_Logbook)& /*l
IGESControl_Writer ICW( "M", aBrepMode ); // export explicitly in meters IGESControl_Writer ICW( "M", aBrepMode ); // export explicitly in meters
Interface_Static::SetCVal( "xstep.cascade.unit", "M" ); Interface_Static::SetCVal( "xstep.cascade.unit", "M" );
#if OCC_VERSION_LARGE >= 0x07070000 #if OCC_VERSION_LARGE >= 0x07060000
Interface_Static::SetCVal("write.iges.unit", "M"); Interface_Static::SetCVal("write.iges.unit", "M");
XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info
Standard_Real aScaleFactorMM = UnitsMethods::GetCasCadeLengthUnit(); Standard_Real aScaleFactorMM = UnitsMethods::GetCasCadeLengthUnit();

View File

@ -711,7 +711,7 @@ void GEOM_Annotation::OpenGl_Annotation::Render( const Handle(OpenGl_Workspace)&
const OpenGl_Aspects* anAspect = theWorkspace->Aspects(); const OpenGl_Aspects* anAspect = theWorkspace->Aspects();
// getting string size will also initialize font library // getting string size will also initialize font library
#if OCC_VERSION_LARGE >= 0x07070000 #if OCC_VERSION_LARGE >= 0x07060000
Font_Hinting aFH = theWorkspace->View()->RenderingParams().FontHinting; Font_Hinting aFH = theWorkspace->View()->RenderingParams().FontHinting;
myTextDraw->StringSize( aContext, myTextDraw->StringSize( aContext,
myText, *anAspect, myTextParams->Height(), aDPI, aFH, myText, *anAspect, myTextParams->Height(), aDPI, aFH,

View File

@ -41,7 +41,7 @@
#include <vtkInformationVector.h> #include <vtkInformationVector.h>
// OpenCASCADE Includes // OpenCASCADE Includes
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
#include <Adaptor3d_HCurve.hxx> #include <Adaptor3d_HCurve.hxx>
#else #else
#include <Adaptor3d_Curve.hxx> #include <Adaptor3d_Curve.hxx>

View File

@ -36,7 +36,7 @@
#include <Basics_OCCTVersion.hxx> #include <Basics_OCCTVersion.hxx>
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
#include <Adaptor3d_HCurve.hxx> #include <Adaptor3d_HCurve.hxx>
#else #else
#include <Adaptor3d_Curve.hxx> #include <Adaptor3d_Curve.hxx>

View File

@ -121,7 +121,7 @@ Standard_Integer STEPPlugin_ExportDriver::Execute(Handle(TFunction_Logbook)& /*l
// Set "C" numeric locale to save numbers correctly // Set "C" numeric locale to save numbers correctly
Kernel_Utils::Localizer loc; Kernel_Utils::Localizer loc;
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
STEPControl_Writer aWriter; STEPControl_Writer aWriter;
Interface_Static::SetCVal("xstep.cascade.unit","M"); Interface_Static::SetCVal("xstep.cascade.unit","M");
Interface_Static::SetCVal("write.step.unit", aWriteUnit.ToCString()); Interface_Static::SetCVal("write.step.unit", aWriteUnit.ToCString());

View File

@ -84,7 +84,7 @@ Standard_Integer STLPlugin_ImportDriver::Execute(Handle(TFunction_Logbook)& log)
if( aShape.IsNull() ) return 0; if( aShape.IsNull() ) return 0;
#if OCC_VERSION_LARGE >= 0x07070000 #if OCC_VERSION_LARGE >= 0x07060000
BRepBuilderAPI_Sewing aSewingTool; BRepBuilderAPI_Sewing aSewingTool;
aSewingTool.Init(1.0e-06, Standard_True); aSewingTool.Init(1.0e-06, Standard_True);
aSewingTool.Load(aShape); aSewingTool.Load(aShape);

View File

@ -33,7 +33,7 @@
#include <BRep_Tool.hxx> #include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx> #include <BRepAdaptor_Curve.hxx>
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
#include <BRepAdaptor_HCurve.hxx> #include <BRepAdaptor_HCurve.hxx>
#endif #endif
#include <BRep_Builder.hxx> #include <BRep_Builder.hxx>
@ -288,7 +288,7 @@ Handle(Geom_Surface) ShHealOper_FillHoles::buildSurface(const TopoDS_Wire& theWi
TopoDS_Edge ae = TopoDS::Edge(aIter.Value()); TopoDS_Edge ae = TopoDS::Edge(aIter.Value());
BRepAdaptor_Curve adC(ae); BRepAdaptor_Curve adC(ae);
#if OCC_VERSION_LARGE < 0x07070000 #if OCC_VERSION_LARGE < 0x07060000
Handle(BRepAdaptor_HCurve) aHAD = new BRepAdaptor_HCurve(adC); Handle(BRepAdaptor_HCurve) aHAD = new BRepAdaptor_HCurve(adC);
#else #else
Handle(BRepAdaptor_Curve) aHAD = new BRepAdaptor_Curve(adC); Handle(BRepAdaptor_Curve) aHAD = new BRepAdaptor_Curve(adC);