diff --git a/LuaLibs/ProcessDrill.lua b/LuaLibs/ProcessDrill.lua index d75f236..2618a3d 100644 --- a/LuaLibs/ProcessDrill.lua +++ b/LuaLibs/ProcessDrill.lua @@ -171,7 +171,7 @@ function ProcessDrill.Classify( Proc, b3Raw) if (( vtExtr:getZ() < BD.DRILL_VZ_MIN or bFaceDown) and ( not bOpen or Proc.Flg ~= 1)) then if not bOpen then -- se da sotto e presente rinvio angolare verifico se c'è opportuna lavorazione - if BD.ANG_TRASM and ML.FindDrilling( dDiam, nil, nil, nil, nil, true) and vtExtr:getZ() < -0.999 then + if BD.ANG_TRASM and ML.FindDrilling( dDiam, nil, nil, nil, nil, true) and AreOppositeVectorApprox( vtExtr, Z_AX()) then return true, false, false else return true, true, false @@ -249,7 +249,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId) -- verifico possibilità di foratura da sotto local bDownDrill = ( BD.TURN or ( BD.DOWN_HEAD and ML.FindDrilling( dDiam, nil, false, true))) -- se presente rinvio angolare - local bDrillAngTrasm = ( BD.ANG_TRASM and vtExtr:getZ() < -0.999) + local bDrillAngTrasm = ( BD.ANG_TRASM and AreOppositeVectorApprox( vtExtr, Z_AX())) -- verifico che il foro non sia fattibile solo da sotto local bToInvert = ( vtExtr:getZ() < BD.DRILL_VZ_MIN and not bDownDrill) and not bDrillAngTrasm if bToInvert and ( not bOpen or Proc.Flg ~= 1) then