DataBeam :
- modifiche per tagli longitudinali anche limitati con lama.
This commit is contained in:
+86
-40
@@ -1,4 +1,4 @@
|
||||
-- ProcessLapJoint.lua by Egaltech s.r.l. 2021/08/30
|
||||
-- ProcessLapJoint.lua by Egaltech s.r.l. 2021/09/08
|
||||
-- Gestione calcolo mezzo-legno per Travi
|
||||
-- 2019/10/08 Agg. gestione OpenPocket.
|
||||
-- 2021/01/24 Con sega a catena ora sempre impostato asse A.
|
||||
@@ -19,7 +19,8 @@
|
||||
-- 2021/06/21 Nel caso precedente si fa la terza svuotatura anche se è possibile fare una sola delle prime due (altra da sotto).
|
||||
-- 2021/06/21 Gestione ripresa spigoli o contorno con fresa più piccola ( diametro < 3/4 utensile svuotatura) attivata da parametro Q.
|
||||
-- 2021/07/02 Migliorie e correzioni su svuotature e pulitura spigoli.
|
||||
-- 2021/07/15 Aggiunti anctischeggia con fresa.
|
||||
-- 2021/07/15 Aggiunti antischeggia con fresa.
|
||||
-- 2021/09/08 Aggiunta gestione parametro Q04 per i tagli di lama lungo facce lunghe (con o senza facce di chiusura)
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local ProcessLapJoint = {}
|
||||
@@ -40,18 +41,19 @@ local BD = require( 'BeamData')
|
||||
local ML = require( 'MachiningLib')
|
||||
|
||||
-- variabili assegnazione parametri Q
|
||||
local Q_FORCE_BLADE = '' -- i
|
||||
local Q_DEPTH_CHAMFER = '' -- d
|
||||
local Q_ONLY_CHAMFER = '' -- i
|
||||
local Q_USE_MILL = '' -- i
|
||||
local Q_USE_ROUGH_TOOL = '' -- i
|
||||
local Q_USE_ROUGH_TOOL_B90 = '' -- i
|
||||
local Q_USE_ROUGH_TOOL_B0 = '' -- i
|
||||
local Q_BORE_ON_CORNER = '' -- 1
|
||||
local Q_CONTOUR_SMALL_TOOL = '' -- i
|
||||
local Q_ONLY_CONTOUR = '' -- i
|
||||
local Q_SIDE_ROUGH_TOOL = '' -- i
|
||||
local Q_ANTISPLINT_TYPE = '' -- i
|
||||
local Q_FORCE_BLADE = '' -- i
|
||||
local Q_DEPTH_CHAMFER = '' -- d
|
||||
local Q_ONLY_CHAMFER = '' -- i
|
||||
local Q_USE_MILL = '' -- i
|
||||
local Q_USE_ROUGH_TOOL = '' -- i
|
||||
local Q_USE_ROUGH_TOOL_B90 = '' -- i
|
||||
local Q_USE_ROUGH_TOOL_B0 = '' -- i
|
||||
local Q_BORE_ON_CORNER = '' -- 1
|
||||
local Q_CONTOUR_SMALL_TOOL = '' -- i
|
||||
local Q_ONLY_CONTOUR = '' -- i
|
||||
local Q_SIDE_ROUGH_TOOL = '' -- i
|
||||
local Q_ANTISPLINT_TYPE = '' -- i
|
||||
local Q_BLADE_ON_ALONG_FACE = '' -- i
|
||||
|
||||
-- variabile smussi
|
||||
local bMadeChamfer
|
||||
@@ -93,34 +95,35 @@ local function AssignQIdent( Proc)
|
||||
Q_ANTISPLINT_TYPE = ''
|
||||
|
||||
if ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 16 then
|
||||
Q_FORCE_BLADE = 'Q01' -- i
|
||||
Q_DEPTH_CHAMFER = 'Q04' -- d
|
||||
Q_ONLY_CHAMFER = 'Q05' -- i
|
||||
Q_FORCE_BLADE = 'Q01' -- i
|
||||
Q_DEPTH_CHAMFER = 'Q04' -- d
|
||||
Q_ONLY_CHAMFER = 'Q05' -- i
|
||||
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 17 then
|
||||
Q_DEPTH_CHAMFER = 'Q01' -- d
|
||||
Q_ONLY_CHAMFER = 'Q02' -- i
|
||||
Q_DEPTH_CHAMFER = 'Q01' -- d
|
||||
Q_ONLY_CHAMFER = 'Q02' -- i
|
||||
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 20 then
|
||||
Q_DEPTH_CHAMFER = 'Q01' -- d
|
||||
Q_USE_MILL = 'Q02' -- i
|
||||
Q_USE_ROUGH_TOOL = 'Q03' -- i
|
||||
Q_USE_ROUGH_TOOL_B90 = 'Q04' -- i
|
||||
Q_USE_ROUGH_TOOL_B0 = 'Q05' -- i
|
||||
Q_BORE_ON_CORNER = 'Q06' -- i
|
||||
Q_DEPTH_CHAMFER = 'Q01' -- d
|
||||
Q_USE_MILL = 'Q02' -- i
|
||||
Q_USE_ROUGH_TOOL = 'Q03' -- i
|
||||
Q_USE_ROUGH_TOOL_B90 = 'Q04' -- i
|
||||
Q_USE_ROUGH_TOOL_B0 = 'Q05' -- i
|
||||
Q_BORE_ON_CORNER = 'Q06' -- i
|
||||
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 25 then
|
||||
Q_BORE_ON_CORNER = 'Q01' -- i
|
||||
Q_BORE_ON_CORNER = 'Q01' -- i
|
||||
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 30 then
|
||||
Q_CONTOUR_SMALL_TOOL = 'Q01' -- i
|
||||
Q_ONLY_CONTOUR = 'Q02' -- i
|
||||
Q_SIDE_ROUGH_TOOL = 'Q03' -- i
|
||||
Q_ANTISPLINT_TYPE = 'Q06' -- i
|
||||
Q_DEPTH_CHAMFER = 'Q07' -- d
|
||||
Q_CONTOUR_SMALL_TOOL = 'Q01' -- i
|
||||
Q_ONLY_CONTOUR = 'Q02' -- i
|
||||
Q_SIDE_ROUGH_TOOL = 'Q03' -- i
|
||||
Q_BLADE_ON_ALONG_FACE = 'Q04' -- i
|
||||
Q_ANTISPLINT_TYPE = 'Q06' -- i
|
||||
Q_DEPTH_CHAMFER = 'Q07' -- d
|
||||
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 32 then
|
||||
Q_SIDE_ROUGH_TOOL = 'Q01' -- i
|
||||
Q_CONTOUR_SMALL_TOOL = 'Q02' -- i
|
||||
Q_ANTISPLINT_TYPE = 'Q06' -- i
|
||||
Q_SIDE_ROUGH_TOOL = 'Q01' -- i
|
||||
Q_CONTOUR_SMALL_TOOL = 'Q02' -- i
|
||||
Q_ANTISPLINT_TYPE = 'Q06' -- i
|
||||
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 34 then
|
||||
Q_CONTOUR_SMALL_TOOL = 'Q01' -- i
|
||||
Q_ANTISPLINT_TYPE = 'Q06' -- i
|
||||
Q_CONTOUR_SMALL_TOOL = 'Q01' -- i
|
||||
Q_ANTISPLINT_TYPE = 'Q06' -- i
|
||||
end
|
||||
-- le altre features gestite non hanno parametri Q
|
||||
end
|
||||
@@ -4967,11 +4970,13 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
AssignQIdent( Proc)
|
||||
-- se non forzate frese, uso la lama
|
||||
local bUseBlade = EgtGetInfo( Proc.Id, Q_USE_ROUGH_TOOL, 'i') ~= 1 and EgtGetInfo( Proc.Id, Q_USE_MILL, 'i') ~= 1
|
||||
local nForceUseBladeOnNotContinueFace
|
||||
-- se ho attivo la lama e ho la feature 30, verifico i parametri Q propri della feature
|
||||
if bUseBlade then
|
||||
if Proc.Prc == 30 then
|
||||
local nBladeAntisplint = EgtGetInfo( Proc.Id, Q_ANTISPLINT_TYPE, 'i') or 0
|
||||
local nUseRoughToolOnSide = EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') or 0
|
||||
nForceUseBladeOnNotContinueFace = EgtGetInfo( Proc.Id, Q_BLADE_ON_ALONG_FACE, 'i') or 0
|
||||
-- se antischeggia di fresa o abilitato sgrossatore di fianco
|
||||
if nBladeAntisplint == 2 or nUseRoughToolOnSide == 1 then
|
||||
bUseBlade = false
|
||||
@@ -4998,7 +5003,15 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
( Proc.Box:getDimX() > 0.8 * b3Solid:getDimX() and Proc.Box:getDimX() > BD.LONGCUT_ENDLEN) then
|
||||
-- una faccia
|
||||
if Proc.Fct == 1 then
|
||||
return LongCut.Make( Proc, nPhase, nRawId, nPartId)
|
||||
if bUseBlade then
|
||||
if nForceUseBladeOnNotContinueFace and nForceUseBladeOnNotContinueFace > 0 then
|
||||
return LongCut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nForceUseBladeOnNotContinueFace)
|
||||
else
|
||||
return LongCut.Make( Proc, nPhase, nRawId, nPartId)
|
||||
end
|
||||
else
|
||||
return LongCut.Make( Proc, nPhase, nRawId, nPartId)
|
||||
end
|
||||
-- due facce
|
||||
elseif Proc.Fct == 2 then
|
||||
-- determino se due facce lunghe oppure una lunga e l'altra terminale
|
||||
@@ -5013,13 +5026,21 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
-- la faccia 0 deve essere quella lunga
|
||||
EgtSurfTmSwapFacets( Proc.Id, 0, 1)
|
||||
if bUseBlade then
|
||||
return Fbs.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, 'HeadSide')
|
||||
if nForceUseBladeOnNotContinueFace and nForceUseBladeOnNotContinueFace > 0 then
|
||||
return LongCut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nForceUseBladeOnNotContinueFace)
|
||||
else
|
||||
return Fbs.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, 'HeadSide')
|
||||
end
|
||||
else
|
||||
return LongCut.Make( Proc, nPhase, nRawId, nPartId)
|
||||
end
|
||||
elseif b3Fac2:getDimX() < 1 then
|
||||
if bUseBlade then
|
||||
return Fbs.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, 'HeadSide')
|
||||
if nForceUseBladeOnNotContinueFace and nForceUseBladeOnNotContinueFace > 0 then
|
||||
return LongCut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nForceUseBladeOnNotContinueFace)
|
||||
else
|
||||
return Fbs.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, 'HeadSide')
|
||||
end
|
||||
else
|
||||
return LongCut.Make( Proc, nPhase, nRawId, nPartId)
|
||||
end
|
||||
@@ -5030,7 +5051,32 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
return MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
end
|
||||
end
|
||||
-- tre o più facce
|
||||
-- tre facce
|
||||
elseif Proc.Fct == 3 then
|
||||
-- determino se due facce lunghe oppure una lunga e l'altra terminale
|
||||
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, 0, GDB_BB.STANDARD)
|
||||
local b3Fac2 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, 1, GDB_BB.STANDARD)
|
||||
local b3Fac3 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, 2, GDB_BB.STANDARD)
|
||||
local bApplyBladeOnLongNotContinueFace
|
||||
|
||||
if b3Fac1:getDimX() < 1 and b3Fac3:getDimX() < 1 then
|
||||
-- la faccia 0 deve essere quella lunga
|
||||
EgtSurfTmSwapFacets( Proc.Id, 0, 1)
|
||||
bApplyBladeOnLongNotContinueFace = true
|
||||
elseif b3Fac1:getDimX() < 1 and b3Fac2:getDimX() < 1 then
|
||||
-- la faccia 0 deve essere quella lunga
|
||||
EgtSurfTmSwapFacets( Proc.Id, 0, 2)
|
||||
bApplyBladeOnLongNotContinueFace = true
|
||||
elseif b3Fac2:getDimX() < 1 and b3Fac3:getDimX() < 1 then
|
||||
bApplyBladeOnLongNotContinueFace = true
|
||||
end
|
||||
|
||||
if bApplyBladeOnLongNotContinueFace and bUseBlade and nForceUseBladeOnNotContinueFace and nForceUseBladeOnNotContinueFace > 0 then
|
||||
return LongCut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nForceUseBladeOnNotContinueFace)
|
||||
else
|
||||
return MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
end
|
||||
-- più facce
|
||||
else
|
||||
return MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user