- in BeamExec si evita di ricalcolare senza motivo il box del pezzo

- tutti i riferimenti a PARTS[i].b3Box o Part.b3Solid diventano Part.b3Part
- in BeamExec aggiunte funzioni PrepareMachiningsForSorting e SortMachiningsBySegment, da completare
- in BeamLib aggiunta funzione GetSplittingPoints
- nelle lavorazioni introdotta la variabile sStage che rappresenta la fase di lavoro a cui la lavorazione stessa appartiene (Head, Tail, AfterTail oppure vuota che significa sezione centrale, quella divisa in segments)
- piccole correzioni ad alcuni nomi di variabile
This commit is contained in:
luca.mazzoleni
2024-12-18 11:59:08 +01:00
parent 233a928dcd
commit eb4a5e521f
15 changed files with 195 additions and 75 deletions
+9 -9
View File
@@ -131,15 +131,15 @@ local function MyProcessInputData()
EgtOutBox( 'Box non definito per la trave ' .. PARTS[i].sName, 'Lavora Travi', 'ERROR')
return false
else
PARTS[i].b3Box = b3Solid
PARTS[i].b3Part = b3Solid
end
end
dRawW = PARTS[1].b3Box:getDimY()
dRawH = PARTS[1].b3Box:getDimZ()
dRawW = PARTS[1].b3Part:getDimY()
dRawH = PARTS[1].b3Part:getDimZ()
local vBeamErr = {}
for i = 2, #PARTS do
local dDimW = PARTS[i].b3Box:getDimY()
local dDimH = PARTS[i].b3Box:getDimZ()
local dDimW = PARTS[i].b3Part:getDimY()
local dDimH = PARTS[i].b3Part:getDimZ()
if ( abs( dDimW - dRawW) > 10 * GEO.EPS_SMALL or abs( dDimH - dRawH) > 10 * GEO.EPS_SMALL) and
( abs( dDimH - dRawW) > 10 * GEO.EPS_SMALL or abs( dDimW - dRawH) > 10 * GEO.EPS_SMALL) then
table.insert( vBeamErr, i)
@@ -186,9 +186,9 @@ local function MyProcessBeams()
-- Lunghezza totale delle travi
local dTotLen = 0
for i = 1, #PARTS - 1 do
dTotLen = dTotLen + PARTS[i].b3Box:getDimX()
dTotLen = dTotLen + PARTS[i].b3Part:getDimX()
end
dTotLen = dTotLen + max( PARTS[#PARTS].b3Box:getDimX(), BeamData.dMinRaw)
dTotLen = dTotLen + max( PARTS[#PARTS].b3Part:getDimX(), BeamData.dMinRaw)
local dAddLen = BeamData.OVM_HEAD + ( #PARTS - 1) * BeamData.OVM_MID
EgtOutLog( 'Ltot : '..EgtNumToString( dTotLen, 1) .. ' Lagg : '..EgtNumToString( dAddLen, 1)..' MinUnloadRaw : '.. EgtNumToString( BeamData.dMinRaw + BeamData.OVM_MID, 1), 1)
@@ -277,10 +277,10 @@ local function MyProcessBeams()
local bOrd = ( vsVal[5] == 'true')
if bOrd then
table.sort( PARTS, function( B1, B2)
if abs( B1.b3Box:getDimX() - B2.b3Box:getDimX()) < 1 then
if abs( B1.b3Part:getDimX() - B2.b3Part:getDimX()) < 1 then
return B1.nInd < B2.nInd
else
return B1.b3Box:getDimX() < B2.b3Box:getDimX()
return B1.b3Part:getDimX() < B2.b3Part:getDimX()
end
end)
end