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

@@ -42,7 +42,7 @@
#include <gp_Pnt.hxx>
#include <Geom_Plane.hxx>
#include <ShapeFix_Edge.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <ShapeAnalysis_Surface.hxx>
@@ -52,7 +52,7 @@
#include <ShapeFix_Wire.hxx>
#include <ShapeFix_Face.hxx>
#include <TopoDS_Iterator.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <TopTools_MapOfShape.hxx>
#include <BRepLib.hxx>
@@ -192,7 +192,7 @@ Standard_Boolean ShapeFix::SameParameter(const TopoDS_Shape& shape,
continue;
}
Handle(GeomAdaptor_HSurface) AS = new GeomAdaptor_HSurface ( plane );
Handle(GeomAdaptor_Surface) AS = new GeomAdaptor_Surface ( plane );
for ( TopExp_Explorer ed ( face, TopAbs_EDGE ); ed.More(); ed.Next() ) {
TopoDS_Edge edge = TopoDS::Edge ( ed.Current() );
Standard_Real f, l;
@@ -202,7 +202,7 @@ Standard_Boolean ShapeFix::SameParameter(const TopoDS_Shape& shape,
Handle(Geom2d_Curve) c2d = BRep_Tool::CurveOnSurface ( edge, face, f, l );
if ( c2d.IsNull() ) continue;
Handle(Geom2dAdaptor_HCurve) GHPC = new Geom2dAdaptor_HCurve ( c2d, f, l );
Handle(Geom2dAdaptor_Curve) GHPC = new Geom2dAdaptor_Curve ( c2d, f, l );
Adaptor3d_CurveOnSurface ACS(GHPC,AS);
Standard_Real tol0 = BRep_Tool::Tolerance(edge);

View File

@@ -14,6 +14,8 @@
//:r5 abv 06.04.99: ec_turbine-A.stp, #4313: protect against null curve
// abv 09.04.99 S4136: add parameter preci (to eliminate BRepAPI::Precision)
#include <ShapeFix_EdgeProjAux.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <BRep_Tool.hxx>
#include <ElCLib.hxx>
@@ -23,11 +25,9 @@
#include <Geom2d_Curve.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom_Curve.hxx>
#include <Geom_SphericalSurface.hxx>
#include <Geom_Surface.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <gp_Pnt.hxx>
#include <Precision.hxx>
@@ -35,7 +35,6 @@
#include <ShapeAnalysis_Curve.hxx>
#include <ShapeAnalysis_Edge.hxx>
#include <ShapeAnalysis_Surface.hxx>
#include <ShapeFix_EdgeProjAux.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
#include <Standard_Type.hxx>
@@ -43,7 +42,7 @@
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_Curve.hxx>
#include <BSplCLib.hxx>
IMPLEMENT_STANDARD_RTTIEXT(ShapeFix_EdgeProjAux,Standard_Transient)
@@ -279,7 +278,7 @@ void ShapeFix_EdgeProjAux::Init2d (const Standard_Real preci)
Standard_Boolean parU = Standard_False, parV = Standard_False;
GeomAdaptor_Surface SA = GeomAdaptor_Surface(theSurface);
Handle(GeomAdaptor_HSurface) myHSur = new GeomAdaptor_HSurface(SA);
Handle(GeomAdaptor_Surface) myHSur = new GeomAdaptor_Surface(SA);
cf = theCurve2d->FirstParameter();
cl = theCurve2d->LastParameter();
@@ -386,7 +385,7 @@ void ShapeFix_EdgeProjAux::Init2d (const Standard_Real preci)
}
Geom2dAdaptor_Curve CA = Geom2dAdaptor_Curve(theCurve2d,cf,cl);
Handle(Geom2dAdaptor_HCurve) myHCur = new Geom2dAdaptor_HCurve(CA);
Handle(Geom2dAdaptor_Curve) myHCur = new Geom2dAdaptor_Curve(CA);
Adaptor3d_CurveOnSurface COnS = Adaptor3d_CurveOnSurface(myHCur, myHSur);
@@ -511,10 +510,10 @@ void ShapeFix_EdgeProjAux::Init3d (const Standard_Real preci)
GeomAdaptor_Surface SA = GeomAdaptor_Surface(theSurface);
Handle(GeomAdaptor_HSurface) myHSur = new GeomAdaptor_HSurface(SA);
Handle(GeomAdaptor_Surface) myHSur = new GeomAdaptor_Surface(SA);
Geom2dAdaptor_Curve CA = Geom2dAdaptor_Curve(theCurve2d);
Handle(Geom2dAdaptor_HCurve) myHCur = new Geom2dAdaptor_HCurve(CA);
Handle(Geom2dAdaptor_Curve) myHCur = new Geom2dAdaptor_Curve(CA);
Adaptor3d_CurveOnSurface COnS = Adaptor3d_CurveOnSurface(myHCur, myHSur);

View File

@@ -52,7 +52,7 @@
#include <Geom_SphericalSurface.hxx>
#include <Geom_Surface.hxx>
#include <Geom_ToroidalSurface.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GProp_GProps.hxx>
#include <IntRes2d_Domain.hxx>
#include <IntRes2d_IntersectionPoint.hxx>
@@ -119,7 +119,7 @@ static Standard_Boolean IsSurfaceUVInfinite(const Handle(Geom_Surface)& theSurf)
Precision::IsInfinite(VMax) );
}
static Standard_Boolean IsSurfaceUVPeriodic(const Handle(GeomAdaptor_HSurface)& theSurf)
static Standard_Boolean IsSurfaceUVPeriodic(const Handle(GeomAdaptor_Surface)& theSurf)
{
return ( (theSurf->IsUPeriodic() && theSurf->IsVPeriodic()) || theSurf->GetType() == GeomAbs_Sphere);
}

