mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0028966: Coding Rules - remove Adaptor2d_HCurve2d, Adaptor3d_HCurve and Adaptor3d_HSurface classes
Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface now inherit Standard_Transient. Interfaces Adaptor2d_HCurve2d, Adaptor3d_HCurve, Adaptor3d_HSurface and their subclasses are now aliases to Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface. Removed numerous unsafe reinterpret casts. Generic classes Adaptor3d_GenHCurve, Adaptor3d_GenHSurface, Adaptor2d_GenHCurve2d have been removed. Several redundant .lxx files have been merged into .hxx. Removed obsolete adaptor classes with H suffix.
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <Extrema_POnCurv.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <BRepAdaptor_HCurve.hxx>
|
||||
|
||||
|
||||
//=======================================================================
|
||||
@@ -44,11 +43,11 @@ void BRepExtrema_ExtCC::Initialize(const TopoDS_Edge& E2)
|
||||
return; // protect against non-geometric type (e.g. polygon)
|
||||
Standard_Real V1, V2;
|
||||
BRepAdaptor_Curve Curv(E2);
|
||||
myHC = new BRepAdaptor_HCurve(Curv);
|
||||
myHC = new BRepAdaptor_Curve(Curv);
|
||||
Standard_Real Tol = Min(BRep_Tool::Tolerance(E2), Precision::Confusion());
|
||||
Tol = Max(Curv.Resolution(Tol), Precision::PConfusion());
|
||||
BRep_Tool::Range(E2,V1,V2);
|
||||
myExtCC.SetCurve(2,myHC->Curve(),V1,V2);
|
||||
myExtCC.SetCurve (2, *myHC, V1, V2);
|
||||
myExtCC.SetTolerance(2, Tol);
|
||||
}
|
||||
|
||||
@@ -63,11 +62,11 @@ void BRepExtrema_ExtCC::Perform(const TopoDS_Edge& E1)
|
||||
return; // protect against non-geometric type (e.g. polygon)
|
||||
Standard_Real U1, U2;
|
||||
BRepAdaptor_Curve Curv(E1);
|
||||
Handle(BRepAdaptor_HCurve) HC = new BRepAdaptor_HCurve(Curv);
|
||||
Handle(BRepAdaptor_Curve) HC = new BRepAdaptor_Curve(Curv);
|
||||
Standard_Real Tol = Min(BRep_Tool::Tolerance(E1), Precision::Confusion());
|
||||
Tol = Max(Curv.Resolution(Tol), Precision::PConfusion());
|
||||
BRep_Tool::Range(E1,U1,U2);
|
||||
myExtCC.SetCurve (1, HC->Curve(), U1, U2);
|
||||
myExtCC.SetCurve (1, *HC, U1, U2);
|
||||
myExtCC.SetTolerance(1, Tol);
|
||||
// If we enable SetSingleSolutionFlag Extrema will run much quicker on almost parallel curves
|
||||
// (e.g. bug 27665), however some solutions will be lost, e.g. see bug 28183.
|
||||
|
@@ -15,14 +15,12 @@
|
||||
#define _BRepExtrema_ExtCC_HeaderFile
|
||||
|
||||
#include <Extrema_ExtCC.hxx>
|
||||
#include <BRepAdaptor_HCurve.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
|
||||
class BRepAdaptor_HCurve;
|
||||
class TopoDS_Edge;
|
||||
class gp_Pnt;
|
||||
|
||||
|
||||
class BRepExtrema_ExtCC
|
||||
{
|
||||
public:
|
||||
@@ -75,7 +73,7 @@ class BRepExtrema_ExtCC
|
||||
private:
|
||||
|
||||
Extrema_ExtCC myExtCC;
|
||||
Handle(BRepAdaptor_HCurve) myHC;
|
||||
Handle(BRepAdaptor_Curve) myHC;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -22,9 +22,7 @@
|
||||
#include <BRepTopAdaptor_FClass2d.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <BRepAdaptor_HSurface.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <BRepAdaptor_HCurve.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : BRepExtrema_ExtCF
|
||||
@@ -49,7 +47,7 @@ void BRepExtrema_ExtCF::Initialize(const TopoDS_Edge& E, const TopoDS_Face& F)
|
||||
!BRep_Tool::IsGeometric(E))
|
||||
return; // protect against non-geometric type (e.g. triangulation)
|
||||
BRepAdaptor_Curve aC(E);
|
||||
myHS = new BRepAdaptor_HSurface(Surf);
|
||||
myHS = new BRepAdaptor_Surface(Surf);
|
||||
Standard_Real aTolC, aTolS;
|
||||
//
|
||||
aTolS = Min(BRep_Tool::Tolerance(F), Precision::Confusion());
|
||||
@@ -62,7 +60,7 @@ void BRepExtrema_ExtCF::Initialize(const TopoDS_Edge& E, const TopoDS_Face& F)
|
||||
//
|
||||
Standard_Real U1, U2, V1, V2;
|
||||
BRepTools::UVBounds(F, U1, U2, V1, V2);
|
||||
myExtCS.Initialize(myHS->Surface(), U1, U2, V1, V2, aTolC, aTolS);
|
||||
myExtCS.Initialize (*myHS, U1, U2, V1, V2, aTolC, aTolS);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -83,7 +81,7 @@ void BRepExtrema_ExtCF::Perform(const TopoDS_Edge& E, const TopoDS_Face& F2)
|
||||
BRep_Tool::Range(E, U1, U2);
|
||||
|
||||
BRepAdaptor_Curve Curv(E);
|
||||
Handle(BRepAdaptor_HCurve) HC = new BRepAdaptor_HCurve(Curv);
|
||||
Handle(BRepAdaptor_Curve) HC = new BRepAdaptor_Curve(Curv);
|
||||
myExtCS.Perform(HC->Curve(), U1, U2);
|
||||
|
||||
if(!myExtCS.IsDone())
|
||||
|
@@ -18,17 +18,15 @@
|
||||
#include <TColStd_SequenceOfReal.hxx>
|
||||
#include <Extrema_SequenceOfPOnSurf.hxx>
|
||||
#include <Extrema_SequenceOfPOnCurv.hxx>
|
||||
#include <BRepAdaptor_HSurface.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <Extrema_POnCurv.hxx>
|
||||
#include <Extrema_POnSurf.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
|
||||
class BRepAdaptor_HSurface;
|
||||
class TopoDS_Edge;
|
||||
class TopoDS_Face;
|
||||
class gp_Pnt;
|
||||
|
||||
|
||||
class BRepExtrema_ExtCF
|
||||
{
|
||||
public:
|
||||
@@ -92,7 +90,7 @@ class BRepExtrema_ExtCF
|
||||
TColStd_SequenceOfReal mySqDist;
|
||||
Extrema_SequenceOfPOnSurf myPointsOnS;
|
||||
Extrema_SequenceOfPOnCurv myPointsOnC;
|
||||
Handle(BRepAdaptor_HSurface) myHS;
|
||||
Handle(BRepAdaptor_Surface) myHS;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#include <BRepClass_FaceClassifier.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <BRepAdaptor_HSurface.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : BRepExtrema_ExtFF
|
||||
@@ -49,13 +49,13 @@ void BRepExtrema_ExtFF::Initialize(const TopoDS_Face& F2)
|
||||
if (Surf.GetType() == GeomAbs_OtherSurface)
|
||||
return; // protect against non-geometric type (e.g. triangulation)
|
||||
|
||||
myHS = new BRepAdaptor_HSurface(Surf);
|
||||
myHS = new BRepAdaptor_Surface(Surf);
|
||||
Standard_Real Tol = Min(BRep_Tool::Tolerance(F2), Precision::Confusion());
|
||||
Tol = Min(Surf.UResolution(Tol), Surf.VResolution(Tol));
|
||||
Tol = Max(Tol, Precision::PConfusion());
|
||||
Standard_Real U1, U2, V1, V2;
|
||||
BRepTools::UVBounds(F2, U1, U2, V1, V2);
|
||||
myExtSS.Initialize(myHS->Surface(), U1, U2, V1, V2, Tol);
|
||||
myExtSS.Initialize (*myHS, U1, U2, V1, V2, Tol);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -73,13 +73,13 @@ void BRepExtrema_ExtFF::Perform(const TopoDS_Face& F1, const TopoDS_Face& F2)
|
||||
if (myHS.IsNull() || Surf1.GetType() == GeomAbs_OtherSurface)
|
||||
return; // protect against non-geometric type (e.g. triangulation)
|
||||
|
||||
Handle(BRepAdaptor_HSurface) HS1 = new BRepAdaptor_HSurface(Surf1);
|
||||
Handle(BRepAdaptor_Surface) HS1 = new BRepAdaptor_Surface(Surf1);
|
||||
Standard_Real Tol1 = Min(BRep_Tool::Tolerance(F1), Precision::Confusion());
|
||||
Tol1 = Min(Surf1.UResolution(Tol1), Surf1.VResolution(Tol1));
|
||||
Tol1 = Max(Tol1, Precision::PConfusion());
|
||||
Standard_Real U1, U2, V1, V2;
|
||||
BRepTools::UVBounds(F1, U1, U2, V1, V2);
|
||||
myExtSS.Perform(HS1->Surface(), U1, U2, V1, V2, Tol1);
|
||||
myExtSS.Perform (*HS1, U1, U2, V1, V2, Tol1);
|
||||
|
||||
if (!myExtSS.IsDone())
|
||||
return;
|
||||
|
@@ -17,16 +17,13 @@
|
||||
#include <Extrema_ExtSS.hxx>
|
||||
#include <TColStd_SequenceOfReal.hxx>
|
||||
#include <Extrema_SequenceOfPOnSurf.hxx>
|
||||
#include <BRepAdaptor_HSurface.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <Extrema_POnSurf.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
|
||||
class BRepAdaptor_HSurface;
|
||||
class TopoDS_Face;
|
||||
class gp_Pnt;
|
||||
|
||||
|
||||
|
||||
class BRepExtrema_ExtFF
|
||||
{
|
||||
public:
|
||||
@@ -90,7 +87,7 @@ class BRepExtrema_ExtFF
|
||||
TColStd_SequenceOfReal mySqDist;
|
||||
Extrema_SequenceOfPOnSurf myPointsOnS1;
|
||||
Extrema_SequenceOfPOnSurf myPointsOnS2;
|
||||
Handle(BRepAdaptor_HSurface) myHS;
|
||||
Handle(BRepAdaptor_Surface) myHS;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -17,10 +17,7 @@
|
||||
#include <BRepExtrema_ExtPC.hxx>
|
||||
|
||||
#include <BRep_Tool.hxx>
|
||||
//#include <StdFail_NotDone.hxx>
|
||||
//#include <Standard_Failure.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <BRepAdaptor_HCurve.hxx>
|
||||
|
||||
|
||||
//=======================================================================
|
||||
@@ -44,12 +41,11 @@ void BRepExtrema_ExtPC::Initialize(const TopoDS_Edge& E)
|
||||
if (!BRep_Tool::IsGeometric(E))
|
||||
return; // protect against non-geometric type (e.g. polygon)
|
||||
Standard_Real U1, U2;
|
||||
BRepAdaptor_Curve Curv(E);
|
||||
myHC = new BRepAdaptor_HCurve(Curv);
|
||||
myHC = new BRepAdaptor_Curve(E);
|
||||
Standard_Real Tol = Min(BRep_Tool::Tolerance(E), Precision::Confusion());
|
||||
Tol = Max(Curv.Resolution(Tol), Precision::PConfusion());
|
||||
Tol = Max(myHC->Resolution(Tol), Precision::PConfusion());
|
||||
BRep_Tool::Range(E,U1,U2);
|
||||
myExtPC.Initialize(myHC->Curve(),U1,U2,Tol);
|
||||
myExtPC.Initialize (*myHC, U1, U2, Tol);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -15,10 +15,9 @@
|
||||
#define _BRepExtrema_ExtPC_HeaderFile
|
||||
|
||||
#include <Extrema_ExtPC.hxx>
|
||||
#include <BRepAdaptor_HCurve.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
|
||||
class BRepAdaptor_HCurve;
|
||||
class TopoDS_Vertex;
|
||||
class TopoDS_Edge;
|
||||
class gp_Pnt;
|
||||
@@ -82,7 +81,7 @@ class BRepExtrema_ExtPC
|
||||
private:
|
||||
|
||||
Extrema_ExtPC myExtPC;
|
||||
Handle(BRepAdaptor_HCurve) myHC;
|
||||
Handle(BRepAdaptor_Curve) myHC;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user