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:
@@ -14,6 +14,7 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <BRepTools_NurbsConvertModification.hxx>
|
||||
|
||||
#include <Approx_SameParameter.hxx>
|
||||
#include <BRep_GCurve.hxx>
|
||||
@@ -21,7 +22,6 @@
|
||||
#include <BRep_TEdge.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
#include <BRepTools_NurbsConvertModification.hxx>
|
||||
#include <BSplCLib.hxx>
|
||||
#include <ElSLib.hxx>
|
||||
#include <Extrema_LocateExtPC.hxx>
|
||||
@@ -30,7 +30,6 @@
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Geom2dAdaptor_Curve.hxx>
|
||||
#include <Geom2dAdaptor_HCurve.hxx>
|
||||
#include <Geom2dConvert.hxx>
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <Geom_BezierSurface.hxx>
|
||||
@@ -46,8 +45,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 <GeomConvert.hxx>
|
||||
#include <gp_GTrsf2d.hxx>
|
||||
@@ -396,7 +393,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
|
||||
C2d = new Geom2d_TrimmedCurve(C2d, f2d, l2d);
|
||||
|
||||
Geom2dAdaptor_Curve G2dAC(C2d, f2d, l2d);
|
||||
Handle(Geom2dAdaptor_HCurve) G2dAHC = new Geom2dAdaptor_HCurve(G2dAC);
|
||||
Handle(Geom2dAdaptor_Curve) G2dAHC = new Geom2dAdaptor_Curve(G2dAC);
|
||||
|
||||
if(!newE.IsNull()) {
|
||||
C3d = BRep_Tool::Curve(newE, f3d, l3d);
|
||||
@@ -405,7 +402,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
|
||||
C3d = BRep_Tool::Curve(E,f3d,l3d);
|
||||
}
|
||||
GeomAdaptor_Curve G3dAC(C3d, f3d, l3d);
|
||||
Handle(GeomAdaptor_HCurve) G3dAHC = new GeomAdaptor_HCurve(G3dAC);
|
||||
Handle(GeomAdaptor_Curve) G3dAHC = new GeomAdaptor_Curve(G3dAC);
|
||||
|
||||
Standard_Real Uinf, Usup, Vinf, Vsup, u = 0, v = 0;
|
||||
Handle(Geom_Surface) S = BRep_Tool::Surface(F);
|
||||
@@ -461,7 +458,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
|
||||
else {
|
||||
S = BRep_Tool::Surface(F);// Si S est un plan, pas de changement de parametrisation
|
||||
GeomAdaptor_Surface GAS(S);
|
||||
Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(GAS);
|
||||
Handle(GeomAdaptor_Surface) GAHS = new GeomAdaptor_Surface(GAS);
|
||||
ProjLib_ComputeApprox ProjOnCurve(G3dAHC,GAHS,Tol);
|
||||
if(ProjOnCurve.BSpline().IsNull()) {
|
||||
Curve2d = Geom2dConvert::CurveToBSplineCurve(ProjOnCurve.Bezier());
|
||||
@@ -486,7 +483,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
|
||||
//
|
||||
GeomAdaptor_Surface GAS(S,Uinf-u,Usup+u,Vinf-v,Vsup+v);
|
||||
|
||||
Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(GAS);
|
||||
Handle(GeomAdaptor_Surface) GAHS = new GeomAdaptor_Surface(GAS);
|
||||
|
||||
ProjLib_ComputeApproxOnPolarSurface ProjOnCurve(G2dAHC,G3dAHC,GAHS,Tol);
|
||||
|
||||
@@ -541,14 +538,14 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
|
||||
Standard_Real f2dBis,l2dBis;
|
||||
C2d = new Geom2d_TrimmedCurve(C2d, f2d, l2d);
|
||||
Geom2dAdaptor_Curve G2dAC(C2d, f2d, l2d);
|
||||
Handle(Geom2dAdaptor_HCurve) G2dAHC = new Geom2dAdaptor_HCurve(G2dAC);
|
||||
Handle(Geom2dAdaptor_Curve) G2dAHC = new Geom2dAdaptor_Curve(G2dAC);
|
||||
TopoDS_Edge ERevers = E;
|
||||
ERevers.Reverse();
|
||||
C2dBis = BRep_Tool::CurveOnSurface(ERevers,F,f2dBis,l2dBis);
|
||||
Handle(Standard_Type) TheTypeC2dBis = C2dBis->DynamicType();
|
||||
C2dBis = new Geom2d_TrimmedCurve(C2dBis,f2dBis, l2dBis);
|
||||
Geom2dAdaptor_Curve G2dACBis(C2dBis, f2dBis, l2dBis);
|
||||
Handle(Geom2dAdaptor_HCurve) G2dAHCBis = new Geom2dAdaptor_HCurve(G2dACBis);
|
||||
Handle(Geom2dAdaptor_Curve) G2dAHCBis = new Geom2dAdaptor_Curve(G2dACBis);
|
||||
|
||||
if(C3d.IsNull()) {
|
||||
if(isConvert2d) {
|
||||
@@ -574,7 +571,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
|
||||
C3d = BRep_Tool::Curve(newE, f3d,l3d);
|
||||
}
|
||||
GeomAdaptor_Curve G3dAC(C3d, f3d, l3d);
|
||||
Handle(GeomAdaptor_HCurve) G3dAHC = new GeomAdaptor_HCurve(G3dAC);
|
||||
Handle(GeomAdaptor_Curve) G3dAHC = new GeomAdaptor_Curve(G3dAC);
|
||||
|
||||
Handle(Geom_Surface) S = BRep_Tool::Surface(F);
|
||||
Handle(Standard_Type) myT = S->DynamicType();
|
||||
@@ -623,7 +620,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
|
||||
}
|
||||
}
|
||||
GeomAdaptor_Surface GAS(S, Uinf-u,Usup+u,Vinf-v,Vsup+v);
|
||||
Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(GAS);
|
||||
Handle(GeomAdaptor_Surface) GAHS = new GeomAdaptor_Surface(GAS);
|
||||
myled.Append(E);
|
||||
|
||||
ProjLib_ComputeApproxOnPolarSurface
|
||||
@@ -730,4 +727,4 @@ const TopTools_ListOfShape&
|
||||
BRepTools_NurbsConvertModification::GetUpdatedEdges() const
|
||||
{
|
||||
return myUpdatedEdges;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user