#include <BRepTopAdaptor_FClass2d.hxx>
#include <TopoDS.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
-
+#include <Geom_Plane.hxx>
+#include <BRep_Tool.hxx>
+#include <Geom_Surface.hxx>
+#include <ElSLib.hxx>
Standard_Boolean HYDROData_FaceClassifier_BndBoxTreeSelector::Accept (const Standard_Integer& theObj)
{
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)
{
else
{
std::set<QString>::const_iterator it;
- std::vector<double> C1(SStr.size());
+ std::vector<double> C1;
for (it = SStr.begin(); it != SStr.end(); ++it)
C1.push_back(theTable->Get( *it, DefValue ));
double Val;