DataBeam :

- migliorie e correzioni varie
- unificati BirdsMouth con LapJoint.
This commit is contained in:
Dario Sassi
2019-07-03 10:27:55 +00:00
parent 9ac596d5d7
commit 7c1a4ba546
20 changed files with 473 additions and 511 deletions
+13 -4
View File
@@ -1,4 +1,4 @@
-- ProcessLapJoint.lua by Egaltech s.r.l. 2019/06/20
-- ProcessLapJoint.lua by Egaltech s.r.l. 2019/07/01
-- Gestione calcolo mezzo-legno per Travi
-- Tabella per definizione modulo
@@ -22,6 +22,7 @@ local ML = require( 'MachiningLib')
function ProcessLapJoint.Identify( Proc)
return ( (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 16) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 17) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 20) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 30) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 32) or
( Proc.Grp == 4 and Proc.Prc == 39))
@@ -43,6 +44,8 @@ function ProcessLapJoint.IsHeadFeature( Proc, b3Raw, dCurrOvmH)
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacInd, GDB_ID.ROOT)
if vtN:getX() < 0.5 then
return false
elseif Proc.Fct >= 5 then
return true
end
-- deve occupare la maggior parte dell'area
if Proc.Box:getDimY() > 0.75 * b3Raw:getDimY() or Proc.Box:getDimZ() > 0.75 * b3Raw:getDimZ() then
@@ -68,6 +71,8 @@ function ProcessLapJoint.IsTailFeature( Proc, b3Raw)
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacInd, GDB_ID.ROOT)
if vtN:getX() > -0.5 then
return false
elseif Proc.Fct >= 5 then
return true
end
-- deve occupare la maggior parte dell'area
if Proc.Box:getDimY() > 0.75 * b3Raw:getDimY() or Proc.Box:getDimZ() > 0.75 * b3Raw:getDimZ() then
@@ -359,7 +364,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, nil, b3Raw)
local bOk, sErr = BL.MakeOneFaceBySaw( Proc.Id, nFacAdj, sCutting, dSawDiam, nFaceUse, nil, 0, BD.CUT_SIC, dOffs, 0, nil, b3Raw)
if not bOk then
return bOk, sErr
end
@@ -422,6 +427,10 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac,
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchFId, false)
return false, sErr
elseif EgtIsMachiningEmpty() then
local _, sWarn = EgtGetMachMgrWarning( 0)
EgtSetOperationMode( nMchFId, false)
return false, sWarn
end
end
end
@@ -468,7 +477,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId)
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
dMaxDepth = ( EgtTdbGetCurrToolMaxDepth() or dMaxDepth) - BD.COLL_SIC
end
end
-- se una dimensione della faccia è più piccola del diametro utensile, va usata la sega a catena o la lama
@@ -507,7 +516,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId)
EgtOutLog( sWarn)
end
-- imposto elevazione
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dMaxDepth, 1) .. ';')
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dFacElev, 1) .. ';')
-- eseguo
if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()