DataBeam :
- modifiche per nuova interfaccia (Lele).
This commit is contained in:
+23
-9
@@ -280,10 +280,11 @@ if bToProcess then
|
||||
table.insert( vBeam, { Id = nPartId, PosX = dPosX, Name = ( EgtGetName( nPartId) or ( 'Id=' .. tonumber( nPartId)))})
|
||||
end
|
||||
if #vBeam == 0 then
|
||||
BEAM.ERR = 14
|
||||
BEAM.MSG = 'Error : no beams in the project'
|
||||
WriteErrToLogFile( BEAM.ERR, BEAM.MSG)
|
||||
return
|
||||
--BEAM.ERR = 14
|
||||
--BEAM.MSG = 'Error : no beams in the project'
|
||||
--WriteErrToLogFile( BEAM.ERR, BEAM.MSG)
|
||||
--return
|
||||
EgtOutLog( 'Travi non trovate', 1)
|
||||
else
|
||||
local sOut = ''
|
||||
for i = 1, #vBeam do
|
||||
@@ -309,9 +310,19 @@ if bToProcess then
|
||||
|
||||
-- Se devo creare la barra
|
||||
if bCreateBar then
|
||||
-- Ne verifico le dimensioni
|
||||
local dRawW = vBeam[1].Box:getDimY()
|
||||
local dRawH = vBeam[1].Box:getDimZ()
|
||||
local dRawW
|
||||
local dRawH
|
||||
if #vBeam == 0 then
|
||||
-- Recupero l'identificativo del gruppo di lavoro corrente
|
||||
local nMGrpId = EgtGetCurrMachGroup()
|
||||
-- Recupero le dimensioni della barra
|
||||
dRawW = EgtGetInfo(nMGrpId, 'BARWIDTH', 'd')
|
||||
dRawH = EgtGetInfo(nMGrpId, 'BARHEIGHT', 'd')
|
||||
else
|
||||
-- Ne verifico le dimensioni
|
||||
dRawW = vBeam[1].Box:getDimY()
|
||||
dRawH = vBeam[1].Box:getDimZ()
|
||||
end
|
||||
local vBeamErr = {}
|
||||
for i = 2, #vBeam do
|
||||
local dDimW = vBeam[i].Box:getDimY()
|
||||
@@ -373,8 +384,11 @@ if bToProcess then
|
||||
-- Lunghezza della barra
|
||||
local dRawL = dBarLen + 0.1
|
||||
-- Sovramateriale di testa
|
||||
local dOvmHead = vBeam[1].PosX or 0
|
||||
|
||||
local dOvmHead = 0
|
||||
if #vBeam > 0 then
|
||||
dOvmHead = vBeam[1].PosX or 0
|
||||
end
|
||||
|
||||
-- Sistemo le travi nel grezzo
|
||||
local bPbOk, sPbErr = BE.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, vBeam, BEAM.FLAG == 6)
|
||||
if not bPbOk then
|
||||
|
||||
Reference in New Issue
Block a user