1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +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:
kgv
2020-12-03 17:36:19 +03:00
committed by bugmaster
parent 266877a7c3
commit c22b52d60e
710 changed files with 6144 additions and 14175 deletions

View File

@@ -3128,7 +3128,6 @@ static Standard_Integer OCC25545 (Draw_Interpretor& di,
#include <BRepAdaptor_Curve.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <BRepAdaptor_Surface.hxx>
static Standard_Integer OCC25547(
Draw_Interpretor& theDI,
@@ -3155,7 +3154,7 @@ static Standard_Integer OCC25547(
// Test static methods.
TopoDS_Face aFace = BRepBuilderAPI_MakeFace(gp_Pln(gp::Origin(), gp::DZ()));
BRepAdaptor_Surface aSurf(aFace);
Handle(BRepAdaptor_HSurface) aHSurf = new BRepAdaptor_HSurface(aSurf);
Handle(BRepAdaptor_Surface) aHSurf = new BRepAdaptor_Surface(aSurf);
gp_Pnt aPnt;
gp_Dir aNormal;
@@ -4329,8 +4328,8 @@ static Standard_Integer OCC26313(Draw_Interpretor& di,Standard_Integer n,const c
//=======================================================================
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepAdaptor_HCurve.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <IntCurveSurface_HInter.hxx>
Standard_Integer OCC26525 (Draw_Interpretor& di,
Standard_Integer n,
@@ -4381,8 +4380,8 @@ Standard_Integer OCC26525 (Draw_Interpretor& di,
aBAC.Initialize(aE);
aBAS.Initialize(aF);
Handle(BRepAdaptor_HCurve) aHBAC=new BRepAdaptor_HCurve(aBAC);
Handle(BRepAdaptor_HSurface) aHBAS = new BRepAdaptor_HSurface(aBAS);
Handle(BRepAdaptor_Curve) aHBAC=new BRepAdaptor_Curve(aBAC);
Handle(BRepAdaptor_Surface) aHBAS = new BRepAdaptor_Surface(aBAS);
aHInter.Perform(aHBAC, aHBAS);
bIsDone=aHInter.IsDone();

View File

@@ -2815,7 +2815,7 @@ static Standard_Integer OCC29531(Draw_Interpretor&, Standard_Integer, const char
//function : OCC29807
//purpose :
//=======================================================================
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <IntPatch_PointLine.hxx>
#include <IntSurf_PntOn2S.hxx>
static Standard_Integer OCC29807(Draw_Interpretor& theDI, Standard_Integer theNArg, const char** theArgV)
@@ -2840,8 +2840,8 @@ static Standard_Integer OCC29807(Draw_Interpretor& theDI, Standard_Integer theNA
const Standard_Real aU2 = Draw::Atof(theArgV[5]);
const Standard_Real aV2 = Draw::Atof(theArgV[6]);
const Handle(GeomAdaptor_HSurface) anAS1 = new GeomAdaptor_HSurface(aS1);
const Handle(GeomAdaptor_HSurface) anAS2 = new GeomAdaptor_HSurface(aS2);
const Handle(GeomAdaptor_Surface) anAS1 = new GeomAdaptor_Surface(aS1);
const Handle(GeomAdaptor_Surface) anAS2 = new GeomAdaptor_Surface(aS2);
const gp_Pnt aP1 = anAS1->Value(aU1, aV1);
const gp_Pnt aP2 = anAS2->Value(aU2, aV2);
@@ -3226,15 +3226,15 @@ static Standard_Integer QAEndsWith(Draw_Interpretor& di, Standard_Integer n, con
//Class is used in OCC30435
#include <AppCont_Function.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_Curve.hxx>
class CurveEvaluator : public AppCont_Function
{
public:
Handle(Adaptor3d_HCurve) myCurve;
Handle(Adaptor3d_Curve) myCurve;
CurveEvaluator(const Handle(Adaptor3d_HCurve)& C)
CurveEvaluator(const Handle(Adaptor3d_Curve)& C)
: myCurve(C)
{
myNbPnt = 1;
@@ -3269,7 +3269,7 @@ public:
}
};
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <Approx_FitAndDivide.hxx>
#include <Convert_CompBezierCurvesToBSplineCurve.hxx>
static Standard_Integer OCC30435(Draw_Interpretor& di, Standard_Integer, const char** a)
@@ -3298,7 +3298,7 @@ static Standard_Integer OCC30435(Draw_Interpretor& di, Standard_Integer, const c
Standard_Integer maxit = atoi(a[4]);
Handle(GeomAdaptor_HCurve) aGAC = new GeomAdaptor_HCurve(GC);
Handle(GeomAdaptor_Curve) aGAC = new GeomAdaptor_Curve(GC);
CurveEvaluator aCE(aGAC);

View File

@@ -16,16 +16,16 @@
#include <QABugs.hxx>
#include <Draw_Interpretor.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Geom_Curve.hxx>
#include <DrawTrSurf.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <TopoDS_Shape.hxx>
#include <DBRep.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <BRepAdaptor_CompCurve.hxx>
#include <TopoDS.hxx>
#include <BRepAdaptor_HCompCurve.hxx>
#include <BRepAdaptor_CompCurve.hxx>
#include <IntCurveSurface_HInter.hxx>
#include <IntCurveSurface_IntersectionPoint.hxx>
#include <TopoDS_Edge.hxx>
@@ -44,10 +44,10 @@ static Standard_Integer OCC6001 (Draw_Interpretor& di, Standard_Integer argc, co
return 1;
}
const char *name = argv[1];
Handle(Adaptor3d_HCurve) hcurve;
Handle(Adaptor3d_Curve) hcurve;
Handle(Geom_Curve) curve = DrawTrSurf::GetCurve(argv[2]);
if (!curve.IsNull())
hcurve = new GeomAdaptor_HCurve(curve);
hcurve = new GeomAdaptor_Curve(curve);
else
{
TopoDS_Shape wire = DBRep::Get(argv[2]);
@@ -57,10 +57,10 @@ static Standard_Integer OCC6001 (Draw_Interpretor& di, Standard_Integer argc, co
return 1;
}
BRepAdaptor_CompCurve comp_curve(TopoDS::Wire(wire));
hcurve = new BRepAdaptor_HCompCurve(comp_curve);
hcurve = new BRepAdaptor_CompCurve(comp_curve);
}
Handle(Geom_Surface) surf = DrawTrSurf::GetSurface(argv[3]);
Handle(GeomAdaptor_HSurface) hsurf = new GeomAdaptor_HSurface(surf);
Handle(GeomAdaptor_Surface) hsurf = new GeomAdaptor_Surface(surf);
IntCurveSurface_HInter inter;
inter.Perform(hcurve, hsurf);
int nb = inter.NbPoints();