Mantis issue 0021291: [CEA 480] Bad performance of glue function in 6.3.0.

This commit is contained in:
jfa 2011-06-09 07:56:06 +00:00
parent 79b6e210bf
commit f6e7825814
2 changed files with 30 additions and 7 deletions

View File

@ -19,7 +19,6 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_Gluer2.cxx // File: GEOMAlgo_Gluer2.cxx
// Author: Peter KURNEV // Author: Peter KURNEV

View File

@ -22,8 +22,7 @@
// File: GEOMAlgo_Gluer2_3.cxx // File: GEOMAlgo_Gluer2_3.cxx
// Created: // Created:
// Author: Peter KURNEV // Author: Peter KURNEV
// <peter@PREFEX>
//
#include <GEOMAlgo_Gluer2.hxx> #include <GEOMAlgo_Gluer2.hxx>
#include <TopAbs_ShapeEnum.hxx> #include <TopAbs_ShapeEnum.hxx>
@ -332,9 +331,11 @@ void MapShapes1(const TopoDS_Shape& aS,
const TopAbs_ShapeEnum aType, const TopAbs_ShapeEnum aType,
TopTools_IndexedMapOfShape& aM) TopTools_IndexedMapOfShape& aM)
{ {
TopExp_Explorer aEx (aS, aType); TopExp_Explorer aExp;
while (aEx.More()) {
const TopoDS_Shape aSx=aEx.Current(); aExp.Init (aS, aType);
for ( ;aExp.More(); aExp.Next()) {
const TopoDS_Shape aSx=aExp.Current();
if (aType==TopAbs_EDGE) { if (aType==TopAbs_EDGE) {
const TopoDS_Edge& aEx=*((TopoDS_Edge*)&aSx); const TopoDS_Edge& aEx=*((TopoDS_Edge*)&aSx);
if (BRep_Tool::Degenerated(aEx)) { if (BRep_Tool::Degenerated(aEx)) {
@ -342,6 +343,29 @@ void MapShapes1(const TopoDS_Shape& aS,
} }
} }
aM.Add(aSx); aM.Add(aSx);
aEx.Next();
} }
} }
/*
//=======================================================================
//function : MapShapes1
//purpose :
//=======================================================================
void MapShapes1(const TopoDS_Shape& aS,
const TopAbs_ShapeEnum aType,
TopTools_IndexedMapOfShape& aM)
{
TopExp_Explorer aExp (aS, aType);
while (aExp.More()) {
const TopoDS_Shape aSx=aExp.Current();
if (aType==TopAbs_EDGE) {
const TopoDS_Edge& aEx=*((TopoDS_Edge*)&aSx);
if (BRep_Tool::Degenerated(aEx)) {
aExp.Next();
continue;
}
}
aM.Add(aSx);
aExp.Next();
}
}
*/