-// 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
NCollection_Vector<NCollection_Map<TopoDS_Shape>> 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;
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) {
Standard_Real aYArr[2] = {aBndBox.CornerMin().Y(), aBndBox.CornerMax().Y()};
Standard_Real aZArr[2] = {aBndBox.CornerMin().Z(), aBndBox.CornerMax().Z()};
std::list<std::shared_ptr<GeomAPI_Pnt> > 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++) {
//==================================================================================================
std::list<std::shared_ptr<GeomAPI_Vertex> > GeomAlgoAPI_ShapeTools::intersect(
- const std::shared_ptr<GeomAPI_Edge> theEdge, const std::shared_ptr<GeomAPI_Face> theFace,
- const bool thePointsOutsideFace)
+ const std::shared_ptr<GeomAPI_Edge> theEdge, const std::shared_ptr<GeomAPI_Face> theFace)
{
std::list<std::shared_ptr<GeomAPI_Vertex> > aResult;
if(!theEdge.get() || !theFace.get()) {
{
TopoDS_Wire aFixedWire;
Handle(Geom_Curve) aPrevCurve;
- double aPrevLastParam = 0.0;
+ double aPrevLastParam = -Precision::Infinite();
BRep_Builder aBuilder;
aBuilder.MakeWire(aFixedWire);
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;