From f45efb23100041710806d5212b5626e20249199b Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Mon, 28 Aug 2023 18:05:43 +0200 Subject: [PATCH 01/53] - creazione Json degli strati --- Icarus/Icarus.vbproj | 3 + Icarus/ProjManager/ProjManagerVM.vb | 31 +++++++- Icarus/TSFEditor/TFSEditorVM.vb | 106 ++++++++++++++++++++++++++++ Icarus/packages.config | 1 + 4 files changed, 140 insertions(+), 1 deletion(-) diff --git a/Icarus/Icarus.vbproj b/Icarus/Icarus.vbproj index ce431f1..d6248b1 100644 --- a/Icarus/Icarus.vbproj +++ b/Icarus/Icarus.vbproj @@ -87,6 +87,9 @@ ..\packages\Ionic.Zip.1.9.1.8\lib\Ionic.Zip.dll + + ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll + diff --git a/Icarus/ProjManager/ProjManagerVM.vb b/Icarus/ProjManager/ProjManagerVM.vb index e60b20a..446a1bb 100644 --- a/Icarus/ProjManager/ProjManagerVM.vb +++ b/Icarus/ProjManager/ProjManagerVM.vb @@ -2,6 +2,7 @@ Imports System.IO Imports EgtWPFLib5 Imports EgtUILib +Imports Newtonsoft.Json Public Class ProjManagerVM Inherits VMBase @@ -247,9 +248,37 @@ Public Class ProjManagerVM ''' Execute the Save. This method is invoked by the SaveCommand. ''' Public Sub Save() + If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then + CreateJson() + End If Map.refSceneHostVM.SaveProject() End Sub + Private Function CreateJson() As Boolean + ' creo json + Dim LayerList As New List(Of JsonLayer) + For Each Layer In Map.refTFSEditorVM.LayerList + LayerList.Add(Layer.ConvertToJsonLayer()) + Next + Dim json As String = JsonConvert.SerializeObject(LayerList, Formatting.Indented) + Dim sProjName As String = "" + EgtGetCurrFilePath(sProjName) + If Not String.IsNullOrWhiteSpace(sProjName) Then + sProjName = Path.ChangeExtension(sProjName, ".json") + If File.Exists(sProjName) Then + Try + File.Delete(sProjName) + Catch ex As Exception + End Try + End If + Try + File.AppendAllText(sProjName, json) + Catch ex As Exception + EgtOutLog("Json writing error!") + End Try + End If + End Function + #End Region ' SaveCommand #Region "SaveAsCommand" @@ -385,7 +414,7 @@ Public Class ProjManagerVM Map.refSceneHostVM.SaveProject() End If EgtGetCurrFilePath(sCurrProject) - ' se modificato, chiedo se si vuole salvare + ' se modificato, chiedo se si vuole salvare Else If EgtGetModified() Then If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then diff --git a/Icarus/TSFEditor/TFSEditorVM.vb b/Icarus/TSFEditor/TFSEditorVM.vb index b4d0cff..a4a37bd 100644 --- a/Icarus/TSFEditor/TFSEditorVM.vb +++ b/Icarus/TSFEditor/TFSEditorVM.vb @@ -962,4 +962,110 @@ Public Class TFSLayer Return If(dHours > 0, dHours.ToString("00") & ":", "") & If(dHours > 0, dMinutes.ToString("00"), dMinutes.ToString()) & ":" & dSeconds.ToString("00") End Function + Friend Function ConvertToJsonLayer() As JsonLayer + Return New JsonLayer(nIndex, dLength, dTMin, m_dTTrg, dTMax, dTCurr, m_dTWait, dFCurr, m_dFTrg, m_dFMax, m_dFCurr, dSpeed) + End Function + +End Class + +Public Class JsonLayer + Private m_nIndex As Integer + Public ReadOnly Property Index As Integer + Get + Return m_nIndex + End Get + End Property + + Private m_dLength As Double + Public ReadOnly Property Length As Double + Get + Return m_dLength + End Get + End Property + + Private m_dTMin As Double + Public ReadOnly Property TMin As Double + Get + Return m_dTMin + End Get + End Property + + Private m_dTTrg As Double + Public ReadOnly Property TTrg As Double + Get + Return m_dTTrg + End Get + End Property + + Private m_dTMax As Double + Public ReadOnly Property TMax As Double + Get + Return m_dTMax + End Get + End Property + + Private m_dTCurr As Double + Public ReadOnly Property TCurr As Double + Get + Return m_dTCurr + End Get + End Property + + Private m_dTWait As Double + Public ReadOnly Property TWait As Double + Get + Return m_dTWait + End Get + End Property + + Private m_dFMin As Double + Public ReadOnly Property FMin As Double + Get + Return m_dFMin + End Get + End Property + + Private m_dFTrg As Double + Public ReadOnly Property FTrg As Double + Get + Return m_dFTrg + End Get + End Property + + Private m_dFMax As Double + Public ReadOnly Property FMax As Double + Get + Return m_dFMax + End Get + End Property + + Private m_dFCurr As Double + Public ReadOnly Property FCurr As Double + Get + Return m_dFCurr + End Get + End Property + + Private m_dSpeed As Double + Public ReadOnly Property Speed As Double + Get + Return m_dSpeed + End Get + End Property + + Sub New(nIndex As Integer, dLength As Double, dTMin As Double, dTTrg As Double, dTMax As Double, dTCurr As Double, dTWait As Double, dFMin As Double, dFTrg As Double, dFMax As Double, dFCurr As Double, dSpeed As Double) + m_nIndex = nIndex + m_dLength = dLength + m_dTMin = dTMin + m_dTTrg = dTTrg + m_dTMax = dTMax + m_dTCurr = dTCurr + m_dTWait = dTWait + m_dFMin = dFMin + m_dFTrg = dFTrg + m_dFMax = dFMax + m_dFCurr = dFCurr + m_dSpeed = dSpeed + End Sub + End Class \ No newline at end of file diff --git a/Icarus/packages.config b/Icarus/packages.config index fdc9817..032fc75 100644 --- a/Icarus/packages.config +++ b/Icarus/packages.config @@ -1,4 +1,5 @@  + \ No newline at end of file From f7631e52018385f5b41da132749f05cf67753c58 Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Wed, 20 Sep 2023 11:14:35 +0200 Subject: [PATCH 02/53] - creazione del pacchetto di export per la macchina --- Icarus/Constants/ConstGen.vb | 1 + Icarus/SceneHost/MySceneHostVM.vb | 7 + Icarus/SliceManager/SliceManagerVM.vb | 156 +++++++++++++++++- Icarus/Utility/CurrentMachine.vb | 5 + Icarus/ViewLayerManager/ViewLayerManagerVM.vb | 2 +- 5 files changed, 165 insertions(+), 6 deletions(-) diff --git a/Icarus/Constants/ConstGen.vb b/Icarus/Constants/ConstGen.vb index 302cb0c..cd3b6e5 100644 --- a/Icarus/Constants/ConstGen.vb +++ b/Icarus/Constants/ConstGen.vb @@ -53,6 +53,7 @@ Public Module ConstGen ' Abilitazioni licenza Friend Enum KEY_OPT As UInteger BASE = 1 ' Prodotto Icarus + MACHINE_EXPORT = 2 ' opzione per esportare file icrx per macchina End Enum ' File di log generale diff --git a/Icarus/SceneHost/MySceneHostVM.vb b/Icarus/SceneHost/MySceneHostVM.vb index 6bc97fb..4893818 100644 --- a/Icarus/SceneHost/MySceneHostVM.vb +++ b/Icarus/SceneHost/MySceneHostVM.vb @@ -682,6 +682,13 @@ Public Class MySceneHostVM Return MainController.ExportProject(SaveFileDialog.FileName, False) End Function + Public Function ExportProjectForMachine(sFilePath As String) As Boolean + ' Reset controller e scena + MainController.ResetStatus() + MainController.SetDefaultFilterForExport(EEX_FLT.DEFAULT + EEX_FLT.LEV_TEMP) + Return MainController.ExportProject(sFilePath, False) + End Function + Public Overrides Function ExecScript(sFilePath As String) As Boolean Dim bOk As Boolean = False If String.IsNullOrEmpty(sFilePath) Then diff --git a/Icarus/SliceManager/SliceManagerVM.vb b/Icarus/SliceManager/SliceManagerVM.vb index bef720d..882bc14 100644 --- a/Icarus/SliceManager/SliceManagerVM.vb +++ b/Icarus/SliceManager/SliceManagerVM.vb @@ -2,6 +2,8 @@ Imports EgtUILib Imports Microsoft.Win32 Imports System.IO +Imports Ionic.Zip +Imports Newtonsoft.Json Public Class SliceManagerVM Inherits VMBase @@ -708,14 +710,31 @@ Public Class SliceManagerVM CalcSlice(True, True) ' se non ho interrotto calcoli If Not m_bStopScriptToManage Then - If bShiftPressed Then - ' Se esiste ne lancio l'editing - If File.Exists(sIsoFilePath) Then + ' Se esiste l'iso + If File.Exists(sIsoFilePath) Then + If bShiftPressed Then + ' Se esiste ne lancio l'editing Process.Start("Notepad.exe", sIsoFilePath) ' altrimenti lo segnalo - Else - MessageBox.Show("Edit failed, missing part program file" & " (" & sIsoFilePath & ")") End If + ' verifico se creare pacchetto + If Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.MACHINE_EXPORT) Then + 'If True Then + If Not CreateProjectForMachine(sIsoFilePath) Then + MessageBox.Show("Icrx file generation failed!!", "Error!", MessageBoxButton.OK, MessageBoxImage.Error) + End If + ' riabilito ProjManager, TopPanel e uscita dal programma + Map.refProjManagerVM.SetProjCmdIsEnabled(True) + Map.refTopPanelVM.SetTopPanelIsEnabled(True) + Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(True) + Map.refTFSEditorVM.SetTFSEditorIsEnabled(True) + Map.refSliderManagerVM.SetLayerIndexIsEnabled(True) + Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(True) + SetButtonsIsEnabled(True) + End If + Else + ' altrimenti lo segnalo + MessageBox.Show("Part program generation failed!!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) End If NotifyPropertyChanged(NameOf(Time_Visibility)) NotifyPropertyChanged(NameOf(Mass_Visibility)) @@ -725,6 +744,133 @@ Public Class SliceManagerVM m_bCalculating = False End Sub + Private Function CreateProjectForMachine(sIsoFilePath As String) As Boolean + ' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma + Map.refProjManagerVM.SetProjCmdIsEnabled(False) + Map.refTopPanelVM.SetTopPanelIsEnabled(False) + Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(False) + Map.refTFSEditorVM.SetTFSEditorIsEnabled(False) + Map.refSliderManagerVM.SetLayerIndexIsEnabled(False) + Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(False) + SetButtonsIsEnabled(False) + ' creo cartella file da esportare in Temp + Dim sExportTempFolderPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\MachineExport" + If Directory.Exists(sExportTempFolderPath) Then + Try + Directory.Delete(sExportTempFolderPath, True) + Catch ex As Exception + EgtOutLog("Error! Impossible deleting folder " & sExportTempFolderPath & "!") + Return False + End Try + End If + Try + Directory.CreateDirectory(sExportTempFolderPath) + Catch ex As Exception + EgtOutLog("Error! Impossible creating folder " & sExportTempFolderPath & "!") + Return False + End Try + ' mostro solido per eportazione + Dim SolidCheck As ViewLayer = Map.refViewLayerManagerVM.LayerList.FirstOrDefault(Function(x) x.Type = ViewLayer.ViewLayerType.SOLID_SLICE) + Dim CurrSolidCheckValue As Boolean? = SolidCheck.bIsVisible + If IsNothing(SolidCheck.bIsVisible) OrElse Not SolidCheck.bIsVisible Then + SolidCheck.bIsVisible = True + End If + ' esporto file 3mf + Dim s3mfPath As String = sExportTempFolderPath & "\ProjectSlice.3mf" + If Not Map.refSceneHostVM.ExportProjectForMachine(s3mfPath) Then + EgtOutLog("Error! Impossible exporting 3mf file!") + Return False + End If + ' creo file json + Dim sProjName As String = "" + EgtGetCurrFilePath(sProjName) + Dim sJsonPath As String = sExportTempFolderPath & "\ProjectSlice.json" + CreateJson(sJsonPath) + ' creo immagine preview + Dim sPreviewImagePath As String = sExportTempFolderPath & "\ProjectSlice.png" + CreatePreviewImage(sPreviewImagePath) + ' nascondo solido + If IsNothing(CurrSolidCheckValue) OrElse Not CurrSolidCheckValue Then + SolidCheck.bIsVisible = CurrSolidCheckValue + End If + ' creo path dello zip + Dim sZipPath As String = Path.ChangeExtension(sProjName, ".icrx") + ' se esiste gia' lo cancello + If File.Exists(sZipPath) Then + Try + File.Delete(sZipPath) + Catch ex As Exception + EgtOutLog("Error! Impossible deleting old icrx file!") + Return False + End Try + End If + Try + Using zip As New Ionic.Zip.ZipFile(sZipPath, Console.Out) + zip.AlternateEncodingUsage = ZipOption.Always + zip.AlternateEncoding = Text.Encoding.UTF8 + zip.CompressionMethod = CompressionMethod.None + ' aggiungo file Iso + zip.AddItem(sIsoFilePath, "") + ' aggiungo file 3mf + zip.AddItem(s3mfPath, "") + ' aggiungo json + zip.AddItem(sJsonPath, "") + ' aggiungo immagine preview + zip.AddItem(sPreviewImagePath, "") + ' salvo lo zip + zip.Save() + End Using + Catch ex As Exception + EgtOutLog("Error! Icrx file generation failed!!") + Return False + End Try + ' elimino tutti i file temporanei creati + If Directory.Exists(sExportTempFolderPath) Then + Directory.Delete(sExportTempFolderPath, True) + End If + Return True + End Function + + Private Function CreateJson(sJsonPath As String) As Boolean + ' creo json + Dim LayerList As New List(Of JsonLayer) + For Each Layer In Map.refTFSEditorVM.LayerList + LayerList.Add(Layer.ConvertToJsonLayer()) + Next + Dim json As String = JsonConvert.SerializeObject(LayerList, Formatting.Indented) + If File.Exists(sJsonPath) Then + Try + File.Delete(sJsonPath) + Catch ex As Exception + EgtOutLog("Error! Impossible deleting file " & sJsonPath & "!") + Return False + End Try + End If + Try + File.AppendAllText(sJsonPath, json) + Catch ex As Exception + EgtOutLog("Error! Impossible writing json file " & sJsonPath & "!") + Return False + End Try + Return True + End Function + + Private Function CreatePreviewImage(sPreviewImagePath As String) As Boolean + ' recupero posizione vista corrente + Dim nCurrAngVertDeg As Integer = 0 + Dim nCurrAngHorizDeg As Integer = 0 + EgtGetGenericView(nCurrAngVertDeg, nCurrAngHorizDeg) + EgtSetView(VT.ISO_SW, False) + SetTableVisibility(False) + EgtZoom(ZM.ALL, False) + 'EgtExportSvg(GDB_ID.ROOT, sPreviewImagePath) + EgtGetImage(SM.SHADING, New Color3d(255, 255, 255, 255), New Color3d(255, 255, 255, 255), 3000, 3000, sPreviewImagePath) + EgtSetGenericView(nCurrAngVertDeg, nCurrAngHorizDeg, False) + SetTableVisibility(True) + EgtZoom(ZM.ALL, True) + Return True + End Function + #End Region ' Generate #Region "Simulate" diff --git a/Icarus/Utility/CurrentMachine.vb b/Icarus/Utility/CurrentMachine.vb index 539514b..e4a19ee 100644 --- a/Icarus/Utility/CurrentMachine.vb +++ b/Icarus/Utility/CurrentMachine.vb @@ -156,6 +156,11 @@ Public Module CurrentMachine DisableMgr.ReEnable() End Sub + Public Sub SetTableVisibility(IsVisible As Boolean) + Dim nTableLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE) + EgtSetStatus(nTableLayerId, If(IsVisible, GDB_ST.ON_, GDB_ST.OFF)) + End Sub + Public Sub UpdateExtrusionArea() ' recupero eventuale vecchia area di estrusione Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE) diff --git a/Icarus/ViewLayerManager/ViewLayerManagerVM.vb b/Icarus/ViewLayerManager/ViewLayerManagerVM.vb index eb0b4dd..493619b 100644 --- a/Icarus/ViewLayerManager/ViewLayerManagerVM.vb +++ b/Icarus/ViewLayerManager/ViewLayerManagerVM.vb @@ -35,7 +35,7 @@ Public Class ViewLayerManagerVM End Sub Sub New() - ' Creo riferimento a questa classe in EgtCAM5Map + ' Creo riferimento a questa classe in Map Map.SetRefViewLayerManagerVM(Me) m_LayerList = New ObservableCollection(Of ViewLayer)({New ViewLayer(ViewLayer.ViewLayerType.PRINT_SOLID, "Print", True), New ViewLayer(ViewLayer.ViewLayerType.REFERENCE, "Origin Point", True), From e5fca60809c30876ca5e16c107beb2533af985f2 Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Tue, 26 Sep 2023 11:40:21 +0200 Subject: [PATCH 03/53] - aggiunti dati nel json - evito creazione icrx se generazione andata male --- Icarus/Icarus.vbproj | 1 + Icarus/SliceManager/SliceManagerVM.vb | 13 +- Icarus/TSFEditor/TFSEditorVM.vb | 102 -------------- Icarus/Utility/JsonUtility.vb | 191 ++++++++++++++++++++++++++ 4 files changed, 197 insertions(+), 110 deletions(-) create mode 100644 Icarus/Utility/JsonUtility.vb diff --git a/Icarus/Icarus.vbproj b/Icarus/Icarus.vbproj index d6248b1..194116a 100644 --- a/Icarus/Icarus.vbproj +++ b/Icarus/Icarus.vbproj @@ -323,6 +323,7 @@ + diff --git a/Icarus/SliceManager/SliceManagerVM.vb b/Icarus/SliceManager/SliceManagerVM.vb index 882bc14..1a1e51c 100644 --- a/Icarus/SliceManager/SliceManagerVM.vb +++ b/Icarus/SliceManager/SliceManagerVM.vb @@ -707,9 +707,9 @@ Public Class SliceManagerVM End If End If ' eseguo calcoli - CalcSlice(True, True) + Dim bOk As Boolean = CalcSlice(True, True) ' se non ho interrotto calcoli - If Not m_bStopScriptToManage Then + If bOk AndAlso Not m_bStopScriptToManage Then ' Se esiste l'iso If File.Exists(sIsoFilePath) Then If bShiftPressed Then @@ -810,7 +810,7 @@ Public Class SliceManagerVM zip.AlternateEncoding = Text.Encoding.UTF8 zip.CompressionMethod = CompressionMethod.None ' aggiungo file Iso - zip.AddItem(sIsoFilePath, "") + zip.AddItem(sIsoFilePath, "").FileName = "ProjectSlice" & Path.GetExtension(sIsoFilePath) ' aggiungo file 3mf zip.AddItem(s3mfPath, "") ' aggiungo json @@ -833,11 +833,8 @@ Public Class SliceManagerVM Private Function CreateJson(sJsonPath As String) As Boolean ' creo json - Dim LayerList As New List(Of JsonLayer) - For Each Layer In Map.refTFSEditorVM.LayerList - LayerList.Add(Layer.ConvertToJsonLayer()) - Next - Dim json As String = JsonConvert.SerializeObject(LayerList, Formatting.Indented) + Dim JsonMain As New JsonMain(m_dTime, m_dMass) + Dim json As String = JsonConvert.SerializeObject(JsonMain, Formatting.Indented) If File.Exists(sJsonPath) Then Try File.Delete(sJsonPath) diff --git a/Icarus/TSFEditor/TFSEditorVM.vb b/Icarus/TSFEditor/TFSEditorVM.vb index a4a37bd..f44aca5 100644 --- a/Icarus/TSFEditor/TFSEditorVM.vb +++ b/Icarus/TSFEditor/TFSEditorVM.vb @@ -967,105 +967,3 @@ Public Class TFSLayer End Function End Class - -Public Class JsonLayer - Private m_nIndex As Integer - Public ReadOnly Property Index As Integer - Get - Return m_nIndex - End Get - End Property - - Private m_dLength As Double - Public ReadOnly Property Length As Double - Get - Return m_dLength - End Get - End Property - - Private m_dTMin As Double - Public ReadOnly Property TMin As Double - Get - Return m_dTMin - End Get - End Property - - Private m_dTTrg As Double - Public ReadOnly Property TTrg As Double - Get - Return m_dTTrg - End Get - End Property - - Private m_dTMax As Double - Public ReadOnly Property TMax As Double - Get - Return m_dTMax - End Get - End Property - - Private m_dTCurr As Double - Public ReadOnly Property TCurr As Double - Get - Return m_dTCurr - End Get - End Property - - Private m_dTWait As Double - Public ReadOnly Property TWait As Double - Get - Return m_dTWait - End Get - End Property - - Private m_dFMin As Double - Public ReadOnly Property FMin As Double - Get - Return m_dFMin - End Get - End Property - - Private m_dFTrg As Double - Public ReadOnly Property FTrg As Double - Get - Return m_dFTrg - End Get - End Property - - Private m_dFMax As Double - Public ReadOnly Property FMax As Double - Get - Return m_dFMax - End Get - End Property - - Private m_dFCurr As Double - Public ReadOnly Property FCurr As Double - Get - Return m_dFCurr - End Get - End Property - - Private m_dSpeed As Double - Public ReadOnly Property Speed As Double - Get - Return m_dSpeed - End Get - End Property - - Sub New(nIndex As Integer, dLength As Double, dTMin As Double, dTTrg As Double, dTMax As Double, dTCurr As Double, dTWait As Double, dFMin As Double, dFTrg As Double, dFMax As Double, dFCurr As Double, dSpeed As Double) - m_nIndex = nIndex - m_dLength = dLength - m_dTMin = dTMin - m_dTTrg = dTTrg - m_dTMax = dTMax - m_dTCurr = dTCurr - m_dTWait = dTWait - m_dFMin = dFMin - m_dFTrg = dFTrg - m_dFMax = dFMax - m_dFCurr = dFCurr - m_dSpeed = dSpeed - End Sub - -End Class \ No newline at end of file diff --git a/Icarus/Utility/JsonUtility.vb b/Icarus/Utility/JsonUtility.vb new file mode 100644 index 0000000..3202539 --- /dev/null +++ b/Icarus/Utility/JsonUtility.vb @@ -0,0 +1,191 @@ +Imports EgtUILib.EgtInterface +Imports EgtWPFLib5 + +Public Class JsonMain + + Private m_StrandW As Double + Public ReadOnly Property StrandW As Double + Get + Return m_StrandW + End Get + End Property + + Private m_BoxX As Double + Public ReadOnly Property BoxX As Double + Get + Return m_BoxX + End Get + End Property + + Private m_BoxY As Double + Public ReadOnly Property BoxY As Double + Get + Return m_BoxY + End Get + End Property + + Private m_BoxZ As Double + Public ReadOnly Property BoxZ As Double + Get + Return m_BoxZ + End Get + End Property + + Private m_dTime As Double + Public ReadOnly Property dTime As Double + Get + Return m_dTime + End Get + End Property + + Private m_dMass As Double = 0 + Public ReadOnly Property dMass As Double + Get + Return m_dMass + End Get + End Property + + Private m_LayerQty As Double + Public ReadOnly Property LayerQty As Double + Get + Return m_LayerQty + End Get + End Property + + Private m_MaterialName As String + Public ReadOnly Property MaterialName As String + Get + Return m_MaterialName + End Get + End Property + + Private m_JsonLayerList As New List(Of JsonLayer) + Public ReadOnly Property JsonLayerList As List(Of JsonLayer) + Get + Return m_JsonLayerList + End Get + End Property + + Sub New(dTime As Double, dMass As Double) + For Each Layer In Map.refTFSEditorVM.LayerList + m_JsonLayerList.Add(Layer.ConvertToJsonLayer()) + Next + m_MaterialName = Map.refTopPanelVM.SelMaterial.sName + Dim StrandH As CurrNumericMachiningParam = Map.refCurrMachiningPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.STRANDH) + If Not IsNothing(StrandH) Then + m_StrandW = StrandH.dValue + End If + m_dTime = dTime + m_dMass = dMass + If Not IsNothing(Map.refTopPanelVM.SelPart) Then + Dim b3Print As BBox3d = Map.refDispositionPanelVM.GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart) + m_BoxX = b3Print.DimX + m_BoxY = b3Print.DimY + m_BoxZ = b3Print.DimZ + End If + m_LayerQty = Map.refSliderManagerVM.nLayerIndex_Maximum + End Sub + +End Class + +Public Class JsonLayer + Private m_nIndex As Integer + Public ReadOnly Property Index As Integer + Get + Return m_nIndex + End Get + End Property + + Private m_dLength As Double + Public ReadOnly Property Length As Double + Get + Return m_dLength + End Get + End Property + + Private m_dTMin As Double + Public ReadOnly Property TMin As Double + Get + Return m_dTMin + End Get + End Property + + Private m_dTTrg As Double + Public ReadOnly Property TTrg As Double + Get + Return m_dTTrg + End Get + End Property + + Private m_dTMax As Double + Public ReadOnly Property TMax As Double + Get + Return m_dTMax + End Get + End Property + + Private m_dTCurr As Double + Public ReadOnly Property TCurr As Double + Get + Return m_dTCurr + End Get + End Property + + Private m_dTWait As Double + Public ReadOnly Property TWait As Double + Get + Return m_dTWait + End Get + End Property + + Private m_dFMin As Double + Public ReadOnly Property FMin As Double + Get + Return m_dFMin + End Get + End Property + + Private m_dFTrg As Double + Public ReadOnly Property FTrg As Double + Get + Return m_dFTrg + End Get + End Property + + Private m_dFMax As Double + Public ReadOnly Property FMax As Double + Get + Return m_dFMax + End Get + End Property + + Private m_dFCurr As Double + Public ReadOnly Property FCurr As Double + Get + Return m_dFCurr + End Get + End Property + + Private m_dSpeed As Double + Public ReadOnly Property Speed As Double + Get + Return m_dSpeed + End Get + End Property + + Sub New(nIndex As Integer, dLength As Double, dTMin As Double, dTTrg As Double, dTMax As Double, dTCurr As Double, dTWait As Double, dFMin As Double, dFTrg As Double, dFMax As Double, dFCurr As Double, dSpeed As Double) + m_nIndex = nIndex + m_dLength = dLength + m_dTMin = dTMin + m_dTTrg = dTTrg + m_dTMax = dTMax + m_dTCurr = dTCurr + m_dTWait = dTWait + m_dFMin = dFMin + m_dFTrg = dFTrg + m_dFMax = dFMax + m_dFCurr = dFCurr + m_dSpeed = dSpeed + End Sub + +End Class \ No newline at end of file From c1aee47e534d1665a15fb2f57f821ac283628752 Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Fri, 13 Oct 2023 15:40:38 +0200 Subject: [PATCH 04/53] - aggiunto StrandH in json e corretto valore strandW --- Icarus/Utility/JsonUtility.vb | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Icarus/Utility/JsonUtility.vb b/Icarus/Utility/JsonUtility.vb index 3202539..94b3427 100644 --- a/Icarus/Utility/JsonUtility.vb +++ b/Icarus/Utility/JsonUtility.vb @@ -10,6 +10,13 @@ Public Class JsonMain End Get End Property + Private m_StrandH As Double + Public ReadOnly Property StrandH As Double + Get + Return m_StrandH + End Get + End Property + Private m_BoxX As Double Public ReadOnly Property BoxX As Double Get @@ -71,9 +78,16 @@ Public Class JsonMain m_JsonLayerList.Add(Layer.ConvertToJsonLayer()) Next m_MaterialName = Map.refTopPanelVM.SelMaterial.sName - Dim StrandH As CurrNumericMachiningParam = Map.refCurrMachiningPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.STRANDH) - If Not IsNothing(StrandH) Then - m_StrandW = StrandH.dValue + Dim GeneralCathegory As MachiningCathegory = Map.refCurrMachiningPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL) + If Not IsNothing(GeneralCathegory) Then + Dim StrandW As CurrNumericMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.STRANDW) + Dim StrandH As CurrNumericMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.STRANDH) + If Not IsNothing(StrandW) Then + m_StrandW = StrandW.dValue + End If + If Not IsNothing(StrandH) Then + m_StrandH = StrandH.dValue + End If End If m_dTime = dTime m_dMass = dMass From 27a54b00348471c98fc5356a1a3be771e53abb37 Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Tue, 24 Oct 2023 11:03:04 +0200 Subject: [PATCH 05/53] - modifiche per nuova esportazione 3mf --- Icarus/SceneHost/MySceneHostVM.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Icarus/SceneHost/MySceneHostVM.vb b/Icarus/SceneHost/MySceneHostVM.vb index 4893818..92881d4 100644 --- a/Icarus/SceneHost/MySceneHostVM.vb +++ b/Icarus/SceneHost/MySceneHostVM.vb @@ -685,8 +685,8 @@ Public Class MySceneHostVM Public Function ExportProjectForMachine(sFilePath As String) As Boolean ' Reset controller e scena MainController.ResetStatus() - MainController.SetDefaultFilterForExport(EEX_FLT.DEFAULT + EEX_FLT.LEV_TEMP) - Return MainController.ExportProject(sFilePath, False) + MainController.SetDefaultFilterForExport(EEX_FLT.MODE_HIDDEN + EEX_FLT.MODE_STD + EEX_FLT.STAT_ON + EEX_FLT.STAT_OFF + EEX_FLT.LEV_TEMP) + Return MainController.ExportGeomId(Map.refTopPanelVM.SelPart.nPartId, sFilePath, False) End Function Public Overrides Function ExecScript(sFilePath As String) As Boolean From da0bcbac69962db6ad6420aa699f6ff3500422dc Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 13 Nov 2023 16:25:46 +0100 Subject: [PATCH 06/53] Icarus 2.5k1 : - tolta perdita fuoco da edit quando si passa sopra finestra grafica - sostituito Ionic.zip con DotNetZip - in feedback ora solo file con il nome del progetto oltre a macchina e log. --- Icarus/Icarus.vbproj | 6 +++--- Icarus/MainWindow/MainWindowM.vb | 4 ++-- Icarus/My Project/AssemblyInfo.vb | 4 ++-- Icarus/OptionsWindow/OptionWindowVM.vb | 2 ++ Icarus/ProjManager/ProjManagerVM.vb | 17 +++++++---------- Icarus/SceneHost/MySceneHostVM.vb | 2 ++ 6 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Icarus/Icarus.vbproj b/Icarus/Icarus.vbproj index ce431f1..c2d8dc4 100644 --- a/Icarus/Icarus.vbproj +++ b/Icarus/Icarus.vbproj @@ -76,6 +76,9 @@ true + + ..\..\..\EgtProg\Icarus\DotNetZip.dll + False ..\..\..\EgtProg\DllD32\EgtUILib.dll @@ -84,9 +87,6 @@ False ..\..\..\EgtProg\DllD32\EgtWPFLib5.dll - - ..\packages\Ionic.Zip.1.9.1.8\lib\Ionic.Zip.dll - diff --git a/Icarus/MainWindow/MainWindowM.vb b/Icarus/MainWindow/MainWindowM.vb index 7815f54..1cf2dfd 100644 --- a/Icarus/MainWindow/MainWindowM.vb +++ b/Icarus/MainWindow/MainWindowM.vb @@ -191,8 +191,8 @@ Public Class MainWindowM EgtSetLockId( sLockId) End If ' Recupero livello e opzioni della chiave - Dim bKey As Boolean = EgtGetKeyLevel(5583, 2510, 1, m_nKeyLevel) And - EgtGetKeyOptions(5583, 2510, 1, m_nKeyOptions) + Dim bKey As Boolean = EgtGetKeyLevel(5583, 2511, 1, m_nKeyLevel) And + EgtGetKeyOptions(5583, 2511, 1, m_nKeyOptions) ' Inizializzazione generale di EgtInterface m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString()) diff --git a/Icarus/My Project/AssemblyInfo.vb b/Icarus/My Project/AssemblyInfo.vb index dc5eac4..c0c6f0f 100644 --- a/Icarus/My Project/AssemblyInfo.vb +++ b/Icarus/My Project/AssemblyInfo.vb @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/Icarus/OptionsWindow/OptionWindowVM.vb b/Icarus/OptionsWindow/OptionWindowVM.vb index 29ff9ab..263ce9b 100644 --- a/Icarus/OptionsWindow/OptionWindowVM.vb +++ b/Icarus/OptionsWindow/OptionWindowVM.vb @@ -1093,6 +1093,8 @@ Public Class OptionWindowVM End If Try Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out) + zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always + zip.AlternateEncoding = Text.Encoding.UTF8 ' aggiungo i file della Macchina Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sCurrMachineName If Directory.Exists(sMachineDir) Then diff --git a/Icarus/ProjManager/ProjManagerVM.vb b/Icarus/ProjManager/ProjManagerVM.vb index e60b20a..59e1eb1 100644 --- a/Icarus/ProjManager/ProjManagerVM.vb +++ b/Icarus/ProjManager/ProjManagerVM.vb @@ -393,14 +393,6 @@ Public Class ProjManagerVM End If End If End If - ' Verifico se il progetto corrente è una porta - Dim nPartId As Integer = EgtGetFirstPart() - If nPartId = GDB_ID.NULL Then - nPartId = EgtGetFirstPartInRawPart(EgtGetFirstRawPart()) - End If - Dim sPartName As String = String.Empty - EgtGetName(nPartId, sPartName) - Dim bPrjIsDoor As Boolean = (String.Compare(sPartName, "DOOR") = 0) ' Recupero macchine dei gruppi di lavoro del progetto Dim Machines As New List(Of String) Dim nMchGrpId As Integer = EgtGetFirstMachGroup() @@ -417,9 +409,12 @@ Public Class ProjManagerVM If Not String.IsNullOrWhiteSpace(sCurrProject) Then Dim sCurrProjectDir As String = Path.GetDirectoryName(sCurrProject) If Not String.IsNullOrWhiteSpace(sCurrProjectDir) Then + Dim sCurrProjName As String = Path.GetFileNameWithoutExtension(sCurrProject).ToUpper() Dim TempFiles() As String = Directory.GetFiles(sCurrProjectDir) For FileIndex = 0 To TempFiles.Count - 1 - If Path.GetFileNameWithoutExtension(TempFiles(FileIndex)).Contains(Path.GetFileNameWithoutExtension(sCurrProject)) AndAlso TempFiles(FileIndex) <> sCurrProject Then + If TempFiles(FileIndex) = sCurrProject Then Continue For + Dim sCurrFileName As String = Path.GetFileNameWithoutExtension( TempFiles(FileIndex)).ToUpper() + If String.Compare(sCurrFileName, sCurrProjName) = 0 Then OtherFiles.Add(TempFiles(FileIndex)) End If Next @@ -432,11 +427,13 @@ Public Class ProjManagerVM End If Try Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out) + zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always + zip.AlternateEncoding = Text.Encoding.UTF8 ' aggiungo file macchine For Each sMachineName As String In Machines Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sMachineName If Directory.Exists(sMachineDir) Then - zip.AddItem(sMachineDir, sMachineName) + zip.AddSelectedFiles( "name != *\.git\*.* and name != *.git*", sMachineDir, sMachineName, True) End If Next ' aggiungo progetto corrente diff --git a/Icarus/SceneHost/MySceneHostVM.vb b/Icarus/SceneHost/MySceneHostVM.vb index 6bc97fb..f853bfb 100644 --- a/Icarus/SceneHost/MySceneHostVM.vb +++ b/Icarus/SceneHost/MySceneHostVM.vb @@ -71,6 +71,8 @@ Public Class MySceneHostVM ' Se tutto bene If MainScene.Init() And Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.BASE) Then PostInitializeScene() + ' Non imposto automaticamente il focus sulla scena muovendo il mouse sopra di essa (necessario click) + MainScene.SetFocusOnMove( False) ' Imposto stato gestione mouse diretto della scena a nessuno MainScene.SetStatusNull() EgtSetCurrentContext(MainScene.GetCtx()) From 109feeb6f725380f79cd6fe6ca6635f1da06b50e Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 13 Nov 2023 16:56:23 +0100 Subject: [PATCH 07/53] Icarus : - in import aggiunto ai tipi di file da visualizzare tutti quelli importati. --- Icarus/SceneHost/MySceneHostVM.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/Icarus/SceneHost/MySceneHostVM.vb b/Icarus/SceneHost/MySceneHostVM.vb index f853bfb..9d2f9ad 100644 --- a/Icarus/SceneHost/MySceneHostVM.vb +++ b/Icarus/SceneHost/MySceneHostVM.vb @@ -349,6 +349,7 @@ Public Class MySceneHostVM "|Step files (*.stp;*.step)|*.stp;*.step" & "|3D Manufacturing format (*.3mf)|*.3mf" & "|New geometry EgalTech(*.nge)|*.nge" & + "|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" & "|All Files (*.*)|*.*", .FilterIndex = ExtIndex, .InitialDirectory = sDir} From 12081cec286176e5b9067a1fa81cf6eb1c57a0b6 Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Tue, 19 Dec 2023 14:57:46 +0100 Subject: [PATCH 08/53] - modifiche per export del 3dm per la macchina --- Icarus/SceneHost/MySceneHostVM.vb | 13 +++++++++++++ Icarus/SliceManager/SliceManagerVM.vb | 20 ++++++++++++++++---- Icarus/Utility/LuaExec.vb | 14 ++++++++++++++ 3 files changed, 43 insertions(+), 4 deletions(-) diff --git a/Icarus/SceneHost/MySceneHostVM.vb b/Icarus/SceneHost/MySceneHostVM.vb index 92881d4..ac3500e 100644 --- a/Icarus/SceneHost/MySceneHostVM.vb +++ b/Icarus/SceneHost/MySceneHostVM.vb @@ -688,6 +688,19 @@ Public Class MySceneHostVM MainController.SetDefaultFilterForExport(EEX_FLT.MODE_HIDDEN + EEX_FLT.MODE_STD + EEX_FLT.STAT_ON + EEX_FLT.STAT_OFF + EEX_FLT.LEV_TEMP) Return MainController.ExportGeomId(Map.refTopPanelVM.SelPart.nPartId, sFilePath, False) End Function + Public Function ExportProjectForMachine(sDirPath As String, b3dm As Boolean, ByRef sFilePath As String) As Boolean + sFilePath = sDirPath & "\ProjectSlice" & If(b3dm, ".3dm", ".3mf") + ' Reset controller e scena + MainController.ResetStatus() + MainController.SetDefaultFilterForExport(EEX_FLT.MODE_HIDDEN + EEX_FLT.MODE_STD + EEX_FLT.STAT_ON + EEX_FLT.STAT_OFF + EEX_FLT.LEV_TEMP) + Dim nExportGeomId As Integer = 0 + If b3dm Then + If Not ExecPrepare3dmExport(nExportGeomId) Then Return False + Else + nExportGeomId = Map.refTopPanelVM.SelPart.nPartId + End If + Return MainController.ExportGeomId(nExportGeomId, sFilePath, False) + End Function Public Overrides Function ExecScript(sFilePath As String) As Boolean Dim bOk As Boolean = False diff --git a/Icarus/SliceManager/SliceManagerVM.vb b/Icarus/SliceManager/SliceManagerVM.vb index 1a1e51c..7df29b0 100644 --- a/Icarus/SliceManager/SliceManagerVM.vb +++ b/Icarus/SliceManager/SliceManagerVM.vb @@ -775,12 +775,24 @@ Public Class SliceManagerVM If IsNothing(SolidCheck.bIsVisible) OrElse Not SolidCheck.bIsVisible Then SolidCheck.bIsVisible = True End If - ' esporto file 3mf - Dim s3mfPath As String = sExportTempFolderPath & "\ProjectSlice.3mf" - If Not Map.refSceneHostVM.ExportProjectForMachine(s3mfPath) Then + ' esporto file progetto + Dim sFileExtension As String + If True Then + sFileExtension = ".3dm" + Else + sFileExtension = ".3mf" + End If + Dim s3dFilePath As String = "" + If Not Map.refSceneHostVM.ExportProjectForMachine(sExportTempFolderPath, True, s3dFilePath) Then EgtOutLog("Error! Impossible exporting 3mf file!") Return False End If + '' esporto file 3mf + 'Dim s3mfPath As String = sExportTempFolderPath & "\ProjectSlice.3mf" + 'If Not Map.refSceneHostVM.ExportProjectForMachine(s3mfPath) Then + ' EgtOutLog("Error! Impossible exporting 3mf file!") + ' Return False + 'End If ' creo file json Dim sProjName As String = "" EgtGetCurrFilePath(sProjName) @@ -812,7 +824,7 @@ Public Class SliceManagerVM ' aggiungo file Iso zip.AddItem(sIsoFilePath, "").FileName = "ProjectSlice" & Path.GetExtension(sIsoFilePath) ' aggiungo file 3mf - zip.AddItem(s3mfPath, "") + zip.AddItem(s3dFilePath, "") ' aggiungo json zip.AddItem(sJsonPath, "") ' aggiungo immagine preview diff --git a/Icarus/Utility/LuaExec.vb b/Icarus/Utility/LuaExec.vb index 59f41e2..7b3c583 100644 --- a/Icarus/Utility/LuaExec.vb +++ b/Icarus/Utility/LuaExec.vb @@ -115,4 +115,18 @@ Module LuaExec Return bOk End Function + Friend Function ExecPrepare3dmExport(ByRef nExportGeomId As Integer) As Boolean + Dim bOk As Boolean = True + EgtLuaCreateGlobTable("PRINT") + EgtLuaSetGlobStringVar("PRINT.BASEDIR", Map.refMainWindowVM.MainWindowM.s3dPrintingDir) + bOk = EgtLuaExecFile(Map.refMainWindowVM.MainWindowM.s3dPrintingDir & "\PrepareExport.lua") + If bOk Then + EgtLuaGetGlobIntVar("PRINT.EXPORTLAYER", nExportGeomId) + End If + ' Cancello tavola globale + EgtLuaResetGlobVar("PRINT") + Return bOk + End Function + + End Module From 4d379787893544d41027ea53278b55576ed2e6ae Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 9 Jan 2024 17:31:08 +0100 Subject: [PATCH 09/53] Icarus 2.5l1 : - modifiche per gestione griglia come tavola / standard. --- Icarus/FilledSolidPanel/FilledSolidPanelVM.vb | 85 ++----------------- Icarus/MachiningDb/Machining.vb | 1 + Icarus/MainWindow/MainWindowM.vb | 4 +- Icarus/My Project/AssemblyInfo.vb | 4 +- Icarus/OptionsWindow/OptionModule.vb | 15 ++++ Icarus/RibPanel/RibPanelVM.vb | 85 ++----------------- Icarus/SceneHost/MySceneHostVM.vb | 28 +++--- Icarus/ShellNumberPanel/ShellNumberPanelVM.vb | 85 ++----------------- Icarus/SimulationPanel/SimulationPanelVM.vb | 2 +- Icarus/StartMachPanel/StartMachPanelVM.vb | 9 ++ Icarus/StatusBar/MyStatusBarVM.vb | 6 +- Icarus/Utility/CurrentMachine.vb | 6 +- 12 files changed, 78 insertions(+), 252 deletions(-) diff --git a/Icarus/FilledSolidPanel/FilledSolidPanelVM.vb b/Icarus/FilledSolidPanel/FilledSolidPanelVM.vb index ab5e31c..83b40b9 100644 --- a/Icarus/FilledSolidPanel/FilledSolidPanelVM.vb +++ b/Icarus/FilledSolidPanel/FilledSolidPanelVM.vb @@ -595,6 +595,7 @@ Public Class FilledSolidPanelVM Friend Sub Dispose() ' ripristino frame originale EgtSetGridFrame(m_OriginalGridFrame) + EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY()) ' se in modifica parametri If m_bMachParam_IsChecked Then ' ripristino modalita' standard @@ -1075,6 +1076,7 @@ Public Class FilledSolidPanelVM ''' Public Sub CPlaneTop(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY()) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -1100,6 +1102,7 @@ Public Class FilledSolidPanelVM ''' Public Sub CPlaneFront(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -1125,6 +1128,7 @@ Public Class FilledSolidPanelVM ''' Public Sub CPlaneRight(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -1150,6 +1154,7 @@ Public Class FilledSolidPanelVM ''' Public Sub CPlaneBack(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -1175,6 +1180,7 @@ Public Class FilledSolidPanelVM ''' Public Sub CPlaneLeft(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -1200,6 +1206,7 @@ Public Class FilledSolidPanelVM ''' Public Sub CPlaneBottom(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -1226,6 +1233,7 @@ Public Class FilledSolidPanelVM Public Sub CPlaneElevation(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return ManageInterface(False) + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION) End Sub @@ -1251,87 +1259,12 @@ Public Class FilledSolidPanelVM Public Sub CPlaneOrigin(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return ManageInterface(False) + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN) End Sub #End Region ' CPlaneOrigin -#Region "CPlaneRotate" - - ''' - ''' Returns a command that do CPlaneRotate. - ''' - Public ReadOnly Property CPlaneRotate_Command As ICommand - Get - If m_cmdCPlaneRotate Is Nothing Then - m_cmdCPlaneRotate = New Command(AddressOf CPlaneRotate) - End If - Return m_cmdCPlaneRotate - End Get - End Property - - ''' - ''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand. - ''' - Public Sub CPlaneRotate(ByVal param As Object) - If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return - If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then - Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE) - Else - Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE3D) - End If - End Sub - -#End Region ' CPlaneRotate - -#Region "CPlane3P" - - ''' - ''' Returns a command that do CPlane3P. - ''' - Public ReadOnly Property CPlane3P_Command As ICommand - Get - If m_cmdCPlane3P Is Nothing Then - m_cmdCPlane3P = New Command(AddressOf CPlane3P) - End If - Return m_cmdCPlane3P - End Get - End Property - - ''' - ''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand. - ''' - Public Sub CPlane3P(ByVal param As Object) - If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return - Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_3P) - End Sub - -#End Region ' CPlane3P - -#Region "CPlanePerpObj" - - ''' - ''' Returns a command that do CPlanePerpObj. - ''' - Public ReadOnly Property CPlanePerpObj_Command As ICommand - Get - If m_cmdCPlanePerpObj Is Nothing Then - m_cmdCPlanePerpObj = New Command(AddressOf CPlanePerpObj) - End If - Return m_cmdCPlanePerpObj - End Get - End Property - - ''' - ''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand. - ''' - Public Sub CPlanePerpObj(ByVal param As Object) - If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return - Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_PERPCURVE) - End Sub - -#End Region ' CPlanePerpObj - #Region "CPlaneObj" Private m_bCPlaneObj_IsActive As Boolean = False diff --git a/Icarus/MachiningDb/Machining.vb b/Icarus/MachiningDb/Machining.vb index 5beaf5b..9224adf 100644 --- a/Icarus/MachiningDb/Machining.vb +++ b/Icarus/MachiningDb/Machining.vb @@ -956,6 +956,7 @@ Public Class NumericMachiningParam If Type = Params.SLICINGHEIGHT Then m_dMinValue = 0 m_dMaxValue = CurrentMachine.dSlicingMaxHeight + m_MinMaxType = MinMaxTypes.ABSOLUT m_bIsActiveMinMax = True End If ' leggo parametri da Db diff --git a/Icarus/MainWindow/MainWindowM.vb b/Icarus/MainWindow/MainWindowM.vb index 1cf2dfd..05ceb28 100644 --- a/Icarus/MainWindow/MainWindowM.vb +++ b/Icarus/MainWindow/MainWindowM.vb @@ -191,8 +191,8 @@ Public Class MainWindowM EgtSetLockId( sLockId) End If ' Recupero livello e opzioni della chiave - Dim bKey As Boolean = EgtGetKeyLevel(5583, 2511, 1, m_nKeyLevel) And - EgtGetKeyOptions(5583, 2511, 1, m_nKeyOptions) + Dim bKey As Boolean = EgtGetKeyLevel(5583, 2512, 1, m_nKeyLevel) And + EgtGetKeyOptions(5583, 2512, 1, m_nKeyOptions) ' Inizializzazione generale di EgtInterface m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString()) diff --git a/Icarus/My Project/AssemblyInfo.vb b/Icarus/My Project/AssemblyInfo.vb index c0c6f0f..ba68205 100644 --- a/Icarus/My Project/AssemblyInfo.vb +++ b/Icarus/My Project/AssemblyInfo.vb @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/Icarus/OptionsWindow/OptionModule.vb b/Icarus/OptionsWindow/OptionModule.vb index e827d44..b2445af 100644 --- a/Icarus/OptionsWindow/OptionModule.vb +++ b/Icarus/OptionsWindow/OptionModule.vb @@ -43,6 +43,14 @@ Friend Module OptionModule Friend m_sFont As String Friend m_dTextHeight As Double + ' Parametri per la griglia + Friend m_bGridVisibility As Boolean + Friend m_dSnapStepMm As Double + Friend m_dSnapStepInch As Double + Friend m_nMinLineSStep As Integer + Friend m_nMajLineSStep As Integer + Friend m_nExtSStep As Integer + ' Variabili che indicano per ogni tipo di lavorazione quale geometria è selezionabile 'Friend m_SelGeomSawing As SceneSelModeOpt 'Friend m_SelGeomDrilling As SceneSelModeOpt @@ -108,6 +116,13 @@ Friend Module OptionModule ' Inizializzo variabili per import m_dDxfScaleFactor = GetMainPrivateProfileDouble(S_IMPORT, K_DXFSCALE, 1) m_dStlScaleFactor = GetMainPrivateProfileDouble(S_IMPORT, K_STLSCALE, 1) + ' Inizializzo parametri griglia + m_bGridVisibility = (GetMainPrivateProfileInt(S_GRID, K_SHOWGRID, 1) <> 0) + m_dSnapStepMm = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEP, 10) + m_dSnapStepInch = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEPINCH, 12.7) + m_nMinLineSStep = GetMainPrivateProfileInt(S_GRID, K_MINLINESSTEP, 1) + m_nMajLineSStep = GetMainPrivateProfileInt(S_GRID, K_MAJLINESSTEP, 10) + m_nExtSStep = GetMainPrivateProfileInt(S_GRID, K_EXTSSTEP, 100) End Sub End Module \ No newline at end of file diff --git a/Icarus/RibPanel/RibPanelVM.vb b/Icarus/RibPanel/RibPanelVM.vb index 8c0104d..6f48445 100644 --- a/Icarus/RibPanel/RibPanelVM.vb +++ b/Icarus/RibPanel/RibPanelVM.vb @@ -620,6 +620,7 @@ Public Class RibPanelVM Friend Sub Dispose() ' ripristino frame originale EgtSetGridFrame(m_OriginalGridFrame) + EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY()) ' se in modifica parametri If m_bMachParam_IsChecked Then ' ripristino modalita' standard @@ -1096,6 +1097,7 @@ Public Class RibPanelVM ''' Public Sub CPlaneTop(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY()) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -1121,6 +1123,7 @@ Public Class RibPanelVM ''' Public Sub CPlaneFront(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -1146,6 +1149,7 @@ Public Class RibPanelVM ''' Public Sub CPlaneRight(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -1171,6 +1175,7 @@ Public Class RibPanelVM ''' Public Sub CPlaneBack(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -1196,6 +1201,7 @@ Public Class RibPanelVM ''' Public Sub CPlaneLeft(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -1221,6 +1227,7 @@ Public Class RibPanelVM ''' Public Sub CPlaneBottom(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -1247,6 +1254,7 @@ Public Class RibPanelVM Public Sub CPlaneElevation(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return ManageInterface(False) + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION) End Sub @@ -1272,87 +1280,12 @@ Public Class RibPanelVM Public Sub CPlaneOrigin(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return ManageInterface(False) + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN) End Sub #End Region ' CPlaneOrigin -#Region "CPlaneRotate" - - ''' - ''' Returns a command that do CPlaneRotate. - ''' - Public ReadOnly Property CPlaneRotate_Command As ICommand - Get - If m_cmdCPlaneRotate Is Nothing Then - m_cmdCPlaneRotate = New Command(AddressOf CPlaneRotate) - End If - Return m_cmdCPlaneRotate - End Get - End Property - - ''' - ''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand. - ''' - Public Sub CPlaneRotate(ByVal param As Object) - If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return - If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then - Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE) - Else - Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE3D) - End If - End Sub - -#End Region ' CPlaneRotate - -#Region "CPlane3P" - - ''' - ''' Returns a command that do CPlane3P. - ''' - Public ReadOnly Property CPlane3P_Command As ICommand - Get - If m_cmdCPlane3P Is Nothing Then - m_cmdCPlane3P = New Command(AddressOf CPlane3P) - End If - Return m_cmdCPlane3P - End Get - End Property - - ''' - ''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand. - ''' - Public Sub CPlane3P(ByVal param As Object) - If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return - Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_3P) - End Sub - -#End Region ' CPlane3P - -#Region "CPlanePerpObj" - - ''' - ''' Returns a command that do CPlanePerpObj. - ''' - Public ReadOnly Property CPlanePerpObj_Command As ICommand - Get - If m_cmdCPlanePerpObj Is Nothing Then - m_cmdCPlanePerpObj = New Command(AddressOf CPlanePerpObj) - End If - Return m_cmdCPlanePerpObj - End Get - End Property - - ''' - ''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand. - ''' - Public Sub CPlanePerpObj(ByVal param As Object) - If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return - Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_PERPCURVE) - End Sub - -#End Region ' CPlanePerpObj - #Region "CPlaneObj" Private m_bCPlaneObj_IsActive As Boolean = False diff --git a/Icarus/SceneHost/MySceneHostVM.vb b/Icarus/SceneHost/MySceneHostVM.vb index 9d2f9ad..ef18cf9 100644 --- a/Icarus/SceneHost/MySceneHostVM.vb +++ b/Icarus/SceneHost/MySceneHostVM.vb @@ -72,7 +72,7 @@ Public Class MySceneHostVM If MainScene.Init() And Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.BASE) Then PostInitializeScene() ' Non imposto automaticamente il focus sulla scena muovendo il mouse sopra di essa (necessario click) - MainScene.SetFocusOnMove( False) + MainScene.SetFocusOnMove( True, 0.3, 0.3, 0.1, 0.2) ' Imposto stato gestione mouse diretto della scena a nessuno MainScene.SetStatusNull() EgtSetCurrentContext(MainScene.GetCtx()) @@ -188,33 +188,23 @@ Public Class MySceneHostVM Private Sub PostInitializeScene() ' Impostazioni Controller MainController.SetScene(MainScene) - MainController.SetSurfTmTolerance(0.05) + MainController.SetSurfTmTolerance(OptionModule.m_dGeometryTolerance) MainController.SetUseCustomColors(True, S_SCENE, K_CUSTOMCOLORS) ' imposto unità di misura per interfaccia utente Dim bMmUnits As Boolean = GetMainPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0 EgtSetUiUnits(bMmUnits) - 'Map.refMyStatusBarVM.SetMeasureUnit(nMeasureUnit <> 0) ' imposto visualizzazione riferimento globale EgtSetGlobFrameShow(True) ' imposto i dati della griglia - Dim bGridVisibility As Boolean = (GetMainPrivateProfileInt(S_GRID, K_SHOWGRID, 1) <> 0) - Dim dSnapStepMm As Double = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEP, 10) - Dim dSnapStepInch As Double = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEPINCH, 10) - Dim nMinLineSStep As Integer = GetMainPrivateProfileInt(S_GRID, K_MINLINESSTEP, 1) - Dim nMajLineSStep As Integer = GetMainPrivateProfileInt(S_GRID, K_MAJLINESSTEP, 10) - Dim nExtSStep As Integer = GetMainPrivateProfileInt(S_GRID, K_EXTSSTEP, 50) Dim MinLnColor As Color3d = New Color3d(160, 160, 160) GetMainPrivateProfileColor(S_GRID, K_MINLNCOLOR, MinLnColor) Dim MajLnColor As Color3d = New Color3d(160, 160, 160) GetMainPrivateProfileColor(S_GRID, K_MAJLNCOLOR, MajLnColor) EgtSetGridFrame(Frame3d.GLOB) - If bMmUnits Then - EgtSetGridGeo(dSnapStepMm, nMinLineSStep, nMajLineSStep, nExtSStep) - Else - EgtSetGridGeo(dSnapStepInch, nMinLineSStep, nMajLineSStep, nExtSStep) - End If + EgtSetGridGeo( If( bMmUnits, OptionModule.m_dSnapStepMm, OptionModule.m_dSnapStepInch), + OptionModule.m_nMinLineSStep, OptionModule.m_nMajLineSStep, OptionModule.m_nExtSStep) EgtSetGridColor(MinLnColor, MajLnColor) - EgtSetGridShow(bGridVisibility, bGridVisibility) + EgtSetGridShow(OptionModule.m_bGridVisibility, OptionModule.m_bGridVisibility) ' imposto tipo coordinate MainScene.SetGridCursorPos(True) ' visualizzazione avanzata dei triangoli costituenti le superfici @@ -1491,6 +1481,8 @@ Public Class MySceneHostVM ' eseguo comando Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ) Map.refStartMachPanelVM.ResetCPlaneObjIsActive() + ' imposto dimensioni griglia standard (non tavola) + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) ' ripristino selezioni precedenti For Each Id In Map.refStartMachPanelVM.PrevSelObjs EgtSelectObj(Id) @@ -1575,6 +1567,8 @@ Public Class MySceneHostVM ' eseguo comando Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ) Map.refRibPanelVM.ResetCPlaneObjIsActive() + ' imposto dimensioni griglia standard (non tavola) + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) ' ripristino selezioni precedenti For Each Id In Map.refRibPanelVM.PrevSelObjs EgtSelectObj(Id) @@ -1660,6 +1654,8 @@ Public Class MySceneHostVM ' eseguo comando Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ) Map.refShellNumberPanelVM.ResetCPlaneObjIsActive() + ' imposto dimensioni griglia standard (non tavola) + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) ' ripristino selezioni precedenti For Each Id In Map.refShellNumberPanelVM.PrevSelObjs EgtSelectObj(Id) @@ -1745,6 +1741,8 @@ Public Class MySceneHostVM ' eseguo comando Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ) Map.refFilledSolidPanelVM.ResetCPlaneObjIsActive() + ' imposto dimensioni griglia standard (non tavola) + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) ' ripristino selezioni precedenti For Each Id In Map.refFilledSolidPanelVM.PrevSelObjs EgtSelectObj(Id) diff --git a/Icarus/ShellNumberPanel/ShellNumberPanelVM.vb b/Icarus/ShellNumberPanel/ShellNumberPanelVM.vb index 2fa779c..b3f9f82 100644 --- a/Icarus/ShellNumberPanel/ShellNumberPanelVM.vb +++ b/Icarus/ShellNumberPanel/ShellNumberPanelVM.vb @@ -600,6 +600,7 @@ Public Class ShellNumberPanelVM Friend Sub Dispose() ' ripristino frame originale EgtSetGridFrame(m_OriginalGridFrame) + EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY()) ' se in modifica parametri If m_bMachParam_IsChecked Then ' ripristino modalita' standard @@ -1081,6 +1082,7 @@ Public Class ShellNumberPanelVM ''' Public Sub CPlaneTop(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY()) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -1106,6 +1108,7 @@ Public Class ShellNumberPanelVM ''' Public Sub CPlaneFront(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -1131,6 +1134,7 @@ Public Class ShellNumberPanelVM ''' Public Sub CPlaneRight(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -1156,6 +1160,7 @@ Public Class ShellNumberPanelVM ''' Public Sub CPlaneBack(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -1181,6 +1186,7 @@ Public Class ShellNumberPanelVM ''' Public Sub CPlaneLeft(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -1206,6 +1212,7 @@ Public Class ShellNumberPanelVM ''' Public Sub CPlaneBottom(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -1232,6 +1239,7 @@ Public Class ShellNumberPanelVM Public Sub CPlaneElevation(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return ManageInterface(False) + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION) End Sub @@ -1257,87 +1265,12 @@ Public Class ShellNumberPanelVM Public Sub CPlaneOrigin(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return ManageInterface(False) + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN) End Sub #End Region ' CPlaneOrigin -#Region "CPlaneRotate" - - ''' - ''' Returns a command that do CPlaneRotate. - ''' - Public ReadOnly Property CPlaneRotate_Command As ICommand - Get - If m_cmdCPlaneRotate Is Nothing Then - m_cmdCPlaneRotate = New Command(AddressOf CPlaneRotate) - End If - Return m_cmdCPlaneRotate - End Get - End Property - - ''' - ''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand. - ''' - Public Sub CPlaneRotate(ByVal param As Object) - If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return - If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then - Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE) - Else - Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE3D) - End If - End Sub - -#End Region ' CPlaneRotate - -#Region "CPlane3P" - - ''' - ''' Returns a command that do CPlane3P. - ''' - Public ReadOnly Property CPlane3P_Command As ICommand - Get - If m_cmdCPlane3P Is Nothing Then - m_cmdCPlane3P = New Command(AddressOf CPlane3P) - End If - Return m_cmdCPlane3P - End Get - End Property - - ''' - ''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand. - ''' - Public Sub CPlane3P(ByVal param As Object) - If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return - Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_3P) - End Sub - -#End Region ' CPlane3P - -#Region "CPlanePerpObj" - - ''' - ''' Returns a command that do CPlanePerpObj. - ''' - Public ReadOnly Property CPlanePerpObj_Command As ICommand - Get - If m_cmdCPlanePerpObj Is Nothing Then - m_cmdCPlanePerpObj = New Command(AddressOf CPlanePerpObj) - End If - Return m_cmdCPlanePerpObj - End Get - End Property - - ''' - ''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand. - ''' - Public Sub CPlanePerpObj(ByVal param As Object) - If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return - Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_PERPCURVE) - End Sub - -#End Region ' CPlanePerpObj - #Region "CPlaneObj" Private m_bCPlaneObj_IsActive As Boolean = False diff --git a/Icarus/SimulationPanel/SimulationPanelVM.vb b/Icarus/SimulationPanel/SimulationPanelVM.vb index 29d33b5..0f16595 100644 --- a/Icarus/SimulationPanel/SimulationPanelVM.vb +++ b/Icarus/SimulationPanel/SimulationPanelVM.vb @@ -147,7 +147,7 @@ Public Class SimulationPanelVM ' Abilito impostazione modificato EgtEnableModified() ' Ripristino vista griglia - EgtSetGridShow(True, True) + EgtSetGridShow(OptionModule.m_bGridVisibility, OptionModule.m_bGridVisibility) ' Cambio la vista della scena EgtSetGenericView(m_dPrevAngVertDegView, m_dPrevAngHorizDegView, False) EgtZoom(ZM.ALL) diff --git a/Icarus/StartMachPanel/StartMachPanelVM.vb b/Icarus/StartMachPanel/StartMachPanelVM.vb index b8659e3..f130688 100644 --- a/Icarus/StartMachPanel/StartMachPanelVM.vb +++ b/Icarus/StartMachPanel/StartMachPanelVM.vb @@ -484,6 +484,7 @@ Public Class StartMachPanelVM Friend Sub Dispose() ' ripristino frame originale EgtSetGridFrame(m_OriginalGridFrame) + EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY()) EgtDeselectAll() EgtDraw() Map.refSceneHostVM.MainScene.SetStatusNull() @@ -779,6 +780,7 @@ Public Class StartMachPanelVM ''' Public Sub CPlaneTop(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY()) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -804,6 +806,7 @@ Public Class StartMachPanelVM ''' Public Sub CPlaneFront(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -829,6 +832,7 @@ Public Class StartMachPanelVM ''' Public Sub CPlaneRight(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -854,6 +858,7 @@ Public Class StartMachPanelVM ''' Public Sub CPlaneBack(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -879,6 +884,7 @@ Public Class StartMachPanelVM ''' Public Sub CPlaneLeft(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -904,6 +910,7 @@ Public Class StartMachPanelVM ''' Public Sub CPlaneBottom(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) End Sub @@ -930,6 +937,7 @@ Public Class StartMachPanelVM Public Sub CPlaneElevation(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return ManageInterface(False) + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION) End Sub @@ -955,6 +963,7 @@ Public Class StartMachPanelVM Public Sub CPlaneOrigin(ByVal param As Object) If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return ManageInterface(False) + EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN) End Sub diff --git a/Icarus/StatusBar/MyStatusBarVM.vb b/Icarus/StatusBar/MyStatusBarVM.vb index e1a5ed2..27d093e 100644 --- a/Icarus/StatusBar/MyStatusBarVM.vb +++ b/Icarus/StatusBar/MyStatusBarVM.vb @@ -25,11 +25,13 @@ Public Class MyStatusBarVM Set(value As Boolean) If Map.refRibPanelVM.bGrid_IsChecked Or Map.refStartMachPanelVM.bGrid_IsChecked Or Map.refShellNumberPanelVM.bGrid_IsChecked Then Return m_bGridVisibility = value + OptionModule.m_bGridVisibility = m_bGridVisibility EgtSetGridShow(value, value) EgtDraw() - Map.refRibPanelVM.NotifyPropertyChanged(NameOf(Map.refRibPanelVM.bGrid_IsEnabled)) Map.refStartMachPanelVM.NotifyPropertyChanged(NameOf(Map.refStartMachPanelVM.bGrid_IsEnabled)) + Map.refRibPanelVM.NotifyPropertyChanged(NameOf(Map.refRibPanelVM.bGrid_IsEnabled)) Map.refShellNumberPanelVM.NotifyPropertyChanged(NameOf(Map.refShellNumberPanelVM.bGrid_IsEnabled)) + Map.refFilledSolidPanelVM.NotifyPropertyChanged(NameOf(Map.refFilledSolidPanelVM.bGrid_IsEnabled)) End Set End Property @@ -117,7 +119,7 @@ Public Class MyStatusBarVM ' Installo funzione output testo su status per lua EgtSetOutText(m_OutTextCallback) ' imposto stato di visualizzazione della griglia - m_bGridVisibility = GetMainPrivateProfileInt(S_GRID, K_SHOWGRID, 1) <> 0 + m_bGridVisibility = OptionModule.m_bGridVisibility NotifyPropertyChanged(NameOf(bGridVisibility)) End Sub diff --git a/Icarus/Utility/CurrentMachine.vb b/Icarus/Utility/CurrentMachine.vb index 6719d3b..4a34ecd 100644 --- a/Icarus/Utility/CurrentMachine.vb +++ b/Icarus/Utility/CurrentMachine.vb @@ -131,7 +131,7 @@ Public Module CurrentMachine Public Sub CreateMachineTable() ' Disabilito segnalazione modificato Dim DisableMgr As New DisableModifiedMgr - Dim dTabX = b3Tab.DimX + Dim dTabX = b3Tab.DimX() Dim dTabY = b3Tab.DimY() ' Disegno tavola Dim nTabPartId As Integer = EgtCreateGroup(GDB_ID.ROOT) @@ -150,8 +150,10 @@ Public Module CurrentMachine EgtSetInfo(nTabPartId, KEY_MATERIAL_GUID, Map.refTopPanelVM.SelMaterial.sGUID) EgtSetInfo(nTabPartId, KEY_MATERIAL_NAME, Map.refTopPanelVM.SelMaterial.sName) End If - '' creo area di estrusione + ' creo area di estrusione UpdateExtrusionArea() + ' imposto dati griglia (primi tre parametri -1 indica tieni i correnti) + EgtSetGridGeoAdv( -1, -1, -1, 0, dTabX, 0, dTabY) ' Ripristino stato segnalazione modifica DisableMgr.ReEnable() End Sub From 4b85c118cd11170b4ddb71a8d2b5a46578ea62da Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Tue, 9 Jan 2024 17:57:47 +0100 Subject: [PATCH 10/53] - aggiunti parametri per merge delle rib con shell interna --- Icarus/Constants/Const3dPrint.vb | 2 ++ Icarus/CurrMachiningPanel/CurrMachining.vb | 14 ++++++-- Icarus/MachiningDb/Machining.vb | 40 +++++++++++++++------- Icarus/RibParamPanel/CopyFromWndVM.vb | 6 +++- Icarus/RibParamPanel/RibParamPanelVM.vb | 10 ++++++ 5 files changed, 57 insertions(+), 15 deletions(-) diff --git a/Icarus/Constants/Const3dPrint.vb b/Icarus/Constants/Const3dPrint.vb index a8ec31a..00bea04 100644 --- a/Icarus/Constants/Const3dPrint.vb +++ b/Icarus/Constants/Const3dPrint.vb @@ -116,6 +116,8 @@ Public Const MAC_RIBSOVERLAP = "RibsOverlap" Public Const MAC_RIBSSTRANDCOUNT = "RibsStrandCount" Public Const MAC_RIBSLINK = "RibsLink" + Public Const MAC_RIBSMERGEWITHSHELL = "RibsMergeWithShell" + Public Const MAC_RIBSINVERTMERGEDSHELLMAINLINK = "InvertRibsMergedShellMainLink" Public Const MAC_RIBSINVERTORDER = "RibsInvertOrder" Public Const MAC_RIBSINVERTDIRECTION = "RibsInvertDirection" Public Const MAC_RIBSINVERTSTRANDORDER = "RibsInvertStrandOrder" diff --git a/Icarus/CurrMachiningPanel/CurrMachining.vb b/Icarus/CurrMachiningPanel/CurrMachining.vb index 5daeef4..6dc6d68 100644 --- a/Icarus/CurrMachiningPanel/CurrMachining.vb +++ b/Icarus/CurrMachiningPanel/CurrMachining.vb @@ -247,6 +247,8 @@ Public Class CurrMachiningCathegory New CurrNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nPartId, nIndex, bForceFromDb, Me), New CurrCheckMachiningParam(MachiningParam.Params.RIBSLINK, nPartId, nIndex, bForceFromDb, Me), + New CurrCheckMachiningParam(MachiningParam.Params.RIBSMERGEWITHSHELL, nPartId, nIndex, bForceFromDb, Me), + New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTMERGEDSHELLMAINLINK, nPartId, nIndex, bForceFromDb, Me), New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTORDER, nPartId, nIndex, bForceFromDb, Me), New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nPartId, nIndex, bForceFromDb, Me), New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nPartId, nIndex, bForceFromDb, Me), @@ -620,7 +622,7 @@ Public Class CurrNumericMachiningParam Params.LEADOUTTANGDIST, Params.LEADOUTORTHODIST, Params.COASTINGLEN, Params.COASTINGFEED_PC, Params.WIPELEN, Params.WIPEFEED_PC ' Params.WIPEDIR m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.LINK).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) - Case Params.RIBSSTRANDWIDTH, Params.RIBSOVERLAP, Params.RIBSSTRANDCOUNT, Params.RIBSLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION, + Case Params.RIBSSTRANDWIDTH, Params.RIBSOVERLAP, Params.RIBSSTRANDCOUNT, Params.RIBSLINK, Params.RIBSMERGEWITHSHELL, Params.RIBSINVERTMERGEDSHELLMAINLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION, Params.RIBSLEADININVERT, Params.RIBSLEADINLEN, Params.RIBSLEADOUTINVERT, Params.RIBSLEADOUTLEN, Params.RIBSLEADOUTCOASTING, Params.RIBSLEADOUTWIPE, Params.RIBSLEADOUTWIPEDIR m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) @@ -1177,6 +1179,10 @@ Public Class CurrCheckMachiningParam bReadFromPart = EgtGetInfo(nPartId, MAC_SPIRALVASE, m_bValue) Case Params.RIBSLINK bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLINK, m_bValue) + Case Params.RIBSMERGEWITHSHELL + bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSMERGEWITHSHELL, m_bValue) + Case Params.RIBSINVERTMERGEDSHELLMAINLINK + bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSINVERTMERGEDSHELLMAINLINK, m_bValue) Case Params.RIBSINVERTORDER bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSINVERTORDER, m_bValue) Case Params.RIBSINVERTDIRECTION @@ -1200,7 +1206,7 @@ Public Class CurrCheckMachiningParam Select Case Type Case Params.SPIRALVASE m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) - Case Params.RIBSLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION, Params.RIBSINVERTSTRANDORDER, Params.RIBSLEADININVERT, Params.RIBSLEADOUTINVERT, Params.RIBSLIMITUNBOUNDEDWITHSOLID + Case Params.RIBSLINK, Params.RIBSMERGEWITHSHELL, Params.RIBSINVERTMERGEDSHELLMAINLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION, Params.RIBSINVERTSTRANDORDER, Params.RIBSLEADININVERT, Params.RIBSLEADOUTINVERT, Params.RIBSLIMITUNBOUNDEDWITHSOLID m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) Case Params.AUXSOLIDSINFILLLINK m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) @@ -1220,6 +1226,10 @@ Public Class CurrCheckMachiningParam EgtSetInfo(nPartId, MAC_SPIRALVASE, If(m_bValue, 1, 0)) Case Params.RIBSLINK EgtSetInfo(nPartId, MAC_RIBSLINK, If(m_bValue, 1, 0)) + Case Params.RIBSMERGEWITHSHELL + EgtSetInfo(nPartId, MAC_RIBSMERGEWITHSHELL, If(m_bValue, 1, 0)) + Case Params.RIBSINVERTMERGEDSHELLMAINLINK + EgtSetInfo(nPartId, MAC_RIBSINVERTMERGEDSHELLMAINLINK, If(m_bValue, 1, 0)) Case Params.RIBSINVERTORDER EgtSetInfo(nPartId, MAC_RIBSINVERTORDER, If(m_bValue, 1, 0)) Case Params.RIBSINVERTDIRECTION diff --git a/Icarus/MachiningDb/Machining.vb b/Icarus/MachiningDb/Machining.vb index 5beaf5b..829b3ec 100644 --- a/Icarus/MachiningDb/Machining.vb +++ b/Icarus/MachiningDb/Machining.vb @@ -369,6 +369,8 @@ Public Class MachiningCathegory New NumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nIndex, Me), New CheckMachiningParam(MachiningParam.Params.RIBSLINK, nIndex, Me), + New CheckMachiningParam(MachiningParam.Params.RIBSMERGEWITHSHELL, nIndex, Me), + New CheckMachiningParam(MachiningParam.Params.RIBSINVERTMERGEDSHELLMAINLINK, nIndex, Me), New CheckMachiningParam(MachiningParam.Params.RIBSINVERTORDER, nIndex, Me), New CheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nIndex, Me), New CheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nIndex, Me), @@ -538,18 +540,20 @@ Public MustInherit Class MachiningParam RIBSOVERLAP = 102 RIBSSTRANDCOUNT = 103 RIBSLINK = 104 - RIBSINVERTORDER = 105 - RIBSINVERTDIRECTION = 106 - RIBSINVERTSTRANDORDER = 107 - RIBSLEADININVERT = 108 - RIBSLEADINLEN = 109 - RIBSLEADOUTINVERT = 110 - RIBSLEADOUTLEN = 111 - RIBSLEADOUTCOASTING = 112 - RIBSLEADOUTWIPE = 113 - RIBSLEADOUTWIPEDIR = 114 - RIBSLIMITUNBOUNDEDWITHSOLID = 115 - RIBSSTRANDWIDTH = 116 + RIBSMERGEWITHSHELL = 105 + RIBSINVERTMERGEDSHELLMAINLINK = 106 + RIBSINVERTORDER = 107 + RIBSINVERTDIRECTION = 108 + RIBSINVERTSTRANDORDER = 109 + RIBSLEADININVERT = 110 + RIBSLEADINLEN = 111 + RIBSLEADOUTINVERT = 112 + RIBSLEADOUTLEN = 113 + RIBSLEADOUTCOASTING = 114 + RIBSLEADOUTWIPE = 115 + RIBSLEADOUTWIPEDIR = 116 + RIBSLIMITUNBOUNDEDWITHSOLID = 117 + RIBSSTRANDWIDTH = 118 SHELLNBRDIFFERENCE = 151 SHELLNBRCOASTING = 152 SHELLNBRWIPE = 153 @@ -707,6 +711,10 @@ Public MustInherit Class MachiningParam m_sName = "Strand Count" Case Params.RIBSLINK m_sName = "Link" + Case Params.RIBSMERGEWITHSHELL + m_sName = "Merge With Shell" + Case Params.RIBSINVERTMERGEDSHELLMAINLINK + m_sName = "Invert Merged Shell Main Link" Case Params.RIBSINVERTORDER m_sName = "Invert Order" Case Params.RIBSINVERTDIRECTION @@ -1696,6 +1704,10 @@ Public Class CheckMachiningParam m_bValue = ReadMachiningParamDouble(nIndex, MAC_SPIRALVASE, 0) Case Params.RIBSLINK m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLINK, 0) + Case Params.RIBSMERGEWITHSHELL + m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSMERGEWITHSHELL, 0) + Case Params.RIBSINVERTMERGEDSHELLMAINLINK + m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSINVERTMERGEDSHELLMAINLINK, 0) Case Params.RIBSINVERTORDER m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSINVERTORDER, 0) Case Params.RIBSINVERTDIRECTION @@ -1723,6 +1735,10 @@ Public Class CheckMachiningParam WriteMachiningParam(nIndex, MAC_SPIRALVASE, If(m_bValue, 1, 0), sFilePath) Case Params.RIBSLINK WriteMachiningParam(nIndex, MAC_RIBSLINK, If(m_bValue, 1, 0), sFilePath) + Case Params.RIBSMERGEWITHSHELL + WriteMachiningParam(nIndex, MAC_RIBSMERGEWITHSHELL, If(m_bValue, 1, 0), sFilePath) + Case Params.RIBSINVERTMERGEDSHELLMAINLINK + WriteMachiningParam(nIndex, MAC_RIBSINVERTMERGEDSHELLMAINLINK, If(m_bValue, 1, 0), sFilePath) Case Params.RIBSINVERTORDER WriteMachiningParam(nIndex, MAC_RIBSINVERTORDER, If(m_bValue, 1, 0), sFilePath) Case Params.RIBSINVERTDIRECTION diff --git a/Icarus/RibParamPanel/CopyFromWndVM.vb b/Icarus/RibParamPanel/CopyFromWndVM.vb index b8763cc..9fa6779 100644 --- a/Icarus/RibParamPanel/CopyFromWndVM.vb +++ b/Icarus/RibParamPanel/CopyFromWndVM.vb @@ -60,6 +60,7 @@ Public Class CopyFromWndVM MachiningParam.Params.RIBSOVERLAP, MachiningParam.Params.RIBSSTRANDCOUNT, MachiningParam.Params.RIBSLINK, + MachiningParam.Params.RIBSMERGEWITHSHELL, MachiningParam.Params.RIBSINVERTDIRECTION, MachiningParam.Params.RIBSINVERTSTRANDORDER, MachiningParam.Params.RIBSLEADININVERT, @@ -134,13 +135,16 @@ Public Class CopyFromWndVM Else RibTypeParam.SetValue(RibTypeParam.dPartValue) End If - Case MachiningParam.Params.RIBSLINK, MachiningParam.Params.RIBSINVERTDIRECTION, MachiningParam.Params.RIBSINVERTSTRANDORDER, MachiningParam.Params.RIBSLEADININVERT, MachiningParam.Params.RIBSLEADOUTINVERT + Case MachiningParam.Params.RIBSLINK, MachiningParam.Params.RIBSMERGEWITHSHELL, MachiningParam.Params.RIBSINVERTDIRECTION, MachiningParam.Params.RIBSINVERTSTRANDORDER, MachiningParam.Params.RIBSLEADININVERT, MachiningParam.Params.RIBSLEADOUTINVERT Dim RibTypeParam As RibCheckMachiningParam = Nothing Dim bRibParam As Boolean = False Select Case Type Case MachiningParam.Params.RIBSLINK RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLINK) bRead = EgtGetInfo(nFromId, MAC_RIBSLINK, bRibParam) + Case MachiningParam.Params.RIBSMERGEWITHSHELL + RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSMERGEWITHSHELL) + bRead = EgtGetInfo(nFromId, MAC_RIBSMERGEWITHSHELL, bRibParam) Case MachiningParam.Params.RIBSINVERTDIRECTION RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSINVERTDIRECTION) bRead = EgtGetInfo(nFromId, MAC_RIBSINVERTDIRECTION, bRibParam) diff --git a/Icarus/RibParamPanel/RibParamPanelVM.vb b/Icarus/RibParamPanel/RibParamPanelVM.vb index 6b69664..a753413 100644 --- a/Icarus/RibParamPanel/RibParamPanelVM.vb +++ b/Icarus/RibParamPanel/RibParamPanelVM.vb @@ -47,6 +47,7 @@ Public Class RibParamPanelVM New RibNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nRibId, nPartId, Me), New RibNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nRibId, nPartId, Me), New RibCheckMachiningParam(MachiningParam.Params.RIBSLINK, nRibId, nPartId, Me), + New RibCheckMachiningParam(MachiningParam.Params.RIBSMERGEWITHSHELL, nRibId, nPartId, Me), New RibCheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nRibId, nPartId, Me), New RibCheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nRibId, nPartId, Me), New RibCheckMachiningParam(MachiningParam.Params.RIBSLEADININVERT, nRibId, nPartId, Me), @@ -545,6 +546,9 @@ Public Class RibCheckMachiningParam Case Params.RIBSLINK bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSLINK, m_bValue) EgtGetInfo(nPartId, MAC_RIBSLINK, m_bPartValue) + Case Params.RIBSMERGEWITHSHELL + bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSMERGEWITHSHELL, m_bValue) + EgtGetInfo(nPartId, MAC_RIBSMERGEWITHSHELL, m_bPartValue) Case Params.RIBSINVERTDIRECTION bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSINVERTDIRECTION, m_bValue) EgtGetInfo(nPartId, MAC_RIBSINVERTDIRECTION, m_bPartValue) @@ -573,6 +577,12 @@ Public Class RibCheckMachiningParam Else EgtRemoveInfo(nRibId, MAC_RIBSLINK) End If + Case Params.RIBSMERGEWITHSHELL + If bIsModifiedFromPart Then + EgtSetInfo(nRibId, MAC_RIBSMERGEWITHSHELL, If(m_bValue, 1, 0)) + Else + EgtRemoveInfo(nRibId, MAC_RIBSMERGEWITHSHELL) + End If Case Params.RIBSINVERTDIRECTION If bIsModifiedFromPart Then EgtSetInfo(nRibId, MAC_RIBSINVERTDIRECTION, If(m_bValue, 1, 0)) From 7267b77522ab066337fed3050533c1e5294986c5 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 9 Jan 2024 18:09:46 +0100 Subject: [PATCH 11/53] Icarus : - per export macchina (icrx) aggiunta abilitazione aggiuntiva da Ini ([General] ExportMachine=0/1 default 1). --- Icarus/Constants/ConstIni.vb | 1 + Icarus/SliceManager/SliceManagerVM.vb | 4 ++-- Icarus/packages.config | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Icarus/Constants/ConstIni.vb b/Icarus/Constants/ConstIni.vb index 6b8b879..09397f0 100644 --- a/Icarus/Constants/ConstIni.vb +++ b/Icarus/Constants/ConstIni.vb @@ -29,6 +29,7 @@ Public Module ConstIni Public Const K_NETKEY As String = "NetKey" Public Const K_LASTNGEDIR As String = "LastNgeDir" Public Const K_LASTIMPDIR As String = "LastImpDir" + Public Const K_MACHINEEXPORT As String = "MachineExport" 'Public Const K_SUPPORT As String = "Support" 'Public Const S_LANGUAGES As String = "Languages" diff --git a/Icarus/SliceManager/SliceManagerVM.vb b/Icarus/SliceManager/SliceManagerVM.vb index 7df29b0..e2663a0 100644 --- a/Icarus/SliceManager/SliceManagerVM.vb +++ b/Icarus/SliceManager/SliceManagerVM.vb @@ -718,8 +718,8 @@ Public Class SliceManagerVM ' altrimenti lo segnalo End If ' verifico se creare pacchetto - If Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.MACHINE_EXPORT) Then - 'If True Then + If Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.MACHINE_EXPORT) AndAlso + GetMainPrivateProfileInt(S_GENERAL, K_MACHINEEXPORT, 1) > 0 Then If Not CreateProjectForMachine(sIsoFilePath) Then MessageBox.Show("Icrx file generation failed!!", "Error!", MessageBoxButton.OK, MessageBoxImage.Error) End If diff --git a/Icarus/packages.config b/Icarus/packages.config index 032fc75..e46d5a8 100644 --- a/Icarus/packages.config +++ b/Icarus/packages.config @@ -1,5 +1,4 @@  - \ No newline at end of file From fdf33ef796b8e4932ab99deda28b8b297613a9bd Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 9 Jan 2024 18:28:03 +0100 Subject: [PATCH 12/53] =?UTF-8?q?Icarus=20:=20-=20eliminata=20opzione=20Cr?= =?UTF-8?q?eateJson=20su=20Shift+Save=20perch=C3=A8=20serviva=20solo=20per?= =?UTF-8?q?=20debug=20iniziale.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Icarus/ProjManager/ProjManagerVM.vb | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/Icarus/ProjManager/ProjManagerVM.vb b/Icarus/ProjManager/ProjManagerVM.vb index 4711a8d..8a9bd35 100644 --- a/Icarus/ProjManager/ProjManagerVM.vb +++ b/Icarus/ProjManager/ProjManagerVM.vb @@ -248,37 +248,9 @@ Public Class ProjManagerVM ''' Execute the Save. This method is invoked by the SaveCommand. ''' Public Sub Save() - If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then - CreateJson() - End If Map.refSceneHostVM.SaveProject() End Sub - Private Function CreateJson() As Boolean - ' creo json - Dim LayerList As New List(Of JsonLayer) - For Each Layer In Map.refTFSEditorVM.LayerList - LayerList.Add(Layer.ConvertToJsonLayer()) - Next - Dim json As String = JsonConvert.SerializeObject(LayerList, Formatting.Indented) - Dim sProjName As String = "" - EgtGetCurrFilePath(sProjName) - If Not String.IsNullOrWhiteSpace(sProjName) Then - sProjName = Path.ChangeExtension(sProjName, ".json") - If File.Exists(sProjName) Then - Try - File.Delete(sProjName) - Catch ex As Exception - End Try - End If - Try - File.AppendAllText(sProjName, json) - Catch ex As Exception - EgtOutLog("Json writing error!") - End Try - End If - End Function - #End Region ' SaveCommand #Region "SaveAsCommand" From c96c3ef58135dbd2f0d4587f23a4b0c6cd17fce7 Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Wed, 10 Jan 2024 12:37:14 +0100 Subject: [PATCH 13/53] - aggiunta variabile temperatura essicatore --- Icarus/Constants/Const3dPrint.vb | 1 + Icarus/MaterialDb/Material.vb | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/Icarus/Constants/Const3dPrint.vb b/Icarus/Constants/Const3dPrint.vb index 00bea04..8330445 100644 --- a/Icarus/Constants/Const3dPrint.vb +++ b/Icarus/Constants/Const3dPrint.vb @@ -68,6 +68,7 @@ Public Const MAT_KW = "KW" Public Const MAT_KZ = "KZ" Public Const MAT_KN = "KN" + Public Const MAT_TDRYER = "TDRYER" Public Const MAT_ORIG = "Orig" ' parametri Lavorazione diff --git a/Icarus/MaterialDb/Material.vb b/Icarus/MaterialDb/Material.vb index 3280fb3..7dac7dd 100644 --- a/Icarus/MaterialDb/Material.vb +++ b/Icarus/MaterialDb/Material.vb @@ -285,6 +285,8 @@ Public Class MaterialIndex sParamKey = MAT_KZ Case MaterialParam.Params.KN sParamKey = MAT_KN + Case MaterialParam.Params.TDRYER + sParamKey = MAT_TDRYER End Select Return ReadMaterialParamDouble(m_nIndex, sParamKey, dDefault) End Function @@ -346,6 +348,7 @@ Public Class MaterialCathegory m_MaterialParamList = New List(Of MaterialParam)({New NumericMaterialParam(MaterialParam.Params.K_EXTRUSION, nIndex), New NumericMaterialParam(MaterialParam.Params.K_LAY_TIME, nIndex), New NumericMaterialParam(MaterialParam.Params.DENSITY, nIndex), + New NumericMaterialParam(MaterialParam.Params.TDRYER, nIndex), New StringMaterialParam(MaterialParam.Params.ORIG, nIndex)}) m_Cathegory_Visibility = Visibility.Visible Case Cathegories.TEMPERATURES @@ -419,6 +422,7 @@ Public MustInherit Class MaterialParam KZ = 20 KN = 21 ORIG = 22 + TDRYER = 23 End Enum Private m_Type As Params @@ -478,6 +482,8 @@ Public MustInherit Class MaterialParam m_sName = "KZ" Case Params.KN m_sName = "KN" + Case Params.TDRYER + m_sName = "Dryer Temperature" Case Params.ORIG m_sName = "Original" End Select @@ -583,6 +589,9 @@ Public Class NumericMaterialParam Case Params.KN m_dValue = ReadMaterialParamDouble(nIndex, MAT_KN, 0) m_bIsLen = False + Case Params.TDRYER + m_dValue = ReadMaterialParamDouble(nIndex, MAT_TDRYER, 0) + m_bIsLen = False End Select m_dOrigValue = m_dValue End Sub @@ -633,6 +642,8 @@ Public Class NumericMaterialParam WriteMaterialParam(nIndex, MAT_KZ, sWriteValue, sFilePath) Case Params.KN WriteMaterialParam(nIndex, MAT_KN, sWriteValue, sFilePath) + Case Params.TDRYER + WriteMaterialParam(nIndex, MAT_TDRYER, sWriteValue, sFilePath) End Select End Sub From 4f1a9b8938de31ea363208846b0bd17252badb04 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 26 Jan 2024 16:14:34 +0100 Subject: [PATCH 14/53] =?UTF-8?q?Icarus=202.6a1=20:=20-=20corretto=20contr?= =?UTF-8?q?ollo=20movimento=20pezzo=20(ora=20anche=20fuori=20da=20tavola?= =?UTF-8?q?=20purch=C3=A8=20in=20area=20di=20stampa)=20-=20aggiunta=20indi?= =?UTF-8?q?cazione=20giorni=20mancanti=20alla=20fine=20del=20piano=20di=20?= =?UTF-8?q?manutenzione.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Icarus/AboutBoxWindow/AboutBoxV.xaml.vb | 12 ++++++++++++ Icarus/DispositionPanel/DispositionPanelVM.vb | 8 ++++---- Icarus/MainWindow/MainWindowM.vb | 4 ++-- Icarus/My Project/AssemblyInfo.vb | 6 +++--- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/Icarus/AboutBoxWindow/AboutBoxV.xaml.vb b/Icarus/AboutBoxWindow/AboutBoxV.xaml.vb index 0d57a6a..164a61c 100644 --- a/Icarus/AboutBoxWindow/AboutBoxV.xaml.vb +++ b/Icarus/AboutBoxWindow/AboutBoxV.xaml.vb @@ -18,12 +18,24 @@ Public Class AboutBoxV Dim sLeftDays As String = "" Dim nLeftDays As Integer If EgtGetKeyLeftDays(nLeftDays) AndAlso nLeftDays < 500 Then sLeftDays = " (" & nLeftDays.ToString() & ")" + Dim sAssStatus As String = " discontinued" + Dim nAssLeftDays As Integer + If EgtGetKeyAssLeftDays( nAssLeftDays) And nAssLeftDays >= 0 Then + If nAssLeftDays > 30 then + sAssStatus = "expires within " & nAssLeftDays.ToString() & " days" + Else If nAssLeftDays > 0 then + sAssStatus = "to be renewed within " & nAssLeftDays.ToString() & " days" + Else + sAssStatus = "to be renewed by today" + End If + End If sInfo = If(EgtIsDebug(), "*** Debug Libraries ***" & Environment.NewLine, "") sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName & " Inst" & Map.refMainWindowVM.MainWindowM.nInstance.ToString() & " Ulv" & Map.refMainWindowVM.MainWindowM.nUserLevel.ToString() & " Dbg" & Map.refMainWindowVM.MainWindowM.DebugLevel().ToString() & Environment.NewLine sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine + sInfo &= "Maintenance plane " & sAssStatus & Environment.NewLine sInfo &= "DataRoot " & Map.refMainWindowVM.MainWindowM.sDataRoot & Environment.NewLine sInfo &= "MachinesRoot " & Map.refMainWindowVM.MainWindowM.sMachinesRoot & Environment.NewLine Dim sOpSys As String = String.Empty diff --git a/Icarus/DispositionPanel/DispositionPanelVM.vb b/Icarus/DispositionPanel/DispositionPanelVM.vb index 3321944..789eb52 100644 --- a/Icarus/DispositionPanel/DispositionPanelVM.vb +++ b/Icarus/DispositionPanel/DispositionPanelVM.vb @@ -21,8 +21,8 @@ Public Class DispositionPanelVM Dim dNewXPos As Double = ptReference.x StringToLen(value, dNewXPos) Dim b3Print As BBox3d = GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart) - Dim dMin As Double = 0 - Dim dMax As Double = CurrentMachine.b3Tab.DimX + Dim dMin As Double = Math.Min( 0, CurrentMachine.b3ExtrusionArea.Min.x) + Dim dMax As Double = Math.Max( CurrentMachine.b3Tab.DimX, CurrentMachine.b3ExtrusionArea.Max.x) If b3Print.Max.x > ptReference.x Then dMax -= b3Print.Max.x - ptReference.x End If @@ -60,8 +60,8 @@ Public Class DispositionPanelVM Dim dNewYPos As Double = ptReference.y StringToLen(value, dNewYPos) Dim b3Print As BBox3d = GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart) - Dim dMin As Double = 0 - Dim dMax As Double = CurrentMachine.b3Tab.DimY + Dim dMin As Double = Math.Min( 0, CurrentMachine.b3ExtrusionArea.Min.y) + Dim dMax As Double = Math.Max( CurrentMachine.b3Tab.DimY, CurrentMachine.b3ExtrusionArea.Max.y) If b3Print.Max.y > ptReference.y Then dMax -= b3Print.Max.y - ptReference.y End If diff --git a/Icarus/MainWindow/MainWindowM.vb b/Icarus/MainWindow/MainWindowM.vb index 05ceb28..4e5a80c 100644 --- a/Icarus/MainWindow/MainWindowM.vb +++ b/Icarus/MainWindow/MainWindowM.vb @@ -191,8 +191,8 @@ Public Class MainWindowM EgtSetLockId( sLockId) End If ' Recupero livello e opzioni della chiave - Dim bKey As Boolean = EgtGetKeyLevel(5583, 2512, 1, m_nKeyLevel) And - EgtGetKeyOptions(5583, 2512, 1, m_nKeyOptions) + Dim bKey As Boolean = EgtGetKeyLevel(5583, 2601, 1, m_nKeyLevel) And + EgtGetKeyOptions(5583, 2601, 1, m_nKeyOptions) ' Inizializzazione generale di EgtInterface m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString()) diff --git a/Icarus/My Project/AssemblyInfo.vb b/Icarus/My Project/AssemblyInfo.vb index ba68205..75c84ce 100644 --- a/Icarus/My Project/AssemblyInfo.vb +++ b/Icarus/My Project/AssemblyInfo.vb @@ -30,7 +30,7 @@ Imports System.Windows #End If - + @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + From 97442a5d65a3584c528bb521a9441ddf3ef4764d Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 13 Feb 2024 14:55:15 +0100 Subject: [PATCH 15/53] Icarus 2.6b1 : - ricompilazione con cambio versione. --- Icarus/MainWindow/MainWindowM.vb | 4 ++-- Icarus/My Project/AssemblyInfo.vb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Icarus/MainWindow/MainWindowM.vb b/Icarus/MainWindow/MainWindowM.vb index 4e5a80c..43ae203 100644 --- a/Icarus/MainWindow/MainWindowM.vb +++ b/Icarus/MainWindow/MainWindowM.vb @@ -191,8 +191,8 @@ Public Class MainWindowM EgtSetLockId( sLockId) End If ' Recupero livello e opzioni della chiave - Dim bKey As Boolean = EgtGetKeyLevel(5583, 2601, 1, m_nKeyLevel) And - EgtGetKeyOptions(5583, 2601, 1, m_nKeyOptions) + Dim bKey As Boolean = EgtGetKeyLevel(5583, 2602, 1, m_nKeyLevel) And + EgtGetKeyOptions(5583, 2602, 1, m_nKeyOptions) ' Inizializzazione generale di EgtInterface m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString()) diff --git a/Icarus/My Project/AssemblyInfo.vb b/Icarus/My Project/AssemblyInfo.vb index 75c84ce..f3bd992 100644 --- a/Icarus/My Project/AssemblyInfo.vb +++ b/Icarus/My Project/AssemblyInfo.vb @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + From 11704fa33d104357da01e700ca1cf8bec30145a6 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 12 Apr 2024 08:56:04 +0200 Subject: [PATCH 16/53] =?UTF-8?q?Icarus=202.6d2=20:=20-=20migliorie=20nell?= =?UTF-8?q?a=20segnalazione=20problemi=20con=20chiave=20di=20rete=20-=20ag?= =?UTF-8?q?giunta=20gestione=20AdvFlag=3D0/1=20della=20sezione=20[Import]?= =?UTF-8?q?=20nel=20file=20INI=20per=20Flag=20importatore=20formati=20avan?= =?UTF-8?q?zati=20-=20eliminata=20gestione=20eventi=20OnImport...=20perch?= =?UTF-8?q?=C3=A8=20ImportProject=20non=20usato,=20aggiunta=20gestione=20e?= =?UTF-8?q?vento=20OnInsertingProject.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Icarus/Constants/ConstIni.vb | 1 + Icarus/MainWindow/MainWindowM.vb | 4 +- Icarus/My Project/AssemblyInfo.vb | 4 +- Icarus/SceneHost/MySceneHostVM.vb | 82 ++++++++++++++----------------- 4 files changed, 43 insertions(+), 48 deletions(-) diff --git a/Icarus/Constants/ConstIni.vb b/Icarus/Constants/ConstIni.vb index 09397f0..7c9c0ee 100644 --- a/Icarus/Constants/ConstIni.vb +++ b/Icarus/Constants/ConstIni.vb @@ -103,6 +103,7 @@ Public Module ConstIni Public Const K_DXFSCALE As String = "DxfScale" Public Const K_STLSCALE As String = "StlScale" Public Const K_CNCFLAG As String = "CncFlag" + Public Const K_ADVFLAG As String = "AdvFlag" 'Public Const S_SIMUL As String = "Simul" 'Public Const K_SLIDERX As String = "SliderX" diff --git a/Icarus/MainWindow/MainWindowM.vb b/Icarus/MainWindow/MainWindowM.vb index 43ae203..6cb7ab1 100644 --- a/Icarus/MainWindow/MainWindowM.vb +++ b/Icarus/MainWindow/MainWindowM.vb @@ -191,8 +191,8 @@ Public Class MainWindowM EgtSetLockId( sLockId) End If ' Recupero livello e opzioni della chiave - Dim bKey As Boolean = EgtGetKeyLevel(5583, 2602, 1, m_nKeyLevel) And - EgtGetKeyOptions(5583, 2602, 1, m_nKeyOptions) + Dim bKey As Boolean = EgtGetKeyLevel(5583, 2604, 1, m_nKeyLevel) And + EgtGetKeyOptions(5583, 2604, 1, m_nKeyOptions) ' Inizializzazione generale di EgtInterface m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString()) diff --git a/Icarus/My Project/AssemblyInfo.vb b/Icarus/My Project/AssemblyInfo.vb index f3bd992..0f7ff9c 100644 --- a/Icarus/My Project/AssemblyInfo.vb +++ b/Icarus/My Project/AssemblyInfo.vb @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/Icarus/SceneHost/MySceneHostVM.vb b/Icarus/SceneHost/MySceneHostVM.vb index ce53e3c..2593c5c 100644 --- a/Icarus/SceneHost/MySceneHostVM.vb +++ b/Icarus/SceneHost/MySceneHostVM.vb @@ -49,9 +49,8 @@ Public Class MySceneHostVM AddHandler MainController.OnOpenProject, AddressOf OnOpenProject AddHandler MainController.OnSavingProject, AddressOf OnSavingProject AddHandler MainController.OnSavedProject, AddressOf OnSavedProject + AddHandler MainController.OnInsertingProject, AddressOf OnInsertingProject AddHandler MainController.OnInsertedProject, AddressOf OnInsertedProject - AddHandler MainController.OnImportingProject, AddressOf OnImportingProject - AddHandler MainController.OnImportedProject, AddressOf OnImportedProject AddHandler MainController.PrepareInputBox, AddressOf PrepareInputBox AddHandler MainController.SetInputBoxText, AddressOf SetInputBoxText AddHandler MainController.SetInputBoxCheck, AddressOf SetInputBoxCheck @@ -83,17 +82,32 @@ Public Class MySceneHostVM ' Problemi ' Se manca la chiave If Map.refMainWindowVM.MainWindowM.nKeyLevel = -1 Or Map.refMainWindowVM.MainWindowM.nKeyLevel = -2 Then - EgtOutLog("Missing Dongle") - ' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore" - Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3) - Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1) + If Not EgtGetNetHwKey() Then + EgtOutLog("Missing Dongle") + ' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore" + Dim sText As String = EgtMsg(10102) & vbCrLf & EgtMsg(10103) + Dim sTitle As String = EgtMsg(10101) + MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error) + Else + EgtOutLog("NetDongle is full") + ' Box di avviso slot chiave di rete occupato : "Chiave di Rete completamente occupata. \n Uscire dal programma su un altro PC." "Errore" + Dim sText As String = EgtMsg(10110) & vbCrLf & EgtMsg(10111) + Dim sTitle As String = EgtMsg(10101) + MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error) + End If + ' Se altrimenti manca il collegamento con la chiave di rete + ElseIf Map.refMainWindowVM.MainWindowM.nKeyLevel = -9 Then + EgtOutLog("Missing Link with Net Dongle") + ' Box di avviso chiave mancante : "Collegamento con la Chiave di rete non riuscito. \n Verificare la connessione." "Errore" + Dim sText As String = EgtMsg(10108) & vbCrLf & EgtMsg(10109) + Dim sTitle As String = EgtMsg(10101) MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error) - ' Altrimenti manca la licenza + ' Altrimenti manca la licenza Else EgtOutLog("Problems with Licence") ' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore" - Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 5) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 6) - Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1) + Dim sText As String = EgtMsg(10105) & vbCrLf & EgtMsg(10106) + Dim sTitle As String = EgtMsg(10101) If MessageBox.Show(sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then ' Apro dialogo per richiesta file licenza Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With { @@ -347,8 +361,7 @@ Public Class MySceneHostVM Return False End If WriteMainPrivateProfileString(S_PRINTING3D, K_IMPORTCURREXTENSION, OpenFileDialog.FilterIndex) - Dim sFile As String = String.Empty - sFile = OpenFileDialog.FileName + Dim sFile As String = OpenFileDialog.FileName ' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma Map.refProjManagerVM.SetProjCmdIsEnabled(False) Map.refTopPanelVM.SetTopPanelIsEnabled(False) @@ -403,6 +416,7 @@ Public Class MySceneHostVM "|Step files (*.stp;*.step)|*.stp;*.step" & "|3D Manufacturing format (*.3mf)|*.3mf" & "|New geometry EgalTech(*.nge)|*.nge" & + "|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" & "|All Files (*.*)|*.*", .FilterIndex = 1, .InitialDirectory = sDir} @@ -474,14 +488,14 @@ Public Class MySceneHostVM "|Step files (*.stp;*.step)|*.stp;*.step" & "|3D Manufacturing format (*.3mf)|*.3mf" & "|New geometry EgalTech(*.nge)|*.nge" & + "|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" & "|All Files (*.*)|*.*", .FilterIndex = 1, .InitialDirectory = sDir} If Not OpenFileDialog.ShowDialog Then Return False End If - Dim sFile As String = String.Empty - sFile = OpenFileDialog.FileName + Dim sFile As String = OpenFileDialog.FileName ' importo la nuova geometria Dim bOk As Boolean = MainController.InsertProject(sFile, False) If bOk Then @@ -532,6 +546,7 @@ Public Class MySceneHostVM "|Step files (*.stp;*.step)|*.stp;*.step" & "|3D Manufacturing format (*.3mf)|*.3mf" & "|New geometry EgalTech(*.nge)|*.nge" & + "|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" & "|All Files (*.*)|*.*", .FilterIndex = 1, .InitialDirectory = sDir} @@ -603,6 +618,7 @@ Public Class MySceneHostVM "|Step files (*.stp;*.step)|*.stp;*.step" & "|3D Manufacturing format (*.3mf)|*.3mf" & "|New geometry EgalTech(*.nge)|*.nge" & + "|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" & "|All Files (*.*)|*.*", .FilterIndex = 1, .InitialDirectory = sDir} @@ -1186,6 +1202,15 @@ Public Class MySceneHostVM End If End Sub + Private Sub OnInsertingProject(sender As Object, nType As Integer, ByRef nFlag As Integer) + If nType = FT.OBJ Or nType = FT.IGES Or nType = FT.STEP_ Or nType = FT.ACIS Or + nType = FT.PARASOLID Or nType = FT.JT Or nType = FT.VRML Or nType = FT.C3D Then + nFlag = GetMainPrivateProfileInt(S_IMPORT, K_ADVFLAG, 0) + Else + nFlag = 0 + End If + End Sub + Private Sub OnInsertedProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean) ' Segnalo eventuale errore If Not bOk Then @@ -1198,37 +1223,6 @@ Public Class MySceneHostVM MainScene.SetStatusNull() End Sub - Private Sub OnImportingProject(sender As Object, nType As Integer, ByRef nFlag As Integer) - If nType <> FT.NULL Then - If nType = FT.CNC Then - nFlag = GetMainPrivateProfileInt(S_IMPORT, K_CNCFLAG, EIC_FL.NONE) - Else - nFlag = 0 - End If - ' Abilito progress e bottone stop - Map.refMyStatusBarVM.StartLoading("", True) - Else - MessageBox.Show(Application.Current.MainWindow, EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error - End If - End Sub - - Private Sub OnImportedProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean) - EgtZoom(ZM.ALL) - ' Disabilito progress e bottone stop - Map.refMyStatusBarVM.EndLoading("") - ' Salvo path - WriteMainPrivateProfileString(S_GENERAL, K_LASTIMPDIR, Path.GetDirectoryName(sFile)) - ' Segnalo eventuale errore - If Not bOk Then - Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file - MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error - ElseIf Path.GetExtension(sFile) <> ".cnc" Then - ' creo oggetto pezzo in lista - 'Map.refProjectVM. - End If - MainScene.SetStatusNull() - End Sub - Private Sub PrepareInputBox(ByVal sTitle As String, ByVal sLabel As String, ByVal sCheckLabel As String, ByVal bShowCombo As Boolean, ByVal bShowBtn As Boolean) Map.refControllerInputPanelVM.PrepareInputBox(sTitle, sLabel, sCheckLabel, bShowCombo, bShowBtn) From 90b1fa9221348243f733fb45727d9aac927be877 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 12 Apr 2024 11:03:47 +0200 Subject: [PATCH 17/53] Icarus : - modifiche per sistemazione riferimenti oggetti inseriti. --- Icarus/SceneHost/MySceneHostVM.vb | 64 +++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 21 deletions(-) diff --git a/Icarus/SceneHost/MySceneHostVM.vb b/Icarus/SceneHost/MySceneHostVM.vb index 2593c5c..58d7554 100644 --- a/Icarus/SceneHost/MySceneHostVM.vb +++ b/Icarus/SceneHost/MySceneHostVM.vb @@ -418,7 +418,7 @@ Public Class MySceneHostVM "|New geometry EgalTech(*.nge)|*.nge" & "|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" & "|All Files (*.*)|*.*", - .FilterIndex = 1, + .FilterIndex = 6, .InitialDirectory = sDir} If Not OpenFileDialog.ShowDialog Then Return False @@ -431,29 +431,35 @@ Public Class MySceneHostVM ' sposto le nuove geometrie nel layer rib del pezzo Dim nNewPartId As Integer = EgtGetLastPart() Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId) + Dim frLayer As New Frame3d + EgtGetGroupGlobFrame( nNewLayerId, frLayer) Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId) While nNewEntityId <> GDB_ID.NULL Dim EntityType As GDB_TY = EgtGetType(nNewEntityId) Select Case EntityType Case GDB_TY.CRV_COMPO, GDB_TY.CRV_LINE, GDB_TY.CRV_ARC - Dim nNewRib = nNewEntityId + Dim nNewRib As Integer = GDB_ID.NULL If EntityType = GDB_TY.CRV_LINE OrElse EntityType = GDB_TY.CRV_ARC Then - nNewRib = EgtCreateCurveCompo(Map.refTopPanelVM.SelPart.nPartId, nNewEntityId, False) + nNewRib = EgtCreateCurveCompo(nNewLayerId, nNewEntityId, False) + EgtRelocate( nNewRib, Map.refRibPanelVM.nRibLayerId, GDB_POS.LAST_SON) Else ' lo copio nel layer dei rib nNewRib = EgtCopy(nNewEntityId, Map.refRibPanelVM.nRibLayerId, GDB_POS.LAST_SON) End If EgtSetName(nNewRib, RIB_CURVE) + ' elimino effetti di eventuale riferimento originale + EgtTransform( nNewRib, frLayer) ' elimino colore entita' EgtResetColor(nNewEntityId) ' lo aggiungo alla lista Dim NewEntity As RibEntity = New RibEntity(RibEntity.RibTypes.FROMIMPORT, nNewRib) Map.refRibPanelVM.RibList.Add(NewEntity) Case GDB_TY.SRF_MESH, GDB_TY.SRF_FRGN, GDB_TY.SRF_BEZ - Dim nNewRib = nNewEntityId ' lo copio nel layer dei rib - nNewRib = EgtCopy(nNewEntityId, Map.refRibPanelVM.nRibLayerId, GDB_POS.LAST_SON) + Dim nNewRib As Integer = EgtCopy(nNewEntityId, Map.refRibPanelVM.nRibLayerId, GDB_POS.LAST_SON) EgtSetName(nNewRib, RIB_EXTRUSION) + ' elimino effetti di eventuale riferimento originale + EgtTransform( nNewRib, frLayer) ' elimino colore entita' EgtResetColor(nNewEntityId) ' lo aggiungo alla lista @@ -490,7 +496,7 @@ Public Class MySceneHostVM "|New geometry EgalTech(*.nge)|*.nge" & "|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" & "|All Files (*.*)|*.*", - .FilterIndex = 1, + .FilterIndex = 6, .InitialDirectory = sDir} If Not OpenFileDialog.ShowDialog Then Return False @@ -502,6 +508,8 @@ Public Class MySceneHostVM ' sposto le nuove geometrie nel layer rib del pezzo Dim nNewPartId As Integer = EgtGetLastPart() Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId) + Dim frLayer As New Frame3d + EgtGetGroupGlobFrame( nNewLayerId, frLayer) ' verifico che ci sia una sola entita' If EgtGetGroupObjs(nNewLayerId) <> 1 Then MessageBox.Show("Impossible importing file that contains more than one entity.", "Error", MessageBoxButton.OK, MessageBoxImage.Error) @@ -510,6 +518,8 @@ Public Class MySceneHostVM If MenuItem.OrigLayer.EntityList.Count > 0 AndAlso MenuItem.OrigLayer.EntityList(0).nId <> GDB_ID.NULL Then EgtErase(MenuItem.OrigLayer.EntityList(0).nId) Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId) EgtRelocate(nNewEntityId, MenuItem.OrigLayer.nLayerId, GDB_POS.LAST_SON) + ' elimino effetti di eventuale riferimento originale + EgtTransform( nNewEntityId, frLayer) ' elimino colore entita' EgtResetColor(nNewEntityId) ' aggiorno riferimento pezzo @@ -548,7 +558,7 @@ Public Class MySceneHostVM "|New geometry EgalTech(*.nge)|*.nge" & "|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" & "|All Files (*.*)|*.*", - .FilterIndex = 1, + .FilterIndex = 6, .InitialDirectory = sDir} If Not OpenFileDialog.ShowDialog Then Return False @@ -561,29 +571,35 @@ Public Class MySceneHostVM ' sposto le nuove geometrie nel layer ShellNumber del pezzo Dim nNewPartId As Integer = EgtGetLastPart() Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId) + Dim frLayer As New Frame3d + EgtGetGroupGlobFrame( nNewLayerId, frLayer) Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId) While nNewEntityId <> GDB_ID.NULL Dim EntityType As GDB_TY = EgtGetType(nNewEntityId) Select Case EntityType Case GDB_TY.CRV_COMPO, GDB_TY.CRV_LINE, GDB_TY.CRV_ARC - Dim nNewShellNumberId As Integer = nNewEntityId + Dim nNewShellNumberId As Integer = GDB_ID.NULL If EntityType = GDB_TY.CRV_LINE OrElse EntityType = GDB_TY.CRV_ARC Then - nNewShellNumberId = EgtCreateCurveCompo(Map.refTopPanelVM.SelPart.nPartId, nNewEntityId, False) + nNewShellNumberId = EgtCreateCurveCompo(nNewLayerId, nNewEntityId, False) + EgtRelocate( nNewShellNumberId, Map.refShellNumberPanelVM.nShellNumberLayerId, GDB_POS.LAST_SON) Else ' lo copio nel layer dei shellnumber nNewShellNumberId = EgtCopy(nNewEntityId, Map.refShellNumberPanelVM.nShellNumberLayerId, GDB_POS.LAST_SON) End If EgtSetName(nNewShellNumberId, RIB_CURVE) + ' elimino effetti di eventuale riferimento originale + EgtTransform( nNewShellNumberId, frLayer) ' elimino colore entita' EgtResetColor(nNewEntityId) ' lo aggiungo alla lista Dim NewEntity As ShellNumberEntity = New ShellNumberEntity(ShellNumberEntity.ShellNumberTypes.FROMIMPORT, nNewShellNumberId) Map.refShellNumberPanelVM.ShellNumberList.Add(NewEntity) Case GDB_TY.SRF_MESH, GDB_TY.SRF_FRGN, GDB_TY.SRF_BEZ - Dim nNewShellNumberId = nNewEntityId - ' lo copio nel layer dei rib - nNewShellNumberId = EgtCopy(nNewEntityId, Map.refShellNumberPanelVM.nShellNumberLayerId, GDB_POS.LAST_SON) + ' lo copio nel layer dei shellnumber + Dim nNewShellNumberId As Integer = EgtCopy(nNewEntityId, Map.refShellNumberPanelVM.nShellNumberLayerId, GDB_POS.LAST_SON) EgtSetName(nNewShellNumberId, RIB_EXTRUSION) + ' elimino effetti di eventuale riferimento originale + EgtTransform( nNewShellNumberId, frLayer) ' elimino colore entita' EgtResetColor(nNewEntityId) ' lo aggiungo alla lista @@ -593,7 +609,7 @@ Public Class MySceneHostVM nNewEntityId = EgtGetNext(nNewEntityId) End While EgtErase(nNewPartId) - ' seleziono ultima rib + ' seleziono ultima ShellNumber Map.refShellNumberPanelVM.SelLastShellNumber() EgtDraw() ' Imposto flag di ricalcolo slice @@ -620,7 +636,7 @@ Public Class MySceneHostVM "|New geometry EgalTech(*.nge)|*.nge" & "|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" & "|All Files (*.*)|*.*", - .FilterIndex = 1, + .FilterIndex = 6, .InitialDirectory = sDir} If Not OpenFileDialog.ShowDialog Then Return False @@ -633,29 +649,35 @@ Public Class MySceneHostVM ' sposto le nuove geometrie nel layer ShellNumber del pezzo Dim nNewPartId As Integer = EgtGetLastPart() Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId) + Dim frLayer As New Frame3d + EgtGetGroupGlobFrame( nNewLayerId, frLayer) Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId) While nNewEntityId <> GDB_ID.NULL Dim EntityType As GDB_TY = EgtGetType(nNewEntityId) Select Case EntityType Case GDB_TY.CRV_COMPO, GDB_TY.CRV_LINE, GDB_TY.CRV_ARC - Dim nNewFilledSolidId As Integer = nNewEntityId + Dim nNewFilledSolidId As Integer = GDB_ID.NULL If EntityType = GDB_TY.CRV_LINE OrElse EntityType = GDB_TY.CRV_ARC Then - nNewFilledSolidId = EgtCreateCurveCompo(Map.refTopPanelVM.SelPart.nPartId, nNewEntityId, False) + nNewFilledSolidId = EgtCreateCurveCompo(nNewLayerId, nNewEntityId, False) + EgtRelocate( nNewFilledSolidId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON) Else - ' lo copio nel layer dei shellnumber + ' lo copio nel layer dei FilledSolid nNewFilledSolidId = EgtCopy(nNewEntityId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON) End If EgtSetName(nNewFilledSolidId, RIB_CURVE) + ' elimino effetti di eventuale riferimento originale + EgtTransform( nNewFilledSolidId, frLayer) ' elimino colore entita' EgtResetColor(nNewEntityId) ' lo aggiungo alla lista Dim NewEntity As FilledSolidEntity = New FilledSolidEntity(FilledSolidEntity.FilledSolidTypes.FROMIMPORT, nNewFilledSolidId) Map.refFilledSolidPanelVM.FilledSolidList.Add(NewEntity) Case GDB_TY.SRF_MESH, GDB_TY.SRF_FRGN, GDB_TY.SRF_BEZ - Dim nNewFilledSolidId = nNewEntityId - ' lo copio nel layer dei rib - nNewFilledSolidId = EgtCopy(nNewEntityId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON) + ' lo copio nel layer dei FilledSolid + Dim nNewFilledSolidId As Integer = EgtCopy(nNewEntityId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON) EgtSetName(nNewFilledSolidId, RIB_EXTRUSION) + ' elimino effetti di eventuale riferimento originale + EgtTransform( nNewFilledSolidId, frLayer) ' elimino colore entita' EgtResetColor(nNewEntityId) ' lo aggiungo alla lista @@ -665,7 +687,7 @@ Public Class MySceneHostVM nNewEntityId = EgtGetNext(nNewEntityId) End While EgtErase(nNewPartId) - ' seleziono ultima rib + ' seleziono ultima FilledSolid Map.refFilledSolidPanelVM.SelLastFilledSolid() EgtDraw() ' Imposto flag di ricalcolo slice From 412c3c4b5de7b03ba526f9ba48d3638046bf258a Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Mon, 29 Apr 2024 11:41:17 +0200 Subject: [PATCH 18/53] - aggiunto flag per VirtualAdditive --- Icarus/Constants/ConstGen.vb | 3 ++ Icarus/Constants/ConstIni.vb | 1 + Icarus/SimulationPanel/MySimulation.vb | 2 + Icarus/SimulationPanel/SimulationPanelV.xaml | 17 ++++++ Icarus/SimulationPanel/SimulationPanelVM.vb | 54 ++++++++++++++++++++ 5 files changed, 77 insertions(+) diff --git a/Icarus/Constants/ConstGen.vb b/Icarus/Constants/ConstGen.vb index cd3b6e5..ee8020e 100644 --- a/Icarus/Constants/ConstGen.vb +++ b/Icarus/Constants/ConstGen.vb @@ -78,4 +78,7 @@ Public Module ConstGen ' Nome file Lua con le funzioni di attrezzaggio Public Const SETUP_LUA As String = "SetUp.lua" + ' Chiave di Info in gruppo di lavoro per attivazione Virtual Milling + Public Const KEY_MCHGRP_VM As String = "Vm" + End Module diff --git a/Icarus/Constants/ConstIni.vb b/Icarus/Constants/ConstIni.vb index 7c9c0ee..0b23c24 100644 --- a/Icarus/Constants/ConstIni.vb +++ b/Icarus/Constants/ConstIni.vb @@ -109,6 +109,7 @@ Public Module ConstIni 'Public Const K_SLIDERX As String = "SliderX" 'Public Const K_SLIDERVAL As String = "SliderVal" Public Const K_MACHVIEWMODE As String = "MachViewMode" + Public Const K_VIRTUALADDITIVE As String = "VirtualAdditive" Public Const S_PRINTING3D As String = "3dPrinting" Public Const K_3PRNBASEDIR As String = "BaseDir" diff --git a/Icarus/SimulationPanel/MySimulation.vb b/Icarus/SimulationPanel/MySimulation.vb index 15b321c..6a16988 100644 --- a/Icarus/SimulationPanel/MySimulation.vb +++ b/Icarus/SimulationPanel/MySimulation.vb @@ -63,6 +63,8 @@ Public Class MySimulation ' Aggiornamenti per bottone Play/Pause SetShowPlay(True) NotifyPropertyChanged("PlayPauseImage") + ' Abilito check VMill + VMill_IsEnabled = True Select Case nMove Case MCH_SIM.END_ StatusMsg = EgtMsg(MSG_SIMULATIONPAGEUC + 1) 'Simulazione completata diff --git a/Icarus/SimulationPanel/SimulationPanelV.xaml b/Icarus/SimulationPanel/SimulationPanelV.xaml index 6a9b38c..8df96ba 100644 --- a/Icarus/SimulationPanel/SimulationPanelV.xaml +++ b/Icarus/SimulationPanel/SimulationPanelV.xaml @@ -67,6 +67,23 @@ + + + + + + + + 0, Visibility.Visible, Visibility.Collapsed) + End Get + End Property + +#Region "Messages" + + Public ReadOnly Property VirtualAdditive_Msg As String + Get + Return "Virtual Additive" + End Get + End Property + +#End Region ' Definizione comandi Private m_cmdOk As ICommand @@ -101,6 +140,21 @@ Public Class SimulationPanelVM MySimul.SliderValue = SliderVal MySimul.ShowCncData() MySimul.StatusMsg = EgtMsg(MSG_SIMULATIONPAGEUC + 14) ' Home + ' Gestione check VMill + If GetMainPrivateProfileInt(S_SIMUL, K_VIRTUALADDITIVE, 0) > 0 Then + Dim bVal As Boolean + MySimul.VMill_IsEnabled = True + m_VirtualAdditive_IsChecked = EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM, bVal) AndAlso bVal + Else + ' Disabilito Vmill, ma inibisco dichiarazione progetto modificato + EgtDisableModified() + MySimul.VMill_IsEnabled = False + m_VirtualAdditive_IsChecked = False + EgtRemoveInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM) + EgtEnableModified() + End If + NotifyPropertyChanged(VirtualAdditive_IsChecked) + NotifyPropertyChanged(VirtualAdditive_Visibility) ' nascondo slider strati e layer da visualizzare Map.refSliderManagerVM.SetSliderVisibility(False) Map.refViewLayerManagerVM.SetViewLayerManagerVisibility(False) From a0d7687214af19d5517bd64e90d9880938a11ded Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 29 Apr 2024 12:48:18 +0200 Subject: [PATCH 19/53] Icarus : - piccole modifiche per simulazione con Virtual Additive. --- Icarus/SimulationPanel/MySimulation.vb | 1 + Icarus/SimulationPanel/SimulationPanelVM.vb | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Icarus/SimulationPanel/MySimulation.vb b/Icarus/SimulationPanel/MySimulation.vb index 6a16988..d1b262d 100644 --- a/Icarus/SimulationPanel/MySimulation.vb +++ b/Icarus/SimulationPanel/MySimulation.vb @@ -106,6 +106,7 @@ Public Class MySimulation MachineAxisList(Index).IsReadOnlyAxesValue = True Next End If + EgtSimSetUiStatus(GetStatus()) End Sub #End Region ' METHODS diff --git a/Icarus/SimulationPanel/SimulationPanelVM.vb b/Icarus/SimulationPanel/SimulationPanelVM.vb index 350e156..86c8545 100644 --- a/Icarus/SimulationPanel/SimulationPanelVM.vb +++ b/Icarus/SimulationPanel/SimulationPanelVM.vb @@ -29,7 +29,7 @@ Public Class SimulationPanelVM If EgtSetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM, value) Then m_VirtualAdditive_IsChecked = value Else - NotifyPropertyChanged(VirtualAdditive_IsChecked) + NotifyPropertyChanged(NameOf(VirtualAdditive_IsChecked)) End If End Set End Property @@ -153,8 +153,8 @@ Public Class SimulationPanelVM EgtRemoveInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM) EgtEnableModified() End If - NotifyPropertyChanged(VirtualAdditive_IsChecked) - NotifyPropertyChanged(VirtualAdditive_Visibility) + NotifyPropertyChanged(NameOf(VirtualAdditive_IsChecked)) + NotifyPropertyChanged(NameOf(VirtualAdditive_Visibility)) ' nascondo slider strati e layer da visualizzare Map.refSliderManagerVM.SetSliderVisibility(False) Map.refViewLayerManagerVM.SetViewLayerManagerVisibility(False) From ca32de50f0b80aecc34a6f06776a124e7bfd52b4 Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Fri, 10 May 2024 11:55:00 +0200 Subject: [PATCH 20/53] - aggiunto flag per uso sezione strand semplificata --- Icarus/Constants/ConstIni.vb | 3 ++ Icarus/OptionsWindow/OptionModule.vb | 4 ++ Icarus/OptionsWindow/OptionWindowV.xaml | 5 +++ Icarus/OptionsWindow/OptionWindowVM.vb | 58 ++++++++++++++++--------- 4 files changed, 49 insertions(+), 21 deletions(-) diff --git a/Icarus/Constants/ConstIni.vb b/Icarus/Constants/ConstIni.vb index 0b23c24..8be9c07 100644 --- a/Icarus/Constants/ConstIni.vb +++ b/Icarus/Constants/ConstIni.vb @@ -118,6 +118,9 @@ Public Module ConstIni Public Const K_VIEWSLIDER As String = "ViewSlider" Public Const K_IMPORTCURREXTENSION As String = "ImportCurrExtension" + Public Const S_SOLIDS As String = "Solids" + Public Const K_SIMPLIFIEDSECTION As String = "SimplifiedSection" + Public Const S_COLORS As String = "Colors" Public Const K_CLR_PRINTPART As String = "PrintPart" Public Const K_CLR_RIBS As String = "Ribs" diff --git a/Icarus/OptionsWindow/OptionModule.vb b/Icarus/OptionsWindow/OptionModule.vb index b2445af..9677134 100644 --- a/Icarus/OptionsWindow/OptionModule.vb +++ b/Icarus/OptionsWindow/OptionModule.vb @@ -15,6 +15,8 @@ Friend Module OptionModule Friend m_bThickLine As Boolean ' Flag per visualizzazione smussata delle superfici Friend m_bSmoothTriMesh As Boolean + ' Flag per visualizzazione semplificate sezione strand + Friend m_bUseSimplifiedSection As Boolean ' Colore di default in disegno Friend m_DefMaterialColor As Color3d @@ -107,6 +109,8 @@ Friend Module OptionModule m_bThickLine = GetMainPrivateProfileInt(S_SCENE, K_LINEWIDTH, 1) <> 1 ' Inizializzo flag visualizzazione smussata delle superfici m_bSmoothTriMesh = GetMainPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0 + ' Inizializzo flag visualizzazione sezione strand semplificata + m_bUseSimplifiedSection = GetMainPrivateProfileInt(S_SOLIDS, K_SIMPLIFIEDSECTION, 0) <> 0 ' Inizio colore di default in disegno Dim DefColor As New Color3d(0, 0, 0) GetMainPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor) diff --git a/Icarus/OptionsWindow/OptionWindowV.xaml b/Icarus/OptionsWindow/OptionWindowV.xaml index 3462b49..af22aac 100644 --- a/Icarus/OptionsWindow/OptionWindowV.xaml +++ b/Icarus/OptionsWindow/OptionWindowV.xaml @@ -61,6 +61,7 @@ + @@ -70,6 +71,10 @@ Grid.Row="1" Margin="0,5,0,5"/> + + diff --git a/Icarus/ManagePartPanel/ManagePartPanelV.xaml.vb b/Icarus/ManagePartPanel/ManagePartPanelV.xaml.vb index ff9c652..814dd7a 100644 --- a/Icarus/ManagePartPanel/ManagePartPanelV.xaml.vb +++ b/Icarus/ManagePartPanel/ManagePartPanelV.xaml.vb @@ -23,4 +23,12 @@ End Select End Sub + Private Sub TextBox_PreviewKeyDown(sender As Object, e As KeyEventArgs) + ' per evitare che il click del tasto Enter a fine edit faccia scattare anche la chiusura + ' di tutto il pannello a causa del IsDefault sul tasto di chiusura, termino la gestione del click + If e.Key = Key.Enter Then + e.Handled = True + End If + End Sub + End Class From f0eec3b4da3d736b6d02976842874e2bc9e5c030 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Sun, 22 Feb 2026 16:30:37 +0100 Subject: [PATCH 44/53] Icarus : - corretta lettura da ini e applicazione del formato di salvataggio. --- Icarus/SceneHost/MySceneHostVM.vb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Icarus/SceneHost/MySceneHostVM.vb b/Icarus/SceneHost/MySceneHostVM.vb index 924de47..6453392 100644 --- a/Icarus/SceneHost/MySceneHostVM.vb +++ b/Icarus/SceneHost/MySceneHostVM.vb @@ -294,10 +294,12 @@ Public Class MySceneHostVM If String.IsNullOrWhiteSpace(sCurrFile) Or EgtGetFileType(sCurrFile) <> FT.NGE Then bOk = SaveAsProject() Else - Dim bDeleteNgeFile As Boolean = Path.GetExtension(sCurrFile) = ".nge" + Dim bDeleteNgeFile As Boolean = ( Path.GetExtension(sCurrFile) = ".nge") EgtSetCurrFilePath(Path.ChangeExtension(sCurrFile, "icrs")) + ' Formato di salvataggio + Dim nSaveType As NGE = DirectCast( GetMainPrivateProfileInt(S_GEOMDB, K_SAVETYPE, NGE.CMPTEXT), NGE) ' Salvataggio standard - bOk = MainController.SaveProject() + bOk = MainController.SaveProject(nSaveType) If bOk AndAlso bDeleteNgeFile AndAlso File.Exists(sCurrFile) Then Try File.Delete(sCurrFile) @@ -330,8 +332,10 @@ Public Class MySceneHostVM If SaveFileDialog.ShowDialog = Windows.Forms.DialogResult.OK Then Dim sFileName As String = SaveFileDialog.FileName EgtSetCurrFilePath(sFileName) + ' Formato di salvataggio + Dim nSaveType As NGE = DirectCast( GetMainPrivateProfileInt(S_GEOMDB, K_SAVETYPE, NGE.CMPTEXT), NGE) ' Salvataggio standard - bOk = MainController.SaveProject() + bOk = MainController.SaveProject(nSaveType) End If m_bIsSaveAs = False ' Imposto stato gestione mouse diretto della scena a nessuno From 251ae061f1764636587d53cde81c9e77455a3709 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 3 Mar 2026 16:36:51 +0100 Subject: [PATCH 45/53] Icarus 3.1c1 : - ricompilazione con cambio versione. --- Icarus/MainWindow/MainWindowM.vb | 4 ++-- Icarus/My Project/AssemblyInfo.vb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Icarus/MainWindow/MainWindowM.vb b/Icarus/MainWindow/MainWindowM.vb index 4567152..0879eaf 100644 --- a/Icarus/MainWindow/MainWindowM.vb +++ b/Icarus/MainWindow/MainWindowM.vb @@ -191,8 +191,8 @@ Public Class MainWindowM EgtSetLockId( sLockId) End If ' Recupero livello e opzioni della chiave - Dim bKey As Boolean = EgtGetKeyLevel(5583, 3102, 1, m_nKeyLevel) And - EgtGetKeyOptions(5583, 3102, 1, m_nKeyOptions) + Dim bKey As Boolean = EgtGetKeyLevel(5583, 3103, 1, m_nKeyLevel) And + EgtGetKeyOptions(5583, 3103, 1, m_nKeyOptions) ' Inizializzazione generale di EgtInterface m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString()) diff --git a/Icarus/My Project/AssemblyInfo.vb b/Icarus/My Project/AssemblyInfo.vb index 37dff0b..b30c575 100644 --- a/Icarus/My Project/AssemblyInfo.vb +++ b/Icarus/My Project/AssemblyInfo.vb @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + From 757c4d7b6f8a4fc2e4b24ba73db0d40b9420fe1b Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 10 Mar 2026 16:16:21 +0100 Subject: [PATCH 46/53] Icarus 3.1c2 : - correzione per crash dopo conferma edit materiali senza materiale corrente in top bar (progetto nuovo). --- Icarus/MaterialDb/MaterialDbVM.vb | 20 +++++++++++--------- Icarus/My Project/AssemblyInfo.vb | 4 ++-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Icarus/MaterialDb/MaterialDbVM.vb b/Icarus/MaterialDb/MaterialDbVM.vb index 330de52..6f82fbd 100644 --- a/Icarus/MaterialDb/MaterialDbVM.vb +++ b/Icarus/MaterialDb/MaterialDbVM.vb @@ -283,17 +283,19 @@ Public Class MaterialDbVM ' aggiorno lista materiali Db Init() ' aggiorno lista materiali TopBar - Dim PrevMaterialGuid As String = Map.refTopPanelVM.SelMaterial.sGUID Map.refTopPanelVM.InitMaterialList() - Dim PrevMaterial As MaterialIndex = Map.refTopPanelVM.MaterialList.FirstOrDefault(Function(x) x.sGUID = PrevMaterialGuid) - If Not IsNothing(PrevMaterial) Then - Map.refTopPanelVM.SetSelMaterial(PrevMaterial) - Else - Map.refTopPanelVM.SelMaterial = Nothing - Map.refTopPanelVM.NotifyPropertyChanged(NameOf(Map.refTopPanelVM.SelMaterial)) + If Not IsNothing(Map.refTopPanelVM.SelMaterial) Then + Dim PrevMaterialGuid As String = Map.refTopPanelVM.SelMaterial.sGUID + Dim PrevMaterial As MaterialIndex = Map.refTopPanelVM.MaterialList.FirstOrDefault(Function(x) x.sGUID = PrevMaterialGuid) + If Not IsNothing(PrevMaterial) Then + Map.refTopPanelVM.SetSelMaterial(PrevMaterial) + Else + Map.refTopPanelVM.SelMaterial = Nothing + Map.refTopPanelVM.NotifyPropertyChanged(NameOf(Map.refTopPanelVM.SelMaterial)) + End If + ' ricarico lavorazioni per aggiorno liste materiali all'interno + Map.refMachiningDbVM.Init() End If - ' ricarico lavorazioni per aggiorno liste materiali all'interno - Map.refMachiningDbVM.Init() End If ' ripristino modalita' standard Map.refTopPanelVM.SelPage = Pages.MODIFY diff --git a/Icarus/My Project/AssemblyInfo.vb b/Icarus/My Project/AssemblyInfo.vb index b30c575..f20e5af 100644 --- a/Icarus/My Project/AssemblyInfo.vb +++ b/Icarus/My Project/AssemblyInfo.vb @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + From bd43571e10c67316bd3fac61bb2fabab216ec644 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 12 Mar 2026 17:34:37 +0100 Subject: [PATCH 47/53] Icarus : - permessa l'esecuzione di un massimo di quattro istanze (prima una sola). --- Icarus/MainWindow/MainWindowM.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Icarus/MainWindow/MainWindowM.vb b/Icarus/MainWindow/MainWindowM.vb index 0879eaf..c002b94 100644 --- a/Icarus/MainWindow/MainWindowM.vb +++ b/Icarus/MainWindow/MainWindowM.vb @@ -8,7 +8,7 @@ Public Class MainWindowM #Region "FIELDS" ' massimo numero di istanze del programma ammesse - Const MAX_INST As Integer = 32 + Const MAX_INST As Integer = 4 Private m_objMutex As Mutex @@ -317,7 +317,7 @@ Public Class MainWindowM Friend Function GetMaxInstances() As Integer ' Leggo il massimo numero di istanze ammesse Dim nMaxInst As Integer = GetMainPrivateProfileInt(S_GENERAL, K_MAXINST, 1) - Return 1 ' Max(1, Min(nMaxInst, MAX_INST)) + Return Max(1, Min(nMaxInst, MAX_INST)) End Function Friend Sub Close() From 6d18e9eba52eec4f56205b2cbc1dc2d9f5e2b1cb Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 18 Mar 2026 18:16:47 +0100 Subject: [PATCH 48/53] Icarus : - correzione per conversioni di stringhe in double e viceversa. --- Icarus/CurrMachiningPanel/CurrMachining.vb | 2 +- .../FilledSolidParamPanelVM.vb | 4 +- Icarus/MachiningDb/Machining.vb | 2 +- Icarus/MaterialDb/Material.vb | 4 +- Icarus/OptionsWindow/OptionWindowVM.vb | 172 ------------------ Icarus/RibParamPanel/RibParamPanelVM.vb | 4 +- .../ShellNumberParamPanelVM.vb | 4 +- 7 files changed, 10 insertions(+), 182 deletions(-) diff --git a/Icarus/CurrMachiningPanel/CurrMachining.vb b/Icarus/CurrMachiningPanel/CurrMachining.vb index dec2b12..ac96938 100644 --- a/Icarus/CurrMachiningPanel/CurrMachining.vb +++ b/Icarus/CurrMachiningPanel/CurrMachining.vb @@ -367,7 +367,7 @@ Public Class CurrNumericMachiningParam Public Overrides Property sValue As String Get - Return If(m_bIsLen, LenToString(m_dValue, 1), DoubleToString(m_dValue, 2)) + Return If(m_bIsLen, LenToString(m_dValue, 2), DoubleToString(m_dValue, 2)) End Get Set(value As String) Dim dTempValue As Double = 0 diff --git a/Icarus/FilledSolidParamPanel/FilledSolidParamPanelVM.vb b/Icarus/FilledSolidParamPanel/FilledSolidParamPanelVM.vb index eac4460..62ccbfe 100644 --- a/Icarus/FilledSolidParamPanel/FilledSolidParamPanelVM.vb +++ b/Icarus/FilledSolidParamPanel/FilledSolidParamPanelVM.vb @@ -166,13 +166,13 @@ Public Class FilledSolidNumericMachiningParam Public Overrides Property sValue As String Get - Return If(m_bIsLen, LenToString(m_dValue, 1), m_dValue) + Return If(m_bIsLen, LenToString(m_dValue, 2), DoubleToString(m_dValue, 2)) End Get Set(value As String) If m_bIsLen Then StringToLen(value, m_dValue) Else - m_dValue = value + StringToDouble(value, m_dValue) End If NotifyPropertyChanged(NameOf(sValue)) NotifyPropertyChanged(NameOf(bIsModifiedFromPart)) diff --git a/Icarus/MachiningDb/Machining.vb b/Icarus/MachiningDb/Machining.vb index 5d053c9..202aab1 100644 --- a/Icarus/MachiningDb/Machining.vb +++ b/Icarus/MachiningDb/Machining.vb @@ -893,7 +893,7 @@ Public Class NumericMachiningParam End Property Public Overridable Property sValue As String Get - Return If(m_bIsLen, LenToString(m_dValue, 1), DoubleToString(m_dValue, 2)) + Return If(m_bIsLen, LenToString(m_dValue, 2), DoubleToString(m_dValue, 2)) End Get Set(value As String) Dim dTempValue As Double = 0 diff --git a/Icarus/MaterialDb/Material.vb b/Icarus/MaterialDb/Material.vb index 7dac7dd..915a7fe 100644 --- a/Icarus/MaterialDb/Material.vb +++ b/Icarus/MaterialDb/Material.vb @@ -504,13 +504,13 @@ Public Class NumericMaterialParam Private m_dValue As Double Public Property dValue As String Get - Return If(m_bIsLen, LenToString(m_dValue, 1), m_dValue) + Return If(m_bIsLen, LenToString(m_dValue, 5), DoubleToString(m_dValue, 5)) End Get Set(value As String) If m_bIsLen Then StringToLen(value, m_dValue) Else - m_dValue = value + StringToDouble(value, m_dValue) End If NotifyPropertyChanged(NameOf(dValue)) End Set diff --git a/Icarus/OptionsWindow/OptionWindowVM.vb b/Icarus/OptionsWindow/OptionWindowVM.vb index da34db1..44a69de 100644 --- a/Icarus/OptionsWindow/OptionWindowVM.vb +++ b/Icarus/OptionsWindow/OptionWindowVM.vb @@ -268,152 +268,6 @@ Public Class OptionWindowVM End Set End Property - 'Public Property ImageScaleFactor As String - ' Get - ' Return LenToString(OptionModule.m_dImgScaleFactor, 5) - ' End Get - ' Set(value As String) - ' Dim dVal As Double = 0 - ' If StringToLen(value, dVal) AndAlso dVal > 0 Then - ' OptionModule.m_dImgScaleFactor = dVal - ' WritePrivateProfileString(S_IMPORT, K_IMGSCALE, DoubleToString(OptionModule.m_dImgScaleFactor, 5)) - ' Map.refProjectVM.GetController().SetScaleForImageImport(OptionModule.m_dImgScaleFactor) - ' NotifyPropertyChanged("ImageScaleFactor") - ' End If - ' End Set - 'End Property - - 'Public Property ImageWidth As String - ' Get - ' Return OptionModule.m_nImgWidth.ToString() - ' End Get - ' Set(value As String) - ' Dim nVal As Integer = 0 - ' If Integer.TryParse(value, nVal) AndAlso nVal > 0 Then - ' OptionModule.m_nImgWidth = nVal - ' WritePrivateProfileString(S_EXPORT, K_IMGWIDTH, OptionModule.m_nImgWidth.ToString()) - ' Map.refProjectVM.GetController().SetDefaultForImageExport(OptionModule.m_nImgWidth, OptionModule.m_nImgHeight) - ' End If - ' End Set - 'End Property - - 'Public Property ImageHeight As String - ' Get - ' Return OptionModule.m_nImgHeight.ToString() - ' End Get - ' Set(value As String) - ' Dim nVal As Integer = 0 - ' If Integer.TryParse(value, nVal) AndAlso nVal > 0 Then - ' OptionModule.m_nImgHeight = nVal - ' WritePrivateProfileString(S_EXPORT, K_IMGHEIGHT, OptionModule.m_nImgHeight.ToString()) - ' Map.refProjectVM.GetController().SetDefaultForImageExport(OptionModule.m_nImgWidth, OptionModule.m_nImgHeight) - ' End If - ' End Set - 'End Property - - 'Public Property ExtLineLen As String - ' Get - ' Return LenToString(OptionModule.m_dExtLineLen, 5) - ' End Get - ' Set(value As String) - ' Dim dVal As Double = 0 - ' If StringToLen(value, dVal) AndAlso dVal > 0 Then - ' OptionModule.m_dExtLineLen = dVal - ' EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight) - ' WritePrivateProfileString(S_DIMENSIONSTYLE, K_EXTLINELEN, DoubleToString(OptionModule.m_dExtLineLen, 5)) - ' End If - ' End Set - 'End Property - - 'Public Property ArrowLen As String - ' Get - ' Return LenToString(OptionModule.m_dArrowLen, 5) - ' End Get - ' Set(value As String) - ' Dim dVal As Double = 0 - ' If StringToLen(value, dVal) AndAlso dVal > 0 Then - ' OptionModule.m_dArrowLen = dVal - ' EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight) - ' WritePrivateProfileString(S_DIMENSIONSTYLE, K_ARROWLEN, DoubleToString(OptionModule.m_dArrowLen, 5)) - ' End If - ' End Set - 'End Property - - 'Public Property TextDist As String - ' Get - ' Return LenToString(OptionModule.m_dTextDist, 5) - ' End Get - ' Set(value As String) - ' Dim dVal As Double = 0 - ' If StringToLen(value, dVal) AndAlso dVal > 0 Then - ' OptionModule.m_dTextDist = dVal - ' EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight) - ' WritePrivateProfileString(S_DIMENSIONSTYLE, K_TEXTDIST, DoubleToString(OptionModule.m_dTextDist, 5)) - ' End If - ' End Set - 'End Property - - 'Public Property SelectedUnitMeasure As String - ' Get - ' If OptionModule.m_nLenIsMM = 0 Then - ' Return "inch" - ' ElseIf OptionModule.m_nLenIsMM = 1 Then - ' Return "mm" - ' Else - ' Return EgtMsg(MSG_OPTIONPAGE + 45) - ' End If - ' End Get - ' Set(value As String) - ' Dim nVal As Integer = 2 - ' If value = "inch" Then - ' nVal = 0 - ' ElseIf value = "mm" Then - ' nVal = 1 - ' End If - ' OptionModule.m_nLenIsMM = nVal - ' EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight) - ' WritePrivateProfileString(S_DIMENSIONSTYLE, K_LENISMM, OptionModule.m_nLenIsMM.ToString()) - ' End Set - 'End Property - - 'Public Property DecDigit As String - ' Get - ' Return OptionModule.m_nDecDigit.ToString() - ' End Get - ' Set(value As String) - ' Dim nVal As Integer = 0 - ' If Integer.TryParse(value, nVal) AndAlso nVal > 0 Then - ' OptionModule.m_nDecDigit = nVal - ' EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight) - ' WritePrivateProfileString(S_DIMENSIONSTYLE, K_DECDIGIT, OptionModule.m_nDecDigit.ToString()) - ' End If - ' End Set - 'End Property - - 'Public Property SelectedFont As String - ' Get - ' Return m_FontList(m_FontList.IndexOf(OptionModule.m_sFont)) - ' End Get - ' Set(value As String) - ' OptionModule.m_sFont = value - ' EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight) - ' WritePrivateProfileString(S_DIMENSIONSTYLE, K_DIMFONT, OptionModule.m_sFont) - ' End Set - 'End Property - - 'Public Property TextHeight As String - ' Get - ' Return LenToString(OptionModule.m_dTextHeight, 5) - ' End Get - ' Set(value As String) - ' Dim dVal As Double = 0 - ' If StringToLen(value, dVal) AndAlso dVal > 0 Then - ' OptionModule.m_dTextHeight = dVal - ' EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight) - ' WritePrivateProfileString(S_DIMENSIONSTYLE, K_TEXTHEIGHT, DoubleToString(OptionModule.m_dTextHeight, 5)) - ' End If - ' End Set - 'End Property Private m_DXFScaleEnable As Boolean = False Public Property DXFScaleEnable As Boolean @@ -498,32 +352,6 @@ Public Class OptionWindowVM End Set End Property - 'Public Property SelectedImageScale As String - ' Get - ' If Math.Abs(OptionModule.m_dImgScaleFactor - ONEMM) < EPS_SMALL * 10 Then - ' Return ScaleImageList(ScaleImageList.IndexOf("mm")) - ' ElseIf Math.Abs(OptionModule.m_dImgScaleFactor - ONEINCH) < EPS_SMALL * 10 Then - ' Return ScaleImageList(ScaleImageList.IndexOf("inch")) - ' Else - ' ImageScaleEnable = True - ' Return ScaleImageList(ScaleImageList.IndexOf(EgtMsg(6546))) - ' ImageScaleEnable = True - ' End If - ' End Get - ' Set(value As String) - ' If value = "mm" Then - ' ImageScaleFactor = LenToString(ONEMM, 3) - ' ImageScaleEnable = False - ' ElseIf value = "inch" Then - ' ImageScaleFactor = LenToString(ONEINCH, 4) - ' ImageScaleEnable = False - ' Else - ' ImageScaleFactor = LenToString(OptionModule.m_dImgScaleFactor, 4) - ' ImageScaleEnable = True - ' End If - ' End Set - 'End Property - ' Definizione comandi Private m_cmdTopSceneBackground As ICommand diff --git a/Icarus/RibParamPanel/RibParamPanelVM.vb b/Icarus/RibParamPanel/RibParamPanelVM.vb index 35ac420..761bea6 100644 --- a/Icarus/RibParamPanel/RibParamPanelVM.vb +++ b/Icarus/RibParamPanel/RibParamPanelVM.vb @@ -197,13 +197,13 @@ Public Class RibNumericMachiningParam Public Overrides Property sValue As String Get - Return If(m_bIsLen, LenToString(m_dValue, 1), m_dValue) + Return If(m_bIsLen, LenToString(m_dValue, 2), DoubleToString(m_dValue, 2)) End Get Set(value As String) If m_bIsLen Then StringToLen(value, m_dValue) Else - m_dValue = value + StringToDouble(value, m_dValue) End If NotifyPropertyChanged(NameOf(sValue)) NotifyPropertyChanged(NameOf(bIsModifiedFromPart)) diff --git a/Icarus/ShellNumberParamPanel/ShellNumberParamPanelVM.vb b/Icarus/ShellNumberParamPanel/ShellNumberParamPanelVM.vb index f516bda..cda5268 100644 --- a/Icarus/ShellNumberParamPanel/ShellNumberParamPanelVM.vb +++ b/Icarus/ShellNumberParamPanel/ShellNumberParamPanelVM.vb @@ -135,13 +135,13 @@ Public Class ShellNumberNumericMachiningParam Public Overrides Property sValue As String Get - Return If(m_bIsLen, LenToString(m_dValue, 1), m_dValue) + Return If(m_bIsLen, LenToString(m_dValue, 2), DoubleToString(m_dValue, 2)) End Get Set(value As String) If m_bIsLen Then StringToLen(value, m_dValue) Else - m_dValue = value + StringToDouble(value, m_dValue) End If NotifyPropertyChanged(NameOf(sValue)) NotifyPropertyChanged(NameOf(bIsModifiedFromPart)) From 6f1ea25aaaa136a081632f9721a75bfa75c53d58 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 14 Apr 2026 19:47:07 +0200 Subject: [PATCH 49/53] Icarus 3.1d1 : - aggiunta gestione modo Multiplanar_45deg. --- Icarus/CurrMachiningPanel/CurrMachining.vb | 1 + Icarus/MachiningDb/Machining.vb | 2 ++ Icarus/My Project/AssemblyInfo.vb | 4 ++-- Icarus/Utility/CurrentMachine.vb | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Icarus/CurrMachiningPanel/CurrMachining.vb b/Icarus/CurrMachiningPanel/CurrMachining.vb index ac96938..a5a27b5 100644 --- a/Icarus/CurrMachiningPanel/CurrMachining.vb +++ b/Icarus/CurrMachiningPanel/CurrMachining.vb @@ -976,6 +976,7 @@ Public Class CurrComboMachiningParam m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.HORIZONTAL, "Horizontal")) If nSlicingType >= 4 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR, "MultiPlanar")) + m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR_DEG45, "MultiPlanar 45deg")) End If End If End If diff --git a/Icarus/MachiningDb/Machining.vb b/Icarus/MachiningDb/Machining.vb index 202aab1..d069420 100644 --- a/Icarus/MachiningDb/Machining.vb +++ b/Icarus/MachiningDb/Machining.vb @@ -15,6 +15,7 @@ Public Class Machining DEG45_Y = 3 HORIZONTAL = 4 MULTIPLANAR = 5 + MULTIPLANAR_DEG45 = 6 End Enum Public Enum MPAR_STRANDORDERS As Integer @@ -1527,6 +1528,7 @@ Public Class ComboMachiningParam m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.HORIZONTAL, "Horizontal")) If nSlicingType >= 4 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR, "MultiPlanar")) + m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR_DEG45, "MultiPlanar 45deg")) End If End If End If diff --git a/Icarus/My Project/AssemblyInfo.vb b/Icarus/My Project/AssemblyInfo.vb index f20e5af..62bd2f3 100644 --- a/Icarus/My Project/AssemblyInfo.vb +++ b/Icarus/My Project/AssemblyInfo.vb @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/Icarus/Utility/CurrentMachine.vb b/Icarus/Utility/CurrentMachine.vb index ca94daa..7f397e4 100644 --- a/Icarus/Utility/CurrentMachine.vb +++ b/Icarus/Utility/CurrentMachine.vb @@ -219,7 +219,7 @@ Public Module CurrentMachine sExtrusionType = S_45DEGY Case Machining.MPAR_SLICINGTYPE.HORIZONTAL sExtrusionType = S_HORIZONTAL - Case Machining.MPAR_SLICINGTYPE.MULTIPLANAR + Case Machining.MPAR_SLICINGTYPE.MULTIPLANAR, Machining.MPAR_SLICINGTYPE.MULTIPLANAR_DEG45 sExtrusionType = S_MULTIPLANAR End Select Dim dExtrXMax = GetPrivateProfileDouble(sExtrusionType, K_MAXX, 0, m_sMachDataIniFile) From 1b131fd78161fa0fa2fdb7f93d0f9e1c2874d579 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 28 Apr 2026 11:39:10 +0200 Subject: [PATCH 50/53] Icarus 3.1d2 : - aggiunta gestione tipo di estrusione da NewSlicingType di Ini macchina. --- Icarus/Constants/ConstMachIni.vb | 1 + Icarus/CurrMachiningPanel/CurrMachining.vb | 24 ++++++++------------- Icarus/MachiningDb/Machining.vb | 25 +++++++++------------- Icarus/My Project/AssemblyInfo.vb | 4 ++-- Icarus/Utility/CurrentMachine.vb | 20 ++++++++++++++++- 5 files changed, 41 insertions(+), 33 deletions(-) diff --git a/Icarus/Constants/ConstMachIni.vb b/Icarus/Constants/ConstMachIni.vb index 220b391..c744a55 100644 --- a/Icarus/Constants/ConstMachIni.vb +++ b/Icarus/Constants/ConstMachIni.vb @@ -9,6 +9,7 @@ Public Const S_MACH_PRINTING3D As String = "3dPrinting" Public Const K_SLICINGTYPE As String = "SlicingType" + Public Const K_NEWSLICINGTYPE As String = "NewSlicingType" Public Const K_SPEED_MIN As String = "SpeedMin" Public Const K_SPEED_MAX As String = "SpeedMax" Public Const K_MAX_HEIGHT As String = "HMax" diff --git a/Icarus/CurrMachiningPanel/CurrMachining.vb b/Icarus/CurrMachiningPanel/CurrMachining.vb index a5a27b5..38e7209 100644 --- a/Icarus/CurrMachiningPanel/CurrMachining.vb +++ b/Icarus/CurrMachiningPanel/CurrMachining.vb @@ -966,21 +966,15 @@ Public Class CurrComboMachiningParam Dim bReadFromPart As Boolean = False Select Case Type Case Params.SLICINGTYPE - Dim nSlicingType As Integer = GetPrivateProfileInt(S_MACH_PRINTING3D, K_SLICINGTYPE, 0, CurrentMachine.sMachIniFile) - m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_SLICINGTYPE.VERTICAL, "Vertical")}) - If nSlicingType >= 1 Then - m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45, "45deg X")) - If nSlicingType >= 2 Then - m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45_Y, "45deg Y")) - If nSlicingType >= 3 Then - m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.HORIZONTAL, "Horizontal")) - If nSlicingType >= 4 Then - m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR, "MultiPlanar")) - m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR_DEG45, "MultiPlanar 45deg")) - End If - End If - End If - End If + Dim nNewSlicingType As Integer = CurrentMachine.GetSlicingType() + m_ValueList = New List(Of IdNameStruct) + If (nNewSlicingType And 1) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.VERTICAL, "Vertical")) + If (nNewSlicingType And 2) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45, "45deg X")) + If (nNewSlicingType And 4) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45_Y, "45deg Y")) + If (nNewSlicingType And 8) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.HORIZONTAL, "Horizontal")) + If (nNewSlicingType And 16) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR, "MultiPlanar")) + If (nNewSlicingType And 32) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR_DEG45, "MultiPlanar 45deg")) + If (nNewSlicingType And 64) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR_HORIZ, "MultiPlanar Horiz")) Dim nSelValue As Integer = 0 bReadFromPart = EgtGetInfo(nPartId, MAC_SLICINGTYPE, nSelValue) If Not bReadFromPart Then diff --git a/Icarus/MachiningDb/Machining.vb b/Icarus/MachiningDb/Machining.vb index d069420..25eecfc 100644 --- a/Icarus/MachiningDb/Machining.vb +++ b/Icarus/MachiningDb/Machining.vb @@ -16,6 +16,7 @@ Public Class Machining HORIZONTAL = 4 MULTIPLANAR = 5 MULTIPLANAR_DEG45 = 6 + MULTIPLANAR_HORIZ = 7 End Enum Public Enum MPAR_STRANDORDERS As Integer @@ -1518,21 +1519,15 @@ Public Class ComboMachiningParam Else Select Case Type Case Params.SLICINGTYPE - Dim nSlicingType As Integer = GetPrivateProfileInt(S_MACH_PRINTING3D, K_SLICINGTYPE, 0, CurrentMachine.sMachIniFile) - m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_SLICINGTYPE.VERTICAL, "Vertical")}) - If nSlicingType >= 1 Then - m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45, "45deg X")) - If nSlicingType >= 2 Then - m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45_Y, "45deg Y")) - If nSlicingType >= 3 Then - m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.HORIZONTAL, "Horizontal")) - If nSlicingType >= 4 Then - m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR, "MultiPlanar")) - m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR_DEG45, "MultiPlanar 45deg")) - End If - End If - End If - End If + Dim nNewSlicingType As Integer = CurrentMachine.GetSlicingType() + m_ValueList = New List(Of IdNameStruct) + If (nNewSlicingType And 1) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.VERTICAL, "Vertical")) + If (nNewSlicingType And 2) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45, "45deg X")) + If (nNewSlicingType And 4) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45_Y, "45deg Y")) + If (nNewSlicingType And 8) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.HORIZONTAL, "Horizontal")) + If (nNewSlicingType And 16) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR, "MultiPlanar")) + If (nNewSlicingType And 32) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR_DEG45, "MultiPlanar 45deg")) + If (nNewSlicingType And 64) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR_HORIZ, "MultiPlanar Horiz")) Dim nSelValue As Double = ReadMachiningParamDouble(nIndex, MAC_SLICINGTYPE, -1) If nSelValue = -1 Then Dim dSlicing45 As Double = 0 diff --git a/Icarus/My Project/AssemblyInfo.vb b/Icarus/My Project/AssemblyInfo.vb index 62bd2f3..09f171d 100644 --- a/Icarus/My Project/AssemblyInfo.vb +++ b/Icarus/My Project/AssemblyInfo.vb @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/Icarus/Utility/CurrentMachine.vb b/Icarus/Utility/CurrentMachine.vb index 7f397e4..4509dfa 100644 --- a/Icarus/Utility/CurrentMachine.vb +++ b/Icarus/Utility/CurrentMachine.vb @@ -219,7 +219,7 @@ Public Module CurrentMachine sExtrusionType = S_45DEGY Case Machining.MPAR_SLICINGTYPE.HORIZONTAL sExtrusionType = S_HORIZONTAL - Case Machining.MPAR_SLICINGTYPE.MULTIPLANAR, Machining.MPAR_SLICINGTYPE.MULTIPLANAR_DEG45 + Case Machining.MPAR_SLICINGTYPE.MULTIPLANAR, Machining.MPAR_SLICINGTYPE.MULTIPLANAR_DEG45, Machining.MPAR_SLICINGTYPE.MULTIPLANAR_HORIZ sExtrusionType = S_MULTIPLANAR End Select Dim dExtrXMax = GetPrivateProfileDouble(sExtrusionType, K_MAXX, 0, m_sMachDataIniFile) @@ -314,6 +314,24 @@ Public Module CurrentMachine Return WritePrivateProfileString(lpAppName, lpKeyName, EgwCrypto.PowerEncryptString(lpString, m_Salt), If(Not String.IsNullOrWhiteSpace(sFilePath), sFilePath, m_sMaterialFilePath)) End Function + Friend Function GetSlicingType() As Integer + Dim nNewSlicingType As Integer = GetPrivateProfileInt(S_MACH_PRINTING3D, K_NEWSLICINGTYPE, 0, sMachIniFile) + If nNewSlicingType = 0 Then + Dim nSlicingType As Integer = GetPrivateProfileInt(S_MACH_PRINTING3D, K_SLICINGTYPE, 0, sMachIniFile) + nNewSlicingType = 1 + If nSlicingType = 1 Then + nNewSlicingType = 3 + ElseIf nSlicingType = 2 Then + nNewSlicingType = 7 + ElseIf nSlicingType = 3 Then + nNewSlicingType = 15 + ElseIf nSlicingType = 4 Then + nNewSlicingType = 21 + End If + End If + Return nNewSlicingType + End Function + #End Region 'Methods End Module From d5188fcd960c019866cb8f414414f4e85dbb630f Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 28 Apr 2026 19:26:55 +0200 Subject: [PATCH 51/53] Icarus : - aggiornata simulazione come EgtCAM5. --- Icarus/MainWindow/MainWindowV.xaml.vb | 2 +- Icarus/MainWindow/MainWindowVM.vb | 14 ++-- .../SecondaryWindow/SecondaryWindowV.xaml.vb | 2 +- Icarus/SimulationPanel/MySimulation.vb | 75 ++++++++++++++++--- Icarus/SimulationPanel/SimulationPanelVM.vb | 4 + Icarus/StatusBar/MyStatusBarVM.vb | 13 +++- 6 files changed, 89 insertions(+), 21 deletions(-) diff --git a/Icarus/MainWindow/MainWindowV.xaml.vb b/Icarus/MainWindow/MainWindowV.xaml.vb index ee33e28..85d4609 100644 --- a/Icarus/MainWindow/MainWindowV.xaml.vb +++ b/Icarus/MainWindow/MainWindowV.xaml.vb @@ -40,7 +40,7 @@ Class MainWindowV End Sub Private Sub MainWindowV_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs) - If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then + If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt AndAlso Keyboard.IsKeyDown(Key.F4) Then e.Cancel = True Return End If diff --git a/Icarus/MainWindow/MainWindowVM.vb b/Icarus/MainWindow/MainWindowVM.vb index 836dbf9..fd0d58f 100644 --- a/Icarus/MainWindow/MainWindowVM.vb +++ b/Icarus/MainWindow/MainWindowVM.vb @@ -159,21 +159,19 @@ Public Class MainWindowVM End Function Friend Sub CloseApplication() - If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then + ' Se simulazione in corso + If Not IsNothing( Map.refSimulationPanelVM) AndAlso Map.refSimulationPanelVM.MySimul.bSimExecuting Then + ' Avvio l'arresto della simulazione + Map.refSimulationPanelVM.MySimul.SetSimulationStatus(MCH_SIM_ST.UI_STOP) + Map.refSimulationPanelVM.MySimul.m_bSimulEndExitApp = True Return End If - ' gestisco la chiusura della simulazione + ' Chiusura della simulazione If Map.refRightPanelVM.SelPanel = RightPanelVM.Panels.SIMULATION AndAlso Not IsNothing(Map.refSimulationPanelVM) Then Map.refSimulationPanelVM.MySimul.ResetSimulation() End If ' Gestisco eventuale file corrente modificato - Dim bOk As Boolean = True - 'bOk = ProjFileVM.VerifyProjectModification(Map.refProjManagerVM.CurrProj, ProjectType.PROJ) - ' se salvataggio annullato, rimango - If Not bOk Then Return Dim bAllowClose As Boolean = Map.refSceneHostVM.MainController.ManageModified() - ' Salvo impostazione macchina corrente - 'Map.refMachinePanelVM.SaveCurrentMachine() ' Se non confermata chiusura, esco If Not bAllowClose Then Return ' salvo modo di visualizzazione diff --git a/Icarus/SecondaryWindow/SecondaryWindowV.xaml.vb b/Icarus/SecondaryWindow/SecondaryWindowV.xaml.vb index 3185872..f1b0aca 100644 --- a/Icarus/SecondaryWindow/SecondaryWindowV.xaml.vb +++ b/Icarus/SecondaryWindow/SecondaryWindowV.xaml.vb @@ -37,7 +37,7 @@ Public Class SecondaryWindowV End Sub Private Sub SecondaryWindowV_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs) - If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then + If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt AndAlso Keyboard.IsKeyDown(Key.F4) Then e.Cancel = True Return End If diff --git a/Icarus/SimulationPanel/MySimulation.vb b/Icarus/SimulationPanel/MySimulation.vb index 6289fb0..81a342c 100644 --- a/Icarus/SimulationPanel/MySimulation.vb +++ b/Icarus/SimulationPanel/MySimulation.vb @@ -21,6 +21,10 @@ Public Class MySimulation End Set End Property + Private m_bStopOnNextCollision As Boolean = True + + Friend m_bSimulEndExitApp As Boolean = False + #End Region ' FIELDS & PROPERTIES #Region "Messages" @@ -38,9 +42,9 @@ Public Class MySimulation Sub New() SetPlayImagePath("/Resources/SimulationPanel/Play.png") SetPauseImagePath("/Resources/SimulationPanel/Pause.png") - SetPauseMsg(EgtMsg(90561)) ' Pausa - SetStopMsg(EgtMsg(90562)) ' Simulazione interrotta - SetHomeMsg(EgtMsg(90564)) ' Home + SetPauseMsg(EgtMsg(5311)) ' Pausa + SetStopMsg(EgtMsg(5312)) ' Stop + SetHomeMsg(EgtMsg(5314)) ' Home End Sub #End Region ' CONSTRUCTOR @@ -48,8 +52,10 @@ Public Class MySimulation #Region "METHODS" Public Overrides Sub ExecSim() + SetSimExecuting(True) EgtSimStart(False) EgtSimSetStep(SliderValue * GetSliderX()) + m_bStopOnNextCollision = True Dim nShowDataCounter As Integer = 0 While GetStatus() <> MCH_SIM_ST.UI_STOP ' Se simulazione in svolgimento @@ -62,11 +68,25 @@ Public Class MySimulation If GetStatus() = MCH_SIM_ST.UI_STEP And nMove = MCH_SIM.END_STEP Then ' Imposto stato Pausa SetSimulationStatus(MCH_SIM_ST.UI_PAUSE) - StatusMsg = EgtMsg(MSG_SIMULATIONPAGEUC + 11) ' Pausa + StatusMsg = EgtMsg(5311) ' Pausa ' Aggiornamenti per bottone Play/Pause SetShowPlay(True) NotifyPropertyChanged("PlayPauseImage") End If + ' Se movimento con collisione + ElseIf nMove = MCH_SIM.COLLISION Then + If m_bStopOnNextCollision Then + ' Imposto stato Pausa + SetSimulationStatus(MCH_SIM_ST.UI_PAUSE) + StatusMsg = EgtMsg(5311) ' PAUSA + ' Aggiornamenti per bottone Play/Pause + SetShowPlay(True) + NotifyPropertyChanged("PlayPauseImage") + ' Messaggio + MessageBox.Show(EgtMsg(5319), EgtMsg(5315), MessageBoxButton.OK, MessageBoxImage.Warning) + Else + m_bStopOnNextCollision = True + End If ' Se movimento non riuscito Else SetSimulationStatus(MCH_SIM_ST.UI_STOP) @@ -76,17 +96,26 @@ Public Class MySimulation ' Eventuale messaggio Select Case nMove Case MCH_SIM.END_ - StatusMsg = EgtMsg(MSG_SIMULATIONPAGEUC + 1) 'Simulazione completata + StatusMsg = EgtMsg(5301) 'Simulazione completata Case MCH_SIM.STOP_ ' Simulazione fermata dall'utente (non necessita messaggio) Case MCH_SIM.OUTSTROKE Dim sInfo As String = String.Empty EgtGetOutstrokeInfo(sInfo) - MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo, EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Extracorsa ... + 'Extracorsa ... + MessageBox.Show(EgtMsg(5302) & " " & sInfo, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Stop) Case MCH_SIM.DIR_ERR - MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 3), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Direzione utensile irraggiungibile + 'Direzione utensile irraggiungibile + MessageBox.Show(EgtMsg(5303), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Stop) Case Else - MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 4), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Errore + If EgtGetLastMachMgrErrorId() <> 0 Then + Dim sErr As String = EgtGetLastMachMgrErrorString() + '..... - Errore + MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation) + Else + 'Errore - Errore + MessageBox.Show(EgtMsg(5304), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Stop) + End If End Select End If ' Aggiorno stato visualizzazione macchina (dipende anche da utensile) @@ -94,14 +123,25 @@ Public Class MySimulation ' Aggiorno visualizzazione EgtDraw() ' Aggiorno dati CNC - ShowCncData() + If nShowDataCounter = 5 Or GetSimulationStatus() = MCH_SIM_ST.UI_PAUSE Or GetSimulationStatus() = MCH_SIM_ST.UI_STOP Then + ShowCncData() + nShowDataCounter = 0 + ElseIf nShowDataCounter > 5 Then + nShowDataCounter = 0 + Else + nShowDataCounter += 1 + End If Else ' Per evitare di ciclare rapidissimamente e consumare inutilmente CPU - System.Threading.Thread.Sleep(1) + System.Threading.Thread.Sleep(5) End If ' Costringo ad aggiornare UI UpdateUI() End While + SetSimExecuting(False) + If m_bSimulEndExitApp Then + refMainWindowVM.CloseApplication( Nothing) + End If End Sub Public Overrides Sub OnPostSetSimulationStatus(value As MCH_SIM_ST) @@ -126,6 +166,21 @@ Public Class MySimulation End If End Sub + Public Sub Update_CncData( nFlag As Integer) + ShowCncData() + ' Se fermo per Collisione rilevata da script Lua o per altra richiesta + If nFlag = 11 Or nFlag = 12 Then + ' Imposto stato Pausa + SetSimulationStatus(MCH_SIM_ST.UI_PAUSE) + StatusMsg = EgtMsg(5311) ' PAUSA + ' Aggiornamenti per bottone Play/Pause + SetShowPlay(True) + NotifyPropertyChanged("PlayPauseImage") + ' Se fermo per Collisione, dichiaro di non arrestarsi alla successiva notifica di collisione + If nFlag = 11 Then m_bStopOnNextCollision = False + End If + End Sub + #End Region ' METHODS End Class diff --git a/Icarus/SimulationPanel/SimulationPanelVM.vb b/Icarus/SimulationPanel/SimulationPanelVM.vb index d197c8b..17f6337 100644 --- a/Icarus/SimulationPanel/SimulationPanelVM.vb +++ b/Icarus/SimulationPanel/SimulationPanelVM.vb @@ -201,6 +201,10 @@ Public Class SimulationPanelVM Map.refInstrumentPanelVM.SetEdgeAnalysisIsEnabled(True) End Sub + Friend Sub SimulationExpander_Update_CncData( nFlag As Integer) + MySimul.Update_CncData(nFlag) + End Sub + #End Region ' METHODS #Region "COMMANDS" diff --git a/Icarus/StatusBar/MyStatusBarVM.vb b/Icarus/StatusBar/MyStatusBarVM.vb index 27d093e..3c9be56 100644 --- a/Icarus/StatusBar/MyStatusBarVM.vb +++ b/Icarus/StatusBar/MyStatusBarVM.vb @@ -165,10 +165,21 @@ Public Class MyStatusBarVM Friend Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer ' Se previsto, imposto progress If nProg > 0 Then SetLoadingProgress(Math.Min(nProg, 100)) + ' Se simulazione attiva, notifico aggiornamento dati + If Not IsNothing( Map.refSimulationPanelVM) Then + ' Uso i valori negativi del primo parametro come flag per la Simulazione + Dim nFlag As Integer = If( nProg < 0, -nProg, 0) + Map.refSimulationPanelVM.SimulationExpander_Update_CncData( nFlag) + End If ' Costringo ad aggiornare UpdateUI() ' Eventuale attesa - Thread.Sleep(nPause) + If nPause >= 0 Then + Thread.Sleep(nPause) + ' se altrimenti richiesto aggiornamento visualizzazione + ElseIf nPause = -1 + EgtDraw() + End If ' Ritorno eventuale stop If m_bStopProgress Then m_bStopProgress = False From 228a7513358159359ab7e8b219122b9d47090374 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 6 May 2026 12:16:01 +0200 Subject: [PATCH 52/53] Icarus 3.1e1 : - aggiunto parametro di lavorazione SingleLeadIn (default false). --- Icarus/Constants/Const3dPrint.vb | 1 + Icarus/CurrMachiningPanel/CurrMachining.vb | 9 ++++++++- Icarus/MachiningDb/Machining.vb | 8 ++++++++ Icarus/MainWindow/MainWindowM.vb | 4 ++-- Icarus/My Project/AssemblyInfo.vb | 4 ++-- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Icarus/Constants/Const3dPrint.vb b/Icarus/Constants/Const3dPrint.vb index e51d043..6410c44 100644 --- a/Icarus/Constants/Const3dPrint.vb +++ b/Icarus/Constants/Const3dPrint.vb @@ -94,6 +94,7 @@ Public Const MAC_INNERSHELLWIDTH = "InnerStrandW" Public Const MAC_OFFSETLEADPOINT = "OffsetLeadPoint" Public Const MAC_LEADIN = "LeadIn" + Public Const MAC_SINGLELEADIN = "SingleLeadIn" Public Const MAC_LEADINTANGDIST = "LeadInTangDist" Public Const MAC_LEADINORTHODIST = "LeadInOrthoDist" Public Const MAC_LEADOUT = "LeadOut" diff --git a/Icarus/CurrMachiningPanel/CurrMachining.vb b/Icarus/CurrMachiningPanel/CurrMachining.vb index 38e7209..7f75ef0 100644 --- a/Icarus/CurrMachiningPanel/CurrMachining.vb +++ b/Icarus/CurrMachiningPanel/CurrMachining.vb @@ -231,6 +231,7 @@ Public Class CurrMachiningCathegory New CurrComboMachiningParam(MachiningParam.Params.LINKTYPE, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.LINKPARAM, nPartId, nIndex, bForceFromDb, Me), New CurrComboMachiningParam(MachiningParam.Params.LEADIN, nPartId, nIndex, bForceFromDb, Me), + New CurrCheckMachiningParam(MachiningParam.Params.SINGLELEADIN, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.LEADINTANGDIST, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.LEADINORTHODIST, nPartId, nIndex, bForceFromDb, Me), New CurrComboMachiningParam(MachiningParam.Params.LEADOUT, nPartId, nIndex, bForceFromDb, Me), @@ -646,7 +647,7 @@ Public Class CurrNumericMachiningParam m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) Case Params.LINKPARAM, Params.INNERSHELLWIDTH, Params.OFFSETLEADPOINT, Params.LEADINTANGDIST, Params.LEADINORTHODIST, Params.LEADOUTTANGDIST, Params.LEADOUTORTHODIST, Params.COASTINGLEN, Params.COASTINGFEED_PC, - Params.WIPELEN, Params.WIPEFEED_PC, Params.SPIRALVASELEN ' Params.WIPEDIR + Params.WIPELEN, Params.WIPEFEED_PC, Params.SPIRALVASELEN, Params.SINGLELEADIN ' Params.WIPEDIR m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.LINK).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) Case Params.RIBSSTRANDWIDTH, Params.RIBSOVERLAP, Params.RIBSSTRANDOVERLAP, Params.RIBSSTRANDCOUNT, Params.RIBSLINK, Params.RIBSLINKFILLET, Params.RIBSMERGEWITHSHELL, Params.RIBSINVERTMERGEDSHELLMAINLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION, Params.RIBSLEADININVERT, Params.RIBSLEADINLEN, Params.RIBSLEADOUTINVERT, Params.RIBSLEADOUTLEN, Params.RIBSLEADOUTCOASTING, @@ -1212,6 +1213,8 @@ Public Class CurrCheckMachiningParam Select Case Type Case Params.SPIRALVASE bReadFromPart = EgtGetInfo(nPartId, MAC_SPIRALVASE, m_bValue) + Case Params.SINGLELEADIN + bReadFromPart = EgtGetInfo(nPartId, MAC_SINGLELEADIN, m_bValue) Case Params.RIBSLINK bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLINK, m_bValue) Case Params.RIBSMERGEWITHSHELL @@ -1241,6 +1244,8 @@ Public Class CurrCheckMachiningParam Select Case Type Case Params.SPIRALVASE m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) + Case Params.SINGLELEADIN + m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.LINK).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) Case Params.RIBSLINK, Params.RIBSMERGEWITHSHELL, Params.RIBSINVERTMERGEDSHELLMAINLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION, Params.RIBSINVERTSTRANDORDER, Params.RIBSLEADININVERT, Params.RIBSLEADOUTINVERT, Params.RIBSLIMITUNBOUNDEDWITHSOLID m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) Case Params.AUXSOLIDSINFILLLINK @@ -1259,6 +1264,8 @@ Public Class CurrCheckMachiningParam Select Case Type Case Params.SPIRALVASE EgtSetInfo(nPartId, MAC_SPIRALVASE, If(m_bValue, 1, 0)) + Case Params.SINGLELEADIN + EgtSetInfo(nPartId, MAC_SINGLELEADIN, If(m_bValue, 1, 0)) Case Params.RIBSLINK EgtSetInfo(nPartId, MAC_RIBSLINK, If(m_bValue, 1, 0)) Case Params.RIBSMERGEWITHSHELL diff --git a/Icarus/MachiningDb/Machining.vb b/Icarus/MachiningDb/Machining.vb index 25eecfc..62405b2 100644 --- a/Icarus/MachiningDb/Machining.vb +++ b/Icarus/MachiningDb/Machining.vb @@ -363,6 +363,7 @@ Public Class MachiningCathegory New ComboMachiningParam(MachiningParam.Params.LINKTYPE, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.LINKPARAM, nIndex, Me), New ComboMachiningParam(MachiningParam.Params.LEADIN, nIndex, Me), + New CheckMachiningParam(MachiningParam.Params.SINGLELEADIN, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.LEADINTANGDIST, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.LEADINORTHODIST, nIndex, Me), New ComboMachiningParam(MachiningParam.Params.LEADOUT, nIndex, Me), @@ -558,6 +559,7 @@ Public MustInherit Class MachiningParam WIPEFEED_PC = 63 INNERSHELLWIDTH = 64 SPIRALVASELEN = 65 + SINGLELEADIN = 66 'WIPEDIR = 64 RIBSTYPE = 101 RIBSOVERLAP = 102 @@ -693,6 +695,8 @@ Public MustInherit Class MachiningParam m_sName = "Offset Lead Point" Case Params.LEADIN m_sName = "Lead In" + Case Params.SINGLELEADIN + m_sName = "Single Lead In" Case Params.LEADINTANGDIST m_sName = "Lead In Tang Dist" Case Params.LEADINORTHODIST @@ -1763,6 +1767,8 @@ Public Class CheckMachiningParam Select Case Type Case Params.SPIRALVASE m_bValue = ReadMachiningParamDouble(nIndex, MAC_SPIRALVASE, 0) + Case Params.SINGLELEADIN + m_bValue = ReadMachiningParamDouble(nIndex, MAC_SINGLELEADIN, 0) Case Params.RIBSLINK m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLINK, 0) Case Params.RIBSMERGEWITHSHELL @@ -1804,6 +1810,8 @@ Public Class CheckMachiningParam Select Case Type Case Params.SPIRALVASE WriteMachiningParam(nIndex, MAC_SPIRALVASE, If(m_bValue, 1, 0), sFilePath) + Case Params.SINGLELEADIN + WriteMachiningParam(nIndex, MAC_SINGLELEADIN, If(m_bValue, 1, 0), sFilePath) Case Params.RIBSLINK WriteMachiningParam(nIndex, MAC_RIBSLINK, If(m_bValue, 1, 0), sFilePath) Case Params.RIBSMERGEWITHSHELL diff --git a/Icarus/MainWindow/MainWindowM.vb b/Icarus/MainWindow/MainWindowM.vb index c002b94..4522be5 100644 --- a/Icarus/MainWindow/MainWindowM.vb +++ b/Icarus/MainWindow/MainWindowM.vb @@ -191,8 +191,8 @@ Public Class MainWindowM EgtSetLockId( sLockId) End If ' Recupero livello e opzioni della chiave - Dim bKey As Boolean = EgtGetKeyLevel(5583, 3103, 1, m_nKeyLevel) And - EgtGetKeyOptions(5583, 3103, 1, m_nKeyOptions) + Dim bKey As Boolean = EgtGetKeyLevel(5583, 3105, 1, m_nKeyLevel) And + EgtGetKeyOptions(5583, 3105, 1, m_nKeyOptions) ' Inizializzazione generale di EgtInterface m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString()) diff --git a/Icarus/My Project/AssemblyInfo.vb b/Icarus/My Project/AssemblyInfo.vb index 09f171d..5b465cb 100644 --- a/Icarus/My Project/AssemblyInfo.vb +++ b/Icarus/My Project/AssemblyInfo.vb @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + From 21ff4be8ec6c25ca49c8cafec81c231539379d73 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 12 May 2026 10:18:39 +0200 Subject: [PATCH 53/53] Icarus : - aggiunta impostazione tolleranza di importazione da INI ( [Import] AdvToler=XXX) con default 0.1. --- Icarus/Constants/ConstIni.vb | 1 + Icarus/SceneHost/MySceneHostVM.vb | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Icarus/Constants/ConstIni.vb b/Icarus/Constants/ConstIni.vb index c63fef6..c1ae745 100644 --- a/Icarus/Constants/ConstIni.vb +++ b/Icarus/Constants/ConstIni.vb @@ -104,6 +104,7 @@ Public Module ConstIni Public Const K_STLSCALE As String = "StlScale" Public Const K_CNCFLAG As String = "CncFlag" Public Const K_ADVFLAG As String = "AdvFlag" + Public Const K_ADVTOLER As String = "AdvToler" 'Public Const S_SIMUL As String = "Simul" 'Public Const K_SLIDERX As String = "SliderX" diff --git a/Icarus/SceneHost/MySceneHostVM.vb b/Icarus/SceneHost/MySceneHostVM.vb index 6453392..7456dda 100644 --- a/Icarus/SceneHost/MySceneHostVM.vb +++ b/Icarus/SceneHost/MySceneHostVM.vb @@ -1244,6 +1244,8 @@ Public Class MySceneHostVM If nType = FT.OBJ Or nType = FT.IGES Or nType = FT.STEP_ Or nType = FT.ACIS Or nType = FT.PARASOLID Or nType = FT.JT Or nType = FT.VRML Or nType = FT.C3D Then nFlag = GetMainPrivateProfileInt(S_IMPORT, K_ADVFLAG, 0) + Dim dToler As Double = GetMainPrivateProfileDouble(S_IMPORT, K_ADVTOLER, 0.1) + MainController.SetAdvImpTolerance( dToler) Else nFlag = 0 End If