- alcune modifiche a nomi variabili (Part.b3Raw, nToolTypeId)

- in BeamLib aggiunte GetChainSawInitAngs e GetBlockedAxis da automatismo vecchio, con qualche adattamento
- prima versione funzionante di STR0003
This commit is contained in:
luca.mazzoleni
2024-05-30 10:44:24 +02:00
parent 60bac29b1e
commit a5382e0847
4 changed files with 76 additions and 34 deletions
+43 -3
View File
@@ -8,6 +8,7 @@ local BeamLib = {}
-- Include
require( 'EgtBase')
local BeamData = require( 'BeamData')
EgtOutLog( ' BeamLib started', 1)
@@ -262,14 +263,14 @@ function BeamLib.GetFaceHvRefDim( nSurfId, idFace, Part)
local dDimH = b3HV:getDimX()
local dDimV = b3HV:getDimY()
-- se definito grezzo (o solido), applico eventuali limiti
if Part.b3RawBox then
if Part.b3Raw then
local dCoeffY = abs( frHV:getVersX():getY())
if dCoeffY > GEO.EPS_SMALL then
dDimH = min( dDimH, Part.b3RawBox:getDimY() / dCoeffY)
dDimH = min( dDimH, Part.b3Raw:getDimY() / dCoeffY)
end
local dCoeffZ = abs( frHV:getVersY():getZ())
if dCoeffZ > GEO.EPS_SMALL then
dDimV = min( dDimV, Part.b3RawBox:getDimZ() / dCoeffZ)
dDimV = min( dDimV, Part.b3Raw:getDimZ() / dCoeffZ)
end
end
@@ -312,5 +313,44 @@ function BeamLib.LoadCustomParametersInStrategy( CustomParameters)
return Parameters
end
---------------------------------------------------------------------
function BeamLib.GetChainSawInitAngs( vtN, vtO, nInd)
if BeamData.GetChainSawInitAngs then
return BeamData.GetChainSawInitAngs( vtN, vtO, nInd)
else
if BeamData.C_SIMM then
return EgtIf( vtN:getY() > 0, 'C=180', 'C=-180')
else
if nInd == 1 then
return ''
else
return EgtIf( vtN:getY() > 0, 'C=180', 'C=-180')
end
end
end
end
---------------------------------------------------------------------
function BeamLib.GetBlockedAxis( nToolIndex, sBlockedAxis, b3Raw, vtTool, vtOut)
-- se presente funzione specifica nella macchina, la richiamo
if BeamData.GetBlockedAxis then
return BeamData.GetBlockedAxis( TOOLS[nToolIndex].sHead, TOOLS[nToolIndex].nTypeId, sBlockedAxis, b3Raw, vtTool, vtOut) or ''
-- sezione mantenuta per retrocompatibilità con GetChainSawBlockedAxis
elseif TOOLS[nToolIndex].nTypeId == MCH_TY.MORTISE_STD then
local nInd = EgtIf( sBlockedAxis == 'parallel', 0, 1)
if BeamData.GetChainSawBlockedAxis then
return BeamData.GetChainSawBlockedAxis( nInd)
else
if nInd == 1 then
return EgtIf( BeamData.C_SIMM, 'A=90', 'A=90')
else
return EgtIf( BeamData.C_SIMM, 'A=0', 'A=0')
end
end
end
return ''
end
-------------------------------------------------------------------------------------------------------------
return BeamLib