Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 37ff2e7f4c |
+36
-10
@@ -2642,17 +2642,43 @@ function BeamExec.ProcessAlternatives( PARTS)
|
||||
end
|
||||
|
||||
-- passaggio info a interfaccia da scrivere sul pezzo
|
||||
BEAM.INFONGEPART = {}
|
||||
for i = 1, #AlternativesNest2D do
|
||||
if PARTS[nPart].HeadcutInfo then
|
||||
local sOffsetX = table.concat( PARTS[nPart].HeadcutInfo[AlternativesNest2D[i]].OffsetX, ',')
|
||||
local sVtN = ( tostring( PARTS[nPart].HeadcutInfo[AlternativesNest2D[i]].vtN)):gsub("^%(", ""):gsub("%)$", "")
|
||||
table.insert( BEAM.INFONGEPART, 'ALT' .. AlternativesNest2D[i].. '_H' .. '=' .. sOffsetX .. ';' .. sVtN )
|
||||
local function IsStateInAlternativesNest2D( sState)
|
||||
for _, v in ipairs( AlternativesNest2D) do
|
||||
if v == sState then
|
||||
return true
|
||||
end
|
||||
end
|
||||
if PARTS[nPart].TailcutInfo then
|
||||
local sOffsetX = table.concat( PARTS[nPart].TailcutInfo[AlternativesNest2D[i]].OffsetX, ',')
|
||||
local sVtN = ( tostring( PARTS[nPart].TailcutInfo[AlternativesNest2D[i]].vtN)):gsub("^%(", ""):gsub("%)$", "")
|
||||
table.insert( BEAM.INFONGEPART, 'ALT' .. AlternativesNest2D[i] .. '_T' .. '=' .. sOffsetX .. ';' .. sVtN)
|
||||
return false
|
||||
end
|
||||
BEAM.INFONGEPART = {}
|
||||
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
|
||||
local HeadcutInfo = PARTS[nPart].HeadcutInfo[sState]
|
||||
local sOffsetX = table.concat( HeadcutInfo.OffsetX, ',')
|
||||
local sVtN = ( tostring( HeadcutInfo.vtN)):gsub("^%(", ""):gsub("%)$", "")
|
||||
table.insert( BEAM.INFONGEPART, 'ALT' .. sState.. '_H' .. '=' .. sOffsetX .. ';' .. sVtN )
|
||||
end
|
||||
if PARTS[nPart].TailcutInfo then
|
||||
local TailCutInfo = PARTS[nPart].TailcutInfo[sState]
|
||||
local sOffsetX = table.concat( TailCutInfo.OffsetX, ',')
|
||||
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
|
||||
|
||||
|
||||
@@ -411,8 +411,12 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters)
|
||||
|
||||
-- si lavora tutto il fondo
|
||||
else
|
||||
OptionalParameters.dMaxElev = Blade.Result.Bottom[1].dResidualDepth + BeamData.CUT_EXTRA
|
||||
|
||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, BottomEdge, OptionalParameters)
|
||||
Chainsaw.AddResult( Mortising)
|
||||
|
||||
OptionalParameters.dMaxElev = nil
|
||||
end
|
||||
|
||||
-- ancora materiale residuo - se possibile si lavora dal lato
|
||||
@@ -453,12 +457,14 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters)
|
||||
end
|
||||
|
||||
if BottomEdge.bIsStartOpen then
|
||||
OptionalParameters.dMaxElev = dBladeResidualDepth + BeamData.CUT_EXTRA
|
||||
OptionalParameters.OppositeToolDirectionMode = 'Enabled'
|
||||
|
||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, SideEdge1, OptionalParameters)
|
||||
Mortising.dAreaToMachine = Mortising.dDepthToMachine * ( Mortising.dEdgeLength - Chainsaw.Result.Bottom[1].dDepthToMachine)
|
||||
|
||||
elseif BottomEdge.bIsEndOpen then
|
||||
OptionalParameters.dMaxElev = dBladeResidualDepth + BeamData.CUT_EXTRA
|
||||
OptionalParameters.OppositeToolDirectionMode = 'Enabled'
|
||||
|
||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, SideEdge2, OptionalParameters)
|
||||
@@ -474,8 +480,12 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters)
|
||||
if Blade.Result.Bottom[1].dResidualDepth > 10 * GEO.EPS_SMALL then
|
||||
|
||||
-- si lavora tutto il fondo
|
||||
OptionalParameters.dMaxElev = Blade.Result.Bottom[1].dResidualDepth + BeamData.CUT_EXTRA
|
||||
|
||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, BottomEdge, OptionalParameters)
|
||||
Chainsaw.AddResult( Mortising)
|
||||
|
||||
OptionalParameters.dMaxElev = nil
|
||||
|
||||
-- ancora materiale residuo - si lavorano i lati
|
||||
if Chainsaw.Result.Bottom[1].dResidualDepth > 10 * GEO.EPS_SMALL then
|
||||
@@ -526,6 +536,7 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters)
|
||||
else
|
||||
|
||||
OptionalParameters.dDepthToMachine = SideEdge1.dElevation + BeamData.CUT_EXTRA
|
||||
OptionalParameters.dMaxElev = Blade.Result.Side[1].dResidualDepth + BeamData.CUT_EXTRA
|
||||
OptionalParameters.OppositeToolDirectionMode = 'Enabled'
|
||||
|
||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, SideEdge1, OptionalParameters)
|
||||
@@ -538,12 +549,14 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters)
|
||||
Chainsaw.Result.Side[1].bIsApplicable = false
|
||||
|
||||
OptionalParameters.dDepthToMachine = SideEdge1.dElevation / 2 + BeamData.CUT_EXTRA_MIN
|
||||
OptionalParameters.dMaxElev = Blade.Result.Side[1].dResidualDepth + BeamData.CUT_EXTRA
|
||||
|
||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, SideEdge1, OptionalParameters)
|
||||
Mortising.dAreaToMachine = Mortising.dDepthToMachine * ( Mortising.dEdgeLength - Chainsaw.Result.Bottom[1].dDepthToMachine)
|
||||
Chainsaw.AddResult( Mortising)
|
||||
|
||||
OptionalParameters.dDepthToMachine = SideEdge2.dElevation / 2 + BeamData.CUT_EXTRA_MIN
|
||||
OptionalParameters.dMaxElev = Blade.Result.Side[2].dResidualDepth + BeamData.CUT_EXTRA
|
||||
|
||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, SideEdge2, OptionalParameters)
|
||||
Mortising.dAreaToMachine = 0
|
||||
@@ -625,6 +638,7 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters)
|
||||
-- si lavora tutto il lato
|
||||
else
|
||||
OptionalParameters.dDepthToMachine = OppositeEdge1.dElevation + BeamData.CUT_EXTRA
|
||||
OptionalParameters.dMaxElev = Blade.Result.Opposite[1].dResidualDepth + BeamData.CUT_EXTRA
|
||||
|
||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, OppositeEdge1, OptionalParameters)
|
||||
Chainsaw.AddResult( Mortising)
|
||||
@@ -634,11 +648,13 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters)
|
||||
Chainsaw.Result.Opposite[1].bIsApplicable = false
|
||||
|
||||
OptionalParameters.dDepthToMachine = OppositeEdge1.dElevation / 2 + BeamData.CUT_EXTRA_MIN
|
||||
OptionalParameters.dMaxElev = Blade.Result.Opposite[1].dResidualDepth + BeamData.CUT_EXTRA
|
||||
|
||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, OppositeEdge1, OptionalParameters)
|
||||
Chainsaw.AddResult( Mortising)
|
||||
|
||||
OptionalParameters.dDepthToMachine = OppositeEdge2.dElevation / 2 + BeamData.CUT_EXTRA_MIN
|
||||
OptionalParameters.dMaxElev = Blade.Result.Opposite[2].dResidualDepth + BeamData.CUT_EXTRA
|
||||
|
||||
Mortising = FaceByChainsaw.Make( Proc, Part, LongFace, OppositeEdge2, OptionalParameters)
|
||||
Chainsaw.AddResult( Mortising)
|
||||
|
||||
Reference in New Issue
Block a user