DataBeam :
- aggiunta gestione marcature e testi da sotto per macchine con testa da sotto - aggiunta gestione smussi su profilatura caudata orizzontale per macchine con testa da sotto.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
-- ProcessDrill.lua by Egaltech s.r.l. 2021/04/14
|
||||
-- ProcessDrill.lua by Egaltech s.r.l. 2021/05/03
|
||||
-- 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.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local ProcessDrill = {}
|
||||
@@ -110,8 +111,6 @@ function ProcessDrill.Split( Proc, b3Raw)
|
||||
if not bTrySplit then
|
||||
return false
|
||||
end
|
||||
-- abilitazione foratura da sotto
|
||||
local bDrillDown = ( BD.DOWN_HEAD and ( Proc.Down or vtExtr:getZ() < 0.1 or EgtExistsInfo( Proc.Id, 'MAIN')) and not EgtExistsInfo( Proc.Id, 'DOU'))
|
||||
-- recupero la lavorazione
|
||||
local sDrilling, _, dMaxMat = ML.FindDrilling( dDiam, 0, bDrillDown)
|
||||
if not sDrilling then dMaxMat = 0 end
|
||||
@@ -119,7 +118,7 @@ function ProcessDrill.Split( Proc, b3Raw)
|
||||
local bHoriz = ( abs( vtExtr:getZ()) < abs( BD.DRILL_VZ_MIN) and
|
||||
( abs( vtExtr:getY()) * b3Raw:getDimZ() > abs( vtExtr:getZ()) * b3Raw:getDimY() or Proc.Fce == 5 or Proc.Fce == 6))
|
||||
local bSlant = ( abs( vtExtr:getX()) > BD.DRILL_VX_MAX)
|
||||
return ( bOpen and ( bHoriz or BD.ROT90) and not bSlant)
|
||||
return ( bOpen and ( bHoriz or BD.ROT90 or BD.DOWN_HEAD) and not bSlant)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
@@ -137,7 +136,7 @@ function ProcessDrill.Classify( Proc, b3Raw)
|
||||
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
|
||||
local ptCen = EgtCP( AuxId, GDB_RT.GLOB)
|
||||
-- se lavorato in doppio, devo considerare il lato più sfavorevole
|
||||
if Proc.Flg == -2 or ( BD.ROT90 and Proc.Flg == 2) then
|
||||
if Proc.Flg == -2 or (( BD.ROT90 or BD.DOWN_HEAD) and Proc.Flg == 2) then
|
||||
if vtExtr:getZ() > 0 then
|
||||
vtExtr = - vtExtr
|
||||
ptCen = ptCen + vtExtr * dLen
|
||||
@@ -148,13 +147,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 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) 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, BD.ROT90
|
||||
return true, not ( BD.ROT90 or BD.DOWN_HEAD), ( BD.ROT90 or BD.DOWN_HEAD)
|
||||
end
|
||||
else
|
||||
return true, false, false
|
||||
|
||||
Reference in New Issue
Block a user