DataBeam :

- modifiche per gestire macchina Turn (BD.TURN)
- corretto riconoscimento fori di coda.
This commit is contained in:
DarioS
2022-04-22 10:13:45 +02:00
parent d6485ddc0d
commit e0e9b7b089
7 changed files with 23 additions and 18 deletions
+6 -5
View File
@@ -1,4 +1,4 @@
-- ProcessDrill.lua by Egaltech s.r.l. 2022/03/29
-- ProcessDrill.lua by Egaltech s.r.l. 2022/04/21
-- 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.
@@ -6,6 +6,7 @@
-- 2021/10/29 DS MaxElev anche su fori con svuotatura.
-- 2022/03/26 DS Correzioni per fori testa-fianco nel piano.
-- 2022/03/29 DS Corretta assegnazione fori molto inclinati fianco/coda a coda.
-- 2022/04/21 DS Corretto riconoscimento fori di coda.
-- Tabella per definizione modulo
local ProcessDrill = {}
@@ -67,8 +68,8 @@ function ProcessDrill.IsTailFeature( Proc, b3Raw)
end
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
-- se entrata principale
local nFcs = EgtGetInfo( Proc.Id, 'FCS', 'i') or 0
if ( Proc.Flg == 2 or ( Proc.Flg == 1 and vtExtr:getZ() >= BD.DRILL_VZ_MIN)) and ( nFcs == 5 or nFcs == 6 or abs( vtExtr:getX()) < BD.DRILL_VX_MAX) then
local nFcs = EgtGetInfo( Proc.Id, 'FCS', 'i') or 0
return ( ( nFcs == 5 or nFcs == 6) and vtExtr:getX() < -0.5)
-- altrimenti entrata opposta
else
@@ -148,13 +149,13 @@ function ProcessDrill.Classify( Proc, b3Raw)
return false, false, false
end
local bOpen = ( Proc.Fce ~= 0)
local bFaceDown = ( ptCen:getZ() < b3Raw:getMin():getZ() + 2 and (( not Proc.Head and not Proc.Tail) or (( BD.ROT90 or BD.DOWN_HEAD) and ( Proc.Flg == 2 or Proc.Flg == -2))))
local bFaceDown = ( ptCen:getZ() < b3Raw:getMin():getZ() + 2 and (( not Proc.Head and not Proc.Tail) or (( BD.ROT90 or BD.DOWN_HEAD or BD.TURN) and ( Proc.Flg == 2 or Proc.Flg == -2))))
-- verifico se il foro è sotto e quindi va spostato o sopra o sul fianco
if (( vtExtr:getZ() < BD.DRILL_VZ_MIN or bFaceDown) and ( not bOpen or Proc.Flg ~= 1)) then
if not bOpen then
return true, true, false
else
return true, not ( BD.ROT90 or BD.DOWN_HEAD), ( BD.ROT90 or BD.DOWN_HEAD)
return true, not ( BD.ROT90 or BD.DOWN_HEAD or BD.TURN), ( BD.ROT90 or BD.DOWN_HEAD or BD.TURN)
end
else
return true, false, false
@@ -392,7 +393,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
end
-- imposto posizione braccio porta testa
local nSCC = MCH_SCC.NONE
if not BD.C_SIMM then
if not BD.C_SIMM and not BD.TURN then
nSCC = MCH_SCC.ADIR_YM
if AreSameVectorApprox( vtExtr, Z_AX()) then
nSCC = MCH_SCC.ADIR_YM