1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +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

@@ -11,14 +11,13 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <IntTools_BeanFaceIntersector.hxx>
#include <Bnd_Box.hxx>
#include <BndLib_Add3dCurve.hxx>
#include <BndLib_AddSurface.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_HCurve.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <ElCLib.hxx>
#include <ElSLib.hxx>
@@ -40,7 +39,6 @@
#include <IntCurveSurface_IntersectionPoint.hxx>
#include <IntCurveSurface_IntersectionSegment.hxx>
#include <IntTools.hxx>
#include <IntTools_BeanFaceIntersector.hxx>
#include <IntTools_Context.hxx>
#include <IntTools_CurveRangeLocalizeData.hxx>
#include <IntTools_CurveRangeSample.hxx>
@@ -582,8 +580,8 @@ void IntTools_BeanFaceIntersector::ComputeAroundExactIntersection()
{
IntCurveSurface_HInter anExactIntersector;
Handle(BRepAdaptor_HCurve) aCurve = new BRepAdaptor_HCurve(myCurve);
Handle(BRepAdaptor_HSurface) aSurface = new BRepAdaptor_HSurface(mySurface);
Handle(BRepAdaptor_Curve) aCurve = new BRepAdaptor_Curve(myCurve);
Handle(BRepAdaptor_Surface) aSurface = new BRepAdaptor_Surface(mySurface);
anExactIntersector.Perform(aCurve, aSurface);
@@ -1768,7 +1766,7 @@ Standard_Boolean IntTools_BeanFaceIntersector::ComputeLocalized() {
Bnd_Box EBox;
BndLib_Add3dCurve::Add(myCurve.Trim(myFirstParameter, myLastParameter, Precision::PConfusion())->Curve(), myBeanTolerance, EBox);
BndLib_Add3dCurve::Add (*myCurve.Trim(myFirstParameter, myLastParameter, Precision::PConfusion()), myBeanTolerance, EBox);
if(EBox.IsOut(FBox)) {
for(Standard_Integer i = 1; i <= myRangeManager.Length(); i++) {

View File

@@ -13,6 +13,7 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <IntTools_EdgeFace.hxx>
#include <Bnd_Box.hxx>
#include <BndLib_AddSurface.hxx>
@@ -24,8 +25,6 @@
#include <Geom_Curve.hxx>
#include <Geom_Surface.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GeomAPI_ProjectPointOnSurf.hxx>
#include <gp_Ax1.hxx>
@@ -43,7 +42,6 @@
#include <IntTools_CArray1OfInteger.hxx>
#include <IntTools_CommonPrt.hxx>
#include <IntTools_Context.hxx>
#include <IntTools_EdgeFace.hxx>
#include <IntTools_FClass2d.hxx>
#include <IntTools_Range.hxx>
#include <IntTools_Root.hxx>
@@ -418,8 +416,8 @@ Standard_Boolean IntTools_EdgeFace::CheckTouch
// modified by NIZHNY-MKK Thu Jul 21 11:35:32 2005.BEGIN
IntCurveSurface_HInter anExactIntersector;
Handle(GeomAdaptor_HCurve) aCurve = new GeomAdaptor_HCurve(TheCurve);
Handle(GeomAdaptor_HSurface) aSurface = new GeomAdaptor_HSurface(TheSurface);
Handle(GeomAdaptor_Curve) aCurve = new GeomAdaptor_Curve(TheCurve);
Handle(GeomAdaptor_Surface) aSurface = new GeomAdaptor_Surface(TheSurface);
anExactIntersector.Perform(aCurve, aSurface);

View File

@@ -18,7 +18,7 @@
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Curve2d.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepClass_FaceClassifier.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <CSLib_Class2d.hxx>
@@ -113,8 +113,8 @@ void IntTools_FClass2d::Init(const TopoDS_Face& aFace,
Toluv=TolUV;
Face=aFace;
Face.Orientation(TopAbs_FORWARD);
Handle(BRepAdaptor_HSurface) surf = new BRepAdaptor_HSurface();
surf->ChangeSurface().Initialize(aFace, Standard_False);
Handle(BRepAdaptor_Surface) surf = new BRepAdaptor_Surface();
surf->Initialize(aFace, Standard_False);
//
Tole = 0.;
Tol=0.;
@@ -583,8 +583,8 @@ TopAbs_State IntTools_FClass2d::Perform
Standard_Real vv = v;
TopAbs_State aStatus = TopAbs_UNKNOWN;
Handle(BRepAdaptor_HSurface) surf = new BRepAdaptor_HSurface();
surf->ChangeSurface().Initialize( Face, Standard_False );
Handle(BRepAdaptor_Surface) surf = new BRepAdaptor_Surface();
surf->Initialize( Face, Standard_False );
const Standard_Boolean IsUPer = surf->IsUPeriodic();
const Standard_Boolean IsVPer = surf->IsVPeriodic();
@@ -727,8 +727,8 @@ TopAbs_State IntTools_FClass2d::TestOnRestriction
Standard_Real v=_Puv.Y();
Standard_Real uu = u, vv = v;
Handle(BRepAdaptor_HSurface) surf = new BRepAdaptor_HSurface();
surf->ChangeSurface().Initialize( Face, Standard_False );
Handle(BRepAdaptor_Surface) surf = new BRepAdaptor_Surface();
surf->Initialize( Face, Standard_False );
const Standard_Boolean IsUPer = surf->IsUPeriodic();
const Standard_Boolean IsVPer = surf->IsVPeriodic();
const Standard_Real uperiod = IsUPer ? surf->UPeriod() : 0.0;

View File

@@ -22,10 +22,11 @@
#include <ElSLib.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dInt_GInter.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <GeomAPI_ProjectPointOnSurf.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GeomInt_IntSS.hxx>
#include <GeomInt_WLApprox.hxx>
#include <GeomLib_Check2dBSplineCurve.hxx>
@@ -56,8 +57,8 @@
#include <gp_Elips.hxx>
static
void Parameters(const Handle(GeomAdaptor_HSurface)&,
const Handle(GeomAdaptor_HSurface)&,
void Parameters(const Handle(GeomAdaptor_Surface)&,
const Handle(GeomAdaptor_Surface)&,
const gp_Pnt&,
Standard_Real&,
Standard_Real&,
@@ -90,8 +91,8 @@ static
Standard_Boolean ApproxWithPCurves(const gp_Cylinder& theCyl,
const gp_Sphere& theSph);
static void PerformPlanes(const Handle(GeomAdaptor_HSurface)& theS1,
const Handle(GeomAdaptor_HSurface)& theS2,
static void PerformPlanes(const Handle(GeomAdaptor_Surface)& theS1,
const Handle(GeomAdaptor_Surface)& theS2,
const Standard_Real TolF1,
const Standard_Real TolF2,
const Standard_Real TolAng,
@@ -101,22 +102,22 @@ static void PerformPlanes(const Handle(GeomAdaptor_HSurface)& theS1,
IntTools_SequenceOfCurves& theSeqOfCurve,
Standard_Boolean& theTangentFaces);
static Standard_Boolean ClassifyLin2d(const Handle(GeomAdaptor_HSurface)& theS,
static Standard_Boolean ClassifyLin2d(const Handle(GeomAdaptor_Surface)& theS,
const gp_Lin2d& theLin2d,
const Standard_Real theTol,
Standard_Real& theP1,
Standard_Real& theP2);
//
static
void ApproxParameters(const Handle(GeomAdaptor_HSurface)& aHS1,
const Handle(GeomAdaptor_HSurface)& aHS2,
void ApproxParameters(const Handle(GeomAdaptor_Surface)& aHS1,
const Handle(GeomAdaptor_Surface)& aHS2,
Standard_Integer& iDegMin,
Standard_Integer& iNbIter,
Standard_Integer& iDegMax);
static
void Tolerances(const Handle(GeomAdaptor_HSurface)& aHS1,
const Handle(GeomAdaptor_HSurface)& aHS2,
void Tolerances(const Handle(GeomAdaptor_Surface)& aHS1,
const Handle(GeomAdaptor_Surface)& aHS2,
Standard_Real& aTolTang);
static
@@ -165,8 +166,8 @@ IntTools_FaceFace::IntTools_FaceFace()
myIsDone=Standard_False;
myTangentFaces=Standard_False;
//
myHS1 = new GeomAdaptor_HSurface ();
myHS2 = new GeomAdaptor_HSurface ();
myHS1 = new GeomAdaptor_Surface ();
myHS2 = new GeomAdaptor_Surface ();
myTolF1 = 0.;
myTolF2 = 0.;
myTol = 0.;
@@ -425,10 +426,10 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
Standard_Real umin, umax, vmin, vmax;
//
myContext->UVBounds(myFace1, umin, umax, vmin, vmax);
myHS1->ChangeSurface().Load(S1, umin, umax, vmin, vmax);
myHS1->Load(S1, umin, umax, vmin, vmax);
//
myContext->UVBounds(myFace2, umin, umax, vmin, vmax);
myHS2->ChangeSurface().Load(S2, umin, umax, vmin, vmax);
myHS2->Load(S2, umin, umax, vmin, vmax);
//
Standard_Real TolAng = 1.e-8;
//
@@ -462,11 +463,11 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
// F1
myContext->UVBounds(myFace1, umin, umax, vmin, vmax);
CorrectPlaneBoundaries(umin, umax, vmin, vmax);
myHS1->ChangeSurface().Load(S1, umin, umax, vmin, vmax);
myHS1->Load(S1, umin, umax, vmin, vmax);
// F2
myContext->UVBounds(myFace2, umin, umax, vmin, vmax);
CorrectSurfaceBoundaries(myFace2, myTol * 2., umin, umax, vmin, vmax);
myHS2->ChangeSurface().Load(S2, umin, umax, vmin, vmax);
myHS2->Load(S2, umin, umax, vmin, vmax);
}
else if ((aType2==GeomAbs_Plane) && isFace1Quad)
{
@@ -474,21 +475,21 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
//F1
myContext->UVBounds(myFace1, umin, umax, vmin, vmax);
CorrectSurfaceBoundaries(myFace1, myTol * 2., umin, umax, vmin, vmax);
myHS1->ChangeSurface().Load(S1, umin, umax, vmin, vmax);
myHS1->Load(S1, umin, umax, vmin, vmax);
// F2
myContext->UVBounds(myFace2, umin, umax, vmin, vmax);
CorrectPlaneBoundaries(umin, umax, vmin, vmax);
myHS2->ChangeSurface().Load(S2, umin, umax, vmin, vmax);
myHS2->Load(S2, umin, umax, vmin, vmax);
}
else
{
Standard_Real umin, umax, vmin, vmax;
myContext->UVBounds(myFace1, umin, umax, vmin, vmax);
CorrectSurfaceBoundaries(myFace1, myTol * 2., umin, umax, vmin, vmax);
myHS1->ChangeSurface().Load(S1, umin, umax, vmin, vmax);
myHS1->Load(S1, umin, umax, vmin, vmax);
myContext->UVBounds(myFace2, umin, umax, vmin, vmax);
CorrectSurfaceBoundaries(myFace2, myTol * 2., umin, umax, vmin, vmax);
myHS2->ChangeSurface().Load(S2, umin, umax, vmin, vmax);
myHS2->Load(S2, umin, umax, vmin, vmax);
}
const Handle(IntTools_TopolTool) dom1 = new IntTools_TopolTool(myHS1);
@@ -633,8 +634,8 @@ void IntTools_FaceFace::ComputeTolReached3d()
// Minimal tangential tolerance for the curve
Standard_Real aTolFMax = Max(myTolF1, myTolF2);
//
const Handle(Geom_Surface)& aS1 = myHS1->ChangeSurface().Surface();
const Handle(Geom_Surface)& aS2 = myHS2->ChangeSurface().Surface();
const Handle(Geom_Surface)& aS1 = myHS1->Surface();
const Handle(Geom_Surface)& aS2 = myHS2->Surface();
//
for (i = 1; i <= aNbLin; ++i)
{
@@ -819,7 +820,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
if(myApprox1) {
Handle (Geom2d_Curve) C2d;
GeomInt_IntSS::BuildPCurves(fprm, lprm, Tolpc,
myHS1->ChangeSurface().Surface(), newc, C2d);
myHS1->Surface(), newc, C2d);
if (C2d.IsNull())
continue;
@@ -830,7 +831,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
if(myApprox2) {
Handle (Geom2d_Curve) C2d;
GeomInt_IntSS::BuildPCurves(fprm, lprm, Tolpc,
myHS2->ChangeSurface().Surface(), newc, C2d);
myHS2->Surface(), newc, C2d);
if (C2d.IsNull())
continue;
@@ -987,14 +988,14 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
if(myApprox1) {
Handle (Geom2d_Curve) C2d;
GeomInt_IntSS::BuildPCurves(fprm, lprm, Tolpc,
myHS1->ChangeSurface().Surface(), newc, C2d);
myHS1->Surface(), newc, C2d);
aCurve.SetFirstCurve2d(C2d);
}
if(myApprox2) {
Handle (Geom2d_Curve) C2d;
GeomInt_IntSS::BuildPCurves(fprm,lprm,Tolpc,
myHS2->ChangeSurface().Surface(),newc,C2d);
myHS2->Surface(),newc,C2d);
aCurve.SetSecondCurve2d(C2d);
}
}
@@ -1018,14 +1019,14 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
if(myApprox1) {
Handle (Geom2d_Curve) C2d;
GeomInt_IntSS::BuildPCurves(fprm,lprm,Tolpc,
myHS1->ChangeSurface().Surface(),newc,C2d);
myHS1->Surface(),newc,C2d);
aCurve.SetFirstCurve2d(C2d);
}
if(myApprox2) {
Handle (Geom2d_Curve) C2d;
GeomInt_IntSS::BuildPCurves(fprm,lprm,Tolpc,
myHS2->ChangeSurface().Surface(),newc,C2d);
myHS2->Surface(),newc,C2d);
aCurve.SetSecondCurve2d(C2d);
}
//
@@ -1056,14 +1057,14 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
if(myApprox1) {
Handle (Geom2d_Curve) C2d;
GeomInt_IntSS::BuildPCurves(fprm, lprm, Tolpc,
myHS1->ChangeSurface().Surface(), newc, C2d);
myHS1->Surface(), newc, C2d);
aCurve.SetFirstCurve2d(C2d);
}
if(myApprox2) {
Handle (Geom2d_Curve) C2d;
GeomInt_IntSS::BuildPCurves(fprm, lprm, Tolpc,
myHS2->ChangeSurface().Surface(), newc, C2d);
myHS2->Surface(), newc, C2d);
aCurve.SetSecondCurve2d(C2d);
}
}// end of if (typl == IntPatch_Circle || typl == IntPatch_Ellipse)
@@ -1142,17 +1143,17 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
tol2d = myTolApprox;
GeomAbs_SurfaceType typs1, typs2;
typs1 = myHS1->Surface().GetType();
typs2 = myHS2->Surface().GetType();
typs1 = myHS1->GetType();
typs2 = myHS2->GetType();
Standard_Boolean anWithPC = Standard_True;
if(typs1 == GeomAbs_Cylinder && typs2 == GeomAbs_Sphere) {
anWithPC =
ApproxWithPCurves(myHS1->Surface().Cylinder(), myHS2->Surface().Sphere());
ApproxWithPCurves(myHS1->Cylinder(), myHS2->Sphere());
}
else if (typs1 == GeomAbs_Sphere && typs2 == GeomAbs_Cylinder) {
anWithPC =
ApproxWithPCurves(myHS2->Surface().Cylinder(), myHS1->Surface().Sphere());
ApproxWithPCurves(myHS2->Cylinder(), myHS1->Sphere());
}
//
if(!anWithPC) {
@@ -1297,7 +1298,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
TColgp_Array1OfPnt tpoles(1,nbpoles);
mbspc.Curve(1,tpoles2d);
const gp_Pln& Pln = myHS1->Surface().Plane();
const gp_Pln& Pln = myHS1->Plane();
//
Standard_Integer ik;
for(ik = 1; ik<= nbpoles; ik++) {
@@ -1376,7 +1377,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
TColgp_Array1OfPnt2d tpoles2d(1,nbpoles);
TColgp_Array1OfPnt tpoles(1,nbpoles);
mbspc.Curve((myApprox1==Standard_True)? 2 : 1,tpoles2d);
const gp_Pln& Pln = myHS2->Surface().Plane();
const gp_Pln& Pln = myHS2->Plane();
//
Standard_Integer ik;
for(ik = 1; ik<= nbpoles; ik++) {
@@ -1522,7 +1523,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
Handle(Geom2d_Curve) C2d;
Standard_Real aTol = myTolApprox;
GeomInt_IntSS::BuildPCurves(fprm, lprm, aTol,
myHS1->ChangeSurface().Surface(), BS, C2d);
myHS1->Surface(), BS, C2d);
BS1 = Handle(Geom2d_BSplineCurve)::DownCast(C2d);
aCurve.SetFirstCurve2d(BS1);
}
@@ -1553,7 +1554,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
Handle(Geom2d_Curve) C2d;
Standard_Real aTol = myTolApprox;
GeomInt_IntSS::BuildPCurves(fprm, lprm, aTol,
myHS2->ChangeSurface().Surface(), BS, C2d);
myHS2->Surface(), BS, C2d);
BS2 = Handle(Geom2d_BSplineCurve)::DownCast(C2d);
aCurve.SetSecondCurve2d(BS2);
}
@@ -1682,8 +1683,8 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
//function : Parameters
//purpose :
//=======================================================================
void Parameters(const Handle(GeomAdaptor_HSurface)& HS1,
const Handle(GeomAdaptor_HSurface)& HS2,
void Parameters(const Handle(GeomAdaptor_Surface)& HS1,
const Handle(GeomAdaptor_Surface)& HS2,
const gp_Pnt& Ptref,
Standard_Real& U1,
Standard_Real& V1,
@@ -1692,44 +1693,44 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
{
IntSurf_Quadric quad1,quad2;
GeomAbs_SurfaceType typs = HS1->Surface().GetType();
GeomAbs_SurfaceType typs = HS1->GetType();
switch (typs) {
case GeomAbs_Plane:
quad1.SetValue(HS1->Surface().Plane());
quad1.SetValue(HS1->Plane());
break;
case GeomAbs_Cylinder:
quad1.SetValue(HS1->Surface().Cylinder());
quad1.SetValue(HS1->Cylinder());
break;
case GeomAbs_Cone:
quad1.SetValue(HS1->Surface().Cone());
quad1.SetValue(HS1->Cone());
break;
case GeomAbs_Sphere:
quad1.SetValue(HS1->Surface().Sphere());
quad1.SetValue(HS1->Sphere());
break;
case GeomAbs_Torus:
quad1.SetValue(HS1->Surface().Torus());
quad1.SetValue(HS1->Torus());
break;
default:
throw Standard_ConstructionError("GeomInt_IntSS::MakeCurve");
}
typs = HS2->Surface().GetType();
typs = HS2->GetType();
switch (typs) {
case GeomAbs_Plane:
quad2.SetValue(HS2->Surface().Plane());
quad2.SetValue(HS2->Plane());
break;
case GeomAbs_Cylinder:
quad2.SetValue(HS2->Surface().Cylinder());
quad2.SetValue(HS2->Cylinder());
break;
case GeomAbs_Cone:
quad2.SetValue(HS2->Surface().Cone());
quad2.SetValue(HS2->Cone());
break;
case GeomAbs_Sphere:
quad2.SetValue(HS2->Surface().Sphere());
quad2.SetValue(HS2->Sphere());
break;
case GeomAbs_Torus:
quad2.SetValue(HS2->Surface().Torus());
quad2.SetValue(HS2->Torus());
break;
default:
throw Standard_ConstructionError("GeomInt_IntSS::MakeCurve");
@@ -2178,8 +2179,8 @@ Standard_Boolean ApproxWithPCurves(const gp_Cylinder& theCyl,
//function : PerformPlanes
//purpose :
//=======================================================================
void PerformPlanes(const Handle(GeomAdaptor_HSurface)& theS1,
const Handle(GeomAdaptor_HSurface)& theS2,
void PerformPlanes(const Handle(GeomAdaptor_Surface)& theS1,
const Handle(GeomAdaptor_Surface)& theS2,
const Standard_Real TolF1,
const Standard_Real TolF2,
const Standard_Real TolAng,
@@ -2190,8 +2191,8 @@ void PerformPlanes(const Handle(GeomAdaptor_HSurface)& theS1,
Standard_Boolean& theTangentFaces)
{
gp_Pln aPln1 = theS1->Surface().Plane();
gp_Pln aPln2 = theS2->Surface().Plane();
gp_Pln aPln1 = theS1->Plane();
gp_Pln aPln2 = theS2->Plane();
IntAna_QuadQuadGeo aPlnInter(aPln1, aPln2, TolAng, TolTang);
@@ -2309,7 +2310,7 @@ static inline Standard_Boolean COINC(const Standard_Real d1,
{
return (d1 <= tol && d1 >= -tol) && (d2 <= tol && d2 >= -tol);
}
Standard_Boolean ClassifyLin2d(const Handle(GeomAdaptor_HSurface)& theS,
Standard_Boolean ClassifyLin2d(const Handle(GeomAdaptor_Surface)& theS,
const gp_Lin2d& theLin2d,
const Standard_Real theTol,
Standard_Real& theP1,
@@ -2320,10 +2321,10 @@ Standard_Boolean ClassifyLin2d(const Handle(GeomAdaptor_HSurface)& theS,
Standard_Real par[2];
Standard_Integer nbi = 0;
xmin = theS->Surface().FirstUParameter();
xmax = theS->Surface().LastUParameter();
ymin = theS->Surface().FirstVParameter();
ymax = theS->Surface().LastVParameter();
xmin = theS->FirstUParameter();
xmax = theS->LastUParameter();
ymin = theS->FirstVParameter();
ymax = theS->LastVParameter();
theLin2d.Coefficients(A, B, C);
@@ -2444,8 +2445,8 @@ Standard_Boolean ClassifyLin2d(const Handle(GeomAdaptor_HSurface)& theS,
//function : ApproxParameters
//purpose :
//=======================================================================
void ApproxParameters(const Handle(GeomAdaptor_HSurface)& aHS1,
const Handle(GeomAdaptor_HSurface)& aHS2,
void ApproxParameters(const Handle(GeomAdaptor_Surface)& aHS1,
const Handle(GeomAdaptor_Surface)& aHS2,
Standard_Integer& iDegMin,
Standard_Integer& iDegMax,
Standard_Integer& iNbIter)
@@ -2458,8 +2459,8 @@ void ApproxParameters(const Handle(GeomAdaptor_HSurface)& aHS1,
iDegMin=4;
iDegMax=8;
//
aTS1=aHS1->Surface().GetType();
aTS2=aHS2->Surface().GetType();
aTS1=aHS1->GetType();
aTS2=aHS2->GetType();
//
// Cylinder/Torus
if ((aTS1==GeomAbs_Cylinder && aTS2==GeomAbs_Torus) ||
@@ -2470,8 +2471,8 @@ void ApproxParameters(const Handle(GeomAdaptor_HSurface)& aHS1,
//
aPC=Precision::Confusion();
//
aCylinder=(aTS1==GeomAbs_Cylinder)? aHS1->Surface().Cylinder() : aHS2->Surface().Cylinder();
aTorus=(aTS1==GeomAbs_Torus)? aHS1->Surface().Torus() : aHS2->Surface().Torus();
aCylinder=(aTS1==GeomAbs_Cylinder)? aHS1->Cylinder() : aHS2->Cylinder();
aTorus=(aTS1==GeomAbs_Torus)? aHS1->Torus() : aHS2->Torus();
//
aRC=aCylinder.Radius();
aRT=aTorus.MinorRadius();
@@ -2492,14 +2493,14 @@ void ApproxParameters(const Handle(GeomAdaptor_HSurface)& aHS1,
//function : Tolerances
//purpose :
//=======================================================================
void Tolerances(const Handle(GeomAdaptor_HSurface)& aHS1,
const Handle(GeomAdaptor_HSurface)& aHS2,
void Tolerances(const Handle(GeomAdaptor_Surface)& aHS1,
const Handle(GeomAdaptor_Surface)& aHS2,
Standard_Real& aTolTang)
{
GeomAbs_SurfaceType aTS1, aTS2;
//
aTS1=aHS1->Surface().GetType();
aTS2=aHS2->Surface().GetType();
aTS1=aHS1->GetType();
aTS2=aHS2->GetType();
//
// Cylinder/Torus
if ((aTS1==GeomAbs_Cylinder && aTS2==GeomAbs_Torus) ||
@@ -2510,8 +2511,8 @@ void Tolerances(const Handle(GeomAdaptor_HSurface)& aHS1,
//
aPC=Precision::Confusion();
//
aCylinder=(aTS1==GeomAbs_Cylinder)? aHS1->Surface().Cylinder() : aHS2->Surface().Cylinder();
aTorus=(aTS1==GeomAbs_Torus)? aHS1->Surface().Torus() : aHS2->Surface().Torus();
aCylinder=(aTS1==GeomAbs_Cylinder)? aHS1->Cylinder() : aHS2->Cylinder();
aTorus=(aTS1==GeomAbs_Torus)? aHS1->Torus() : aHS2->Torus();
//
aRC=aCylinder.Radius();
aRT=aTorus.MinorRadius();

View File

@@ -16,25 +16,16 @@
#ifndef _IntTools_FaceFace_HeaderFile
#define _IntTools_FaceFace_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <IntPatch_Intersection.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GeomInt_LineConstructor.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
#include <IntTools_SequenceOfCurves.hxx>
#include <TopoDS_Face.hxx>
#include <IntTools_SequenceOfPntOn2Faces.hxx>
#include <IntPatch_Intersection.hxx>
#include <IntSurf_ListOfPntOn2S.hxx>
class GeomAdaptor_HSurface;
class IntTools_Context;
class StdFail_NotDone;
class TopoDS_Face;
class Adaptor3d_TopolTool;
#include <IntTools_SequenceOfCurves.hxx>
#include <IntTools_SequenceOfPntOn2Faces.hxx>
#include <TopoDS_Face.hxx>
class IntTools_Context;
class Adaptor3d_TopolTool;
//! This class provides the intersection of
//! face's underlying surfaces.
@@ -125,8 +116,8 @@ protected:
Standard_Boolean myIsDone;
IntPatch_Intersection myIntersector;
GeomInt_LineConstructor myLConstruct;
Handle(GeomAdaptor_HSurface) myHS1;
Handle(GeomAdaptor_HSurface) myHS2;
Handle(GeomAdaptor_Surface) myHS1;
Handle(GeomAdaptor_Surface) myHS2;
Standard_Integer myNbrestr;
Standard_Boolean myApprox;
Standard_Boolean myApprox1;

View File

@@ -12,7 +12,7 @@
// commercial license or contractual agreement.
#include <Adaptor3d_HSurface.hxx>
#include <Adaptor3d_Surface.hxx>
#include <ElSLib.hxx>
#include <Geom_BezierSurface.hxx>
#include <Geom_BSplineSurface.hxx>
@@ -50,7 +50,7 @@ IntTools_TopolTool::IntTools_TopolTool()
// function: Constructor
// purpose:
// =====================================================================================
IntTools_TopolTool::IntTools_TopolTool(const Handle(Adaptor3d_HSurface)& theSurface)
IntTools_TopolTool::IntTools_TopolTool(const Handle(Adaptor3d_Surface)& theSurface)
{
Initialize(theSurface);
myNbSmplU = 0;
@@ -72,7 +72,7 @@ void IntTools_TopolTool::Initialize()
// function: Initialize
// purpose:
// =====================================================================================
void IntTools_TopolTool::Initialize(const Handle(Adaptor3d_HSurface)& theSurface)
void IntTools_TopolTool::Initialize(const Handle(Adaptor3d_Surface)& theSurface)
{
Adaptor3d_TopolTool::Initialize(theSurface);
//myS = theSurface;

View File

@@ -16,14 +16,9 @@
#ifndef _IntTools_TopolTool_HeaderFile
#define _IntTools_TopolTool_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
#include <Adaptor3d_TopolTool.hxx>
class Standard_DomainError;
class Adaptor3d_HSurface;
#include <Adaptor3d_Surface.hxx>
class gp_Pnt2d;
class gp_Pnt;
@@ -45,7 +40,7 @@ public:
//! Initializes me by surface
Standard_EXPORT IntTools_TopolTool(const Handle(Adaptor3d_HSurface)& theSurface);
Standard_EXPORT IntTools_TopolTool(const Handle(Adaptor3d_Surface)& theSurface);
//! Redefined empty initializer
@@ -56,7 +51,7 @@ public:
//! Initializes me by surface
Standard_EXPORT virtual void Initialize (const Handle(Adaptor3d_HSurface)& theSurface) Standard_OVERRIDE;
Standard_EXPORT virtual void Initialize (const Handle(Adaptor3d_Surface)& theSurface) Standard_OVERRIDE;
Standard_EXPORT virtual void ComputeSamplePoints() Standard_OVERRIDE;

View File

@@ -21,7 +21,6 @@
#include <Geom2d_TrimmedCurve.hxx>
#include <GeomAPI_ProjectPointOnSurf.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GeomInt.hxx>
#include <GeomInt_LineConstructor.hxx>
@@ -234,8 +233,8 @@ Standard_Boolean IntTools_WLineTool::NotUseSurfacesForApprox(const TopoDS_Face&
//purpose : static subfunction in ComputeTangentZones
//=======================================================================
static
Standard_Boolean CheckTangentZonesExist(const Handle(GeomAdaptor_HSurface)& theSurface1,
const Handle(GeomAdaptor_HSurface)& theSurface2)
Standard_Boolean CheckTangentZonesExist(const Handle(GeomAdaptor_Surface)& theSurface1,
const Handle(GeomAdaptor_Surface)& theSurface2)
{
if ( ( theSurface1->GetType() != GeomAbs_Torus ) ||
( theSurface2->GetType() != GeomAbs_Torus ) )
@@ -264,8 +263,8 @@ Standard_Boolean CheckTangentZonesExist(const Handle(GeomAdaptor_HSurface)& theS
//purpose : static subfunction in DecompositionOfWLine
//=======================================================================
static
Standard_Integer ComputeTangentZones( const Handle(GeomAdaptor_HSurface)& theSurface1,
const Handle(GeomAdaptor_HSurface)& theSurface2,
Standard_Integer ComputeTangentZones( const Handle(GeomAdaptor_Surface)& theSurface1,
const Handle(GeomAdaptor_Surface)& theSurface2,
const TopoDS_Face& theFace1,
const TopoDS_Face& theFace2,
Handle(TColgp_HArray1OfPnt2d)& theResultOnS1,
@@ -466,7 +465,7 @@ static
Standard_Boolean IsInsideTanZone(const gp_Pnt2d& thePoint,
const gp_Pnt2d& theTanZoneCenter,
const Standard_Real theZoneRadius,
Handle(GeomAdaptor_HSurface) theGASurface)
Handle(GeomAdaptor_Surface) theGASurface)
{
Standard_Real aUResolution = theGASurface->UResolution( theZoneRadius );
Standard_Real aVResolution = theGASurface->VResolution( theZoneRadius );
@@ -485,7 +484,7 @@ Standard_Boolean IsInsideTanZone(const gp_Pnt2d& thePoint,
static
gp_Pnt2d AdjustByNeighbour(const gp_Pnt2d& theaNeighbourPoint,
const gp_Pnt2d& theOriginalPoint,
Handle(GeomAdaptor_HSurface) theGASurface)
Handle(GeomAdaptor_Surface) theGASurface)
{
gp_Pnt2d ap1 = theaNeighbourPoint;
gp_Pnt2d ap2 = theOriginalPoint;
@@ -666,7 +665,7 @@ Standard_Boolean FindPoint(const gp_Pnt2d& theFirstPoint,
const Standard_Real theVmax,
const gp_Pnt2d& theTanZoneCenter,
const Standard_Real theZoneRadius,
Handle(GeomAdaptor_HSurface) theGASurface,
Handle(GeomAdaptor_Surface) theGASurface,
gp_Pnt2d& theNewPoint) {
theNewPoint = theLastPoint;
@@ -724,8 +723,8 @@ Standard_Boolean FindPoint(const gp_Pnt2d& theFirstPoint,
//=======================================================================
Standard_Boolean IntTools_WLineTool::
DecompositionOfWLine(const Handle(IntPatch_WLine)& theWLine,
const Handle(GeomAdaptor_HSurface)& theSurface1,
const Handle(GeomAdaptor_HSurface)& theSurface2,
const Handle(GeomAdaptor_Surface)& theSurface1,
const Handle(GeomAdaptor_Surface)& theSurface2,
const TopoDS_Face& theFace1,
const TopoDS_Face& theFace2,
const GeomInt_LineConstructor& theLConstructor,
@@ -786,8 +785,8 @@ Standard_Boolean IntTools_WLineTool::
//
// Surface
for(i = 0; i < 2; ++i) {
Handle(GeomAdaptor_HSurface) aGASurface = (!i) ? theSurface1 : theSurface2;
aGASurface->ChangeSurface().Surface()->Bounds(umin, umax, vmin, vmax);
Handle(GeomAdaptor_Surface) aGASurface = (!i) ? theSurface1 : theSurface2;
aGASurface->Surface()->Bounds(umin, umax, vmin, vmax);
if(!i) {
aPoint.ParametersOnS1(U, V);
}
@@ -919,9 +918,9 @@ Standard_Boolean IntTools_WLineTool::
//
for(Standard_Integer surfit = 0; surfit < 2; surfit++) {
Handle(GeomAdaptor_HSurface) aGASurface = (surfit == 0) ? theSurface1 : theSurface2;
Handle(GeomAdaptor_Surface) aGASurface = (surfit == 0) ? theSurface1 : theSurface2;
Standard_Real umin=0., umax=0., vmin=0., vmax=0.;
aGASurface->ChangeSurface().Surface()->Bounds(umin, umax, vmin, vmax);
aGASurface->Surface()->Bounds(umin, umax, vmin, vmax);
Standard_Real U=0., V=0.;
if(surfit == 0)
@@ -1210,9 +1209,9 @@ Standard_Boolean IntTools_WLineTool::
Standard_Real aCriteria = theTol;
GeomAPI_ProjectPointOnSurf& aProjector =
(surfit == 0) ? aContext->ProjPS(theFace2) : aContext->ProjPS(theFace1);
Handle(GeomAdaptor_HSurface) aSurface = (surfit == 0) ? theSurface1 : theSurface2;
Handle(GeomAdaptor_Surface) aSurface = (surfit == 0) ? theSurface1 : theSurface2;
Handle(GeomAdaptor_HSurface) aSurfaceOther = (surfit == 0) ? theSurface2 : theSurface1;
Handle(GeomAdaptor_Surface) aSurfaceOther = (surfit == 0) ? theSurface2 : theSurface1;
gp_Pnt aP3d = aSurface->Value(anewpoint.X(), anewpoint.Y());
aProjector.Perform(aP3d);
@@ -1462,4 +1461,4 @@ Standard_Boolean IntTools_WLineTool::
return Standard_True;
}
///////////////////// end of DecompositionOfWLine ///////////////////////
///////////////////// end of DecompositionOfWLine ///////////////////////

View File

@@ -14,12 +14,11 @@
#ifndef _IntTools_WLineTool_HeaderFile
#define _IntTools_WLineTool_HeaderFile
#include <Standard_Boolean.hxx>
#include <Standard_Macro.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <IntPatch_WLine.hxx>
#include <IntPatch_SequenceOfLine.hxx>
class TopoDS_Face;
class GeomAdaptor_HSurface;
class GeomInt_LineConstructor;
class IntTools_Context;
class Adaptor3d_TopolTool;
@@ -40,8 +39,8 @@ public:
Standard_EXPORT static
Standard_Boolean DecompositionOfWLine(const Handle(IntPatch_WLine)& theWLine,
const Handle(GeomAdaptor_HSurface)& theSurface1,
const Handle(GeomAdaptor_HSurface)& theSurface2,
const Handle(GeomAdaptor_Surface)& theSurface1,
const Handle(GeomAdaptor_Surface)& theSurface2,
const TopoDS_Face& theFace1,
const TopoDS_Face& theFace2,
const GeomInt_LineConstructor& theLConstructor,