1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +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

@@ -14,8 +14,6 @@
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HCurveOnSurface.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_Parallel.hxx>
#include <BRep_Builder.hxx>
@@ -36,7 +34,6 @@
#include <Geom2d_Curve.hxx>
#include <Geom2dAdaptor.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom2dInt_GInter.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Plane.hxx>
@@ -44,8 +41,6 @@
#include <Geom_Surface.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GeomProjLib.hxx>
#include <GCPnts_AbscissaPoint.hxx>
@@ -723,7 +718,7 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
//
// 1. Minimum of conditions to Perform
Handle (BRep_CurveRepresentation) myCref;
Handle (Adaptor3d_HCurve) myHCurve;
Handle (Adaptor3d_Curve) myHCurve;
myCref.Nullify();
@@ -791,19 +786,19 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
(myCref->Curve3D()->Transformed
(myCref->Location().Transformation()));
GeomAdaptor_Curve GAC3d(C3dx, First, Last);
myHCurve = new GeomAdaptor_HCurve(GAC3d);
myHCurve = new GeomAdaptor_Curve(GAC3d);
}
else { // curve on surface
Handle(Geom_Surface) Sref = myCref->Surface();
Sref = Handle(Geom_Surface)::
DownCast(Sref->Transformed(myCref->Location().Transformation()));
const Handle(Geom2d_Curve)& PCref = myCref->PCurve();
Handle(GeomAdaptor_HSurface) GAHSref =
new GeomAdaptor_HSurface(Sref);
Handle(Geom2dAdaptor_HCurve) GHPCref =
new Geom2dAdaptor_HCurve(PCref, First, Last);
Handle(GeomAdaptor_Surface) GAHSref =
new GeomAdaptor_Surface(Sref);
Handle(Geom2dAdaptor_Curve) GHPCref =
new Geom2dAdaptor_Curve(PCref, First, Last);
Adaptor3d_CurveOnSurface ACSref(GHPCref,GAHSref);
myHCurve = new Adaptor3d_HCurveOnSurface(ACSref);
myHCurve = new Adaptor3d_CurveOnSurface(ACSref);
}
}
}
@@ -848,13 +843,12 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
Sb = Handle(Geom_Surface)::
DownCast (Su->Transformed(L.Transformation()));
Handle(Geom2d_Curve) PC = cr->PCurve();
Handle(GeomAdaptor_HSurface) GAHS =
new GeomAdaptor_HSurface(Sb);
Handle(Geom2dAdaptor_HCurve) GHPC =
new Geom2dAdaptor_HCurve(PC,f,l);
Handle(GeomAdaptor_Surface) GAHS =
new GeomAdaptor_Surface(Sb);
Handle(Geom2dAdaptor_Curve) GHPC =
new Geom2dAdaptor_Curve(PC,f,l);
Adaptor3d_CurveOnSurface ACS(GHPC,GAHS);
ok = Validate(myHCurve->Curve(), ACS,
Tol, SameParameter, aNewTol);
ok = Validate (*myHCurve, ACS, Tol, SameParameter, aNewTol);
if (ok) {
if (aNewTol<aMaxTol) {
UpdateShape(myShape, aNewTol+Delta, aMapToAvoid);
@@ -864,9 +858,9 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
if (cr->IsCurveOnClosedSurface()) {
//checkclosed = Standard_True;
GHPC->ChangeCurve2d().Load(cr->PCurve2(),f,l); // same bounds
GHPC->Load(cr->PCurve2(),f,l); // same bounds
ACS.Load(GHPC, GAHS); // sans doute inutile
ok = Validate(myHCurve->Curve(),ACS,Tol,SameParameter, aNewTol);
ok = Validate (*myHCurve, ACS, Tol, SameParameter, aNewTol);
if (ok) {
if (aNewTol<aMaxTol) {
UpdateShape(myShape, aNewTol+Delta, aMapToAvoid);
@@ -897,31 +891,30 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
P = Handle(Geom_Plane)::
DownCast(P->Transformed(L.Transformation()));
//on projette Cref sur ce plan
Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(P);
Handle(GeomAdaptor_Surface) GAHS = new GeomAdaptor_Surface(P);
// Dub - Normalement myHCurve est une GeomAdaptor_HCurve
GeomAdaptor_Curve& Gac =
Handle(GeomAdaptor_HCurve)::DownCast(myHCurve)->ChangeCurve();
Handle(Geom_Curve) C3dx = Gac.Curve();
// Dub - Normalement myHCurve est une GeomAdaptor_Curve
Handle(GeomAdaptor_Curve) Gac = Handle(GeomAdaptor_Curve)::DownCast(myHCurve);
Handle(Geom_Curve) C3dx = Gac->Curve();
Handle(Geom_Curve) ProjOnPlane =
GeomProjLib::ProjectOnPlane(new Geom_TrimmedCurve(C3dx,First,Last),
P,
P->Position().Direction(),
Standard_True);
Handle(GeomAdaptor_HCurve) aHCurve =
new GeomAdaptor_HCurve(ProjOnPlane);
Handle(GeomAdaptor_Curve) aHCurve =
new GeomAdaptor_Curve(ProjOnPlane);
ProjLib_ProjectedCurve proj(GAHS,aHCurve);
Handle(Geom2d_Curve) PC = Geom2dAdaptor::MakeCurve(proj);
Handle(Geom2dAdaptor_HCurve) GHPC =
new Geom2dAdaptor_HCurve(PC,
Handle(Geom2dAdaptor_Curve) GHPC =
new Geom2dAdaptor_Curve(PC,
myHCurve->FirstParameter(),
myHCurve->LastParameter());
Adaptor3d_CurveOnSurface ACS(GHPC,GAHS);
Standard_Boolean okx = Validate(myHCurve->Curve(),ACS,
Standard_Boolean okx = Validate(*myHCurve, ACS,
Tol,Standard_True, aNewTol);
if (okx) {
if (aNewTol<aMaxTol) {