- in BeamLib aggiunta GetNewMachGroupName per avere il prossimo numero MachGroup intero libero
- in NestProcess i nomi MachGroup sono sempre interi; si mantiene sempre un BEAM_SAFETY_BUFFER nel riempimento delle barre - in BeamExec.GetCombinationListFromMatrix corretti indici taglio di testa e coda
This commit is contained in:
@@ -1704,9 +1704,9 @@ local function GetCombinationListFromMatrix( ProcessingsOnPart, PartInfo, bRePro
|
||||
end
|
||||
|
||||
-- se la feature può essere lavorata in almeno una rotazione e non è un taglio di testa o coda
|
||||
if ID.IsHeadCut( ProcOnFirstRotation) then
|
||||
if ID.IsHeadCut( ProcessingsOnPart.Rotation[1+nOffsetIndex][nProc]) then
|
||||
SingleCombination.nIndexHeadCutInVProc = nProc
|
||||
elseif ID.IsTailCut( ProcOnFirstRotation) then
|
||||
elseif ID.IsTailCut( ProcessingsOnPart.Rotation[1+nOffsetIndex][nProc]) then
|
||||
SingleCombination.nIndexTailCutInVProc = nProc
|
||||
else
|
||||
if #ResultsList > 0 then
|
||||
|
||||
@@ -423,6 +423,24 @@ function BeamLib.GetAddGroup( PartId)
|
||||
return AddGrpId, sMchGrp
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
-- Funzione prossimo nome MachGroup libero (numero intero)
|
||||
function BeamLib.GetNewMachGroupName()
|
||||
local idMachGroup = EgtGetFirstMachGroup()
|
||||
if not idMachGroup then return 1 end
|
||||
local nMaxMachGroup = 0
|
||||
while idMachGroup do
|
||||
local sMachGroupName = EgtGetMachGroupName( idMachGroup)
|
||||
local nMachGroupName = tonumber( sMachGroupName)
|
||||
if nMachGroupName > nMaxMachGroup then
|
||||
nMaxMachGroup = nMachGroupName
|
||||
end
|
||||
idMachGroup = EgtGetNextMachGroup( idMachGroup)
|
||||
end
|
||||
|
||||
return nMaxMachGroup + 1
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
-- restituisce le facce della parte interessate dalla feature Proc
|
||||
-- TODO da spostare in FeatureLib???
|
||||
|
||||
+6
-3
@@ -45,7 +45,10 @@ local CONFIG = {
|
||||
MIN_USABLE_REMNANT = BeamData.MINRAW_S, -- Sotto questa misura lo scarto è considerato "sfrido"
|
||||
MAX_REMNANT_PERFECT_FIT = 20,
|
||||
BLADE_THICKNESS = 5.4, -- TODO questo deve arrivare da interfaccia o da automatismo!!!!!
|
||||
MIN_FILLER_LIMIT = ( BeamData.MINRAW_S + BeamData.MINRAW_L) / 2
|
||||
MIN_FILLER_LIMIT = ( BeamData.MINRAW_S + BeamData.MINRAW_L) / 2,
|
||||
|
||||
-- Tolleranze
|
||||
BEAM_SAFETY_BUFFER = 5 -- Buffer di sicurezza riempimento barra per evitare problemi nei solidi EgtCam5
|
||||
}
|
||||
|
||||
----------------------------------------------------------------------------------------------------------
|
||||
@@ -353,7 +356,7 @@ local function CalculateMove( Beam, dPartLength, sState, State)
|
||||
|
||||
-- lunghezza barra rimasta (se negativo non ci sta)
|
||||
local dFutureResidualLength = Beam.dResidualLength + dSafeOverlap - dPartLength
|
||||
if dFutureResidualLength < -10 * GEO.EPS_SMALL then
|
||||
if dFutureResidualLength < CONFIG.BEAM_SAFETY_BUFFER - 10 * GEO.EPS_SMALL then
|
||||
return nil
|
||||
end
|
||||
|
||||
@@ -610,7 +613,7 @@ for i = 1, #RawInventory.ActiveBeams do
|
||||
local Beam = RawInventory.ActiveBeams[i]
|
||||
|
||||
-- creazione MachGroup
|
||||
local sMachGroup = EgtGetMachGroupNewName( i)
|
||||
local sMachGroup = BeamLib.GetNewMachGroupName()
|
||||
local idMachGroup = EgtAddMachGroup( sMachGroup)
|
||||
|
||||
-- assegnazione info
|
||||
|
||||
Reference in New Issue
Block a user