From ec734ca99d1cb8038f3e478d15139d69dcb33567 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Tue, 8 Oct 2024 16:11:54 +0200 Subject: [PATCH] - in MachiningLib aggiunta scrittura cloni geometria - in STR0003 sistemati commenti --- LuaLibs/MachiningLib.lua | 10 +++++++++- Strategies/Standard/STR0003/STR0003.lua | 9 ++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/LuaLibs/MachiningLib.lua b/LuaLibs/MachiningLib.lua index 3e2909d..9719b63 100644 --- a/LuaLibs/MachiningLib.lua +++ b/LuaLibs/MachiningLib.lua @@ -412,7 +412,13 @@ function MachiningLib.AddOperations( vProc, Part) if nOperationId then -- impostazione geometria - EgtSetMachiningGeometry( MACHININGS[i].Machining.Geometry) + local Geometry + if MACHININGS[i].AuxiliaryData.Clones and MACHININGS[i].AuxiliaryData.Clones[j].Geometry then + Geometry = MACHININGS[i].AuxiliaryData.Clones[j].Geometry + elseif MACHININGS[i].Machining.Geometry then + Geometry = MACHININGS[i].Machining.Geometry + end + EgtSetMachiningGeometry( Geometry) -- impostazione parametri lavorazione -- TODO scrivere sempre Steps, LeadIn, LeadOut nelle tabelle in modo da non dover controllare ogni volta che ci siano @@ -469,6 +475,7 @@ function MachiningLib.AddOperations( vProc, Part) end if sValue then local sUserNotes = '' + sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) sUserNotes = EgtSetValInNotes( sUserNotes, UserNotes[k].sMchParam, sValue) EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes) end @@ -487,6 +494,7 @@ function MachiningLib.AddOperations( vProc, Part) end if sValue then local sSystemNotes = '' + sSystemNotes = EgtGetMachiningParam( MCH_MP.SYSNOTES) sSystemNotes = EgtSetValInNotes( sSystemNotes, SystemNotes[k].sMchParam, sValue) EgtSetMachiningParam( MCH_MP.SYSNOTES, sSystemNotes) end diff --git a/Strategies/Standard/STR0003/STR0003.lua b/Strategies/Standard/STR0003/STR0003.lua index 2390343..331ca84 100644 --- a/Strategies/Standard/STR0003/STR0003.lua +++ b/Strategies/Standard/STR0003/STR0003.lua @@ -169,8 +169,7 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters) return false, Strategy.Result end - -- lama - -- lavorazione di lama - fondo della tasca o fino a massimo materiale se tunnel + -- lama - calcolo lavorazioni local Cutting = {} local OptionalParameters = { bForceLongcutBlade = Strategy.Parameters.bForceLongcutBlade} if Proc.Topology.sFamily == 'Tunnel' then @@ -202,7 +201,7 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters) Strategy.Parameters.bNotCompleteWithBladeRadius = false end end - + -- lama - aggiunta lavorazioni local nIsApplicableCount = 0 local dFinalCompletionPercentage = 100 local bAreAllMachiningsAdded = true @@ -269,7 +268,7 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters) return bAreAllMachiningsAdded, Strategy.Result end - -- sega a catena + -- sega a catena - calcolo lavorazioni local Mortising = {} OptionalParameters = {} if Proc.Topology.sName == 'Groove-4-Blind' or Proc.Topology.sName == 'Pocket-5-Blind' then @@ -421,7 +420,7 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters) end end end - + -- sega a catena - aggiunta lavorazioni local nIsApplicableCount = 0 local dFinalCompletionPercentage = 100 local bAreAllMachiningsAdded = true