Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ed80dccaf0 | |||
| 8830001985 | |||
| c0e2199903 | |||
| b7854f1160 | |||
| 63ad68a653 | |||
| 4458c174e8 | |||
| 697965b30b | |||
| 20900c9724 | |||
| 9043e80c84 | |||
| 45780fce29 | |||
| 45cdddb994 | |||
| 24e20625b6 | |||
| c77062160a | |||
| bb0d02c1e5 | |||
| cb2c752d65 | |||
| 30d0efa0ca | |||
| 7f4e117339 | |||
| 366a9d5f49 | |||
| 9e869b5c26 | |||
| a0e82e5647 | |||
| a17e649d44 | |||
| 79856f6345 |
+264
-193
@@ -3,7 +3,9 @@
|
||||
|
||||
-- Intestazioni
|
||||
require( 'EgtBase')
|
||||
EgtEnableDebug( false)
|
||||
|
||||
-- Dati
|
||||
local WL = require ( 'WallLib')
|
||||
|
||||
local PanelSaw = {}
|
||||
|
||||
@@ -30,17 +32,37 @@ local function GetPanelList()
|
||||
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].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 aggiungere labeling, edgebanding, graindirection, ...
|
||||
-- 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
|
||||
@@ -56,13 +78,11 @@ local function GetSheetList()
|
||||
dLength = 2800,
|
||||
dWidth = 2070,
|
||||
dThickness = 8,
|
||||
sMaterial = ''
|
||||
},
|
||||
{
|
||||
dLength = 2800,
|
||||
dWidth = 2070,
|
||||
dThickness = 18,
|
||||
sMaterial = ''
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,204 +95,250 @@ local function GetProjectInfo()
|
||||
local ProjectInfo = {}
|
||||
local idBtlInfo = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL
|
||||
|
||||
ProjectInfo.sProjectName = EgtGetInfo( idBtlInfo, 'PROJECTNAME', 's') or ''
|
||||
_, ProjectInfo.sProjectName = EgtSplitPath( EgtGetInfo( idBtlInfo, 'PROJECTNAME', 's') or '')
|
||||
|
||||
return ProjectInfo
|
||||
end
|
||||
|
||||
local function GetFormattedLine( ValuesList, ValuesPlaceholders, FieldFixLength)
|
||||
local sLine = ''
|
||||
local Values = ValuesList
|
||||
local nPos = 1 -- posizione partenza linea
|
||||
|
||||
for j, Value in ipairs( Values) do
|
||||
local Placeholder = ValuesPlaceholders[j]
|
||||
local sFormatted = string.format( Placeholder, Value)
|
||||
|
||||
-- se il campo ha lunghezza fissa, si aggiungono spazi
|
||||
if FieldFixLength and FieldFixLength[j] then
|
||||
local sFieldLength = FieldFixLength[j]
|
||||
-- troncamento se troppo lungo
|
||||
if #sFormatted > sFieldLength then
|
||||
sFormatted = string.sub( sFormatted, 1, sFieldLength)
|
||||
end
|
||||
sFormatted = sFormatted .. string.rep(" ", sFieldLength - #sFormatted)
|
||||
end
|
||||
|
||||
sLine = sLine .. sFormatted
|
||||
nPos = nPos + #sFormatted
|
||||
|
||||
-- Aggiungi spazio solo se non è l'ultimo campo
|
||||
if j < #Values then
|
||||
sLine = sLine .. " "
|
||||
nPos = nPos + 1
|
||||
end
|
||||
end
|
||||
return sLine
|
||||
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 F0 = {
|
||||
Header = { 'F0'},
|
||||
HeaderPlaceholders = { '%s'},
|
||||
Values = { ' 7.70', '210700', '150300'},
|
||||
ValuesPlaceholders = { '%s', '%s', '%s'}
|
||||
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 F0b = {
|
||||
Header = { 'F0b', '""', '""', '""', '""'},
|
||||
HeaderPlaceholders = { '%s', '%s', '%s', '%s', '%s'}
|
||||
}
|
||||
|
||||
local F1 = {
|
||||
Header = { 'F1', PanelList[1].dThickness, 0, 0, 0},
|
||||
HeaderPlaceholders = { '%s', '%.3f', '%.3f', '%.3f', '%.3f'},
|
||||
local Panels = {
|
||||
ValuesList = {},
|
||||
ValuesPlaceholders = { '%.3f', '%.3f', '%d', '%d', '%d', '%d', '%s', '%d', '%.3f', '%d', '%d', '%d', '%d'},
|
||||
FieldFixLength = { [6] = 29, [7] = 50}
|
||||
}
|
||||
for i = 1, #SheetList do
|
||||
F1.ValuesList[i] = { SheetList[i].dLength, SheetList[i].dWidth, 99, 200, 1, 1, SheetList[i].sMaterial, 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', '%s', '%d', '%d', '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%.3f', '%d', '%d', '%d', '%.3f', '%.3f'},
|
||||
FieldFixLength = { [8] = 20, [13] = 50, [23] = 85}
|
||||
ValuesPlaceholders = { '%s', '%d', '%.1f', '%.1f', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' }
|
||||
}
|
||||
for i = 1, #PanelList do
|
||||
F2.ValuesList[i] = { PanelList[i].dLength, PanelList[i].dWidth, PanelList[i].nQuantity, 0, 0, 0, 0, PanelList[i].nPdn, 0, 0, 0, 0, PanelList[i].sDescription, 0, 0, 0, 0, 1, 0, 1500, 0, 0, 0, 0, 0}
|
||||
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
|
||||
|
||||
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'}
|
||||
}
|
||||
-- Intestazione
|
||||
table.insert( Lines, string.format( table.concat( Header.ValuesPlaceholders, ','), table.unpack( Header.Values)))
|
||||
|
||||
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 sLine = GetFormattedLine( F1.ValuesList[i], F1.ValuesPlaceholders, F1.FieldFixLength)
|
||||
table.insert( Lines, sLine)
|
||||
-- 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
|
||||
|
||||
-- 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 sLine = GetFormattedLine( F2.ValuesList[i], F2.ValuesPlaceholders, F2.FieldFixLength)
|
||||
table.insert( Lines, sLine)
|
||||
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 sLine = GetFormattedLine( F7.ValuesList[i], F7.ValuesPlaceholders, F7.FieldFixLength)
|
||||
table.insert( Lines, sLine)
|
||||
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, '')
|
||||
|
||||
return Lines
|
||||
|
||||
LinesToWriteList[1] = Lines
|
||||
|
||||
return LinesToWriteList, sExtension
|
||||
end
|
||||
|
||||
|
||||
local function BuildCuttingList( PanelList, sOutputType)
|
||||
|
||||
local LinesToWrite = {}
|
||||
local LinesToWriteList = {}
|
||||
local sExtension = ''
|
||||
local SheetList = GetSheetList()
|
||||
local ProjectInfo = GetProjectInfo()
|
||||
local dRequiredThickness = PanelList[1].dThickness
|
||||
@@ -293,15 +359,16 @@ local function BuildCuttingList( PanelList, sOutputType)
|
||||
-- Casadei
|
||||
if sOutputType == 'CUTTY' then
|
||||
|
||||
LinesToWrite = BuildCuttingList_Cutty( PanelList, ActualSheetList, ProjectInfo)
|
||||
LinesToWriteList = BuildCuttingList_Cutty( PanelList, ActualSheetList, ProjectInfo)
|
||||
|
||||
-- Homag Optimat
|
||||
-- Homag
|
||||
elseif sOutputType == 'HOMAG' then
|
||||
|
||||
LinesToWriteList, sExtension = BuildCuttingList_Homag( PanelList, ActualSheetList, ProjectInfo)
|
||||
|
||||
end
|
||||
|
||||
return LinesToWrite
|
||||
return LinesToWriteList, sExtension
|
||||
end
|
||||
|
||||
|
||||
@@ -341,18 +408,22 @@ function PanelSaw.GenerateCuttingList( sOutputType)
|
||||
|
||||
if sOutputType then
|
||||
-- costruzione lista istruzioni
|
||||
local LinesToWrite = BuildCuttingList( PanelListSingleMaterial, sOutputType)
|
||||
local LinesToWriteList, sExtension = BuildCuttingList( PanelListSingleMaterial, sOutputType)
|
||||
|
||||
-- scrittura file
|
||||
local sFilename = sCurrentNgePath .. 'CutList-' .. sCurrentNgeName .. '-' .. key .. '-' .. sOutputType
|
||||
sFilename = sFilename:gsub( '%.', '_')
|
||||
local hFile, nFileErr = io.open( sFilename, 'w')
|
||||
if not hFile then
|
||||
EgtOutLog( 'Error creating cutting list : IO error ' .. tostring( nFileErr))
|
||||
return false
|
||||
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
|
||||
hFile:write( table.concat( LinesToWrite, "\n"))
|
||||
hFile:close()
|
||||
|
||||
-- se nessun tipo si deve scrivere un json semplice
|
||||
else
|
||||
|
||||
@@ -214,7 +214,8 @@ function WMachiningLib.FindSurfacing( sType)
|
||||
local Surfacing = Surfacings[i]
|
||||
if Surfacing.On and Surfacing.Type == sType and SetCurrMachiningAndTool( Surfacing.Name) then
|
||||
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
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1373,9 +1373,11 @@ local function MakeByMill( Proc, nFacet, nOthFac, nRawId, b3Raw, dSideDist)
|
||||
local dMillTotLen = 30
|
||||
local dMaxDepth = 0
|
||||
local dThDiam = 100
|
||||
local bIsToolCcw = false
|
||||
if EgtMdbSetCurrMachining( sMilling) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
bIsToolCcw = EgtTdbGetCurrToolParam( MCH_TP.SPEED) < 0
|
||||
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
||||
dMillLen = EgtTdbGetCurrToolParam( MCH_TP.LEN) or dMillLen
|
||||
dMillTotLen = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN) or dMillTotLen
|
||||
@@ -1413,13 +1415,19 @@ local function MakeByMill( Proc, nFacet, nOthFac, nRawId, b3Raw, dSideDist)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, 0) -- -dMillDiam/2 + dAddLen)
|
||||
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
|
||||
EgtSetMachiningParam( MCH_MP.LOPERP, dSideDist + WD.CUT_SIC)
|
||||
-- setto inversione in base al workside
|
||||
local bIsWorkSideRight = ( EgtGetMachiningParam( MCH_MP.WORKSIDE) == MCH_MILL_WS.RIGHT)
|
||||
local bInvert = false
|
||||
if bIsWorkSideRight then
|
||||
bInvert = true
|
||||
-- setto inversione e lato di lavoro
|
||||
local bIsDominantX = abs( vtRef:getY()) > abs( vtRef:getX()) + 10 * GEO.EPS_SMALL
|
||||
local bUseConventionalMilling = ( bIsDominantX and WD.USE_CONVENTIONAL_MILLING_ALONG_X) or WD.USE_CONVENTIONAL_MILLING_ALONG_Y
|
||||
local bInvert, nWorkside
|
||||
if bUseConventionalMilling then
|
||||
bInvert = not bIsToolCcw
|
||||
nWorkside = bIsToolCcw and MCH_MILL_WS.LEFT or MCH_MILL_WS.RIGHT
|
||||
else
|
||||
bInvert = bIsToolCcw
|
||||
nWorkside = bIsToolCcw and MCH_MILL_WS.RIGHT or MCH_MILL_WS.LEFT
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, bInvert)
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, nWorkside)
|
||||
-- imposto posizione braccio porta testa
|
||||
local nSCC = MCH_SCC.ADIR_ZP
|
||||
if AreSameOrOppositeVectorApprox( vtN, Z_AX()) then
|
||||
@@ -1509,9 +1517,11 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
local dMillDiamThStem = 0
|
||||
local dMillLenTh = 0
|
||||
local dSideStep = 0
|
||||
local bIsToolCcw = false
|
||||
if EgtMdbSetCurrMachining( sMilling) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
bIsToolCcw = EgtTdbGetCurrToolParam( MCH_TP.SPEED) < 0
|
||||
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
||||
dMillLen = EgtTdbGetCurrToolParam( MCH_TP.LEN) or dMillLen
|
||||
dMillTotLen = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN) or dMillTotLen
|
||||
@@ -2033,6 +2043,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
if nSinglePass == 1 then
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH, dMaxMat)
|
||||
end
|
||||
dMaxElev = dMaxMat
|
||||
end
|
||||
if bUpwardMilling then
|
||||
dStep = -dStep
|
||||
@@ -2052,9 +2063,19 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
end
|
||||
-- scrivo le note della lavorazione
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||
-- setto il lato di lavoro standard
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
||||
-- setto lato di lavoro e inversione
|
||||
local bIsDominantX = abs( vtN:getY()) > abs( vtN:getX()) + 10 * GEO.EPS_SMALL
|
||||
local bUseConventionalMilling = ( bIsDominantX and WD.USE_CONVENTIONAL_MILLING_ALONG_X) or WD.USE_CONVENTIONAL_MILLING_ALONG_Y
|
||||
local bInvert, nWorkside
|
||||
if bUseConventionalMilling then
|
||||
bInvert = bIsToolCcw
|
||||
nWorkside = bIsToolCcw and MCH_MILL_WS.LEFT or MCH_MILL_WS.RIGHT
|
||||
else
|
||||
bInvert = not bIsToolCcw
|
||||
nWorkside = bIsToolCcw and MCH_MILL_WS.RIGHT or MCH_MILL_WS.LEFT
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, bInvert)
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, nWorkside)
|
||||
-- setto offset radiale per gestire le eventuali passate in orizzontale
|
||||
local dRadialOffset = dSideStep * ( nSideStep - i)
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, dRadialOffset)
|
||||
@@ -2882,6 +2903,8 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function MakeMoreFaces( Proc, nRawId, b3Raw)
|
||||
-- recupero parametri Q
|
||||
local _, nUseMillOnSide = EvaluateQParam( Proc)
|
||||
-- con una faccia di fondo valida
|
||||
if Proc.Stype == 1 or Proc.Stype == 2 then
|
||||
-- recupero eventuale flag forzatura svuotatura
|
||||
@@ -2889,7 +2912,9 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw)
|
||||
-- cerco la faccia con il maggior numero di adiacenze
|
||||
local nFacInd, dElev, nFacInd2, dElev2 = WL.GetFaceWithMostAdj( Proc.Id, Proc.PartId)
|
||||
-- se necessario scambio le facce
|
||||
if Proc.Stype == 2 then
|
||||
local bIsGroove3Blind = Proc.Fct == 3 and Proc.Topology == 'Groove' and not Proc.IsThrough
|
||||
local bPreferSidemill = ( nUseMillOnSide >= 1)
|
||||
if Proc.Stype == 2 or ( bPreferSidemill and bIsGroove3Blind) then
|
||||
nFacInd, dElev, nFacInd2, dElev2 = nFacInd2, dElev2, nFacInd, dElev
|
||||
end
|
||||
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nFacInd, GDB_ID.ROOT)
|
||||
@@ -2897,7 +2922,7 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw)
|
||||
local dMaxSlotThicknessForBlade = 19
|
||||
local bIsSmallSlot = ( Proc.Fct == 3 and ( min( dH, dV) < dMaxSlotThicknessForBlade - 10 * GEO.EPS_SMALL) and ( vtN:getZ() > -0.01))
|
||||
-- se di fianco
|
||||
if not bPckt and Proc.Fct >= 3 and ( ( vtN:getZ() < WD.NZ_MINA) or bIsSmallSlot) then
|
||||
if not bPckt and Proc.Fct >= 3 and ( ( bPreferSidemill and bIsGroove3Blind) or ( vtN:getZ() < WD.NZ_MINA) or bIsSmallSlot) then
|
||||
-- recupero elevazione faccia in feature
|
||||
local dSideElev = WL.GetFaceElevation( Proc.Id, nFacInd)
|
||||
-- se abilitata lavorazione ribasso con fresa di fianco e parametro Q03 abilitato
|
||||
@@ -2913,7 +2938,6 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw)
|
||||
sMillOnSide = sMillOnSideBackup
|
||||
end
|
||||
end
|
||||
local _, nUseMillOnSide = EvaluateQParam( Proc)
|
||||
-- se ho abilitata lavorazione di fresa di fianco
|
||||
if Proc.Fct >= 3 and sMillOnSide and nUseMillOnSide >= 1 and not bIsSmallSlot then
|
||||
-- cerco nei parametri utensili la nota di affondamento di fianco SIDEDEPTH
|
||||
|
||||
+48
-34
@@ -52,6 +52,7 @@ end
|
||||
---------------------------------------------------------------------
|
||||
-- Applicazione della lavorazione
|
||||
local function MakeCode_1( Proc, nRawId, b3Raw)
|
||||
local sWarn
|
||||
-- recupero e verifico l'entità curva associata
|
||||
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
|
||||
if AuxId then
|
||||
@@ -63,41 +64,54 @@ local function MakeCode_1( Proc, nRawId, b3Raw)
|
||||
return false, sErr
|
||||
end
|
||||
local vtExtr = EgtCurveExtrusion( AuxId or GDB_ID.NULL, GDB_ID.ROOT)
|
||||
-- recupero la lavorazione
|
||||
local sSurfFin = WM.FindSurfacing( 'Finishing')
|
||||
if not sSurfFin then
|
||||
local sErr = 'Error : surface finishing not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
-- cerco e applico le lavorazioni di superficie opportune
|
||||
local sMachIni = EgtGetCurrMachineDir()..'\\'..EgtGetCurrMachineName()..'.ini'
|
||||
local bSurfRough = ( EgtGetNumberFromIni( 'Machinings', 'SurfRoughing', 0, sMachIni) >= 1)
|
||||
local SurfLav = { { Type='Roughing', Name='SurfRou_', Err=true}, { Type='Finishing', Name='SurfFin_', Err=true}}
|
||||
local nStart = EgtIf( bSurfRough, 1, 2)
|
||||
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
|
||||
-- inserisco la lavorazione di finitura superficie
|
||||
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
|
||||
return true, sWarn
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
|
||||
@@ -658,7 +658,9 @@ local function SortMachinings( nPhase, PrevMch, nPartId, nPriority)
|
||||
-- PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.POCKETING, nil, nil, 'MOVE_AFTER', false)
|
||||
-- -- Fresature che sono rifiniture di spigoli
|
||||
-- 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)
|
||||
-- Fresature per gole
|
||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'Gorge_'}, true, 'MOVE_AFTER', false, nil, nil, nil, nPriority)
|
||||
@@ -686,7 +688,9 @@ local function SortMachinings( nPhase, PrevMch, nPartId, nPriority)
|
||||
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING, nil, nil, 'MOVE_AFTER', true)
|
||||
-- Svuotature che vanno fatte dopo i tagli con lama
|
||||
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)
|
||||
end
|
||||
return PrevMch
|
||||
|
||||
@@ -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))
|
||||
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
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
==== Wall Update Log ====
|
||||
|
||||
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
|
||||
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
-- Version.lua by Egalware s.r.l. 2025/07/17
|
||||
-- Version.lua by Egalware s.r.l. 2026/01/22
|
||||
-- Gestione della versione di Wall
|
||||
|
||||
NAME = 'Wall'
|
||||
VERSION = '2.7i2'
|
||||
MIN_EXE = '2.7f2'
|
||||
VERSION = '3.1a1'
|
||||
MIN_EXE = '3.1a1'
|
||||
|
||||
Reference in New Issue
Block a user