- TNaming_Iterator It (theFrom);
- for ( ;It.More() ; It.Next()) {
- const TopoDS_Shape& OS = It.OldShape();
- const TopoDS_Shape& NS = It.NewShape();
- TNaming_Evolution Status = It.Evolution();
+ // TNaming_Iterator iterates in reversed way than it was put in Builder, so, keep it in container
+ // and iterate from end to begin
+ NCollection_List<TopoDS_Shape> aOlds;
+ NCollection_List<TopoDS_Shape> aNews;
+ NCollection_List<TNaming_Evolution> aStatuses;
+
+ TNaming_Iterator anIt (theFrom);
+ for ( ;anIt.More() ; anIt.Next()) {
+ aOlds.Prepend(anIt.OldShape());
+ aNews.Prepend(anIt.NewShape());
+ aStatuses.Prepend(anIt.Evolution());
+ }