1
0
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:
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

@@ -36,15 +36,11 @@
#include <TopoDS_Face.hxx>
#include <TopExp_Explorer.hxx>
#include <TopExp.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <BRepAdaptor_HCurve2d.hxx>
#include <BRepAdaptor_HCurve.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepAdaptor_Curve2d.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepTest.hxx>
#include <DBRep.hxx>
#include <Adaptor3d_HCurveOnSurface.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <BRep_Tool.hxx>
@@ -62,7 +58,7 @@
#include <GeomPlate_PlateG1Criterion.hxx>
#include <BRepFill_CurveConstraint.hxx>
#include <GeomPlate_PointConstraint.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <Geom_Surface.hxx>
#include <TopoDS_Wire.hxx>
@@ -86,8 +82,8 @@
#include <TColgp_SequenceOfXY.hxx>
#include <TColgp_SequenceOfXYZ.hxx>
#include <BRepAdaptor_HCurve.hxx>
#include <Adaptor3d_HIsoCurve.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <Adaptor3d_IsoCurve.hxx>
#include <Extrema_ExtPS.hxx>
#include <Extrema_POnSurf.hxx>
@@ -158,12 +154,12 @@ static Standard_Integer plate (Draw_Interpretor & di,Standard_Integer n,const ch
Standard_Integer T = Draw::Atoi(a[3*i+3]);
Tang->SetValue(i,T);
NbPtsCur->SetValue(i,Draw::Atoi(a[2]));
Handle(BRepAdaptor_HSurface) S = new BRepAdaptor_HSurface();
S->ChangeSurface().Initialize(F);
Handle(BRepAdaptor_HCurve2d) C = new BRepAdaptor_HCurve2d();
C->ChangeCurve2d().Initialize(E,F);
Handle(BRepAdaptor_Surface) S = new BRepAdaptor_Surface();
S->Initialize(F);
Handle(BRepAdaptor_Curve2d) C = new BRepAdaptor_Curve2d();
C->Initialize(E,F);
Adaptor3d_CurveOnSurface ConS(C,S);
Handle (Adaptor3d_HCurveOnSurface) HConS = new Adaptor3d_HCurveOnSurface(ConS);
Handle (Adaptor3d_CurveOnSurface) HConS = new Adaptor3d_CurveOnSurface(ConS);
Fronts->SetValue(i,HConS);
Handle(GeomPlate_CurveConstraint) Cont
= new BRepFill_CurveConstraint(HConS,
@@ -239,9 +235,9 @@ static Standard_Integer gplate (Draw_Interpretor & ,Standard_Integer n,const cha
if(SI.IsNull())
Indice--;
else
{ Handle(BRepAdaptor_HSurface) HSI = new BRepAdaptor_HSurface();
HSI->ChangeSurface().Initialize(SI);
Henri.LoadInitSurface( BRep_Tool::Surface(HSI->ChangeSurface().Face()));
{ Handle(BRepAdaptor_Surface) HSI = new BRepAdaptor_Surface();
HSI->Initialize(SI);
Henri.LoadInitSurface( BRep_Tool::Surface(HSI->Face()));
}
for (i=1; i<=NbCurFront ; i++) {
TopoDS_Shape aLocalShape(DBRep::Get(a[Indice++],TopAbs_EDGE));
@@ -250,9 +246,9 @@ static Standard_Integer gplate (Draw_Interpretor & ,Standard_Integer n,const cha
if(E.IsNull()) return 1;
Conti=Draw::Atoi(a[Indice++]);
if ((Conti==0)||(Conti==-1))
{ Handle(BRepAdaptor_HCurve) C = new BRepAdaptor_HCurve();
C->ChangeCurve().Initialize(E);
const Handle(Adaptor3d_HCurve)& aC = C; // to avoid ambiguity
{ Handle(BRepAdaptor_Curve) C = new BRepAdaptor_Curve();
C->Initialize(E);
const Handle(Adaptor3d_Curve)& aC = C; // to avoid ambiguity
Handle(GeomPlate_CurveConstraint) Cont= new BRepFill_CurveConstraint(aC,Conti);
Henri.Add(Cont);
}
@@ -263,12 +259,12 @@ static Standard_Integer gplate (Draw_Interpretor & ,Standard_Integer n,const cha
// TopoDS_Face F = TopoDS::Face(DBRep::Get(a[Indice++],TopAbs_FACE));
if(F.IsNull())
return 1;
Handle(BRepAdaptor_HSurface) S = new BRepAdaptor_HSurface();
S->ChangeSurface().Initialize(F);
Handle(BRepAdaptor_HCurve2d) C = new BRepAdaptor_HCurve2d();
C->ChangeCurve2d().Initialize(E,F);
Handle(BRepAdaptor_Surface) S = new BRepAdaptor_Surface();
S->Initialize(F);
Handle(BRepAdaptor_Curve2d) C = new BRepAdaptor_Curve2d();
C->Initialize(E,F);
Adaptor3d_CurveOnSurface ConS(C,S);
Handle (Adaptor3d_HCurveOnSurface) HConS = new Adaptor3d_HCurveOnSurface(ConS);
Handle (Adaptor3d_CurveOnSurface) HConS = new Adaptor3d_CurveOnSurface(ConS);
Handle(GeomPlate_CurveConstraint) Cont= new BRepFill_CurveConstraint(HConS,Conti);
Henri.Add(Cont);
}
@@ -296,9 +292,9 @@ static Standard_Integer gplate (Draw_Interpretor & ,Standard_Integer n,const cha
// TopoDS_Face F = TopoDS::Face(DBRep::Get(a[Indice++],TopAbs_FACE));
if(F.IsNull())
return 1;
Handle(BRepAdaptor_HSurface) HF = new BRepAdaptor_HSurface();
HF->ChangeSurface().Initialize(F);
Handle(GeomPlate_PointConstraint) PCont= new GeomPlate_PointConstraint(u,v,BRep_Tool::Surface(HF->ChangeSurface().Face()),Conti,0.001,0.001,0.001);
Handle(BRepAdaptor_Surface) HF = new BRepAdaptor_Surface();
HF->Initialize(F);
Handle(GeomPlate_PointConstraint) PCont= new GeomPlate_PointConstraint(u,v,BRep_Tool::Surface(HF->Face()),Conti,0.001,0.001,0.001);
Henri.Add(PCont);
}
}
@@ -358,12 +354,12 @@ static Standard_Integer approxplate (Draw_Interpretor & di,Standard_Integer n,co
Standard_Integer T = Draw::Atoi(a[3*i+3]);
Tang->SetValue(i,T);
NbPtsCur->SetValue(i,NbMedium);
Handle(BRepAdaptor_HSurface) S = new BRepAdaptor_HSurface();
S->ChangeSurface().Initialize(F);
Handle(BRepAdaptor_HCurve2d) C = new BRepAdaptor_HCurve2d();
C->ChangeCurve2d().Initialize(E,F);
Handle(BRepAdaptor_Surface) S = new BRepAdaptor_Surface();
S->Initialize(F);
Handle(BRepAdaptor_Curve2d) C = new BRepAdaptor_Curve2d();
C->Initialize(E,F);
Adaptor3d_CurveOnSurface ConS(C,S);
Handle (Adaptor3d_HCurveOnSurface) HConS = new Adaptor3d_HCurveOnSurface(ConS);
Handle (Adaptor3d_CurveOnSurface) HConS = new Adaptor3d_CurveOnSurface(ConS);
Fronts->SetValue(i,HConS);
Handle(GeomPlate_CurveConstraint) Cont
= new BRepFill_CurveConstraint(HConS,

View File

@@ -50,7 +50,7 @@ static BRepOffsetAPI_ThruSections* Generator = 0;
#include <stdio.h>
#include <Geom_Curve.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomFill_Pipe.hxx>
#include <Geom_Surface.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
@@ -225,7 +225,7 @@ static Standard_Integer geompipe(Draw_Interpretor&,
Standard_Real aSpFirst, aSpLast, aPrFirst, aPrLast;
Handle(Geom_Curve) SpineCurve = BRep_Tool::Curve(TopoDS::Edge(Spine), aSpFirst, aSpLast);
Handle(Geom_Curve) ProfileCurve = BRep_Tool::Curve(TopoDS::Edge(Profile), aPrFirst, aPrLast);
Handle(GeomAdaptor_HCurve) aAdaptCurve = new GeomAdaptor_HCurve(SpineCurve, aSpFirst, aSpLast);
Handle(GeomAdaptor_Curve) aAdaptCurve = new GeomAdaptor_Curve(SpineCurve, aSpFirst, aSpLast);
Standard_Boolean ByACR = Standard_False;
Standard_Boolean rotate = Standard_False;
Standard_Real Radius = Draw::Atof(a[4]);