From 228c4f9a48de94fc5786eb97711996d81c491164 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 24 Mar 2026 13:30:20 +0100 Subject: [PATCH 1/3] =?UTF-8?q?EgtCAM5=20:=20-=20correzione=20gestione=20g?= =?UTF-8?q?eometria=20selezionata=20con=20pi=C3=B9=20sottoentit=C3=A0=20pe?= =?UTF-8?q?r=20la=20lavorazione=20corrente.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MachiningTreeExpanderVM.vb | 14 ++++--------- .../MachiningParameterExpanderVM.vb | 14 ++++--------- Utility/SelData.vb | 21 +++++++++++++++++++ 3 files changed, 29 insertions(+), 20 deletions(-) diff --git a/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderVM.vb b/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderVM.vb index f65db65..c8c6145 100644 --- a/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderVM.vb +++ b/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderVM.vb @@ -95,16 +95,10 @@ Public Class MachiningTreeExpanderVM EgtRelocate(MachiningId, nSelectedOperationId, GDB_POS.AFTER) End If ' Imposto geometria da lavorare (tutta quella selezionata) - Dim vId(EgtGetSelectedObjCount() - 1) As Integer - Dim vSub(EgtGetSelectedObjCount() - 1) As Integer - Dim nInd As Integer = 0 - Dim EntId As Integer = EgtGetFirstSelectedObj() - While EntId <> GDB_ID.NULL - vId(nInd) = EntId - SelData.GetSubFromId( EntId, vSub(nInd)) - nInd += 1 - EntId = EgtGetNextSelectedObj() - End While + SelData.VerifyIdSub() + Dim vId() As Integer = Nothing + Dim vSub() As Integer = Nothing + SelData.GetAllSelectedGeom(vId, vSub) EgtSetMachiningGeometry(vId, vSub) ' Calcolo la lavorazione con la nuova geometria EgtApplyMachining(True) diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderVM.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderVM.vb index 2b2edfd..0326f5c 100644 --- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderVM.vb +++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderVM.vb @@ -440,16 +440,10 @@ Public Class MachiningParameterExpanderVM m_CurrOperation.WriteOperationParam() ' Imposto geometria da lavorare (tutta quella selezionata) - Dim vId(EgtGetSelectedObjCount() - 1) As Integer - Dim vSub(EgtGetSelectedObjCount() - 1) As Integer - Dim nInd As Integer = 0 - Dim EntId As Integer = EgtGetFirstSelectedObj() - While EntId <> GDB_ID.NULL - vId(nInd) = EntId - SelData.GetSubFromId(EntId, vSub(nInd)) - nInd += 1 - EntId = EgtGetNextSelectedObj() - End While + SelData.VerifyIdSub() + Dim vId() As Integer = Nothing + Dim vSub() As Integer = Nothing + SelData.GetAllSelectedGeom(vId, vSub) EgtSetMachiningGeometry(vId, vSub) ' Rigenero la lavorazione diff --git a/Utility/SelData.vb b/Utility/SelData.vb index 232f039..7480d69 100644 --- a/Utility/SelData.vb +++ b/Utility/SelData.vb @@ -122,6 +122,27 @@ Module SelData Return True End Function + Friend Function GetAllSelectedGeom(ByRef vId() As Integer, ByRef vSub() As Integer) As Boolean + If GetIdSubCount() > 0 then + VerifyIdSub() + GetAllIdSub(vId, vSub) + Else + Dim MyId(EgtGetSelectedObjCount() - 1) As Integer + Dim MySub(EgtGetSelectedObjCount() - 1) As Integer + Dim nInd As Integer = 0 + Dim EntId As Integer = EgtGetFirstSelectedObj() + While EntId <> GDB_ID.NULL + MyId(nInd) = EntId + MySub(nInd) = -1 + nInd += 1 + EntId = EgtGetNextSelectedObj() + End While + vId = MyId + vSub = MySub + End If + Return True + End Function + Friend Function GetSubFromId( nId As Integer, ByRef nSub As Integer) As Boolean For i As Integer = 0 To m_IdSub.Count() - 1 If m_IdSub(i).m_nId = nId Then From 705aeaaab7d21f66c9406afa3688d93242e4f22b Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 24 Mar 2026 13:35:11 +0100 Subject: [PATCH 2/3] EgtCAM5 : - piccola miglioria alla modifica precedente. --- .../MachiningsTreeViewExpander/MachiningTreeExpanderVM.vb | 1 - .../MachiningParameterExpander/MachiningParameterExpanderVM.vb | 1 - 2 files changed, 2 deletions(-) diff --git a/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderVM.vb b/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderVM.vb index c8c6145..efa43e1 100644 --- a/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderVM.vb +++ b/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderVM.vb @@ -95,7 +95,6 @@ Public Class MachiningTreeExpanderVM EgtRelocate(MachiningId, nSelectedOperationId, GDB_POS.AFTER) End If ' Imposto geometria da lavorare (tutta quella selezionata) - SelData.VerifyIdSub() Dim vId() As Integer = Nothing Dim vSub() As Integer = Nothing SelData.GetAllSelectedGeom(vId, vSub) diff --git a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderVM.vb b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderVM.vb index 0326f5c..0ecd914 100644 --- a/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderVM.vb +++ b/OptionPanel/MachiningOptionPanel/OperationExpander/MachiningParameterExpander/MachiningParameterExpanderVM.vb @@ -440,7 +440,6 @@ Public Class MachiningParameterExpanderVM m_CurrOperation.WriteOperationParam() ' Imposto geometria da lavorare (tutta quella selezionata) - SelData.VerifyIdSub() Dim vId() As Integer = Nothing Dim vSub() As Integer = Nothing SelData.GetAllSelectedGeom(vId, vSub) From 4e947f293e849ceeef263f4cc6d65bd3278e4db0 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 25 Mar 2026 08:45:26 +0100 Subject: [PATCH 3/3] EgtCAM5 : - piccole migliorie a ExecuteWindow. --- ExecuteWindow/ExecuteWindowV.xaml | 5 +++-- Utility/Dictionary.xaml | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ExecuteWindow/ExecuteWindowV.xaml b/ExecuteWindow/ExecuteWindowV.xaml index ce1435d..f773857 100644 --- a/ExecuteWindow/ExecuteWindowV.xaml +++ b/ExecuteWindow/ExecuteWindowV.xaml @@ -4,7 +4,7 @@ xmlns:EgtCAM5="clr-namespace:EgtCAM5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" Title="Execute Window" - Height="500" Width="400" + Height="500" Width="600" IsResizable="True" IsMinimizable="False" WindowStartupLocation="CenterOwner" @@ -28,7 +28,8 @@ Grid.ColumnSpan="2" Content="{Binding OkMsg}" Command="{Binding Ok_Command}" - Style="{StaticResource EgtCAM5_InputButton}"/> + Style="{StaticResource EgtCAM5_InputButton}" + Margin="0,5,0,10"/>