View File

@@ -26,7 +26,7 @@
#include <Geom_Curve.hxx>
#include <Geom_Surface.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <gp_Pnt.hxx>
#include <IntRes2d_Domain.hxx>
#include <IntRes2d_IntersectionPoint.hxx>

View File

@@ -43,6 +43,8 @@
// one pcurve we make replace pcurve)
// PTV 26.06.2002 Remove regressions after fix OCC450
#include <ShapeFix_Wire.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Bnd_Array1OfBox2d.hxx>
#include <Bnd_Box2d.hxx>
@@ -60,7 +62,6 @@
#include <Geom2d_Line.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom2dConvert.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_Curve.hxx>
@@ -71,7 +72,6 @@
#include <Geom_SurfaceOfRevolution.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GeomAPI.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx>
@@ -99,7 +99,6 @@
#include <ShapeFix_Edge.hxx>
#include <ShapeFix_IntersectionTool.hxx>
#include <ShapeFix_SplitTool.hxx>
#include <ShapeFix_Wire.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
#include <Standard_Type.hxx>
@@ -1967,8 +1966,8 @@ static Standard_Boolean RemoveLoop (TopoDS_Edge &E, const TopoDS_Face &face,
//:q1
TopLoc_Location L;
Handle(Geom_Surface) S = BRep_Tool::Surface(face, L);
Handle(Geom2dAdaptor_HCurve) AC = new Geom2dAdaptor_HCurve(c2d);
Handle(GeomAdaptor_HSurface) AS = new GeomAdaptor_HSurface(S);
Handle(Geom2dAdaptor_Curve) AC = new Geom2dAdaptor_Curve(c2d);
Handle(GeomAdaptor_Surface) AS = new GeomAdaptor_Surface(S);
Adaptor3d_CurveOnSurface ACS(AC,AS);
gp_Pnt P1(ACS.Value(t1));
@@ -2098,8 +2097,8 @@ static Standard_Boolean RemoveLoop (TopoDS_Edge &E, const TopoDS_Face &face,
TopLoc_Location L;
Handle (Geom_Surface) S = BRep_Tool::Surface(face, L);
Handle (Geom2dAdaptor_HCurve) AC = new Geom2dAdaptor_HCurve(c2d);
Handle (GeomAdaptor_HSurface) AS = new GeomAdaptor_HSurface(S);
Handle (Geom2dAdaptor_Curve) AC = new Geom2dAdaptor_Curve(c2d);
Handle (GeomAdaptor_Surface) AS = new GeomAdaptor_Surface(S);
Adaptor3d_CurveOnSurface ACS(AC,AS);
gp_Pnt P1(ACS.Value(t1));

View File

@@ -52,7 +52,6 @@
#include <Geom_SphericalSurface.hxx> //S4135
#include <Geom2d_BSplineCurve.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <TopTools_Array1OfShape.hxx>
#include <BRepTools.hxx>
@@ -75,7 +74,7 @@
#include <IntRes2d_IntersectionSegment.hxx>
#include <Geom2dAPI_ExtremaCurveCurve.hxx>
#include <Geom2dAPI_ProjectPointOnCurve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Approx_Curve2d.hxx>
#include <Geom2dConvert.hxx>
@@ -87,7 +86,7 @@
#include <Geom_OffsetCurve.hxx>
#include <GeomAPI_ExtremaCurveCurve.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <Approx_Curve3d.hxx>
#include <GeomConvert.hxx>
#include <TopoDS_Iterator.hxx>
@@ -348,7 +347,7 @@ static Standard_Real AdjustOnPeriodic3d (const Handle(Geom_Curve)& c,
}
else if (c->IsKind(STANDARD_TYPE(Geom_Conic)))
{
Approx_Curve3d Conv(new GeomAdaptor_HCurve(c,first,last),
Approx_Curve3d Conv(new GeomAdaptor_Curve(c,first,last),
myAnalyzer->Precision(),GeomAbs_C1,9,1000);
if (Conv.IsDone() || Conv.HasResult()) bsp = Conv.Curve();
}
@@ -927,10 +926,10 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
}
else if (pc->IsKind(STANDARD_TYPE(Geom2d_Conic)))
{
GeomAdaptor_Surface& AS = myAnalyzer->Surface()->Adaptor3d()->ChangeSurface();
GeomAdaptor_Surface& AS = *myAnalyzer->Surface()->Adaptor3d();
Standard_Real tolu = AS.UResolution(myAnalyzer->Precision()),
tolv = AS.VResolution(myAnalyzer->Precision());
Approx_Curve2d Conv(new Geom2dAdaptor_HCurve(pc,first,last),
Approx_Curve2d Conv(new Geom2dAdaptor_Curve(pc,first,last),
first,last,tolu,tolv,GeomAbs_C1,9,1000);
if (Conv.IsDone() || Conv.HasResult()) bsp = Conv.Curve();
}