Compare commits
125 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d6e98875fa | |||
| ba6142dbc5 | |||
| cfaa30d55c | |||
| ea79ac1366 | |||
| 2468599200 | |||
| ea598ef7ff | |||
| 9290d3f1cf | |||
| 698a913a93 | |||
| f62c42475e | |||
| f397b220b9 | |||
| d19cf453e0 | |||
| a9d497925d | |||
| ef5170b6e6 | |||
| 3d2b740e89 | |||
| b7078cfe11 | |||
| 30726886c1 | |||
| ed80dccaf0 | |||
| 0f4a0804e2 | |||
| 8830001985 | |||
| c0e2199903 | |||
| b7854f1160 | |||
| 63ad68a653 | |||
| 4458c174e8 | |||
| 697965b30b | |||
| 20900c9724 | |||
| 9043e80c84 | |||
| 45780fce29 | |||
| 45cdddb994 | |||
| 24e20625b6 | |||
| c77062160a | |||
| bb0d02c1e5 | |||
| cb2c752d65 | |||
| 30d0efa0ca | |||
| 7f4e117339 | |||
| 366a9d5f49 | |||
| 9e869b5c26 | |||
| a0e82e5647 | |||
| a17e649d44 | |||
| 79856f6345 | |||
| 94e0ba559b | |||
| 2bde93681f | |||
| bc467fc784 | |||
| fc5071a9ae | |||
| 036c782671 | |||
| 5a6ac3ac8d | |||
| 234692545d | |||
| 17d411e5c2 | |||
| 4b0334ab65 | |||
| b6f025266d | |||
| c91b58b6a1 | |||
| 533a8e9f1f | |||
| 8d26b20ce4 | |||
| dbf668863a | |||
| 5b45aee1f2 | |||
| 2b94531281 | |||
| ed0e726391 | |||
| 14d726ffae | |||
| 9dc093e16b | |||
| 7775fa75fc | |||
| a449af35d9 | |||
| 83432e36f4 | |||
| 740d244d87 | |||
| 3e7b1dc0fd | |||
| 10e5d79412 | |||
| 97e204fbb1 | |||
| 74daefd044 | |||
| a92d22e526 | |||
| 099b159aae | |||
| 76624de1a5 | |||
| e15a833158 | |||
| 9046099e35 | |||
| 8f36025b64 | |||
| 0bec7ba4a5 | |||
| 95346a26d7 | |||
| e59ca27cdf | |||
| 10c44c7f82 | |||
| b2adfc098b | |||
| ec1eddf909 | |||
| dfeb8c38dd | |||
| a6b72d13cd | |||
| c58a9e7912 | |||
| a13dcbccf9 | |||
| 437682ab7a | |||
| a7d6363228 | |||
| b452a9ad99 | |||
| 4fc7110885 | |||
| f07e0d4afd | |||
| 29c1eaed0c | |||
| 6cf29a3a06 | |||
| 0f84937c6f | |||
| d8af5b3989 | |||
| b8ee911ed5 | |||
| 95006f4cce | |||
| 0b78227c6b | |||
| b6dd9a096a | |||
| 2b67b00d2e | |||
| f434c70f22 | |||
| 221162ce9d | |||
| f48b40d633 | |||
| 0388dbdc0f | |||
| a27566031b | |||
| 36ddc182f9 | |||
| cb473692dd | |||
| 3e805545f0 | |||
| 611ab1cb12 | |||
| 6fda7f818f | |||
| d4c94d9e8a | |||
| 612b73e2e9 | |||
| d82802bd10 | |||
| 00d5f929bb | |||
| 8c30535a69 | |||
| 5d5eb3f5cc | |||
| e3faec9d5d | |||
| e844d761f9 | |||
| 6a86f7798e | |||
| 6a6a194df6 | |||
| dcd600af01 | |||
| 854fafddf2 | |||
| ef6cbc35df | |||
| 2887591da4 | |||
| 3d75344652 | |||
| 1952c937b0 | |||
| 99baaa6320 | |||
| 1bf70aaf27 | |||
| b726fbc2cc |
+48
-3
@@ -1,4 +1,4 @@
|
|||||||
-- BatchProcess.lua by Egaltech s.r.l. 2023/04/17
|
-- BatchProcess.lua by Egaltech s.r.l. 2025/07/17
|
||||||
-- Gestione calcolo batch disposizione e lavorazioni per Pareti
|
-- Gestione calcolo batch disposizione e lavorazioni per Pareti
|
||||||
-- 2020/07/24 Nuvola di punti riferita allo Zero Tavola.
|
-- 2020/07/24 Nuvola di punti riferita allo Zero Tavola.
|
||||||
-- 2020/10/28 Corretto spostamento pezzi per rotazioni (0 o 180) e inversioni( 0, 90, 180, o 270).
|
-- 2020/10/28 Corretto spostamento pezzi per rotazioni (0 o 180) e inversioni( 0, 90, 180, o 270).
|
||||||
@@ -92,13 +92,49 @@ end
|
|||||||
-- Funzione per aggiornare dati ausiliari
|
-- Funzione per aggiornare dati ausiliari
|
||||||
local function UpdateAuxData( sAuxFile)
|
local function UpdateAuxData( sAuxFile)
|
||||||
local bModif = false
|
local bModif = false
|
||||||
|
local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL
|
||||||
|
-- Se definito PROJID, aggiorno
|
||||||
|
local sProjId = EgtGetStringFromIni( 'AuxData', 'PROJID', '', sAuxFile)
|
||||||
|
if sProjId ~= '' then
|
||||||
|
EgtSetInfo( BtlInfoId, 'PROJECTNUMBER', sProjId)
|
||||||
|
bModif = true
|
||||||
|
end
|
||||||
|
-- Se definito PRODID, aggiorno
|
||||||
|
local sProdId = EgtGetStringFromIni( 'AuxData', 'PRODID', '', sAuxFile)
|
||||||
|
if sProdId ~= '' then
|
||||||
|
EgtSetInfo( BtlInfoId, 'PRODID', sProdId)
|
||||||
|
bModif = true
|
||||||
|
end
|
||||||
-- Se definito LOAD90, aggiorno
|
-- Se definito LOAD90, aggiorno
|
||||||
local sLoad90 = EgtGetStringFromIni( 'AuxData', 'LOAD90', '', sAuxFile)
|
local sLoad90 = EgtGetStringFromIni( 'AuxData', 'LOAD90', '', sAuxFile)
|
||||||
if sLoad90 ~= '' then
|
if sLoad90 ~= '' then
|
||||||
local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL
|
|
||||||
EgtSetInfo( BtlInfoId, 'LOAD90', sLoad90)
|
EgtSetInfo( BtlInfoId, 'LOAD90', sLoad90)
|
||||||
bModif = true
|
bModif = true
|
||||||
end
|
end
|
||||||
|
-- Se definito REFPOS, aggiorno
|
||||||
|
local sRefPos = EgtGetStringFromIni( 'AuxData', 'REFPOS', '', sAuxFile)
|
||||||
|
if sRefPos ~= '' then
|
||||||
|
EgtSetInfo( BtlInfoId, 'REFPOS', sRefPos)
|
||||||
|
bModif = true
|
||||||
|
end
|
||||||
|
-- Se definito PANELDELTAX, aggiorno
|
||||||
|
local sPanelDeltaX = EgtGetStringFromIni( 'AuxData', 'PANELDELTAX', '', sAuxFile)
|
||||||
|
if sPanelDeltaX ~= '' then
|
||||||
|
EgtSetInfo( BtlInfoId, 'PANELDELTAX', sPanelDeltaX)
|
||||||
|
bModif = true
|
||||||
|
end
|
||||||
|
-- Se definito PANELDELTAY, aggiorno
|
||||||
|
local sPanelDeltaY = EgtGetStringFromIni( 'AuxData', 'PANELDELTAY', '', sAuxFile)
|
||||||
|
if sPanelDeltaY ~= '' then
|
||||||
|
EgtSetInfo( BtlInfoId, 'PANELDELTAY', sPanelDeltaY)
|
||||||
|
bModif = true
|
||||||
|
end
|
||||||
|
-- Se definito PANELDELTAZ, aggiorno
|
||||||
|
local sPanelDeltaZ = EgtGetStringFromIni( 'AuxData', 'PANELDELTAZ', '', sAuxFile)
|
||||||
|
if sPanelDeltaZ ~= '' then
|
||||||
|
EgtSetInfo( BtlInfoId, 'PANELDELTAZ', sPanelDeltaZ)
|
||||||
|
bModif = true
|
||||||
|
end
|
||||||
return bModif
|
return bModif
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -139,7 +175,6 @@ end
|
|||||||
-- Carico le librerie
|
-- Carico le librerie
|
||||||
_G.package.loaded.WallExec = nil
|
_G.package.loaded.WallExec = nil
|
||||||
local WE = require( 'WallExec')
|
local WE = require( 'WallExec')
|
||||||
--local BL = require( 'BeamLib')
|
|
||||||
|
|
||||||
-- Carico i dati globali
|
-- Carico i dati globali
|
||||||
local WD = require( 'WallData')
|
local WD = require( 'WallData')
|
||||||
@@ -508,8 +543,18 @@ else
|
|||||||
end
|
end
|
||||||
-- Aggiorno eventuali dati ausiliari
|
-- Aggiorno eventuali dati ausiliari
|
||||||
UpdateAuxData( sBtmFile)
|
UpdateAuxData( sBtmFile)
|
||||||
|
|
||||||
|
-- Anche se non è da riprocessare, imposto nome file CN.
|
||||||
|
-- Se file TS7 importato da altro PC, 'WALL.FILE' è cambiato da un PC all'altro. Di conseguenza si deve aggiornare nome file che si andrà a generare.
|
||||||
|
local _, sName, _ = EgtSplitPath( WALL.FILE)
|
||||||
|
EgtSetInfo( EgtGetLastMachGroup(), 'NcName', sName .. '.cnc')
|
||||||
|
|
||||||
-- Passo in modalità lavora
|
-- Passo in modalità lavora
|
||||||
EgtSetCurrMachGroup( EgtGetLastMachGroup())
|
EgtSetCurrMachGroup( EgtGetLastMachGroup())
|
||||||
|
-- Aggiorno posizione del grezzo
|
||||||
|
if WE.MoveRaw() then
|
||||||
|
bToRecalc = true
|
||||||
|
end
|
||||||
-- Se necessario eseguo aggiornamento con ricalcolo delle lavorazioni
|
-- Se necessario eseguo aggiornamento con ricalcolo delle lavorazioni
|
||||||
if bToRecalc or WALL.FLAG == 3 or WALL.FLAG == 4 then
|
if bToRecalc or WALL.FLAG == 3 or WALL.FLAG == 4 then
|
||||||
EgtOutLog( ' +++ Recalculating all dispositions and machinings >>>')
|
EgtOutLog( ' +++ Recalculating all dispositions and machinings >>>')
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ REM Per togliere info di debug aggiungere flag -s prima del nome del file di inp
|
|||||||
|
|
||||||
REM Compilazione 32 e 64 bit
|
REM Compilazione 32 e 64 bit
|
||||||
|
|
||||||
|
\EgtProg\Dll32\luac54 -o bin\LuaLibs\PanelSaw.lua -s LuaLibs\PanelSaw.lua
|
||||||
\EgtProg\Dll32\luac54 -o bin\LuaLibs\Squaring.lua -s LuaLibs\Squaring.lua
|
\EgtProg\Dll32\luac54 -o bin\LuaLibs\Squaring.lua -s LuaLibs\Squaring.lua
|
||||||
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WallExec.lua -s LuaLibs\WallExec.lua
|
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WallExec.lua -s LuaLibs\WallExec.lua
|
||||||
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WallLib.lua -s LuaLibs\WallLib.lua
|
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WallLib.lua -s LuaLibs\WallLib.lua
|
||||||
|
|||||||
@@ -0,0 +1,438 @@
|
|||||||
|
-- PanelSaw.lua by Egalware s.r.l. 2025/09/02
|
||||||
|
-- Creazione lista taglio e/o programmi di taglio per sezionatrici
|
||||||
|
|
||||||
|
-- Intestazioni
|
||||||
|
require( 'EgtBase')
|
||||||
|
|
||||||
|
-- Dati
|
||||||
|
local WL = require ( 'WallLib')
|
||||||
|
|
||||||
|
local PanelSaw = {}
|
||||||
|
|
||||||
|
|
||||||
|
local function GetPanelList()
|
||||||
|
|
||||||
|
local PanelList = {}
|
||||||
|
local idMachGroup = EgtGetFirstMachGroup()
|
||||||
|
local nMachGroupCount = EgtGetMachGroupCount()
|
||||||
|
|
||||||
|
-- nessun MachGroup ossia nessun pannello: si esce subito
|
||||||
|
if ( not idMachGroup) or ( nMachGroupCount == 0) then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- per ogni MachGroup si estraggono le informazioni del pannello
|
||||||
|
for i = 1, nMachGroupCount do
|
||||||
|
|
||||||
|
local vPartInfo = EgtSplitString( EgtGetInfo( idMachGroup, 'PART1', 's'))
|
||||||
|
local idPart = vPartInfo[1]
|
||||||
|
|
||||||
|
table.insert( PanelList, {})
|
||||||
|
PanelList[i].dLength = EgtGetInfo( idMachGroup, 'PANELLEN', 'd')
|
||||||
|
PanelList[i].dWidth = EgtGetInfo( idMachGroup, 'PANELWIDTH', 'd')
|
||||||
|
PanelList[i].dThickness = EgtGetInfo( idMachGroup, 'PANELHEIGHT', 'd')
|
||||||
|
PanelList[i].sMaterialFullName = EgtGetInfo( idMachGroup, 'MATERIAL', 's') or '0000-MATERIAL'
|
||||||
|
PanelList[i].sMaterialPlusThickness = PanelList[i].sMaterialFullName .. '_' .. tostring( string.format( '%.1f', PanelList[i].dThickness))
|
||||||
|
local vMaterialInfo = EgtSplitString( PanelList[i].sMaterialFullName, '-')
|
||||||
|
PanelList[i].idMaterial = vMaterialInfo[1]
|
||||||
|
PanelList[i].idProd = EgtGetInfo( idMachGroup, 'PRODID', 'i')
|
||||||
|
PanelList[i].idPatt = EgtGetInfo( idMachGroup, 'PATTID', 'i')
|
||||||
|
PanelList[i].nPdn = EgtGetInfo( idPart, 'PDN', 'i')
|
||||||
|
PanelList[i].sName = EgtGetInfo( idPart, 'NAM', 's')
|
||||||
|
PanelList[i].sDescription = PanelList[i].sName
|
||||||
|
local sGrainInfo = EgtGetInfo( idPart, "GRAINDIRECTION", 's')
|
||||||
|
PanelList[i].sGrainDirection = 'None'
|
||||||
|
if sGrainInfo then
|
||||||
|
local bUseGrain = ( string.sub( sGrainInfo, 7) == '1')
|
||||||
|
local sGrainDirection = string.sub( sGrainInfo, 1, 5)
|
||||||
|
if bUseGrain then
|
||||||
|
if sGrainDirection == "1,0,0" then
|
||||||
|
PanelList[i].sGrainDirection = 'Length'
|
||||||
|
elseif sGrainDirection == "0,1,0" then
|
||||||
|
PanelList[i].sGrainDirection = 'Width'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- in questa modalità ogni MachGroup è 1 pezzo, non esistono multipli
|
||||||
|
-- TODO valutare se raggruppare i pannelli uguali per la cutting list
|
||||||
|
PanelList[i].nQuantity = 1
|
||||||
|
-- TODO le informazioni di edgebanding devono arrivare dal btl
|
||||||
|
PanelList[i].sEdgeMaterialLeft = ''
|
||||||
|
PanelList[i].sEdgeMaterialRight = ''
|
||||||
|
PanelList[i].sEdgeMaterialTop = ''
|
||||||
|
PanelList[i].sEdgeMaterialBottom = ''
|
||||||
|
-- TODO il barcode deve arrivare dal btl
|
||||||
|
PanelList[i].sBarcode = ''
|
||||||
|
|
||||||
|
idMachGroup = EgtGetNextMachGroup( idMachGroup)
|
||||||
|
end
|
||||||
|
|
||||||
|
return PanelList
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function GetSheetList()
|
||||||
|
|
||||||
|
local SheetList = {
|
||||||
|
{
|
||||||
|
dLength = 2800,
|
||||||
|
dWidth = 2070,
|
||||||
|
dThickness = 8,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dLength = 2800,
|
||||||
|
dWidth = 2070,
|
||||||
|
dThickness = 18,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return SheetList
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function GetProjectInfo()
|
||||||
|
|
||||||
|
local ProjectInfo = {}
|
||||||
|
local idBtlInfo = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL
|
||||||
|
|
||||||
|
_, ProjectInfo.sProjectName = EgtSplitPath( EgtGetInfo( idBtlInfo, 'PROJECTNAME', 's') or '')
|
||||||
|
|
||||||
|
return ProjectInfo
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function BuildCuttingList_Cutty( PanelList, SheetList, ProjectInfo)
|
||||||
|
|
||||||
|
-- se il numero di pezzi supera il limite, si devono creare più liste
|
||||||
|
local nMaxPanelsCount = 30
|
||||||
|
local SplittedPanelList = WL.SplitTableInChunks( PanelList, nMaxPanelsCount)
|
||||||
|
local LinesToWriteList = {}
|
||||||
|
|
||||||
|
for nCurrentPanelList = 1, #SplittedPanelList do
|
||||||
|
local Lines = {}
|
||||||
|
local CurrentPanelList = SplittedPanelList[nCurrentPanelList]
|
||||||
|
LinesToWriteList[nCurrentPanelList] = {}
|
||||||
|
|
||||||
|
local F0 = {
|
||||||
|
Header = { 'F0'},
|
||||||
|
HeaderPlaceholders = { '%-53s'},
|
||||||
|
Values = { ' 7.70', '210700', '150300'},
|
||||||
|
ValuesPlaceholders = { '%s', '%s', '%s'}
|
||||||
|
}
|
||||||
|
|
||||||
|
local F0b = {
|
||||||
|
Header = { 'F0b', '""', '""', '""', '""'},
|
||||||
|
HeaderPlaceholders = { '%s', '%s', '%s', '%s', '%s'}
|
||||||
|
}
|
||||||
|
|
||||||
|
local F1 = {
|
||||||
|
Header = { 'F1', CurrentPanelList[1].dThickness, 0, 0, 0, ''},
|
||||||
|
HeaderPlaceholders = { '%s', '%.3f', '%.3f', '%.3f', '%.3f', '%-20s'},
|
||||||
|
ValuesList = {},
|
||||||
|
ValuesPlaceholders = { '%.3f', '%.3f', '%d', '%d', '%d', '%-29d', '%-50s', '%d', '%.3f', '%d', '%d', '%d', '%d'},
|
||||||
|
}
|
||||||
|
for i = 1, #SheetList do
|
||||||
|
F1.ValuesList[i] = { SheetList[i].dLength, SheetList[i].dWidth, 99, 200, 1, 1, CurrentPanelList[1].sMaterialFullName, 0, 1, 0, 0, 0, 0}
|
||||||
|
end
|
||||||
|
|
||||||
|
local F2 = {
|
||||||
|
Header = { 'F2', 0, 0, 0},
|
||||||
|
HeaderPlaceholders = { '%s', '%d', '%d', '%d'},
|
||||||
|
ValuesList = {},
|
||||||
|
ValuesPlaceholders = { '%.3f', '%.3f', '%d', '%d', '%d', '%d', '%d', '%-20s', '%d', '%d', '%d', '%d', '%-50s', '%d', '%d', '%d', '%d', '%d', '%d', '%.3f', '%d', '%d', '%-85d', '%.3f', '%.3f'},
|
||||||
|
}
|
||||||
|
for i = 1, #CurrentPanelList do
|
||||||
|
local nGrain = 0
|
||||||
|
if PanelList[i].sGrainDirection == 'Length' then
|
||||||
|
nGrain = 1
|
||||||
|
elseif PanelList[i].sGrainDirection == 'Width' then
|
||||||
|
nGrain = 1
|
||||||
|
CurrentPanelList[i].dLength, CurrentPanelList[i].dWidth = CurrentPanelList[i].dWidth, CurrentPanelList[i].dLength
|
||||||
|
end
|
||||||
|
F2.ValuesList[i] = { CurrentPanelList[i].dLength, CurrentPanelList[i].dWidth, CurrentPanelList[i].nQuantity, 0, nGrain, 0, 0, CurrentPanelList[i].nPdn, 0, 0, 0, 0, CurrentPanelList[i].sDescription, 0, 0, 0, 0, 1, 0, 1500, 0, 0, 0, 0, 0}
|
||||||
|
end
|
||||||
|
|
||||||
|
local F7 = {
|
||||||
|
Header = { 'F7', 3052, 0},
|
||||||
|
HeaderPlaceholders = { '%s', '%s', '%d'},
|
||||||
|
ValuesList = {
|
||||||
|
{ 218, 436},
|
||||||
|
{ 167, 669},
|
||||||
|
{ 204, 408},
|
||||||
|
{ 204, 204},
|
||||||
|
{ 204, 204},
|
||||||
|
{ 209, 209},
|
||||||
|
{ 167, 167},
|
||||||
|
{ 213, 213},
|
||||||
|
{ 229, 229},
|
||||||
|
{ 164, 164},
|
||||||
|
{ 150, 150}
|
||||||
|
},
|
||||||
|
ValuesPlaceholders = {
|
||||||
|
{ '%s', '%s'},
|
||||||
|
{ '%s', '%s'},
|
||||||
|
{ '%s', '%s'},
|
||||||
|
{ '%s', '%s'},
|
||||||
|
{ '%s', '%s'},
|
||||||
|
{ '%s', '%s'},
|
||||||
|
{ '%s', '%s'},
|
||||||
|
{ '%s', '%s'},
|
||||||
|
{ '%s', '%s'},
|
||||||
|
{ '%s', '%s'},
|
||||||
|
{ '%s', '%s'}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
local F7b = {
|
||||||
|
Header = { 'F7b', 0, 0, 0, 0},
|
||||||
|
HeaderPlaceholders = { '%s', '%.3f', '%.3f', '%.3f', '%.3f'},
|
||||||
|
Values = {},
|
||||||
|
ValuesPlaceholders = {}
|
||||||
|
}
|
||||||
|
|
||||||
|
local F8 = {
|
||||||
|
Header = { 'F8', 0, 0, 20, 20, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||||
|
HeaderPlaceholders = { '%s', '%.3f', '%.3f', '%d', '%d', '%d', '%d', '%.3f', '%d', '%d', '%d', '%d', '%d', '%d', '%.3f', '%d', '%d', '%d', '%d', '%d', '%d', '%.3f', '%.3f', '%.3f'}
|
||||||
|
}
|
||||||
|
|
||||||
|
local F9 = {
|
||||||
|
Header = { 'F9', 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 4.3, 0, 0, 0, 2, 0, 2450, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||||
|
HeaderPlaceholders = { '%s', '%d', '%.3f', '%d', '%.3f', '%.3f', '%.3f', '%.3f', '%.3f', '%d', '%d', '%.3f', '%d', '%d', '%d', '%d', '%.3f', '%.3f', '%d', '%d', '%.3f', '%.3f', '%.3f', '%.3f', '%d', '%d', '%.3f', '%.3f'}
|
||||||
|
}
|
||||||
|
|
||||||
|
local F3 = {
|
||||||
|
Header = { 'F3'},
|
||||||
|
HeaderPlaceholders = { '%s'}
|
||||||
|
}
|
||||||
|
|
||||||
|
local E0 = {
|
||||||
|
Header = { 'E0'},
|
||||||
|
HeaderPlaceholders = { '%s'}
|
||||||
|
}
|
||||||
|
|
||||||
|
-- F0
|
||||||
|
table.insert( Lines, string.format( table.concat( F0.HeaderPlaceholders, ' '), table.unpack( F0.Header)))
|
||||||
|
table.insert( Lines, string.format( table.concat( F0.ValuesPlaceholders, ' '), table.unpack( F0.Values)))
|
||||||
|
|
||||||
|
-- linea vuota
|
||||||
|
table.insert( Lines, '')
|
||||||
|
|
||||||
|
-- F0b
|
||||||
|
table.insert( Lines, string.format( table.concat( F0b.HeaderPlaceholders, ' '), table.unpack( F0b.Header)))
|
||||||
|
|
||||||
|
-- linea vuota
|
||||||
|
table.insert( Lines, '')
|
||||||
|
|
||||||
|
-- F1 - sheets
|
||||||
|
table.insert( Lines, string.format( table.concat( F1.HeaderPlaceholders, ' '), table.unpack( F1.Header)))
|
||||||
|
for i = 1, #F1.ValuesList do
|
||||||
|
local Values = F1.ValuesList[i]
|
||||||
|
local Placeholders = F1.ValuesPlaceholders
|
||||||
|
table.insert( Lines, string.format( table.concat( Placeholders, ' '), table.unpack( Values)))
|
||||||
|
end
|
||||||
|
|
||||||
|
-- linea vuota
|
||||||
|
table.insert( Lines, '')
|
||||||
|
|
||||||
|
-- F2 - panels
|
||||||
|
table.insert( Lines, string.format( table.concat( F2.HeaderPlaceholders, ' '), table.unpack( F2.Header)))
|
||||||
|
for i = 1, #F2.ValuesList do
|
||||||
|
local Values = F2.ValuesList[i]
|
||||||
|
local Placeholders = F2.ValuesPlaceholders
|
||||||
|
table.insert( Lines, string.format( table.concat( Placeholders, ' '), table.unpack( Values)))
|
||||||
|
end
|
||||||
|
|
||||||
|
-- linea vuota
|
||||||
|
table.insert( Lines, '')
|
||||||
|
|
||||||
|
-- F7
|
||||||
|
table.insert( Lines, string.format( table.concat( F7.HeaderPlaceholders, ' '), table.unpack( F7.Header)))
|
||||||
|
for i = 1, #F7.ValuesList do
|
||||||
|
local Values = F7.ValuesList[i]
|
||||||
|
local Placeholders = F7.ValuesPlaceholders[i]
|
||||||
|
table.insert( Lines, string.format( table.concat( Placeholders, ' '), table.unpack( Values)))
|
||||||
|
end
|
||||||
|
|
||||||
|
-- linea vuota
|
||||||
|
table.insert( Lines, '')
|
||||||
|
|
||||||
|
-- F7b
|
||||||
|
table.insert( Lines, string.format( table.concat( F7b.HeaderPlaceholders, ' '), table.unpack( F7b.Header)))
|
||||||
|
|
||||||
|
-- linea vuota
|
||||||
|
table.insert( Lines, '')
|
||||||
|
|
||||||
|
-- F8
|
||||||
|
table.insert( Lines, string.format( table.concat( F8.HeaderPlaceholders, ' '), table.unpack( F8.Header)))
|
||||||
|
|
||||||
|
-- linea vuota
|
||||||
|
table.insert( Lines, '')
|
||||||
|
|
||||||
|
-- F9
|
||||||
|
table.insert( Lines, string.format( table.concat( F9.HeaderPlaceholders, ' '), table.unpack( F9.Header)))
|
||||||
|
|
||||||
|
-- linea vuota
|
||||||
|
table.insert( Lines, '')
|
||||||
|
|
||||||
|
-- F3
|
||||||
|
table.insert ( Lines, string.format( table.concat( F3.HeaderPlaceholders, ' '), table.unpack( F3.Header)))
|
||||||
|
|
||||||
|
-- E0
|
||||||
|
table.insert( Lines, string.format( table.concat( E0.HeaderPlaceholders, ' '), table.unpack( E0.Header)))
|
||||||
|
|
||||||
|
-- linea vuota
|
||||||
|
table.insert( Lines, '')
|
||||||
|
|
||||||
|
LinesToWriteList[nCurrentPanelList] = Lines
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
return LinesToWriteList
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function BuildCuttingList_Homag( PanelList, ActualSheetList, ProjectInfo)
|
||||||
|
|
||||||
|
local LinesToWriteList = {}
|
||||||
|
local sExtension = 'csv'
|
||||||
|
local Lines = {}
|
||||||
|
|
||||||
|
local Header = {
|
||||||
|
Values = { 'Description', 'Quantity', 'Length', 'Width', 'Material', 'Grain', 'EdgeLeft', 'EdgeRight', 'EdgeTop', 'EdgeBottom', 'OrderNumber', 'BarCode'},
|
||||||
|
ValuesPlaceholders = { '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s'}
|
||||||
|
}
|
||||||
|
|
||||||
|
local Panels = {
|
||||||
|
ValuesList = {},
|
||||||
|
ValuesPlaceholders = { '%s', '%d', '%.1f', '%.1f', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' }
|
||||||
|
}
|
||||||
|
for i = 1, #PanelList do
|
||||||
|
local sGrain = PanelList[i].sGrainDirection
|
||||||
|
-- TODO questo dipenderà dalla lingua dell'esportazione; andrà fatto un tipo di esportazione specifica per ogni lingua (es: HOMAG_NL, HOMAG_ENG, ...)
|
||||||
|
if sGrain == 'None' then
|
||||||
|
sGrain = 'Geen'
|
||||||
|
elseif sGrain == 'Length' then
|
||||||
|
sGrain = 'Lengte'
|
||||||
|
elseif sGrain == 'Width' then
|
||||||
|
sGrain = 'Breedte'
|
||||||
|
end
|
||||||
|
Panels.ValuesList[i] = { PanelList[i].sDescription, PanelList[i].nQuantity, PanelList[i].dLength, PanelList[i].dWidth, PanelList[i].sMaterialPlusThickness, sGrain, PanelList[i].sEdgeMaterialLeft, PanelList[i].sEdgeMaterialRight, PanelList[i].sEdgeMaterialTop, PanelList[i].sEdgeMaterialBottom, ProjectInfo.sProjectName, PanelList[i].sBarcode}
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Intestazione
|
||||||
|
table.insert( Lines, string.format( table.concat( Header.ValuesPlaceholders, ','), table.unpack( Header.Values)))
|
||||||
|
|
||||||
|
-- Lista Pannelli
|
||||||
|
for i = 1, #Panels.ValuesList do
|
||||||
|
local Values = Panels.ValuesList[i]
|
||||||
|
local Placeholders = Panels.ValuesPlaceholders
|
||||||
|
table.insert( Lines, string.format( table.concat( Placeholders, ','), table.unpack( Values)))
|
||||||
|
end
|
||||||
|
|
||||||
|
LinesToWriteList[1] = Lines
|
||||||
|
|
||||||
|
return LinesToWriteList, sExtension
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function BuildCuttingList( PanelList, sOutputType)
|
||||||
|
|
||||||
|
local LinesToWriteList = {}
|
||||||
|
local sExtension = ''
|
||||||
|
local SheetList = GetSheetList()
|
||||||
|
local ProjectInfo = GetProjectInfo()
|
||||||
|
local dRequiredThickness = PanelList[1].dThickness
|
||||||
|
|
||||||
|
-- solo gli sheets dello spessore corretto vanno considerati
|
||||||
|
local ActualSheetList = {}
|
||||||
|
for i = 1, #SheetList do
|
||||||
|
if abs( SheetList[i].dThickness - dRequiredThickness) < 10 * GEO.EPS_SMALL then
|
||||||
|
ActualSheetList[#ActualSheetList+1] = {
|
||||||
|
dLength = SheetList[i].dLength,
|
||||||
|
dWidth = SheetList[i].dWidth,
|
||||||
|
dThickness = SheetList[i].dThickness,
|
||||||
|
sMaterial = SheetList[i].sMaterial
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Casadei
|
||||||
|
if sOutputType == 'CUTTY' then
|
||||||
|
|
||||||
|
LinesToWriteList = BuildCuttingList_Cutty( PanelList, ActualSheetList, ProjectInfo)
|
||||||
|
|
||||||
|
-- Homag
|
||||||
|
elseif sOutputType == 'HOMAG' then
|
||||||
|
|
||||||
|
LinesToWriteList, sExtension = BuildCuttingList_Homag( PanelList, ActualSheetList, ProjectInfo)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
return LinesToWriteList, sExtension
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- restituisce i pannelli raggruppati per coppia materiale-spessore univoca
|
||||||
|
local function GroupByMaterial( PanelList)
|
||||||
|
local PanelsGroupedByMaterial = {}
|
||||||
|
|
||||||
|
for i = 1, #PanelList do
|
||||||
|
local idMaterial = PanelList[i].idMaterial
|
||||||
|
local dMaterialThickness = PanelList[i].dThickness
|
||||||
|
|
||||||
|
-- si crea una chiave unica dalla coppia
|
||||||
|
local key = idMaterial .. "_" .. tostring( dMaterialThickness)
|
||||||
|
|
||||||
|
-- se la chiave non esiste già nella tabella, si crea
|
||||||
|
if not PanelsGroupedByMaterial[key] then
|
||||||
|
PanelsGroupedByMaterial[key] = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
-- aggiunta del pezzo corrente al gruppo chiave corrispondente
|
||||||
|
table.insert( PanelsGroupedByMaterial[key], PanelList[i])
|
||||||
|
end
|
||||||
|
|
||||||
|
return PanelsGroupedByMaterial
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function PanelSaw.GenerateCuttingList( sOutputType)
|
||||||
|
|
||||||
|
local PanelList = GetPanelList()
|
||||||
|
local PanelsGroupedByMaterial = GroupByMaterial( PanelList)
|
||||||
|
|
||||||
|
for key, PanelListSingleMaterial in pairs( PanelsGroupedByMaterial) do
|
||||||
|
|
||||||
|
-- path in cui scrivere i file
|
||||||
|
local sCurrentNgePath, sCurrentNgeName = EgtSplitPath( EgtGetCurrFilePath())
|
||||||
|
|
||||||
|
if sOutputType then
|
||||||
|
-- costruzione lista istruzioni
|
||||||
|
local LinesToWriteList, sExtension = BuildCuttingList( PanelListSingleMaterial, sOutputType)
|
||||||
|
|
||||||
|
for i = 1, #LinesToWriteList do
|
||||||
|
-- scrittura file
|
||||||
|
local sFilename = sCurrentNgePath .. 'CutList-' .. sCurrentNgeName .. '-' .. key .. '-' .. i .. sOutputType
|
||||||
|
sFilename = sFilename:gsub( '%.', '_')
|
||||||
|
-- aggiunta eventuale estensione
|
||||||
|
sFilename = sFilename .. '.' .. sExtension
|
||||||
|
local hFile, nFileErr = io.open( sFilename, 'w')
|
||||||
|
if not hFile then
|
||||||
|
EgtOutLog( 'Error creating cutting list : IO error ' .. tostring( nFileErr))
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
hFile:write( table.concat( LinesToWriteList[i], "\n"))
|
||||||
|
hFile:close()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- se nessun tipo si deve scrivere un json semplice
|
||||||
|
else
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
return PanelSaw
|
||||||
@@ -466,7 +466,10 @@ function Squaring.AddMachinings( SquaringParameters, b3Squaring, nFirstOperation
|
|||||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||||
|
|
||||||
local bOk = EgtApplyMachining( true, false)
|
local bOk = EgtApplyMachining( true, false)
|
||||||
EgtRelocateGlob( nOperationId, nFirstOperationId, GDB_IN.BEFORE)
|
-- la squadratura va sempre prima delle eventuali altre lavorazioni
|
||||||
|
if nFirstOperationId then
|
||||||
|
EgtRelocateGlob( nOperationId, nFirstOperationId, GDB_IN.BEFORE)
|
||||||
|
end
|
||||||
if not bOk then
|
if not bOk then
|
||||||
local _, sMsg = EgtGetLastMachMgrError()
|
local _, sMsg = EgtGetLastMachMgrError()
|
||||||
nNotOkCount = nNotOkCount + 1
|
nNotOkCount = nNotOkCount + 1
|
||||||
|
|||||||
@@ -148,18 +148,27 @@ function WMachiningLib.FindSawing( sType)
|
|||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
function WMachiningLib.FindDrilling( dDiam, dDepth, sHead, bOnlyPockets)
|
function WMachiningLib.FindDrilling( dDiam, dDepth, sHead, bOnlyPockets, bUseMultiDrill, DrillingsToAvoid)
|
||||||
if bOnlyPockets == nil or not bOnlyPockets then
|
if bOnlyPockets == nil or not bOnlyPockets then
|
||||||
-- ricerca sulle forature, dal diametro maggiore al minore
|
-- ricerca sulle forature, dal diametro maggiore al minore
|
||||||
for i = #Drillings, 1, -1 do
|
for i = #Drillings, 1, -1 do
|
||||||
local Drilling = Drillings[i]
|
local Drilling = Drillings[i]
|
||||||
if Drilling.On and Drilling.Type == 'Drill' and SetCurrMachiningAndTool( Drilling.Name) then
|
if Drilling.On and EgtIf( bUseMultiDrill, Drilling.Type == 'MultiDrill', Drilling.Type == 'Drill') and SetCurrMachiningAndTool( Drilling.Name) then
|
||||||
|
local bIsToAvoid = false
|
||||||
|
if DrillingsToAvoid then
|
||||||
|
for j = 1, #DrillingsToAvoid do
|
||||||
|
if Drilling.Name == DrillingsToAvoid[j] then
|
||||||
|
bIsToAvoid = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
local nMchType = EgtMdbGetCurrMachiningParam( MCH_MP.TYPE)
|
local nMchType = EgtMdbGetCurrMachiningParam( MCH_MP.TYPE)
|
||||||
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
||||||
local dTMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
|
local dTMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
|
||||||
local sMyHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
|
local sMyHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
|
||||||
if nMchType == MCH_MY.DRILLING and
|
if nMchType == MCH_MY.DRILLING and
|
||||||
dTDiam < dDiam + 10 * GEO.EPS_SMALL and dTDiam > dDiam - WD.DRILL_TOL - 10 * GEO.EPS_SMALL and
|
( not bIsToAvoid) and
|
||||||
|
( not dDiam or ( dTDiam < dDiam + 10 * GEO.EPS_SMALL and dTDiam > dDiam - WD.DRILL_TOL - 10 * GEO.EPS_SMALL)) and
|
||||||
( not dDepth or dTMaxMat > dDepth - GEO.EPS_SMALL) and
|
( not dDepth or dTMaxMat > dDepth - GEO.EPS_SMALL) and
|
||||||
(( not sHead and sMyHead ~= 'H5' and sMyHead ~= 'H6') or sHead == sMyHead) then
|
(( not sHead and sMyHead ~= 'H5' and sMyHead ~= 'H6') or sHead == sMyHead) then
|
||||||
return Drilling.Name, Drilling.Type, dTMaxMat
|
return Drilling.Name, Drilling.Type, dTMaxMat
|
||||||
@@ -167,16 +176,29 @@ function WMachiningLib.FindDrilling( dDiam, dDepth, sHead, bOnlyPockets)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
-- se MultiDrill non si prova il DrillPocket
|
||||||
|
if bUseMultiDrill then
|
||||||
|
return
|
||||||
|
end
|
||||||
-- ricerca sulle svuotature, dal diametro maggiore al minore
|
-- ricerca sulle svuotature, dal diametro maggiore al minore
|
||||||
for i = #Drillings, 1, -1 do
|
for i = #Drillings, 1, -1 do
|
||||||
local Drilling = Drillings[i]
|
local Drilling = Drillings[i]
|
||||||
if Drilling.On and Drilling.Type == 'Pocket' and SetCurrMachiningAndTool( Drilling.Name) then
|
if Drilling.On and Drilling.Type == 'Pocket' and SetCurrMachiningAndTool( Drilling.Name) then
|
||||||
|
local bIsToAvoid = false
|
||||||
|
if DrillingsToAvoid then
|
||||||
|
for j = 1, #DrillingsToAvoid do
|
||||||
|
if Drilling.Name == DrillingsToAvoid[j] then
|
||||||
|
bIsToAvoid = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
local nMchType = EgtMdbGetCurrMachiningParam( MCH_MP.TYPE)
|
local nMchType = EgtMdbGetCurrMachiningParam( MCH_MP.TYPE)
|
||||||
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
||||||
local dTMaxDepth = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), EgtTdbGetCurrToolMaxDepth())
|
local dTMaxDepth = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), EgtTdbGetCurrToolMaxDepth())
|
||||||
local sMyHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
|
local sMyHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
|
||||||
if nMchType == MCH_MY.POCKETING and
|
if nMchType == MCH_MY.POCKETING and
|
||||||
dTDiam < dDiam - 10 * GEO.EPS_SMALL and
|
( not bIsToAvoid) and
|
||||||
|
( not dDiam or ( dTDiam < dDiam - 10 * GEO.EPS_SMALL)) and
|
||||||
( not dDepth or dTMaxDepth > dDepth - GEO.EPS_SMALL) and
|
( not dDepth or dTMaxDepth > dDepth - GEO.EPS_SMALL) and
|
||||||
( ( not sHead and sMyHead ~= 'H5' and sMyHead ~= 'H6') or sHead == sMyHead) then
|
( ( not sHead and sMyHead ~= 'H5' and sMyHead ~= 'H6') or sHead == sMyHead) then
|
||||||
return Drilling.Name, Drilling.Type, dTMaxDepth
|
return Drilling.Name, Drilling.Type, dTMaxDepth
|
||||||
@@ -192,7 +214,8 @@ function WMachiningLib.FindSurfacing( sType)
|
|||||||
local Surfacing = Surfacings[i]
|
local Surfacing = Surfacings[i]
|
||||||
if Surfacing.On and Surfacing.Type == sType and SetCurrMachiningAndTool( Surfacing.Name) then
|
if Surfacing.On and Surfacing.Type == sType and SetCurrMachiningAndTool( Surfacing.Name) then
|
||||||
local nMchType = EgtMdbGetCurrMachiningParam( MCH_MP.TYPE)
|
local nMchType = EgtMdbGetCurrMachiningParam( MCH_MP.TYPE)
|
||||||
if nMchType == MCH_MY.SURFFINISHING then
|
if (( sType == 'Roughing' and nMchType == MCH_MY.SURFROUGHING) or
|
||||||
|
( sType == 'Finishing' and nMchType == MCH_MY.SURFFINISHING)) then
|
||||||
return Surfacing.Name
|
return Surfacing.Name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -36,14 +36,17 @@ end
|
|||||||
function WPDC.Classify( Proc, b3Raw)
|
function WPDC.Classify( Proc, b3Raw)
|
||||||
-- se una faccia, uso la classificazione dei tagli singoli
|
-- se una faccia, uso la classificazione dei tagli singoli
|
||||||
if Proc.Fct == 1 then return Cut.Classify( Proc, b3Raw) end
|
if Proc.Fct == 1 then return Cut.Classify( Proc, b3Raw) end
|
||||||
|
|
||||||
-- se più di due facce non si fa
|
-- se più di due facce non si fa
|
||||||
if Proc.Fct > 2 then return false end
|
if Proc.Fct > 2 then return false end
|
||||||
-- dati delle facce
|
|
||||||
|
-- se due facce si verifica solamente se le facce non sono troppo orientate verso il basso (per due facce unite sul lato lungo il check è fatto nella LapJoint)
|
||||||
local vtN = {}
|
local vtN = {}
|
||||||
vtN[1] = EgtSurfTmFacetNormVersor( Proc.Id, 0, GDB_ID.ROOT)
|
vtN[1] = EgtSurfTmFacetNormVersor( Proc.Id, 0, GDB_ID.ROOT)
|
||||||
vtN[2] = EgtSurfTmFacetNormVersor( Proc.Id, 1, GDB_ID.ROOT)
|
vtN[2] = EgtSurfTmFacetNormVersor( Proc.Id, 1, GDB_ID.ROOT)
|
||||||
-- verifico se è lavorabile da sopra o di fianco
|
local bIsMachinable = ( vtN[1]:getZ() >= ( WD.CUT_VZ_MIN or - 0.5)) and ( vtN[2]:getZ() >= ( WD.CUT_VZ_MIN or - 0.5))
|
||||||
return ( vtN[1]:getZ() >= - 0.01 or vtN[2]:getZ() >= - 0.01)
|
|
||||||
|
return bIsMachinable
|
||||||
end
|
end
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
|||||||
+153
-37
@@ -27,6 +27,9 @@ local WM = require( 'WMachiningLib')
|
|||||||
-- Parametri Q
|
-- Parametri Q
|
||||||
local sContourOnly = 'Q01' -- 0=no, 1=si
|
local sContourOnly = 'Q01' -- 0=no, 1=si
|
||||||
|
|
||||||
|
-- Per forature MultiDrill, lista lavorazioni già provate
|
||||||
|
local TriedDrillings = {}
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
-- Riconoscimento della feature
|
-- Riconoscimento della feature
|
||||||
@@ -56,7 +59,7 @@ end
|
|||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
-- Classificazione della feature
|
-- Classificazione della feature
|
||||||
function WPD.Classify( Proc, b3Raw)
|
function WPD.Classify( Proc, b3Raw, bUseMultiDrill)
|
||||||
|
|
||||||
-- recupero e verifico l'entità foro
|
-- recupero e verifico l'entità foro
|
||||||
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') or 0
|
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') or 0
|
||||||
@@ -75,6 +78,10 @@ function WPD.Classify( Proc, b3Raw)
|
|||||||
-- è lavorabile se non troppo inclinato
|
-- è lavorabile se non troppo inclinato
|
||||||
return ( abs( vtExtr:getZ()) >= WD.DRILL_VZ_MIN)
|
return ( abs( vtExtr:getZ()) >= WD.DRILL_VZ_MIN)
|
||||||
end
|
end
|
||||||
|
-- multiforatore (cabinet)
|
||||||
|
if bUseMultiDrill then
|
||||||
|
return true
|
||||||
|
end
|
||||||
-- se con direzione asse Y e macchina con foratore orizzontale del giusto diametro
|
-- se con direzione asse Y e macchina con foratore orizzontale del giusto diametro
|
||||||
if WD.HOR_DRILL_DIAM and abs( dDiam - WD.HOR_DRILL_DIAM) < WD.DRILL_TOL and AreSameOrOppositeVectorApprox( vtExtr, Y_AX()) then
|
if WD.HOR_DRILL_DIAM and abs( dDiam - WD.HOR_DRILL_DIAM) < WD.DRILL_TOL and AreSameOrOppositeVectorApprox( vtExtr, Y_AX()) then
|
||||||
return true
|
return true
|
||||||
@@ -255,7 +262,7 @@ end
|
|||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
-- Applicazione della lavorazione
|
-- Applicazione della lavorazione
|
||||||
function WPD.Make( Proc, nRawId, b3Raw)
|
function WPD.Make( Proc, nRawId, b3Raw, bUseMultiDrill, DrillingsToAvoid)
|
||||||
-- recupero e verifico l'entità foro
|
-- recupero e verifico l'entità foro
|
||||||
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') or 0
|
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') or 0
|
||||||
if AuxId then AuxId = AuxId + Proc.Id end
|
if AuxId then AuxId = AuxId + Proc.Id end
|
||||||
@@ -272,7 +279,7 @@ function WPD.Make( Proc, nRawId, b3Raw)
|
|||||||
local bOpen = ( Proc.Fcs ~= 0 and Proc.Fce ~= 0)
|
local bOpen = ( Proc.Fcs ~= 0 and Proc.Fce ~= 0)
|
||||||
-- verifico che il foro non sia fattibile solo da sotto
|
-- verifico che il foro non sia fattibile solo da sotto
|
||||||
local bToInvert = ( vtExtr:getZ() < -0.1)
|
local bToInvert = ( vtExtr:getZ() < -0.1)
|
||||||
if bToInvert and ( not bOpen or Proc.Flg ~= 1) then
|
if bToInvert and ( not bOpen or Proc.Flg > 1) then
|
||||||
local sErr = 'Error : drilling from bottom impossible'
|
local sErr = 'Error : drilling from bottom impossible'
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
return false, sErr
|
return false, sErr
|
||||||
@@ -299,27 +306,35 @@ function WPD.Make( Proc, nRawId, b3Raw)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local bUseDLenToFindDrilling = true
|
local sDrilling, nType
|
||||||
local sDrilling, nType = WM.FindDrilling( dDiam, dLen, sHead)
|
if bUseMultiDrill then
|
||||||
if not sDrilling then
|
sDrilling, nType = WM.FindDrilling( nil, nil, nil, nil, true, TriedDrillings)
|
||||||
bUseDLenToFindDrilling = false
|
|
||||||
sDrilling, nType = WM.FindDrilling( dDiam, nil, sHead)
|
|
||||||
end
|
|
||||||
-- se Proc è settata per essere specchiata cerco la lavorazione adatta e verifico possa essere effettivamente specchiata
|
|
||||||
if Proc.Double and Proc.Double == 2 then
|
|
||||||
local sDrillingBackup = sDrilling
|
|
||||||
sDrilling = WM.FindDrilling( dDiam, EgtIf( bUseDLenToFindDrilling, dLen, nil), 'H1')
|
|
||||||
if not IsMachiningOkForDouble( sDrilling) then
|
|
||||||
Proc.Double = 0
|
|
||||||
sDrilling = sDrillingBackup
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if sHead and not sDrilling then
|
|
||||||
sDrilling, nType = WM.FindDrilling( dDiam, dLen)
|
|
||||||
if not sDrilling then
|
if not sDrilling then
|
||||||
sDrilling, nType = WM.FindDrilling( dDiam)
|
return false
|
||||||
|
end
|
||||||
|
else
|
||||||
|
local bUseDLenToFindDrilling = true
|
||||||
|
sDrilling, nType = WM.FindDrilling( dDiam, dLen, sHead)
|
||||||
|
if not sDrilling then
|
||||||
|
bUseDLenToFindDrilling = false
|
||||||
|
sDrilling, nType = WM.FindDrilling( dDiam, nil, sHead)
|
||||||
|
end
|
||||||
|
-- se Proc è settata per essere specchiata cerco la lavorazione adatta e verifico possa essere effettivamente specchiata
|
||||||
|
if Proc.Double and Proc.Double == 2 then
|
||||||
|
local sDrillingBackup = sDrilling
|
||||||
|
sDrilling = WM.FindDrilling( dDiam, EgtIf( bUseDLenToFindDrilling, dLen, nil), 'H1')
|
||||||
|
if not IsMachiningOkForDouble( sDrilling) then
|
||||||
|
Proc.Double = 0
|
||||||
|
sDrilling = sDrillingBackup
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if sHead and not sDrilling then
|
||||||
|
sDrilling, nType = WM.FindDrilling( dDiam, dLen)
|
||||||
|
if not sDrilling then
|
||||||
|
sDrilling, nType = WM.FindDrilling( dDiam)
|
||||||
|
end
|
||||||
|
if sDrilling then sHead = '' end
|
||||||
end
|
end
|
||||||
if sDrilling then sHead = '' end
|
|
||||||
end
|
end
|
||||||
local bAngledContourDrill = false
|
local bAngledContourDrill = false
|
||||||
local nAngledContourDrillId = GDB_ID.NULL
|
local nAngledContourDrillId = GDB_ID.NULL
|
||||||
@@ -446,11 +461,29 @@ function WPD.Make( Proc, nRawId, b3Raw)
|
|||||||
-- aggiungo geometria
|
-- aggiungo geometria
|
||||||
if bAngledContourDrill then
|
if bAngledContourDrill then
|
||||||
EgtSetMachiningGeometry( nAngledContourDrillId)
|
EgtSetMachiningGeometry( nAngledContourDrillId)
|
||||||
|
elseif bUseMultiDrill then
|
||||||
|
if Proc.SkippedGeometries and #Proc.SkippedGeometries > 0 then
|
||||||
|
EgtSetMachiningGeometry( Proc.SkippedGeometries)
|
||||||
|
else
|
||||||
|
local HolesGeometries = {}
|
||||||
|
-- aggiungo foro principale
|
||||||
|
table.insert( HolesGeometries, { AuxId, -1})
|
||||||
|
-- aggiungo eventuali altre geometrie connesse
|
||||||
|
if Proc.OtherGeometries and #Proc.OtherGeometries > 0 then
|
||||||
|
for i = 1, #Proc.OtherGeometries do
|
||||||
|
-- recupero geometria da lavorare
|
||||||
|
local OtherAuxId = Proc.OtherGeometries[i].Id + EgtGetInfo( Proc.OtherGeometries[i].Id, 'AUXID', 'i')
|
||||||
|
local Geometry = { OtherAuxId, -1}
|
||||||
|
table.insert( HolesGeometries, Geometry)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
EgtSetMachiningGeometry( HolesGeometries)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
EgtSetMachiningGeometry( {{ AuxId, -1}})
|
EgtSetMachiningGeometry( {{ AuxId, -1}})
|
||||||
end
|
end
|
||||||
-- eventuale inversione
|
-- eventuale inversione
|
||||||
if nType == 'Drill' then
|
if nType == 'Drill' or nType == 'MultiDrill' then
|
||||||
EgtSetMachiningParam( MCH_MP.INVERT, bToInvert)
|
EgtSetMachiningParam( MCH_MP.INVERT, bToInvert)
|
||||||
else
|
else
|
||||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, bToInvert)
|
EgtSetMachiningParam( MCH_MP.TOOLINVERT, bToInvert)
|
||||||
@@ -488,7 +521,9 @@ function WPD.Make( Proc, nRawId, b3Raw)
|
|||||||
end
|
end
|
||||||
-- imposto posizione braccio porta testa
|
-- imposto posizione braccio porta testa
|
||||||
local nSCC = MCH_SCC.ADIR_ZP
|
local nSCC = MCH_SCC.ADIR_ZP
|
||||||
if AreSameOrOppositeVectorApprox( vtExtr, Z_AX()) then
|
if bUseMultiDrill then
|
||||||
|
nSCC = MCH_SCC.ADIR_NEAR
|
||||||
|
elseif AreSameOrOppositeVectorApprox( vtExtr, Z_AX()) then
|
||||||
nSCC = MCH_SCC.ADIR_YP
|
nSCC = MCH_SCC.ADIR_YP
|
||||||
end
|
end
|
||||||
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||||
@@ -502,8 +537,13 @@ function WPD.Make( Proc, nRawId, b3Raw)
|
|||||||
EgtOutLog( sMyWarn .. ' (process ' .. tostring( Proc.Id) .. ')')
|
EgtOutLog( sMyWarn .. ' (process ' .. tostring( Proc.Id) .. ')')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
if bUseMultiDrill then
|
||||||
-- leggo eventuali note esistenti della lavorazione
|
local sDepth = 'TH'
|
||||||
|
EgtSetMachiningParam( MCH_MP.DEPTH_STR, sDepth)
|
||||||
|
else
|
||||||
|
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||||
|
end
|
||||||
|
-- leggo eventuali note esistenti della lavorazione
|
||||||
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES)
|
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES)
|
||||||
-- se foratura o svuotatura, dichiarazione nessuna generazione sfridi per Vmill
|
-- se foratura o svuotatura, dichiarazione nessuna generazione sfridi per Vmill
|
||||||
if nType == 'Drill' or nType == 'Pocket' then
|
if nType == 'Drill' or nType == 'Pocket' then
|
||||||
@@ -536,19 +576,95 @@ function WPD.Make( Proc, nRawId, b3Raw)
|
|||||||
EgtSetMachiningParam( MCH_MP.TABMAX, 3)
|
EgtSetMachiningParam( MCH_MP.TABMAX, 3)
|
||||||
end
|
end
|
||||||
-- eseguo
|
-- eseguo
|
||||||
if not EgtApplyMachining( true, false) then
|
local bOk = EgtApplyMachining( true, false)
|
||||||
local _, sErr = EgtGetLastMachMgrError()
|
|
||||||
EgtSetOperationMode( nMchId, false)
|
-- in caso di fori raggruppati vengono restituiti gli eventuali fori saltati
|
||||||
return false, sErr
|
local SkippedGeometries = {}
|
||||||
else
|
SkippedGeometries = EgtGetMachiningSkippedGeometry()
|
||||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
local sMsgMaster
|
||||||
if EgtIsMachiningEmpty() then
|
if bUseMultiDrill and SkippedGeometries and #SkippedGeometries > 0 then
|
||||||
EgtSetOperationMode( nMchId, false)
|
if ( Proc.SkippedGeometries and ( #SkippedGeometries == #Proc.SkippedGeometries))
|
||||||
return false, sWarn
|
or ( Proc.OtherGeometries and ( #SkippedGeometries == #Proc.OtherGeometries + 1))
|
||||||
else
|
or ( not Proc.OtherGeometries and #SkippedGeometries == 1) then
|
||||||
sMyWarn = (sMyWarn or sWarn)
|
EgtRemoveOperation( nMchId)
|
||||||
|
end
|
||||||
|
Proc.SkippedGeometries = SkippedGeometries
|
||||||
|
table.insert( TriedDrillings, sDrilling)
|
||||||
|
-- per provare tutte le MultiDrill disponibili si passano quelle già fatte come lavorazioni da ignorare
|
||||||
|
bOk = WPD.Make( Proc, nRawId, b3Raw, true, TriedDrillings)
|
||||||
|
-- non trovata lavorazione, si prova con le lavorazioni singole
|
||||||
|
if not bOk then
|
||||||
|
local bOkMaster = true
|
||||||
|
for i = #Proc.SkippedGeometries, 1, -1 do
|
||||||
|
local sErr
|
||||||
|
if Proc.OtherGeometries then
|
||||||
|
for j = 1, #Proc.OtherGeometries do
|
||||||
|
local AuxIdOtherGeometry = EgtGetInfo( Proc.OtherGeometries[j].Id, 'AUXID', 'i') or 0
|
||||||
|
if AuxIdOtherGeometry then AuxIdOtherGeometry = AuxIdOtherGeometry + Proc.OtherGeometries[j].Id end
|
||||||
|
if Proc.SkippedGeometries[i][1] == AuxIdOtherGeometry then
|
||||||
|
bOk, sErr = WPD.Make( Proc.OtherGeometries[j], nRawId, b3Raw, false)
|
||||||
|
if bOk then
|
||||||
|
Proc.OtherGeometries[j].bOk = true
|
||||||
|
else
|
||||||
|
Proc.OtherGeometries[j].bOk = false
|
||||||
|
end
|
||||||
|
Proc.OtherGeometries[j].sMsg = sErr
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- se nelle altre geometrie non è stato trovato, potrebbe essere la principale
|
||||||
|
local AuxIdProc = EgtGetInfo( Proc.Id, 'AUXID', 'i') or 0
|
||||||
|
if AuxIdProc then AuxIdProc = AuxIdProc + Proc.Id end
|
||||||
|
if Proc.SkippedGeometries[i][1] == AuxIdProc then
|
||||||
|
bOk, sErr = WPD.Make( Proc, nRawId, b3Raw, false)
|
||||||
|
if not bOk then
|
||||||
|
bOkMaster = false
|
||||||
|
end
|
||||||
|
sMsgMaster = sErr
|
||||||
|
end
|
||||||
|
-- se non ci sono altre geometrie quella da fare è sicuramente la Proc principale
|
||||||
|
else
|
||||||
|
bOk, sErr = WPD.Make( Proc, nRawId, b3Raw, false)
|
||||||
|
if not bOk then
|
||||||
|
bOkMaster = false
|
||||||
|
end
|
||||||
|
sMsgMaster = sErr
|
||||||
|
end
|
||||||
|
if bOk then
|
||||||
|
table.remove( Proc.SkippedGeometries, i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
bOk = bOkMaster
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
-- se presenti geometrie aggiuntive, aggiunta informazioni per output statistiche
|
||||||
|
if Proc.OtherGeometries and #Proc.OtherGeometries > 0 then
|
||||||
|
for i = 1, #Proc.OtherGeometries do
|
||||||
|
if Proc.OtherGeometries[i].bOk == nil then
|
||||||
|
Proc.OtherGeometries[i].bOk = true
|
||||||
|
Proc.OtherGeometries[i].sMsg = ''
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if not bUseMultiDrill then
|
||||||
|
if not bOk then
|
||||||
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
|
EgtSetOperationMode( nMchId, false)
|
||||||
|
return false, sErr
|
||||||
|
else
|
||||||
|
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||||
|
if EgtIsMachiningEmpty() then
|
||||||
|
EgtSetOperationMode( nMchId, false)
|
||||||
|
return false, sWarn
|
||||||
|
else
|
||||||
|
sMyWarn = (sMyWarn or sWarn)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
return bOk, sMsgMaster
|
||||||
|
end
|
||||||
|
|
||||||
-- se preforo inclinato impostato, inclinazione oltre limite impostato e foro non orizzontale
|
-- se preforo inclinato impostato, inclinazione oltre limite impostato e foro non orizzontale
|
||||||
if WD.PREDRILL_DIAM and WD.PREDRILL_DIAM > 0 and vtExtr:getZ() < ( WD.PREDRILL_MINANGLE or 0.707) and vtExtr:getZ() > 0.1 then
|
if WD.PREDRILL_DIAM and WD.PREDRILL_DIAM > 0 and vtExtr:getZ() < ( WD.PREDRILL_MINANGLE or 0.707) and vtExtr:getZ() > 0.1 then
|
||||||
-- gruppo ausiliario per preforo
|
-- gruppo ausiliario per preforo
|
||||||
|
|||||||
+134
-64
@@ -1,4 +1,4 @@
|
|||||||
-- ProcessFreeContour.lua by Egaltech s.r.l. 2024/03/24
|
-- ProcessFreeContour.lua by Egaltech s.r.l. 2026/03/30
|
||||||
-- Gestione calcolo profilo libero per Pareti
|
-- Gestione calcolo profilo libero per Pareti
|
||||||
-- 2021/11/15 Penna e chiodature sono sempre riportate sulla faccia sopra anche se nel progetto sono sotto.
|
-- 2021/11/15 Penna e chiodature sono sempre riportate sulla faccia sopra anche se nel progetto sono sotto.
|
||||||
-- 2021/12/10 In taglio con lama aggiunta gestione SCC per testa Gearbox.
|
-- 2021/12/10 In taglio con lama aggiunta gestione SCC per testa Gearbox.
|
||||||
@@ -717,19 +717,19 @@ local function MakeCustomPath( vGeom, nConeCut, dMillDiam, nAddGrpId, dThick, bC
|
|||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
local function CalcInterference( nNewProc, vtExtr, ptCentr, dDiam1, dDiam2,
|
local function CalcInterference( nNewProc, vtExtr, ptCentr,
|
||||||
dTall1, dTall2, dDiam3, dTall3)
|
dDiam1, dTall1, dDiam2, dTall2, dDiam3, dTall3)
|
||||||
local ptCentrGrid1 = ptCentr + ( vtExtr * 0.01)
|
local ptCentrGrid1 = ptCentr + 0.1 * vtExtr
|
||||||
local frOriTool = Frame3d( ptCentrGrid1, vtExtr)
|
local frOriTool = Frame3d( ptCentrGrid1, vtExtr)
|
||||||
local bColl1 = EgtTestConeSurface( frOriTool, dDiam1/2, dDiam2/2, dTall1, nNewProc, 0, GDB_RT.GLOB)
|
local bColl1 = EgtTestConeSurface( frOriTool, dDiam1 / 2, dDiam2 / 2 - 0.1, dTall1, nNewProc, 0, GDB_RT.GLOB)
|
||||||
if bColl1 then return true end
|
if bColl1 then return true end
|
||||||
local ptCentrGrid2 = ptCentr + ( vtExtr * ( dTall1 + 0.01))
|
local ptCentrGrid2 = ptCentr + dTall1 * vtExtr
|
||||||
frOriTool = Frame3d( ptCentrGrid2, vtExtr)
|
frOriTool = Frame3d( ptCentrGrid2, vtExtr)
|
||||||
local bColl2 = EgtTestCylSurface( frOriTool, dDiam2/2, (dTall2-dTall1), nNewProc, 0, GDB_RT.GLOB)
|
local bColl2 = EgtTestCylSurface( frOriTool, dDiam2 / 2 - 0.1, dTall2, nNewProc, 0, GDB_RT.GLOB)
|
||||||
if bColl2 then return true end
|
if bColl2 then return true end
|
||||||
local ptCentrGrid3 = ptCentr + ( vtExtr * ( dTall2 + 0.01))
|
local ptCentrGrid3 = ptCentr + ( dTall1 + dTall2) * vtExtr
|
||||||
frOriTool = Frame3d( ptCentrGrid3, vtExtr)
|
frOriTool = Frame3d( ptCentrGrid3, vtExtr)
|
||||||
local bColl3 = EgtTestCylSurface( frOriTool, dDiam3/2, (dTall3-dTall2), nNewProc, 0, GDB_RT.GLOB)
|
local bColl3 = EgtTestCylSurface( frOriTool, dDiam3 / 2 - 0.1, dTall3, nNewProc, 0, GDB_RT.GLOB)
|
||||||
if bColl3 then return true end
|
if bColl3 then return true end
|
||||||
-- restituisco risultato controllo collisioni
|
-- restituisco risultato controllo collisioni
|
||||||
return false
|
return false
|
||||||
@@ -761,11 +761,32 @@ local function MakeLocalSurf( ptP1, ptP2, ptP3, nAddGrpId)
|
|||||||
return nFaceId
|
return nFaceId
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
local function GetEdgeToMachineFromVector( nSurfId, nFacet, vtOrtho)
|
||||||
|
local _, EdgesEgt = EgtSurfTmGetFacetOutlineInfo( nSurfId, nFacet, GDB_ID.ROOT)
|
||||||
|
|
||||||
|
local nEdgeIndMax = 0
|
||||||
|
local dMaxComp = - GEO.INFINITO
|
||||||
|
for i = 1, #EdgesEgt do
|
||||||
|
local vtN = EdgesEgt[i].Norm
|
||||||
|
if EdgesEgt[i].Open then
|
||||||
|
vtN = -vtN
|
||||||
|
end
|
||||||
|
local dComp = vtN * vtOrtho
|
||||||
|
if dComp > dMaxComp then
|
||||||
|
nEdgeIndMax = i -1
|
||||||
|
dMaxComp = dComp
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return nEdgeIndMax
|
||||||
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTypeConeCut, nAddGrpId,
|
local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTypeConeCut, nAddGrpId,
|
||||||
dToolDiam, dThick, sMilling, dOffsAng, dDepthMach,
|
dToolDiam, dThick, sMilling, dOffsAng, dDepthMach,
|
||||||
bThruThick, dThSurf, dDiam1, dDiam2, dTall1,
|
bThruThick, dThSurf, dConeSideAng, dDiam1, dTall1,
|
||||||
dTall2, dDiam3, dTall3, bMakeLocSurf, vFace)
|
dDiam2, dTall2, dDiam3, dTall3, bMakeLocSurf, vFace)
|
||||||
-- variabili costruzione geometria
|
-- variabili costruzione geometria
|
||||||
local pAuxId = {}
|
local pAuxId = {}
|
||||||
local nAuxId
|
local nAuxId
|
||||||
@@ -777,9 +798,9 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTyp
|
|||||||
-- creo superfice locale o esco
|
-- creo superfice locale o esco
|
||||||
local nSurfToAdd = MakeLocalSurf( tFacAdj[7], tFacAdj[8], tFacAdj[9], nAddGrpId)
|
local nSurfToAdd = MakeLocalSurf( tFacAdj[7], tFacAdj[8], tFacAdj[9], nAddGrpId)
|
||||||
if nSurfToAdd then
|
if nSurfToAdd then
|
||||||
local nFacCntPre = EgtSurfTmFacetCount( nNewProc)
|
local nFacCntPre = EgtSurfTmFacetCount( nNewProc.Id)
|
||||||
-- creo copia del percorso principale e gli aggiungo la nuova faccia
|
-- creo copia del percorso principale e gli aggiungo la nuova faccia
|
||||||
nNewProcLoc = EgtCopyGlob( nNewProc, nAddGrpId)
|
nNewProcLoc = EgtCopyGlob( nNewProc.Id, nAddGrpId)
|
||||||
nNewProcLoc = EgtSurfTmBySewing( nAddGrpId, {nNewProcLoc,nSurfToAdd} , true)
|
nNewProcLoc = EgtSurfTmBySewing( nAddGrpId, {nNewProcLoc,nSurfToAdd} , true)
|
||||||
-- riordino le facce
|
-- riordino le facce
|
||||||
ReorderFacesFromTab( nNewProcLoc, vFace)
|
ReorderFacesFromTab( nNewProcLoc, vFace)
|
||||||
@@ -790,7 +811,7 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTyp
|
|||||||
return true, ''
|
return true, ''
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
nNewProcLoc = nNewProc
|
nNewProcLoc = nNewProc.Id
|
||||||
end
|
end
|
||||||
-- prendo il primo versore
|
-- prendo il primo versore
|
||||||
local _, vtN1 = EgtSurfTmFacetCenter( nNewProcLoc, nFacInd, GDB_ID.ROOT)
|
local _, vtN1 = EgtSurfTmFacetCenter( nNewProcLoc, nFacInd, GDB_ID.ROOT)
|
||||||
@@ -833,23 +854,21 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTyp
|
|||||||
-- sommo i tre versori per avere una direzione media
|
-- sommo i tre versori per avere una direzione media
|
||||||
vtExtrExit = vtN2 + vtN3
|
vtExtrExit = vtN2 + vtN3
|
||||||
vtExtrExit:normalize()
|
vtExtrExit:normalize()
|
||||||
-- se tipo 1 calcolo angolo tilt di 45°
|
-- calcolo la componente Z dipendente dall'angolo tilt
|
||||||
if nTypeConeCut == 1 then
|
local dAlfa = EgtClamp( dConeSideAng, 15, 30)
|
||||||
vtExtr = vtExtrExit + Z_AX()
|
local dGamma = 90 - asin( sqrt( 2) * sin( dConeSideAng))
|
||||||
-- altrimenti tipo 2, calcolo angolo tilt di 33° (dalla verticale)
|
local dTanGamma = sin( dGamma) / cos( dGamma)
|
||||||
else
|
vtExtr = vtExtrExit + Vector3d( 0, 0, dTanGamma)
|
||||||
vtExtr = vtExtrExit + Vector3d(0,0,1.539865)
|
|
||||||
end
|
|
||||||
vtExtr:normalize()
|
vtExtr:normalize()
|
||||||
local vtCheck = Vector3d(vtExtr)
|
local vtCheck = Vector3d( vtExtr)
|
||||||
-- se ho un offset angolare ruoto il percorso
|
-- se ho un offset angolare ruoto il percorso
|
||||||
if abs(dOffsAng) > 100 * GEO.EPS_SMALL then
|
if abs( dOffsAng) > 100 * GEO.EPS_ANG_SMALL then
|
||||||
vtCheck:rotate( Z_AX(), dOffsAng)
|
vtCheck:rotate( Z_AX(), dOffsAng)
|
||||||
end
|
end
|
||||||
-- controllo se c'è collisione con le facce della superfice
|
-- controllo se c'è collisione con le facce della superfice
|
||||||
if nTypeConeCut == 1 and CalcInterference( nNewProc, vtCheck, tFacAdj[nIdEndPoint] + Point3d( 0, 0, -dDepthMach), dDiam1, dDiam2,
|
if nTypeConeCut == 1 and CalcInterference( nNewProc.Id, vtCheck, tFacAdj[nIdEndPoint] + Point3d( 0, 0, -dDepthMach),
|
||||||
dTall1, dTall2, dDiam3, dTall3) then
|
dDiam1, dTall1, dDiam2, dTall2, dDiam3, dTall3) then
|
||||||
local sErr = 'Collision detect from clean corner tool and surface'
|
local sErr = 'Collision detected between clean corner tool and surface'
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
return true, ''
|
return true, ''
|
||||||
end
|
end
|
||||||
@@ -944,6 +963,8 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTyp
|
|||||||
-- trasformo in percorso
|
-- trasformo in percorso
|
||||||
if #pAuxId > 0 then
|
if #pAuxId > 0 then
|
||||||
AuxId = EgtCurveCompo( nAddGrpId, pAuxId, true)
|
AuxId = EgtCurveCompo( nAddGrpId, pAuxId, true)
|
||||||
|
EgtSetInfo( AuxId, 'TASKID', nNewProc.TaskId)
|
||||||
|
EgtSetInfo( AuxId, 'CUTID', nNewProc.CutId)
|
||||||
end
|
end
|
||||||
-- se non c'é il percorso do errore
|
-- se non c'é il percorso do errore
|
||||||
if not AuxId then
|
if not AuxId then
|
||||||
@@ -958,8 +979,8 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTyp
|
|||||||
EgtRotate( AuxId, tFacAdj[nIdEndPoint], Z_AX(), dOffsAng, GDB_RT.GLOB)
|
EgtRotate( AuxId, tFacAdj[nIdEndPoint], Z_AX(), dOffsAng, GDB_RT.GLOB)
|
||||||
end
|
end
|
||||||
-- inserisco la lavorazione
|
-- inserisco la lavorazione
|
||||||
local sName = 'Clean_' .. ( EgtGetName( nNewProc) or tostring( nNewProc))
|
local sName = 'Clean_' .. ( EgtGetName( nNewProc.Id) or tostring( nNewProc.Id))
|
||||||
local nMchId = WM.AddMachining( nNewProc, 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)
|
||||||
@@ -1031,47 +1052,51 @@ local function AddMillCorner( nTypeConeCut, vFace, Proc, nRawId, b3Raw,
|
|||||||
-- recupero i dati dell'utensile
|
-- recupero i dati dell'utensile
|
||||||
local dMillDiam = 20
|
local dMillDiam = 20
|
||||||
local dMillTotDiam = 20
|
local dMillTotDiam = 20
|
||||||
local dMillDiamTh = 20
|
local dMillLength = 20
|
||||||
local dToolLength = 20
|
local dMillThick = 20
|
||||||
local dThickTool = 20
|
local dMillSideAng = 0
|
||||||
local dSideAng = 0
|
local dMillStemLength = 10
|
||||||
|
local dMillThDiam = 70
|
||||||
|
local dMillThLength = 20
|
||||||
if EgtMdbSetCurrMachining( sMilling) then
|
if EgtMdbSetCurrMachining( sMilling) then
|
||||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||||
dMillDiamTh = EgtTdbGetCurrToolThDiam() or dMillDiamTh
|
dMillThDiam = EgtTdbGetCurrToolThDiam() or dMillThDiam
|
||||||
|
dMillThLength = EgtTdbGetCurrToolThLength() or dMillThLength
|
||||||
dMillTotDiam = EgtTdbGetCurrToolParam( MCH_TP.TOTDIAM) or dMillTotDiam
|
dMillTotDiam = EgtTdbGetCurrToolParam( MCH_TP.TOTDIAM) or dMillTotDiam
|
||||||
dSideAng = EgtTdbGetCurrToolParam( MCH_TP.SIDEANG) or dSideAng
|
dMillSideAng = EgtTdbGetCurrToolParam( MCH_TP.SIDEANG) or dMillSideAng
|
||||||
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
||||||
dThickTool = EgtTdbGetCurrToolParam( MCH_TP.THICK) or dThickTool
|
dMillThick = EgtTdbGetCurrToolParam( MCH_TP.THICK) or dMillThick
|
||||||
dToolLength = EgtTdbGetCurrToolParam( MCH_TP.LEN) or dToolLength
|
dMillLength = EgtTdbGetCurrToolParam( MCH_TP.LEN) or dMillLength
|
||||||
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth -- qui è la distanza dal portautensile
|
-- diametro massimo del cono
|
||||||
-- calcolo il secondo diametro del cono
|
dMillTotDiam = dMillDiam + ( abs( dMillThick) * tan( dMillSideAng)) * 2
|
||||||
dMillTotDiam = dMillDiam + ( abs( dThickTool) * tan( dSideAng)) * 2
|
-- lunghezza del gambo
|
||||||
|
dMillStemLength = dMillLength - abs( dMillThick) - dMillThLength
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- verifico se ciclo chiuso
|
-- verifico se ciclo chiuso
|
||||||
local bClosed = ( abs( vFace[1].PrevAng) > 0.1)
|
local bClosed = ( abs( vFace[1].PrevAng) > 0.1)
|
||||||
-- copio la feature nel layer di appoggio
|
-- copio la feature nel layer di appoggio
|
||||||
local nNewProc
|
local nNewProc = { CutId = Proc.CutId, TaskId = Proc.TaskId}
|
||||||
if nMasterNewProc then
|
if nMasterNewProc then
|
||||||
nNewProc = nMasterNewProc
|
nNewProc.Id = nMasterNewProc
|
||||||
else
|
else
|
||||||
nNewProc = EgtCopyGlob( Proc.Id, nAddGrpId) or GDB_ID.NULL
|
nNewProc.Id = EgtCopyGlob( Proc.Id, nAddGrpId) or GDB_ID.NULL
|
||||||
end
|
end
|
||||||
local nFacCnt = EgtSurfTmFacetCount( nNewProc)
|
local nFacCnt = EgtSurfTmFacetCount( nNewProc.Id)
|
||||||
local nFacInd, dDepth, nSurfInt
|
local nFacInd, dDepth, nSurfInt
|
||||||
local bMakeLocSurf
|
local bMakeLocSurf
|
||||||
-- RIMUOVERE
|
-- RIMUOVERE
|
||||||
if false and nFacCnt <= 4 then
|
if false and nFacCnt <= 4 then
|
||||||
-- recupero profondità e faccia di fondo
|
-- recupero profondità e faccia di fondo
|
||||||
_, _, dDepth, _, _, nSurfInt = GetTunnelDimension( nNewProc, Proc.PartId, nAddGrpId, bClosed)
|
_, _, dDepth, _, _, nSurfInt = GetTunnelDimension( nNewProc.Id, Proc.PartId, nAddGrpId, bClosed)
|
||||||
if nSurfInt then
|
if nSurfInt then
|
||||||
-- aggiungo la faccia di fondo appena calcolata
|
-- aggiungo la faccia di fondo appena calcolata
|
||||||
nNewProc = EgtSurfTmBySewing( nAddGrpId, { nNewProc, nSurfInt}, true)
|
nNewProc.Id = EgtSurfTmBySewing( nAddGrpId, { nNewProc.Id, nSurfInt}, true)
|
||||||
-- riordino le facce
|
-- riordino le facce
|
||||||
ReorderFacesFromTab( nNewProc, vFace)
|
ReorderFacesFromTab( nNewProc.Id, vFace)
|
||||||
-- aggiorno numero di facce e assegno indice di quella di fondo (sempre ultima)
|
-- aggiorno numero di facce e assegno indice di quella di fondo (sempre ultima)
|
||||||
nFacCnt = EgtSurfTmFacetCount( nNewProc)
|
nFacCnt = EgtSurfTmFacetCount( nNewProc.Id)
|
||||||
nFacInd = nFacCnt - 1
|
nFacInd = nFacCnt - 1
|
||||||
else
|
else
|
||||||
return true
|
return true
|
||||||
@@ -1119,7 +1144,7 @@ local function AddMillCorner( nTypeConeCut, vFace, Proc, nRawId, b3Raw,
|
|||||||
ptLoc2 = vFace[k].PPrev
|
ptLoc2 = vFace[k].PPrev
|
||||||
end
|
end
|
||||||
-- ricavo i punti e l'angolo interno
|
-- ricavo i punti e l'angolo interno
|
||||||
local _, ptP1, ptP2, dAng = EgtSurfTmFacetsContact( nNewProc, nFace1, nFace2, GDB_ID.ROOT)
|
local _, ptP1, ptP2, dAng = EgtSurfTmFacetsContact( nNewProc.Id, nFace1, nFace2, GDB_ID.ROOT)
|
||||||
-- se punti validi e angolo è interno e non è quasi piatto e >= 90 creo istanza
|
-- se punti validi e angolo è interno e non è quasi piatto e >= 90 creo istanza
|
||||||
local tFacAdj = {}
|
local tFacAdj = {}
|
||||||
if ptP1 and ptP2 and dAng < 0 and dAng < -6 and dAng > EgtIf( nTypeConeCut == 1, -(90 + 10 * GEO.EPS_SMALL), -(180-dAngleSmall + 10 * GEO.EPS_SMALL)) then
|
if ptP1 and ptP2 and dAng < 0 and dAng < -6 and dAng > EgtIf( nTypeConeCut == 1, -(90 + 10 * GEO.EPS_SMALL), -(180-dAngleSmall + 10 * GEO.EPS_SMALL)) then
|
||||||
@@ -1134,21 +1159,21 @@ local function AddMillCorner( nTypeConeCut, vFace, Proc, nRawId, b3Raw,
|
|||||||
-- primo taglio
|
-- primo taglio
|
||||||
local bOk, sErr = AddMillCornerMachining( Proc.PartId, nNewProc, nFacInd, tFacAdj, nTypeConeCut, nAddGrpId,
|
local bOk, sErr = AddMillCornerMachining( Proc.PartId, nNewProc, nFacInd, tFacAdj, nTypeConeCut, nAddGrpId,
|
||||||
dToolDiam, dThick, sMilling, -dAngOffs, dDepthMach,
|
dToolDiam, dThick, sMilling, -dAngOffs, dDepthMach,
|
||||||
bThruThick, dDepth, dMillDiam, dMillTotDiam, abs(dThickTool),
|
bThruThick, dDepth, dMillSideAng, dMillDiam, abs( dMillThick),
|
||||||
dMaxDepth, dMillDiamTh, dToolLength, bMakeLocSurf, vFace)
|
dMillTotDiam, dMillStemLength, dMillThDiam, dMillThLength, bMakeLocSurf, vFace)
|
||||||
if not bOk then return bOk, sErr end
|
if not bOk then return bOk, sErr end
|
||||||
-- secondo taglio
|
-- secondo taglio
|
||||||
bOk, sErr = AddMillCornerMachining( Proc.PartId, nNewProc, nFacInd, tFacAdj, nTypeConeCut, nAddGrpId,
|
bOk, sErr = AddMillCornerMachining( Proc.PartId, nNewProc, nFacInd, tFacAdj, nTypeConeCut, nAddGrpId,
|
||||||
dToolDiam, dThick, sMilling, dAngOffs, dDepthMach,
|
dToolDiam, dThick, sMilling, dAngOffs, dDepthMach,
|
||||||
bThruThick, dDepth, dMillDiam, dMillTotDiam, abs(dThickTool),
|
bThruThick, dDepth, dMillSideAng, dMillDiam, abs( dMillThick),
|
||||||
dMaxDepth, dMillDiamTh, dToolLength, bMakeLocSurf, vFace)
|
dMillTotDiam, dMillStemLength, dMillThDiam, dMillThLength, bMakeLocSurf, vFace)
|
||||||
if not bOk then return bOk, sErr end
|
if not bOk then return bOk, sErr end
|
||||||
-- altrimenti ho un solo percorso
|
-- altrimenti ho un solo percorso
|
||||||
else
|
else
|
||||||
local bOk, sErr = AddMillCornerMachining( Proc.PartId, nNewProc, nFacInd, tFacAdj, nTypeConeCut, nAddGrpId,
|
local bOk, sErr = AddMillCornerMachining( Proc.PartId, nNewProc, nFacInd, tFacAdj, nTypeConeCut, nAddGrpId,
|
||||||
dToolDiam, dThick, sMilling, 0, dDepthMach,
|
dToolDiam, dThick, sMilling, 0, dDepthMach,
|
||||||
bThruThick, dDepth, dMillDiam, dMillTotDiam, abs(dThickTool),
|
bThruThick, dDepth, dMillSideAng, dMillDiam, abs( dMillThick),
|
||||||
dMaxDepth, dMillDiamTh, dToolLength, bMakeLocSurf, vFace)
|
dMillTotDiam, dMillStemLength, dMillThDiam, dMillThLength, bMakeLocSurf, vFace)
|
||||||
if not bOk then return bOk, sErr end
|
if not bOk then return bOk, sErr end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1157,8 +1182,8 @@ local function AddMillCorner( nTypeConeCut, vFace, Proc, nRawId, b3Raw,
|
|||||||
i = i + 1
|
i = i + 1
|
||||||
end
|
end
|
||||||
-- cancello la copia della superfice
|
-- cancello la copia della superfice
|
||||||
if nNewProc then
|
if nNewProc.Id then
|
||||||
EgtErase( nNewProc)
|
EgtErase( nNewProc.Id)
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -1294,6 +1319,11 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
|
|||||||
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
||||||
-- assegno utilizzo faccia
|
-- assegno utilizzo faccia
|
||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN)
|
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN)
|
||||||
|
local nEdgeFaceUse = GetEdgeToMachineFromVector( Proc.Id, vFace[i].Fac, Z_AX())
|
||||||
|
if nEdgeFaceUse then
|
||||||
|
local sNoteEdgeFaceUse = 'EdgesFaceUse=' .. EgtNumToString( nEdgeFaceUse) .. ';'
|
||||||
|
EgtSetMachiningParam( MCH_MP.USERNOTES, sNoteEdgeFaceUse)
|
||||||
|
end
|
||||||
-- assegno affondamento
|
-- assegno affondamento
|
||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||||
-- assegno lato di lavoro
|
-- assegno lato di lavoro
|
||||||
@@ -1447,6 +1477,13 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
|
|||||||
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
||||||
-- assegno utilizzo faccia
|
-- assegno utilizzo faccia
|
||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN)
|
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN)
|
||||||
|
if #vGeom == 1 then
|
||||||
|
local nEdgeFaceUse = GetEdgeToMachineFromVector( Proc.Id, vGeom[1][2], Z_AX())
|
||||||
|
if nEdgeFaceUse then
|
||||||
|
local sNoteEdgeFaceUse = 'EdgesFaceUse=' .. EgtNumToString( nEdgeFaceUse) .. ';'
|
||||||
|
EgtSetMachiningParam( MCH_MP.USERNOTES, sNoteEdgeFaceUse)
|
||||||
|
end
|
||||||
|
end
|
||||||
-- assegno affondamento
|
-- assegno affondamento
|
||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||||
-- assegno lato di lavoro
|
-- assegno lato di lavoro
|
||||||
@@ -1471,6 +1508,13 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
|
|||||||
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
||||||
-- assegno utilizzo faccia
|
-- assegno utilizzo faccia
|
||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN)
|
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN)
|
||||||
|
if #vGeom == 1 then
|
||||||
|
local nEdgeFaceUse = GetEdgeToMachineFromVector( Proc.Id, vGeom[1][2], Z_AX())
|
||||||
|
if nEdgeFaceUse then
|
||||||
|
local sNoteEdgeFaceUse = 'EdgesFaceUse=' .. EgtNumToString( nEdgeFaceUse) .. ';'
|
||||||
|
EgtSetMachiningParam( MCH_MP.USERNOTES, sNoteEdgeFaceUse)
|
||||||
|
end
|
||||||
|
end
|
||||||
-- assegno affondamento
|
-- assegno affondamento
|
||||||
-- EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
-- EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||||
if bNotThrou then
|
if bNotThrou then
|
||||||
@@ -1564,6 +1608,11 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
|
|||||||
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
||||||
-- assegno utilizzo faccia
|
-- assegno utilizzo faccia
|
||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN)
|
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN)
|
||||||
|
local nEdgeFaceUse = GetEdgeToMachineFromVector( Proc.Id, vFace[i].Fac, Z_AX())
|
||||||
|
if nEdgeFaceUse then
|
||||||
|
local sNoteEdgeFaceUse = 'EdgesFaceUse=' .. EgtNumToString( nEdgeFaceUse) .. ';'
|
||||||
|
EgtSetMachiningParam( MCH_MP.USERNOTES, sNoteEdgeFaceUse)
|
||||||
|
end
|
||||||
-- assegno affondamento
|
-- assegno affondamento
|
||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||||
-- assegno lato di lavoro
|
-- assegno lato di lavoro
|
||||||
@@ -1637,8 +1686,14 @@ local function AddSawings( sSawing, vFace, Proc, nRawId, b3Raw)
|
|||||||
end
|
end
|
||||||
-- aggiungo geometria
|
-- aggiungo geometria
|
||||||
EgtSetMachiningGeometry( {{ Proc.Id, vFace[i].Fac}})
|
EgtSetMachiningGeometry( {{ Proc.Id, vFace[i].Fac}})
|
||||||
|
-- si inverte il percorso, se necessario, per evitare che la sega a catena ruoti contro la traversa
|
||||||
|
local bToInvert = vFace[i].Norm:getX() >= 0.018
|
||||||
|
-- allungamento e accorciamento percorso
|
||||||
local dSal = - dSawDiam / 2
|
local dSal = - dSawDiam / 2
|
||||||
local dEal = vFace[i].Whisk - vFace[i].Len - dSawDiam / 2
|
local dEal = vFace[i].Whisk - vFace[i].Len - dSawDiam / 2
|
||||||
|
if bToInvert then
|
||||||
|
dSal, dEal = dEal, dSal
|
||||||
|
end
|
||||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
|
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
|
||||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)
|
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)
|
||||||
-- assegno utilizzo faccia
|
-- assegno utilizzo faccia
|
||||||
@@ -1648,12 +1703,12 @@ local function AddSawings( sSawing, vFace, Proc, nRawId, b3Raw)
|
|||||||
-- assegno affondamento
|
-- assegno affondamento
|
||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||||
-- assegno lato di lavoro e inversione direzione movimento
|
-- assegno lato di lavoro e inversione direzione movimento
|
||||||
if vFace[i].Norm:getX() < 0.018 then
|
if bToInvert then
|
||||||
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
|
||||||
else
|
|
||||||
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
||||||
|
else
|
||||||
|
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
||||||
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
||||||
end
|
end
|
||||||
-- posizione braccio porta testa
|
-- posizione braccio porta testa
|
||||||
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.NONE)
|
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.NONE)
|
||||||
@@ -1685,11 +1740,17 @@ local function AddSawings( sSawing, vFace, Proc, nRawId, b3Raw)
|
|||||||
end
|
end
|
||||||
-- aggiungo geometria
|
-- aggiungo geometria
|
||||||
EgtSetMachiningGeometry( {{ Proc.Id, vFace[i].Fac}})
|
EgtSetMachiningGeometry( {{ Proc.Id, vFace[i].Fac}})
|
||||||
|
-- si inverte il percorso, se necessario, per evitare che la sega a catena ruoti contro la traversa
|
||||||
|
local bToInvert = vFace[i].Norm:getX() >= 0.018
|
||||||
|
-- allungamento e accorciamento percorso
|
||||||
local dSal = - dSawDiam / 2
|
local dSal = - dSawDiam / 2
|
||||||
local dEal = - dSawDiam / 2
|
local dEal = - dSawDiam / 2
|
||||||
if ( vFace[i].Type & 2) ~= 0 then
|
if ( vFace[i].Type & 2) ~= 0 then
|
||||||
dSal = vFace[i].Whisk - vFace[i].Len - dSawDiam / 2
|
dSal = vFace[i].Whisk - vFace[i].Len - dSawDiam / 2
|
||||||
end
|
end
|
||||||
|
if bToInvert then
|
||||||
|
dSal, dEal = dEal, dSal
|
||||||
|
end
|
||||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
|
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
|
||||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)
|
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEal)
|
||||||
-- assegno utilizzo faccia
|
-- assegno utilizzo faccia
|
||||||
@@ -1699,12 +1760,12 @@ local function AddSawings( sSawing, vFace, Proc, nRawId, b3Raw)
|
|||||||
-- assegno affondamento
|
-- assegno affondamento
|
||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||||
-- assegno lato di lavoro e inversione direzione movimento
|
-- assegno lato di lavoro e inversione direzione movimento
|
||||||
if vFace[i].Norm:getX() < 0.018 then
|
if bToInvert then
|
||||||
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
|
||||||
else
|
|
||||||
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
||||||
|
else
|
||||||
|
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
||||||
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
||||||
end
|
end
|
||||||
-- posizione braccio porta testa
|
-- posizione braccio porta testa
|
||||||
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.NONE)
|
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.NONE)
|
||||||
@@ -2120,6 +2181,12 @@ local function MakeByMill( Proc, nRawId, b3Raw)
|
|||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
||||||
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)
|
||||||
|
elseif ( Proc.Grp == 1 or Proc.Grp == 2) then
|
||||||
|
if bToolInv then
|
||||||
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
||||||
|
else
|
||||||
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- se lamatura affondata speciale (cliente 90480029), setto attacco e stacco al centro
|
-- se lamatura affondata speciale (cliente 90480029), setto attacco e stacco al centro
|
||||||
@@ -2604,6 +2671,9 @@ function WPF.Make( Proc, nRawId, b3Raw, vNLO, b3Squaring)
|
|||||||
ReorderFaces( Proc.Id, EgtSurfTmFacetCount( Proc.Id))
|
ReorderFaces( Proc.Id, EgtSurfTmFacetCount( Proc.Id))
|
||||||
-- 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
|
||||||
|
if WD.FORCE_MILL_CONTOUR == true then
|
||||||
|
nCntType = 2
|
||||||
|
end
|
||||||
-- se fresatura
|
-- se fresatura
|
||||||
if nCntType == 2 then
|
if nCntType == 2 then
|
||||||
return MakeByMill( Proc, nRawId, b3Raw)
|
return MakeByMill( Proc, nRawId, b3Raw)
|
||||||
|
|||||||
+378
-340
File diff suppressed because it is too large
Load Diff
+48
-34
@@ -52,6 +52,7 @@ end
|
|||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
-- Applicazione della lavorazione
|
-- Applicazione della lavorazione
|
||||||
local function MakeCode_1( Proc, nRawId, b3Raw)
|
local function MakeCode_1( Proc, nRawId, b3Raw)
|
||||||
|
local sWarn
|
||||||
-- recupero e verifico l'entità curva associata
|
-- recupero e verifico l'entità curva associata
|
||||||
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
|
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
|
||||||
if AuxId then
|
if AuxId then
|
||||||
@@ -63,41 +64,54 @@ local function MakeCode_1( Proc, nRawId, b3Raw)
|
|||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
local vtExtr = EgtCurveExtrusion( AuxId or GDB_ID.NULL, GDB_ID.ROOT)
|
local vtExtr = EgtCurveExtrusion( AuxId or GDB_ID.NULL, GDB_ID.ROOT)
|
||||||
-- recupero la lavorazione
|
-- cerco e applico le lavorazioni di superficie opportune
|
||||||
local sSurfFin = WM.FindSurfacing( 'Finishing')
|
local sMachIni = EgtGetCurrMachineDir()..'\\'..EgtGetCurrMachineName()..'.ini'
|
||||||
if not sSurfFin then
|
local bSurfRough = ( EgtGetNumberFromIni( 'Machinings', 'SurfRoughing', 0, sMachIni) >= 1)
|
||||||
local sErr = 'Error : surface finishing not found in library'
|
local SurfLav = { { Type='Roughing', Name='SurfRou_', Err=true}, { Type='Finishing', Name='SurfFin_', Err=true}}
|
||||||
EgtOutLog( sErr)
|
local nStart = EgtIf( bSurfRough, 1, 2)
|
||||||
return false, sErr
|
for i = nStart, 2 do
|
||||||
|
-- recupero la lavorazione
|
||||||
|
local sSurfLav = WM.FindSurfacing( SurfLav[i].Type)
|
||||||
|
if not sSurfLav then
|
||||||
|
if SurfLav[i].Err then
|
||||||
|
local sErr = 'Error : surface '.. SurfLav[i].Type .. ' not found in library'
|
||||||
|
EgtOutLog( sErr)
|
||||||
|
return false, sErr
|
||||||
|
else
|
||||||
|
sWarn = 'Warning : surface '.. SurfLav[i].Type .. ' not found in library'
|
||||||
|
EgtOutLog( sWarn)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
-- inserisco la lavorazione di superficie
|
||||||
|
local sName = SurfLav[i].Name .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
|
local nMchFId = WM.AddMachining( Proc, sName, sSurfLav)
|
||||||
|
if not nMchFId then
|
||||||
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sSurfLav
|
||||||
|
EgtOutLog( sErr)
|
||||||
|
return false, sErr
|
||||||
|
end
|
||||||
|
EgtSetInfo( nMchFId, 'Part', Proc.PartId)
|
||||||
|
-- se lavorazione di fianco setto la nota per spostarla dopo i tagli di lama
|
||||||
|
if vtExtr:getZ() < WD.NZ_MINA then
|
||||||
|
EgtSetInfo( nMchFId, 'MOVE_AFTER', 1)
|
||||||
|
end
|
||||||
|
-- aggiungo geometria
|
||||||
|
EgtSetMachiningGeometry( {{ Proc.Id, -1},{AuxId, -1}})
|
||||||
|
-- imposto posizione braccio porta testa
|
||||||
|
local nSCC = MCH_SCC.ADIR_ZP
|
||||||
|
if AreSameVectorApprox( vtExtr, Z_AX()) then
|
||||||
|
nSCC = EgtIf( Proc.Box:getDimX() >= Proc.Box:getDimY(), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_XP)
|
||||||
|
end
|
||||||
|
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||||
|
-- eseguo
|
||||||
|
if not EgtApplyMachining( true, false) then
|
||||||
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
|
EgtSetOperationMode( nMchFId, false)
|
||||||
|
return false, sErr
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
-- inserisco la lavorazione di finitura superficie
|
return true, sWarn
|
||||||
local sName = 'SurfFin_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
|
||||||
local nMchFId = WM.AddMachining( Proc, sName, sSurfFin)
|
|
||||||
if not nMchFId then
|
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sSurfFin
|
|
||||||
EgtOutLog( sErr)
|
|
||||||
return false, sErr
|
|
||||||
end
|
|
||||||
EgtSetInfo( nMchFId, 'Part', Proc.PartId)
|
|
||||||
-- se lavorazione di fianco setto la nota per spostarla dopo i tagli di lama
|
|
||||||
if vtExtr:getZ() < WD.NZ_MINA then
|
|
||||||
EgtSetInfo( nMchFId, 'MOVE_AFTER', 1)
|
|
||||||
end
|
|
||||||
-- aggiungo geometria
|
|
||||||
EgtSetMachiningGeometry( {{ Proc.Id, -1},{AuxId, -1}})
|
|
||||||
-- imposto posizione braccio porta testa
|
|
||||||
local nSCC = MCH_SCC.ADIR_ZP
|
|
||||||
if AreSameVectorApprox( vtExtr, Z_AX()) then
|
|
||||||
nSCC = EgtIf( Proc.Box:getDimX() >= Proc.Box:getDimY(), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_XP)
|
|
||||||
end
|
|
||||||
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
|
||||||
-- eseguo
|
|
||||||
if not EgtApplyMachining( true, false) then
|
|
||||||
local _, sErr = EgtGetLastMachMgrError()
|
|
||||||
EgtSetOperationMode( nMchFId, false)
|
|
||||||
return false, sErr
|
|
||||||
end
|
|
||||||
return true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
|
|||||||
+117
-38
@@ -61,26 +61,10 @@ local Variant = require( 'WProcessVariant')
|
|||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
-- *** Inserimento delle pareti nel pannello ***
|
-- *** Inserimento delle pareti nel pannello ***
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bNewProcess, nRawOutlineId)
|
local function GetRawOrigAndDeltas()
|
||||||
|
|
||||||
-- Creazione nuovo gruppo di lavoro
|
|
||||||
if not bMachGroupOk then
|
|
||||||
local sMgName = EgtGetMachGroupNewName( 'Mach')
|
|
||||||
local NewMgId = EgtAddMachGroup( sMgName)
|
|
||||||
if not NewMgId then
|
|
||||||
local sOut = 'Errore nella creazione del gruppo di lavoro ' .. sMgName
|
|
||||||
return false, sOut
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Impostazione della tavola
|
|
||||||
EgtSetTable( 'Tab')
|
|
||||||
|
|
||||||
-- Area tavola
|
-- Area tavola
|
||||||
local b3Tab = EgtGetTableArea()
|
local b3Tab = EgtGetTableArea()
|
||||||
-- Calcolo posizione estremo di riferimento della tavola rispetto a sua origine in BL
|
-- Calcolo posizione estremo di riferimento della tavola rispetto a sua origine in BL
|
||||||
local OrigOnTab
|
|
||||||
local nCorner
|
|
||||||
local sOrigCorner = WD.ORIG_CORNER or 'BR'
|
local sOrigCorner = WD.ORIG_CORNER or 'BR'
|
||||||
local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL
|
local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL
|
||||||
if WD.GetOrigCorner then
|
if WD.GetOrigCorner then
|
||||||
@@ -95,6 +79,8 @@ function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bNewPr
|
|||||||
local DeltaY = EgtIf( dDeltaYFromBtl > 0, dDeltaYFromBtl, WD.DELTA_Y or 0)
|
local DeltaY = EgtIf( dDeltaYFromBtl > 0, dDeltaYFromBtl, WD.DELTA_Y or 0)
|
||||||
local DeltaZ = EgtIf( dDeltaZFromBtl > 0, dDeltaZFromBtl, WD.DELTA_Z or 0)
|
local DeltaZ = EgtIf( dDeltaZFromBtl > 0, dDeltaZFromBtl, WD.DELTA_Z or 0)
|
||||||
|
|
||||||
|
local nCorner
|
||||||
|
local OrigOnTab
|
||||||
if sOrigCorner == 'TL' then
|
if sOrigCorner == 'TL' then
|
||||||
nCorner = MCH_CR.TL
|
nCorner = MCH_CR.TL
|
||||||
OrigOnTab = Point3d( 0 + abs( DeltaX), b3Tab:getDimY() - abs( DeltaY), DeltaZ)
|
OrigOnTab = Point3d( 0 + abs( DeltaX), b3Tab:getDimY() - abs( DeltaY), DeltaZ)
|
||||||
@@ -120,6 +106,28 @@ function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bNewPr
|
|||||||
nCorner = MCH_CR.BL
|
nCorner = MCH_CR.BL
|
||||||
OrigOnTab = Point3d( WD.NEW_REF + abs( DeltaX), abs( DeltaY), DeltaZ)
|
OrigOnTab = Point3d( WD.NEW_REF + abs( DeltaX), abs( DeltaY), DeltaZ)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return sOrigCorner, nCorner, OrigOnTab
|
||||||
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bNewProcess, nRawOutlineId)
|
||||||
|
|
||||||
|
-- Creazione nuovo gruppo di lavoro
|
||||||
|
if not bMachGroupOk then
|
||||||
|
local sMgName = EgtGetMachGroupNewName( 'Mach')
|
||||||
|
local NewMgId = EgtAddMachGroup( sMgName)
|
||||||
|
if not NewMgId then
|
||||||
|
local sOut = 'Errore nella creazione del gruppo di lavoro ' .. sMgName
|
||||||
|
return false, sOut
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Impostazione della tavola
|
||||||
|
EgtSetTable( 'Tab')
|
||||||
|
|
||||||
|
-- Recupero dati posizionamento grezzo
|
||||||
|
local sOrigCorner, nCorner, OrigOnTab = GetRawOrigAndDeltas()
|
||||||
-- Impostazione dell'attrezzaggio di default
|
-- Impostazione dell'attrezzaggio di default
|
||||||
EgtImportSetup()
|
EgtImportSetup()
|
||||||
-- Impostazione eventuale allargamento area disponibile per grezzo
|
-- Impostazione eventuale allargamento area disponibile per grezzo
|
||||||
@@ -175,6 +183,23 @@ function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bNewPr
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
function WallExec.MoveRaw()
|
||||||
|
-- Recupero dati posizionamento grezzo
|
||||||
|
local sOrigCorner, nCorner, OrigOnTab = GetRawOrigAndDeltas()
|
||||||
|
-- Recupero identificativo del grezzo
|
||||||
|
local nRaw = EgtGetFirstRawPart() or GDB_ID.NULL
|
||||||
|
-- Posizione iniziale del centro grezzo
|
||||||
|
local ptOriCen = EgtGetRawPartCenter( nRaw)
|
||||||
|
-- Sposto il grezzo
|
||||||
|
EgtMoveToCornerRawPart( nRaw, OrigOnTab, nCorner)
|
||||||
|
EgtSetInfo( nRaw, 'ORIGCORNER', sOrigCorner)
|
||||||
|
-- Posizione finale del centro grezzo
|
||||||
|
local ptNewCen = EgtGetRawPartCenter( nRaw)
|
||||||
|
-- Restituisco flag di movimento
|
||||||
|
return not AreSamePointApprox( ptOriCen, ptNewCen)
|
||||||
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
-- *** Inserimento delle lavorazioni nelle pareti ***
|
-- *** Inserimento delle lavorazioni nelle pareti ***
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
@@ -303,7 +328,8 @@ local function ClassifyFeatures( vProc, b3Raw)
|
|||||||
if not bOk then Proc.Flg = 0 end
|
if not bOk then Proc.Flg = 0 end
|
||||||
-- se foratura
|
-- se foratura
|
||||||
elseif Drill.Identify( Proc) then
|
elseif Drill.Identify( Proc) then
|
||||||
local bOk = Drill.Classify( Proc, b3Raw)
|
local bUseMultiDrill = WD.USE_MULTI_DRILL or false
|
||||||
|
local bOk = Drill.Classify( Proc, b3Raw, bUseMultiDrill)
|
||||||
if not bOk then Proc.Flg = 0 end
|
if not bOk then Proc.Flg = 0 end
|
||||||
-- se mortasatura
|
-- se mortasatura
|
||||||
elseif Mortise.Identify( Proc) then
|
elseif Mortise.Identify( Proc) then
|
||||||
@@ -383,7 +409,8 @@ local function AddFeatureMachining( Proc, nRawId, b3Raw, vNLO, b3Squaring)
|
|||||||
-- se foratura ( 3/4-040-X)
|
-- se foratura ( 3/4-040-X)
|
||||||
elseif Drill.Identify( Proc) then
|
elseif Drill.Identify( Proc) then
|
||||||
-- esecuzione foratura
|
-- esecuzione foratura
|
||||||
bOk, sErr = Drill.Make( Proc, nRawId, b3Raw)
|
local bUseMultiDrill = WD.USE_MULTI_DRILL or false
|
||||||
|
bOk, sErr = Drill.Make( Proc, nRawId, b3Raw, bUseMultiDrill)
|
||||||
-- se mortasatura (3/4-050-X) o similari
|
-- se mortasatura (3/4-050-X) o similari
|
||||||
elseif Mortise.Identify( Proc) then
|
elseif Mortise.Identify( Proc) then
|
||||||
-- esecuzione mortasatura
|
-- esecuzione mortasatura
|
||||||
@@ -498,10 +525,8 @@ local function SortMach( nPhase, PrevMch, nPartId, nType, StartNames, bExistName
|
|||||||
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 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 bExistInfo and EgtGetInfo( nOperId, sInfo, 'i') ~= 1)) then
|
||||||
( not sInfo or ( bExistInfo and EgtGetInfo( nOperId, sInfo, 'i') == 1) or
|
|
||||||
( not bExistInfo and EgtGetInfo( nOperId, sInfo, 'i') ~= 1)) then
|
|
||||||
-- non si deve cambiare lo stato di attivazione della lavorazione (se disabilitata errata)
|
-- non si deve cambiare lo stato di attivazione della lavorazione (se disabilitata errata)
|
||||||
EgtSetCurrMachining( nOperId)
|
EgtSetCurrMachining( nOperId)
|
||||||
if not EgtIsMachiningEmpty() then
|
if not EgtIsMachiningEmpty() then
|
||||||
@@ -536,7 +561,7 @@ local function SortMach( nPhase, PrevMch, nPartId, nType, StartNames, bExistName
|
|||||||
end
|
end
|
||||||
|
|
||||||
if bByTool then
|
if bByTool then
|
||||||
function ToolCompare(a,b)
|
local function ToolCompare(a,b)
|
||||||
if a.ToolType < b.ToolType then
|
if a.ToolType < b.ToolType then
|
||||||
return true
|
return true
|
||||||
elseif a.ToolType == b.ToolType then
|
elseif a.ToolType == b.ToolType then
|
||||||
@@ -579,7 +604,7 @@ local function SortMach( nPhase, PrevMch, nPartId, nType, StartNames, bExistName
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
table.sort(TabCut, ToolCompare)
|
table.sort( TabCut, ToolCompare)
|
||||||
-- table.sort(TabCut, function(a,b) return a.ToolType < b.ToolType and a.ToolDiam > b.ToolDiam and a.Tool < b.Tool end)
|
-- table.sort(TabCut, function(a,b) return a.ToolType < b.ToolType and a.ToolDiam > b.ToolDiam and a.Tool < b.Tool end)
|
||||||
local SupportTabCut = {}
|
local SupportTabCut = {}
|
||||||
local nPrevTUUID = 0
|
local nPrevTUUID = 0
|
||||||
@@ -625,13 +650,15 @@ local function SortMachinings( nPhase, PrevMch, nPartId, nPriority)
|
|||||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.POCKETING, { 'PreDrill_'}, true, nil, nil, nil, nil, nil, nPriority)
|
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, nil, nPriority)
|
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, nil, false, nil, true, nil, nil)
|
||||||
-- -- Svuotature ***
|
-- -- Svuotature ***
|
||||||
-- PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.POCKETING, nil, nil, 'MOVE_AFTER', false)
|
-- PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.POCKETING, nil, nil, 'MOVE_AFTER', false)
|
||||||
-- -- 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 sgrossatura superficie
|
||||||
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_MY.SURFROUGHING, nil, nil, 'MOVE_AFTER', false, nil, nil, nil, nPriority)
|
||||||
|
-- Lavorazioni di finitura superficie
|
||||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_MY.SURFFINISHING, nil, nil, 'MOVE_AFTER', false, nil, nil, nil, nPriority)
|
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, nil, nil, nil, nPriority)
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'Gorge_'}, true, 'MOVE_AFTER', false, nil, nil, nil, nPriority)
|
||||||
@@ -659,7 +686,9 @@ local function SortMachinings( nPhase, PrevMch, nPartId, nPriority)
|
|||||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING, nil, nil, 'MOVE_AFTER', true)
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING, nil, nil, 'MOVE_AFTER', true)
|
||||||
-- Svuotature che vanno fatte dopo i tagli con lama
|
-- Svuotature 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_OY.POCKETING, nil, nil, 'MOVE_AFTER', true)
|
||||||
-- Lavorazioni di superficie che vanno fatte dopo i tagli con lama
|
-- Lavorazioni di sgrossatura superficie che vanno fatte dopo i tagli con lama
|
||||||
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_MY.SURFROUGHING, nil, nil, 'MOVE_AFTER', true)
|
||||||
|
-- Lavorazioni di finitura superficie che vanno fatte dopo i tagli con lama
|
||||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_MY.SURFFINISHING, nil, nil, 'MOVE_AFTER', true)
|
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_MY.SURFFINISHING, nil, nil, 'MOVE_AFTER', true)
|
||||||
end
|
end
|
||||||
return PrevMch
|
return PrevMch
|
||||||
@@ -667,7 +696,7 @@ end
|
|||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
-- setto la rimozione sfridi dopo le lavorazioni di outline
|
-- setto la rimozione sfridi dopo le lavorazioni di outline
|
||||||
function InsertScrapRemoval( nPhase)
|
local function InsertScrapRemoval( nPhase)
|
||||||
local nCurrentOperationId = EgtGetNextOperation( EgtGetPhaseDisposition( nPhase))
|
local nCurrentOperationId = EgtGetNextOperation( EgtGetPhaseDisposition( nPhase))
|
||||||
local nActiveMachiningId = EgtGetCurrMachining()
|
local nActiveMachiningId = EgtGetCurrMachining()
|
||||||
while nCurrentOperationId do
|
while nCurrentOperationId do
|
||||||
@@ -1086,6 +1115,30 @@ local function SetMirroredOperations()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
local function GetFeatureInfoAndDependency( vProc)
|
||||||
|
-- ciclo tutte le feature
|
||||||
|
for i = 1, #vProc do
|
||||||
|
local Proc = vProc[i]
|
||||||
|
-- controllo la feature con tutte le altre per recuperare le dipendenze
|
||||||
|
for j = 1, #vProc do
|
||||||
|
local ProcB = vProc[j]
|
||||||
|
-- se non è la stessa feature
|
||||||
|
if Proc.Id ~= ProcB.Id then
|
||||||
|
-- raggruppamento fori per eventuale Multidrill
|
||||||
|
if WD.USE_MULTI_DRILL and Drill.Identify( Proc) and Proc.Flg ~= 0 and Drill.Identify( ProcB) and ProcB.Flg ~= 0 then
|
||||||
|
if not Proc.OtherGeometries then
|
||||||
|
Proc.OtherGeometries = {}
|
||||||
|
end
|
||||||
|
table.insert( Proc.OtherGeometries, ProcB)
|
||||||
|
ProcB.Flg = 0
|
||||||
|
ProcB.bGrouped = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
local function CalculateSquaring( sSquaringTool, RawPart, vPart)
|
local function CalculateSquaring( sSquaringTool, RawPart, vPart)
|
||||||
local dRawPartHeight = RawPart.b3:getDimZ()
|
local dRawPartHeight = RawPart.b3:getDimZ()
|
||||||
@@ -1127,11 +1180,27 @@ local function AddSquaring( SquaringParameters, b3Squaring)
|
|||||||
return false, sMsg
|
return false, sMsg
|
||||||
end
|
end
|
||||||
|
|
||||||
Squaring.AddScrapRemoval( nFirstOperationId)
|
-- se presenti altre lavorazioni, prima di queste va eseguita la pulizia sfridi
|
||||||
|
if nFirstOperationId then
|
||||||
|
Squaring.AddScrapRemoval( nFirstOperationId)
|
||||||
|
end
|
||||||
|
|
||||||
return true, sMsg
|
return true, sMsg
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
local function AddFeatureStats( Stats, bOk, sMsg, nCutId, nTaskId)
|
||||||
|
if not bOk then
|
||||||
|
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId = nCutId, TaskId = nTaskId})
|
||||||
|
elseif sMsg and #sMsg > 0 then
|
||||||
|
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=0, CutId = nCutId, TaskId = nTaskId})
|
||||||
|
else
|
||||||
|
table.insert( Stats, {Err=0, Msg='', Rot=0, CutId = nCutId, TaskId = nTaskId})
|
||||||
|
end
|
||||||
|
|
||||||
|
return Stats
|
||||||
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
function WallExec.ProcessFeatures()
|
function WallExec.ProcessFeatures()
|
||||||
-- errori e stato
|
-- errori e stato
|
||||||
@@ -1185,6 +1254,7 @@ function WallExec.ProcessFeatures()
|
|||||||
bOk, SquaringParameters, b3Squaring, sMsg = CalculateSquaring( 'Mill', RawPart, vPart)
|
bOk, SquaringParameters, b3Squaring, sMsg = CalculateSquaring( 'Mill', RawPart, vPart)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- TODO sostituire con funzione
|
||||||
if not bOk then
|
if not bOk then
|
||||||
nTotErr = nTotErr + 1
|
nTotErr = nTotErr + 1
|
||||||
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=0, TaskId=0})
|
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=0, TaskId=0})
|
||||||
@@ -1202,6 +1272,8 @@ function WallExec.ProcessFeatures()
|
|||||||
local vPartProc = WallExec.CollectFeatures( vPart[i].Id, b3Raw, b3Squaring)
|
local vPartProc = WallExec.CollectFeatures( vPart[i].Id, b3Raw, b3Squaring)
|
||||||
vProc = EgtJoinTables( vProc, vPartProc)
|
vProc = EgtJoinTables( vProc, vPartProc)
|
||||||
end
|
end
|
||||||
|
-- recupero informazioni ausiliarie feature e dipendenze tra feature stesse
|
||||||
|
GetFeatureInfoAndDependency( vProc)
|
||||||
-- classifico topologicamente le feature
|
-- classifico topologicamente le feature
|
||||||
ClassifyTopology( vProc, nRawId)
|
ClassifyTopology( vProc, nRawId)
|
||||||
-- classifico le feature
|
-- classifico le feature
|
||||||
@@ -1229,13 +1301,19 @@ function WallExec.ProcessFeatures()
|
|||||||
local bOk, sMsg = AddFeatureMachining( Proc, nRawId, b3Raw, vNLO, b3Squaring)
|
local bOk, sMsg = AddFeatureMachining( Proc, nRawId, b3Raw, vNLO, b3Squaring)
|
||||||
if not bOk then
|
if not bOk then
|
||||||
nTotErr = nTotErr + 1
|
nTotErr = nTotErr + 1
|
||||||
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
|
||||||
elseif sMsg and #sMsg > 0 then
|
|
||||||
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
|
||||||
else
|
|
||||||
table.insert( Stats, {Err=0, Msg='', Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
|
||||||
end
|
end
|
||||||
elseif not Proc.Double and not Proc.LockOut then
|
-- output statistiche feature
|
||||||
|
Stats = AddFeatureStats( Stats, bOk, sMsg, Proc.CutId, Proc.TaskId)
|
||||||
|
-- output statistiche in caso di più feature lavorate nella stessa Proc
|
||||||
|
if Proc.OtherGeometries and #Proc.OtherGeometries > 0 then
|
||||||
|
for j = 1, #Proc.OtherGeometries do
|
||||||
|
Stats = AddFeatureStats( Stats, Proc.OtherGeometries[j].bOk, Proc.OtherGeometries[j].sMsg, Proc.OtherGeometries[j].CutId, Proc.OtherGeometries[j].TaskId)
|
||||||
|
if not Proc.OtherGeometries[j].bOk then
|
||||||
|
nTotErr = nTotErr + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif not Proc.Double and not Proc.LockOut and not Proc.bGrouped then
|
||||||
local sMsg = 'Feature not machinable by orientation'
|
local sMsg = 'Feature not machinable by orientation'
|
||||||
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
||||||
end
|
end
|
||||||
@@ -1249,7 +1327,7 @@ function WallExec.ProcessFeatures()
|
|||||||
if Proc.Double and Proc.Double > 0 then
|
if Proc.Double and Proc.Double > 0 then
|
||||||
for j = 1, #vProc do
|
for j = 1, #vProc do
|
||||||
local ProcMirror = vProc[j]
|
local ProcMirror = vProc[j]
|
||||||
if Proc.Mirror.Id == ProcMirror.Id then
|
if Proc.Mirror and ( Proc.Mirror.Id == ProcMirror.Id) then
|
||||||
-- per i fori l'operazione si basa sulla geometria ausiliaria
|
-- per i fori l'operazione si basa sulla geometria ausiliaria
|
||||||
if Proc.TopologyLongName == 'DRILLING' then
|
if Proc.TopologyLongName == 'DRILLING' then
|
||||||
local AuxId = EgtGetInfo( ProcMirror.Id, 'AUXID', 'i') or 0
|
local AuxId = EgtGetInfo( ProcMirror.Id, 'AUXID', 'i') or 0
|
||||||
@@ -1330,6 +1408,7 @@ function WallExec.ProcessFeatures()
|
|||||||
if SquaringParameters and next( SquaringParameters) ~= nil then
|
if SquaringParameters and next( SquaringParameters) ~= nil then
|
||||||
local bOk, sMsg = AddSquaring( SquaringParameters, b3Squaring)
|
local bOk, sMsg = AddSquaring( SquaringParameters, b3Squaring)
|
||||||
|
|
||||||
|
-- TODO sostituire con funzione
|
||||||
if not bOk then
|
if not bOk then
|
||||||
nTotErr = nTotErr + 1
|
nTotErr = nTotErr + 1
|
||||||
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=0, TaskId=0})
|
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=0, TaskId=0})
|
||||||
|
|||||||
@@ -552,5 +552,27 @@ function WallLib.IsFeatureCuttingEntireSection( b3Proc, dRawW, dRawH, dRawL)
|
|||||||
return ( ( ( abs( b3Proc:getDimY() - dRawW) < 10 * GEO.EPS_SMALL or b3Proc:getDimY() > dRawW) or ( abs( b3Proc:getDimX() - dRawL) < 10 * GEO.EPS_SMALL or b3Proc:getDimX() > dRawL)) and (abs(b3Proc:getDimZ() - dRawH) < 10 * GEO.EPS_SMALL or b3Proc:getDimZ() > dRawH))
|
return ( ( ( abs( b3Proc:getDimY() - dRawW) < 10 * GEO.EPS_SMALL or b3Proc:getDimY() > dRawW) or ( abs( b3Proc:getDimX() - dRawL) < 10 * GEO.EPS_SMALL or b3Proc:getDimX() > dRawL)) and (abs(b3Proc:getDimZ() - dRawH) < 10 * GEO.EPS_SMALL or b3Proc:getDimZ() > dRawH))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
-- Splitta una tabella in tabelle di dimensioni massima nMaxItemsCount
|
||||||
|
function WallLib.SplitTableInChunks( Table, nChunkSize)
|
||||||
|
local Result = {}
|
||||||
|
local Chunk = {}
|
||||||
|
|
||||||
|
for i, v in ipairs( Table) do
|
||||||
|
table.insert( Chunk, v)
|
||||||
|
if #Chunk == nChunkSize then
|
||||||
|
table.insert( Result, Chunk)
|
||||||
|
Chunk = {}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- se rimangono elementi, li aggiungo
|
||||||
|
if #Chunk > 0 then
|
||||||
|
table.insert( Result, Chunk)
|
||||||
|
end
|
||||||
|
|
||||||
|
return Result
|
||||||
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
return WallLib
|
return WallLib
|
||||||
|
|||||||
+130
-8
@@ -18,13 +18,14 @@ NEST.MACH_AREA_USE_OTHER_DIAM = 1 -- 0
|
|||||||
NEST.MACH_AREA_OTHER_DIAM = 200
|
NEST.MACH_AREA_OTHER_DIAM = 200
|
||||||
NEST.MACH_AREA_IGNORE_3rdFACE = 1 -- 0
|
NEST.MACH_AREA_IGNORE_3rdFACE = 1 -- 0
|
||||||
|
|
||||||
|
if NEST.FLAG ~= 11 then
|
||||||
|
local sLog = 'NestProcess : ' .. NEST.FILE .. ', ' .. NEST.MACHINE .. ', ' .. LEN[1] .. ', ' .. WIDTH[1]
|
||||||
|
EgtOutLog( sLog)
|
||||||
|
|
||||||
local sLog = 'NestProcess : ' .. NEST.FILE .. ', ' .. NEST.MACHINE .. ', ' .. LEN[1] .. ', ' .. WIDTH[1]
|
-- Cancello file di log specifico
|
||||||
EgtOutLog( sLog)
|
local sLogFile = EgtChangePathExtension( NEST.FILE, '.txt')
|
||||||
|
EgtEraseFile( sLogFile)
|
||||||
-- Cancello file di log specifico
|
end
|
||||||
local sLogFile = EgtChangePathExtension( NEST.FILE, '.txt')
|
|
||||||
EgtEraseFile( sLogFile)
|
|
||||||
|
|
||||||
-- Imposto direttorio libreria specializzata per Travi
|
-- Imposto direttorio libreria specializzata per Travi
|
||||||
EgtAddToPackagePath( NEST.BASEDIR .. '\\LuaLibs\\?.lua')
|
EgtAddToPackagePath( NEST.BASEDIR .. '\\LuaLibs\\?.lua')
|
||||||
@@ -56,6 +57,8 @@ _G.package.loaded.WProcessDoubleCut = nil
|
|||||||
local DoubleCut = require( 'WProcessDoubleCut')
|
local DoubleCut = require( 'WProcessDoubleCut')
|
||||||
_G.package.loaded.WProcessFreeContour = nil
|
_G.package.loaded.WProcessFreeContour = nil
|
||||||
local FreeContour = require( 'WProcessFreeContour')
|
local FreeContour = require( 'WProcessFreeContour')
|
||||||
|
_G.package.loaded.PanelSaw = nil
|
||||||
|
local PanelSaw = require( 'PanelSaw')
|
||||||
|
|
||||||
-- Carico i dati globali
|
-- Carico i dati globali
|
||||||
local WD = require( 'WallData')
|
local WD = require( 'WallData')
|
||||||
@@ -65,6 +68,7 @@ local s_dSideMillDiamDown = WD.SIDEMILL_DIAM_DOWN or 350
|
|||||||
local s_dSideMillDiamUp = WD.SIDEMILL_DIAM_UP or 65
|
local s_dSideMillDiamUp = WD.SIDEMILL_DIAM_UP or 65
|
||||||
local s_dHorDrillLen = WD.HOR_DRILL_LEN or 1780
|
local s_dHorDrillLen = WD.HOR_DRILL_LEN or 1780
|
||||||
local s_dHorDrillDiam = WD.HOR_DRILL_DIAM or 35
|
local s_dHorDrillDiam = WD.HOR_DRILL_DIAM or 35
|
||||||
|
local s_dHorDrillDiam5Axes = WD.HOR_DRILL_DIAM_5AX or 0
|
||||||
local s_sOrigCorner = WD.ORIG_CORNER or 'TL'
|
local s_sOrigCorner = WD.ORIG_CORNER or 'TL'
|
||||||
local s_dIntRulli = WD.INTRULLI or 1200
|
local s_dIntRulli = WD.INTRULLI or 1200
|
||||||
local s_dMinRawYHorDrill = WD.MINRAWY_HOR_DRILL or 2800
|
local s_dMinRawYHorDrill = WD.MINRAWY_HOR_DRILL or 2800
|
||||||
@@ -535,7 +539,7 @@ local function ClassifyDrillsOnLateralFaces( nPartId, dMinSheetWidth)
|
|||||||
if not AuxId or EgtGetType( AuxId) ~= GDB_TY.CRV_ARC then break end
|
if not AuxId or EgtGetType( AuxId) ~= GDB_TY.CRV_ARC then break end
|
||||||
-- verifico se diametro compatibile con la punta
|
-- verifico se diametro compatibile con la punta
|
||||||
local dDiam = 2 * EgtArcRadius( AuxId)
|
local dDiam = 2 * EgtArcRadius( AuxId)
|
||||||
if abs( dDiam - s_dHorDrillDiam) < WD.DRILL_TOL + GEO.EPS_SMALL then
|
if ( abs( dDiam - s_dHorDrillDiam5Axes) < WD.DRILL_TOL + GEO.EPS_SMALL) or ( abs( dDiam - s_dHorDrillDiam) < WD.DRILL_TOL + GEO.EPS_SMALL) then
|
||||||
local ptDrill = EgtCP( AuxId, GDB_RT.GLOB)
|
local ptDrill = EgtCP( AuxId, GDB_RT.GLOB)
|
||||||
local dLen = abs( EgtCurveThickness( AuxId))
|
local dLen = abs( EgtCurveThickness( AuxId))
|
||||||
local bLong = dLen > s_dHorDrillLen - 1
|
local bLong = dLen > s_dHorDrillLen - 1
|
||||||
@@ -1683,6 +1687,124 @@ NEST.ERR = 0
|
|||||||
-- resetto gruppo di lavorazione corrente
|
-- resetto gruppo di lavorazione corrente
|
||||||
EgtResetCurrMachGroup()
|
EgtResetCurrMachGroup()
|
||||||
|
|
||||||
|
-- modalità nesting utile per cabinet: un grezzo per ogni pezzo, pezzo centrato nel grezzo. Il grezzo non viene preso da magazzino ma creato ad hoc, con un dato sovramateriale.
|
||||||
|
-- il numero del MachGroup deve coincidere con il PDN del pezzo originale
|
||||||
|
if NEST.FLAG ~= 11 and WD.ENABLE_SIMPLE_NESTING then
|
||||||
|
|
||||||
|
-- sovramateriale richiesto
|
||||||
|
local dOverMaterial = max( 0, NEST.KERF or 2)
|
||||||
|
|
||||||
|
-- inizializzazione parametri per creazione grezzo tramite BatchProcessNew
|
||||||
|
_G.WALL = {}
|
||||||
|
WALL.FILE = NEST.FILE
|
||||||
|
WALL.MACHINE = NEST.MACHINE
|
||||||
|
WALL.BASEDIR = NEST.BASEDIR
|
||||||
|
WALL.FLAG = 6 -- CREATE_PANEL
|
||||||
|
WALL.NESTING_REF = 'BL'
|
||||||
|
|
||||||
|
-- si ricrea la lista pezzi ordinata
|
||||||
|
local PartList = {}
|
||||||
|
local nPartCounter = 0
|
||||||
|
for nPartId, nCount in pairs( PART) do
|
||||||
|
nPartCounter = nPartCounter + 1
|
||||||
|
PartList[nPartCounter] = {}
|
||||||
|
PartList[nPartCounter].nId = nPartId
|
||||||
|
PartList[nPartCounter].nCount = nCount
|
||||||
|
PartList[nPartCounter].nPdn = EgtGetInfo( nPartId, "PDN", 'i')
|
||||||
|
PartList[nPartCounter].bAddCounterToNaming = false
|
||||||
|
-- se presente un pezzo con multipli il PDN sarà seguito da un contatore
|
||||||
|
if nCount > 1 then
|
||||||
|
PartList[nPartCounter].bAddCounterToNaming = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- si riordina in base al PDN
|
||||||
|
table.sort( PartList, function(a, b) return tonumber( a.nPdn) < tonumber( b.nPdn) end)
|
||||||
|
|
||||||
|
-- per ogni singolo pezzo si chiama la fliprot per avere la migliore orientazione
|
||||||
|
-- si creano duplo e machgroup e si settano le note opportune per poi creare i grezzi richiamando la BatchProcessNew (flag 6)
|
||||||
|
for i = 1, #PartList do
|
||||||
|
|
||||||
|
local nPartId = PartList[i].nId
|
||||||
|
local nPartCount = PartList[i].nCount
|
||||||
|
local nPdn = PartList[i].nPdn
|
||||||
|
local bAddCounterToNaming = PartList[i].bAddCounterToNaming
|
||||||
|
|
||||||
|
-- si ruotano e invertono i pezzi per avere la migliore posizione di lavorazione
|
||||||
|
_G.NFAR = {}
|
||||||
|
NFAR.ERR = 0
|
||||||
|
NFAR.MSG = ''
|
||||||
|
NFAR.PARTID = nPartId
|
||||||
|
NFAR.BASEDIR = NEST.BASEDIR
|
||||||
|
dofile( NEST.BASEDIR .. "\\NestFlipAndRotate.lua")
|
||||||
|
|
||||||
|
-- informazioni dalla parte originale
|
||||||
|
-- box e relative dimensioni
|
||||||
|
local nBoxLayerId = EgtGetFirstNameInGroup( nPartId, "Box")
|
||||||
|
local nBoxId = EgtGetFirstNameInGroup( nBoxLayerId, "Box")
|
||||||
|
local b3Part = EgtGetBBoxGlob( nBoxId, GDB_BB.STANDARD)
|
||||||
|
-- inversione e rotazione
|
||||||
|
local nPartFlip = EgtGetInfo( nPartId, "INVERTED", 'i') or 0
|
||||||
|
local nPartRotation = EgtGetInfo( nPartId, "ROTATED", 'i') or 0
|
||||||
|
|
||||||
|
-- dimensioni grezzo, considerando sovramateriale
|
||||||
|
local dRawLength = b3Part:getDimX() + 2 * dOverMaterial
|
||||||
|
local dRawWidth = b3Part:getDimY() + 2 * dOverMaterial
|
||||||
|
|
||||||
|
for j = 1, nPartCount do
|
||||||
|
-- creazione gruppo di lavoro
|
||||||
|
local sMachGroupName = nPdn
|
||||||
|
if bAddCounterToNaming then
|
||||||
|
sMachGroupName = nPdn .. '_' .. string.format("%02d", j)
|
||||||
|
end
|
||||||
|
local nMachGroupId = EgtAddMachGroup( sMachGroupName)
|
||||||
|
if not nMachGroupId then
|
||||||
|
EgtOutLog( "Errore: MachGroup " .. nPdn .. " già presente")
|
||||||
|
EgtOutBox( 'Error : MachGroup ' .. nPdn .. ' already existing', 'Nesting failed')
|
||||||
|
NEST.ERR = 2
|
||||||
|
return
|
||||||
|
end
|
||||||
|
-- settaggio note in gruppo di lavoro
|
||||||
|
EgtSetInfo( nMachGroupId, "PANELLEN", dRawLength)
|
||||||
|
EgtSetInfo( nMachGroupId, "PANELWIDTH", dRawWidth)
|
||||||
|
EgtSetInfo( nMachGroupId, "MATERIAL", NEST.MATERIAL)
|
||||||
|
EgtSetInfo( nMachGroupId, "PRODID", NEST.PRODID)
|
||||||
|
EgtSetInfo( nMachGroupId, "PATTID", nMachGroupId)
|
||||||
|
|
||||||
|
-- creazione duplo
|
||||||
|
local nPartDuploId = EgtDuploNew( nPartId)
|
||||||
|
-- settaggio note in duplo
|
||||||
|
EgtSetInfo( nMachGroupId, "PART" .. 1, nPartDuploId .. "," .. EgtNumToString( dOverMaterial) .. "," .. EgtNumToString( dOverMaterial) .. "," .. 0 .."," .. 0)
|
||||||
|
EgtSetInfo( nPartDuploId, "POSY", dOverMaterial)
|
||||||
|
EgtSetInfo( nPartDuploId, "POSX", dOverMaterial)
|
||||||
|
EgtSetInfo( nPartDuploId, "FLIP", nPartFlip)
|
||||||
|
EgtSetInfo( nPartDuploId, "ROT", nPartRotation)
|
||||||
|
|
||||||
|
-- creazione grezzi tramite BatchProcessNew
|
||||||
|
EgtSetCurrMachGroup( nMachGroupId)
|
||||||
|
EgtSetInfo( nMachGroupId, "UPDATEUI", 1)
|
||||||
|
dofile( NEST.BASEDIR .. "\\BatchProcessNew.lua")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
EgtProcessEvents( 200 + 100, 0)
|
||||||
|
EgtResetCurrMachGroup()
|
||||||
|
EgtOutLog( ' +++ NestProcess completed')
|
||||||
|
|
||||||
|
EgtOutLog( ' +++ Generating Cutting List')
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
elseif NEST.FLAG == 11 then
|
||||||
|
|
||||||
|
local vCuttingListType = EgtSplitString( WD.PANELSAW_TYPE)
|
||||||
|
for i = 1, #vCuttingListType do
|
||||||
|
local sCuttingListType = vCuttingListType[i]
|
||||||
|
PanelSaw.GenerateCuttingList( sCuttingListType)
|
||||||
|
end
|
||||||
|
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- inizio nesting automatico
|
-- inizio nesting automatico
|
||||||
EgtAutoNestStart()
|
EgtAutoNestStart()
|
||||||
|
|
||||||
@@ -1691,7 +1813,7 @@ local RawParts = {}
|
|||||||
-- creo tabella dei grezzi
|
-- creo tabella dei grezzi
|
||||||
for sIndex, dLen in pairs( LEN) do
|
for sIndex, dLen in pairs( LEN) do
|
||||||
RawParts[tonumber(sIndex)] = { Len = dLen}
|
RawParts[tonumber(sIndex)] = { Len = dLen}
|
||||||
end
|
end
|
||||||
for sIndex, dWidth in pairs( WIDTH) do
|
for sIndex, dWidth in pairs( WIDTH) do
|
||||||
RawParts[tonumber(sIndex)].Width = dWidth
|
RawParts[tonumber(sIndex)].Width = dWidth
|
||||||
end
|
end
|
||||||
|
|||||||
+8
-4
@@ -1,4 +1,4 @@
|
|||||||
-- Process.lua by Egaltech s.r.l. 2022/05/09
|
-- Process.lua by Egaltech s.r.l. 2026/03/30
|
||||||
-- Gestione calcolo disposizione e lavorazioni per Pareti
|
-- Gestione calcolo disposizione e lavorazioni per Pareti
|
||||||
-- Si opera sulla macchina corrente
|
-- Si opera sulla macchina corrente
|
||||||
-- 2020/12/09 Come per BatchProcess.lua si gestiscono anche rotazioni di inversione con valori negativi.
|
-- 2020/12/09 Come per BatchProcess.lua si gestiscono anche rotazioni di inversione con valori negativi.
|
||||||
@@ -108,6 +108,10 @@ local function MyProcessInputData()
|
|||||||
|
|
||||||
-- Recupero informazione se progetto o produzione
|
-- Recupero informazione se progetto o produzione
|
||||||
local bProj = ( EgtGetInfo( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL, 'PROJECT', 'i') == 1)
|
local bProj = ( EgtGetInfo( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL, 'PROJECT', 'i') == 1)
|
||||||
|
|
||||||
|
-- Verifico se progetto deriva da BeamWall
|
||||||
|
local _, _, sExt = EgtSplitPath( EgtGetCurrFilePath() or '')
|
||||||
|
local bBwProj = ( ( string.upper( sExt or '') == '.BWE'))
|
||||||
|
|
||||||
-- Eseguo eventuali rotazioni e inversioni testa-coda
|
-- Eseguo eventuali rotazioni e inversioni testa-coda
|
||||||
for i = 1, #vWall do
|
for i = 1, #vWall do
|
||||||
@@ -115,7 +119,7 @@ local function MyProcessInputData()
|
|||||||
-- rotazione
|
-- rotazione
|
||||||
local dRotAng = EgtGetInfo( vWall[i].Id, 'ROTATED', 'd')
|
local dRotAng = EgtGetInfo( vWall[i].Id, 'ROTATED', 'd')
|
||||||
if dRotAng then
|
if dRotAng then
|
||||||
if abs( dRotAng) > GEO.EPS_ANG_SMALL and not EgtExistsInfo( vWall[i].Id, 'ROTATED_DONE') then
|
if abs( dRotAng) > GEO.EPS_ANG_SMALL and not bBwProj and not EgtExistsInfo( vWall[i].Id, 'ROTATED_DONE') then
|
||||||
local ptRotCen = b3Solid:getCenter()
|
local ptRotCen = b3Solid:getCenter()
|
||||||
EgtRotate( vWall[i].Id, ptRotCen, X_AX(), dRotAng, GDB_RT.GLOB)
|
EgtRotate( vWall[i].Id, ptRotCen, X_AX(), dRotAng, GDB_RT.GLOB)
|
||||||
b3Solid:rotate( ptRotCen, X_AX(), dRotAng)
|
b3Solid:rotate( ptRotCen, X_AX(), dRotAng)
|
||||||
@@ -125,7 +129,7 @@ local function MyProcessInputData()
|
|||||||
-- inversione
|
-- inversione
|
||||||
local dInvAng = EgtGetInfo( vWall[i].Id, 'INVERTED', 'd')
|
local dInvAng = EgtGetInfo( vWall[i].Id, 'INVERTED', 'd')
|
||||||
if dInvAng then
|
if dInvAng then
|
||||||
if abs( dInvAng - 180) > GEO.EPS_ANG_SMALL and abs( dInvAng + 180) > GEO.EPS_ANG_SMALL and not EgtExistsInfo( vWall[i].Id, 'INVERTED_DONE') then
|
if abs( dInvAng - 180) > GEO.EPS_ANG_SMALL and abs( dInvAng + 180) > GEO.EPS_ANG_SMALL and not bBwProj and not EgtExistsInfo( vWall[i].Id, 'INVERTED_DONE') then
|
||||||
local ptInvCen = b3Solid:getCenter()
|
local ptInvCen = b3Solid:getCenter()
|
||||||
EgtRotate( vWall[i].Id, ptInvCen, Z_AX(), dInvAng - 180, GDB_RT.GLOB)
|
EgtRotate( vWall[i].Id, ptInvCen, Z_AX(), dInvAng - 180, GDB_RT.GLOB)
|
||||||
b3Solid:rotate( ptInvCen, Z_AX(), dInvAng - 180)
|
b3Solid:rotate( ptInvCen, Z_AX(), dInvAng - 180)
|
||||||
@@ -134,7 +138,7 @@ local function MyProcessInputData()
|
|||||||
end
|
end
|
||||||
-- correzioni per rotazioni non centrate di produzioni TS3 (quasi sempre multipli di 90 deg)
|
-- correzioni per rotazioni non centrate di produzioni TS3 (quasi sempre multipli di 90 deg)
|
||||||
local sType = EgtGetInfo( vWall[i].Id, 'TYPE', 's')
|
local sType = EgtGetInfo( vWall[i].Id, 'TYPE', 's')
|
||||||
if not bProj and dRotAng and dInvAng and sType ~= 'LAYER' then
|
if not bProj and not bBwProj and dRotAng and dInvAng and sType ~= 'LAYER' then
|
||||||
if abs( dInvAng - 0) < GEO.EPS_ANG_SMALL then
|
if abs( dInvAng - 0) < GEO.EPS_ANG_SMALL then
|
||||||
if abs( dRotAng - 180) < GEO.EPS_ANG_SMALL then
|
if abs( dRotAng - 180) < GEO.EPS_ANG_SMALL then
|
||||||
vWall[i].PosZ = vWall[i].PosZ - vWall[i].Box:getDimY()
|
vWall[i].PosZ = vWall[i].PosZ - vWall[i].Box:getDimY()
|
||||||
|
|||||||
@@ -1,5 +1,78 @@
|
|||||||
==== Wall Update Log ====
|
==== Wall Update Log ====
|
||||||
|
|
||||||
|
Versione 3.1d2 (23/04/2026)
|
||||||
|
- Modif : Tutte le forature vengono ordinate per diametro decrescente
|
||||||
|
|
||||||
|
Versione 3.1d1 (08/04/2026)
|
||||||
|
- Modif : in LapJoint, svuotature, l'uscita dalla geometria viene limitata della massima quantità che non rovina il pezzo vicino
|
||||||
|
- Fixed : correzione per chiodature
|
||||||
|
|
||||||
|
Versione 3.1c1 (02/04/2026)
|
||||||
|
- Added : in CleanCorner si gestiscono angoli diversi da 30
|
||||||
|
- Fixed : in puliture con sega a catena corrett scelta errata del lato
|
||||||
|
|
||||||
|
Versione 2.7k1 (20/11/2025)
|
||||||
|
- Modif : in LapJoint con Q08=1 ora si fanno con milling anche tasche a L cieche da sopra
|
||||||
|
- Fixed : in LapJoint correzione alle lavorazioni inclinate
|
||||||
|
|
||||||
|
Versione 2.7j2 (21/10/2025)
|
||||||
|
- Modif : in LapJoint i percorsi dei truciolatori sono sempre in concordanza a meno di forzature con apposito flag macchina
|
||||||
|
- Modif : in PanelSaw migliorata l'esportazione Cutty
|
||||||
|
|
||||||
|
Versione 2.7j1 (08/10/2025)
|
||||||
|
- Added : in PanelSaw si gestiscono le esportazioni Homag
|
||||||
|
- Added : in PanelSaw si gestisce la direzione fibra
|
||||||
|
- Modif : in PanelSaw migliorata l'esportazione Cutty
|
||||||
|
|
||||||
|
Versione 2.7i2 (18/09/2025)
|
||||||
|
- Modif : in PanelSaw gestione campi a lunghezza fissa
|
||||||
|
|
||||||
|
Versione 2.7i1 (16/09/2025)
|
||||||
|
- Added : per cabinet aggiunta esportazione cutting list e modalità nesting semplice
|
||||||
|
|
||||||
|
Versione 2.7h1 (06/08/2025)
|
||||||
|
- Modif : in LapJoint migliorata scelta lavorazione in caso di feature piccola
|
||||||
|
|
||||||
|
Versione 2.7g3 (24/07/2025)
|
||||||
|
- Fixed : in Lapjoint corretto step in caso due facce verso l'alto
|
||||||
|
|
||||||
|
Versione 2.7g2 (17/07/2025)
|
||||||
|
- Added : aggiunta gestione origine e offset da questa che non fanno riprocessare l'intero grezzo (ma solo aggiornare)
|
||||||
|
- Fixed : corretta BatchProcess per nome file anche se da non riprocessare.
|
||||||
|
|
||||||
|
Versione 2.7g1 (09/07/2025)
|
||||||
|
- Fixed : in FreeContour corretta scelta del lato da lavorare in caso si abbiano lati inclinati
|
||||||
|
|
||||||
|
Versione 2.7f2 (06/06/2025)
|
||||||
|
- Fixed : in Lapjoint migliorie alle svuotature
|
||||||
|
|
||||||
|
Versione 2.7f1 (05/06/2025)
|
||||||
|
- Added : gestita forzatura freecontour di fresa per macchine senza lama (costante WallData FORCE_MILL_CONTOUR)
|
||||||
|
- Modif : migliorata DoubleCut
|
||||||
|
- Fixed : corretta BatchProcess per caso in cui il nome del file cnc generato non era corretto
|
||||||
|
|
||||||
|
Versione 2.7d1 (14/04/2025)
|
||||||
|
- Added : in DoubleCut aggiunta Q06 per forzare utilizzo lama
|
||||||
|
|
||||||
|
Versione 2.7b1 (03/03/2025)
|
||||||
|
- Added : gestione multidrill
|
||||||
|
|
||||||
|
Versione 2.7a2 (23/01/2025)
|
||||||
|
- Fixed : in Ts7 corretto un problema che portava a rotazioni errate, introdotto con 2.7a1
|
||||||
|
- Fixed : in squadratura piccole correzioni
|
||||||
|
|
||||||
|
Versione 2.7a1 (21/01/2025)
|
||||||
|
- Modif : in Ts7 aggiunta scrittura id progetto e produzione in Btm
|
||||||
|
|
||||||
|
Versione 2.6l1 (11/12/2024)
|
||||||
|
- Modif : modificato il calcolo feature passante per gorge
|
||||||
|
- Modif : in pulizia spigoli si riporta correttamente la collisione sulla feature specifica
|
||||||
|
- Fixed : in pulizia spigoli correzioni varie
|
||||||
|
- Fixed : in LapJoint correzioni varie
|
||||||
|
|
||||||
|
Versione 2.6k3 (27/11/2024)
|
||||||
|
- Modif : migliorato calcolo approccio e retrazione in Sidemill/Sidegroove
|
||||||
|
|
||||||
Versione 2.6k2 (19/11/2024)
|
Versione 2.6k2 (19/11/2024)
|
||||||
- Modif : in Nesting riportata allo stato precedente la tolleranza posizionamento pannelli sul bordo
|
- Modif : in Nesting riportata allo stato precedente la tolleranza posizionamento pannelli sul bordo
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -1,6 +1,6 @@
|
|||||||
-- Version.lua by Egalware s.r.l. 2024/08/20
|
-- Version.lua by Egalware s.r.l. 2026/03/30
|
||||||
-- Gestione della versione di Wall
|
-- Gestione della versione di Wall
|
||||||
|
|
||||||
NAME = 'Wall'
|
NAME = 'Wall'
|
||||||
VERSION = '2.6k2'
|
VERSION = '3.1d2'
|
||||||
MIN_EXE = '2.6k1'
|
MIN_EXE = '3.1c1'
|
||||||
|
|||||||
Reference in New Issue
Block a user