Aggiornamento BeamData per compatibilità con nuovo automatismo

This commit is contained in:
andrea.villa
2025-05-05 09:08:12 +02:00
parent 38ebe7c8f7
commit f566a1afbb
+120 -1
View File
@@ -5,7 +5,7 @@ EgtOutLog( ' KAIROS-BeamData started', 1)
-- Tabella per definizione modulo
local BeamData = {
ROT90 = false, -- flag abilitazione rotazione 90 gradi
ROT180 = true, -- flag abilitazione rotazione 90 gradi
MIN_WIDTH = 40, -- larghezza minima del grezzo
MIN_HEIGHT = 40, -- altezza minima del grezzo
MAX_WIDTH = 250, -- larghezza massima del grezzo
@@ -115,5 +115,124 @@ local function GetMaxLenRidgeLapFromBottom( dHRaw)
end
BeamData.GetMaxLenRidgeLapFromBottom = GetMaxLenRidgeLapFromBottom
---------------------------------------------------------------------
local function GetMinNzTopHead( vtNFace)
if vtNFace and abs( vtNFace:getY()) > 0.8659 then
return -0.2499
else
return sin( -15)
end
end
---------------------------------------------------------------------
local function GetMinNzDownUp( b3Raw, vtNFace, vtToolDirection)
if vtToolDirection and vtToolDirection:getZ() > 0.35 then
-- N_HorAng < 15° or N_HorAng > 55°
if vtNFace and ( abs( vtNFace:getY()) < 0.259 or abs( vtNFace:getY()) > 0.819) then
return -0.708
-- N_HorAng > 50°
elseif vtNFace and abs( vtNFace:getY()) > 0.766 then
return -0.383
else
return EgtIf( b3Raw:getDimZ() < BeamData.MIN_DIM_HBEAM, -0.609, -0.383)
end
elseif vtToolDirection and vtToolDirection:getZ() < - 0.01
and ( vtNFace and ( abs( vtNFace:getY()) > 0.983))
and ( b3Raw:getDimY() < 210) then
return -0.173
else
-- N_HorAng > 60°
if vtNFace and ( abs( vtNFace:getY()) > 0.866) then
return -0.708
else
if b3Raw:getDimZ() < 120 then
return -0.708
elseif b3Raw:getDimZ() < 200 then
-- N_HorAng < 15° or N_HorAng > 55°
if vtNFace and ( abs( vtNFace:getY()) < 0.259 or abs( vtNFace:getY()) > 0.819) then
return -0.5
else
return -0.383
end
elseif b3Raw:getDimZ() < 300 then
-- N_HorAng < 10°
if vtNFace and ( abs( vtNFace:getY()) < 0.174) then
return -0.5
else
return -0.259
end
elseif b3Raw:getDimZ() < BeamData.MIN_DIM_HBEAM then
-- N_HorAng < 10°
if vtNFace and ( abs( vtNFace:getY()) < 0.174) then
return -0.342
else
return -0.259
end
else
-- N_HorAng < 10°
if vtNFace and ( abs( vtNFace:getY()) < 0.174) then
return -0.383
else
return -0.174
end
end
end
end
end
---------------------------------------------------------------------
local function GetSetupInfo( sHead)
local SetupInfo = {}
-- dati comuni
SetupInfo.bIsCSymmetrical = false
SetupInfo.dCAxisEncumbrance = 180
SetupInfo.dCAxisSideEncumbrance = 200
SetupInfo.dPivot = 210
SetupInfo.bToolOnAggregate = false
-- testa 5 assi da sopra
if sHead == 'H1' then
SetupInfo.HeadType = { bTop = true, bBottom = false}
SetupInfo.PreferredSide = {}
SetupInfo.GetMinNz = GetMinNzTopHead
end
return SetupInfo
end
BeamData.GetSetupInfo = GetSetupInfo
---------------------------------------------------------------------
local function GetMaxMatReductionBladeCut( sHead, vtDir)
local MaxMatReductionBladeCut = 0
-- la lama è montata solo su H2, non si controllano altre teste
if sHead == 'H2' then
if BeamData.NEWTOPC == nil or BeamData.NEWTOPC then
MaxMatReductionBladeCut = -65
end
if AreSameVectorApprox( vtDir, X_AX()) then
MaxMatReductionBladeCut = MaxMatReductionBladeCut + 175
elseif AreSameVectorApprox( vtDir, -X_AX()) then
MaxMatReductionBladeCut = MaxMatReductionBladeCut + 175
elseif AreSameVectorApprox( vtDir, Y_AX()) then
MaxMatReductionBladeCut = MaxMatReductionBladeCut + 175
elseif AreSameVectorApprox( vtDir, -Y_AX()) then
MaxMatReductionBladeCut = MaxMatReductionBladeCut + 175
elseif AreSameVectorApprox( vtDir, Z_AX()) then
MaxMatReductionBladeCut = 80
elseif AreSameVectorApprox( vtDir, -Z_AX()) then
MaxMatReductionBladeCut = 80
end
MaxMatReductionBladeCut = MaxMatReductionBladeCut + BeamData.COLL_SIC
end
return MaxMatReductionBladeCut + BeamData.COLL_SIC
end
BeamData.GetMaxMatReductionBladeCut = GetMaxMatReductionBladeCut
---------------------------------------------------------------------
return BeamData