DataBeam :

- migliorie a ProcessLapJoint (per ingombro e Q).
This commit is contained in:
Dario Sassi
2020-06-08 06:36:01 +00:00
parent cb7b6d3b1d
commit fdfdd39058
+24 -10
View File
@@ -1,4 +1,4 @@
-- ProcessLapJoint.lua by Egaltech s.r.l. 2020/05/27
-- ProcessLapJoint.lua by Egaltech s.r.l. 2020/06/06
-- Gestione calcolo mezzo-legno per Travi
-- 2019/10/08 Agg. gestione OpenPocket.
@@ -3043,8 +3043,14 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, bSinglePart)
if not bOk then return false, sErr end
end
-- recupero la lavorazione
local dCollSic = 2 * BD.COLL_SIC
if abs( vtN:getX()) > 0.996 or abs( vtN:getY()) > 0.996 or abs( vtN:getZ()) > 0.996 then dCollSic = 0 end
local dCollSic = 8 * BD.COLL_SIC
if abs( vtN:getX()) > 0.996 or abs( vtN:getY()) > 0.996 or abs( vtN:getZ()) > 0.996 then
dCollSic = 0
elseif abs( vtN:getX()) > 0.866 or abs( vtN:getY()) > 0.866 or abs( vtN:getZ()) > 0.866 then
dCollSic = 2 * BD.COLL_SIC
elseif abs( vtN:getX()) > 0.707 or abs( vtN:getY()) > 0.707 or abs( vtN:getZ()) > 0.707 then
dCollSic = 5 * BD.COLL_SIC
end
local sMchFind = EgtIf( bSinglePart, 'Pocket', 'OpenPocket')
local nUseRoughTool = EgtIf( bSinglePart, 0, 1)
local dDiam = min( dH, dV)
@@ -3246,6 +3252,8 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
local b3Raw = EgtGetRawPartBBox( nRawId)
-- in base al tipo di feature attribuisco il significato dei parametri Q
AssignQValues( Proc)
-- verifico forzatura lama
local bForcedBlade = EgtGetInfo( Proc.Id, sUseRoughTool, 'i') ~= 1
-- se lunghezza richiede spezzatura
if Proc.Box:getDimX() > BD.LONGCUT_ENDLEN then
-- una faccia
@@ -3265,7 +3273,11 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
elseif b3Fac2:getDimX() < 1 then
return LongCut.Make( Proc, nPhase, nRawId, nPartId)
else
return Fbs.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, 'HeadSide')
if bForcedBlade then
return Fbs.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, 'HeadSide')
else
return MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId)
end
end
-- tre o più facce
else
@@ -3276,7 +3288,6 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
else
-- una faccia
if Proc.Fct == 1 then
local bForcedBlade = EgtGetInfo( Proc.Id, sUseRoughTool, 'i') ~= 1
-- se piccola, con fresa
if not bForcedBlade and ( 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)
@@ -3288,11 +3299,14 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
elseif Proc.Fct == 2 then
-- determino l'angolo tra le facce
local bAdj, _, _, dAng = EgtSurfTmFacetsContact( Proc.Id, 0, 1, GDB_ID.ROOT)
local bForcedBlade = EgtGetInfo( Proc.Id, sUseRoughTool, 'i') ~= 1
-- se ortogonali e piccole, con fresa
if not bForcedBlade and 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)) then
return MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId)
-- se ortogonali e non forzata lama, con fresa
if not bForcedBlade and bAdj and abs( dAng + 90) < 1 then
-- se piccole
if ( 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)
else
return MakeMoreFaces( Proc, nPhase, nRawId, nPartId, true)
end
-- altrimenti, con lama
else
return Fbs.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, 'HeadSide')