From 5c90c3a7efeeada261ab7e7e9b772d22f379b0f3 Mon Sep 17 00:00:00 2001 From: nbv Date: Wed, 17 Jan 2018 11:11:26 +0300 Subject: [PATCH] Compilation errors --- src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx | 2 +- src/BRepCheck/BRepCheck_Edge.cxx | 17 +++++++++++------ src/BRepLib/BRepLib.cxx | 4 ++-- src/BRepMesh/BRepMesh_CurveTessellator.cxx | 5 ++++- src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx | 6 ++++-- src/BRepTest/BRepTest_SurfaceCommands.cxx | 10 ++++++---- src/DBRep/DBRep_IsoBuilder.cxx | 4 ++-- src/Extrema/Extrema_ExtCC.cxx | 4 ++-- src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx | 4 ++-- src/GeomAdaptor/GeomAdaptor_Curve.cxx | 4 ++-- src/GeomAdaptor/GeomAdaptor_Surface.cxx | 4 ++-- src/IntPatch/IntPatch_ImpPrmIntersection.cxx | 4 ++-- src/IntPolyh/IntPolyh_Tools.cxx | 4 ++-- src/ShapeAnalysis/ShapeAnalysis_Edge.cxx | 4 ++-- tools/ShapeView/ShapeView_ItemShape.cxx | 4 ++-- 15 files changed, 46 insertions(+), 34 deletions(-) diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx index c17b4c3fb9..1759958432 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx @@ -285,7 +285,7 @@ class BOPAlgo_MPC : public BOPAlgo_Algo { else { const BRepAdaptor_Surface& aBAS = myContext->SurfaceAdaptor(myF); - if (aBAS.IsUPeriodic() || aBAS.IsVPeriodic()) + if (aBAS.IsUPeriodic222() || aBAS.IsVPeriodic222()) { // The curve already exists. Adjust it for periodic cases. BOPTools_AlgoTools2D::AdjustPCurveOnSurf diff --git a/src/BRepCheck/BRepCheck_Edge.cxx b/src/BRepCheck/BRepCheck_Edge.cxx index 9bc292a9e4..1e993bcce1 100644 --- a/src/BRepCheck/BRepCheck_Edge.cxx +++ b/src/BRepCheck/BRepCheck_Edge.cxx @@ -184,7 +184,7 @@ void BRepCheck_Edge::Minimum() Handle(Geom_Curve) C3d = Handle(Geom_Curve)::DownCast (myCref->Curve3D()->Transformed (/*myCref->Location()*/L.Transformation())); - Standard_Boolean IsPeriodic = C3d->IsPeriodic(); + Standard_Boolean IsPeriodic = C3d->IsPeriodic111(); Standard_Real aPeriod = RealLast(); if(IsPeriodic) { @@ -193,10 +193,12 @@ void BRepCheck_Edge::Minimum() Standard_Real f = C3d->FirstParameter(), l = C3d->LastParameter(); if (C3d->DynamicType() == STANDARD_TYPE(Geom_TrimmedCurve)) { + // E.g. see "boolean bopfuse_complex J6" test script + const Handle(Geom_Curve)& aC = Handle(Geom_TrimmedCurve)::DownCast (C3d)->BasisCurve(); f = aC->FirstParameter(); l = aC->LastParameter(); - IsPeriodic = aC->IsPeriodic(); + IsPeriodic = aC->IsPeriodic111(); if(IsPeriodic) { aPeriod = aC->Period(); @@ -224,7 +226,7 @@ void BRepCheck_Edge::Minimum() Sref = Handle(Geom_Surface)::DownCast (Sref->Transformed(myCref->Location().Transformation())); const Handle(Geom2d_Curve)& PCref = myCref->PCurve(); - Standard_Boolean IsPeriodic = PCref->IsPeriodic(); + Standard_Boolean IsPeriodic = PCref->IsPeriodic111(); Standard_Real aPeriod = RealLast(); if(IsPeriodic) { @@ -233,10 +235,11 @@ void BRepCheck_Edge::Minimum() Standard_Real f = PCref->FirstParameter(), l = PCref->LastParameter(); if (PCref->DynamicType() == STANDARD_TYPE(Geom2d_TrimmedCurve)) { + // E.g. see "boolean bopfuse_complex J6" test script const Handle(Geom2d_Curve)& aC = Handle(Geom2d_TrimmedCurve)::DownCast (PCref)->BasisCurve(); f = aC->FirstParameter(); l = aC->LastParameter(); - IsPeriodic = aC->IsPeriodic(); + IsPeriodic = aC->IsPeriodic111(); if(IsPeriodic) { aPeriod = aC->Period(); @@ -360,7 +363,7 @@ void BRepCheck_Edge::InContext(const TopoDS_Shape& S) // Modified by skv - Tue Apr 27 11:50:37 2004 End // const Handle(Geom2d_Curve)& pc = cr->PCurve(); - Standard_Boolean IsPeriodic = pc->IsPeriodic(); + Standard_Boolean IsPeriodic = pc->IsPeriodic111(); Standard_Real aPeriod = RealLast(); if(IsPeriodic) { @@ -369,10 +372,12 @@ void BRepCheck_Edge::InContext(const TopoDS_Shape& S) Standard_Real fp = pc->FirstParameter(), lp = pc->LastParameter(); if (pc->DynamicType() == STANDARD_TYPE(Geom2d_TrimmedCurve)) { + // E.g. see "boolean bopfuse_complex J6" test script + const Handle(Geom2d_Curve)& aC = Handle(Geom2d_TrimmedCurve)::DownCast (pc)->BasisCurve(); fp = aC->FirstParameter(); lp = aC->LastParameter(); - IsPeriodic = aC->IsPeriodic(); + IsPeriodic = aC->IsPeriodic111(); if(IsPeriodic) { aPeriod = aC->Period(); diff --git a/src/BRepLib/BRepLib.cxx b/src/BRepLib/BRepLib.cxx index bb4ceee26c..d3dd91e72d 100644 --- a/src/BRepLib/BRepLib.cxx +++ b/src/BRepLib/BRepLib.cxx @@ -2702,7 +2702,7 @@ void BRepLib::ExtendFace(const TopoDS_Face& theF, Standard_Real aSUMin, aSUMax, aSVMin, aSVMax; aSurf->Bounds(aSUMin, aSUMax, aSVMin, aSVMax); - Standard_Boolean isUPeriodic = aBAS.IsUPeriodic(); + Standard_Boolean isUPeriodic = aBAS.IsUPeriodic222(); Standard_Real anUPeriod = isUPeriodic ? aBAS.UPeriod() : 0.0; if (isUPeriodic) { @@ -2712,7 +2712,7 @@ void BRepLib::ExtendFace(const TopoDS_Face& theF, aFUMax = aFUMin + aDelta; } - Standard_Boolean isVPeriodic = aBAS.IsVPeriodic(); + Standard_Boolean isVPeriodic = aBAS.IsVPeriodic222(); Standard_Real aVPeriod = isVPeriodic ? aBAS.VPeriod() : 0.0; if (isVPeriodic) { diff --git a/src/BRepMesh/BRepMesh_CurveTessellator.cxx b/src/BRepMesh/BRepMesh_CurveTessellator.cxx index d7e73f0f26..8dc4e82203 100644 --- a/src/BRepMesh/BRepMesh_CurveTessellator.cxx +++ b/src/BRepMesh/BRepMesh_CurveTessellator.cxx @@ -233,11 +233,14 @@ Standard_Boolean BRepMesh_CurveTessellator::Value ( aSurface->GetType() != GeomAbs_BezierSurface && aSurface->GetType() != GeomAbs_OtherSurface) { + // For trimmed cone/cylinder. + // Return independently of the fact whether the surface trimmed. + return Standard_True; } // Let skip periodic case. - if (aSurface->IsUPeriodic() || aSurface->IsVPeriodic()) + if (aSurface->IsUPeriodic222() || aSurface->IsVPeriodic222()) { return Standard_True; } diff --git a/src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx b/src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx index a3307f36e5..c7396ae160 100644 --- a/src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx +++ b/src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx @@ -53,7 +53,8 @@ void BRepMesh_DefaultRangeSplitter::AdjustRange() { const Handle(BRepAdaptor_HSurface)& aSurface = GetSurface(); updateRange(aSurface->FirstUParameter(), aSurface->LastUParameter(), - aSurface->IsUPeriodic(), myRangeU.first, myRangeU.second); + aSurface->IsUPeriodic222() && aSurface->IsUClosed(), + myRangeU.first, myRangeU.second); if (myRangeU.second < myRangeU.first) { @@ -62,7 +63,8 @@ void BRepMesh_DefaultRangeSplitter::AdjustRange() } updateRange(aSurface->FirstVParameter(), aSurface->LastVParameter(), - aSurface->IsVPeriodic(), myRangeV.first, myRangeV.second); + aSurface->IsVPeriodic222() && aSurface->IsVClosed(), + myRangeV.first, myRangeV.second); if (myRangeV.second < myRangeV.first) { diff --git a/src/BRepTest/BRepTest_SurfaceCommands.cxx b/src/BRepTest/BRepTest_SurfaceCommands.cxx index 3c55eaa633..01c22c3359 100644 --- a/src/BRepTest/BRepTest_SurfaceCommands.cxx +++ b/src/BRepTest/BRepTest_SurfaceCommands.cxx @@ -262,11 +262,13 @@ static Standard_Integer pcurve(Draw_Interpretor& , Standard_Integer n, const cha Sprintf(name,"%s_%d",a[1],i); Standard_Real fr = c->FirstParameter(), lr = c->LastParameter(); - Standard_Boolean IsPeriodic = c->IsPeriodic(); + Standard_Boolean IsPeriodic = c->IsPeriodic111(); if (c->DynamicType() == STANDARD_TYPE(Geom2d_TrimmedCurve)) { + // E.g. see "boolean bopfuse_complex J6" test script + const Handle(Geom2d_Curve)& aC = Handle(Geom2d_TrimmedCurve)::DownCast (c)->BasisCurve(); - IsPeriodic = aC->IsPeriodic(); + IsPeriodic = aC->IsPeriodic111(); fr = aC->FirstParameter(); lr = aC->LastParameter(); } @@ -294,11 +296,11 @@ static Standard_Integer pcurve(Draw_Interpretor& , Standard_Integer n, const cha const Handle(Geom2d_Curve) c = BRep_Tool::CurveOnSurface (TopoDS::Edge(SE),TopoDS::Face(SF),f,l); Standard_Real fr = c->FirstParameter(), lr = c->LastParameter(); - Standard_Boolean IsPeriodic = c->IsPeriodic(); + Standard_Boolean IsPeriodic = c->IsPeriodic111(); if (c->DynamicType() == STANDARD_TYPE(Geom2d_TrimmedCurve)) { const Handle(Geom2d_Curve)& aC = Handle(Geom2d_TrimmedCurve)::DownCast (c)->BasisCurve(); - IsPeriodic = aC->IsPeriodic(); + IsPeriodic = aC->IsPeriodic111(); fr = aC->FirstParameter(); lr = aC->LastParameter(); } diff --git a/src/DBRep/DBRep_IsoBuilder.cxx b/src/DBRep/DBRep_IsoBuilder.cxx index 465483486d..9d2ba55c57 100644 --- a/src/DBRep/DBRep_IsoBuilder.cxx +++ b/src/DBRep/DBRep_IsoBuilder.cxx @@ -491,10 +491,10 @@ void DBRep_IsoBuilder::FillGaps(const TopoDS_Face& theFace, // Check for periodic surfaces if (bAddSegment) { - if (aBASurf.IsUPeriodic()) + if (aBASurf.IsUPeriodic222()) bAddSegment = aSegmLen < aBASurf.UPeriod() / 4.; - if (bAddSegment && aBASurf.IsVPeriodic()) + if (bAddSegment && aBASurf.IsVPeriodic222()) bAddSegment = aSegmLen < aBASurf.VPeriod() / 4.; } diff --git a/src/Extrema/Extrema_ExtCC.cxx b/src/Extrema/Extrema_ExtCC.cxx index 8bf8ca6938..b1eed4ea3d 100644 --- a/src/Extrema/Extrema_ExtCC.cxx +++ b/src/Extrema/Extrema_ExtCC.cxx @@ -793,11 +793,11 @@ void Extrema_ExtCC::PrepareResults(const Extrema_ECC& AlgExt, U2 = P2.Parameter(); // Check points to be into param space. - if (Extrema_CurveTool::IsPeriodic(*((Adaptor3d_Curve*) myC[0]))) + if (Extrema_CurveTool::IsPeriodic444(*((Adaptor3d_Curve*) myC[0]))) { U = ElCLib::InPeriod(U, Ut11, Ut11 + Extrema_CurveTool::Period(*((Adaptor3d_Curve*) myC[0]))); } - if (Extrema_CurveTool::IsPeriodic(*((Adaptor3d_Curve*) myC[1]))) + if (Extrema_CurveTool::IsPeriodic444(*((Adaptor3d_Curve*) myC[1]))) { U2 = ElCLib::InPeriod(U2, Ut21, Ut21 + Extrema_CurveTool::Period(*((Adaptor3d_Curve*) myC[1]))); } diff --git a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx index 0f17427cf2..0d302c77fa 100644 --- a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx +++ b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx @@ -569,7 +569,7 @@ void Geom2dAdaptor_Curve::RebuildCache(const Standard_Real theParameter) const Standard_Integer aDeg = aBezier->Degree(); TColStd_Array1OfReal aFlatKnots(BSplCLib::FlatBezierKnots(aDeg), 1, 2 * (aDeg + 1)); if (myCurveCache.IsNull()) - myCurveCache = new BSplCLib_Cache (aDeg, aBezier->IsPeriodic(), aFlatKnots, + myCurveCache = new BSplCLib_Cache (aDeg, aBezier->IsPeriodic111(), aFlatKnots, aBezier->Poles(), aBezier->Weights()); myCurveCache->BuildCache (theParameter, aFlatKnots, aBezier->Poles(), aBezier->Weights()); } @@ -577,7 +577,7 @@ void Geom2dAdaptor_Curve::RebuildCache(const Standard_Real theParameter) const { // Create cache for B-spline if (myCurveCache.IsNull()) - myCurveCache = new BSplCLib_Cache (myBSplineCurve->Degree(), myBSplineCurve->IsPeriodic(), + myCurveCache = new BSplCLib_Cache (myBSplineCurve->Degree(), myBSplineCurve->IsPeriodic111(), myBSplineCurve->KnotSequence(), myBSplineCurve->Poles(), myBSplineCurve->Weights()); myCurveCache->BuildCache (theParameter, myBSplineCurve->KnotSequence(), myBSplineCurve->Poles(), myBSplineCurve->Weights()); diff --git a/src/GeomAdaptor/GeomAdaptor_Curve.cxx b/src/GeomAdaptor/GeomAdaptor_Curve.cxx index 9c46602ef4..382d00a947 100644 --- a/src/GeomAdaptor/GeomAdaptor_Curve.cxx +++ b/src/GeomAdaptor/GeomAdaptor_Curve.cxx @@ -301,7 +301,7 @@ Standard_Integer GeomAdaptor_Curve::NbIntervals(const GeomAbs_Shape S) const myBSplineCurve->IsPeriodic111(), 1,Nb,Index2,newLast); // Protection against myFirst = UFirst - eps, which located as ULast - eps - if (myBSplineCurve->IsPeriodic() && (newLast - newFirst) < Precision::PConfusion()) + if (myBSplineCurve->IsPeriodic111() && (newLast - newFirst) < Precision::PConfusion()) { if (Abs(newLast - myBSplineCurve->FirstParameter()) < Precision::PConfusion()) newLast += myBSplineCurve->Period(); @@ -433,7 +433,7 @@ void GeomAdaptor_Curve::Intervals(TColStd_Array1OfReal& T, FirstParam = newFirst; LastParam = newLast; // Protection against myFirst = UFirst - eps, which located as ULast - eps - if (myBSplineCurve->IsPeriodic() && (LastParam - FirstParam) < Precision::PConfusion()) + if (myBSplineCurve->IsPeriodic111() && (LastParam - FirstParam) < Precision::PConfusion()) { if (Abs(LastParam - myBSplineCurve->FirstParameter()) < Precision::PConfusion()) LastParam += myBSplineCurve->Period(); diff --git a/src/GeomAdaptor/GeomAdaptor_Surface.cxx b/src/GeomAdaptor/GeomAdaptor_Surface.cxx index 139f6579b9..f15fae3b84 100644 --- a/src/GeomAdaptor/GeomAdaptor_Surface.cxx +++ b/src/GeomAdaptor/GeomAdaptor_Surface.cxx @@ -673,8 +673,8 @@ void GeomAdaptor_Surface::RebuildCache(const Standard_Real theU, TColStd_Array1OfReal aFlatKnotsV(BSplCLib::FlatBezierKnots(aDegV), 1, 2 * (aDegV + 1)); if (mySurfaceCache.IsNull()) mySurfaceCache = new BSplSLib_Cache( - aDegU, aBezier->IsUPeriodic(), aFlatKnotsU, - aDegV, aBezier->IsVPeriodic(), aFlatKnotsV, aBezier->Weights()); + aDegU, aBezier->IsUPeriodic111(), aFlatKnotsU, + aDegV, aBezier->IsVPeriodic111(), aFlatKnotsV, aBezier->Weights()); mySurfaceCache->BuildCache (theU, theV, aFlatKnotsU, aFlatKnotsV, aBezier->Poles(), aBezier->Weights()); } diff --git a/src/IntPatch/IntPatch_ImpPrmIntersection.cxx b/src/IntPatch/IntPatch_ImpPrmIntersection.cxx index 7af863fed1..2528d31de0 100644 --- a/src/IntPatch/IntPatch_ImpPrmIntersection.cxx +++ b/src/IntPatch/IntPatch_ImpPrmIntersection.cxx @@ -2477,8 +2477,8 @@ static void DetectOfBoundaryAchievement(const Handle(Adaptor3d_HSurface)& theQSu Handle(IntSurf_LineOn2S)& theNewLine, Standard_Boolean& theIsOnBoundary) { - const Standard_Real aUPeriod = theQSurf->IsUPeriodic() ? theQSurf->UPeriod() : 0.0, - aVPeriod = theQSurf->IsVPeriodic() ? theQSurf->VPeriod() : 0.0; + const Standard_Real aUPeriod = theQSurf->IsUPeriodic222() ? theQSurf->UPeriod() : 0.0, + aVPeriod = theQSurf->IsVPeriodic222() ? theQSurf->VPeriod() : 0.0; const Standard_Real aUf = theQSurf->FirstUParameter(), aUl = theQSurf->LastUParameter(), aVf = theQSurf->FirstVParameter(), diff --git a/src/IntPolyh/IntPolyh_Tools.cxx b/src/IntPolyh/IntPolyh_Tools.cxx index 00d342fc1d..a519ff5a96 100644 --- a/src/IntPolyh/IntPolyh_Tools.cxx +++ b/src/IntPolyh/IntPolyh_Tools.cxx @@ -35,7 +35,7 @@ void IntPolyh_Tools::IsEnlargePossible(const Handle(Adaptor3d_HSurface)& theSurf theSurf->GetType() == GeomAbs_BezierSurface) { // Check U periodicity and closeness - if (!theSurf->IsUClosed() && !theSurf->IsUPeriodic()) + if (!theSurf->IsUClosed() && !theSurf->IsUPeriodic222()) { // Check that surface is not infinite in U direction if (!Precision::IsInfinite(theSurf->FirstUParameter()) && @@ -46,7 +46,7 @@ void IntPolyh_Tools::IsEnlargePossible(const Handle(Adaptor3d_HSurface)& theSurf } // Check V periodicity and closeness - if (!theSurf->IsVClosed() && !theSurf->IsVPeriodic()) + if (!theSurf->IsVClosed() && !theSurf->IsVPeriodic222()) { // Check that surface is not infinite in V direction if (!Precision::IsInfinite(theSurf->FirstVParameter()) && diff --git a/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx b/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx index f1bc7821c4..fe5b22e8e6 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx @@ -1041,7 +1041,7 @@ Standard_Boolean ShapeAnalysis_Edge::CheckPCurveRange (const Standard_Real theFi { const Standard_Real eps = Precision::PConfusion(); Standard_Boolean isValid = Standard_True; - Standard_Boolean IsPeriodic = thePC->IsPeriodic(); + Standard_Boolean IsPeriodic = thePC->IsPeriodic111(); Standard_Real aPeriod = RealLast(); if(IsPeriodic) { @@ -1053,7 +1053,7 @@ Standard_Boolean ShapeAnalysis_Edge::CheckPCurveRange (const Standard_Real theFi const Handle(Geom2d_Curve)& aC = Handle(Geom2d_TrimmedCurve)::DownCast (thePC)->BasisCurve(); fp = aC->FirstParameter(); lp = aC->LastParameter(); - IsPeriodic = aC->IsPeriodic(); + IsPeriodic = aC->IsPeriodic111(); if(IsPeriodic) { aPeriod = aC->Period(); diff --git a/tools/ShapeView/ShapeView_ItemShape.cxx b/tools/ShapeView/ShapeView_ItemShape.cxx index 952534ba4a..27077caf76 100644 --- a/tools/ShapeView/ShapeView_ItemShape.cxx +++ b/tools/ShapeView/ShapeView_ItemShape.cxx @@ -143,13 +143,13 @@ void ToOtherInfo (const TopoDS_Shape& theShape, QVariant& theValue, QVariant& th aValues.append (ToString (aCurve->IsClosed())); anInfo.append ("IsClosed"); - if (aCurve->IsPeriodic()) { + if (aCurve->IsPeriodic111()) { aValues.append (QString::number (aCurve->Period())); anInfo.append ("IsPeriodic"); } else { - aValues.append (ToString (aCurve->IsPeriodic())); + aValues.append (ToString (aCurve->IsPeriodic111())); anInfo.append ("IsPeriodic"); } theValue = aValues.join (" / "); -- 2.39.5