Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b0b8e88c30 | |||
| d020fa143c | |||
| eeb34638cf | |||
| 7f2d1895a1 | |||
| 766bd61981 | |||
| 1102a7c23a | |||
| 358df3cfdb | |||
| bd0dbbb41c | |||
| 2606cf4f13 | |||
| e63b498902 | |||
| 63a3cfe698 | |||
| 78cf115748 | |||
| ac853fc74c | |||
| 1a1d48a2c1 | |||
| a05741f7be | |||
| d704e899a2 |
@@ -19,3 +19,4 @@
|
|||||||
/bin/*.ini
|
/bin/*.ini
|
||||||
/bin/LuaLibs/*.lua
|
/bin/LuaLibs/*.lua
|
||||||
/bin/Images/*.png
|
/bin/Images/*.png
|
||||||
|
.vscode/settings.json
|
||||||
|
|||||||
+1
-1
@@ -245,7 +245,7 @@ if bToProcess then
|
|||||||
end
|
end
|
||||||
if #vWall == 0 then
|
if #vWall == 0 then
|
||||||
WALL.ERR = 14
|
WALL.ERR = 14
|
||||||
WALL.MSG = 'Error no beams in the file : ' .. WALL.FILE
|
WALL.MSG = 'Error no walls in the file : ' .. WALL.FILE
|
||||||
WriteErrToLogFile( WALL.ERR, WALL.MSG)
|
WriteErrToLogFile( WALL.ERR, WALL.MSG)
|
||||||
PostErrView( WALL.ERR, WALL.MSG)
|
PostErrView( WALL.ERR, WALL.MSG)
|
||||||
return
|
return
|
||||||
|
|||||||
+1
-1
@@ -230,7 +230,7 @@ if bToProcess then
|
|||||||
end
|
end
|
||||||
if #vWall == 0 then
|
if #vWall == 0 then
|
||||||
WALL.ERR = 14
|
WALL.ERR = 14
|
||||||
WALL.MSG = 'Error no beams in the file : ' .. WALL.FILE
|
WALL.MSG = 'Error no walls in the file : ' .. WALL.FILE
|
||||||
WriteErrToLogFile( WALL.ERR, WALL.MSG)
|
WriteErrToLogFile( WALL.ERR, WALL.MSG)
|
||||||
PostErrView( WALL.ERR, WALL.MSG)
|
PostErrView( WALL.ERR, WALL.MSG)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
-- MachiningLib.lua by Egaltech s.r.l. 2022/01/12
|
-- MachiningLib.lua by Egaltech s.r.l. 2022/01/12
|
||||||
-- Libreria ricerca lavorazioni per Pareti
|
-- Libreria ricerca lavorazioni per Pareti
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
|
||||||
-- 2023/03/09 Piccola correzione alla SideDepth in FindMilling
|
-- 2023/03/09 Piccola correzione alla SideDepth in FindMilling
|
||||||
-- In FindMilling aggiunta gestione spessore e massimo materiale nel caso di lam
|
-- In FindMilling aggiunta gestione spessore e massimo materiale nel caso di lam
|
||||||
|
-- 2023/05/25 Aggiunta funzione AddMachining che incapsula EgtAddMachining trascrivendo le priorità btl dalle feature alle lavorazioni.
|
||||||
|
|
||||||
|
-- Tabella per definizione modulo
|
||||||
local WMachiningLib = {}
|
local WMachiningLib = {}
|
||||||
|
|
||||||
-- Include
|
-- Include
|
||||||
@@ -180,5 +181,14 @@ function WMachiningLib.FindSurfacing( sType)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- incapsulo EgtAddMachining e trascrivo le priorità all'interno delle note della lavorazione
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
function WMachiningLib.AddMachining( nProcId, sName, sMachining)
|
||||||
|
local nMchId, sFinalName = EgtAddMachining( sName, sMachining)
|
||||||
|
local nPriority = EgtGetInfo( nProcId, 'PRIORITY', 'i')
|
||||||
|
EgtSetInfo( nMchId, 'PRIORITY', nPriority)
|
||||||
|
return nMchId, sFinalName
|
||||||
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
return WMachiningLib
|
return WMachiningLib
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
-- 2022/01/29 DS Corretta gestione ingombro portautensili per fori inclinati da sopra.
|
-- 2022/01/29 DS Corretta gestione ingombro portautensili per fori inclinati da sopra.
|
||||||
-- 2022/02/22 ES Aggiunta gestione prefori.
|
-- 2022/02/22 ES Aggiunta gestione prefori.
|
||||||
-- 2022/03/08 DS Vanno accettati fori orizzontali sul bordo anche senza foratori orizzontali speciali.
|
-- 2022/03/08 DS Vanno accettati fori orizzontali sul bordo anche senza foratori orizzontali speciali.
|
||||||
|
-- 2023/05/25 Funzioni EgtAddMachining sostituite da WM.AddMachining in modo da trascrivere le priorità da btl alle lavorazioni.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local WPD = {}
|
local WPD = {}
|
||||||
@@ -375,7 +376,7 @@ function WPD.Make( Proc, nRawId, b3Raw)
|
|||||||
end
|
end
|
||||||
-- inserisco la lavorazione
|
-- inserisco la lavorazione
|
||||||
local sName = EgtIf( sHead == 'H5' or sHead == 'H6', 'LhDrill_', 'Drill_') .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
local sName = EgtIf( sHead == 'H5' or sHead == 'H6', 'LhDrill_', 'Drill_') .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
local nMchId = EgtAddMachining( sName, sDrilling)
|
local nMchId = WM.AddMachining( Proc.Id, sName, sDrilling)
|
||||||
if not nMchId then
|
if not nMchId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sDrilling
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sDrilling
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -505,7 +506,7 @@ function WPD.Make( Proc, nRawId, b3Raw)
|
|||||||
|
|
||||||
-- inserisco la lavorazione
|
-- inserisco la lavorazione
|
||||||
local sName = 'PreDrill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
local sName = 'PreDrill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
local nMchId = EgtAddMachining( sName, sDrilling)
|
local nMchId = WM.AddMachining( Proc.Id, sName, sDrilling)
|
||||||
if not nMchId then
|
if not nMchId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sDrilling
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sDrilling
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
-- Gestione calcolo mortase a coda di rondine per Pareti
|
-- Gestione calcolo mortase a coda di rondine per Pareti
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
|
-- 2023/05/25 Funzioni EgtAddMachining sostituite da WM.AddMachining in modo da trascrivere le priorità da btl alle lavorazioni.
|
||||||
local WPDM= {}
|
local WPDM= {}
|
||||||
|
|
||||||
-- Include
|
-- Include
|
||||||
@@ -159,7 +160,7 @@ function WPDM.Make( Proc, nRawId, b3Raw)
|
|||||||
end
|
end
|
||||||
-- inserisco la lavorazione di svuotatura
|
-- inserisco la lavorazione di svuotatura
|
||||||
local sName = 'DtMtPck_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
local sName = 'DtMtPck_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
local nMchFId = EgtAddMachining( sName, sPocketing)
|
local nMchFId = WM.AddMachining( Proc.Id, sName, sPocketing)
|
||||||
if not nMchFId then
|
if not nMchFId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sPocketing
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sPocketing
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -189,7 +190,7 @@ function WPDM.Make( Proc, nRawId, b3Raw)
|
|||||||
for i = nPass, 1, -1 do
|
for i = nPass, 1, -1 do
|
||||||
-- inserisco la lavorazione di contornatura
|
-- inserisco la lavorazione di contornatura
|
||||||
local sNameF = 'DtMt_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( nPass)
|
local sNameF = 'DtMt_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( nPass)
|
||||||
local nMchFId = EgtAddMachining( sNameF, sMilling)
|
local nMchFId = WM.AddMachining( Proc.Id, sNameF, sMilling)
|
||||||
if not nMchFId then
|
if not nMchFId then
|
||||||
local sErr = 'Error adding machining ' .. sNameF .. '-' .. sMilling
|
local sErr = 'Error adding machining ' .. sNameF .. '-' .. sMilling
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
-- 2023/03/08 In lavorazione con fresa, se imposto Tool_ID non si controlla più possa lavorare di testa.
|
-- 2023/03/08 In lavorazione con fresa, se imposto Tool_ID non si controlla più possa lavorare di testa.
|
||||||
-- 2023/04/14 Aggiunta pulitura spigoli Q05=1 anche su sole fresature.
|
-- 2023/04/14 Aggiunta pulitura spigoli Q05=1 anche su sole fresature.
|
||||||
-- 2023/04/17 Lavorazione CleanCorner sempre forzata con lato di lavoro in centro.
|
-- 2023/04/17 Lavorazione CleanCorner sempre forzata con lato di lavoro in centro.
|
||||||
|
-- 2023/05/25 Funzioni EgtAddMachining sostituite da WM.AddMachining in modo da trascrivere le priorità da btl alle lavorazioni.
|
||||||
|
-- 2023/06/06 Aggiunta gestione lavorazione per lamatura speciale affondata con Tool_ID specifico.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local WPF = {}
|
local WPF = {}
|
||||||
@@ -66,6 +68,7 @@ function WPF.Classify( Proc, b3Raw)
|
|||||||
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
|
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
|
||||||
-- recupero il tipo di lavorazione
|
-- recupero il tipo di lavorazione
|
||||||
local nCntType = EgtGetInfo( Proc.Id, 'CNT_TYPE', 'i') or 0
|
local nCntType = EgtGetInfo( Proc.Id, 'CNT_TYPE', 'i') or 0
|
||||||
|
local nTool_ID = EgtGetInfo( Proc.Id, 'CNT_DATA', 'i')
|
||||||
-- se tasca
|
-- se tasca
|
||||||
if bPocket then
|
if bPocket then
|
||||||
-- cerco la faccia di fondo della superfice (deve avere direzione circa quella di estrusione della curva)
|
-- cerco la faccia di fondo della superfice (deve avere direzione circa quella di estrusione della curva)
|
||||||
@@ -86,10 +89,10 @@ function WPF.Classify( Proc, b3Raw)
|
|||||||
-- se penna o chiodatura va sempre bene (vengono sempre riportati sopra)
|
-- se penna o chiodatura va sempre bene (vengono sempre riportati sopra)
|
||||||
elseif nCntType == 10 or nCntType == 20 then
|
elseif nCntType == 10 or nCntType == 20 then
|
||||||
return true
|
return true
|
||||||
-- se altrimenti profilo verticale che non interessa tutta la sezione
|
-- se altrimenti profilo verticale che non interessa tutta la sezione e non caso speciale con lamatura affondata
|
||||||
elseif Proc.Box:getMax():getZ() < b3Raw:getMax():getZ() - 2 then
|
elseif ( Proc.Box:getMax():getZ() < b3Raw:getMax():getZ() - 2) and ( not nTool_ID or ( nTool_ID ~= ( WD.RECESSED_COUNTERBORE_TOOLID or 0)) or ( not EgtCurveIsACircle( AuxId))) then
|
||||||
return false
|
return false
|
||||||
-- altrimenti è profilo verticale che interessa tutta la sezione
|
-- altrimenti è profilo verticale che interessa tutta la sezione o caso speciale con lamatura affondata
|
||||||
else
|
else
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -99,8 +102,8 @@ end
|
|||||||
-- Classificazione del flip della feature per nesting
|
-- Classificazione del flip della feature per nesting
|
||||||
-- return nFlip0, nFlip1
|
-- return nFlip0, nFlip1
|
||||||
function WPF.FlipClassify( Proc, b3Raw)
|
function WPF.FlipClassify( Proc, b3Raw)
|
||||||
local nFlip0 = 0
|
local nFlip0 = 0
|
||||||
local nFlip1 = 0
|
local nFlip1 = 0
|
||||||
|
|
||||||
-- verifico se di tipo pocket
|
-- verifico se di tipo pocket
|
||||||
local bPocket = ( EgtGetInfo( Proc.Id, 'PCKT', 'i') == 1)
|
local bPocket = ( EgtGetInfo( Proc.Id, 'PCKT', 'i') == 1)
|
||||||
@@ -1017,7 +1020,7 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTyp
|
|||||||
end
|
end
|
||||||
-- inserisco la lavorazione
|
-- inserisco la lavorazione
|
||||||
local sName = 'Clean_' .. ( EgtGetName( nNewProc) or tostring( nNewProc))
|
local sName = 'Clean_' .. ( EgtGetName( nNewProc) or tostring( nNewProc))
|
||||||
local nMchId = EgtAddMachining( sName, sMilling)
|
local nMchId = WM.AddMachining( nNewProc.Id, sName, sMilling)
|
||||||
if not nMchId then
|
if not nMchId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -1312,7 +1315,7 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
|
|||||||
if ( vFace[i].Type & 1) ~= 0 and ( not j or vFace[j].Type == 0 or vFace[j].Type == 1 or abs( vFace[i].SideAng) > 0.1 or abs( vFace[j].SideAng) > 0.1) then
|
if ( vFace[i].Type & 1) ~= 0 and ( not j or vFace[j].Type == 0 or vFace[j].Type == 1 or abs( vFace[i].SideAng) > 0.1 or abs( vFace[j].SideAng) > 0.1) then
|
||||||
-- inserisco la lavorazione
|
-- inserisco la lavorazione
|
||||||
local sName = 'Free_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId))
|
local sName = 'Free_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId))
|
||||||
local nMchId = EgtAddMachining( sName, sMilling)
|
local nMchId = WM.AddMachining( Proc.Id, sName, sMilling)
|
||||||
if not nMchId then
|
if not nMchId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -1406,7 +1409,7 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
|
|||||||
if ( vFace[i].Type & 2) ~= 0 or ( vFace[i].Type == 4 and ( vFace[i].Edges > 3 and not vFace[i].Is3EdgesApprox)) then
|
if ( vFace[i].Type & 2) ~= 0 or ( vFace[i].Type == 4 and ( vFace[i].Edges > 3 and not vFace[i].Is3EdgesApprox)) then
|
||||||
-- inserisco la lavorazione
|
-- inserisco la lavorazione
|
||||||
local sName = 'Free_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId))
|
local sName = 'Free_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId))
|
||||||
local nMchId = EgtAddMachining( sName, sMilling)
|
local nMchId = WM.AddMachining( Proc.Id, sName, sMilling)
|
||||||
if not nMchId then
|
if not nMchId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -1607,7 +1610,7 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
|
|||||||
if vFace[i].Split then
|
if vFace[i].Split then
|
||||||
-- inserisco la lavorazione
|
-- inserisco la lavorazione
|
||||||
local sName = 'Free_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId)) .. '_M'
|
local sName = 'Free_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId)) .. '_M'
|
||||||
local nMchId = EgtAddMachining( sName, sMilling)
|
local nMchId = WM.AddMachining( Proc.Id, sName, sMilling)
|
||||||
if not nMchId then
|
if not nMchId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -1698,7 +1701,7 @@ local function AddSawings( sSawing, vFace, Proc, nRawId, b3Raw)
|
|||||||
if ( vFace[i].Type & 1) ~= 0 then
|
if ( vFace[i].Type & 1) ~= 0 then
|
||||||
-- inserisco la lavorazione
|
-- inserisco la lavorazione
|
||||||
local sName = 'Free_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId))
|
local sName = 'Free_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId))
|
||||||
local nMchId = EgtAddMachining( sName, sSawing)
|
local nMchId = WM.AddMachining( Proc.Id, sName, sSawing)
|
||||||
if not nMchId then
|
if not nMchId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sSawing
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sSawing
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -1746,7 +1749,7 @@ local function AddSawings( sSawing, vFace, Proc, nRawId, b3Raw)
|
|||||||
if ( vFace[i].Type & 2) ~= 0 or ( vFace[i].Type == 4 and ( vFace[i].Edges > 3 and not vFace[i].Is3EdgesApprox) and vFace[i].Len > dSawDiam + 1) then
|
if ( vFace[i].Type & 2) ~= 0 or ( vFace[i].Type == 4 and ( vFace[i].Edges > 3 and not vFace[i].Is3EdgesApprox) and vFace[i].Len > dSawDiam + 1) then
|
||||||
-- inserisco la lavorazione
|
-- inserisco la lavorazione
|
||||||
local sName = 'Free_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId))
|
local sName = 'Free_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId))
|
||||||
local nMchId = EgtAddMachining( sName, sSawing)
|
local nMchId = WM.AddMachining( Proc.Id, sName, sSawing)
|
||||||
if not nMchId then
|
if not nMchId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sSawing
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sSawing
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -1817,7 +1820,7 @@ local function AddCuts( sCutting, vFace, Proc, nRawId, b3Raw, dSawThick)
|
|||||||
local h = EgtIf( i > 1, i - 1, EgtIf( bClosed, #vFace, nil))
|
local h = EgtIf( i > 1, i - 1, EgtIf( bClosed, #vFace, nil))
|
||||||
-- inserisco la lavorazione
|
-- inserisco la lavorazione
|
||||||
local sName = 'Cut_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId)) .. '_' .. tostring( i)
|
local sName = 'Cut_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId)) .. '_' .. tostring( i)
|
||||||
local nMchId = EgtAddMachining( sName, sCutting)
|
local nMchId = WM.AddMachining( Proc.Id, sName, sCutting)
|
||||||
if not nMchId then
|
if not nMchId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sCutting
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sCutting
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -2157,7 +2160,7 @@ local function MakeByMill( Proc, nRawId, b3Raw)
|
|||||||
end
|
end
|
||||||
-- inserisco la lavorazione
|
-- inserisco la lavorazione
|
||||||
local sName = 'Free_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
local sName = 'Free_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
local nMchId = EgtAddMachining( sName, sMilling)
|
local nMchId = WM.AddMachining( Proc.Id, sName, sMilling)
|
||||||
if not nMchId then
|
if not nMchId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -2184,6 +2187,37 @@ local function MakeByMill( Proc, nRawId, b3Raw)
|
|||||||
elseif ( Proc.Grp == 3 and bToolInv) or ( Proc.Grp == 4 and not bToolInv) then
|
elseif ( Proc.Grp == 3 and bToolInv) or ( Proc.Grp == 4 and not bToolInv) then
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- se lamatura affondata speciale, setto attacco e stacco al centro
|
||||||
|
local bIsRecessedCounterBore = ( Proc.Box:getMax():getZ() < b3Raw:getMax():getZ() + 10 * GEO.EPS_SMALL) and
|
||||||
|
( nTool_ID == WD.RECESSED_COUNTERBORE_TOOLID or 0) and
|
||||||
|
( EgtCurveIsACircle( AuxId))
|
||||||
|
if bIsRecessedCounterBore then
|
||||||
|
local _, _, _, dContourRadius = EgtCurveIsACircle( AuxId)
|
||||||
|
-- setto attacco
|
||||||
|
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.TANGENT)
|
||||||
|
EgtSetMachiningParam( MCH_MP.STARTADDLEN, 0)
|
||||||
|
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
||||||
|
EgtSetMachiningParam( MCH_MP.LIPERP, dContourRadius - 0.5 * dMillDiam)
|
||||||
|
EgtSetMachiningParam( MCH_MP.LIELEV, 0)
|
||||||
|
-- setto stacco
|
||||||
|
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LO.LINEAR)
|
||||||
|
EgtSetMachiningParam( MCH_MP.ENDADDLEN, 0)
|
||||||
|
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
|
||||||
|
EgtSetMachiningParam( MCH_MP.LOPERP, dContourRadius - 0.5 * dMillDiam)
|
||||||
|
EgtSetMachiningParam( MCH_MP.LOELEV, 0)
|
||||||
|
-- imposto step
|
||||||
|
local dMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or 0
|
||||||
|
local dStep = EgtGetMachiningParam( MCH_MP.STEP)
|
||||||
|
if dStep < GEO.EPS_SMALL then dStep = 0.75 * dMaxMat end
|
||||||
|
local nStep = ceil( ( dDepth - dMaxMat) / dStep)
|
||||||
|
dStep = max( ( dDepth - dMaxMat) / max( nStep, 1), 0)
|
||||||
|
local dMaxElev = max( ( nStep + 1) * dStep - GEO.EPS_SMALL, 0)
|
||||||
|
EgtSetMachiningParam( MCH_MP.STEP, dStep)
|
||||||
|
-- imposto elevazione
|
||||||
|
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dMaxElev, 1) .. ';')
|
||||||
|
end
|
||||||
|
|
||||||
-- posizione braccio porta testa
|
-- posizione braccio porta testa
|
||||||
local nSCC = MCH_SCC.ADIR_ZP
|
local nSCC = MCH_SCC.ADIR_ZP
|
||||||
if AreSameOrOppositeVectorApprox( vtExtr, Z_AX()) then
|
if AreSameOrOppositeVectorApprox( vtExtr, Z_AX()) then
|
||||||
@@ -2259,7 +2293,7 @@ local function MakeByMark( Proc, nRawId, b3Raw)
|
|||||||
end
|
end
|
||||||
-- inserisco la lavorazione
|
-- inserisco la lavorazione
|
||||||
local sName = 'FreeMark_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
local sName = 'FreeMark_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
local nMchId = EgtAddMachining( sName, sMilling)
|
local nMchId = WM.AddMachining( Proc.Id, sName, sMilling)
|
||||||
if not nMchId then
|
if not nMchId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -2324,7 +2358,7 @@ local function MakeByNail( Proc, nRawId, b3Raw)
|
|||||||
end
|
end
|
||||||
-- inserisco la lavorazione
|
-- inserisco la lavorazione
|
||||||
local sName = 'Nail_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
local sName = 'Nail_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
local nMchId = EgtAddMachining( sName, sNailing)
|
local nMchId = WM.AddMachining( Proc.Id, sName, sNailing)
|
||||||
if not nMchId then
|
if not nMchId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sNailing
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sNailing
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -2463,7 +2497,7 @@ local function MakeByPocket( Proc, nRawId, b3Raw)
|
|||||||
end
|
end
|
||||||
-- inserisco la lavorazione di svuotatura
|
-- inserisco la lavorazione di svuotatura
|
||||||
local sName = 'Pock_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
local sName = 'Pock_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
local nMchFId = EgtAddMachining( sName, sPocketing)
|
local nMchFId = WM.AddMachining( Proc.Id, sName, sPocketing)
|
||||||
if not nMchFId then
|
if not nMchFId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sPocketing
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sPocketing
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
-- 2023/04/15 Corretta scelta tipo lavorazione 'SideGroove' aggiungendo massimo spessore.
|
-- 2023/04/15 Corretta scelta tipo lavorazione 'SideGroove' aggiungendo massimo spessore.
|
||||||
-- 2023/04/17 Sistemata gestione parametri Q, eliminando quello non usato di forzatura lama e abilitandoli anche per DoubleCut.
|
-- 2023/04/17 Sistemata gestione parametri Q, eliminando quello non usato di forzatura lama e abilitandoli anche per DoubleCut.
|
||||||
-- Lavorazione CleanCorner sempre forzata con lato di lavoro in centro.
|
-- Lavorazione CleanCorner sempre forzata con lato di lavoro in centro.
|
||||||
|
-- 2023/05/25 Funzioni EgtAddMachining sostituite da WM.AddMachining in modo da trascrivere le priorità da btl alle lavorazioni.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local WPL = {}
|
local WPL = {}
|
||||||
@@ -984,7 +985,7 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTyp
|
|||||||
end
|
end
|
||||||
-- inserisco la lavorazione
|
-- inserisco la lavorazione
|
||||||
local sName = 'Clean_' .. ( EgtGetName( nNewProc) or tostring( nNewProc))
|
local sName = 'Clean_' .. ( EgtGetName( nNewProc) or tostring( nNewProc))
|
||||||
local nMchId = EgtAddMachining( sName, sMilling)
|
local nMchId = WM.AddMachining( nNewProc.Id, sName, sMilling)
|
||||||
if not nMchId then
|
if not nMchId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -1275,7 +1276,7 @@ local function MakeByChainSaw( Proc, nFacet, nRawId, b3Raw, dElev, dH, dV)
|
|||||||
for i = 1, nStep do
|
for i = 1, nStep do
|
||||||
-- Applico la lavorazione con sega a catena a questa faccia
|
-- Applico la lavorazione con sega a catena a questa faccia
|
||||||
local sName = 'Csaw_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( i)
|
local sName = 'Csaw_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( i)
|
||||||
local nMchFId = EgtAddMachining( sName, sSawing)
|
local nMchFId = WM.AddMachining( Proc.Id, sName, sSawing)
|
||||||
if not nMchFId then
|
if not nMchFId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sSawing
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sSawing
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -1362,7 +1363,7 @@ local function MakeByMill( Proc, nFacet, nOthFac, nRawId, b3Raw, dSideDist)
|
|||||||
end
|
end
|
||||||
-- inserisco la lavorazione di contornatura
|
-- inserisco la lavorazione di contornatura
|
||||||
local sName = 'Mill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
local sName = 'Mill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
local nMchFId = EgtAddMachining( sName, sMilling)
|
local nMchFId = WM.AddMachining( Proc.Id, sName, sMilling)
|
||||||
if not nMchFId then
|
if not nMchFId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -1732,7 +1733,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
|||||||
end
|
end
|
||||||
-- inserisco la lavorazione di fresatura
|
-- inserisco la lavorazione di fresatura
|
||||||
local sNameGorge = 'Gorge_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. tostring( nFacet) .. '_' .. tostring( nNm)
|
local sNameGorge = 'Gorge_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. tostring( nFacet) .. '_' .. tostring( nNm)
|
||||||
local nMchFId = EgtAddMachining( sNameGorge, sMillingGorge)
|
local nMchFId = WM.AddMachining( Proc.Id, sNameGorge, sMillingGorge)
|
||||||
if not nMchFId then
|
if not nMchFId then
|
||||||
local sErr = 'Error adding machining ' .. sNameGorge .. '-' .. sMillingGorge
|
local sErr = 'Error adding machining ' .. sNameGorge .. '-' .. sMillingGorge
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -1783,7 +1784,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
|||||||
nNm = nNm + 1
|
nNm = nNm + 1
|
||||||
-- inserisco la lavorazione di taglio sfrido gorge
|
-- inserisco la lavorazione di taglio sfrido gorge
|
||||||
local sNameGorge = 'GorgeCut_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. tostring( nFacet) .. '_' .. tostring( nNm)
|
local sNameGorge = 'GorgeCut_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. tostring( nFacet) .. '_' .. tostring( nNm)
|
||||||
local nMchFId = EgtAddMachining( sNameGorge, sCuttingGorge)
|
local nMchFId = WM.AddMachining( Proc.Id, sNameGorge, sCuttingGorge)
|
||||||
if not nMchFId then
|
if not nMchFId then
|
||||||
local sErr = 'Error adding machining ' .. sNameGorge .. '-' .. sCuttingGorge
|
local sErr = 'Error adding machining ' .. sNameGorge .. '-' .. sCuttingGorge
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -1842,7 +1843,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
|||||||
if not bExcludeSideMill then
|
if not bExcludeSideMill then
|
||||||
-- inserisco la lavorazione di ribasso o gola
|
-- inserisco la lavorazione di ribasso o gola
|
||||||
local sName = EgtIf( bEnablePreMill ~= nil, 'SideMill_', 'Mill_') .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
local sName = EgtIf( bEnablePreMill ~= nil, 'SideMill_', 'Mill_') .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
local nMchFId = EgtAddMachining( sName, sMilling)
|
local nMchFId = WM.AddMachining( Proc.Id, sName, sMilling)
|
||||||
if not nMchFId then
|
if not nMchFId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -1966,7 +1967,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
|||||||
if dAng and dAng > -90 + 10 * GEO.EPS_SMALL and not bExcludeFinishing then
|
if dAng and dAng > -90 + 10 * GEO.EPS_SMALL and not bExcludeFinishing then
|
||||||
-- inserisco la lavorazione di contornatura
|
-- inserisco la lavorazione di contornatura
|
||||||
local sName = 'Mill_Oth_Fac_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
local sName = 'Mill_Oth_Fac_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
local nMchFId = EgtAddMachining( sName, sMilling)
|
local nMchFId = WM.AddMachining( Proc.Id, sName, sMilling)
|
||||||
if not nMchFId then
|
if not nMchFId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -2154,7 +2155,7 @@ local function MakeByPocketing( Proc, nFacet, nRawId, b3Raw, bCheckQPar)
|
|||||||
end
|
end
|
||||||
-- inserisco la lavorazione di svuotatura
|
-- inserisco la lavorazione di svuotatura
|
||||||
local sName = 'Pock_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
local sName = 'Pock_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
local nMchFId = EgtAddMachining( sName, sPocketing)
|
local nMchFId = WM.AddMachining( Proc.Id, sName, sPocketing)
|
||||||
if not nMchFId then
|
if not nMchFId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sPocketing
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sPocketing
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -2231,7 +2232,7 @@ local function MakeOneFace( Proc, nRawId, b3Raw)
|
|||||||
end
|
end
|
||||||
-- eseguo il taglio di lama
|
-- eseguo il taglio di lama
|
||||||
local sName = 'Cut_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId)) .. '_' .. tostring( Proc.Id)
|
local sName = 'Cut_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId)) .. '_' .. tostring( Proc.Id)
|
||||||
local nMchId = EgtAddMachining( sName, sCutting)
|
local nMchId = WM.AddMachining( Proc.Id, sName, sCutting)
|
||||||
if not nMchId then
|
if not nMchId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sCutting
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sCutting
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -2509,7 +2510,7 @@ local function MakeTwoFaces( Proc, nRawId, b3Raw)
|
|||||||
for i = 1, 2 do
|
for i = 1, 2 do
|
||||||
-- inserisco la lavorazione
|
-- inserisco la lavorazione
|
||||||
local sName = 'Cut_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId)) .. '_' .. tostring( Proc.Id) .. '_' .. tostring( i)
|
local sName = 'Cut_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId)) .. '_' .. tostring( Proc.Id) .. '_' .. tostring( i)
|
||||||
local nMchId = EgtAddMachining( sName, sCutting)
|
local nMchId = WM.AddMachining( Proc.Id, sName, sCutting)
|
||||||
if not nMchId then
|
if not nMchId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sCutting
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sCutting
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
-- WProcessMark.lua by Egaltech s.r.l. 2021/04/20
|
-- WProcessMark.lua by Egaltech s.r.l. 2021/04/20
|
||||||
-- Gestione calcolo marcatura per Pareti
|
-- Gestione calcolo marcatura per Pareti
|
||||||
-- 2023/01/05 Permesse le marcature laterali in presenza di offset Z, tra grezzo e tavola, di almeno 100 mm
|
-- 2023/01/05 Permesse le marcature laterali in presenza di offset Z, tra grezzo e tavola, di almeno 100 mm
|
||||||
|
-- 2023/05/25 Funzioni EgtAddMachining sostituite da WM.AddMachining in modo da trascrivere le priorità da btl alle lavorazioni.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local WPMK = {}
|
local WPMK = {}
|
||||||
@@ -107,7 +108,7 @@ function WPMK.Make( Proc, nRawId, b3Raw)
|
|||||||
end
|
end
|
||||||
-- inserisco la lavorazione di fresatura
|
-- inserisco la lavorazione di fresatura
|
||||||
local sName = 'Decor_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
local sName = 'Decor_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
local nMchFId = EgtAddMachining( sName, sMilling)
|
local nMchFId = WM.AddMachining( Proc.Id, sName, sMilling)
|
||||||
if not nMchFId then
|
if not nMchFId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
@@ -131,7 +132,7 @@ function WPMK.Make( Proc, nRawId, b3Raw)
|
|||||||
if AuxId then
|
if AuxId then
|
||||||
-- inserisco la lavorazione di fresatura
|
-- inserisco la lavorazione di fresatura
|
||||||
local sName2 = 'Decor2_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
local sName2 = 'Decor2_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
local nMchF2Id = EgtAddMachining( sName, sMilling)
|
local nMchF2Id = WM.AddMachining( Proc.Id, sName, sMilling)
|
||||||
if not nMchF2Id then
|
if not nMchF2Id then
|
||||||
local sErr = 'Error adding machining ' .. sName2 .. '-' .. sMilling
|
local sErr = 'Error adding machining ' .. sName2 .. '-' .. sMilling
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
-- WProcessMortise.lua by Egaltech s.r.l. 2021/07/30
|
-- WProcessMortise.lua by Egaltech s.r.l. 2021/07/30
|
||||||
-- Gestione calcolo mortase per Pareti
|
-- Gestione calcolo mortase per Pareti
|
||||||
-- 2023/01/05 Permesse le mortase laterali in presenza di offset Z, tra grezzo e tavola, di almeno 100 mm
|
-- 2023/01/05 Permesse le mortase laterali in presenza di offset Z, tra grezzo e tavola, di almeno 100 mm
|
||||||
|
-- 2023/05/25 Funzioni EgtAddMachining sostituite da WM.AddMachining in modo da trascrivere le priorità da btl alle lavorazioni.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local WPM = {}
|
local WPM = {}
|
||||||
@@ -250,7 +251,7 @@ function WPM.Make( Proc, nRawId, b3Raw)
|
|||||||
end
|
end
|
||||||
-- inserisco la lavorazione di svuotatura
|
-- inserisco la lavorazione di svuotatura
|
||||||
local sName = 'Mort_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
local sName = 'Mort_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
local nMchFId = EgtAddMachining( sName, sPocketing)
|
local nMchFId = WM.AddMachining( Proc.Id, sName, sPocketing)
|
||||||
if not nMchFId then
|
if not nMchFId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sPocketing
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sPocketing
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
-- WProcessText.lua by Egaltech s.r.l. 2021/04/20
|
-- WProcessText.lua by Egaltech s.r.l. 2021/04/20
|
||||||
-- Gestione calcolo testi per Travi
|
-- Gestione calcolo testi per Travi
|
||||||
|
-- 2023/05/25 Funzioni EgtAddMachining sostituite da WM.AddMachining in modo da trascrivere le priorità da btl alle lavorazioni.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local WPT = {}
|
local WPT = {}
|
||||||
@@ -77,7 +78,7 @@ function WPT.Make( Proc, nRawId, b3Raw)
|
|||||||
end
|
end
|
||||||
-- inserisco la lavorazione di fresatura
|
-- inserisco la lavorazione di fresatura
|
||||||
local sName = 'Text_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
local sName = 'Text_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
local nMchFId = EgtAddMachining( sName, sMilling)
|
local nMchFId = WM.AddMachining( Proc.Id, sName, sMilling)
|
||||||
if not nMchFId then
|
if not nMchFId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
-- WProcessVariant.lua by Egaltech s.r.l. 2021/08/27
|
-- WProcessVariant.lua by Egaltech s.r.l. 2021/08/27
|
||||||
-- Gestione calcolo Feature Custom (Variant) per Pareti
|
-- Gestione calcolo Feature Custom (Variant) per Pareti
|
||||||
|
-- 2023/05/25 Funzioni EgtAddMachining sostituite da WM.AddMachining in modo da trascrivere le priorità da btl alle lavorazioni.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local WPV = {}
|
local WPV = {}
|
||||||
@@ -71,7 +72,7 @@ local function MakeCode_1( Proc, nRawId, b3Raw)
|
|||||||
end
|
end
|
||||||
-- inserisco la lavorazione di finitura superficie
|
-- inserisco la lavorazione di finitura superficie
|
||||||
local sName = 'SurfFin_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
local sName = 'SurfFin_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
local nMchFId = EgtAddMachining( sName, sSurfFin)
|
local nMchFId = WM.AddMachining( Proc.Id, sName, sSurfFin)
|
||||||
if not nMchFId then
|
if not nMchFId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sSurfFin
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sSurfFin
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
|
|||||||
+61
-25
@@ -1,5 +1,6 @@
|
|||||||
-- WallExec.lua by Egaltech s.r.l. 2023/03/06
|
-- WallExec.lua by Egaltech s.r.l. 2023/03/06
|
||||||
-- Libreria esecuzione lavorazioni per Pareti
|
-- Libreria esecuzione lavorazioni per Pareti
|
||||||
|
-- 2023/05/25 Aggiunto ordinamento in base a prioritò da btl.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local WallExec = {}
|
local WallExec = {}
|
||||||
@@ -409,7 +410,7 @@ local function ContainsStartName( nOperId, StartNames)
|
|||||||
end
|
end
|
||||||
|
|
||||||
------ Ordinamento dei tagli, delle fresature e delle forature -------
|
------ Ordinamento dei tagli, delle fresature e delle forature -------
|
||||||
local function SortMach( nPhase, PrevMch, nPartId, nType, StartNames, bExistName, sInfo, bExistInfo, bOneWay, bByTool, bByToolAngle)
|
local function SortMach( nPhase, PrevMch, nPartId, nType, StartNames, bExistName, sInfo, bExistInfo, bOneWay, bByTool, bByToolAngle, nPriority)
|
||||||
-- dichiarazione tabella
|
-- dichiarazione tabella
|
||||||
local TabCut = {}
|
local TabCut = {}
|
||||||
-- Recupero gli identificativi delle lavorazioni e annullo eventuali allungamenti e Id di altre lavorazioni rappresentate
|
-- Recupero gli identificativi delle lavorazioni e annullo eventuali allungamenti e Id di altre lavorazioni rappresentate
|
||||||
@@ -419,6 +420,7 @@ local function SortMach( nPhase, PrevMch, nPartId, nType, StartNames, bExistName
|
|||||||
-- Se appartiene alla fase corrente e taglio con lama non da sopra (sempre su 1 sola entità)
|
-- Se appartiene alla fase corrente e taglio con lama non da sopra (sempre su 1 sola entità)
|
||||||
if EgtGetOperationPhase( nOperId) == nPhase and ( nType & nOperType) == nOperType and
|
if EgtGetOperationPhase( nOperId) == nPhase and ( nType & nOperType) == nOperType and
|
||||||
( not nPartId or EgtGetInfo( nOperId, 'Part', 'i') == nPartId) and
|
( not nPartId or EgtGetInfo( nOperId, 'Part', 'i') == nPartId) and
|
||||||
|
( not nPriority or EgtGetInfo( nOperId, 'PRIORITY', 'i') == nPriority ) and
|
||||||
( not StartNames or ( bExistName and ContainsStartName( nOperId, StartNames)) or
|
( not StartNames or ( bExistName and ContainsStartName( nOperId, StartNames)) or
|
||||||
( not bExistName and not ContainsStartName( nOperId, StartNames))) and
|
( not bExistName and not ContainsStartName( nOperId, StartNames))) and
|
||||||
( not sInfo or ( bExistInfo and EgtGetInfo( nOperId, sInfo, 'i') == 1) or
|
( not sInfo or ( bExistInfo and EgtGetInfo( nOperId, sInfo, 'i') == 1) or
|
||||||
@@ -535,17 +537,17 @@ local function SortMach( nPhase, PrevMch, nPartId, nType, StartNames, bExistName
|
|||||||
end
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
local function SortMachinings( nPhase, PrevMch, nPartId)
|
local function SortMachinings( nPhase, PrevMch, nPartId, nPriority)
|
||||||
-- Chiodature
|
-- Chiodature
|
||||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'Nail_'}, true, nil, nil, nil, true)
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'Nail_'}, true, nil, nil, nil, true, nil, nPriority)
|
||||||
-- Tagli con sega a catena che sono rifiniture di spigoli
|
-- Tagli con sega a catena che sono rifiniture di spigoli
|
||||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MORTISING, { 'Csaw_'}, false)
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MORTISING, { 'Csaw_'}, false, nil, nil, nil, nil, nil, nPriority)
|
||||||
-- Forature orizzontali con punte lunghe
|
-- Forature orizzontali con punte lunghe
|
||||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING, { 'LhDrill_'}, true, 'MOVE_AFTER', false, true)
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING, { 'LhDrill_'}, true, 'MOVE_AFTER', false, true, nil, nil, nPriority)
|
||||||
-- Preforature per fori inclinati
|
-- Preforature per fori inclinati
|
||||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.POCKETING, { 'PreDrill_'}, true)
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.POCKETING, { 'PreDrill_'}, true, nil, nil, nil, nil, nil, nPriority)
|
||||||
-- Forature e Svuotature
|
-- Forature e Svuotature
|
||||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING + MCH_OY.POCKETING + MCH_OY.MILLING, { 'SideMill_', 'Clean_'}, false, 'MOVE_AFTER', false, false, true)
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING + MCH_OY.POCKETING + MCH_OY.MILLING, { 'SideMill_', 'Clean_'}, false, 'MOVE_AFTER', false, false, true, nil, nPriority)
|
||||||
-- -- Forature ***
|
-- -- Forature ***
|
||||||
-- PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING, nil, nil, 'MOVE_AFTER', false)
|
-- PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING, nil, nil, 'MOVE_AFTER', false)
|
||||||
-- -- Svuotature ***
|
-- -- Svuotature ***
|
||||||
@@ -553,30 +555,32 @@ local function SortMachinings( nPhase, PrevMch, nPartId)
|
|||||||
-- -- Fresature che sono rifiniture di spigoli
|
-- -- Fresature che sono rifiniture di spigoli
|
||||||
-- PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'Clean_'}, false, 'MOVE_AFTER', false, false, true)
|
-- PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'Clean_'}, false, 'MOVE_AFTER', false, false, true)
|
||||||
-- Lavorazioni di superficie
|
-- Lavorazioni di superficie
|
||||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_MY.SURFFINISHING, nil, nil, 'MOVE_AFTER', false)
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_MY.SURFFINISHING, nil, nil, 'MOVE_AFTER', false, nil, nil, nil, nPriority)
|
||||||
-- Fresature per gole
|
-- Fresature per gole
|
||||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'Gorge_'}, true, 'MOVE_AFTER', false)
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'Gorge_'}, true, 'MOVE_AFTER', false, nil, nil, nil, nPriority)
|
||||||
-- Fresature che sono rifiniture di spigoli
|
-- Fresature che sono rifiniture di spigoli
|
||||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'SideMill_'}, true, 'MOVE_AFTER', false, false, true, true)
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'SideMill_'}, true, 'MOVE_AFTER', false, false, true, true, nPriority)
|
||||||
-- Fresature che sono puliture di spigoli
|
-- Fresature che sono puliture di spigoli
|
||||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'Clean_'}, true, 'MOVE_AFTER', false, false, true)
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'Clean_'}, true, 'MOVE_AFTER', false, false, true, nil, nPriority)
|
||||||
-- Tagli per gole
|
-- Tagli per gole
|
||||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.SAWING, { 'GorgeCut_'}, true)
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.SAWING, { 'GorgeCut_'}, true, nil, nil, nil, nil, nil, nPriority)
|
||||||
-- Tagli con lama
|
-- Tagli con lama
|
||||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.SAWING)
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.SAWING, nil, nil, nil, nil, nil, nil, nil, nPriority)
|
||||||
-- Qui rimozione sfridi (se ci sono lavorazioni successive)
|
-- Qui rimozione sfridi (se ci sono lavorazioni successive)
|
||||||
-- Fresature dei lapjoint che necessitano di gorge
|
if not nPriority then
|
||||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'SideMill_'}, true, 'MOVE_AFTER', true, false, true, true)
|
-- Fresature dei lapjoint che necessitano di gorge
|
||||||
-- Tagli con sega a catena che vanno fatti dopo i tagli con lama
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'SideMill_'}, true, 'MOVE_AFTER', true, false, true, true)
|
||||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MORTISING, { 'Csaw_'}, true)
|
-- Tagli con sega a catena che vanno fatti dopo i tagli con lama
|
||||||
-- Fresature (puliture di spigoli) che vanno fatte dopo i tagli con lama
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MORTISING, { 'Csaw_'}, true)
|
||||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, nil, nil, 'MOVE_AFTER', true)
|
-- Fresature (puliture di spigoli) che vanno fatte dopo i tagli con lama
|
||||||
-- Forature che vanno fatte dopo i tagli con lama
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, nil, nil, 'MOVE_AFTER', true)
|
||||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING, nil, nil, 'MOVE_AFTER', true)
|
-- Forature che vanno fatte dopo i tagli con lama
|
||||||
-- Svuotature che vanno fatte dopo i tagli con lama
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING, nil, nil, 'MOVE_AFTER', true)
|
||||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.POCKETING, nil, nil, 'MOVE_AFTER', true)
|
-- Svuotature che vanno fatte dopo i tagli con lama
|
||||||
-- Lavorazioni di superficie che vanno fatte dopo i tagli con lama
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.POCKETING, nil, nil, 'MOVE_AFTER', true)
|
||||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_MY.SURFFINISHING, nil, nil, 'MOVE_AFTER', true)
|
-- Lavorazioni di superficie che vanno fatte dopo i tagli con lama
|
||||||
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_MY.SURFFINISHING, nil, nil, 'MOVE_AFTER', true)
|
||||||
|
end
|
||||||
return PrevMch
|
return PrevMch
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -641,6 +645,38 @@ function WallExec.ProcessFeatures()
|
|||||||
-- riordino le lavorazioni tra tutti i pezzi
|
-- riordino le lavorazioni tra tutti i pezzi
|
||||||
local nPhase = 1
|
local nPhase = 1
|
||||||
local PrevMch = EgtGetPhaseDisposition( nPhase)
|
local PrevMch = EgtGetPhaseDisposition( nPhase)
|
||||||
|
|
||||||
|
-- abilitazione ordinamento con priorità da btl: 0 = no, 1 = ordine crescente, 2 = ordine decrescente
|
||||||
|
-- le lavorazioni con priorità 0 o senza priorità saranno lasciate per ultime
|
||||||
|
local nGetPriorityFromBtl = WD.BTL_PRIORITY or 0
|
||||||
|
if nGetPriorityFromBtl > 0 then
|
||||||
|
local vPriority = {}
|
||||||
|
local nOperId = EgtGetNextOperation( PrevMch)
|
||||||
|
local nCurrentPriorityId = 1
|
||||||
|
while nOperId do
|
||||||
|
local nPriority = EgtGetInfo( nOperId or GDB_ID.NULL, 'PRIORITY', 'i')
|
||||||
|
if nPriority and nPriority ~= 0 then
|
||||||
|
vPriority[nCurrentPriorityId] = nPriority
|
||||||
|
nCurrentPriorityId = nCurrentPriorityId + 1
|
||||||
|
end
|
||||||
|
nOperId = EgtGetNextOperation( nOperId)
|
||||||
|
end
|
||||||
|
-- sorting delle priorità
|
||||||
|
-- ordine crescente
|
||||||
|
if nGetPriorityFromBtl == 1 then
|
||||||
|
table.sort( vPriority)
|
||||||
|
-- ordine decrescente
|
||||||
|
else
|
||||||
|
table.sort( vPriority, function( a, b) return a > b end)
|
||||||
|
end
|
||||||
|
-- riordino le lavorazioni per priorità
|
||||||
|
for i = 1, #vPriority do
|
||||||
|
if i == 1 or ( vPriority[i] ~= vPriority[i - 1]) then
|
||||||
|
PrevMch = SortMachinings( nPhase, PrevMch, nil, vPriority[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
SortMachinings( nPhase, PrevMch)
|
SortMachinings( nPhase, PrevMch)
|
||||||
-- Aggiornamento finale di tutto
|
-- Aggiornamento finale di tutto
|
||||||
EgtSetCurrPhase( 1)
|
EgtSetCurrPhase( 1)
|
||||||
|
|||||||
@@ -1,4 +1,13 @@
|
|||||||
==== Wall Update Log ====
|
==== Wall Update Log ====
|
||||||
|
|
||||||
|
Versione 2.5d2 (20/04/2023)
|
||||||
|
- Added : in TS3v7 aggiunta gestione flag per taglio feature con outline (da parametro macchina WD.CUT_WITH_OUTLINE)
|
||||||
|
- Added : in TS3v7 aggiunta gestione flag per rotazione grezzo di 180deg (da parametro macchina WD.RAWPART_ROT)
|
||||||
|
- Modif : in LapJoint con lavorazione di lato se MCH_SCC.ADIR_NEAR fallisce si riprova con MCH_SCC.ADIR_FAR
|
||||||
|
- Fixed : in FreeContour e assimilati aggiunta pulitura spigoli Q05=1 anche su sole fresature
|
||||||
|
- Fixed : in LapJoint e assimilati corretta ricerca utensile in lavorazione 'SideGroove'
|
||||||
|
- Fixed : in FreeContour e LapJoint la lavorazione CleanCorner viene sempre forzata con lato di lavoro in centro
|
||||||
|
- Fixed : in LapJoint razionalizzata gestione parametri Q ed eliminta gestione forzatura lama non usata.
|
||||||
|
|
||||||
Versione 2.5d1 (06/04/23)
|
Versione 2.5d1 (06/04/23)
|
||||||
- Added : in nesting aggiunti valori di default per alcuni parametri letti dal WallData.
|
- Added : in nesting aggiunti valori di default per alcuni parametri letti dal WallData.
|
||||||
Reference in New Issue
Block a user