DataBeam :
- in LapJoint migliorata gestione tagli con lama quando 2 facce - in LapJoint tolto controllo volume per caso 2 facce con fresa - in Mortise si recupera la dimensione minima per scegliere l'utensile adeguato.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
-- ProcessLapJoint.lua by Egaltech s.r.l. 2019/11/07
|
||||
-- ProcessLapJoint.lua by Egaltech s.r.l. 2019/11/10
|
||||
-- Gestione calcolo mezzo-legno per Travi
|
||||
-- 2019/10/08 Agg. gestione OpenPocket.
|
||||
|
||||
@@ -523,8 +523,19 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac,
|
||||
bOpenEnd = ( vAdj2[k] < 0)
|
||||
end
|
||||
end
|
||||
-- Se entrambi gli estremi sono aperti e fattibile con lama
|
||||
if bOpenStart and bOpenEnd and dElev <= BD.MAX_DIM_DICE then
|
||||
-- Recupero il massimo affondamento possibile con la lama
|
||||
local dSawMaxDepth = 0
|
||||
local sCutting = ML.FindCutting( 'HeadSide')
|
||||
if sCutting then
|
||||
if EgtMdbSetCurrMachining( sCutting) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dSawMaxDepth = EgtTdbGetCurrToolMaxDepth() or dSawMaxDepth
|
||||
end
|
||||
end
|
||||
end
|
||||
-- Se entrambi gli estremi sono aperti e possibile, lavoro con la lama
|
||||
if bOpenStart and bOpenEnd and dElev < dSawMaxDepth then
|
||||
-- Recupero la lavorazione di lama
|
||||
local sCutting = ML.FindCutting( 'HeadSide')
|
||||
if not sCutting then
|
||||
@@ -540,6 +551,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac,
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dSawDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiam
|
||||
dSawThick = EgtTdbGetCurrToolParam( MCH_TP.THICK) or dSawThick
|
||||
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
|
||||
end
|
||||
end
|
||||
-- Calcolo uso faccia
|
||||
@@ -554,7 +566,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac,
|
||||
end
|
||||
for i = 1, nStep do
|
||||
local dOffs = ( i - 1) * dStep
|
||||
local bOk, sErr = BL.MakeOneFaceBySaw( Proc.Id, nFacAdj, sCutting, dSawDiam, nFaceUse, nil, 0, BD.CUT_SIC, dOffs, 0, nil, b3Raw)
|
||||
local bOk, sErr = BL.MakeOneFaceBySaw( Proc.Id, nFacAdj, sCutting, dSawDiam, nFaceUse, -0.01, 0, BD.CUT_SIC, dOffs, 0, nil, b3Raw)
|
||||
if not bOk then
|
||||
return bOk, sErr
|
||||
end
|
||||
@@ -587,6 +599,11 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac,
|
||||
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
|
||||
end
|
||||
end
|
||||
if dSawThick > dV + 10 * GEO.EPS_SMALL then
|
||||
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' chainsaw too thick'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- Verifico se necessarie più passate
|
||||
local nStep = ceil( ( dV - 0.5) / dSawThick)
|
||||
local dStep = 0
|
||||
@@ -800,7 +817,6 @@ end
|
||||
function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
-- limiti di fresatura semplice
|
||||
local MAX_MILL_LIN = 80
|
||||
local MAX_MILL_VOL = ( 80 * 240 * 20) / 2
|
||||
-- recupero l'ingombro del grezzo di appartenenza
|
||||
local b3Raw = EgtGetRawPartBBox( nRawId)
|
||||
|
||||
@@ -835,8 +851,7 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
-- una faccia
|
||||
if Proc.Fct == 1 then
|
||||
-- se piccola, con fresa
|
||||
if ( Proc.Box:getDimX() < MAX_MILL_LIN and ( Proc.Box:getDimZ() < MAX_MILL_LIN or Proc.Box:getDimY() < MAX_MILL_LIN)) or
|
||||
Proc.Box:getDimX() * Proc.Box:getDimY() * Proc.Box:getDimZ() < MAX_MILL_VOL then
|
||||
if ( Proc.Box:getDimX() < MAX_MILL_LIN and ( Proc.Box:getDimZ() < MAX_MILL_LIN or Proc.Box:getDimY() < MAX_MILL_LIN)) then
|
||||
return MakeOneFaceByMill( Proc, nPhase, nRawId, nPartId)
|
||||
-- altrimenti, con lama
|
||||
else
|
||||
@@ -848,8 +863,7 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
local bAdj, _, _, dAng = EgtSurfTmFacetsContact( Proc.Id, 0, 1, GDB_ID.ROOT)
|
||||
-- se ortogonali e piccole, con fresa
|
||||
if bAdj and abs( dAng + 90) < 1 and
|
||||
( ( Proc.Box:getDimX() < MAX_MILL_LIN and ( Proc.Box:getDimZ() < MAX_MILL_LIN or Proc.Box:getDimY() < MAX_MILL_LIN)) or
|
||||
Proc.Box:getDimX() * Proc.Box:getDimY() * Proc.Box:getDimZ() < MAX_MILL_VOL) then
|
||||
( Proc.Box:getDimX() < MAX_MILL_LIN and ( Proc.Box:getDimZ() < MAX_MILL_LIN or Proc.Box:getDimY() < MAX_MILL_LIN)) then
|
||||
return MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId)
|
||||
-- altrimenti, con lama
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user