DataWall :
- se non si elaborano feature non si setta più ok in log - in LapJoint correzioni per SideMill su ribassi di fianco in basso - in FindMilling si può richiedere anche minimo affondamento di fianco (8° parametro).
This commit is contained in:
+34
-33
@@ -1,8 +1,9 @@
|
||||
-- BatchProcess.lua by Egaltech s.r.l. 2022/01/06
|
||||
-- BatchProcess.lua by Egaltech s.r.l. 2022/01/17
|
||||
-- Gestione calcolo batch disposizione e lavorazioni per Pareti
|
||||
-- 2021/01/15 Per nuova interfaccia Egt.
|
||||
-- 2021/11/10 Aggiunta modifica per gestione modifiche manuali come in Beam.
|
||||
-- 2022/01/06 Per CUTID/TASKID senza ToProcess si verificano anche eventuali Duplo.
|
||||
-- 2022/01/17 Eliminata assegnazione Feature ok se non calcolata.
|
||||
|
||||
|
||||
-- Intestazioni
|
||||
@@ -466,38 +467,38 @@ else
|
||||
-- Carico il progetto già fatto
|
||||
EgtOpenFile( sNgeFile)
|
||||
-- Dichiaro nessun errore
|
||||
local nPartId = EgtGetFirstPart()
|
||||
while nPartId do
|
||||
local vDup = EgtDuploList( nPartId)
|
||||
if not vDup or #vDup == 0 then
|
||||
vDup = { nPartId}
|
||||
end
|
||||
for i = 1, #vDup do
|
||||
local nCutId = EgtGetInfo( vDup[i], 'CUTID', 'i')
|
||||
if nCutId then
|
||||
local LayerId = {}
|
||||
LayerId[1] = EgtGetFirstNameInGroup( vDup[i], 'Outline')
|
||||
LayerId[2] = EgtGetFirstNameInGroup( vDup[i], 'Processings')
|
||||
for nInd = 1, #LayerId do
|
||||
local nProcId = EgtGetFirstInGroup( LayerId[nInd] or GDB_ID.NULL)
|
||||
while nProcId do
|
||||
local bIsFea = EgtExistsInfo( nProcId, 'GRP') and EgtExistsInfo( nProcId, 'PRC')
|
||||
local nTaskId = EgtGetInfo( nProcId, 'TASKID', 'i')
|
||||
if bIsFea and nTaskId then
|
||||
WALL.ERR = 0
|
||||
WALL.MSG = '---'
|
||||
WALL.ROT = 0
|
||||
WALL.CUTID = nCutId
|
||||
WALL.TASKID = nTaskId
|
||||
WriteErrToLogFile( WALL.ERR, WALL.MSG, WALL.ROT, WALL.CUTID, WALL.TASKID)
|
||||
end
|
||||
nProcId = EgtGetNext( nProcId)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
nPartId = EgtGetNextPart( nPartId)
|
||||
end
|
||||
--local nPartId = EgtGetFirstPart()
|
||||
--while nPartId do
|
||||
-- local vDup = EgtDuploList( nPartId)
|
||||
-- if not vDup or #vDup == 0 then
|
||||
-- vDup = { nPartId}
|
||||
-- end
|
||||
-- for i = 1, #vDup do
|
||||
-- local nCutId = EgtGetInfo( vDup[i], 'CUTID', 'i')
|
||||
-- if nCutId then
|
||||
-- local LayerId = {}
|
||||
-- LayerId[1] = EgtGetFirstNameInGroup( vDup[i], 'Outline')
|
||||
-- LayerId[2] = EgtGetFirstNameInGroup( vDup[i], 'Processings')
|
||||
-- for nInd = 1, #LayerId do
|
||||
-- local nProcId = EgtGetFirstInGroup( LayerId[nInd] or GDB_ID.NULL)
|
||||
-- while nProcId do
|
||||
-- local bIsFea = EgtExistsInfo( nProcId, 'GRP') and EgtExistsInfo( nProcId, 'PRC')
|
||||
-- local nTaskId = EgtGetInfo( nProcId, 'TASKID', 'i')
|
||||
-- if bIsFea and nTaskId then
|
||||
-- WALL.ERR = 0
|
||||
-- WALL.MSG = '---'
|
||||
-- WALL.ROT = 0
|
||||
-- WALL.CUTID = nCutId
|
||||
-- WALL.TASKID = nTaskId
|
||||
-- WriteErrToLogFile( WALL.ERR, WALL.MSG, WALL.ROT, WALL.CUTID, WALL.TASKID)
|
||||
-- end
|
||||
-- nProcId = EgtGetNext( nProcId)
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- nPartId = EgtGetNextPart( nPartId)
|
||||
--end
|
||||
-- Aggiorno eventuali dati ausiliari
|
||||
--UpdateAuxData( sBtmFile)
|
||||
-- Passo in modalità lavora
|
||||
|
||||
@@ -51,7 +51,7 @@ function WMachiningLib.FindCutting( sType, dDepth, nTool_ID)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function WMachiningLib.FindMilling( sType, dDepth, sTuuid, nTool_ID, dMaxDiam, dMaxMat, bTipFeed)
|
||||
function WMachiningLib.FindMilling( sType, dDepth, sTuuid, nTool_ID, dMaxDiam, dMaxMat, bTipFeed, dMinSideElev)
|
||||
for i = 1, #Millings do
|
||||
local Milling = Millings[i]
|
||||
if Milling.On and Milling.Type == sType and SetCurrMachiningAndTool( Milling.Name) then
|
||||
@@ -60,14 +60,17 @@ function WMachiningLib.FindMilling( sType, dDepth, sTuuid, nTool_ID, dMaxDiam, d
|
||||
local dTMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
|
||||
local dTMaxDepth = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, dTMaxMat, EgtTdbGetCurrToolMaxDepth())
|
||||
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
||||
local dTDiamTh = EgtTdbGetCurrToolThDiam() or 0
|
||||
local dTTipFeed = EgtTdbGetCurrToolParam( MCH_TP.TIPFEED)
|
||||
local nMyTool_ID = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'Tool_ID', 'i')
|
||||
local dTMaxDepthOnSide = min( EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or 0, 0.5 * ( dTDiam - dTDiamTh))
|
||||
local nMyTool_ID = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'Tool_ID', 'i')
|
||||
if nMchType == MCH_MY.MILLING and
|
||||
( not sTuuid or sTuuid == sMyTuuid) and
|
||||
( not dDepth or dTMaxDepth > dDepth - GEO.EPS_SMALL) and
|
||||
( not dMaxDiam or dTDiam < dMaxDiam + GEO.EPS_SMALL) and
|
||||
( not dMaxMat or dTMaxMat < dMaxMat + GEO.EPS_SMALL) and
|
||||
( not bTipFeed or dTTipFeed > 1) and
|
||||
( not dMinSideElev or dTMaxDepthOnSide > dMinSideElev - GEO.EPS_SMALL) and
|
||||
( not nTool_ID or nTool_ID == 0 or nTool_ID == nMyTool_ID) then
|
||||
return Milling.Name, dTMaxDepth, dTMaxMat, dTDiam
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- WProcessLapJoint.lua by Egaltech s.r.l. 2022/01/04
|
||||
-- WProcessLapJoint.lua by Egaltech s.r.l. 2022/01/17
|
||||
-- Gestione calcolo mezzo-legno per Pareti
|
||||
-- 2021/08/27 DS Se tre o più facce con flag PCKT=1 forzo svuotatura con fresa (per Variant).
|
||||
-- 2021/08/29 DS Se svuotatura di fianco setto flag per farla dopo i tagli.
|
||||
@@ -6,6 +6,7 @@
|
||||
-- 2021/10/05 FM Gestione lavorazioni SideMill con creazione gola passaggio gambo utensile
|
||||
-- 2021/11/29 DS Correzione lav.ni SideMill quando più profonde che larghe.
|
||||
-- 2022/01/04 DS Se U con fondo verso basso o alto non ci possono essere spigoli verticali da pulire.
|
||||
-- 2022/01/17 ES Migliorata scelta fresa per lavorazione di fianco sotto.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local WPL = {}
|
||||
@@ -2035,16 +2036,29 @@ local function MakeTwoFaces( Proc, nRawId, b3Raw)
|
||||
end
|
||||
-- recupero la lavorazione di taglio con lama e i suoi parametri
|
||||
local sCutting, dSawDiam, dSawThick, dSawMaxDepth = WM.FindCutting( 'Standard')
|
||||
-- se abilitata lavorazione ribasso con fresa di fianco e parametro Q03 abilitato
|
||||
local dMaxThick
|
||||
if vtN[1]:getZ() < -0.5 then
|
||||
dMaxThick = dDimY[2]
|
||||
elseif vtN[2]:getZ() < -0.5 then
|
||||
dMaxThick = dDimY[1]
|
||||
end
|
||||
local sMillOnSide, dTMaxDepth, dMaxMat, dDiam = WM.FindMilling( 'SideMill', nil, nil, nil, nil, dMaxThick)
|
||||
-- se parametro Q abilita lavorazione ribasso con fresa di fianco
|
||||
local _, nUseMillOnSide = EvaluateQParam( Proc)
|
||||
local dMaxZVers, dMinZVers, bEnableMillOnSide
|
||||
local dMaxZVers, dMinZVers
|
||||
if nUseMillOnSide >= 1 then
|
||||
dMaxZVers = 0.866
|
||||
dMinZVers = 0.5
|
||||
else
|
||||
dMaxZVers = 0.95
|
||||
dMinZVers = 0.1
|
||||
end
|
||||
-- se di fianco in basso
|
||||
local dMaxThick, dMinSideElev
|
||||
if vtN[1]:getZ() < -dMaxZVers or vtN[2]:getZ() < -dMaxZVers then
|
||||
if vtN[1]:getZ() < -0.5 then
|
||||
dMaxThick = dDimY[2]
|
||||
dMinSideElev = dDimY[1]
|
||||
elseif vtN[2]:getZ() < -0.5 then
|
||||
dMaxThick = dDimY[1]
|
||||
dMinSideElev = dDimY[2]
|
||||
end
|
||||
end
|
||||
local sMillOnSide, dTMaxDepth, dMaxMat, dDiam = WM.FindMilling( 'SideMill', nil, nil, nil, nil, dMaxThick, nil, dMinSideElev)
|
||||
local bEnableMillOnSide
|
||||
if sMillOnSide and nUseMillOnSide >= 1 then
|
||||
dMaxZVers = 0.866
|
||||
dMinZVers = 0.5
|
||||
@@ -2053,7 +2067,6 @@ local function MakeTwoFaces( Proc, nRawId, b3Raw)
|
||||
dMaxZVers = 0.95
|
||||
dMinZVers = 0.1
|
||||
end
|
||||
|
||||
-- se di fianco in basso
|
||||
if vtN[1]:getZ() < -dMaxZVers or vtN[2]:getZ() < -dMaxZVers then
|
||||
-- cerco la faccia verticale o quasi
|
||||
@@ -2061,11 +2074,14 @@ local function MakeTwoFaces( Proc, nRawId, b3Raw)
|
||||
-- cerco nei parametri utensili la nota di affondamento di fianco SIDEDEPTH
|
||||
local dMaxDepthOnSide = 0
|
||||
local dMillDiam = 0
|
||||
local dMillDiamTh = 0
|
||||
if bEnableMillOnSide and EgtMdbSetCurrMachining( sMillOnSide) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
||||
dMillDiamTh = EgtTdbGetCurrToolThDiam() or dMillDiamTh
|
||||
dMaxDepthOnSide = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or dMaxDepthOnSide
|
||||
dMaxDepthOnSide = min( dMaxDepthOnSide, 0.5 * ( dMillDiam - dMillDiamTh))
|
||||
end
|
||||
end
|
||||
local dMaxDist = 300
|
||||
@@ -2092,8 +2108,6 @@ local function MakeTwoFaces( Proc, nRawId, b3Raw)
|
||||
elseif vtN[nFacet+1]:getY() < -0.99 then
|
||||
dSideDist = abs( ptMid:getY() - b3Raw:getMin():getY())
|
||||
end
|
||||
-- if abs( ptMid:getX() - b3Raw:getMin():getX()) < dMaxDist or abs( ptMid:getX() - b3Raw:getMax():getX()) < dMaxDist or
|
||||
-- abs( ptMid:getY() - b3Raw:getMin():getY()) < dMaxDist or abs( ptMid:getY() - b3Raw:getMax():getY()) < dMaxDist then
|
||||
if dSideDist and dSideDist < dMaxDist then
|
||||
bInsertMach = true
|
||||
bMakeFirstGroove = false
|
||||
@@ -2102,7 +2116,7 @@ local function MakeTwoFaces( Proc, nRawId, b3Raw)
|
||||
bInsertMach = true
|
||||
bMakeFirstGroove = true
|
||||
end
|
||||
-- se posso eseguire la lavorazione per distanza inferiore utensile o lavorazione precedura da sgossatura gola
|
||||
-- se posso eseguire la lavorazione per distanza inferiore utensile o lavorazione preceduta da sgossatura gola
|
||||
if bInsertMach then
|
||||
return MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, EgtIf( bEnableMillOnSide and dMaxDepthOnSide, sMillOnSide, nil), dMaxDepthOnSide, bMakeFirstGroove, bMachFromDn, dAng)
|
||||
end
|
||||
|
||||
+1
-1
@@ -1249,7 +1249,7 @@ local function AddParts(RawParts, vPartsDoneManually)
|
||||
local bPartIsModified = EgtGetInfo( nPartId, "MODIFIEDFORNEST", 'b')
|
||||
if not nOldOutline or bPartIsModified then
|
||||
|
||||
-- elimino il vecchio contorno se pesente
|
||||
-- elimino il vecchio contorno se presente
|
||||
while ( nOldOutline) do
|
||||
EgtErase(nOldOutline or GDB_ID.NULL)
|
||||
nOldOutline = EgtGetFirstNameInGroup( nOutlineLayer, 'ON_TMP')
|
||||
|
||||
Reference in New Issue
Block a user