From 2b4655f4da8da7141ed366143ac691b23f230a0c Mon Sep 17 00:00:00 2001 From: Daniel Wood Date: Thu, 30 Apr 2020 12:52:11 +0100 Subject: [PATCH] use the tool resolution to determin face position --- src/Mod/Path/PathSimulator/App/VolSim.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Mod/Path/PathSimulator/App/VolSim.cpp b/src/Mod/Path/PathSimulator/App/VolSim.cpp index 732be19a67..4c6bd6ec82 100644 --- a/src/Mod/Path/PathSimulator/App/VolSim.cpp +++ b/src/Mod/Path/PathSimulator/App/VolSim.cpp @@ -789,16 +789,15 @@ float cSimTool::GetToolProfileAt(float pos) // pos is -1..1 location along the return it->heightPos; } -bool cSimTool::isInside(const TopoDS_Shape& toolShape, Base::Vector3d pnt) +bool cSimTool::isInside(const TopoDS_Shape& toolShape, Base::Vector3d pnt, float res) { - double tolerance = 0.011; bool checkFace = true; TopAbs_State stateIn = TopAbs_IN; try { BRepClass3d_SolidClassifier solidClassifier(toolShape); gp_Pnt vertex = gp_Pnt(pnt.x, pnt.y, pnt.z); - solidClassifier.Perform(vertex, tolerance); + solidClassifier.Perform(vertex, res); bool inside = (solidClassifier.State() == stateIn); if (checkFace && solidClassifier.IsOnAFace()){ inside = true;