mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-03-23 14:07:56 +05:00
Fix quickly for OCCT 7.6 WASM
This commit is contained in:
parent
bf00dde03c
commit
ac65da58f1
@ -43,7 +43,7 @@
|
||||
|
||||
#include <Basics_OCCTVersion.hxx>
|
||||
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
#include <BRepAdaptor_HSurface.hxx>
|
||||
#else
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
@ -123,7 +123,7 @@ TopoDS_Shape AdvancedEngine_SmoothingSurfaceDriver::MakeSmoothingSurfaceUnClosed
|
||||
|
||||
GeomPlate_BuildPlateSurface aBuilder(3,10);
|
||||
// ** Initialization of surface
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
Handle(BRepAdaptor_HSurface) HSI = new BRepAdaptor_HSurface();
|
||||
HSI->ChangeSurface().Initialize(aInitShape);
|
||||
aBuilder.LoadInitSurface( BRep_Tool::Surface(HSI->ChangeSurface().Face()));
|
||||
|
@ -73,7 +73,7 @@
|
||||
|
||||
#include <TColGeom_HArray2OfSurface.hxx>
|
||||
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
#include <GeomAdaptor_HSurface.hxx>
|
||||
#else
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
@ -89,7 +89,7 @@
|
||||
#include <Geom_SurfaceOfLinearExtrusion.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
#include <BRepAdaptor_HSurface.hxx>
|
||||
#endif
|
||||
#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.
|
||||
BRepAdaptor_Surface aBAS(theFace);
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
Handle(BRepAdaptor_HSurface) aBAHS = new BRepAdaptor_HSurface(aBAS);
|
||||
#else
|
||||
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)) &&
|
||||
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) aGA2 = new GeomAdaptor_HSurface(S2);
|
||||
#else
|
||||
|
@ -1059,7 +1059,7 @@ Standard_Integer GEOMAlgo_AlgoTools::PointCloudInFace(const TopoDS_Face& theFace
|
||||
const int theNbPnts,
|
||||
TopoDS_Compound& theCompound)
|
||||
{
|
||||
#if OCC_VERSION_LARGE < 0x07050304
|
||||
#if 1
|
||||
return -1;
|
||||
#else
|
||||
ShapeUpgrade_ShapeDivideArea tool (theFace);
|
||||
@ -1568,7 +1568,7 @@ void ModifyFacesForGlobalResult(const TopoDS_Face& theInputFace,
|
||||
Standard_Integer aNbFacesInLocalResult;
|
||||
if (aNumberToSplit > 1)
|
||||
{
|
||||
#if OCC_VERSION_LARGE < 0x07050304
|
||||
#if 1
|
||||
aNbFacesInLocalResult = 0;
|
||||
#else
|
||||
ShapeUpgrade_ShapeDivideArea aLocalTool (aUnifiedShape);
|
||||
@ -1648,7 +1648,7 @@ void ModifyFacesForGlobalResult(const TopoDS_Face& theInputFace,
|
||||
Standard_Integer aNumberToSplit = (theIsToAddFaces)? aMaxNbFaces + (aDiff-aSum) : aMaxNbFaces - (aDiff-aSum);
|
||||
if (aNumberToSplit > 1)
|
||||
{
|
||||
#if OCC_VERSION_LARGE < 0x07050304
|
||||
#if 1
|
||||
aNumberToSplit = 1;
|
||||
#else
|
||||
ShapeUpgrade_ShapeDivideArea aLocalTool (aUnifiedShape);
|
||||
|
@ -73,7 +73,7 @@ class GEOMAlgo_ShellSolidBuilder : public BOPAlgo_Builder {
|
||||
|
||||
protected:
|
||||
Standard_EXPORT
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
virtual void PerformInternal(const BOPAlgo_PaveFiller& theFiller);
|
||||
#else
|
||||
virtual void PerformInternal(const BOPAlgo_PaveFiller& theFiller,
|
||||
@ -101,7 +101,7 @@ GEOMAlgo_ShellSolidBuilder::~GEOMAlgo_ShellSolidBuilder()
|
||||
//function : PerformInternal
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFiller)
|
||||
#else
|
||||
void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFiller,
|
||||
@ -124,7 +124,7 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi
|
||||
return;
|
||||
}
|
||||
|
||||
#if OCC_VERSION_LARGE >= 0x07070000
|
||||
#if OCC_VERSION_LARGE >= 0x07060000
|
||||
Message_ProgressScope aPS(theRange, "Building the result of Boolean operation", 100);
|
||||
//
|
||||
BOPAlgo_PISteps aSteps (PIOperation_Last);
|
||||
@ -133,7 +133,7 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi
|
||||
|
||||
// 3. Fill Images
|
||||
// 3.1 Vertice
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
FillImagesVertices();
|
||||
#else
|
||||
FillImagesVertices(aPS.Next(aSteps.GetStep(PIOperation_TreatVertices)));
|
||||
@ -147,7 +147,7 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi
|
||||
return;
|
||||
}
|
||||
// 3.2 Edges
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
FillImagesEdges();
|
||||
#else
|
||||
FillImagesEdges(aPS.Next(aSteps.GetStep(PIOperation_TreatEdges)));
|
||||
@ -162,7 +162,7 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi
|
||||
}
|
||||
//
|
||||
// 3.3 Wires
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
FillImagesContainers(TopAbs_WIRE);
|
||||
#else
|
||||
FillImagesContainers(TopAbs_WIRE, aPS.Next(aSteps.GetStep(PIOperation_TreatWires)));
|
||||
@ -177,7 +177,7 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi
|
||||
}
|
||||
|
||||
// 3.4 Faces
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
FillImagesFaces();
|
||||
#else
|
||||
FillImagesFaces(aPS.Next(aSteps.GetStep(PIOperation_TreatFaces)));
|
||||
|
@ -180,7 +180,7 @@ void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType)
|
||||
//function : PostTreat
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
void GEOMAlgo_Splitter::PostTreat()
|
||||
#else
|
||||
void GEOMAlgo_Splitter::PostTreat(const Message_ProgressRange& theRange)
|
||||
@ -286,7 +286,7 @@ void GEOMAlgo_Splitter::PostTreat(const Message_ProgressRange& theRange)
|
||||
myShape=aLS.First();
|
||||
}
|
||||
//
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
BOPAlgo_Builder::PostTreat();
|
||||
#else
|
||||
BOPAlgo_Builder::PostTreat(theRange);
|
||||
|
@ -87,7 +87,7 @@ class GEOMAlgo_Splitter : public BOPAlgo_Builder
|
||||
virtual void BuildResult(const TopAbs_ShapeEnum theType);
|
||||
|
||||
Standard_EXPORT
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
virtual void PostTreat();
|
||||
#else
|
||||
virtual void PostTreat(const Message_ProgressRange& theRange);
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "GEOM_Object.hxx"
|
||||
#include "GEOM_PythonDump.hxx"
|
||||
|
||||
#if OCC_VERSION_LARGE > 0x07050303
|
||||
#if 0
|
||||
#include <ShapeAnalysis_CanonicalRecognition.hxx>
|
||||
#endif
|
||||
|
||||
@ -77,7 +77,7 @@ bool GEOMImpl_ICanonicalRecognition::isPlane(const Handle(GEOM_Object)& theShape
|
||||
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.");
|
||||
return false;
|
||||
#else
|
||||
@ -106,7 +106,7 @@ bool GEOMImpl_ICanonicalRecognition::isSphere(const Handle(GEOM_Object)& theShap
|
||||
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.");
|
||||
return false;
|
||||
#else
|
||||
@ -135,7 +135,7 @@ bool GEOMImpl_ICanonicalRecognition::isCone(const Handle(GEOM_Object)& theShape,
|
||||
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.");
|
||||
return false;
|
||||
#else
|
||||
@ -164,7 +164,7 @@ bool GEOMImpl_ICanonicalRecognition::isCylinder(const Handle(GEOM_Object)& theSh
|
||||
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.");
|
||||
return false;
|
||||
#else
|
||||
@ -193,7 +193,7 @@ bool GEOMImpl_ICanonicalRecognition::isLine(const Handle(GEOM_Object)& theEdge,
|
||||
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.");
|
||||
return false;
|
||||
#else
|
||||
@ -222,7 +222,7 @@ bool GEOMImpl_ICanonicalRecognition::isCircle(const Handle(GEOM_Object)& theEdge
|
||||
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.");
|
||||
return false;
|
||||
#else
|
||||
@ -251,7 +251,7 @@ bool GEOMImpl_ICanonicalRecognition::isEllipse(const Handle(GEOM_Object)& theEdg
|
||||
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.");
|
||||
return false;
|
||||
#else
|
||||
|
@ -113,7 +113,7 @@ Standard_Integer GEOMImpl_LineDriver::Execute(Handle(TFunction_Logbook)& log) co
|
||||
}
|
||||
BRepAlgoAPI_Section E (aShape1, aShape2, Standard_False);
|
||||
E.Approximation(Standard_True);
|
||||
#if OCC_VERSION_LARGE >= 0x07070000
|
||||
#if OCC_VERSION_LARGE >= 0x07060000
|
||||
E.ComputePCurveOn1(Standard_True);
|
||||
E.ComputePCurveOn2(Standard_True);
|
||||
#endif
|
||||
|
@ -87,7 +87,7 @@
|
||||
#include <Geom_Conic.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
#include <GeomAdaptor_HCurve.hxx>
|
||||
#else
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
@ -166,7 +166,7 @@ static GeomFill_Trihedron EvaluateBestSweepMode(const TopoDS_Shape& Spine)
|
||||
Standard_Real fpar, lpar;
|
||||
Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, 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);
|
||||
#else
|
||||
Handle(GeomAdaptor_Curve) GAHcurve = new GeomAdaptor_Curve(GAcurve);
|
||||
|
@ -319,7 +319,7 @@ Standard_Integer GEOMImpl_PointDriver::Execute(Handle(TFunction_Logbook)& log) c
|
||||
}
|
||||
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.");
|
||||
#else
|
||||
if (GEOMAlgo_AlgoTools::PointCloudInFace(F, aNbPnts, aCompound) < 0)
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <GEOM_Function.hxx>
|
||||
#include <GEOMUtils.hxx>
|
||||
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
#include <GEOMUtils_HTrsfCurve2d.hxx>
|
||||
#else
|
||||
#include <GEOMUtils_TrsfCurve2d.hxx>
|
||||
@ -668,7 +668,7 @@ TopoDS_Shape GEOMImpl_ProjectionDriver::projectOnCylinder
|
||||
}
|
||||
|
||||
// Transform the curve to cylinder's parametric space.
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
Handle(GEOMUtils::HTrsfCurve2d) aTrsfCurve =
|
||||
new GEOMUtils::HTrsfCurve2d(aCurve, aPar[0], aPar[1], aTrsf2d);
|
||||
#else
|
||||
|
@ -274,156 +274,156 @@ const Standard_GUID& GEOMImpl_ShapeProximityDriver::GetID()
|
||||
//=======================================================================
|
||||
Standard_Integer GEOMImpl_ShapeProximityDriver::Execute(Handle(TFunction_Logbook)& log) const
|
||||
{
|
||||
if (Label().IsNull())
|
||||
return 0;
|
||||
// if (Label().IsNull())
|
||||
// return 0;
|
||||
|
||||
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
|
||||
GEOMImpl_IProximity aProximity (aFunction);
|
||||
// Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
|
||||
// GEOMImpl_IProximity aProximity (aFunction);
|
||||
|
||||
Handle(GEOM_Function) aShapeFunc1, aShapeFunc2;
|
||||
aProximity.GetShapes(aShapeFunc1, aShapeFunc2);
|
||||
if (aShapeFunc1.IsNull() || aShapeFunc2.IsNull())
|
||||
return 0;
|
||||
// Handle(GEOM_Function) aShapeFunc1, aShapeFunc2;
|
||||
// aProximity.GetShapes(aShapeFunc1, aShapeFunc2);
|
||||
// if (aShapeFunc1.IsNull() || aShapeFunc2.IsNull())
|
||||
// return 0;
|
||||
|
||||
TopoDS_Shape aShape1 = aShapeFunc1->GetValue();
|
||||
TopoDS_Shape aShape2 = aShapeFunc2->GetValue();
|
||||
// TopoDS_Shape aShape1 = aShapeFunc1->GetValue();
|
||||
// TopoDS_Shape aShape2 = aShapeFunc2->GetValue();
|
||||
|
||||
Standard_Real aValue = -1.0;
|
||||
// Standard_Real aValue = -1.0;
|
||||
|
||||
if (aFunction->GetType() == PROXIMITY_COARSE)
|
||||
{
|
||||
// tessellate shapes if there is no mesh exists
|
||||
tessellateShape(aShape1);
|
||||
tessellateShape(aShape2);
|
||||
// if (aFunction->GetType() == PROXIMITY_COARSE)
|
||||
// {
|
||||
// // tessellate shapes if there is no mesh exists
|
||||
// tessellateShape(aShape1);
|
||||
// tessellateShape(aShape2);
|
||||
|
||||
// compute proximity basing on the tessellation
|
||||
BRepExtrema_ShapeProximity aCalcProx;
|
||||
aCalcProx.LoadShape1(aShape1);
|
||||
aCalcProx.LoadShape2(aShape2);
|
||||
aCalcProx.SetNbSamples1(aProximity.GetNbSamples(PROXIMITY_ARG_SAMPLES1));
|
||||
aCalcProx.SetNbSamples2(aProximity.GetNbSamples(PROXIMITY_ARG_SAMPLES2));
|
||||
aCalcProx.Perform();
|
||||
// // compute proximity basing on the tessellation
|
||||
// BRepExtrema_ShapeProximity aCalcProx;
|
||||
// aCalcProx.LoadShape1(aShape1);
|
||||
// aCalcProx.LoadShape2(aShape2);
|
||||
// aCalcProx.SetNbSamples1(aProximity.GetNbSamples(PROXIMITY_ARG_SAMPLES1));
|
||||
// aCalcProx.SetNbSamples2(aProximity.GetNbSamples(PROXIMITY_ARG_SAMPLES2));
|
||||
// aCalcProx.Perform();
|
||||
|
||||
if (aCalcProx.IsDone())
|
||||
{
|
||||
aValue = aCalcProx.Proximity();
|
||||
aProximity.SetProximityPoints(aCalcProx.ProximityPoint1(),
|
||||
aCalcProx.ProximityPoint2());
|
||||
aProximity.SetStatusOfPoints((Standard_Integer)aCalcProx.ProxPntStatus1(),
|
||||
(Standard_Integer)aCalcProx.ProxPntStatus2());
|
||||
}
|
||||
else
|
||||
Standard_ConstructionError::Raise("Failed to compute coarse proximity");
|
||||
}
|
||||
else if (aFunction->GetType() == PROXIMITY_PRECISE)
|
||||
{
|
||||
// coarse proximity value
|
||||
// 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
|
||||
aValue = aProximity.GetValue();
|
||||
// if (aCalcProx.IsDone())
|
||||
// {
|
||||
// aValue = aCalcProx.Proximity();
|
||||
// aProximity.SetProximityPoints(aCalcProx.ProximityPoint1(),
|
||||
// aCalcProx.ProximityPoint2());
|
||||
// aProximity.SetStatusOfPoints((Standard_Integer)aCalcProx.ProxPntStatus1(),
|
||||
// (Standard_Integer)aCalcProx.ProxPntStatus2());
|
||||
// }
|
||||
// else
|
||||
// Standard_ConstructionError::Raise("Failed to compute coarse proximity");
|
||||
// }
|
||||
// else if (aFunction->GetType() == PROXIMITY_PRECISE)
|
||||
// {
|
||||
// // coarse proximity value
|
||||
// // 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
|
||||
// aValue = aProximity.GetValue();
|
||||
|
||||
TopAbs_ShapeEnum aType1 = aShape1.ShapeType();
|
||||
TopAbs_ShapeEnum aType2 = aShape2.ShapeType();
|
||||
// TopAbs_ShapeEnum aType1 = aShape1.ShapeType();
|
||||
// TopAbs_ShapeEnum aType2 = aShape2.ShapeType();
|
||||
|
||||
gp_Pnt aPnt1, aPnt2;
|
||||
BRepExtrema_ProximityDistTool::ProxPnt_Status aStatus1, aStatus2;
|
||||
Standard_Integer intStatus1, intStatus2;
|
||||
aProximity.GetProximityPoints(aPnt1, aPnt2);
|
||||
aProximity.GetStatusOfPoints(intStatus1, intStatus2);
|
||||
aStatus1 = (BRepExtrema_ProximityDistTool::ProxPnt_Status)intStatus1;
|
||||
aStatus2 = (BRepExtrema_ProximityDistTool::ProxPnt_Status)intStatus2;
|
||||
// gp_Pnt aPnt1, aPnt2;
|
||||
// BRepExtrema_ProximityDistTool::ProxPnt_Status aStatus1, aStatus2;
|
||||
// Standard_Integer intStatus1, intStatus2;
|
||||
// aProximity.GetProximityPoints(aPnt1, aPnt2);
|
||||
// aProximity.GetStatusOfPoints(intStatus1, intStatus2);
|
||||
// aStatus1 = (BRepExtrema_ProximityDistTool::ProxPnt_Status)intStatus1;
|
||||
// aStatus2 = (BRepExtrema_ProximityDistTool::ProxPnt_Status)intStatus2;
|
||||
|
||||
if (aType1 == TopAbs_EDGE)
|
||||
{
|
||||
if (aType2 == TopAbs_EDGE)
|
||||
{
|
||||
if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
|
||||
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
|
||||
{
|
||||
aValue = extremaEE(TopoDS::Edge(aShape1), TopoDS::Edge(aShape2), aPnt1, aPnt2);
|
||||
}
|
||||
else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER &&
|
||||
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
|
||||
{
|
||||
aValue = extremaPE(aPnt1, TopoDS::Edge(aShape2), aPnt2);
|
||||
}
|
||||
else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
|
||||
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER)
|
||||
{
|
||||
aValue = extremaPE(aPnt2, TopoDS::Edge(aShape1), aPnt1);
|
||||
}
|
||||
}
|
||||
else if (aType2 == TopAbs_FACE)
|
||||
{
|
||||
if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
|
||||
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
|
||||
{
|
||||
aValue = extremaEF(TopoDS::Edge(aShape1), TopoDS::Face(aShape2), aPnt1, aPnt2);
|
||||
}
|
||||
else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER &&
|
||||
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
|
||||
{
|
||||
aValue = extremaPF(aPnt1, TopoDS::Face(aShape2), aPnt2);
|
||||
}
|
||||
else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
|
||||
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER)
|
||||
{
|
||||
aValue = extremaPE(aPnt2, TopoDS::Edge(aShape1), aPnt1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (aType1 == TopAbs_FACE)
|
||||
{
|
||||
if (aType2 == TopAbs_EDGE)
|
||||
{
|
||||
if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
|
||||
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
|
||||
{
|
||||
aValue = extremaEF(TopoDS::Edge(aShape2), TopoDS::Face(aShape1), aPnt2, aPnt1);
|
||||
}
|
||||
else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER &&
|
||||
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
|
||||
{
|
||||
aValue = extremaPE(aPnt1, TopoDS::Edge(aShape2), aPnt2);
|
||||
}
|
||||
else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
|
||||
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER)
|
||||
{
|
||||
aValue = extremaPF(aPnt2, TopoDS::Face(aShape1), aPnt1);
|
||||
}
|
||||
}
|
||||
else if (aType2 == TopAbs_FACE)
|
||||
{
|
||||
if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
|
||||
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
|
||||
{
|
||||
aValue = extremaFF(TopoDS::Face(aShape1), TopoDS::Face(aShape2), aPnt1, aPnt2);
|
||||
}
|
||||
else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER &&
|
||||
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
|
||||
{
|
||||
aValue = extremaPF(aPnt1, TopoDS::Face(aShape2), aPnt2);
|
||||
}
|
||||
else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
|
||||
aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER)
|
||||
{
|
||||
aValue = extremaPF(aPnt2, TopoDS::Face(aShape1), aPnt1);
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (aType1 == TopAbs_EDGE)
|
||||
// {
|
||||
// if (aType2 == TopAbs_EDGE)
|
||||
// {
|
||||
// if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
|
||||
// aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
|
||||
// {
|
||||
// aValue = extremaEE(TopoDS::Edge(aShape1), TopoDS::Edge(aShape2), aPnt1, aPnt2);
|
||||
// }
|
||||
// else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER &&
|
||||
// aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
|
||||
// {
|
||||
// aValue = extremaPE(aPnt1, TopoDS::Edge(aShape2), aPnt2);
|
||||
// }
|
||||
// else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
|
||||
// aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER)
|
||||
// {
|
||||
// aValue = extremaPE(aPnt2, TopoDS::Edge(aShape1), aPnt1);
|
||||
// }
|
||||
// }
|
||||
// else if (aType2 == TopAbs_FACE)
|
||||
// {
|
||||
// if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
|
||||
// aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
|
||||
// {
|
||||
// aValue = extremaEF(TopoDS::Edge(aShape1), TopoDS::Face(aShape2), aPnt1, aPnt2);
|
||||
// }
|
||||
// else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER &&
|
||||
// aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
|
||||
// {
|
||||
// aValue = extremaPF(aPnt1, TopoDS::Face(aShape2), aPnt2);
|
||||
// }
|
||||
// else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
|
||||
// aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER)
|
||||
// {
|
||||
// aValue = extremaPE(aPnt2, TopoDS::Edge(aShape1), aPnt1);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else if (aType1 == TopAbs_FACE)
|
||||
// {
|
||||
// if (aType2 == TopAbs_EDGE)
|
||||
// {
|
||||
// if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
|
||||
// aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
|
||||
// {
|
||||
// aValue = extremaEF(TopoDS::Edge(aShape2), TopoDS::Face(aShape1), aPnt2, aPnt1);
|
||||
// }
|
||||
// else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER &&
|
||||
// aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
|
||||
// {
|
||||
// aValue = extremaPE(aPnt1, TopoDS::Edge(aShape2), aPnt2);
|
||||
// }
|
||||
// else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
|
||||
// aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER)
|
||||
// {
|
||||
// aValue = extremaPF(aPnt2, TopoDS::Face(aShape1), aPnt1);
|
||||
// }
|
||||
// }
|
||||
// else if (aType2 == TopAbs_FACE)
|
||||
// {
|
||||
// if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
|
||||
// aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
|
||||
// {
|
||||
// aValue = extremaFF(TopoDS::Face(aShape1), TopoDS::Face(aShape2), aPnt1, aPnt2);
|
||||
// }
|
||||
// else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER &&
|
||||
// aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE)
|
||||
// {
|
||||
// aValue = extremaPF(aPnt1, TopoDS::Face(aShape2), aPnt2);
|
||||
// }
|
||||
// else if (aStatus1 == BRepExtrema_ProximityDistTool::ProxPnt_Status_MIDDLE &&
|
||||
// aStatus2 == BRepExtrema_ProximityDistTool::ProxPnt_Status_BORDER)
|
||||
// {
|
||||
// aValue = extremaPF(aPnt2, TopoDS::Face(aShape1), aPnt1);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
if (aValue >= 0)
|
||||
aProximity.SetProximityPoints(aPnt1, aPnt2);
|
||||
else
|
||||
Standard_ConstructionError::Raise("Failed to compute precise proximity");
|
||||
}
|
||||
else
|
||||
{
|
||||
Standard_ConstructionError::Raise("incorrect algorithm");
|
||||
}
|
||||
// if (aValue >= 0)
|
||||
// aProximity.SetProximityPoints(aPnt1, aPnt2);
|
||||
// else
|
||||
// Standard_ConstructionError::Raise("Failed to compute precise proximity");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Standard_ConstructionError::Raise("incorrect algorithm");
|
||||
// }
|
||||
|
||||
aProximity.SetValue(aValue);
|
||||
log->SetTouched(Label());
|
||||
// aProximity.SetValue(aValue);
|
||||
// log->SetTouched(Label());
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -993,7 +993,7 @@ Standard_Real GEOMUtils::GetMinDistance
|
||||
|
||||
// skl 30.06.2008
|
||||
// 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);
|
||||
#endif
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <Basics_OCCTVersion.hxx>
|
||||
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
|
||||
#include <GEOMUtils_HTrsfCurve2d.hxx>
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include <Basics_OCCTVersion.hxx>
|
||||
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
|
||||
#include <GEOMUtils_TrsfCurve2d.hxx>
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <Geom2d_BezierCurve.hxx>
|
||||
#include <Geom2d_BSplineCurve.hxx>
|
||||
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
#include <GEOMUtils_HTrsfCurve2d.hxx>
|
||||
#else
|
||||
IMPLEMENT_STANDARD_RTTIEXT(GEOMUtils::TrsfCurve2d, Adaptor2d_Curve2d)
|
||||
@ -142,7 +142,7 @@ void GEOMUtils::TrsfCurve2d::Intervals(TColStd_Array1OfReal &T,
|
||||
//function : Trim
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
Handle(Adaptor2d_HCurve2d) GEOMUtils::TrsfCurve2d::Trim
|
||||
(const Standard_Real First, const Standard_Real Last,
|
||||
const Standard_Real /*Tol*/) const
|
||||
|
@ -39,7 +39,7 @@ namespace GEOMUtils
|
||||
*/
|
||||
class TrsfCurve2d : public Adaptor2d_Curve2d
|
||||
{
|
||||
#if OCC_VERSION_LARGE >= 0x07070000
|
||||
#if OCC_VERSION_LARGE >= 0x07060000
|
||||
DEFINE_STANDARD_RTTIEXT(TrsfCurve2d, Adaptor2d_Curve2d)
|
||||
#endif
|
||||
|
||||
@ -114,7 +114,7 @@ namespace GEOMUtils
|
||||
/**
|
||||
* Redefined method from the base class.
|
||||
*/
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
Standard_EXPORT Handle(Adaptor2d_HCurve2d) Trim
|
||||
#else
|
||||
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)
|
||||
#endif
|
||||
|
||||
|
@ -168,7 +168,7 @@ Standard_Integer IGESPlugin_ExportDriver::Execute(Handle(TFunction_Logbook)& /*l
|
||||
IGESControl_Writer ICW( "M", aBrepMode ); // export explicitly in meters
|
||||
Interface_Static::SetCVal( "xstep.cascade.unit", "M" );
|
||||
|
||||
#if OCC_VERSION_LARGE >= 0x07070000
|
||||
#if OCC_VERSION_LARGE >= 0x07060000
|
||||
Interface_Static::SetCVal("write.iges.unit", "M");
|
||||
XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info
|
||||
Standard_Real aScaleFactorMM = UnitsMethods::GetCasCadeLengthUnit();
|
||||
|
@ -711,7 +711,7 @@ void GEOM_Annotation::OpenGl_Annotation::Render( const Handle(OpenGl_Workspace)&
|
||||
const OpenGl_Aspects* anAspect = theWorkspace->Aspects();
|
||||
|
||||
// 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;
|
||||
myTextDraw->StringSize( aContext,
|
||||
myText, *anAspect, myTextParams->Height(), aDPI, aFH,
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include <vtkInformationVector.h>
|
||||
|
||||
// OpenCASCADE Includes
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
#include <Adaptor3d_HCurve.hxx>
|
||||
#else
|
||||
#include <Adaptor3d_Curve.hxx>
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
#include <Basics_OCCTVersion.hxx>
|
||||
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
#include <Adaptor3d_HCurve.hxx>
|
||||
#else
|
||||
#include <Adaptor3d_Curve.hxx>
|
||||
|
@ -121,7 +121,7 @@ Standard_Integer STEPPlugin_ExportDriver::Execute(Handle(TFunction_Logbook)& /*l
|
||||
// Set "C" numeric locale to save numbers correctly
|
||||
Kernel_Utils::Localizer loc;
|
||||
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
STEPControl_Writer aWriter;
|
||||
Interface_Static::SetCVal("xstep.cascade.unit","M");
|
||||
Interface_Static::SetCVal("write.step.unit", aWriteUnit.ToCString());
|
||||
|
@ -84,7 +84,7 @@ Standard_Integer STLPlugin_ImportDriver::Execute(Handle(TFunction_Logbook)& log)
|
||||
|
||||
if( aShape.IsNull() ) return 0;
|
||||
|
||||
#if OCC_VERSION_LARGE >= 0x07070000
|
||||
#if OCC_VERSION_LARGE >= 0x07060000
|
||||
BRepBuilderAPI_Sewing aSewingTool;
|
||||
aSewingTool.Init(1.0e-06, Standard_True);
|
||||
aSewingTool.Load(aShape);
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
#include <BRepAdaptor_HCurve.hxx>
|
||||
#endif
|
||||
#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());
|
||||
BRepAdaptor_Curve adC(ae);
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
#if OCC_VERSION_LARGE < 0x07060000
|
||||
Handle(BRepAdaptor_HCurve) aHAD = new BRepAdaptor_HCurve(adC);
|
||||
#else
|
||||
Handle(BRepAdaptor_Curve) aHAD = new BRepAdaptor_Curve(adC);
|
||||
|
Loading…
x
Reference in New Issue
Block a user