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:
@@ -16,9 +16,11 @@
|
||||
|
||||
// Modified by skv - Wed Dec 24 18:08:39 2003 OCC4455
|
||||
|
||||
#include <Adaptor2d_HCurve2d.hxx>
|
||||
#include <BRepOffset_Inter2d.hxx>
|
||||
|
||||
#include <Adaptor2d_Curve2d.hxx>
|
||||
#include <Adaptor3d_CurveOnSurface.hxx>
|
||||
#include <Adaptor3d_HSurface.hxx>
|
||||
#include <Adaptor3d_Surface.hxx>
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <BndLib_Add3dCurve.hxx>
|
||||
#include <BOPTools_AlgoTools.hxx>
|
||||
@@ -35,7 +37,6 @@
|
||||
#include <BRepLib.hxx>
|
||||
#include <BRepLib_MakeVertex.hxx>
|
||||
#include <BRepOffset_Analyse.hxx>
|
||||
#include <BRepOffset_Inter2d.hxx>
|
||||
#include <BRepOffset_Offset.hxx>
|
||||
#include <BRepOffset_Tool.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
@@ -44,7 +45,7 @@
|
||||
#include <Geom2d_BSplineCurve.hxx>
|
||||
#include <Geom2d_Line.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Geom2dAdaptor_HCurve.hxx>
|
||||
#include <Geom2dAdaptor_Curve.hxx>
|
||||
#include <Geom2dConvert_CompCurveToBSplineCurve.hxx>
|
||||
#include <Geom2dInt_GInter.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
@@ -54,7 +55,6 @@
|
||||
#include <Geom_Line.hxx>
|
||||
#include <Geom_Plane.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <GeomAdaptor_HSurface.hxx>
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
#include <GeomAPI_ProjectPointOnCurve.hxx>
|
||||
#include <GeomConvert_CompCurveToBSplineCurve.hxx>
|
||||
@@ -810,8 +810,8 @@ static void RefEdgeInter(const TopoDS_Face& F,
|
||||
|
||||
static Standard_Integer evaluateMaxSegment(const Adaptor3d_CurveOnSurface& aCurveOnSurface)
|
||||
{
|
||||
Handle(Adaptor3d_HSurface) aSurf = aCurveOnSurface.GetSurface();
|
||||
Handle(Adaptor2d_HCurve2d) aCurv2d = aCurveOnSurface.GetCurve();
|
||||
Handle(Adaptor3d_Surface) aSurf = aCurveOnSurface.GetSurface();
|
||||
Handle(Adaptor2d_Curve2d) aCurv2d = aCurveOnSurface.GetCurve();
|
||||
|
||||
Standard_Real aNbSKnots = 0, aNbC2dKnots = 0;
|
||||
|
||||
@@ -1202,8 +1202,8 @@ Standard_Boolean BRepOffset_Inter2d::ExtentEdge(const TopoDS_Edge& E,TopoDS_Edge
|
||||
{
|
||||
Geom2dAdaptor_Curve AC2d( MinPC, FirstParOnPC, LastParOnPC );
|
||||
GeomAdaptor_Surface GAsurf( MinSurf );
|
||||
Handle(Geom2dAdaptor_HCurve) HC2d = new Geom2dAdaptor_HCurve( AC2d );
|
||||
Handle(GeomAdaptor_HSurface) HSurf = new GeomAdaptor_HSurface( GAsurf );
|
||||
Handle(Geom2dAdaptor_Curve) HC2d = new Geom2dAdaptor_Curve( AC2d );
|
||||
Handle(GeomAdaptor_Surface) HSurf = new GeomAdaptor_Surface( GAsurf );
|
||||
Adaptor3d_CurveOnSurface ConS( HC2d, HSurf );
|
||||
Standard_Real /*max_deviation,*/ average_deviation;
|
||||
GeomAbs_Shape Continuity = GeomAbs_C1;
|
||||
@@ -1840,4 +1840,4 @@ Standard_Boolean BRepOffset_Inter2d::FuseVertices (const TopTools_IndexedDataMap
|
||||
}
|
||||
}
|
||||
return Standard_True;
|
||||
}
|
||||
}
|
||||
|
@@ -17,21 +17,17 @@
|
||||
#ifndef _BRepOffset_Inter2d_HeaderFile
|
||||
#define _BRepOffset_Inter2d_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <TopTools_DataMapOfShapeShape.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
|
||||
class BRepAlgo_AsDes;
|
||||
class TopoDS_Face;
|
||||
class BRepOffset_Analyse;
|
||||
class BRepOffset_Offset;
|
||||
class TopoDS_Edge;
|
||||
class TopoDS_Face;
|
||||
|
||||
|
||||
//! Computes the intersections betwwen edges on a face
|
||||
//! Computes the intersections between edges on a face
|
||||
//! stores result is SD as AsDes from BRepOffset.
|
||||
class BRepOffset_Inter2d
|
||||
{
|
||||
@@ -94,10 +90,6 @@ public:
|
||||
TopoDS_Edge& NE,
|
||||
const Standard_Real theOffset);
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif // _BRepOffset_Inter2d_HeaderFile
|
||||
|
@@ -64,7 +64,7 @@
|
||||
#include <gce_MakeDir.hxx>
|
||||
#include <Geom2d_Line.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Geom2dAdaptor_HCurve.hxx>
|
||||
#include <Geom2dAdaptor_Curve.hxx>
|
||||
#include <Geom_Circle.hxx>
|
||||
#include <Geom_ConicalSurface.hxx>
|
||||
#include <Geom_CylindricalSurface.hxx>
|
||||
@@ -73,7 +73,7 @@
|
||||
#include <Geom_SphericalSurface.hxx>
|
||||
#include <Geom_SurfaceOfLinearExtrusion.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <GeomAdaptor_HSurface.hxx>
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
#include <GeomAPI_ProjectPointOnCurve.hxx>
|
||||
#include <GeomFill_Generator.hxx>
|
||||
#include <GeomLib.hxx>
|
||||
@@ -2994,8 +2994,8 @@ void BRepOffset_MakeOffset::MakeMissingWalls ()
|
||||
Standard_Real FirstPar = 0., LastPar = fp2d.Distance(fp2dOE);
|
||||
Geom2dAdaptor_Curve AC2d( aLine2d2, FirstPar, LastPar );
|
||||
GeomAdaptor_Surface GAsurf( theSurf );
|
||||
Handle(Geom2dAdaptor_HCurve) HC2d = new Geom2dAdaptor_HCurve( AC2d );
|
||||
Handle(GeomAdaptor_HSurface) HSurf = new GeomAdaptor_HSurface( GAsurf );
|
||||
Handle(Geom2dAdaptor_Curve) HC2d = new Geom2dAdaptor_Curve( AC2d );
|
||||
Handle(GeomAdaptor_Surface) HSurf = new GeomAdaptor_Surface( GAsurf );
|
||||
Adaptor3d_CurveOnSurface ConS( HC2d, HSurf );
|
||||
Standard_Real max_deviation = 0., average_deviation;
|
||||
GeomLib::BuildCurve3d(Precision::Confusion(),
|
||||
@@ -3015,8 +3015,8 @@ void BRepOffset_MakeOffset::MakeMissingWalls ()
|
||||
Standard_Real FirstPar = 0., LastPar = lp2d.Distance(lp2dOE);
|
||||
Geom2dAdaptor_Curve AC2d( aLine2d, FirstPar, LastPar );
|
||||
GeomAdaptor_Surface GAsurf( theSurf );
|
||||
Handle(Geom2dAdaptor_HCurve) HC2d = new Geom2dAdaptor_HCurve( AC2d );
|
||||
Handle(GeomAdaptor_HSurface) HSurf = new GeomAdaptor_HSurface( GAsurf );
|
||||
Handle(Geom2dAdaptor_Curve) HC2d = new Geom2dAdaptor_Curve( AC2d );
|
||||
Handle(GeomAdaptor_Surface) HSurf = new GeomAdaptor_Surface( GAsurf );
|
||||
Adaptor3d_CurveOnSurface ConS( HC2d, HSurf );
|
||||
Standard_Real max_deviation = 0., average_deviation;
|
||||
GeomLib::BuildCurve3d(Precision::Confusion(),
|
||||
|
@@ -24,8 +24,7 @@
|
||||
#include <BRepLib_MakeEdge.hxx>
|
||||
#include <BRepLib_MakeFace.hxx>
|
||||
#include <BRepTools_Quilt.hxx>
|
||||
#include <BRepAdaptor_HCurve2d.hxx>
|
||||
#include <BRepAdaptor_HSurface.hxx>
|
||||
#include <BRepAdaptor_Curve2d.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <BRepOffset_SimpleOffset.hxx>
|
||||
#include <BRepTools_Modifier.hxx>
|
||||
@@ -238,10 +237,10 @@ static void tgtfaces(const TopoDS_Edge& Ed,
|
||||
BRepAdaptor_Surface aBAS1(F1,Standard_False);
|
||||
BRepAdaptor_Surface aBAS2(F2,Standard_False);
|
||||
|
||||
Handle(BRepAdaptor_HSurface) HS1 = new BRepAdaptor_HSurface (aBAS1);
|
||||
Handle(BRepAdaptor_HSurface) HS2;
|
||||
Handle(BRepAdaptor_Surface) HS1 = new BRepAdaptor_Surface (aBAS1);
|
||||
Handle(BRepAdaptor_Surface) HS2;
|
||||
if(couture) HS2 = HS1;
|
||||
else HS2 = new BRepAdaptor_HSurface(aBAS2);
|
||||
else HS2 = new BRepAdaptor_Surface(aBAS2);
|
||||
//case when edge lies on the one face
|
||||
|
||||
E.Orientation(TopAbs_FORWARD);
|
||||
|
@@ -14,9 +14,9 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <BRepOffset_Offset.hxx>
|
||||
|
||||
#include <Adaptor3d_CurveOnSurface.hxx>
|
||||
#include <Adaptor3d_HCurveOnSurface.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_GCurve.hxx>
|
||||
#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
|
||||
@@ -28,7 +28,6 @@
|
||||
#include <BRepLib_MakeFace.hxx>
|
||||
#include <BRepLib_MakeWire.hxx>
|
||||
#include <BRepOffset.hxx>
|
||||
#include <BRepOffset_Offset.hxx>
|
||||
#include <BRepOffset_Tool.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
#include <ElSLib.hxx>
|
||||
@@ -37,7 +36,6 @@
|
||||
#include <Geom2d_Line.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Geom2dAdaptor_Curve.hxx>
|
||||
#include <Geom2dAdaptor_HCurve.hxx>
|
||||
#include <Geom_Circle.hxx>
|
||||
#include <Geom_ConicalSurface.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
@@ -50,8 +48,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 <GeomAPI.hxx>
|
||||
#include <GeomAPI_ExtremaCurveCurve.hxx>
|
||||
@@ -1057,11 +1053,11 @@ void BRepOffset_Offset::Init(const TopoDS_Edge& Path,
|
||||
Handle(Geom_Curve) CP = BRep_Tool::Curve(Path,Loc,f[0],l[0]);
|
||||
CP = new Geom_TrimmedCurve(CP,f[0], l[0]);
|
||||
CP->Transform(Loc.Transformation());
|
||||
Handle(GeomAdaptor_HCurve) HCP = new GeomAdaptor_HCurve(CP);
|
||||
Handle(GeomAdaptor_Curve) HCP = new GeomAdaptor_Curve(CP);
|
||||
|
||||
Handle(Geom_Curve) C1 = BRep_Tool::Curve(Edge1,Loc,f[1],l[1]);
|
||||
|
||||
Handle(Adaptor3d_HCurve) HEdge1;
|
||||
Handle(Adaptor3d_Curve) HEdge1;
|
||||
Standard_Boolean C1is3D = Standard_True;
|
||||
if (C1.IsNull()) {
|
||||
C1is3D = Standard_False;
|
||||
@@ -1070,15 +1066,15 @@ void BRepOffset_Offset::Init(const TopoDS_Edge& Path,
|
||||
BRep_Tool::CurveOnSurface(Edge1,C12d,S1,Loc,f[1],l[1]);
|
||||
S1 = Handle(Geom_Surface)::DownCast(S1->Transformed(Loc.Transformation()));
|
||||
C12d = new Geom2d_TrimmedCurve(C12d,f[1],l[1]);
|
||||
Handle(GeomAdaptor_HSurface) HS1 = new GeomAdaptor_HSurface(S1);
|
||||
Handle(Geom2dAdaptor_HCurve) HC1 = new Geom2dAdaptor_HCurve(C12d);
|
||||
Handle(GeomAdaptor_Surface) HS1 = new GeomAdaptor_Surface(S1);
|
||||
Handle(Geom2dAdaptor_Curve) HC1 = new Geom2dAdaptor_Curve(C12d);
|
||||
Adaptor3d_CurveOnSurface Cons(HC1,HS1);
|
||||
HEdge1 = new Adaptor3d_HCurveOnSurface(Cons);
|
||||
HEdge1 = new Adaptor3d_CurveOnSurface(Cons);
|
||||
}
|
||||
else {
|
||||
C1 = new Geom_TrimmedCurve(C1, f[1], l[1]);
|
||||
C1->Transform(Loc.Transformation());
|
||||
HEdge1 = new GeomAdaptor_HCurve(C1);
|
||||
HEdge1 = new GeomAdaptor_Curve(C1);
|
||||
GeomAdaptor_Curve AC1(C1);
|
||||
if ( AC1.GetType() == GeomAbs_Circle) {
|
||||
C1Denerated = (AC1.Circle().Radius() < Precision::Confusion());
|
||||
@@ -1087,7 +1083,7 @@ void BRepOffset_Offset::Init(const TopoDS_Edge& Path,
|
||||
|
||||
Handle(Geom_Curve) C2 = BRep_Tool::Curve(Edge2,Loc,f[2],l[2]);
|
||||
|
||||
Handle(Adaptor3d_HCurve) HEdge2;
|
||||
Handle(Adaptor3d_Curve) HEdge2;
|
||||
Standard_Boolean C2is3D = Standard_True;
|
||||
if (C2.IsNull()) {
|
||||
C2is3D = Standard_False;
|
||||
@@ -1096,15 +1092,15 @@ void BRepOffset_Offset::Init(const TopoDS_Edge& Path,
|
||||
BRep_Tool::CurveOnSurface(Edge2,C12d,S1,Loc,f[2],l[2]);
|
||||
S1 = Handle(Geom_Surface)::DownCast(S1->Transformed(Loc.Transformation()));
|
||||
C12d = new Geom2d_TrimmedCurve(C12d,f[2],l[2]);
|
||||
Handle(GeomAdaptor_HSurface) HS1 = new GeomAdaptor_HSurface(S1);
|
||||
Handle(Geom2dAdaptor_HCurve) HC1 = new Geom2dAdaptor_HCurve(C12d);
|
||||
Handle(GeomAdaptor_Surface) HS1 = new GeomAdaptor_Surface(S1);
|
||||
Handle(Geom2dAdaptor_Curve) HC1 = new Geom2dAdaptor_Curve(C12d);
|
||||
Adaptor3d_CurveOnSurface Cons(HC1,HS1);
|
||||
HEdge2 = new Adaptor3d_HCurveOnSurface(Cons);
|
||||
HEdge2 = new Adaptor3d_CurveOnSurface(Cons);
|
||||
}
|
||||
else {
|
||||
C2 = new Geom_TrimmedCurve(C2, f[2], l[2]);
|
||||
C2->Transform(Loc.Transformation());
|
||||
HEdge2 = new GeomAdaptor_HCurve(C2);
|
||||
HEdge2 = new GeomAdaptor_Curve(C2);
|
||||
GeomAdaptor_Curve AC2(C2);
|
||||
if ( AC2.GetType() == GeomAbs_Circle) {
|
||||
C2Denerated = (AC2.Circle().Radius() < Precision::Confusion());
|
||||
|
@@ -24,8 +24,8 @@
|
||||
#include <BRepOffset.hxx>
|
||||
#include <Geom_OffsetSurface.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <Geom2dAdaptor_HCurve.hxx>
|
||||
#include <GeomAdaptor_HSurface.hxx>
|
||||
#include <Geom2dAdaptor_Curve.hxx>
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
#include <NCollection_Vector.hxx>
|
||||
#include <ShapeAnalysis_Edge.hxx>
|
||||
#include <TopExp.hxx>
|
||||
@@ -291,8 +291,8 @@ void BRepOffset_SimpleOffset::FillEdgeData(const TopoDS_Edge& theEdge,
|
||||
|
||||
// Create offset curve on surface.
|
||||
const Handle(Geom2d_Curve) aC2dNew = BRep_Tool::CurveOnSurface(theEdge, aCurFace, aF, aL);
|
||||
const Handle(Adaptor2d_HCurve2d) aHCurve2d = new Geom2dAdaptor_HCurve(aC2dNew, aF, aL);
|
||||
const Handle(Adaptor3d_HSurface) aHSurface = new GeomAdaptor_HSurface(myFaceInfo.Find(aCurFace).myOffsetS);
|
||||
const Handle(Adaptor2d_Curve2d) aHCurve2d = new Geom2dAdaptor_Curve(aC2dNew, aF, aL);
|
||||
const Handle(Adaptor3d_Surface) aHSurface = new GeomAdaptor_Surface(myFaceInfo.Find(aCurFace).myOffsetS);
|
||||
Adaptor3d_CurveOnSurface aCurveOnSurf(aHCurve2d, aHSurface);
|
||||
|
||||
// Extract 3d-curve (it is not null).
|
||||
|
@@ -14,6 +14,7 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <BRepOffset_Tool.hxx>
|
||||
|
||||
#include <Bnd_Box2d.hxx>
|
||||
#include <BndLib_Add3dCurve.hxx>
|
||||
@@ -28,8 +29,6 @@
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <BRepAdaptor_Curve2d.hxx>
|
||||
#include <BRepAdaptor_HCurve.hxx>
|
||||
#include <BRepAdaptor_HSurface.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <BRepAlgo_AsDes.hxx>
|
||||
#include <BRepAlgo_Image.hxx>
|
||||
@@ -43,7 +42,6 @@
|
||||
#include <BRepOffset_Analyse.hxx>
|
||||
#include <BRepOffset_Interval.hxx>
|
||||
#include <BRepOffset_ListOfInterval.hxx>
|
||||
#include <BRepOffset_Tool.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
#include <BRepTools_Modifier.hxx>
|
||||
#include <BRepTools_TrsfModification.hxx>
|
||||
@@ -424,8 +422,8 @@ static void BuildPCurves (const TopoDS_Edge& E,
|
||||
}
|
||||
} // if (typS == ...
|
||||
|
||||
Handle(BRepAdaptor_HSurface) HS = new BRepAdaptor_HSurface(AS);
|
||||
Handle(BRepAdaptor_HCurve) HC = new BRepAdaptor_HCurve(AC);
|
||||
Handle(BRepAdaptor_Surface) HS = new BRepAdaptor_Surface(AS);
|
||||
Handle(BRepAdaptor_Curve) HC = new BRepAdaptor_Curve(AC);
|
||||
|
||||
ProjLib_ProjectedCurve Proj(HS,HC,Tolerance);
|
||||
|
||||
|
Reference in New Issue
Block a user