DataWall 2.7g2 :

- aggiunta gestione origine e offset da questa che non fanno riprocessare l'intero grezzo (ma solo aggiornare)
- corretta BatchProcess per nome file anche se da non riprocessare.
This commit is contained in:
Dario Sassi
2025-07-17 17:24:09 +02:00
parent 8f36025b64
commit e15a833158
4 changed files with 89 additions and 33 deletions
+46 -21
View File
@@ -61,26 +61,10 @@ local Variant = require( 'WProcessVariant')
-------------------------------------------------------------------------------------------------------------
-- *** Inserimento delle pareti nel pannello ***
-------------------------------------------------------------------------------------------------------------
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')
local function GetRawOrigAndDeltas()
-- Area tavola
local b3Tab = EgtGetTableArea()
-- 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 BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL
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 DeltaZ = EgtIf( dDeltaZFromBtl > 0, dDeltaZFromBtl, WD.DELTA_Z or 0)
local nCorner
local OrigOnTab
if sOrigCorner == 'TL' then
nCorner = MCH_CR.TL
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
OrigOnTab = Point3d( WD.NEW_REF + abs( DeltaX), abs( DeltaY), DeltaZ)
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
EgtImportSetup()
-- Impostazione eventuale allargamento area disponibile per grezzo
@@ -175,6 +183,23 @@ function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bNewPr
return true
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 ***
-------------------------------------------------------------------------------------------------------------
@@ -538,7 +563,7 @@ local function SortMach( nPhase, PrevMch, nPartId, nType, StartNames, bExistName
end
if bByTool then
function ToolCompare(a,b)
local function ToolCompare(a,b)
if a.ToolType < b.ToolType then
return true
elseif a.ToolType == b.ToolType then
@@ -581,7 +606,7 @@ local function SortMach( nPhase, PrevMch, nPartId, nType, StartNames, bExistName
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)
local SupportTabCut = {}
local nPrevTUUID = 0
@@ -669,7 +694,7 @@ end
-------------------------------------------------------------------------------------------------------------
-- setto la rimozione sfridi dopo le lavorazioni di outline
function InsertScrapRemoval( nPhase)
local function InsertScrapRemoval( nPhase)
local nCurrentOperationId = EgtGetNextOperation( EgtGetPhaseDisposition( nPhase))
local nActiveMachiningId = EgtGetCurrMachining()
while nCurrentOperationId do
@@ -1089,7 +1114,7 @@ local function SetMirroredOperations()
end
-------------------------------------------------------------------------------------------------------------
function GetFeatureInfoAndDependency( vProc)
local function GetFeatureInfoAndDependency( vProc)
-- ciclo tutte le feature
for i = 1, #vProc do
local Proc = vProc[i]