From c9102a56021d5ebcb5779ce10f82e125d7c7b350 Mon Sep 17 00:00:00 2001 From: DarioS Date: Fri, 17 Feb 2023 12:12:48 +0100 Subject: [PATCH 1/7] Icarus 2.5b3 : - ricompilazione con cambio versione. --- Icarus/My Project/AssemblyInfo.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Icarus/My Project/AssemblyInfo.vb b/Icarus/My Project/AssemblyInfo.vb index d97e750..7f91e30 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 f7b4f710ef5a6fa78e18f858c2eee565a1280e22 Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Fri, 3 Mar 2023 17:31:54 +0100 Subject: [PATCH 2/7] - introdotto check per limitare ribs unbounded al solido di stampa --- Icarus/Constants/Const3dPrint.vb | 1 + Icarus/CurrMachiningPanel/CurrMachining.vb | 9 +- Icarus/MachiningDb/Machining.vb | 125 +++++++++++---------- 3 files changed, 74 insertions(+), 61 deletions(-) diff --git a/Icarus/Constants/Const3dPrint.vb b/Icarus/Constants/Const3dPrint.vb index 40c303d..316a150 100644 --- a/Icarus/Constants/Const3dPrint.vb +++ b/Icarus/Constants/Const3dPrint.vb @@ -117,6 +117,7 @@ Public Const MAC_RIBSLEADOUTCOASTING = "RibsLeadOutCoasting" Public Const MAC_RIBSLEADOUTWIPE = "RibsLeadOutWipe" Public Const MAC_RIBSLEADOUTWIPEDIR = "RibsLeadOutWipeDir" + Public Const MAC_RIBSLIMITUNBOUNDEDWITHSOLID = "LimitUnboundedRibsWithSolid" Public Const MAC_SHELLNBRDIFFERENCE = "ShellNbrDifference" Public Const MAC_SHELLNBRCOASTING = "ShellNbrCoasting" Public Const MAC_SHELLNBRWIPE = "ShellNbrWipe" diff --git a/Icarus/CurrMachiningPanel/CurrMachining.vb b/Icarus/CurrMachiningPanel/CurrMachining.vb index 3b463c8..cbcda8f 100644 --- a/Icarus/CurrMachiningPanel/CurrMachining.vb +++ b/Icarus/CurrMachiningPanel/CurrMachining.vb @@ -248,7 +248,8 @@ Public Class CurrMachiningCathegory New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nPartId, nIndex, bForceFromDb), New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nPartId, nIndex, bForceFromDb), New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nPartId, nIndex, bForceFromDb), - New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nPartId, nIndex, bForceFromDb)}) + New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nPartId, nIndex, bForceFromDb), + New CurrNumericMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nPartId, nIndex, bForceFromDb)}) Case Cathegories.SHELL_NUMBER m_sName = "Reduce Shell Number" m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nPartId, nIndex, bForceFromDb), @@ -922,6 +923,8 @@ Public Class CurrCheckMachiningParam bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADININVERT, m_bValue) Case Params.RIBSLEADOUTINVERT bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTINVERT, m_bValue) + Case Params.RIBSLIMITUNBOUNDEDWITHSOLID + bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, m_bValue) End Select m_bOrigValue = m_bValue If nIndex > 0 Then @@ -929,7 +932,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 + Case Params.RIBSLINK, 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) End Select If bForceFromDb OrElse Not bReadFromPart Then @@ -955,6 +958,8 @@ Public Class CurrCheckMachiningParam EgtSetInfo(nPartId, MAC_RIBSLEADININVERT, If(m_bValue, 1, 0)) Case Params.RIBSLEADOUTINVERT EgtSetInfo(nPartId, MAC_RIBSLEADOUTINVERT, If(m_bValue, 1, 0)) + Case Params.RIBSLIMITUNBOUNDEDWITHSOLID + EgtSetInfo(nPartId, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, If(m_bValue, 1, 0)) End Select End Sub diff --git a/Icarus/MachiningDb/Machining.vb b/Icarus/MachiningDb/Machining.vb index c375813..9707b47 100644 --- a/Icarus/MachiningDb/Machining.vb +++ b/Icarus/MachiningDb/Machining.vb @@ -363,7 +363,8 @@ Public Class MachiningCathegory New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nIndex), New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nIndex), New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nIndex), - New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nIndex)}) + New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nIndex), + New CheckMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nIndex)}) Case Cathegories.SHELL_NUMBER m_sName = "Reduce Shell Number" m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nIndex), @@ -420,67 +421,67 @@ Public MustInherit Class MachiningParam Inherits VMBase Public Enum Params As Integer - NAME = 2 - SLICINGTYPE = 3 - STRANDH = 4 - STRANDW = 5 - STRANDCOUNT = 6 - OFFSET = 7 + SLICINGTYPE = 1 + SPIRALVASE = 2 + STRANDH = 3 + STRANDW = 4 + STRANDCOUNT = 5 + OFFSET = 6 + STRANDOVERLAP = 7 STARTPOINTOFFSETONSLICE = 8 STRANDORDER = 9 DIRECTION = 10 - LINKTYPE = 11 - LINKPARAM = 12 - LINKZUP = 13 - OFFSETLEADPOINT = 14 - LEADIN = 15 - LEADINTANGDIST = 16 - LEADINORTHODIST = 17 - LEADOUT = 18 - LEADOUTTANGDIST = 19 - LEADOUTORTHODIST = 20 - COASTINGLEN = 21 - COASTINGFEED_PC = 22 - WIPELEN = 23 - WIPEFEED_PC = 24 - FLOORCOUNT = 25 - G0FEED = 26 - G0FEEDZ = 27 - TOOLDIAM = 28 - RIBSTYPE = 29 - RIBSOVERLAP = 30 - RIBSSTRANDCOUNT = 31 - RIBSLINK = 32 - RIBSINVERTORDER = 33 - RIBSINVERTDIRECTION = 34 - RIBSLEADININVERT = 35 - RIBSLEADINLEN = 36 - RIBSLEADOUTINVERT = 37 - RIBSLEADOUTLEN = 38 - RIBSLEADOUTCOASTING = 39 - RIBSLEADOUTWIPE = 40 - RIBSLEADOUTWIPEDIR = 41 - SHELLNBRDIFFERENCE = 42 - SHELLNBRCOASTING = 43 - SHELLNBRWIPE = 44 - SHELLNBRWIPEDIR = 45 - AUXSOLIDSOVERLAP = 46 - AUXSOLIDSINFILL = 47 - AUXSOLIDSSTRANDORDER = 48 - AUXSOLIDSLINKTYPE = 49 - AUXSOLIDSLINKPARAM = 50 - AUXSOLIDSSTARTPOINTOFFSETONSLICE = 51 - AUXSOLIDSCOASTINGLEN = 52 - AUXSOLIDSWIPELEN = 53 - AUXSOLIDSWIPEDIR = 54 - SPIRALVASE = 55 - 'WIPEDIR = 56 - STRANDOVERLAP = 57 - FLOWRATE_PC = 58 - DYNAMIC_MODE = 59 - PRINT_ORDER = 60 - RIBSINVERTSTRANDORDER = 61 - MATERIALS = 100 + FLOORCOUNT = 11 + G0FEED = 12 + G0FEEDZ = 13 + TOOLDIAM = 14 + FLOWRATE_PC = 15 + DYNAMIC_MODE = 16 + PRINT_ORDER = 17 + LINKTYPE = 51 + LINKPARAM = 52 + LINKZUP = 53 + LEADIN = 54 + LEADINTANGDIST = 55 + LEADINORTHODIST = 56 + OFFSETLEADPOINT = 57 + LEADOUT = 58 + LEADOUTTANGDIST = 59 + LEADOUTORTHODIST = 60 + COASTINGLEN = 61 + COASTINGFEED_PC = 62 + WIPELEN = 63 + WIPEFEED_PC = 64 + 'WIPEDIR = 65 + RIBSTYPE = 101 + 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 + SHELLNBRDIFFERENCE = 151 + SHELLNBRCOASTING = 152 + SHELLNBRWIPE = 153 + SHELLNBRWIPEDIR = 154 + AUXSOLIDSOVERLAP = 201 + AUXSOLIDSINFILL = 202 + AUXSOLIDSSTRANDORDER = 203 + AUXSOLIDSLINKTYPE = 204 + AUXSOLIDSLINKPARAM = 205 + AUXSOLIDSSTARTPOINTOFFSETONSLICE = 206 + AUXSOLIDSCOASTINGLEN = 207 + AUXSOLIDSWIPELEN = 208 + AUXSOLIDSWIPEDIR = 209 + MATERIALS = 250 End Enum Protected m_Type As Params @@ -582,6 +583,8 @@ Public MustInherit Class MachiningParam m_sName = "Lead Out Wipe" Case Params.RIBSLEADOUTWIPEDIR m_sName = "Lead Out Wipe Dir [deg]" + Case Params.RIBSLIMITUNBOUNDEDWITHSOLID + m_sName = "Limit Unbounded With Solid" Case Params.SHELLNBRDIFFERENCE m_sName = "Difference" Case Params.SHELLNBRCOASTING @@ -1168,6 +1171,8 @@ Public Class CheckMachiningParam m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLEADININVERT, 0) Case Params.RIBSLEADOUTINVERT m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLEADOUTINVERT, 0) + Case Params.RIBSLIMITUNBOUNDEDWITHSOLID + m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, 0) End Select End If m_bOrigValue = m_bValue @@ -1189,6 +1194,8 @@ Public Class CheckMachiningParam WriteMachiningParam(nIndex, MAC_RIBSLEADININVERT, If(m_bValue, 1, 0), sFilePath) Case Params.RIBSLEADOUTINVERT WriteMachiningParam(nIndex, MAC_RIBSLEADOUTINVERT, If(m_bValue, 1, 0), sFilePath) + Case Params.RIBSLIMITUNBOUNDEDWITHSOLID + WriteMachiningParam(nIndex, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, If(m_bValue, 1, 0), sFilePath) End Select End Sub From becbf3c68274fb93ce364a7bbd3070104b2331de Mon Sep 17 00:00:00 2001 From: DarioS Date: Fri, 3 Mar 2023 19:59:19 +0100 Subject: [PATCH 3/7] Icarus 2.5c1 : - eliminati alcuni crash - in geometrie si chiude Edit dopo aver cancellato l'ultima - piccoli aggiustamenti ai tooltip. --- Icarus/CurrMachiningPanel/CurrMachining.vb | 2 +- Icarus/FilledSolidPanel/FilledSolidPanelVM.vb | 2 + .../ImportExportMachiningPanelVM.vb | 2 +- Icarus/My Project/AssemblyInfo.vb | 4 +- Icarus/OptionsWindow/OptionWindowVM.vb | 2 +- Icarus/ProjManager/ProjManagerVM.vb | 26 ++++--------- Icarus/RibPanel/RibPanelVM.vb | 2 + Icarus/ShellNumberPanel/ShellNumberPanelVM.vb | 2 + Icarus/SliceManager/SliceManagerVM.vb | 1 + Icarus/StartMachPanel/StartMachPanelVM.vb | 2 + Icarus/ViewPanel/ViewPanelV.xaml | 4 +- Icarus/ViewPanel/ViewPanelVM.vb | 38 ++++++++++++------- 12 files changed, 49 insertions(+), 38 deletions(-) diff --git a/Icarus/CurrMachiningPanel/CurrMachining.vb b/Icarus/CurrMachiningPanel/CurrMachining.vb index cbcda8f..afe57de 100644 --- a/Icarus/CurrMachiningPanel/CurrMachining.vb +++ b/Icarus/CurrMachiningPanel/CurrMachining.vb @@ -249,7 +249,7 @@ Public Class CurrMachiningCathegory New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nPartId, nIndex, bForceFromDb), New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nPartId, nIndex, bForceFromDb), New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nPartId, nIndex, bForceFromDb), - New CurrNumericMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nPartId, nIndex, bForceFromDb)}) + New CurrCheckMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nPartId, nIndex, bForceFromDb)}) Case Cathegories.SHELL_NUMBER m_sName = "Reduce Shell Number" m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nPartId, nIndex, bForceFromDb), diff --git a/Icarus/FilledSolidPanel/FilledSolidPanelVM.vb b/Icarus/FilledSolidPanel/FilledSolidPanelVM.vb index 08d2cc3..70a2efc 100644 --- a/Icarus/FilledSolidPanel/FilledSolidPanelVM.vb +++ b/Icarus/FilledSolidPanel/FilledSolidPanelVM.vb @@ -772,6 +772,8 @@ Public Class FilledSolidPanelVM SelFilledSolid = m_FilledSolidList(m_FilledSolidList.Count - 1) Else SelFilledSolid = Nothing + m_bEdit_IsChecked = False + NotifyPropertyChanged(NameOf( bEdit_IsChecked)) End If NotifyPropertyChanged(NameOf(SelFilledSolid)) End If diff --git a/Icarus/ImportExportMachiningPanel/ImportExportMachiningPanelVM.vb b/Icarus/ImportExportMachiningPanel/ImportExportMachiningPanelVM.vb index d679f5d..6c950c2 100644 --- a/Icarus/ImportExportMachiningPanel/ImportExportMachiningPanelVM.vb +++ b/Icarus/ImportExportMachiningPanel/ImportExportMachiningPanelVM.vb @@ -264,7 +264,7 @@ Public Class ImportExportMachiningPanelVM Select Case m_WindowType Case WindowTypeEnum.MATERIAL Return Map.refMaterialDbVM.MaterialList.Any(Function(x) x.sName = MachiningName) - Case WindowTypeEnum.MACHINING + Case Else ' WindowTypeEnum.MACHINING Return Map.refMachiningDbVM.MachiningList.Any(Function(x) x.sName = MachiningName) End Select End Function diff --git a/Icarus/My Project/AssemblyInfo.vb b/Icarus/My Project/AssemblyInfo.vb index 7f91e30..c108264 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 655e310..60438fc 100644 --- a/Icarus/OptionsWindow/OptionWindowVM.vb +++ b/Icarus/OptionsWindow/OptionWindowVM.vb @@ -1133,7 +1133,7 @@ Public Class OptionWindowVM ' aggiungo i file della Macchina Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sCurrMachineName If Directory.Exists(sMachineDir) Then - zip.AddItem(sMachineDir, sCurrMachineName) + zip.AddSelectedFiles( "name != *\.git\*.* and name != *.git*", sMachineDir, sCurrMachineName, True) End If ' salvo lo zip zip.Save() diff --git a/Icarus/ProjManager/ProjManagerVM.vb b/Icarus/ProjManager/ProjManagerVM.vb index 8458854..388ef98 100644 --- a/Icarus/ProjManager/ProjManagerVM.vb +++ b/Icarus/ProjManager/ProjManagerVM.vb @@ -88,34 +88,24 @@ Public Class ProjManagerVM Return EgtMsg(MSG_TOPCOMMANDBAR + 4) End Get End Property - Public ReadOnly Property InsertToolTip As String + Public ReadOnly Property ImportToolTip As String Get - Return EgtMsg(MSG_TOPCOMMANDBAR + 5) + Return "Import" End Get End Property - Public ReadOnly Property ImportBTL_ToolTip As String + Public ReadOnly Property ExportToolTip As String Get - Return EgtMsg(61840) + Return "Export" End Get End Property - Public ReadOnly Property UpdateBTL_ToolTip As String + Public ReadOnly Property OptionsToolTip As String Get - Return EgtMsg(61834) + Return "Options" End Get End Property - Public ReadOnly Property ExportProject_ToolTip As String + Public ReadOnly Property SendFeedbackToolTip As String Get - Return EgtMsg(61838) - End Get - End Property - Public ReadOnly Property ImportProject_ToolTip As String - Get - Return EgtMsg(61839) - End Get - End Property - Public ReadOnly Property GoToProd_ToolTip As String - Get - Return EgtMsg(61835) + Return "Send Feedback" End Get End Property diff --git a/Icarus/RibPanel/RibPanelVM.vb b/Icarus/RibPanel/RibPanelVM.vb index 22a65c4..d0c5130 100644 --- a/Icarus/RibPanel/RibPanelVM.vb +++ b/Icarus/RibPanel/RibPanelVM.vb @@ -794,6 +794,8 @@ Public Class RibPanelVM SelRib = m_RibList(m_RibList.Count - 1) Else SelRib = Nothing + m_bEdit_IsChecked = False + NotifyPropertyChanged(NameOf( bEdit_IsChecked)) End If NotifyPropertyChanged(NameOf(SelRib)) End If diff --git a/Icarus/ShellNumberPanel/ShellNumberPanelVM.vb b/Icarus/ShellNumberPanel/ShellNumberPanelVM.vb index 97ba11d..03408d0 100644 --- a/Icarus/ShellNumberPanel/ShellNumberPanelVM.vb +++ b/Icarus/ShellNumberPanel/ShellNumberPanelVM.vb @@ -777,6 +777,8 @@ Public Class ShellNumberPanelVM SelShellNumber = m_ShellNumberList(m_ShellNumberList.Count - 1) Else SelShellNumber = Nothing + m_bEdit_IsChecked = False + NotifyPropertyChanged(NameOf( bEdit_IsChecked)) End If NotifyPropertyChanged(NameOf(SelShellNumber)) End If diff --git a/Icarus/SliceManager/SliceManagerVM.vb b/Icarus/SliceManager/SliceManagerVM.vb index 1fe7722..232d8f6 100644 --- a/Icarus/SliceManager/SliceManagerVM.vb +++ b/Icarus/SliceManager/SliceManagerVM.vb @@ -132,6 +132,7 @@ Public Class SliceManagerVM Dim b3Print As BBox3d = Map.refDispositionPanelVM.GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart) Return "[ " & DoubleToString(b3Print.DimX, 1) & " x " & DoubleToString(b3Print.DimY, 1) & " x " & DoubleToString(b3Print.DimZ, 1) & " ]" End If + Return "" End Get End Property Friend Sub UpdateDimensions() diff --git a/Icarus/StartMachPanel/StartMachPanelVM.vb b/Icarus/StartMachPanel/StartMachPanelVM.vb index eacae1a..56d713a 100644 --- a/Icarus/StartMachPanel/StartMachPanelVM.vb +++ b/Icarus/StartMachPanel/StartMachPanelVM.vb @@ -912,6 +912,8 @@ Public Class StartMachPanelVM SelStart = m_StartList(m_StartList.Count - 1) Else SelStart = Nothing + m_bEdit_IsChecked = False + NotifyPropertyChanged(NameOf( bEdit_IsChecked)) End If NotifyPropertyChanged(NameOf(SelStart)) End If diff --git a/Icarus/ViewPanel/ViewPanelV.xaml b/Icarus/ViewPanel/ViewPanelV.xaml index cff3a79..2145760 100644 --- a/Icarus/ViewPanel/ViewPanelV.xaml +++ b/Icarus/ViewPanel/ViewPanelV.xaml @@ -59,8 +59,8 @@ - + diff --git a/Icarus/SliceManager/SliceManagerVM.vb b/Icarus/SliceManager/SliceManagerVM.vb index 232d8f6..01db0c6 100644 --- a/Icarus/SliceManager/SliceManagerVM.vb +++ b/Icarus/SliceManager/SliceManagerVM.vb @@ -32,6 +32,9 @@ Public Class SliceManagerVM ' Funzioni di callback per output in interfaccia da LUA Private m_ProcEventsCallback As New ProcessEventsCallback(AddressOf ProcessEvents) + Private m_bStopScript As Boolean = False + Private m_bStopScriptToManage As Boolean = False + Private m_bSlice As Boolean = False Private m_bCalcTFS As Boolean = False Private m_bGenerate As Boolean = False @@ -178,6 +181,7 @@ Public Class SliceManagerVM ' Definizione comandi Private m_cmdSlice As ICommand + Private m_cmdStopCalculation As ICommand Private m_cmdSimulate As ICommand Private m_cmdUpdate As ICommand Private m_cmdGenerate As ICommand @@ -290,13 +294,14 @@ Public Class SliceManagerVM UpdateUI() ' Eventuale attesa Threading.Thread.Sleep(nPause) - '' Ritorno eventuale stop - 'If m_bStopScript Then - ' m_bStopScript = False - ' Return 1 - 'Else - ' Return 0 - 'End If + ' Ritorno eventuale stop + If m_bStopScript Then + m_bStopScript = False + m_bStopScriptToManage = True + Return 1 + Else + Return 0 + End If Return 0 End Function @@ -370,8 +375,8 @@ Public Class SliceManagerVM Dim nCurrPartId As Integer = EgtGetFirstPart() While nCurrPartId <> GDB_ID.NULL ' eseguo rimozione flag - If m_bSlice Then EgtRemoveInfo(nCurrPartId, MAC_TORECALC_SLICE) - If m_bCalcTFS Then EgtRemoveInfo(nCurrPartId, MAC_TORECALC_TFS) + If m_bSlice AndAlso Not m_bStopScriptToManage Then EgtRemoveInfo(nCurrPartId, MAC_TORECALC_SLICE) + If m_bCalcTFS AndAlso Not m_bStopScriptToManage Then EgtRemoveInfo(nCurrPartId, MAC_TORECALC_TFS) nCurrPartId = EgtGetNextPart(nCurrPartId) End While ' aggiorno massa @@ -538,19 +543,52 @@ Public Class SliceManagerVM m_bCalculating = False Return End If - ' esco da altre pagine - Map.refTopPanelVM.SelPage = Pages.NULL + '' esco da altre pagine + 'Dim PreviousPage As Pages = Map.refTopPanelVM.SelPage ' eseguo calcoli CalcSlice(False) - Map.refTopPanelVM.SelPage = Pages.SLICE - Map.refSliderManagerVM.SetLayerIndexToMax() - NotifyPropertyChanged(NameOf(Time_Visibility)) - NotifyPropertyChanged(NameOf(Mass_Visibility)) + ' se non ho interrotto calcoli + If Not m_bStopScriptToManage Then + Map.refTopPanelVM.SelPage = Pages.NULL + Map.refTopPanelVM.SelPage = Pages.SLICE + Map.refSliderManagerVM.SetLayerIndexToMax() + NotifyPropertyChanged(NameOf(Time_Visibility)) + NotifyPropertyChanged(NameOf(Mass_Visibility)) + 'Else + ' Map.refTopPanelVM.SelPage = PreviousPage + Else + m_bStopScriptToManage = False + End If m_bCalculating = False End Sub #End Region ' Slice +#Region "StopCalculation" + + ''' + ''' Returns a command that do CPlaneTop. + ''' + Public ReadOnly Property StopCalculation_Command As ICommand + Get + If m_cmdStopCalculation Is Nothing Then + m_cmdStopCalculation = New Command(AddressOf StopCalculation) + End If + Return m_cmdStopCalculation + End Get + End Property + + ''' + ''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand. + ''' + Public Sub StopCalculation() + If Not m_bCalculating Then Return + m_bStopScript = True + m_bCalculating = False + End Sub + +#End Region ' StopCalculation + #Region "Update" ''' @@ -573,8 +611,13 @@ Public Class SliceManagerVM m_bCalculating = True ' eseguo calcoli CalcSlice(False) - NotifyPropertyChanged(NameOf(Time_Visibility)) - NotifyPropertyChanged(NameOf(Mass_Visibility)) + ' se non ho interrotto calcoli + If Not m_bStopScriptToManage Then + NotifyPropertyChanged(NameOf(Time_Visibility)) + NotifyPropertyChanged(NameOf(Mass_Visibility)) + Else + m_bStopScriptToManage = False + End If m_bCalculating = False End Sub @@ -647,17 +690,22 @@ Public Class SliceManagerVM End If ' eseguo calcoli CalcSlice(True, True) - If bShiftPressed Then - ' Se esiste ne lancio l'editing - If File.Exists(sIsoFilePath) Then - Process.Start("Notepad.exe", sIsoFilePath) - ' altrimenti lo segnalo - Else - MessageBox.Show("Edit failed, missing part program file" & " (" & sIsoFilePath & ")") + ' se non ho interrotto calcoli + If Not m_bStopScriptToManage Then + If bShiftPressed Then + ' Se esiste ne lancio l'editing + If File.Exists(sIsoFilePath) Then + Process.Start("Notepad.exe", sIsoFilePath) + ' altrimenti lo segnalo + Else + MessageBox.Show("Edit failed, missing part program file" & " (" & sIsoFilePath & ")") + End If End If + NotifyPropertyChanged(NameOf(Time_Visibility)) + NotifyPropertyChanged(NameOf(Mass_Visibility)) + Else + m_bStopScriptToManage = False End If - NotifyPropertyChanged(NameOf(Time_Visibility)) - NotifyPropertyChanged(NameOf(Mass_Visibility)) m_bCalculating = False End Sub @@ -685,10 +733,15 @@ Public Class SliceManagerVM ' eseguo calcoli CalcSlice(True) m_bCalculating = False - ' verifico esistenza e correttezza machgroup - InitMachGroup(False) - ' apro simulazione - Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.SIMULATION) + ' se non ho interrotto calcoli + If Not m_bStopScriptToManage Then + ' verifico esistenza e correttezza machgroup + InitMachGroup(False) + ' apro simulazione + Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.SIMULATION) + Else + m_bStopScriptToManage = False + End If End Sub #End Region ' Simulate From cbedfdc767bd82b30f4326fb767273a5ee35158b Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Mon, 13 Mar 2023 10:19:03 +0100 Subject: [PATCH 5/7] - correzione visibilita' pezzi durante importazione - scrittura flag visibilita' anche per le pagine diverse da modify e slice --- Icarus/ManagePartPanel/ManagePartPanelVM.vb | 27 ++++++++++++------- Icarus/ViewLayerManager/ViewLayerManagerVM.vb | 2 +- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/Icarus/ManagePartPanel/ManagePartPanelVM.vb b/Icarus/ManagePartPanel/ManagePartPanelVM.vb index 388f587..7f3bc53 100644 --- a/Icarus/ManagePartPanel/ManagePartPanelVM.vb +++ b/Icarus/ManagePartPanel/ManagePartPanelVM.vb @@ -316,8 +316,9 @@ Public Class ManagePartPanelVM EgtRelocateGlob(PrintSolidEntity.nId, nPrintPartLayerId, GDB_POS.LAST_SON) ' calcolo box superficie per creazione riferimento EgtGetBBoxGlob(PrintSolidEntity.nId, GDB_BB.STANDARD, b3PrintSolid) - ' elimino colore entita' + ' elimino colore entita' e rendo visibile EgtResetColor(PrintSolidEntity.nId) + EgtSetStatus(PrintSolidEntity.nId, GDB_ST.ON_) If PrintSolidEntity.sName <> PrintSolidEntity.nId.ToString() Then EgtSetInfo(PrintSolidEntity.nId, ENTITY_NAME, PrintSolidEntity.sName) End If @@ -341,8 +342,9 @@ Public Class ManagePartPanelVM nMachStartId = EgtCreateCurveCompo(nMachStartLayerId, PartManager_GeomEntity.nId, True) End Select EgtSetName(nMachStartId, START_GEOM) - ' elimino colore entita' + ' elimino colore entita' e rendo visibile EgtResetColor(nMachStartId) + EgtSetStatus(nMachStartId, GDB_ST.ON_) If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName) End If @@ -352,8 +354,9 @@ Public Class ManagePartPanelVM Dim ptStart As Point3d = b3PrintSolid.Center() - 0.6 * b3PrintSolid.DimY() * Vector3d.Y_AX() - 0.5 * b3PrintSolid.DimZ() * Vector3d.Z_AX() nMachStartId = EgtCreateGeoPoint(nMachStartLayerId, ptStart, GDB_RT.GLOB) EgtSetName(nMachStartId, START_GEOM) - ' elimino colore entita' + ' elimino colore entita' e rendo visibile EgtResetColor(nMachStartId) + EgtSetStatus(nMachStartId, GDB_ST.ON_) End If Case ManagePart_Layer.LayerType.RIBS nRibsLayerId = EgtCreateGroup(nPartId) @@ -364,8 +367,9 @@ Public Class ManagePartPanelVM EgtSetInfo(PartManager_GeomEntity.nId, KEY_RIB_TYPE, RibEntity.RibTypes.FROMIMPORT) EgtSetInfo(PartManager_GeomEntity.nId, RIB_ID, nRibsIndex) EgtRelocateGlob(PartManager_GeomEntity.nId, nRibsLayerId, GDB_POS.LAST_SON) - ' elimino colore entita' + ' elimino colore entita' e rendo visibile EgtResetColor(PartManager_GeomEntity.nId) + EgtSetStatus(PartManager_GeomEntity.nId, GDB_ST.ON_) If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName) End If @@ -380,8 +384,9 @@ Public Class ManagePartPanelVM EgtSetInfo(PartManager_GeomEntity.nId, KEY_SHELLNBR_TYPE, ShellNumberEntity.ShellNumberTypes.FROMIMPORT) EgtSetInfo(PartManager_GeomEntity.nId, SHELLNUMBER_ID, nShellNumberIndex) EgtRelocateGlob(PartManager_GeomEntity.nId, nShellNumberLayerId, GDB_POS.LAST_SON) - ' elimino colore entita' + ' elimino colore entita' e rendo visibile EgtResetColor(PartManager_GeomEntity.nId) + EgtSetStatus(PartManager_GeomEntity.nId, GDB_ST.ON_) If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName) End If @@ -396,8 +401,9 @@ Public Class ManagePartPanelVM EgtSetInfo(PartManager_GeomEntity.nId, KEY_AUXSOLID_TYPE, RibEntity.RibTypes.FROMIMPORT) EgtSetInfo(PartManager_GeomEntity.nId, FILLEDSOLID_ID, nFilledSolidIndex) EgtRelocateGlob(PartManager_GeomEntity.nId, nAuxSolidsLayerId, GDB_POS.LAST_SON) - ' elimino colore entita' + ' elimino colore entita' e rendo visibile EgtResetColor(PartManager_GeomEntity.nId) + EgtSetStatus(PartManager_GeomEntity.nId, GDB_ST.ON_) If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName) End If @@ -409,8 +415,9 @@ Public Class ManagePartPanelVM EgtSetColor(nOthersLayerId, GeomEntityColors.c3Others) For Each PartManager_GeomEntity In ManagePart_Layer.EntityList EgtRelocateGlob(PartManager_GeomEntity.nId, nOthersLayerId, GDB_POS.LAST_SON) - ' elimino colore entita' + ' elimino colore entita' e rendo visibile EgtResetColor(PartManager_GeomEntity.nId) + EgtSetStatus(PartManager_GeomEntity.nId, GDB_ST.ON_) If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName) End If @@ -423,16 +430,18 @@ Public Class ManagePartPanelVM Case GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_LINE ' la trasformo in curva compo Dim nOtherId As Integer = EgtCreateCurveCompo(nOthersLayerId, PartManager_GeomEntity.nId, True) - ' elimino colore entita' + ' elimino colore entita' e rendo visibile EgtResetColor(PartManager_GeomEntity.nId) + EgtSetStatus(PartManager_GeomEntity.nId, GDB_ST.ON_) If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then EgtSetInfo(nOtherId, ENTITY_NAME, PartManager_GeomEntity.sName) End If Case Else ' altrimenti la sposto solamente EgtRelocateGlob(PartManager_GeomEntity.nId, nOthersLayerId, GDB_POS.LAST_SON) - ' elimino colore entita' + ' elimino colore entita' e rendo visibile EgtResetColor(PartManager_GeomEntity.nId) + EgtSetStatus(PartManager_GeomEntity.nId, GDB_ST.ON_) If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName) End If diff --git a/Icarus/ViewLayerManager/ViewLayerManagerVM.vb b/Icarus/ViewLayerManager/ViewLayerManagerVM.vb index 12ae2a6..6793b7d 100644 --- a/Icarus/ViewLayerManager/ViewLayerManagerVM.vb +++ b/Icarus/ViewLayerManager/ViewLayerManagerVM.vb @@ -328,7 +328,7 @@ Public Class ViewLayer Friend Sub WriteIsVisibleToIni() Dim nStatus As Integer = If(m_IsVisible, 1, 0) Select Case Map.refTopPanelVM.SelPage - Case Pages.MODIFY + Case Pages.IMPORT, Pages.MODIFY, Pages.MATERIALDB, Pages.MACHININGDB, Pages.CURRMACHINING, Pages.MODIFYPART Select Case m_Type Case ViewLayerType.PRINT_SOLID WriteMainPrivateProfileString(S_VIEWLAYER, K_MOD_PRINTSOLID, nStatus) From 0c2a5343eebe8c5976167d3776793fcc6cef4dcb Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Mon, 13 Mar 2023 16:20:28 +0100 Subject: [PATCH 6/7] - disabilitato tutto quando sta importando progetto - gestiti frame del pezzo e di stampa con z = 0 --- Icarus/Constants/Const3dPrint.vb | 1 + Icarus/DispositionPanel/DispositionPanelVM.vb | 6 ++--- Icarus/ManagePartPanel/ManagePartPanelVM.vb | 4 ++- Icarus/ManagePartPanel/ManagePartUtility.vb | 4 ++- Icarus/ReferencePanel/ReferencePanelVM.vb | 4 +++ Icarus/SceneHost/MySceneHostVM.vb | 25 ++++++++++++++++++- Icarus/ViewModel/Print3dPartVM.vb | 23 +++++++++++++++-- 7 files changed, 59 insertions(+), 8 deletions(-) diff --git a/Icarus/Constants/Const3dPrint.vb b/Icarus/Constants/Const3dPrint.vb index 316a150..163f2db 100644 --- a/Icarus/Constants/Const3dPrint.vb +++ b/Icarus/Constants/Const3dPrint.vb @@ -5,6 +5,7 @@ Public Const PART = "Part" Public Const PRINT_SOLID = "PrintSolid" Public Const LAY_MACH_START = "MachStart" + Public Const LAY_PARTREFERENCE = "PartFrame" Public Const LAY_REFERENCE = "Frame" Public Const LAY_OTHERS = "Aux" Public Const LAY_RIBS = "Ribs" diff --git a/Icarus/DispositionPanel/DispositionPanelVM.vb b/Icarus/DispositionPanel/DispositionPanelVM.vb index 2c1d57c..3321944 100644 --- a/Icarus/DispositionPanel/DispositionPanelVM.vb +++ b/Icarus/DispositionPanel/DispositionPanelVM.vb @@ -87,7 +87,7 @@ Public Class DispositionPanelVM Get If Not IsNothing(Map.refTopPanelVM.SelPart) Then Dim ptReference As New Point3d - EgtStartPoint(Map.refTopPanelVM.SelPart.nReferenceId, GDB_ID.ROOT, ptReference) + EgtStartPoint(Map.refTopPanelVM.SelPart.nPartReferenceId, GDB_ID.ROOT, ptReference) Return LenToString(ptReference.z, 1) Else Return "" @@ -95,7 +95,7 @@ Public Class DispositionPanelVM End Get Set(value As String) Dim ptReference As New Point3d - EgtStartPoint(Map.refTopPanelVM.SelPart.nReferenceId, GDB_ID.ROOT, ptReference) + EgtStartPoint(Map.refTopPanelVM.SelPart.nPartReferenceId, GDB_ID.ROOT, ptReference) Dim dNewZPos As Double = ptReference.z StringToLen(value, dNewZPos) Dim b3Print As BBox3d = GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart) @@ -118,7 +118,7 @@ Public Class DispositionPanelVM Friend Sub UpdateZPos() Dim ptReference As New Point3d - EgtStartPoint(Map.refTopPanelVM.SelPart.nReferenceId, GDB_ID.ROOT, ptReference) + EgtStartPoint(Map.refTopPanelVM.SelPart.nPartReferenceId, GDB_ID.ROOT, ptReference) Dim dNewZPos As Double = ptReference.z Dim b3Print As BBox3d = GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart) Dim dMin As Double = 0 diff --git a/Icarus/ManagePartPanel/ManagePartPanelVM.vb b/Icarus/ManagePartPanel/ManagePartPanelVM.vb index 7f3bc53..4758342 100644 --- a/Icarus/ManagePartPanel/ManagePartPanelVM.vb +++ b/Icarus/ManagePartPanel/ManagePartPanelVM.vb @@ -451,6 +451,8 @@ Public Class ManagePartPanelVM End Select Next ' aggiungo layer riferimento + Dim nPartReferenceLayerId As Integer = EgtCreateGroup(nPartId) + EgtSetName(nPartReferenceLayerId, LAY_PARTREFERENCE) Dim nReferenceLayerId As Integer = EgtCreateGroup(nPartId) EgtSetName(nReferenceLayerId, LAY_REFERENCE) EgtSetInfo(nReferenceLayerId, KEY_REFERENCE, ReferenceBtn.References.BL) @@ -462,7 +464,7 @@ Public Class ManagePartPanelVM EgtSetInfo(nPartId, FILE_PATH, sFilePath) EgtSetInfo(nPartId, PART_NAME, ManagePart_Part.sName) EgtSetInfo(nPartId, "PartOnTable", 1) - Dim NewPart As New Print3dPartVM(nPartId, nPrintPartLayerId, nReferenceLayerId, nFrameId, nMachStartLayerId, nRibsLayerId, nShellNumberLayerId, nAuxSolidsLayerId, nOthersLayerId, sFilePath) + Dim NewPart As New Print3dPartVM(nPartId, nPrintPartLayerId, nPartReferenceLayerId, nReferenceLayerId, nFrameId, nMachStartLayerId, nRibsLayerId, nShellNumberLayerId, nAuxSolidsLayerId, nOthersLayerId, sFilePath) Map.refTopPanelVM.PartList.Add(NewPart) ' aggiorno riferimento Map.refReferencePanelVM.UpdateFramePosition(NewPart) diff --git a/Icarus/ManagePartPanel/ManagePartUtility.vb b/Icarus/ManagePartPanel/ManagePartUtility.vb index cb96f95..8153cf2 100644 --- a/Icarus/ManagePartPanel/ManagePartUtility.vb +++ b/Icarus/ManagePartPanel/ManagePartUtility.vb @@ -718,6 +718,8 @@ Public Class GeomEntity_MenuItem EgtSetName(nOthersLayerId, LAY_OTHERS) EgtSetColor(nOthersLayerId, GeomEntityColors.c3Others) ' aggiungo riferimento + Dim nPartReferenceLayerId As Integer = EgtCreateGroup(nPartId) + EgtSetName(nPartReferenceLayerId, LAY_PARTREFERENCE) Dim nReferenceLayerId As Integer = EgtCreateGroup(nPartId) EgtSetName(nReferenceLayerId, LAY_REFERENCE) EgtSetInfo(nReferenceLayerId, KEY_REFERENCE, ReferenceBtn.References.BL) @@ -726,7 +728,7 @@ Public Class GeomEntity_MenuItem ' lo aggiungo a lista pezzi EgtSetInfo(nPartId, FILE_PATH, sFilePath) EgtSetInfo(nPartId, "PartOnTable", 1) - Dim NewPart As New Print3dPartVM(nPartId, nPrintPartLayerId, nReferenceLayerId, nFrameId, nMachStartLayerId, nRibsLayerId, nShellNumberLayerId, nAuxSolidsLayerId, nOthersLayerId, sFilePath) + Dim NewPart As New Print3dPartVM(nPartId, nPrintPartLayerId, nPartReferenceLayerId, nReferenceLayerId, nFrameId, nMachStartLayerId, nRibsLayerId, nShellNumberLayerId, nAuxSolidsLayerId, nOthersLayerId, sFilePath) Map.refTopPanelVM.PartList.Add(NewPart) ' aggiorno riferimento Map.refReferencePanelVM.UpdateFramePosition(NewPart) diff --git a/Icarus/ReferencePanel/ReferencePanelVM.vb b/Icarus/ReferencePanel/ReferencePanelVM.vb index a6cd4de..e095825 100644 --- a/Icarus/ReferencePanel/ReferencePanelVM.vb +++ b/Icarus/ReferencePanel/ReferencePanelVM.vb @@ -115,6 +115,10 @@ Public Class ReferencePanelVM ElseIf EgtGetInfo(SelPart.nPartId, KEY_MOVEDPART2, vtMovedPart) Then ptOrig = ptOrig - vtMovedPart End If + Dim nPartFrameId As Integer = EgtCreateGeoFrame(SelPart.nPartReferenceLayerId, New Frame3d(ptOrig), GDB_RT.GLOB) + EgtSetStatus(nPartFrameId, GDB_ST.OFF) + ' elimino componente Z + ptOrig = ptOrig + New Vector3d(0, 0, -ptOrig.z) frPrintSolid = New Frame3d(ptOrig) End If Dim nFrameId As Integer = EgtCreateGeoFrame(SelPart.nReferenceLayerId, frPrintSolid, GDB_RT.GLOB) diff --git a/Icarus/SceneHost/MySceneHostVM.vb b/Icarus/SceneHost/MySceneHostVM.vb index 36ba98a..3f7450e 100644 --- a/Icarus/SceneHost/MySceneHostVM.vb +++ b/Icarus/SceneHost/MySceneHostVM.vb @@ -329,6 +329,15 @@ Public Class MySceneHostVM WriteMainPrivateProfileString(S_PRINTING3D, K_IMPORTCURREXTENSION, OpenFileDialog.FilterIndex) Dim sFile As String = String.Empty sFile = OpenFileDialog.FileName + ' 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) + Map.refSliceManagerVM.SetButtonsIsEnabled(False) + Map.refInstrumentPanelVM.SetEdgeAnalysisIsEnabled(False) ' importo la nuova geometria If MainController.InsertProject(sFile, False) Then ' la sposto in centro tavola @@ -340,6 +349,15 @@ Public Class MySceneHostVM Map.refTopPanelVM.SelPage = Pages.IMPORT End If EgtDraw() + ' 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) + Map.refSliceManagerVM.SetButtonsIsEnabled(True) + Map.refInstrumentPanelVM.SetEdgeAnalysisIsEnabled(True) End Sub Public Sub InsertRib() @@ -1075,9 +1093,14 @@ Public Class MySceneHostVM Dim nOthersLayerId As Integer = EgtGetFirstNameInGroup(nPartId, LAY_OTHERS) Dim sFilePath As String = "" EgtGetInfo(nPartId, FILE_PATH, sFilePath) + Dim nPartReferenceLayerId As Integer = EgtGetFirstNameInGroup(nPartId, LAY_PARTREFERENCE) + If nPartReferenceLayerId = GDB_ID.NULL Then + nPartReferenceLayerId = EgtCreateGroup(nPartId) + EgtSetName(nPartReferenceLayerId, LAY_PARTREFERENCE) + End If Dim nReferenceLayerId As Integer = EgtGetFirstNameInGroup(nPartId, LAY_REFERENCE) Dim nFrameId As Integer = EgtGetFirstInGroup(nReferenceLayerId) - Dim NewPart As New Print3dPartVM(nPartId, nPrintPartLayerId, nReferenceLayerId, nFrameId, nMachStartLayerId, nRibsLayerId, nShellNumberLayerId, nAuxSolidsLayerId, nOthersLayerId, sFilePath) + Dim NewPart As New Print3dPartVM(nPartId, nPrintPartLayerId, nPartReferenceLayerId, nReferenceLayerId, nFrameId, nMachStartLayerId, nRibsLayerId, nShellNumberLayerId, nAuxSolidsLayerId, nOthersLayerId, sFilePath) Map.refTopPanelVM.PartList.Add(NewPart) Dim bPartToRecalc As Boolean = False EgtGetInfo(nPartId, MAC_TORECALC_SLICE, bPartToRecalc) diff --git a/Icarus/ViewModel/Print3dPartVM.vb b/Icarus/ViewModel/Print3dPartVM.vb index 0c27358..b6de868 100644 --- a/Icarus/ViewModel/Print3dPartVM.vb +++ b/Icarus/ViewModel/Print3dPartVM.vb @@ -25,7 +25,25 @@ Public Class Print3dPartVM End Get End Property - ' riferimento del solido/superficie di stampa + ' riferimento del pezzo solido/superficie da stampare + Private m_nPartReferenceLayerId As Integer = GDB_ID.NULL + Public ReadOnly Property nPartReferenceLayerId As Integer + Get + Return m_nPartReferenceLayerId + End Get + End Property + Private m_nPartReferenceId As Integer = GDB_ID.NULL + Public ReadOnly Property nPartReferenceId As Integer + Get + Dim nTemp As Integer = EgtGetFirstInGroup(nPartReferenceLayerId) + If nTemp <> GDB_ID.NULL Then + Return nTemp + Else + Return m_nReferenceId + End If + End Get + End Property + ' riferimento di stampa del pezzo solido/superficie (sempre Z 0) Private m_nReferenceLayerId As Integer = GDB_ID.NULL Public ReadOnly Property nReferenceLayerId As Integer Get @@ -122,10 +140,11 @@ Public Class Print3dPartVM m_sImportedFilePath = sImportedFilePath End Sub - Sub New(nPartId As Integer, nPrintSolidLayerId As Integer, nReferenceLayerId As Integer, nReferenceId As Integer, nMachStartLayerId As Integer, + Sub New(nPartId As Integer, nPrintSolidLayerId As Integer, nPartReferenceLayerId As Integer, nReferenceLayerId As Integer, nReferenceId As Integer, nMachStartLayerId As Integer, nRibsLayerId As Integer, nShellNumberLayerId As Integer, nAuxSolidsLayerId As Integer, nOthersLayerId As Integer, sImportedFilePath As String) m_nPartId = nPartId m_nPrintSolidLayerId = nPrintSolidLayerId + m_nPartReferenceLayerId = nPartReferenceLayerId m_nReferenceLayerId = nReferenceLayerId m_nReferenceId = nReferenceId m_nMachStartLayerId = nMachStartLayerId From 54c5d41c67b2aee7d38c259658b4a65e6790c9e5 Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Mon, 13 Mar 2023 18:32:58 +0100 Subject: [PATCH 7/7] - correzione eliminazione superficie pezzo - correzione contextMenu in ManagePart - Tooltip su tutte le icone - gestione disattivazione interfaccia durante import --- .../CurrMachiningPanelV.xaml | 4 +- .../CurrMachiningPanelVM.vb | 10 ++ .../FilledSolidPanel/FilledSolidPanelV.xaml | 18 +-- Icarus/FilledSolidPanel/FilledSolidPanelVM.vb | 105 ++++++++++++++++++ Icarus/InstrumentPanel/InstrumentPanelV.xaml | 4 +- Icarus/InstrumentPanel/MyInstrumentPanelVM.vb | 16 +++ Icarus/MachiningDb/MachiningDbV.xaml | 5 +- Icarus/MachiningDb/MachiningDbVM.vb | 22 ++++ Icarus/ManagePartPanel/ManagePartUtility.vb | 6 +- Icarus/MaterialDb/MaterialDbV.xaml | 5 +- Icarus/MaterialDb/MaterialDbVM.vb | 22 ++++ Icarus/RibPanel/RibPanelV.xaml | 18 +-- Icarus/RibPanel/RibPanelVM.vb | 105 ++++++++++++++++++ Icarus/SceneHost/MySceneHostVM.vb | 22 ++-- .../ShellNumberPanel/ShellNumberPanelV.xaml | 18 +-- Icarus/ShellNumberPanel/ShellNumberPanelVM.vb | 105 ++++++++++++++++++ Icarus/StartMachPanel/StartMachPanelV.xaml | 18 +-- Icarus/StartMachPanel/StartMachPanelVM.vb | 94 ++++++++++++++++ Icarus/TopPanel/TopPanelVM.vb | 2 + 19 files changed, 542 insertions(+), 57 deletions(-) diff --git a/Icarus/CurrMachiningPanel/CurrMachiningPanelV.xaml b/Icarus/CurrMachiningPanel/CurrMachiningPanelV.xaml index 9edef53..3da9b78 100644 --- a/Icarus/CurrMachiningPanel/CurrMachiningPanelV.xaml +++ b/Icarus/CurrMachiningPanel/CurrMachiningPanelV.xaml @@ -210,8 +210,8 @@ -