PaddleStroke Sat, 03/12/2022 - 17:35 Forums: Modeling Data and AlgorithmsHi, 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 Sat, 03/12/2022 - 18:21 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; } Log in to post comments
Sat, 03/12/2022 - 18:21
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;
}