DataBeam :
- unificate Pocket e Notch con LapJoint - correzioni varie.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
-- ProcessLapJoint.lua by Egaltech s.r.l. 2019/04/26
|
||||
-- ProcessLapJoint.lua by Egaltech s.r.l. 2019/06/14
|
||||
-- Gestione calcolo mezzo-legno per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -22,7 +22,9 @@ 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 == 30))
|
||||
(( 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))
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
@@ -32,14 +34,18 @@ function ProcessLapJoint.IsHeadFeature( Proc, b3Raw, dCurrOvmH)
|
||||
if Proc.Box:getMax():getX() < b3Raw:getMax():getX() - dCurrOvmH - BD.MAX_DIST_HTFEA then
|
||||
return false
|
||||
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
|
||||
-- se una o due facce ora è sicuramente di testa
|
||||
if Proc.Fct <= 2 then
|
||||
return true
|
||||
end
|
||||
-- deve avere la normale principale diretta verso la testa
|
||||
local nFacInd = BL.GetFaceWithMostAdj( Proc.Id)
|
||||
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacInd, GDB_ID.ROOT)
|
||||
if vtN:getX() > 0.5 then
|
||||
if vtN:getX() < 0.5 then
|
||||
return false
|
||||
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
|
||||
return true
|
||||
end
|
||||
-- non è di testa
|
||||
@@ -53,14 +59,18 @@ function ProcessLapJoint.IsTailFeature( Proc, b3Raw)
|
||||
if Proc.Box:getMin():getX() > b3Raw:getMin():getX() + BD.MAX_DIST_HTFEA then
|
||||
return false
|
||||
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
|
||||
-- se una o due facce ora è sicuramente di coda
|
||||
if Proc.Fct <= 2 then
|
||||
return true
|
||||
end
|
||||
-- deve avere la normale principale diretta verso la coda
|
||||
local nFacInd = BL.GetFaceWithMostAdj( Proc.Id)
|
||||
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacInd, GDB_ID.ROOT)
|
||||
if vtN:getX() < -0.5 then
|
||||
if vtN:getX() > -0.5 then
|
||||
return false
|
||||
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
|
||||
return true
|
||||
end
|
||||
-- non è di coda
|
||||
|
||||
Reference in New Issue
Block a user