Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a8036e1645 | |||
| 37ff2e7f4c |
+33
-7
@@ -2653,17 +2653,43 @@ function BeamExec.ProcessAlternatives( PARTS)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- passaggio info a interfaccia da scrivere sul pezzo
|
-- passaggio info a interfaccia da scrivere sul pezzo
|
||||||
|
local function IsStateInAlternativesNest2D( sState)
|
||||||
|
for _, v in ipairs( AlternativesNest2D) do
|
||||||
|
if v == sState then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
BEAM.INFONGEPART = {}
|
BEAM.INFONGEPART = {}
|
||||||
for i = 1, #AlternativesNest2D do
|
local States = {
|
||||||
|
"1000",
|
||||||
|
"0100",
|
||||||
|
"0010",
|
||||||
|
"0001",
|
||||||
|
"1000_INV",
|
||||||
|
"0100_INV",
|
||||||
|
"0010_INV",
|
||||||
|
"0001_INV",
|
||||||
|
}
|
||||||
|
for i = 1, #States do
|
||||||
|
local sState = States[i]
|
||||||
|
if IsStateInAlternativesNest2D( sState) then
|
||||||
if PARTS[nPart].HeadcutInfo then
|
if PARTS[nPart].HeadcutInfo then
|
||||||
local sOffsetX = table.concat( PARTS[nPart].HeadcutInfo[AlternativesNest2D[i]].OffsetX, ',')
|
local HeadcutInfo = PARTS[nPart].HeadcutInfo[sState]
|
||||||
local sVtN = ( tostring( PARTS[nPart].HeadcutInfo[AlternativesNest2D[i]].vtN)):gsub("^%(", ""):gsub("%)$", "")
|
local sOffsetX = table.concat( HeadcutInfo.OffsetX, ',')
|
||||||
table.insert( BEAM.INFONGEPART, 'ALT' .. AlternativesNest2D[i].. '_H' .. '=' .. sOffsetX .. ';' .. sVtN )
|
local sVtN = ( tostring( HeadcutInfo.vtN)):gsub("^%(", ""):gsub("%)$", "")
|
||||||
|
table.insert( BEAM.INFONGEPART, 'ALT' .. sState.. '_H' .. '=' .. sOffsetX .. ';' .. sVtN )
|
||||||
end
|
end
|
||||||
if PARTS[nPart].TailcutInfo then
|
if PARTS[nPart].TailcutInfo then
|
||||||
local sOffsetX = table.concat( PARTS[nPart].TailcutInfo[AlternativesNest2D[i]].OffsetX, ',')
|
local TailCutInfo = PARTS[nPart].TailcutInfo[sState]
|
||||||
local sVtN = ( tostring( PARTS[nPart].TailcutInfo[AlternativesNest2D[i]].vtN)):gsub("^%(", ""):gsub("%)$", "")
|
local sOffsetX = table.concat( TailCutInfo.OffsetX, ',')
|
||||||
table.insert( BEAM.INFONGEPART, 'ALT' .. AlternativesNest2D[i] .. '_T' .. '=' .. sOffsetX .. ';' .. sVtN)
|
local sVtN = ( tostring( TailCutInfo.vtN)):gsub("^%(", ""):gsub("%)$", "")
|
||||||
|
table.insert( BEAM.INFONGEPART, 'ALT' .. sState .. '_T' .. '=' .. sOffsetX .. ';' .. sVtN)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
table.insert( BEAM.INFONGEPART, 'ALT' .. sState.. '_H' .. '= ')
|
||||||
|
table.insert( BEAM.INFONGEPART, 'ALT' .. sState.. '_T' .. '= ')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user