I am an OpenCASCADE newbie, impressed by its capabilities.
I need to find if the projection of a given point on a surface (read in an IGES file) is inside this surface wire (there is no hole). This is what I have so far:
gp_Pnt p (...);
TopoDS_Face face = ... ;
Handle_Geom_Surface surface = BRep_Tool::Surface(face);
GeomAPI_ProjectPointOnSurf projection (point, surface);
double u, v;
projection.Parameters(1, u, v); // assuming there is at least one projection
for(exp.Init(face, TopAbs_WIRE); exp.More(); exp.Next())
TopoDS_Wire wire = TopoDS::Wire(exp.Current());
// How do I check if (u,v) is inside the wire?
I tried playing with surface->Bounds(u1,u2,v1,v2) and ShapeAnalysis::GetFaceUVBounds(face,u1,u2,v1,v2) but this is not sufficient since these are BOUNDS to the parameters. I can't tell for sure with these bounds that the projection is inside the wire.
Thank you for your help,