DataWall 2.5j3 :
- nella ricerca lavorazione da usare controllo di utensile attivo sostituito con controllo utensile presente nel setup corrente - aggiunta gestione aree vietate per chiodature (LockOut for Nail).
This commit is contained in:
+23
-10
@@ -1,9 +1,10 @@
|
||||
-- WallExec.lua by Egaltech s.r.l. 2023/07/04
|
||||
-- WallExec.lua by Egaltech s.r.l. 2023/10/16
|
||||
-- Libreria esecuzione lavorazioni per Pareti
|
||||
-- 2023/05/25 Aggiunto ordinamento in base a priorità da btl.
|
||||
-- 2023/06/07 Nel caso di outline con priorità aggiunta la rimozione degli sfridi nella lavorazione successiva.
|
||||
-- 2023/06/27 Aggiunte origini TN e BN.
|
||||
-- 2023/07/04 Se c'è funzione di macchina WD.GetOrigCorner si lascia scegliere posizione default a questa impostando 0 se non c'è 'REFPOS'.
|
||||
-- 2023/10/16 Aggiunta gestione Aree vietate (LockOut) per chiodature.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local WallExec = {}
|
||||
@@ -216,6 +217,16 @@ function WallExec.CollectFeatures( PartId, b3Raw)
|
||||
Proc2.TaskId = Proc.TaskId
|
||||
table.insert( vProc, Proc2)
|
||||
end
|
||||
-- se free contour
|
||||
elseif FreeContour.Identify( Proc) then
|
||||
-- recupero il tipo e il dato della lavorazione
|
||||
local nCntType = EgtGetInfo( Proc.Id, 'CNT_TYPE', 'i') or 0
|
||||
local nCntData = EgtGetInfo( Proc.Id, 'CNT_DATA', 'i') or 0
|
||||
-- imposto se area vietata
|
||||
if nCntType == 200 then
|
||||
Proc.LockOut = EgtIf( ( nCntData == 0 or ( nCntData & 1) ~= 0), 1, -1)
|
||||
end
|
||||
if Proc.LockOut then Proc.Flg = 0 end
|
||||
end
|
||||
else
|
||||
EgtOutLog( ' Feature ' .. tostring( Proc.Id) .. ' is empty (no geometry)')
|
||||
@@ -285,15 +296,15 @@ local function PrintFeatures( vProc)
|
||||
EgtOutLog( ' *** Feature List ***')
|
||||
for i = 1, #vProc do
|
||||
local Proc = vProc[i]
|
||||
local sOut = string.format( 'Part=%3d Proc=%3d Grp=%1d Prc=%3d TC=%2d/%d Flg=%2d Fcse=%1d,%1d Diam=%.2f Fct=%2d Dbl=%2d Dlt=%.1f Box=%s',
|
||||
local sOut = string.format( 'Part=%3d Proc=%3d Grp=%1d Prc=%3d TC=%2d/%d Flg=%2d Lo=%d Fcse=%1d,%1d Diam=%.2f Fct=%2d Dbl=%2d Dlt=%.1f Box=%s',
|
||||
Proc.PartId, Proc.Id, Proc.Grp, Proc.Prc, Proc.TaskId, Proc.CutId,
|
||||
Proc.Flg, Proc.Fcs, Proc.Fce, Proc.Diam, Proc.Fct, Proc.Double or 0, Proc.Delta or 0, tostring( Proc.Box))
|
||||
Proc.Flg, EgtIf( Proc.LockOut, 1, 0), Proc.Fcs, Proc.Fce, Proc.Diam, Proc.Fct, Proc.Double or 0, Proc.Delta or 0, tostring( Proc.Box))
|
||||
EgtOutLog( sOut)
|
||||
end
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function AddFeatureMachining( Proc, nRawId, b3Raw)
|
||||
local function AddFeatureMachining( Proc, nRawId, b3Raw, vNLO)
|
||||
local bOk = true
|
||||
local sErr = ''
|
||||
EgtOutLog( ' * Process ' .. tostring( Proc.Id) .. ' *', 1)
|
||||
@@ -335,8 +346,8 @@ local function AddFeatureMachining( Proc, nRawId, b3Raw)
|
||||
bOk, sErr = Text.Make( Proc, nRawId, b3Raw)
|
||||
-- se contorno libero, outline o apertura ( 0/3/4-250/251/252-X)
|
||||
elseif FreeContour.Identify( Proc) then
|
||||
-- esecuzione contorno
|
||||
bOk, sErr = FreeContour.Make( Proc, nRawId, b3Raw)
|
||||
-- esecuzione contorno libero
|
||||
bOk, sErr = FreeContour.Make( Proc, nRawId, b3Raw, vNLO)
|
||||
-- se feature custom (Variant)
|
||||
elseif Variant.Identify( Proc) then
|
||||
-- esecuzione
|
||||
@@ -641,9 +652,11 @@ function WallExec.ProcessFeatures()
|
||||
end
|
||||
-- classifico le feature
|
||||
ClassifyFeatures( vProc, b3Raw)
|
||||
-- Eventuale determinazione delle feature lavorabili in parallelo (implementata nella configurazione macchina)
|
||||
-- recupero l'elenco delle aree vietate alle chiodature
|
||||
local vNLO = WL.GetNailLockOutAreas( vProc)
|
||||
-- Se non ci sono aree vietate alle chiodature, eventuale determinazione delle feature lavorabili in parallelo (implementata nella configurazione macchina)
|
||||
-- si impostano i flag Double (nil/0=no, 1=su X, 2=su Y) e Delta (offset tra T14 e T12 positivo o negativo)
|
||||
if WD.FindFeaturesInDouble then
|
||||
if #vNLO == 0 and WD.FindFeaturesInDouble then
|
||||
WD.FindFeaturesInDouble( vProc, b3Raw)
|
||||
end
|
||||
-- debug
|
||||
@@ -656,7 +669,7 @@ function WallExec.ProcessFeatures()
|
||||
-- creo la lavorazione
|
||||
local Proc = vProc[i]
|
||||
if Proc.Flg ~= 0 then
|
||||
local bOk, sMsg = AddFeatureMachining( Proc, nRawId, b3Raw)
|
||||
local bOk, sMsg = AddFeatureMachining( Proc, nRawId, b3Raw, vNLO)
|
||||
if not bOk then
|
||||
nTotErr = nTotErr + 1
|
||||
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
||||
@@ -665,7 +678,7 @@ function WallExec.ProcessFeatures()
|
||||
else
|
||||
table.insert( Stats, {Err=0, Msg='', Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
||||
end
|
||||
elseif not Proc.Double then
|
||||
elseif not Proc.Double and not Proc.LockOut then
|
||||
local sMsg = 'Feature not machinable by orientation'
|
||||
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user