#include "HYDROData_LCM_FaceClassifier.h"
#include <HYDROData_LandCoverMap.h>
+#include <HYDROData_Tool.h>
+
#include <Bnd_Box2d.hxx>
#include <BRepTools.hxx>
#include <BRepBndLib.hxx>
#include <BRep_Tool.hxx>
#include <Geom_Surface.hxx>
#include <ElSLib.hxx>
+#include <Message_ProgressSentry.hxx>
+
Standard_Boolean HYDROData_FaceClassifier_BndBoxTreeSelector::Accept (const Standard_Integer& theObj)
{
aTreeFiller.Fill();
size_t pntsize = thePoints.size();
- theTypes.resize(pntsize);
- if (theFaces)
+ theTypes.reserve(pntsize);
+ if (theFaces) {
theFaces->resize(pntsize);
+ }
+
+ Message_ProgressSentry aPSentry (HYDROData_Tool::GetSIProgress(), "Classify", 0, pntsize - 1, 1);
Standard_Integer aSel = 0;
- for (size_t i = 0; i < pntsize; i++ )
+ for (size_t i = 0; i < pntsize && aPSentry.More(); i++, aPSentry.Next())
{
+ std::set<QString> aSet;
+
HYDROData_FaceClassifier_BndBoxTreeSelector aSelector(aMapF2Class2d);
const gp_Pnt2d& pnt2d = thePoints[i];
aSelector.SetCurrentPoint(pnt2d);
{
const TopoDS_Face& f = it.Value();
QString aST = aMapF2ST.FindFromKey(f);
- theTypes[i].insert(aST);
+ aSet.insert(aST);
if (theFaces)
(*theFaces)[i].Add(f);
}
}
+
+ theTypes.push_back(aSet);
}
for (size_t i = 0; i < fclass2dpointers.size(); i++)
delete fclass2dpointers[i];
-
}