X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FQANewBRepNaming%2FQANewBRepNaming_ImportShape.cxx;h=9be4ee70efd106f58b1ed024eeb55ab38327fe60;hp=90320723ec4bc65ff57b19e98d6288d2f64a602f;hb=c2f5c7481548d5ed122fc8bb4d57c30b7191b348;hpb=7fd59977dfb3a75f75670474b59dfc0f3f5f90ba diff --git a/src/QANewBRepNaming/QANewBRepNaming_ImportShape.cxx b/src/QANewBRepNaming/QANewBRepNaming_ImportShape.cxx index 90320723ec..9be4ee70ef 100755 --- a/src/QANewBRepNaming/QANewBRepNaming_ImportShape.cxx +++ b/src/QANewBRepNaming/QANewBRepNaming_ImportShape.cxx @@ -1,8 +1,23 @@ -// File: QANewBRepNaming_ImportShape.cxx -// Created: Tue Oct 5 14:31:29 1999 -// Author: Vladislav ROMASHKO -// -// Copyright: Open CASCADE 2003 +// Created on: 1999-10-05 +// Created by: Vladislav ROMASHKO +// Copyright (c) 1999-1999 Matra Datavision +// Copyright (c) 1999-2012 OPEN CASCADE SAS +// +// The content of this file is subject to the Open CASCADE Technology Public +// License Version 6.5 (the "License"). You may not use the content of this file +// except in compliance with the License. Please obtain a copy of the License +// at http://www.opencascade.org and read it completely before using this file. +// +// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its +// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. +// +// The Original Code and all software distributed under the License is +// distributed on an "AS IS" basis, without warranty of any kind, and the +// Initial Developer hereby disclaims all such warranties, including without +// limitation, any warranties of merchantability, fitness for a particular +// purpose or non-infringement. Please see the License for the specific terms +// and conditions governing the rights and limitations under the License. + #include @@ -230,6 +245,8 @@ void QANewBRepNaming_ImportShape::LoadC0Edges(const TopoDS_Shape& S, Standard_Boolean aC0 = Standard_False; TopoDS_Shape anEdge1 = anEx.Current(); if (edgeNaborFaces.IsBound(anEdge1)) { + TopTools_ListOfShape aEdgesToRemove; // record items to be removed from the map (should be done after iteration) + aEdgesToRemove.Append (anEdge1); const TopTools_ListOfShape& aList1 = edgeNaborFaces.Find(anEdge1); TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itr(edgeNaborFaces); for (; itr.More(); itr.Next()) { @@ -246,11 +263,13 @@ void QANewBRepNaming_ImportShape::LoadC0Edges(const TopoDS_Shape& S, aC0=Standard_True; TNaming_Builder bC0Edge(Tagger->NewChild()); bC0Edge.Generated(anEdge2); - edgeNaborFaces.UnBind(anEdge2); + aEdgesToRemove.Append (anEdge2); } } } - edgeNaborFaces.UnBind(anEdge1); + // remove items from the data map + for(TopTools_ListIteratorOfListOfShape anIt(aEdgesToRemove); anIt.More(); anIt.Next()) + edgeNaborFaces.UnBind(anIt.Value()); } if (aC0) { TNaming_Builder bC0Edge(Tagger->NewChild());