diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 2375a6a..7fb1ee7 100644 Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ diff --git a/Milling.cpp b/Milling.cpp index deba898..b04a8e4 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -4231,7 +4231,13 @@ Milling::AddSawBladeSideRetract( const Point3d& ptP, const Vector3d& vtRetr, con if ( ! m_bTiltingTab && vtRetr.z < LIM_DOWN_APPRZ) { Vector3d vtMove = Vector3d( vtTool.x, vtTool.y, 0) ; if ( vtMove.Normalize()) { - Point3d ptP4b = ptP4 + vtMove * ( dEndElev + dSafeZ) ; + double dSawEndElev ; + if ( ! m_bAboveHead || + ! GetAhPointUnderRaw( ptP4, vtTool, m_TParams.m_dTDiam / 2, + GetRadiusForStartEndElevation( false), + m_TParams.m_dLen, true, dSafeZ, vtMove, dSawEndElev)) + dSawEndElev = dEndElev ; + Point3d ptP4b = ptP4 + vtMove * ( dSawEndElev + dSafeZ) ; if ( AddRapidMove( ptP4b) == GDB_ID_NULL) return false ; }