DataBeam :
- migliorie e correzioni varie.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
-- ProcessDrill.lua by Egaltech s.r.l. 2019/04/01
|
||||
-- ProcessDrill.lua by Egaltech s.r.l. 2019/04/11
|
||||
-- Gestione calcolo forature per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -45,10 +45,18 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function FindDrilling( dDiam)
|
||||
for i = 1, #Drillings do
|
||||
-- ricerca sulle forature con punte, dal diametro maggiore al minore
|
||||
for i = #Drillings, 1, -1 do
|
||||
local Drilling = Drillings[i]
|
||||
if abs( dDiam - Drilling.Diam) < 1.1 then
|
||||
return i, Drilling.Name
|
||||
if ( Drilling.Type == 'Drill' and Drilling.Diam < dDiam + 10 * GEO.EPS_SMALL and Drilling.Diam > dDiam - BD.DRILL_TOL - 10 * GEO.EPS_SMALL) then
|
||||
return i, Drilling.Name, Drilling.Type
|
||||
end
|
||||
end
|
||||
-- ricerca sull svuotature con frese, dal diametro maggiore al minore
|
||||
for i = #Drillings, 1, -1 do
|
||||
local Drilling = Drillings[i]
|
||||
if ( Drilling.Type == 'Pocket' and dDiam > Drilling.Diam + 10 * GEO.EPS_SMALL) then
|
||||
return i, Drilling.Name, Drilling.Type
|
||||
end
|
||||
end
|
||||
return 0
|
||||
@@ -129,7 +137,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
if bToInvert then vtExtr = - vtExtr end
|
||||
if Proc.Flg == -2 then bToInvert = true end
|
||||
-- recupero la lavorazione
|
||||
local nDri, sDrilling = FindDrilling( dDiam)
|
||||
local nDri, sDrilling, nType = FindDrilling( dDiam)
|
||||
if not sDrilling then
|
||||
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' drilling not found in library'
|
||||
EgtOutLog( sErr)
|
||||
@@ -144,9 +152,13 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
return false, sErr
|
||||
end
|
||||
-- aggiungo geometria
|
||||
EgtSetMachiningGeometry( {{ AuxId, 0}})
|
||||
EgtSetMachiningGeometry( {{ AuxId, -1}})
|
||||
-- eventuale inversione
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, bToInvert)
|
||||
if nType == 'Drill' then
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, bToInvert)
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, bToInvert)
|
||||
end
|
||||
-- imposto posizione braccio porta testa
|
||||
local nSCC = MCH_SCC.ADIR_YM
|
||||
if vtExtr:getY() > 100 * GEO.EPS_ZERO then
|
||||
|
||||
Reference in New Issue
Block a user