X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_ShapeTools.cpp;h=d35f58bade2cd907ef1e4bdb7642665b0b996e3c;hb=52b0fdb3bbe3b4ca84519c9dd752f89a73bf6c05;hp=77aeaad15ea46a7d73a3b2580c5785babdd27aaa;hpb=77d6e03555d0d46232e09ace4178f66f8c9b40ee;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.cpp index 77aeaad15..d35f58bad 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2019 CEA/DEN, EDF R&D +// Copyright (C) 2014-2020 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -276,7 +276,6 @@ std::shared_ptr GeomAlgoAPI_ShapeTools::combineShapes( NCollection_Vector> aShapesWithCommonSubshapes; for(TopTools_IndexedDataMapOfShapeListOfShape::Iterator anIter(aMapSA); anIter.More(); anIter.Next()) { - const TopoDS_Shape& aShape = anIter.Key(); TopTools_ListOfShape& aListOfShape = anIter.ChangeValue(); if(aListOfShape.IsEmpty()) { continue; @@ -298,8 +297,8 @@ std::shared_ptr GeomAlgoAPI_ShapeTools::combineShapes( aTempIter(aTempList); aTempIter.More(); aTempIter.Next()) { const TopoDS_Shape& aTempShape = aTempIter.Value(); for(TopTools_IndexedDataMapOfShapeListOfShape::Iterator - anIter(aMapSA); anIter.More(); anIter.Next()) { - TopTools_ListOfShape& aTempListOfShape = anIter.ChangeValue(); + anIter2(aMapSA); anIter2.More(); anIter2.Next()) { + TopTools_ListOfShape& aTempListOfShape = anIter2.ChangeValue(); if(aTempListOfShape.IsEmpty()) { continue; } else if(aTempListOfShape.Size() == 1 && aTempListOfShape.First() == aTempShape) { @@ -598,7 +597,6 @@ std::list > Standard_Real aYArr[2] = {aBndBox.CornerMin().Y(), aBndBox.CornerMax().Y()}; Standard_Real aZArr[2] = {aBndBox.CornerMin().Z(), aBndBox.CornerMax().Z()}; std::list > aResultPoints; - int aNum = 0; for(int i = 0; i < 2; i++) { for(int j = 0; j < 2; j++) { for(int k = 0; k < 2; k++) { @@ -874,8 +872,7 @@ bool GeomAlgoAPI_ShapeTools::isParallel(const std::shared_ptr theE //================================================================================================== std::list > GeomAlgoAPI_ShapeTools::intersect( - const std::shared_ptr theEdge, const std::shared_ptr theFace, - const bool thePointsOutsideFace) + const std::shared_ptr theEdge, const std::shared_ptr theFace) { std::list > aResult; if(!theEdge.get() || !theFace.get()) { @@ -1057,7 +1054,7 @@ static TopoDS_Wire fixParametricGaps(const TopoDS_Wire& theWire) { TopoDS_Wire aFixedWire; Handle(Geom_Curve) aPrevCurve; - double aPrevLastParam = 0.0; + double aPrevLastParam = -Precision::Infinite(); BRep_Builder aBuilder; aBuilder.MakeWire(aFixedWire); @@ -1067,7 +1064,7 @@ static TopoDS_Wire fixParametricGaps(const TopoDS_Wire& theWire) TopoDS_Edge anEdge = aWExp.Current(); double aFirst, aLast; Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, aFirst, aLast); - if (aCurve == aPrevCurve) { + if (aCurve == aPrevCurve && Abs(aFirst - aPrevLastParam) > Precision::Confusion()) { // if parametric gap occurs, create new edge based on the copied curve aCurve = Handle(Geom_Curve)::DownCast(aCurve->Copy()); TopoDS_Vertex aV1, aV2;