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,17 +14,16 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <LocOpe.hxx>
|
||||
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepAdaptor_Curve2d.hxx>
|
||||
#include <BRepAdaptor_HCurve2d.hxx>
|
||||
#include <BRepAdaptor_HSurface.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom2dInt_GInter.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <LocOpe.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
@@ -142,13 +141,13 @@ Standard_Boolean LocOpe::TgtFaces(const TopoDS_Edge& E,
|
||||
|
||||
TopoDS_Edge e = E;
|
||||
|
||||
Handle(BRepAdaptor_HSurface) HS1 = new BRepAdaptor_HSurface(F1);
|
||||
Handle(BRepAdaptor_HSurface) HS2 = new BRepAdaptor_HSurface(F2);
|
||||
Handle(BRepAdaptor_Surface) HS1 = new BRepAdaptor_Surface(F1);
|
||||
Handle(BRepAdaptor_Surface) HS2 = new BRepAdaptor_Surface(F2);
|
||||
e.Orientation(TopAbs_FORWARD);
|
||||
Handle(BRepAdaptor_HCurve2d) HC2d = new BRepAdaptor_HCurve2d();
|
||||
Handle(BRepAdaptor_HCurve2d) HC2d2 = new BRepAdaptor_HCurve2d();
|
||||
HC2d->ChangeCurve2d().Initialize(e,F1);
|
||||
HC2d2->ChangeCurve2d().Initialize(e,F2);
|
||||
Handle(BRepAdaptor_Curve2d) HC2d = new BRepAdaptor_Curve2d();
|
||||
Handle(BRepAdaptor_Curve2d) HC2d2 = new BRepAdaptor_Curve2d();
|
||||
HC2d->Initialize(e,F1);
|
||||
HC2d2->Initialize(e,F2);
|
||||
|
||||
|
||||
// Adaptor3d_CurveOnSurface C1(HC2d,HS1);
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
#include <Geom_Circle.hxx>
|
||||
#include <GeomAdaptor_HCurve.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <IntCurvesFace_Intersector.hxx>
|
||||
#include <LocOpe_CSIntersector.hxx>
|
||||
#include <LocOpe_PntFace.hxx>
|
||||
@@ -127,7 +127,7 @@ void LocOpe_CSIntersector::Perform(const LocOpe_SequenceOfCirc& Scir)
|
||||
(LocOpe_SequenceOfPntFace *) new LocOpe_SequenceOfPntFace[myNbelem];
|
||||
|
||||
TopExp_Explorer exp(myShape,TopAbs_FACE);
|
||||
Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve ();
|
||||
Handle(GeomAdaptor_Curve) HC = new GeomAdaptor_Curve ();
|
||||
Standard_Real binf = 0.;
|
||||
Standard_Real bsup = 2.*M_PI;
|
||||
|
||||
@@ -137,7 +137,7 @@ void LocOpe_CSIntersector::Perform(const LocOpe_SequenceOfCirc& Scir)
|
||||
IntCurvesFace_Intersector theInt(theface,0.);
|
||||
for (Standard_Integer i = 1; i<=myNbelem; i++) {
|
||||
|
||||
HC->ChangeCurve().Load(new Geom_Circle(Scir(i)));
|
||||
HC->Load(new Geom_Circle(Scir(i)));
|
||||
theInt.Perform(HC,binf,bsup);
|
||||
if (theInt.IsDone()) {
|
||||
AddPoints(theInt,(((LocOpe_SequenceOfPntFace*)myPoints)[i-1]),theface);
|
||||
@@ -169,7 +169,7 @@ void LocOpe_CSIntersector::Perform(const TColGeom_SequenceOfCurve& Scur)
|
||||
(LocOpe_SequenceOfPntFace *) new LocOpe_SequenceOfPntFace[myNbelem];
|
||||
|
||||
TopExp_Explorer exp(myShape,TopAbs_FACE);
|
||||
Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve ();
|
||||
Handle(GeomAdaptor_Curve) HC = new GeomAdaptor_Curve ();
|
||||
for (; exp.More(); exp.Next()) {
|
||||
const TopoDS_Face& theface = TopoDS::Face(exp.Current());
|
||||
IntCurvesFace_Intersector theInt(theface,0.);
|
||||
@@ -177,7 +177,7 @@ void LocOpe_CSIntersector::Perform(const TColGeom_SequenceOfCurve& Scur)
|
||||
if (Scur(i).IsNull()) {
|
||||
continue;
|
||||
}
|
||||
HC->ChangeCurve().Load(Scur(i));
|
||||
HC->Load(Scur(i));
|
||||
Standard_Real binf = HC->FirstParameter();
|
||||
Standard_Real bsup = HC->LastParameter();
|
||||
theInt.Perform(HC,binf,bsup);
|
||||
|
@@ -14,9 +14,9 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <LocOpe_FindEdgesInFace.hxx>
|
||||
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepAdaptor_HSurface.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <BRepTopAdaptor_TopolTool.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <LocOpe_FindEdgesInFace.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
#include <Standard_NoMoreObject.hxx>
|
||||
@@ -77,7 +76,7 @@ void LocOpe_FindEdgesInFace::Set(const TopoDS_Shape& Sh,
|
||||
return; // pour le moment
|
||||
}
|
||||
|
||||
Handle(BRepAdaptor_HSurface) HS = new BRepAdaptor_HSurface(myFace);
|
||||
Handle(BRepAdaptor_Surface) HS = new BRepAdaptor_Surface(myFace);
|
||||
BRepTopAdaptor_TopolTool TPT(HS);
|
||||
|
||||
for (exp.Init(myShape,TopAbs_EDGE); exp.More(); exp.Next()) {
|
||||
|
@@ -14,6 +14,7 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <LocOpe_SplitDrafts.hxx>
|
||||
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
@@ -29,8 +30,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 <GeomFill_Pipe.hxx>
|
||||
#include <GeomInt_IntSS.hxx>
|
||||
@@ -46,7 +45,6 @@
|
||||
#include <IntCurveSurface_IntersectionSegment.hxx>
|
||||
#include <LocOpe_BuildShape.hxx>
|
||||
#include <LocOpe_FindEdges.hxx>
|
||||
#include <LocOpe_SplitDrafts.hxx>
|
||||
#include <LocOpe_Spliter.hxx>
|
||||
#include <LocOpe_SplitShape.hxx>
|
||||
#include <LocOpe_WiresOnShape.hxx>
|
||||
@@ -189,10 +187,8 @@ void LocOpe_SplitDrafts::Perform(const TopoDS_Face& F,
|
||||
GeomInt_IntSS i2s(NewSg,NewSd,Precision::Confusion());
|
||||
|
||||
TopTools_MapOfShape theMap;
|
||||
Handle(GeomAdaptor_HCurve) HAC = new GeomAdaptor_HCurve;
|
||||
GeomAdaptor_Curve AC;
|
||||
Handle(GeomAdaptor_HSurface) HAS = new GeomAdaptor_HSurface;
|
||||
GeomAdaptor_Surface AS;
|
||||
Handle(GeomAdaptor_Curve) HAC = new GeomAdaptor_Curve;
|
||||
Handle(GeomAdaptor_Surface) HAS = new GeomAdaptor_Surface;
|
||||
IntCurveSurface_HInter intcs;
|
||||
|
||||
TopoDS_Wire theW = W;
|
||||
@@ -207,8 +203,7 @@ void LocOpe_SplitDrafts::Perform(const TopoDS_Face& F,
|
||||
throw Standard_ConstructionError("GeomFill_Pipe : Cannot make a surface");
|
||||
|
||||
Handle(Geom_Surface) Spl = thePipe.Surface();
|
||||
AS.Load(Spl);
|
||||
HAS->Set(AS);
|
||||
HAS->Load(Spl);
|
||||
|
||||
LocOpe_SplitShape splw(W);
|
||||
|
||||
@@ -218,8 +213,7 @@ void LocOpe_SplitDrafts::Perform(const TopoDS_Face& F,
|
||||
TopLoc_Location Loc;
|
||||
Standard_Real f,l;
|
||||
Handle(Geom_Curve) C = BRep_Tool::Curve(edg,f,l);
|
||||
AC.Load(C);
|
||||
HAC->Set(AC);
|
||||
HAC->Load(C);
|
||||
intcs.Perform(HAC,HAS);
|
||||
if (!intcs.IsDone()) {
|
||||
continue; // voir ce qu`on peut faire de mieux
|
||||
@@ -629,8 +623,7 @@ void LocOpe_SplitDrafts::Perform(const TopoDS_Face& F,
|
||||
|
||||
// Determination des vertex par intersection sur Plg ou/et Pld
|
||||
|
||||
AC.Load(Newc);
|
||||
HAC->Set(AC);
|
||||
HAC->Load(Newc);
|
||||
Standard_Integer nbfois = 2;
|
||||
TopoDS_Vertex vtx1,vtx2;
|
||||
Standard_Real p1=0,p2=0;
|
||||
@@ -643,11 +636,11 @@ void LocOpe_SplitDrafts::Perform(const TopoDS_Face& F,
|
||||
for (itl.Initialize(theMapEF(indedgf)); itl.More(); itl.Next()) {
|
||||
if (Contains(myMap(F),itl.Value())) {
|
||||
if (Contains(theLeft,itl.Value())) {
|
||||
AS.Load(NewSg);
|
||||
HAS->Load(NewSg);
|
||||
IsLeft = Standard_True;
|
||||
}
|
||||
else {
|
||||
AS.Load(NewSd);
|
||||
HAS->Load(NewSd);
|
||||
IsLeft = Standard_False;
|
||||
}
|
||||
|
||||
@@ -664,14 +657,13 @@ void LocOpe_SplitDrafts::Perform(const TopoDS_Face& F,
|
||||
|
||||
}
|
||||
else {
|
||||
AS.Load(NewSg);
|
||||
HAS->Load(NewSg);
|
||||
}
|
||||
|
||||
for (Standard_Integer it = 1; it<=nbfois; it++) {
|
||||
if (it == 2) {
|
||||
AS.Load(NewSd);
|
||||
HAS->Load(NewSd);
|
||||
}
|
||||
HAS->Set(AS);
|
||||
|
||||
intcs.Perform(HAC,HAS);
|
||||
if (!intcs.IsDone()) {
|
||||
|
Reference in New Issue
Block a user