DataBeam :

- modificato angolo limite da sotto per tagli con FAST
- piccola sistemazione logica in Cut
- correzioni fori testa-lato molto inclinati.
This commit is contained in:
DarioS
2022-03-26 14:15:09 +01:00
parent 3defd5663f
commit 3fd2034df4
3 changed files with 14 additions and 10 deletions
+12 -8
View File
@@ -1,9 +1,10 @@
-- ProcessDrill.lua by Egaltech s.r.l. 2021/10/29
-- ProcessDrill.lua by Egaltech s.r.l. 2022/03/26
-- Gestione calcolo forature per Travi
-- 2021/04/14 DS Corretta gestione Invert con testa da sotto. Migliorato calcolo ingombro portautensile.
-- 2021/05/03 DS Su macchina con testa da sotto aggiunta possibilità di fare fori verticali metà sopra e l'altra sotto.
-- 2021/09/19 DS Si premia il più possibile ricerca punta con adeguato affondamento.
-- 2021/10/29 DS MaxElev anche su fori con svuotatura.
-- 2022/03/26 DS Correzioni per fori testa-fianco nel piano.
-- Tabella per definizione modulo
local ProcessDrill = {}
@@ -190,8 +191,10 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
EgtOutLog( sErr)
return false, sErr
end
-- se il foro è cieco all'inizio, lo inverto
if Proc.Fcs == 0 then bToInvert = true end
-- se il foro è cieco o troppo inclinato all'inizio, lo inverto
if Proc.Fcs == 0 or ( abs( vtExtr:getX()) > BD.DRILL_VX_MAX and Proc.Fcs ~= 5 and Proc.Fcs ~= 6) then
bToInvert = true
end
if bToInvert then vtExtr = - vtExtr end
-- se foro è splittato ed è la parte opposta, inverto
if Proc.Flg == -2 then bToInvert = true end
@@ -322,11 +325,12 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
EgtOutLog( sErr)
return false, sErr
end
-- verifico il massimo affondamento
local dSubL1 = 0
local dSubL2 = 0
local dSubL3 = 0
local dDeltaRad = ( Proc.Diam - dToolDiam) / 2
-- se foro non su testa o coda e inclinato, limito il massimo affondamento
-- se foro non su testa o coda e inclinato
local bInMid = false
local bInvertFcse = ( bToInvert and Proc.Flg ~= -2)
if ( not bInvertFcse and Proc.Fcs ~= 5 and Proc.Fcs ~= 6) or ( bInvertFcse and Proc.Fce ~= 5 and Proc.Fce ~= 6) then
@@ -339,9 +343,9 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
dMaxDepth = 0
end
end
-- se foro davanti o dietro e inclinato, limito il massimo affondamento
-- se foro davanti o dietro e inclinato
if dMaxDepth > 0 and abs( vtExtr:getY()) > abs( vtExtr:getZ()) then
local CosB = abs( vtExtr:getZ())
local CosB = abs( vtExtr:getY())
if bInMid then
CosB = sqrt( vtExtr:getZ() * vtExtr:getZ() + vtExtr:getX() * vtExtr:getX())
end
@@ -352,9 +356,9 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
dMaxDepth = 0
end
end
-- se foro sopra o sotto e inclinato, limito il massimo affondamento
-- se foro sopra o sotto e inclinato
if dMaxDepth > 0 and abs( vtExtr:getZ()) > abs( vtExtr:getY()) then
local CosB = abs( vtExtr:getY())
local CosB = abs( vtExtr:getZ())
if bInMid then
CosB = sqrt( vtExtr:getY() * vtExtr:getY() + vtExtr:getX() * vtExtr:getX())
end