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:
DarioS
2022-01-17 20:51:18 +01:00
parent b2fe79490e
commit 74dc0a85fc
4 changed files with 68 additions and 50 deletions
+28 -14
View File
@@ -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