How to know if a point is inside a closed wire?

Hi,
Is there a function in occ that checks if a point is inside a closed TopoDS_Wire ?
The point and the wire are on the same plane.

Thanks

PaddleStroke's picture

Ok found it. First we need to make a face from the wire, then

offsetDirection = 1;
if (BRep_Tool::IsClosed(sourceWires[continuousCurveOfCurvedUsed])) {
TopoDS_Face aFace = BRepBuilderAPI_MakeFace(sourceWires[continuousCurveOfCurvedUsed]);
BRepClass_FaceClassifier checkPoint(aFace, pointToCheck, Precision::Confusion());
if(checkPoint.State() == TopAbs_IN)
offsetDirection = -1;
}