From: isn Date: Wed, 30 Nov 2016 11:22:43 +0000 (+0300) Subject: LCM classification -> correct 2d to parametric 2d conversion of points X-Git-Tag: v1.6~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ef808bb1b445ecb9dec6ebc5030eaf63a00c3763;p=modules%2Fhydro.git LCM classification -> correct 2d to parametric 2d conversion of points --- diff --git a/src/HYDROData/HYDROData_LCM_FaceClassifier.cxx b/src/HYDROData/HYDROData_LCM_FaceClassifier.cxx index 9e3a8f91..b2c7a11a 100644 --- a/src/HYDROData/HYDROData_LCM_FaceClassifier.cxx +++ b/src/HYDROData/HYDROData_LCM_FaceClassifier.cxx @@ -26,7 +26,10 @@ #include #include #include - +#include +#include +#include +#include Standard_Boolean HYDROData_FaceClassifier_BndBoxTreeSelector::Accept (const Standard_Integer& theObj) { @@ -38,8 +41,14 @@ Standard_Boolean HYDROData_FaceClassifier_BndBoxTreeSelector::Accept (const Stan return Standard_False; BRepTopAdaptor_FClass2d* class2d = myMapF2Class2d.FindFromKey(f); - - TopAbs_State aState = class2d->Perform( myP, Standard_False ); + + TopLoc_Location L; + Handle(Geom_Surface) C = BRep_Tool::Surface(f, L); + Handle(Geom_Plane) Pl = Handle(Geom_Plane)::DownCast(C->Transformed(L.Transformation())); + Standard_Real u, v; + ElSLib::Parameters(Pl->Pln(), gp_Pnt(myP.X(), myP.Y(), 0.0), u, v); + + TopAbs_State aState = class2d->Perform( gp_Pnt2d(u, v), Standard_False ); if (aState == TopAbs_IN) { diff --git a/src/HYDROData/HYDROData_LandCoverMap.cxx b/src/HYDROData/HYDROData_LandCoverMap.cxx index 046e61fd..1ecf2586 100644 --- a/src/HYDROData/HYDROData_LandCoverMap.cxx +++ b/src/HYDROData/HYDROData_LandCoverMap.cxx @@ -1295,7 +1295,7 @@ void HYDROData_LandCoverMap::ClassifyPoints( const std::vector& thePoints else { std::set::const_iterator it; - std::vector C1(SStr.size()); + std::vector C1; for (it = SStr.begin(); it != SStr.end(); ++it) C1.push_back(theTable->Get( *it, DefValue )); double Val;