Compare commits

..

3 Commits

Author SHA1 Message Date
Demetrio Cassarino d4b55f730a - Aggiornamento di tutte le messagebox a egtmessagebox 2023-05-26 10:21:46 +02:00
Emmanuele Sassi d74bc0f4d2 - ottimizzazione costruttori in EgtMessageBoxVM 2023-05-25 15:54:32 +02:00
Emmanuele Sassi c17e80af2b - Aggiunta EgtMessageBox 2023-05-25 14:57:31 +02:00
59 changed files with 1117 additions and 2126 deletions
-12
View File
@@ -18,24 +18,12 @@ Public Class AboutBoxV
Dim sLeftDays As String = "" Dim sLeftDays As String = ""
Dim nLeftDays As Integer Dim nLeftDays As Integer
If EgtGetKeyLeftDays(nLeftDays) AndAlso nLeftDays < 500 Then sLeftDays = " (" & nLeftDays.ToString() & ")" 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 = If(EgtIsDebug(), "*** Debug Libraries ***" & Environment.NewLine, "")
sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName & sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName &
" Inst" & Map.refMainWindowVM.MainWindowM.nInstance.ToString() & " Inst" & Map.refMainWindowVM.MainWindowM.nInstance.ToString() &
" Ulv" & Map.refMainWindowVM.MainWindowM.nUserLevel.ToString() & " Ulv" & Map.refMainWindowVM.MainWindowM.nUserLevel.ToString() &
" Dbg" & Map.refMainWindowVM.MainWindowM.DebugLevel().ToString() & Environment.NewLine " Dbg" & Map.refMainWindowVM.MainWindowM.DebugLevel().ToString() & Environment.NewLine
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
sInfo &= "Maintenance plane " & sAssStatus & Environment.NewLine
sInfo &= "DataRoot " & Map.refMainWindowVM.MainWindowM.sDataRoot & Environment.NewLine sInfo &= "DataRoot " & Map.refMainWindowVM.MainWindowM.sDataRoot & Environment.NewLine
sInfo &= "MachinesRoot " & Map.refMainWindowVM.MainWindowM.sMachinesRoot & Environment.NewLine sInfo &= "MachinesRoot " & Map.refMainWindowVM.MainWindowM.sMachinesRoot & Environment.NewLine
Dim sOpSys As String = String.Empty Dim sOpSys As String = String.Empty
@@ -66,7 +66,8 @@ Public Class ChooseMachineWndVM
RaiseEvent m_CloseWindow(True) RaiseEvent m_CloseWindow(True)
Else Else
' se non seleziono nessuna macchina lo segnalo con un MessageBox ' se non seleziono nessuna macchina lo segnalo con un MessageBox
MessageBox.Show("No machine selected", "Error", MessageBoxButton.OK, MessageBoxImage.Error) ' MessageBox.Show("No machine selected", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "No machine selected", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
End Sub End Sub
-35
View File
@@ -3,7 +3,6 @@
Public Const TABLE = "Table" Public Const TABLE = "Table"
Public Const TABLE_OUTLINE = "TableOutline" Public Const TABLE_OUTLINE = "TableOutline"
Public Const EXTRUSION_AREA = "ExtrusionArea" Public Const EXTRUSION_AREA = "ExtrusionArea"
Public Const EXTRUSION_RECT = "ExtrusionRect"
Public Const PART = "Part" Public Const PART = "Part"
Public Const PRINT_SOLID = "PrintSolid" Public Const PRINT_SOLID = "PrintSolid"
Public Const LAY_MACH_START = "MachStart" Public Const LAY_MACH_START = "MachStart"
@@ -68,7 +67,6 @@
Public Const MAT_KW = "KW" Public Const MAT_KW = "KW"
Public Const MAT_KZ = "KZ" Public Const MAT_KZ = "KZ"
Public Const MAT_KN = "KN" Public Const MAT_KN = "KN"
Public Const MAT_TDRYER = "TDRYER"
Public Const MAT_ORIG = "Orig" Public Const MAT_ORIG = "Orig"
' parametri Lavorazione ' parametri Lavorazione
@@ -91,7 +89,6 @@
Public Const MAC_LINKTYPE = "LinkType" Public Const MAC_LINKTYPE = "LinkType"
Public Const MAC_LINKPARAM = "LinkParam" Public Const MAC_LINKPARAM = "LinkParam"
Public Const MAC_LINKZUP = "LinkZup" Public Const MAC_LINKZUP = "LinkZup"
Public Const MAC_INNERSHELLWIDTH = "InnerStrandW"
Public Const MAC_OFFSETLEADPOINT = "OffsetLeadPoint" Public Const MAC_OFFSETLEADPOINT = "OffsetLeadPoint"
Public Const MAC_LEADIN = "LeadIn" Public Const MAC_LEADIN = "LeadIn"
Public Const MAC_LEADINTANGDIST = "LeadInTangDist" Public Const MAC_LEADINTANGDIST = "LeadInTangDist"
@@ -111,17 +108,10 @@
Public Const MAC_PREFLOWDELAY = "PreFlowDelay" Public Const MAC_PREFLOWDELAY = "PreFlowDelay"
Public Const MAC_POSTFLOWDELAY = "PostFlowDelay" Public Const MAC_POSTFLOWDELAY = "PostFlowDelay"
Public Const MAC_SCREWBACK = "ScrewBack" Public Const MAC_SCREWBACK = "ScrewBack"
Public Const MAC_SLICINGHEIGHT = "SlicingHeight"
Public Const MAC_MAXSLICESNUMBER = "MaxSlicesNumber"
Public Const MAC_RIBSSTRANDWIDTH = "RibsStrandW"
Public Const MAC_RIBSTYPE = "RibsType" Public Const MAC_RIBSTYPE = "RibsType"
Public Const MAC_RIBSOVERLAP = "RibsOverlap" Public Const MAC_RIBSOVERLAP = "RibsOverlap"
Public Const MAC_RIBSSTRANDOVERLAP = "RibsStrandOverlap"
Public Const MAC_RIBSSTRANDCOUNT = "RibsStrandCount" Public Const MAC_RIBSSTRANDCOUNT = "RibsStrandCount"
Public Const MAC_RIBSLINK = "RibsLink" Public Const MAC_RIBSLINK = "RibsLink"
Public Const MAC_RIBSLINKFILLET = "RibsLinkFillet"
Public Const MAC_RIBSMERGEWITHSHELL = "RibsMergeWithShell"
Public Const MAC_RIBSINVERTMERGEDSHELLMAINLINK = "InvertRibsMergedShellMainLink"
Public Const MAC_RIBSINVERTORDER = "RibsInvertOrder" Public Const MAC_RIBSINVERTORDER = "RibsInvertOrder"
Public Const MAC_RIBSINVERTDIRECTION = "RibsInvertDirection" Public Const MAC_RIBSINVERTDIRECTION = "RibsInvertDirection"
Public Const MAC_RIBSINVERTSTRANDORDER = "RibsInvertStrandOrder" Public Const MAC_RIBSINVERTSTRANDORDER = "RibsInvertStrandOrder"
@@ -132,45 +122,20 @@
Public Const MAC_RIBSLEADOUTCOASTING = "RibsLeadOutCoasting" Public Const MAC_RIBSLEADOUTCOASTING = "RibsLeadOutCoasting"
Public Const MAC_RIBSLEADOUTWIPE = "RibsLeadOutWipe" Public Const MAC_RIBSLEADOUTWIPE = "RibsLeadOutWipe"
Public Const MAC_RIBSLEADOUTWIPEDIR = "RibsLeadOutWipeDir" Public Const MAC_RIBSLEADOUTWIPEDIR = "RibsLeadOutWipeDir"
Public Const MAC_RIBSLEADFILLET = "RibsLeadFillet"
Public Const MAC_RIBSLIMITUNBOUNDEDWITHSOLID = "LimitUnboundedRibsWithSolid" Public Const MAC_RIBSLIMITUNBOUNDEDWITHSOLID = "LimitUnboundedRibsWithSolid"
Public Const MAC_SHELLNBRDIFFERENCE = "ShellNbrDifference" Public Const MAC_SHELLNBRDIFFERENCE = "ShellNbrDifference"
Public Const MAC_SHELLNBRCOASTING = "ShellNbrCoasting" Public Const MAC_SHELLNBRCOASTING = "ShellNbrCoasting"
Public Const MAC_SHELLNBRWIPE = "ShellNbrWipe" Public Const MAC_SHELLNBRWIPE = "ShellNbrWipe"
Public Const MAC_SHELLNBRWIPEDIR = "ShellNbrWipeDir" Public Const MAC_SHELLNBRWIPEDIR = "ShellNbrWipeDir"
Public Const MAC_AUXSOLIDSSTRANDWIDTH = "AuxSolidsStrandW"
Public Const MAC_AUXSOLIDSOVERLAP = "AuxSolidsOverlap" Public Const MAC_AUXSOLIDSOVERLAP = "AuxSolidsOverlap"
Public Const MAC_AUXSOLIDSINFILL = "AuxSolidsInfill" Public Const MAC_AUXSOLIDSINFILL = "AuxSolidsInfill"
Public Const MAC_AUXSOLIDSINFILLLINK = "AuxSolidsInfillLink"
Public Const MAC_AUXSOLIDSSTRANDCOUNT = "AuxSolidsStrandCount"
Public Const MAC_AUXSOLIDSSTRANDORDER = "AuxSolidsStrandOrder" Public Const MAC_AUXSOLIDSSTRANDORDER = "AuxSolidsStrandOrder"
Public Const MAC_AUXSOLIDSLINKTYPE = "AuxSolidsLinkType" Public Const MAC_AUXSOLIDSLINKTYPE = "AuxSolidsLinkType"
Public Const MAC_AUXSOLIDSLINKPARAM = "AuxSolidsLinkParam" Public Const MAC_AUXSOLIDSLINKPARAM = "AuxSolidsLinkParam"
Public Const MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE = "AuxSolidsStartPointOffsetOnSlice" Public Const MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE = "AuxSolidsStartPointOffsetOnSlice"
Public Const MAC_AUXSOLIDSOFFSETLEADPOINT = "AuxSolidsOffsetLeadPoint"
Public Const MAC_AUXSOLIDSDENSITY = "AuxSolidsDensity"
Public Const MAC_AUXSOLIDSGRIDOVERLAP = "AuxSolidsGridOverlap"
Public Const MAC_AUXSOLIDSDIRECTION = "AuxSolidsDirection"
Public Const MAC_AUXSOLIDSOFFSETX = "AuxSolidsOffsetX"
Public Const MAC_AUXSOLIDSOFFSETY = "AuxSolidsOffsetY"
Public Const MAC_AUXSOLIDSCOASTINGLEN = "AuxSolidsCoastingLen" Public Const MAC_AUXSOLIDSCOASTINGLEN = "AuxSolidsCoastingLen"
Public Const MAC_AUXSOLIDSWIPELEN = "AuxSolidsWipeLen" Public Const MAC_AUXSOLIDSWIPELEN = "AuxSolidsWipeLen"
Public Const MAC_AUXSOLIDSWIPEDIR = "AuxSolidsWipeDir" Public Const MAC_AUXSOLIDSWIPEDIR = "AuxSolidsWipeDir"
Public Const MAC_INFILLSTRANDWIDTH = "InfillStrandW"
Public Const MAC_FLOORTYPE = "FloorType"
Public Const MAC_CEILCOUNT = "CeilCount"
Public Const MAC_CEILTYPE = "CeilType"
Public Const MAC_INFILLTYPE = "InfillType"
Public Const MAC_INFILLLINK = "InfillLink"
Public Const MAC_INFILLDENSITY = "InfillDensity"
Public Const MAC_INFILLOVERLAP = "InfillOverlap"
Public Const MAC_INFILLGRIDOVERLAP = "InfillGridOverlap"
Public Const MAC_INFILLDIRECTION = "InfillDirection"
Public Const MAC_INFILLOFFSETX = "InfillOffsetX"
Public Const MAC_INFILLOFFSETY = "InfillOffsetY"
Public Const MAC_INFILLCOASTING = "InfillCoasting"
Public Const MAC_INFILLWIPE = "InfillWipe"
Public Const MAC_INFILLWIPEDIR = "InfillWipeDir"
Public Const MAC_DYNAMICMODE = "DynamicMode" Public Const MAC_DYNAMICMODE = "DynamicMode"
Public Const MAC_PRINTORDER = "PrintOrder" Public Const MAC_PRINTORDER = "PrintOrder"
Public Const MAC_CONSTANT = "Constant" Public Const MAC_CONSTANT = "Constant"
-5
View File
@@ -21,7 +21,6 @@ Public Module ConstGen
' File con dati di licenza ' File con dati di licenza
Public Const LIC_FILE_NAME As String = "Icarus.lic" Public Const LIC_FILE_NAME As String = "Icarus.lic"
Public Const S_LICENCE As String = "Licence" Public Const S_LICENCE As String = "Licence"
Public Const K_LOCKID As String = "LockId"
Public Const K_KEY As String = "Key" Public Const K_KEY As String = "Key"
Public Const K_NESTKEY As String = "NestKey" Public Const K_NESTKEY As String = "NestKey"
@@ -53,7 +52,6 @@ Public Module ConstGen
' Abilitazioni licenza ' Abilitazioni licenza
Friend Enum KEY_OPT As UInteger Friend Enum KEY_OPT As UInteger
BASE = 1 ' Prodotto Icarus BASE = 1 ' Prodotto Icarus
MACHINE_EXPORT = 2 ' opzione per esportare file icrx per macchina
End Enum End Enum
' File di log generale ' File di log generale
@@ -78,7 +76,4 @@ Public Module ConstGen
' Nome file Lua con le funzioni di attrezzaggio ' Nome file Lua con le funzioni di attrezzaggio
Public Const SETUP_LUA As String = "SetUp.lua" 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 End Module
-8
View File
@@ -26,10 +26,8 @@ Public Module ConstIni
'Public Const K_MESSAGES As String = "Messages" 'Public Const K_MESSAGES As String = "Messages"
'Public Const K_WINPLACE As String = "WinPlace" 'Public Const K_WINPLACE As String = "WinPlace"
'Public Const K_LASTPROJ As String = "LastProj" 'Public Const K_LASTPROJ As String = "LastProj"
Public Const K_NETKEY As String = "NetKey"
Public Const K_LASTNGEDIR As String = "LastNgeDir" Public Const K_LASTNGEDIR As String = "LastNgeDir"
Public Const K_LASTIMPDIR As String = "LastImpDir" Public Const K_LASTIMPDIR As String = "LastImpDir"
Public Const K_MACHINEEXPORT As String = "MachineExport"
'Public Const K_SUPPORT As String = "Support" 'Public Const K_SUPPORT As String = "Support"
'Public Const S_LANGUAGES As String = "Languages" 'Public Const S_LANGUAGES As String = "Languages"
@@ -103,14 +101,11 @@ Public Module ConstIni
Public Const K_DXFSCALE As String = "DxfScale" Public Const K_DXFSCALE As String = "DxfScale"
Public Const K_STLSCALE As String = "StlScale" Public Const K_STLSCALE As String = "StlScale"
Public Const K_CNCFLAG As String = "CncFlag" Public Const K_CNCFLAG As String = "CncFlag"
Public Const K_ADVFLAG As String = "AdvFlag"
'Public Const S_SIMUL As String = "Simul" 'Public Const S_SIMUL As String = "Simul"
'Public Const K_SLIDERX As String = "SliderX" 'Public Const K_SLIDERX As String = "SliderX"
'Public Const K_SLIDERVAL As String = "SliderVal" 'Public Const K_SLIDERVAL As String = "SliderVal"
Public Const K_MACHVIEWMODE As String = "MachViewMode" Public Const K_MACHVIEWMODE As String = "MachViewMode"
Public Const K_VIRTUALADDITIVE As String = "VirtualAdditive"
Public Const K_TRACEENABLE As String = "TraceEnable"
Public Const S_PRINTING3D As String = "3dPrinting" Public Const S_PRINTING3D As String = "3dPrinting"
Public Const K_3PRNBASEDIR As String = "BaseDir" Public Const K_3PRNBASEDIR As String = "BaseDir"
@@ -119,9 +114,6 @@ Public Module ConstIni
Public Const K_VIEWSLIDER As String = "ViewSlider" Public Const K_VIEWSLIDER As String = "ViewSlider"
Public Const K_IMPORTCURREXTENSION As String = "ImportCurrExtension" 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 S_COLORS As String = "Colors"
Public Const K_CLR_PRINTPART As String = "PrintPart" Public Const K_CLR_PRINTPART As String = "PrintPart"
Public Const K_CLR_RIBS As String = "Ribs" Public Const K_CLR_RIBS As String = "Ribs"
-7
View File
@@ -10,14 +10,7 @@
Public Const K_SLICINGTYPE As String = "SlicingType" Public Const K_SLICINGTYPE As String = "SlicingType"
Public Const K_SPEED_MIN As String = "SpeedMin" Public Const K_SPEED_MIN As String = "SpeedMin"
Public Const K_SPEED_MAX As String = "SpeedMax" Public Const K_SPEED_MAX As String = "SpeedMax"
Public Const K_MAX_HEIGHT As String = "HMax"
Public Const S_MINMAX As String = "MinMax" Public Const S_MINMAX As String = "MinMax"
Public Const S_VMILL As String = "VMill"
Public Const K_VM_ENABLE As String = "Enable"
Public Const S_TOOLTRACE As String = "ToolTrace"
Public Const K_TT_ENABLE As String = "Enable"
End Module End Module
+21 -280
View File
@@ -111,7 +111,6 @@ Public Class CurrMachining
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, False)) m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, False))
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, False)) m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, False))
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, False)) m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, False))
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.INFILL, nPartId, m_nIndex, False))
For Each Cathegory In m_CathegoryList For Each Cathegory In m_CathegoryList
For Each MachiningParam In Cathegory.MachiningParamList For Each MachiningParam In Cathegory.MachiningParamList
AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged
@@ -129,7 +128,6 @@ Public Class CurrMachining
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, True)) m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, True))
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, True)) m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, True))
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, True)) m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, True))
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.INFILL, nPartId, m_nIndex, True))
For Each Cathegory In m_CathegoryList For Each Cathegory In m_CathegoryList
For Each MachiningParam In Cathegory.MachiningParamList For Each MachiningParam In Cathegory.MachiningParamList
AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged
@@ -211,6 +209,7 @@ Public Class CurrMachiningCathegory
New CurrNumericMachiningParam(MachiningParam.Params.STARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.STARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.STRANDORDER, nPartId, nIndex, bForceFromDb, Me), New CurrComboMachiningParam(MachiningParam.Params.STRANDORDER, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.DIRECTION, nPartId, nIndex, bForceFromDb, Me), New CurrComboMachiningParam(MachiningParam.Params.DIRECTION, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.FLOORCOUNT, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.G0FEED, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.G0FEED, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.G0FEEDZ, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.G0FEEDZ, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LINKZUP, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.LINKZUP, nPartId, nIndex, bForceFromDb, Me),
@@ -220,18 +219,15 @@ Public Class CurrMachiningCathegory
New CurrOrderedMachiningParam(MachiningParam.Params.PRINT_ORDER, nPartId, nIndex, bForceFromDb, Me), New CurrOrderedMachiningParam(MachiningParam.Params.PRINT_ORDER, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.PREFLOWDELAY, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.PREFLOWDELAY, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.POSTFLOWDELAY, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.POSTFLOWDELAY, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.SCREWBACK, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.SCREWBACK, nPartId, nIndex, bForceFromDb, Me)})
New CurrNumericMachiningParam(MachiningParam.Params.SLICINGHEIGHT, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.MAXSLICESNUMBER, nPartId, nIndex, bForceFromDb, Me)})
Case Cathegories.LINK Case Cathegories.LINK
m_sName = "Shell" m_sName = "Shell"
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.INNERSHELLWIDTH, nPartId, nIndex, bForceFromDb, Me), m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.LINKTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.OFFSETLEADPOINT, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.LINKTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LINKPARAM, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.LINKPARAM, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.LEADIN, nPartId, nIndex, bForceFromDb, Me), New CurrComboMachiningParam(MachiningParam.Params.LEADIN, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LEADINTANGDIST, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.LEADINTANGDIST, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LEADINORTHODIST, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.LEADINORTHODIST, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.OFFSETLEADPOINT, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.LEADOUT, nPartId, nIndex, bForceFromDb, Me), New CurrComboMachiningParam(MachiningParam.Params.LEADOUT, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTTANGDIST, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTTANGDIST, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTORTHODIST, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTORTHODIST, nPartId, nIndex, bForceFromDb, Me),
@@ -242,16 +238,11 @@ Public Class CurrMachiningCathegory
'New CurrNumericMachiningParam(MachiningParam.Params.WIPEDIR, nPartId, nIndex, bForceFromDb, Me)}) 'New CurrNumericMachiningParam(MachiningParam.Params.WIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
Case Cathegories.RIBS Case Cathegories.RIBS
m_sName = "Ribs" m_sName = "Ribs"
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDWIDTH, nPartId, nIndex, bForceFromDb, Me), m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.RIBSTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.RIBSTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nPartId, nIndex, bForceFromDb, Me), New CurrCheckMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, 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.RIBSLINK, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLINKFILLET, 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.RIBSINVERTORDER, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nPartId, nIndex, bForceFromDb, Me), New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nPartId, nIndex, bForceFromDb, Me), New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nPartId, nIndex, bForceFromDb, Me),
@@ -261,8 +252,7 @@ Public Class CurrMachiningCathegory
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADFILLET, nPartId, nIndex, bForceFromDb, Me)})
Case Cathegories.SHELL_NUMBER Case Cathegories.SHELL_NUMBER
m_sName = "Reduce Shell Number" m_sName = "Reduce Shell Number"
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nPartId, nIndex, bForceFromDb, Me), m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nPartId, nIndex, bForceFromDb, Me),
@@ -271,42 +261,15 @@ Public Class CurrMachiningCathegory
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nPartId, nIndex, bForceFromDb, Me)}) New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
Case Cathegories.AUX_SOLID Case Cathegories.AUX_SOLID
m_sName = "Filled Solid" m_sName = "Filled Solid"
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDWIDTH, nPartId, nIndex, bForceFromDb, Me), m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nPartId, nIndex, bForceFromDb, Me), New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.AUXSOLIDSINFILLLINK, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDCOUNT, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nPartId, nIndex, bForceFromDb, Me), New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nPartId, nIndex, bForceFromDb, Me), New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETLEADPOINT, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSDENSITY, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSGRIDOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSDIRECTION, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETX, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETY, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nPartId, nIndex, bForceFromDb, Me), New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nPartId, nIndex, bForceFromDb, Me)}) New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
Case Cathegories.INFILL
m_sName = "Infill"
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.INFILLSTRANDWIDTH, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.FLOORCOUNT, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.FLOORTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.CEILCOUNT, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.CEILTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.INFILLTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.INFILLLINK, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLDENSITY, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLGRIDOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLDIRECTION, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLOFFSETX, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLOFFSETY, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLCOASTING, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLWIPE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
End Select End Select
' verifico dipendenze tra parametri ' verifico dipendenze tra parametri
Select Case m_Type Select Case m_Type
@@ -325,19 +288,6 @@ Public Class CurrMachiningCathegory
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param) Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam() MachiningParam.ManageDependencyParam()
Next Next
For Each Param In {MachiningParam.Params.AUXSOLIDSSTRANDCOUNT}
Dim MachiningParam As NumericMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
Case Cathegories.INFILL
For Each Param In {MachiningParam.Params.FLOORCOUNT, MachiningParam.Params.CEILCOUNT}
Dim MachiningParam As NumericMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
For Each Param In {MachiningParam.Params.INFILLTYPE}
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
End Select End Select
End Sub End Sub
@@ -370,32 +320,14 @@ Public Class CurrNumericMachiningParam
StringToDouble(value, dTempValue) StringToDouble(value, dTempValue)
End If End If
If m_bIsActiveMinMax Then If m_bIsActiveMinMax Then
If m_MinMaxType = MinMaxTypes.ABSOLUT Then If dTempValue >= m_dMinValue AndAlso dTempValue <= m_dMaxValue Then
If dTempValue >= m_dMinValue AndAlso dTempValue <= m_dMaxValue Then m_dValue = dTempValue
m_dValue = dTempValue
End If
ElseIf m_MinMaxType = MinMaxTypes.PERCENTAGE Then
Dim LinkedParam As MachiningParam = Nothing
' cerco il parametro a cui e' collegato
For Each CurrCathegory In Map.refMachiningDbVM.SelMachining.CathegoryList
LinkedParam = CurrCathegory.MachiningParamList.FirstOrDefault(Function(x) x.Type = m_MinMaxLinkedParam)
If Not IsNothing(LinkedParam) Then Exit For
Next
If Not IsNothing(LinkedParam) AndAlso TypeOf LinkedParam Is NumericMachiningParam Then
Dim NumericLinkedParam As NumericMachiningParam = DirectCast(LinkedParam, NumericMachiningParam)
If dTempValue >= NumericLinkedParam.dValue * m_dMinValue / 100 AndAlso dTempValue <= NumericLinkedParam.dValue * m_dMaxValue / 100 Then
m_dValue = dTempValue
End If
Else
m_dValue = dTempValue
End If
End If End If
Else Else
m_dValue = dTempValue m_dValue = dTempValue
End If End If
NotifyPropertyChanged(NameOf(sValue)) NotifyPropertyChanged(NameOf(sValue))
NotifyPropertyChanged(NameOf(bIsModifiedFromDb)) NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
ManageDependencyParam()
End Set End Set
End Property End Property
@@ -443,9 +375,6 @@ Public Class CurrNumericMachiningParam
Case Params.LINKZUP Case Params.LINKZUP
bReadFromPart = EgtGetInfo(nPartId, MAC_LINKZUP, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_LINKZUP, m_dValue)
m_bIsLen = True m_bIsLen = True
Case Params.INNERSHELLWIDTH
bReadFromPart = EgtGetInfo(nPartId, MAC_INNERSHELLWIDTH, m_dValue)
m_bIsLen = True
Case Params.OFFSETLEADPOINT Case Params.OFFSETLEADPOINT
bReadFromPart = EgtGetInfo(nPartId, MAC_OFFSETLEADPOINT, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_OFFSETLEADPOINT, m_dValue)
m_bIsLen = True m_bIsLen = True
@@ -490,34 +419,19 @@ Public Class CurrNumericMachiningParam
m_bIsLen = True m_bIsLen = True
Case Params.PREFLOWDELAY Case Params.PREFLOWDELAY
bReadFromPart = EgtGetInfo(nPartId, MAC_PREFLOWDELAY, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_PREFLOWDELAY, m_dValue)
m_bIsLen = False m_bIsLen = True
Case Params.POSTFLOWDELAY Case Params.POSTFLOWDELAY
bReadFromPart = EgtGetInfo(nPartId, MAC_POSTFLOWDELAY, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_POSTFLOWDELAY, m_dValue)
m_bIsLen = False m_bIsLen = True
Case Params.SCREWBACK Case Params.SCREWBACK
bReadFromPart = EgtGetInfo(nPartId, MAC_SCREWBACK, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_SCREWBACK, m_dValue)
m_bIsLen = False
Case Params.SLICINGHEIGHT
bReadFromPart = EgtGetInfo(nPartId, MAC_SLICINGHEIGHT, m_dValue)
m_bIsLen = True
Case Params.MAXSLICESNUMBER
bReadFromPart = EgtGetInfo(nPartId, MAC_MAXSLICESNUMBER, m_dValue)
m_bIsLen = False
Case Params.RIBSSTRANDWIDTH
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSSTRANDWIDTH, m_dValue)
m_bIsLen = True m_bIsLen = True
Case Params.RIBSOVERLAP Case Params.RIBSOVERLAP
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSOVERLAP, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSOVERLAP, m_dValue)
m_bIsLen = False m_bIsLen = False
Case Params.RIBSSTRANDOVERLAP
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSSTRANDOVERLAP, m_dValue)
m_bIsLen = False
Case Params.RIBSSTRANDCOUNT Case Params.RIBSSTRANDCOUNT
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSSTRANDCOUNT, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSSTRANDCOUNT, m_dValue)
m_bIsLen = False m_bIsLen = False
Case Params.RIBSLINKFILLET
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLINKFILLET, m_dValue)
m_bIsLen = True
Case Params.RIBSLEADINLEN Case Params.RIBSLEADINLEN
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADINLEN, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADINLEN, m_dValue)
m_bIsLen = True m_bIsLen = True
@@ -533,9 +447,6 @@ Public Class CurrNumericMachiningParam
Case Params.RIBSLEADOUTWIPEDIR Case Params.RIBSLEADOUTWIPEDIR
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTWIPEDIR, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTWIPEDIR, m_dValue)
m_bIsLen = False m_bIsLen = False
Case Params.RIBSLEADFILLET
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADFILLET, m_dValue)
m_bIsLen = True
Case Params.SHELLNBRDIFFERENCE Case Params.SHELLNBRDIFFERENCE
bReadFromPart = EgtGetInfo(nPartId, MAC_SHELLNBRDIFFERENCE, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_SHELLNBRDIFFERENCE, m_dValue)
m_bIsLen = False m_bIsLen = False
@@ -548,39 +459,15 @@ Public Class CurrNumericMachiningParam
Case Params.SHELLNBRWIPEDIR Case Params.SHELLNBRWIPEDIR
bReadFromPart = EgtGetInfo(nPartId, MAC_SHELLNBRWIPEDIR, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_SHELLNBRWIPEDIR, m_dValue)
m_bIsLen = False m_bIsLen = False
Case Params.AUXSOLIDSSTRANDWIDTH
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDWIDTH, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSOVERLAP Case Params.AUXSOLIDSOVERLAP
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, m_dValue)
m_bIsLen = False m_bIsLen = False
Case Params.AUXSOLIDSLINKPARAM Case Params.AUXSOLIDSLINKPARAM
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, m_dValue)
m_bIsLen = True m_bIsLen = True
Case Params.AUXSOLIDSSTRANDCOUNT
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDCOUNT, m_dValue)
m_bIsLen = False
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dValue)
m_bIsLen = True m_bIsLen = True
Case Params.AUXSOLIDSOFFSETLEADPOINT
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETLEADPOINT, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSDENSITY
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSDENSITY, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSGRIDOVERLAP
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSGRIDOVERLAP, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSDIRECTION
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSDIRECTION, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSOFFSETX
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETX, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSOFFSETY
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETY, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSCOASTINGLEN Case Params.AUXSOLIDSCOASTINGLEN
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, m_dValue)
m_bIsLen = True m_bIsLen = True
@@ -593,66 +480,27 @@ Public Class CurrNumericMachiningParam
Case Params.FLOWRATE_PC Case Params.FLOWRATE_PC
bReadFromPart = EgtGetInfo(nPartId, MAC_CONSTANT, m_dValue) bReadFromPart = EgtGetInfo(nPartId, MAC_CONSTANT, m_dValue)
m_bIsLen = False m_bIsLen = False
Case Params.CEILCOUNT
bReadFromPart = EgtGetInfo(nPartId, MAC_CEILCOUNT, m_dValue)
m_bIsLen = False
Case Params.INFILLSTRANDWIDTH
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLSTRANDWIDTH, m_dValue)
m_bIsLen = True
Case Params.INFILLDENSITY
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLDENSITY, m_dValue)
m_bIsLen = False
Case Params.INFILLOVERLAP
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLOVERLAP, m_dValue)
m_bIsLen = False
Case Params.INFILLGRIDOVERLAP
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLGRIDOVERLAP, m_dValue)
m_bIsLen = False
Case Params.INFILLDIRECTION
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLDIRECTION, m_dValue)
m_bIsLen = False
Case Params.INFILLOFFSETX
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLOFFSETX, m_dValue)
m_bIsLen = True
Case Params.INFILLOFFSETY
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLOFFSETY, m_dValue)
m_bIsLen = True
Case Params.INFILLCOASTING
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLCOASTING, m_dValue)
m_bIsLen = True
Case Params.INFILLWIPE
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLWIPE, m_dValue)
m_bIsLen = True
Case Params.INFILLWIPEDIR
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLWIPEDIR, m_dValue)
m_bIsLen = False
End Select End Select
m_dOrigValue = m_dValue m_dOrigValue = m_dValue
If nIndex > 0 Then If nIndex > 0 Then
Dim DbMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex) Dim DbMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
Select Case Type Select Case Type
Case Params.STRANDH, Params.STRANDW, Params.STRANDCOUNT, Params.OFFSET, Params.STRANDOVERLAP, Params.STARTPOINTOFFSETONSLICE, Case Params.STRANDH, Params.STRANDW, Params.STRANDCOUNT, Params.OFFSET, Params.STRANDOVERLAP, Params.STARTPOINTOFFSETONSLICE,
Params.G0FEED, Params.G0FEEDZ, Params.LINKZUP, Params.TOOLDIAM, Params.FLOWRATE_PC, Params.PREFLOWDELAY, Params.POSTFLOWDELAY, Params.SCREWBACK, Params.SLICINGHEIGHT, Params.MAXSLICESNUMBER Params.FLOORCOUNT, Params.G0FEED, Params.G0FEEDZ, Params.LINKZUP, Params.TOOLDIAM, Params.FLOWRATE_PC, Params.PREFLOWDELAY, Params.POSTFLOWDELAY, Params.SCREWBACK
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) 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, Case Params.LINKPARAM, Params.OFFSETLEADPOINT, Params.LEADINTANGDIST, Params.LEADINORTHODIST,
Params.LEADOUTTANGDIST, Params.LEADOUTORTHODIST, Params.COASTINGLEN, Params.COASTINGFEED_PC, Params.LEADOUTTANGDIST, Params.LEADOUTORTHODIST, Params.COASTINGLEN, Params.COASTINGFEED_PC,
Params.WIPELEN, Params.WIPEFEED_PC ' Params.WIPEDIR 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) 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, Case Params.RIBSOVERLAP, Params.RIBSSTRANDCOUNT, Params.RIBSLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION,
Params.RIBSLEADININVERT, Params.RIBSLEADINLEN, Params.RIBSLEADOUTINVERT, Params.RIBSLEADOUTLEN, Params.RIBSLEADOUTCOASTING, Params.RIBSLEADININVERT, Params.RIBSLEADINLEN, Params.RIBSLEADOUTINVERT, Params.RIBSLEADOUTLEN, Params.RIBSLEADOUTCOASTING,
Params.RIBSLEADOUTWIPE, Params.RIBSLEADOUTWIPEDIR, Params.RIBSLEADFILLET Params.RIBSLEADOUTWIPE, Params.RIBSLEADOUTWIPEDIR
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.SHELLNBRDIFFERENCE, Params.SHELLNBRCOASTING, Params.SHELLNBRWIPE, Params.SHELLNBRWIPEDIR Case Params.SHELLNBRDIFFERENCE, Params.SHELLNBRCOASTING, Params.SHELLNBRWIPE, Params.SHELLNBRWIPEDIR
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.SHELL_NUMBER).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.SHELL_NUMBER).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.AUXSOLIDSSTRANDWIDTH, Params.AUXSOLIDSOVERLAP, Params.AUXSOLIDSLINKPARAM, Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, Case Params.AUXSOLIDSOVERLAP, Params.AUXSOLIDSLINKPARAM, Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE,
Params.AUXSOLIDSOFFSETLEADPOINT, Params.AUXSOLIDSDENSITY, Params.AUXSOLIDSGRIDOVERLAP, Params.AUXSOLIDSCOASTINGLEN, Params.AUXSOLIDSWIPELEN, Params.AUXSOLIDSWIPEDIR
Params.AUXSOLIDSDIRECTION, Params.AUXSOLIDSOFFSETX, Params.AUXSOLIDSOFFSETY,
Params.AUXSOLIDSCOASTINGLEN, Params.AUXSOLIDSWIPELEN, Params.AUXSOLIDSWIPEDIR, Params.AUXSOLIDSSTRANDCOUNT
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.INFILLSTRANDWIDTH, Params.FLOORCOUNT, Params.CEILCOUNT, Params.INFILLDENSITY, Params.INFILLOVERLAP,
Params.INFILLGRIDOVERLAP, Params.INFILLDIRECTION, Params.INFILLOFFSETX,
Params.INFILLOFFSETY, Params.INFILLCOASTING, Params.INFILLWIPE, Params.INFILLWIPEDIR
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.INFILL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
End Select End Select
If bForceFromDb OrElse Not bReadFromPart Then If bForceFromDb OrElse Not bReadFromPart Then
m_dValue = m_DbParam.dOrigValue m_dValue = m_DbParam.dOrigValue
@@ -691,8 +539,6 @@ Public Class CurrNumericMachiningParam
EgtSetInfo(nPartId, MAC_LINKPARAM, sWriteValue) EgtSetInfo(nPartId, MAC_LINKPARAM, sWriteValue)
Case Params.LINKZUP Case Params.LINKZUP
EgtSetInfo(nPartId, MAC_LINKZUP, sWriteValue) EgtSetInfo(nPartId, MAC_LINKZUP, sWriteValue)
Case Params.INNERSHELLWIDTH
EgtSetInfo(nPartId, MAC_INNERSHELLWIDTH, sWriteValue)
Case Params.OFFSETLEADPOINT Case Params.OFFSETLEADPOINT
EgtSetInfo(nPartId, MAC_OFFSETLEADPOINT, sWriteValue) EgtSetInfo(nPartId, MAC_OFFSETLEADPOINT, sWriteValue)
Case Params.LEADINTANGDIST Case Params.LEADINTANGDIST
@@ -727,20 +573,10 @@ Public Class CurrNumericMachiningParam
EgtSetInfo(nPartId, MAC_POSTFLOWDELAY, sWriteValue) EgtSetInfo(nPartId, MAC_POSTFLOWDELAY, sWriteValue)
Case Params.SCREWBACK Case Params.SCREWBACK
EgtSetInfo(nPartId, MAC_SCREWBACK, sWriteValue) EgtSetInfo(nPartId, MAC_SCREWBACK, sWriteValue)
Case Params.SLICINGHEIGHT
EgtSetInfo(nPartId, MAC_SLICINGHEIGHT, sWriteValue)
Case Params.MAXSLICESNUMBER
EgtSetInfo(nPartId, MAC_MAXSLICESNUMBER, sWriteValue)
Case Params.RIBSSTRANDWIDTH
EgtSetInfo(nPartId, MAC_RIBSSTRANDWIDTH, sWriteValue)
Case Params.RIBSOVERLAP Case Params.RIBSOVERLAP
EgtSetInfo(nPartId, MAC_RIBSOVERLAP, sWriteValue) EgtSetInfo(nPartId, MAC_RIBSOVERLAP, sWriteValue)
Case Params.RIBSSTRANDOVERLAP
EgtSetInfo(nPartId, MAC_RIBSSTRANDOVERLAP, sWriteValue)
Case Params.RIBSSTRANDCOUNT Case Params.RIBSSTRANDCOUNT
EgtSetInfo(nPartId, MAC_RIBSSTRANDCOUNT, sWriteValue) EgtSetInfo(nPartId, MAC_RIBSSTRANDCOUNT, sWriteValue)
Case Params.RIBSLINKFILLET
EgtSetInfo(nPartId, MAC_RIBSLINKFILLET, sWriteValue)
Case Params.RIBSLEADINLEN Case Params.RIBSLEADINLEN
EgtSetInfo(nPartId, MAC_RIBSLEADINLEN, sWriteValue) EgtSetInfo(nPartId, MAC_RIBSLEADINLEN, sWriteValue)
Case Params.RIBSLEADOUTLEN Case Params.RIBSLEADOUTLEN
@@ -751,8 +587,6 @@ Public Class CurrNumericMachiningParam
EgtSetInfo(nPartId, MAC_RIBSLEADOUTWIPE, sWriteValue) EgtSetInfo(nPartId, MAC_RIBSLEADOUTWIPE, sWriteValue)
Case Params.RIBSLEADOUTWIPEDIR Case Params.RIBSLEADOUTWIPEDIR
EgtSetInfo(nPartId, MAC_RIBSLEADOUTWIPEDIR, sWriteValue) EgtSetInfo(nPartId, MAC_RIBSLEADOUTWIPEDIR, sWriteValue)
Case Params.RIBSLEADFILLET
EgtSetInfo(nPartId, MAC_RIBSLEADFILLET, sWriteValue)
Case Params.SHELLNBRDIFFERENCE Case Params.SHELLNBRDIFFERENCE
EgtSetInfo(nPartId, MAC_SHELLNBRDIFFERENCE, sWriteValue) EgtSetInfo(nPartId, MAC_SHELLNBRDIFFERENCE, sWriteValue)
Case Params.SHELLNBRCOASTING Case Params.SHELLNBRCOASTING
@@ -761,28 +595,12 @@ Public Class CurrNumericMachiningParam
EgtSetInfo(nPartId, MAC_SHELLNBRWIPE, sWriteValue) EgtSetInfo(nPartId, MAC_SHELLNBRWIPE, sWriteValue)
Case Params.SHELLNBRWIPEDIR Case Params.SHELLNBRWIPEDIR
EgtSetInfo(nPartId, MAC_SHELLNBRWIPEDIR, sWriteValue) EgtSetInfo(nPartId, MAC_SHELLNBRWIPEDIR, sWriteValue)
Case Params.AUXSOLIDSSTRANDWIDTH
EgtSetInfo(nPartId, MAC_AUXSOLIDSSTRANDWIDTH, sWriteValue)
Case Params.AUXSOLIDSSTRANDCOUNT
EgtSetInfo(nPartId, MAC_AUXSOLIDSSTRANDCOUNT, sWriteValue)
Case Params.AUXSOLIDSOVERLAP Case Params.AUXSOLIDSOVERLAP
EgtSetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, sWriteValue) EgtSetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, sWriteValue)
Case Params.AUXSOLIDSLINKPARAM Case Params.AUXSOLIDSLINKPARAM
EgtSetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, sWriteValue) EgtSetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, sWriteValue)
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
EgtSetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, sWriteValue) EgtSetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, sWriteValue)
Case Params.AUXSOLIDSOFFSETLEADPOINT
EgtSetInfo(nPartId, MAC_AUXSOLIDSOFFSETLEADPOINT, sWriteValue)
Case Params.AUXSOLIDSDENSITY
EgtSetInfo(nPartId, MAC_AUXSOLIDSDENSITY, sWriteValue)
Case Params.AUXSOLIDSGRIDOVERLAP
EgtSetInfo(nPartId, MAC_AUXSOLIDSGRIDOVERLAP, sWriteValue)
Case Params.AUXSOLIDSDIRECTION
EgtSetInfo(nPartId, MAC_AUXSOLIDSDIRECTION, sWriteValue)
Case Params.AUXSOLIDSOFFSETX
EgtSetInfo(nPartId, MAC_AUXSOLIDSOFFSETX, sWriteValue)
Case Params.AUXSOLIDSOFFSETY
EgtSetInfo(nPartId, MAC_AUXSOLIDSOFFSETY, sWriteValue)
Case Params.AUXSOLIDSCOASTINGLEN Case Params.AUXSOLIDSCOASTINGLEN
EgtSetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue) EgtSetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue)
Case Params.AUXSOLIDSWIPELEN Case Params.AUXSOLIDSWIPELEN
@@ -791,28 +609,6 @@ Public Class CurrNumericMachiningParam
EgtSetInfo(nPartId, MAC_AUXSOLIDSWIPEDIR, sWriteValue) EgtSetInfo(nPartId, MAC_AUXSOLIDSWIPEDIR, sWriteValue)
Case Params.FLOWRATE_PC Case Params.FLOWRATE_PC
EgtSetInfo(nPartId, MAC_CONSTANT, sWriteValue) EgtSetInfo(nPartId, MAC_CONSTANT, sWriteValue)
Case Params.INFILLSTRANDWIDTH
EgtSetInfo(nPartId, MAC_INFILLSTRANDWIDTH, sWriteValue)
Case Params.CEILCOUNT
EgtSetInfo(nPartId, MAC_CEILCOUNT, sWriteValue)
Case Params.INFILLDENSITY
EgtSetInfo(nPartId, MAC_INFILLDENSITY, sWriteValue)
Case Params.INFILLOVERLAP
EgtSetInfo(nPartId, MAC_INFILLOVERLAP, sWriteValue)
Case Params.INFILLGRIDOVERLAP
EgtSetInfo(nPartId, MAC_INFILLGRIDOVERLAP, sWriteValue)
Case Params.INFILLDIRECTION
EgtSetInfo(nPartId, MAC_INFILLDIRECTION, sWriteValue)
Case Params.INFILLOFFSETX
EgtSetInfo(nPartId, MAC_INFILLOFFSETX, sWriteValue)
Case Params.INFILLOFFSETY
EgtSetInfo(nPartId, MAC_INFILLOFFSETY, sWriteValue)
Case Params.INFILLCOASTING
EgtSetInfo(nPartId, MAC_INFILLCOASTING, sWriteValue)
Case Params.INFILLWIPE
EgtSetInfo(nPartId, MAC_INFILLWIPE, sWriteValue)
Case Params.INFILLWIPEDIR
EgtSetInfo(nPartId, MAC_INFILLWIPEDIR, sWriteValue)
End Select End Select
End Sub End Sub
@@ -1015,14 +811,9 @@ Public Class CurrComboMachiningParam
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSTYPE, nSelValue) bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSTYPE, nSelValue)
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
Case Params.AUXSOLIDSINFILL Case Params.AUXSOLIDSINFILL
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL.NONE, "None"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"), New IdNameStruct(Machining.MPAR_INFILL.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag"), New IdNameStruct(Machining.MPAR_INFILL.ZIGZAG, "ZigZag")})
New IdNameStruct(Machining.MPAR_INFILL_TYPE.LINES, "Lines"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.GRID, "Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG_GRID, "Zigzag Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB, "Honeycomb"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB_GRID, "Honeycomb Grid")})
Dim nSelValue As Integer = 0 Dim nSelValue As Integer = 0
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSINFILL, nSelValue) bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSINFILL, nSelValue)
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
@@ -1045,28 +836,6 @@ Public Class CurrComboMachiningParam
Dim nSelValue As Integer = 0 Dim nSelValue As Integer = 0
bReadFromPart = EgtGetInfo(nPartId, MAC_DYNAMICMODE, nSelValue) bReadFromPart = EgtGetInfo(nPartId, MAC_DYNAMICMODE, nSelValue)
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
Case Params.FLOORTYPE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag")})
Dim nSelValue As Integer = 0
bReadFromPart = EgtGetInfo(nPartId, MAC_FLOORTYPE, nSelValue)
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
Case Params.CEILTYPE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag")})
Dim nSelValue As Integer = 0
bReadFromPart = EgtGetInfo(nPartId, MAC_CEILTYPE, nSelValue)
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
Case Params.INFILLTYPE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.LINES, "Lines"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.GRID, "Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG_GRID, "Zigzag Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB, "Honeycomb"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB_GRID, "Honeycomb Grid")})
Dim nSelValue As Integer = 0
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLTYPE, nSelValue)
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
End Select End Select
m_OrigSelValue = m_SelValue m_OrigSelValue = m_SelValue
If nIndex > 0 Then If nIndex > 0 Then
@@ -1080,8 +849,6 @@ Public Class CurrComboMachiningParam
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.AUXSOLIDSINFILL, Params.AUXSOLIDSSTRANDORDER, Params.AUXSOLIDSLINKTYPE Case Params.AUXSOLIDSINFILL, Params.AUXSOLIDSSTRANDORDER, Params.AUXSOLIDSLINKTYPE
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.FLOORTYPE, Params.CEILTYPE, Params.INFILLTYPE
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.INFILL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
End Select End Select
If bForceFromDb OrElse Not bReadFromPart Then If bForceFromDb OrElse Not bReadFromPart Then
m_SelValue = m_DbParam.OrigSelValue m_SelValue = m_DbParam.OrigSelValue
@@ -1120,12 +887,6 @@ Public Class CurrComboMachiningParam
EgtSetInfo(nPartId, MAC_AUXSOLIDSLINKTYPE, m_SelValue.Id) EgtSetInfo(nPartId, MAC_AUXSOLIDSLINKTYPE, m_SelValue.Id)
Case Params.DYNAMIC_MODE Case Params.DYNAMIC_MODE
EgtSetInfo(nPartId, MAC_DYNAMICMODE, m_SelValue.Id) EgtSetInfo(nPartId, MAC_DYNAMICMODE, m_SelValue.Id)
Case Params.FLOORTYPE
EgtSetInfo(nPartId, MAC_FLOORTYPE, m_SelValue.Id)
Case Params.CEILTYPE
EgtSetInfo(nPartId, MAC_CEILTYPE, m_SelValue.Id)
Case Params.INFILLTYPE
EgtSetInfo(nPartId, MAC_INFILLTYPE, m_SelValue.Id)
End Select End Select
End Sub End Sub
@@ -1203,10 +964,6 @@ Public Class CurrCheckMachiningParam
bReadFromPart = EgtGetInfo(nPartId, MAC_SPIRALVASE, m_bValue) bReadFromPart = EgtGetInfo(nPartId, MAC_SPIRALVASE, m_bValue)
Case Params.RIBSLINK Case Params.RIBSLINK
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLINK, m_bValue) 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 Case Params.RIBSINVERTORDER
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSINVERTORDER, m_bValue) bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSINVERTORDER, m_bValue)
Case Params.RIBSINVERTDIRECTION Case Params.RIBSINVERTDIRECTION
@@ -1219,10 +976,6 @@ Public Class CurrCheckMachiningParam
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTINVERT, m_bValue) bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTINVERT, m_bValue)
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, m_bValue) bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, m_bValue)
Case Params.AUXSOLIDSINFILLLINK
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSINFILLLINK, m_bValue)
Case Params.INFILLLINK
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLLINK, m_bValue)
End Select End Select
m_bOrigValue = m_bValue m_bOrigValue = m_bValue
If nIndex > 0 Then If nIndex > 0 Then
@@ -1230,12 +983,8 @@ Public Class CurrCheckMachiningParam
Select Case Type Select Case Type
Case Params.SPIRALVASE Case Params.SPIRALVASE
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type) m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).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 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) 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)
Case Params.INFILLLINK
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.INFILL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
End Select End Select
If bForceFromDb OrElse Not bReadFromPart Then If bForceFromDb OrElse Not bReadFromPart Then
m_bValue = m_DbParam.bOrigValue m_bValue = m_DbParam.bOrigValue
@@ -1250,10 +999,6 @@ Public Class CurrCheckMachiningParam
EgtSetInfo(nPartId, MAC_SPIRALVASE, If(m_bValue, 1, 0)) EgtSetInfo(nPartId, MAC_SPIRALVASE, If(m_bValue, 1, 0))
Case Params.RIBSLINK Case Params.RIBSLINK
EgtSetInfo(nPartId, MAC_RIBSLINK, If(m_bValue, 1, 0)) 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 Case Params.RIBSINVERTORDER
EgtSetInfo(nPartId, MAC_RIBSINVERTORDER, If(m_bValue, 1, 0)) EgtSetInfo(nPartId, MAC_RIBSINVERTORDER, If(m_bValue, 1, 0))
Case Params.RIBSINVERTDIRECTION Case Params.RIBSINVERTDIRECTION
@@ -1266,10 +1011,6 @@ Public Class CurrCheckMachiningParam
EgtSetInfo(nPartId, MAC_RIBSLEADOUTINVERT, If(m_bValue, 1, 0)) EgtSetInfo(nPartId, MAC_RIBSLEADOUTINVERT, If(m_bValue, 1, 0))
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
EgtSetInfo(nPartId, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, If(m_bValue, 1, 0)) EgtSetInfo(nPartId, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, If(m_bValue, 1, 0))
Case Params.AUXSOLIDSINFILLLINK
EgtSetInfo(nPartId, MAC_AUXSOLIDSINFILLLINK, If(m_bValue, 1, 0))
Case Params.INFILLLINK
EgtSetInfo(nPartId, MAC_INFILLLINK, If(m_bValue, 1, 0))
End Select End Select
End Sub End Sub
@@ -54,16 +54,9 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding sName}"
<TextBlock Text="{Binding sName, Mode=OneWay}" Margin="0,0,2.5,0"
Margin="0,0,2.5,0" Style="{StaticResource ParameterList_TextBlock}"/>
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBlock Text=" (BETA)"
Margin="0,0,2.5,0"
Foreground="Red"
Visibility="{Binding IsBeta_Visibility}"
Style="{StaticResource ParameterList_TextBlock}"/>
</StackPanel>
<EgtWPFLib5:EgtTextBox2 Grid.Column="1" <EgtWPFLib5:EgtTextBox2 Grid.Column="1"
Text="{Binding sValue, UpdateSourceTrigger=Explicit}" Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
Margin="2.5,0,2.5,0" Margin="2.5,0,2.5,0"
@@ -86,16 +79,9 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding sName}"
<TextBlock Text="{Binding sName, Mode=OneWay}" Margin="0,0,2.5,0"
Margin="0,0,2.5,0" Style="{StaticResource ParameterList_TextBlock}"/>
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBlock Text=" (BETA)"
Margin="0,0,2.5,0"
Foreground="Red"
Visibility="{Binding IsBeta_Visibility}"
Style="{StaticResource ParameterList_TextBlock}"/>
</StackPanel>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding ValueList}" ItemsSource="{Binding ValueList}"
SelectedItem="{Binding SelValue}" SelectedItem="{Binding SelValue}"
@@ -121,16 +107,9 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding sName}"
<TextBlock Text="{Binding sName, Mode=OneWay}" Margin="0,0,2.5,0"
Margin="0,0,2.5,0" Style="{StaticResource ParameterList_TextBlock}"/>
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBlock Text=" (BETA)"
Margin="0,0,2.5,0"
Foreground="Red"
Visibility="{Binding IsBeta_Visibility}"
Style="{StaticResource ParameterList_TextBlock}"/>
</StackPanel>
<CheckBox Grid.Column="1" <CheckBox Grid.Column="1"
IsChecked="{Binding bValue}" IsChecked="{Binding bValue}"
HorizontalAlignment="Center" HorizontalAlignment="Center"
@@ -21,8 +21,8 @@ Public Class DispositionPanelVM
Dim dNewXPos As Double = ptReference.x Dim dNewXPos As Double = ptReference.x
StringToLen(value, dNewXPos) StringToLen(value, dNewXPos)
Dim b3Print As BBox3d = GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart) Dim b3Print As BBox3d = GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
Dim dMin As Double = Math.Min( 0, CurrentMachine.b3ExtrusionArea.Min.x) Dim dMin As Double = 0
Dim dMax As Double = Math.Max( CurrentMachine.b3Tab.DimX, CurrentMachine.b3ExtrusionArea.Max.x) Dim dMax As Double = CurrentMachine.b3Tab.DimX
If b3Print.Max.x > ptReference.x Then If b3Print.Max.x > ptReference.x Then
dMax -= b3Print.Max.x - ptReference.x dMax -= b3Print.Max.x - ptReference.x
End If End If
@@ -60,8 +60,8 @@ Public Class DispositionPanelVM
Dim dNewYPos As Double = ptReference.y Dim dNewYPos As Double = ptReference.y
StringToLen(value, dNewYPos) StringToLen(value, dNewYPos)
Dim b3Print As BBox3d = GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart) Dim b3Print As BBox3d = GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
Dim dMin As Double = Math.Min( 0, CurrentMachine.b3ExtrusionArea.Min.y) Dim dMin As Double = 0
Dim dMax As Double = Math.Max( CurrentMachine.b3Tab.DimY, CurrentMachine.b3ExtrusionArea.Max.y) Dim dMax As Double = CurrentMachine.b3Tab.DimY
If b3Print.Max.y > ptReference.y Then If b3Print.Max.y > ptReference.y Then
dMax -= b3Print.Max.y - ptReference.y dMax -= b3Print.Max.y - ptReference.y
End If End If
+55
View File
@@ -0,0 +1,55 @@
<EgtWPFLib5:EgtMainWindow x:Class="EgtMessageBoxV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding sTitle}"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
Style="{StaticResource Dialog_Window}">
<Grid Margin="2.5,2.5,2.5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Margin="20,20,20,20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="{Binding sIconSource}"
Margin="0,0,0,0"/>
<TextBlock Grid.Column="1"
Text="{Binding sMessage}"
Margin="5,0,5,0"
Style="{StaticResource DialogWindow_TextBlock}"/>
</Grid>
<ItemsControl Grid.Row="1"
ItemsSource="{Binding ButtonList}"
HorizontalAlignment="Center">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Rows="1"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button IsDefault="{Binding bIsDefault}"
Content="{Binding sMessage}"
Command="{Binding Command_Command}"
Margin="2.5,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<!--<UniformGrid Grid.Column="1"
Grid.Row="1"
Rows="1">
<Button IsCancel="True"
Content="Ok"
Command="{Binding Ok_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
</UniformGrid>-->
</Grid>
</EgtWPFLib5:EgtMainWindow>
+107
View File
@@ -0,0 +1,107 @@
Public Class EgtMessageBoxV
#Region "FIELDS & PROPERTIES"
Private WithEvents m_EgtMessageBoxVM As EgtMessageBoxVM
Private Shadows DialogResult As MessageBoxResult
#End Region ' FIELDS & PROPERTIES
#Region "CONTRUCTORS"
Sub New(Owner As Window, EgtMessageBoxVM As EgtMessageBoxVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = EgtMessageBoxVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_EgtMessageBoxVM = EgtMessageBoxVM
End Sub
#End Region
#Region "METHODS"
''' <summary>
''' Apre una EgtMessageBox con un messaggio che ritorna un risultato
''' </summary>
''' <param name="Owner">Finestra di appartenenza</param>
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String) As MessageBoxResult
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText))
NewMessagebox.ShowDialog()
Return NewMessagebox.DialogResult
End Function
''' <summary>
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
''' </summary>
''' <param name="Owner">Finestra di appartenenza</param>
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String) As MessageBoxResult
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption))
NewMessagebox.ShowDialog()
Return NewMessagebox.DialogResult
End Function
''' <summary>
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
''' </summary>
''' <param name="Owner">Finestra di appartenenza</param>
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton) As MessageBoxResult
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button))
NewMessagebox.ShowDialog()
Return NewMessagebox.DialogResult
End Function
''' <summary>
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
''' </summary>
''' <param name="Owner">Finestra di appartenenza</param>
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
''' <param name="Icon">Valore che specifica quale icona mostrare</param>
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage) As MessageBoxResult
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button, Icon))
NewMessagebox.ShowDialog()
Return NewMessagebox.DialogResult
End Function
''' <summary>
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
''' </summary>
''' <param name="Owner">Finestra di appartenenza</param>
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
''' <param name="Icon">Valore che specifica quale icona mostrare</param>
''' <param name="DefaultResult">Valore che specifica il bottone di default</param>
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage, DefaultResult As MessageBoxResult) As MessageBoxResult
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button, Icon, DefaultResult))
NewMessagebox.ShowDialog()
Return NewMessagebox.DialogResult
End Function
#End Region ' METHODS
#Region "EVENTS"
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtMessageBoxVM.m_CloseWindow
Me.DialogResult = DialogResult
Me.Close()
End Sub
#End Region
End Class
+234
View File
@@ -0,0 +1,234 @@
Imports EgtUILib
Imports EgtWPFLib5
Public Class EgtMessageBoxVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Friend Event m_CloseWindow(DialogResult As MessageBoxResult)
Private m_sTitle As String = ""
Public ReadOnly Property sTitle As String
Get
Return m_sTitle
End Get
End Property
Private m_sMessage As String = ""
Public ReadOnly Property sMessage As String
Get
Return m_sMessage
End Get
End Property
Private m_Button As MessageBoxButton
Private m_Icon As MessageBoxImage
Public ReadOnly Property sIconSource As String
Get
Select Case m_Icon
Case MessageBoxImage.Hand
Return "\Resources\EgtMessageBox\Error.png"
Case MessageBoxImage.Question
Return "\Resources\EgtMessageBox\Question.png"
Case MessageBoxImage.Exclamation
Return "\Resources\EgtMessageBox\Warning.png"
Case MessageBoxImage.Asterisk
Return "\Resources\EgtMessageBox\Information.png"
Case MessageBoxImage.Stop
Return "\Resources\EgtMessageBox\Error.png"
Case MessageBoxImage.Error
Return "\Resources\EgtMessageBox\Error.png"
Case MessageBoxImage.Warning
Return "\Resources\EgtMessageBox\Warning.png"
Case MessageBoxImage.Information
Return "\Resources\EgtMessageBox\Information.png"
Case Else ' MessageBoxImage.None
Return ""
End Select
End Get
End Property
Private m_ButtonList As New List(Of EgtMsgBoxButton)
Public Property ButtonList As List(Of EgtMsgBoxButton)
Get
Return m_ButtonList
End Get
Set(value As List(Of EgtMsgBoxButton))
m_ButtonList = value
End Set
End Property
#End Region ' FIELDS & PROPERTIES
#Region "CONTRUCTORS"
Sub New(sMessageBoxText As String)
EgtMsgBoxButton.SetOwner(Me)
m_sMessage = sMessageBoxText
m_Button = MessageBoxButton.OK
m_Icon = MessageBoxImage.None
NotifyPropertyChanged(NameOf(ButtonList))
NotifyPropertyChanged(NameOf(sIconSource))
End Sub
Sub New(sMessageBoxText As String, sCaption As String)
MyClass.New(sMessageBoxText)
m_sTitle = sCaption
End Sub
Sub New(sMessageBoxText As String, sCaption As String, Button As MessageBoxButton)
MyClass.New(sMessageBoxText, sCaption)
m_Button = Button
Select Case m_Button
Case MessageBoxButton.OK
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.OK))
Case MessageBoxButton.OKCancel
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.OK))
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.CANCEL))
Case MessageBoxButton.YesNoCancel
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.YES))
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.NO))
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.CANCEL))
Case MessageBoxButton.YesNo
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.YES))
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.NO))
End Select
NotifyPropertyChanged(NameOf(ButtonList))
End Sub
Sub New(sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage)
MyClass.New(sMessageBoxText, sCaption, Button)
m_Icon = Icon
NotifyPropertyChanged(NameOf(sIconSource))
End Sub
Sub New(sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage, DefaultResult As MessageBoxResult)
MyClass.New(sMessageBoxText, sCaption, Button, Icon)
Dim DefaultBtn As EgtMsgBoxButton = m_ButtonList.FirstOrDefault(Function(x) (x.Type = EgtMsgBoxButton.Types.OK AndAlso DefaultResult = MessageBoxResult.OK) OrElse
(x.Type = EgtMsgBoxButton.Types.CANCEL AndAlso DefaultResult = MessageBoxResult.Cancel) OrElse
(x.Type = EgtMsgBoxButton.Types.YES AndAlso DefaultResult = MessageBoxResult.Yes) OrElse
(x.Type = EgtMsgBoxButton.Types.NO AndAlso DefaultResult = MessageBoxResult.No))
If Not IsNothing(DefaultBtn) Then
DefaultBtn.SetIsDefault(True)
End If
NotifyPropertyChanged(NameOf(ButtonList))
End Sub
#End Region ' CONTRUCTORS
#Region "METHODS"
Friend Sub CloseWindow(DialogResult As MessageBoxResult)
RaiseEvent m_CloseWindow(DialogResult)
End Sub
#End Region ' METHODS
End Class
Public Class EgtMsgBoxButton
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Public Enum Types As Integer
OK = 1
CANCEL = 2
YES = 3
NO = 4
End Enum
Private Shared Owner As EgtMessageBoxVM
Private m_Type As Types
Public ReadOnly Property Type As Types
Get
Return m_Type
End Get
End Property
Private m_sMessage As String
Public ReadOnly Property sMessage As String
Get
Return m_sMessage
End Get
End Property
Private m_bIsDefault As Boolean = False
Public ReadOnly Property bIsDefault As Boolean
Get
Return m_bIsDefault
End Get
End Property
Friend Sub SetIsDefault(bValue As Boolean)
m_bIsDefault = bValue
End Sub
' Definizione comandi
Private m_cmdCommand As ICommand
#End Region ' FIELDS & PROPERTIES
#Region "CONTRUCTORS"
Sub New(Type As Types)
m_Type = Type
Select Case m_Type
Case Types.OK
m_sMessage = EgtMsg(35001)
Case Types.CANCEL
m_sMessage = EgtMsg(35002)
Case Types.YES
m_sMessage = EgtMsg(35003)
Case Types.NO
m_sMessage = EgtMsg(35004)
End Select
End Sub
Sub New(Type As Types, bIsDefault As Boolean)
MyClass.New(Type)
m_bIsDefault = bIsDefault
End Sub
#End Region ' CONTRUCTORS
#Region "METHODS"
Friend Shared Sub SetOwner(value As EgtMessageBoxVM)
Owner = value
End Sub
#End Region ' METHODS
#Region "COMMANDS"
#Region "Command"
Public ReadOnly Property Command_Command As ICommand
Get
If m_cmdCommand Is Nothing Then
m_cmdCommand = New Command(AddressOf Command)
End If
Return m_cmdCommand
End Get
End Property
Public Sub Command()
Select Case m_Type
Case Types.OK
Owner.CloseWindow(MessageBoxResult.OK)
Case Types.CANCEL
Owner.CloseWindow(MessageBoxResult.Cancel)
Case Types.YES
Owner.CloseWindow(MessageBoxResult.Yes)
Case Types.NO
Owner.CloseWindow(MessageBoxResult.No)
End Select
End Sub
#End Region ' Ok
#End Region ' COMMANDS
End Class
+79 -10
View File
@@ -595,7 +595,6 @@ Public Class FilledSolidPanelVM
Friend Sub Dispose() Friend Sub Dispose()
' ripristino frame originale ' ripristino frame originale
EgtSetGridFrame(m_OriginalGridFrame) EgtSetGridFrame(m_OriginalGridFrame)
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
' se in modifica parametri ' se in modifica parametri
If m_bMachParam_IsChecked Then If m_bMachParam_IsChecked Then
' ripristino modalita' standard ' ripristino modalita' standard
@@ -736,7 +735,6 @@ Public Class FilledSolidPanelVM
If NewGeomType = GDB_TY.CRV_COMPO Then If NewGeomType = GDB_TY.CRV_COMPO Then
If Not EgtCurveIsClosed(nNewEntityId) Then If Not EgtCurveIsClosed(nNewEntityId) Then
EgtCloseCurveCompo(nNewEntityId) EgtCloseCurveCompo(nNewEntityId)
m_bEscOnLine2P = True
End If End If
EgtSetName(nNewEntityId, RIB_CURVE) EgtSetName(nNewEntityId, RIB_CURVE)
' resetto colore entita' ' resetto colore entita'
@@ -765,6 +763,9 @@ Public Class FilledSolidPanelVM
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
m_bIsCreatingExtrusion = True m_bIsCreatingExtrusion = True
Map.refControllerInputPanelVM.IsChecked = True Map.refControllerInputPanelVM.IsChecked = True
If Not EgtCurveIsClosed(nNewEntityId) Then
m_bEscOnLine2P = True
End If
Else Else
' cancello layer ' cancello layer
EgtErase(nNewExtrusionLayerId) EgtErase(nNewExtrusionLayerId)
@@ -1076,7 +1077,6 @@ Public Class FilledSolidPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneTop(ByVal param As Object) Public Sub CPlaneTop(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.TOP)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -1102,7 +1102,6 @@ Public Class FilledSolidPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneFront(ByVal param As Object) Public Sub CPlaneFront(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.FRONT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -1128,7 +1127,6 @@ Public Class FilledSolidPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneRight(ByVal param As Object) Public Sub CPlaneRight(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.RIGHT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -1154,7 +1152,6 @@ Public Class FilledSolidPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneBack(ByVal param As Object) Public Sub CPlaneBack(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.BACK)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -1180,7 +1177,6 @@ Public Class FilledSolidPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneLeft(ByVal param As Object) Public Sub CPlaneLeft(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.LEFT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -1206,7 +1202,6 @@ Public Class FilledSolidPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneBottom(ByVal param As Object) Public Sub CPlaneBottom(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -1233,7 +1228,6 @@ Public Class FilledSolidPanelVM
Public Sub CPlaneElevation(ByVal param As Object) Public Sub CPlaneElevation(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False) ManageInterface(False)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub End Sub
@@ -1259,12 +1253,87 @@ Public Class FilledSolidPanelVM
Public Sub CPlaneOrigin(ByVal param As Object) Public Sub CPlaneOrigin(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False) ManageInterface(False)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub End Sub
#End Region ' CPlaneOrigin #End Region ' CPlaneOrigin
#Region "CPlaneRotate"
''' <summary>
''' Returns a command that do CPlaneRotate.
''' </summary>
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
''' <summary>
''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand.
''' </summary>
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"
''' <summary>
''' Returns a command that do CPlane3P.
''' </summary>
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
''' <summary>
''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand.
''' </summary>
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"
''' <summary>
''' Returns a command that do CPlanePerpObj.
''' </summary>
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
''' <summary>
''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand.
''' </summary>
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" #Region "CPlaneObj"
Private m_bCPlaneObj_IsActive As Boolean = False Private m_bCPlaneObj_IsActive As Boolean = False
@@ -84,32 +84,6 @@
Style="{StaticResource ToolBar_SmallButton}"/> Style="{StaticResource ToolBar_SmallButton}"/>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
<DataTemplate DataType="{x:Type PrintApp:CheckMachiningParam}">
<Grid Margin="0,1,2.5,1"
IsEnabled="{Binding bIsActive}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sName}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<CheckBox Grid.Column="1"
IsChecked="{Binding bValue}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="2.5,0,0,0"/>
<Button Grid.Column="2"
Content="R"
Command="{Binding ResetParam_Command}"
IsEnabled="{Binding bIsModifiedFromPart}"
VerticalContentAlignment="Center"
HorizontalContentAlignment="Center"
Margin="2.5,0,0,0"
Style="{StaticResource ToolBar_SmallButton}"/>
</Grid>
</DataTemplate>
</ItemsControl.Resources> </ItemsControl.Resources>
</ItemsControl> </ItemsControl>
</ScrollViewer> </ScrollViewer>
@@ -42,21 +42,12 @@ Public Class FilledSolidParamPanelVM
m_Type = Cathegories.AUX_SOLID m_Type = Cathegories.AUX_SOLID
m_sName = "Filled Solid" m_sName = "Filled Solid"
m_MachiningParamList = New List(Of MachiningParam)({New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDWIDTH, nFilledSolidId, nPartId, Me), m_MachiningParamList = New List(Of MachiningParam)({New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nFilledSolidId, nPartId, Me),
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nFilledSolidId, nPartId, Me), New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nFilledSolidId, nPartId, Me),
New FilledSolidCheckMachiningParam(MachiningParam.Params.AUXSOLIDSINFILLLINK, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDCOUNT, nFilledSolidId, nPartId, Me),
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nFilledSolidId, nPartId, Me), New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nFilledSolidId, nPartId, Me),
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nFilledSolidId, nPartId, Me), New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nFilledSolidId, nPartId, Me), New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nFilledSolidId, nPartId, Me), New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETLEADPOINT, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSDENSITY, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSGRIDOVERLAP, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSDIRECTION, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETX, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETY, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nFilledSolidId, nPartId, Me), New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nFilledSolidId, nPartId, Me), New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nFilledSolidId, nPartId, Me)}) New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nFilledSolidId, nPartId, Me)})
@@ -199,14 +190,6 @@ Public Class FilledSolidNumericMachiningParam
MyBase.New(Type, Cathegory) MyBase.New(Type, Cathegory)
Dim bReadFromPart As Boolean = False Dim bReadFromPart As Boolean = False
Select Case Type Select Case Type
Case Params.AUXSOLIDSSTRANDWIDTH
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDWIDTH, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDWIDTH, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSSTRANDCOUNT
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDCOUNT, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDCOUNT, m_dPartValue)
m_bIsLen = False
Case Params.AUXSOLIDSOVERLAP Case Params.AUXSOLIDSOVERLAP
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSOVERLAP, m_dValue) bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSOVERLAP, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, m_dPartValue) EgtGetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, m_dPartValue)
@@ -219,30 +202,6 @@ Public Class FilledSolidNumericMachiningParam
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dValue) bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dPartValue) EgtGetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dPartValue)
m_bIsLen = True m_bIsLen = True
Case Params.AUXSOLIDSOFFSETLEADPOINT
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETLEADPOINT, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETLEADPOINT, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSDENSITY
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSDENSITY, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSDENSITY, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSGRIDOVERLAP
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSGRIDOVERLAP, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSGRIDOVERLAP, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSDIRECTION
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSDIRECTION, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSDIRECTION, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSOFFSETX
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETX, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETX, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSOFFSETY
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETY, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETY, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSCOASTINGLEN Case Params.AUXSOLIDSCOASTINGLEN
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSCOASTINGLEN, m_dValue) bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSCOASTINGLEN, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, m_dPartValue) EgtGetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, m_dPartValue)
@@ -271,18 +230,6 @@ Public Class FilledSolidNumericMachiningParam
sWriteValue = DoubleToString(m_dValue, 2) sWriteValue = DoubleToString(m_dValue, 2)
End If End If
Select Case Type Select Case Type
Case Params.AUXSOLIDSSTRANDWIDTH
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDWIDTH, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDWIDTH)
End If
Case Params.AUXSOLIDSSTRANDCOUNT
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDCOUNT, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDCOUNT)
End If
Case Params.AUXSOLIDSOVERLAP Case Params.AUXSOLIDSOVERLAP
If bIsModifiedFromPart Then If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSOVERLAP, sWriteValue) EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSOVERLAP, sWriteValue)
@@ -301,42 +248,6 @@ Public Class FilledSolidNumericMachiningParam
Else Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE) EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE)
End If End If
Case Params.AUXSOLIDSOFFSETLEADPOINT
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETLEADPOINT, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETLEADPOINT)
End If
Case Params.AUXSOLIDSDENSITY
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSDENSITY, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSDENSITY)
End If
Case Params.AUXSOLIDSGRIDOVERLAP
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSGRIDOVERLAP, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSGRIDOVERLAP)
End If
Case Params.AUXSOLIDSDIRECTION
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSDIRECTION, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSDIRECTION)
End If
Case Params.AUXSOLIDSOFFSETX
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETX, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETX)
End If
Case Params.AUXSOLIDSOFFSETY
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETY, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETY)
End If
Case Params.AUXSOLIDSCOASTINGLEN Case Params.AUXSOLIDSCOASTINGLEN
If bIsModifiedFromPart Then If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue) EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue)
@@ -428,14 +339,9 @@ Public Class FilledSolidComboMachiningParam
Dim bReadFromPart As Boolean = False Dim bReadFromPart As Boolean = False
Select Case Type Select Case Type
Case Params.AUXSOLIDSINFILL Case Params.AUXSOLIDSINFILL
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL.NONE, "None"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"), New IdNameStruct(Machining.MPAR_INFILL.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag"), New IdNameStruct(Machining.MPAR_INFILL.ZIGZAG, "ZigZag")})
New IdNameStruct(Machining.MPAR_INFILL_TYPE.LINES, "Lines"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.GRID, "Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG_GRID, "Zigzag Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB, "Honeycomb"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB_GRID, "Honeycomb Grid")})
Dim nSelValue As Integer = 1 Dim nSelValue As Integer = 1
bReadFromRib = EgtGetInfo(nRibId, MAC_AUXSOLIDSINFILL, nSelValue) bReadFromRib = EgtGetInfo(nRibId, MAC_AUXSOLIDSINFILL, nSelValue)
If bReadFromRib Then If bReadFromRib Then
@@ -473,7 +379,7 @@ Public Class FilledSolidComboMachiningParam
Else Else
Select Case Type Select Case Type
Case Params.AUXSOLIDSINFILL Case Params.AUXSOLIDSINFILL
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_INFILL_TYPE.NONE) m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_INFILL.NONE)
m_SelValue = m_OrigSelValue m_SelValue = m_OrigSelValue
Case Params.AUXSOLIDSSTRANDORDER Case Params.AUXSOLIDSSTRANDORDER
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_STRANDORDERS.OUTTOIN) m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_STRANDORDERS.OUTTOIN)
@@ -541,95 +447,4 @@ Public Class FilledSolidComboMachiningParam
#End Region ' COMMANDS #End Region ' COMMANDS
End Class
Public Class FilledSolidCheckMachiningParam
Inherits CheckMachiningParam
Public Overrides Property bValue As Boolean
Get
Return m_bValue
End Get
Set(value As Boolean)
m_bValue = value
NotifyPropertyChanged(NameOf(bValue))
NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
End Set
End Property
Protected m_bPartValue As Boolean
Public ReadOnly Property bPartValue As Boolean
Get
Return m_bPartValue
End Get
End Property
Public ReadOnly Property bIsModifiedFromPart As Boolean
Get
Return m_bValue <> m_bPartValue
End Get
End Property
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nAuxSolidId As Integer, nPartId As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.AUXSOLIDSINFILLLINK
bReadFromPart = EgtGetInfo(nAuxSolidId, MAC_AUXSOLIDSINFILLLINK, m_bValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSINFILLLINK, m_bPartValue)
End Select
m_bOrigValue = m_bValue
If Not bReadFromPart Then
m_bValue = m_bPartValue
m_bOrigValue = m_bPartValue
End If
End Sub
Friend Sub WriteParamInRib(nAuxSolidId As Integer)
Select Case Type
Case Params.AUXSOLIDSINFILLLINK
If bIsModifiedFromPart Then
EgtSetInfo(nAuxSolidId, MAC_AUXSOLIDSINFILLLINK, If(m_bValue, 1, 0))
Else
EgtRemoveInfo(nAuxSolidId, MAC_AUXSOLIDSINFILLLINK)
End If
End Select
End Sub
Friend Overrides Sub SaveParam()
m_bOrigValue = m_bValue
End Sub
Friend Overrides Sub ResetParam()
m_bValue = m_bOrigValue
NotifyPropertyChanged(NameOf(bValue))
End Sub
#Region "COMMANDS"
#Region "ResetParam"
Public ReadOnly Property ResetParam_Command As ICommand
Get
If m_cmdResetParam Is Nothing Then
m_cmdResetParam = New Command(AddressOf ResetParamCmd)
End If
Return m_cmdResetParam
End Get
End Property
Public Sub ResetParamCmd()
m_bValue = m_bPartValue
NotifyPropertyChanged(NameOf(bValue))
NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
End Sub
#End Region ' ResetParam
#End Region ' COMMANDS
End Class End Class
+16 -6
View File
@@ -76,9 +76,6 @@
<Prefer32Bit>true</Prefer32Bit> <Prefer32Bit>true</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="DotNetZip">
<HintPath>..\..\..\EgtProg\Icarus\DotNetZip.dll</HintPath>
</Reference>
<Reference Include="EgtUILib, Version=2.4.7.1, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="EgtUILib, Version=2.4.7.1, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\EgtProg\DllD32\EgtUILib.dll</HintPath> <HintPath>..\..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
@@ -87,8 +84,8 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath> <HintPath>..\..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Ionic.Zip.1.9.1.8\lib\Ionic.Zip.dll</HintPath>
</Reference> </Reference>
<Reference Include="PresentationFramework.Aero2" /> <Reference Include="PresentationFramework.Aero2" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
@@ -153,6 +150,10 @@
<DependentUpon>DispositionPanelV.xaml</DependentUpon> <DependentUpon>DispositionPanelV.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="DispositionPanel\DispositionPanelVM.vb" /> <Compile Include="DispositionPanel\DispositionPanelVM.vb" />
<Compile Include="EgtMessageBox\EgtMessageBoxV.xaml.vb">
<DependentUpon>EgtMessageBoxV.xaml</DependentUpon>
</Compile>
<Compile Include="EgtMessageBox\EgtMessageBoxVM.vb" />
<Compile Include="FilledSolidPanel\FilledSolidPanelV.xaml.vb"> <Compile Include="FilledSolidPanel\FilledSolidPanelV.xaml.vb">
<DependentUpon>FilledSolidPanelV.xaml</DependentUpon> <DependentUpon>FilledSolidPanelV.xaml</DependentUpon>
</Compile> </Compile>
@@ -323,7 +324,6 @@
<Compile Include="Utility\DisableModifiedMgr.vb" /> <Compile Include="Utility\DisableModifiedMgr.vb" />
<Compile Include="Utility\EgwCrypto.vb" /> <Compile Include="Utility\EgwCrypto.vb" />
<Compile Include="Utility\GeomEntityColors.vb" /> <Compile Include="Utility\GeomEntityColors.vb" />
<Compile Include="Utility\JsonUtility.vb" />
<Compile Include="Utility\LuaExec.vb" /> <Compile Include="Utility\LuaExec.vb" />
<Compile Include="Utility\Map.vb" /> <Compile Include="Utility\Map.vb" />
<Compile Include="Utility\MyMachine.vb" /> <Compile Include="Utility\MyMachine.vb" />
@@ -366,6 +366,10 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="EgtMessageBox\EgtMessageBoxV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="FilledSolidPanel\FilledSolidPanelV.xaml"> <Page Include="FilledSolidPanel\FilledSolidPanelV.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@@ -608,6 +612,7 @@
<LastGenOutput>Settings.Designer.vb</LastGenOutput> <LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None> </None>
<None Include="packages.config" /> <None Include="packages.config" />
<Resource Include="Resources\EgtMessageBox\Error.png" />
<Resource Include="Resources\Fonts\Roboto-Regular.ttf" /> <Resource Include="Resources\Fonts\Roboto-Regular.ttf" />
<Resource Include="Resources\Fonts\Roboto-Light.ttf" /> <Resource Include="Resources\Fonts\Roboto-Light.ttf" />
</ItemGroup> </ItemGroup>
@@ -859,6 +864,11 @@
<ItemGroup> <ItemGroup>
<Resource Include="Resources\RibParamPanel\CopyFrom.png" /> <Resource Include="Resources\RibParamPanel\CopyFrom.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Resources\EgtMessageBox\Information.png" />
<Resource Include="Resources\EgtMessageBox\Question.png" />
<Resource Include="Resources\EgtMessageBox\Warning.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Icarus\IcarusR32.exe <PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Icarus\IcarusR32.exe
@@ -157,7 +157,8 @@ Public Class ImportExportMachiningPanelVM
nIndex += 1 nIndex += 1
End While End While
If bIsOriginal AndAlso bIsCustom Then If bIsOriginal AndAlso bIsCustom Then
MessageBox.Show("Corrupted file! Impossible to import it!") 'MessageBox.Show("Corrupted file! Impossible to import it!")
EgtMessageBoxV.Show(Application.Current.MainWindow, "Corrupted file! Impossible to import it!")
ElseIf bIsOriginal Then ElseIf bIsOriginal Then
LoadOriginalMaterial() LoadOriginalMaterial()
End If End If
@@ -301,9 +302,12 @@ Public Class ImportExportMachiningPanelVM
sDuplicatedMaterialList &= " - " & m_MachiningList(Index).sName & Environment.NewLine sDuplicatedMaterialList &= " - " & m_MachiningList(Index).sName & Environment.NewLine
End If End If
Next Next
MessageBox.Show("Impossible to import the package because materials named:" & Environment.NewLine & 'MessageBox.Show("Impossible to import the package because materials named:" & Environment.NewLine &
sDuplicatedMaterialList & Environment.NewLine & ' sDuplicatedMaterialList & Environment.NewLine &
"Please modify the names of these machining and then retry to import the materials.") ' "Please modify the names of these machining and then retry to import the materials.")
EgtMessageBoxV.Show(Application.Current.MainWindow, "Impossible to import the package because materials named:" & Environment.NewLine &
sDuplicatedMaterialList & Environment.NewLine &
"Please modify the names of these machining and then retry to import the materials.")
Return Return
End If End If
' aggiorno/aggiungo materiali ' aggiorno/aggiungo materiali
@@ -353,9 +357,12 @@ Public Class ImportExportMachiningPanelVM
For Index = 0 To ImportedMaterialList.Count - 1 For Index = 0 To ImportedMaterialList.Count - 1
sMaterialList &= " - " & m_MachiningList(Index).sName & " (" & If(ImportedMaterialList(Index) = MaterialState.NOTFOUND, "New", "Updated") & ")" & Environment.NewLine sMaterialList &= " - " & m_MachiningList(Index).sName & " (" & If(ImportedMaterialList(Index) = MaterialState.NOTFOUND, "New", "Updated") & ")" & Environment.NewLine
Next Next
MessageBox.Show("List of the materials:" & Environment.NewLine & 'MessageBox.Show("List of the materials:" & Environment.NewLine &
sMaterialList & Environment.NewLine & ' sMaterialList & Environment.NewLine &
"Import successfully completed.") ' "Import successfully completed.")
EgtMessageBoxV.Show(Application.Current.MainWindow, "List of the materials:" & Environment.NewLine &
sMaterialList & Environment.NewLine &
"Import successfully completed.")
Return Return
End Sub End Sub
@@ -471,7 +478,7 @@ Public Class ImportExportMachiningPanelVM
End Select End Select
Case WindowModeEnum.EXPORT, WindowModeEnum.EXPORT_ORIG Case WindowModeEnum.EXPORT, WindowModeEnum.EXPORT_ORIG
' chiedo il nome con cui salvare il file ' chiedo il nome con cui salvare il file
Dim sExtension As String ="" Dim sExtension As String = ""
If m_WindowType = WindowTypeEnum.MATERIAL Then If m_WindowType = WindowTypeEnum.MATERIAL Then
If m_WindowMode = WindowModeEnum.EXPORT_ORIG Then If m_WindowMode = WindowModeEnum.EXPORT_ORIG Then
sExtension = OriginalMaterialDataExtension sExtension = OriginalMaterialDataExtension
@@ -580,7 +587,8 @@ Public Class ImpExpMachiningItem
If m_AlreadyExist Then If m_AlreadyExist Then
Select Case m_WindowType Select Case m_WindowType
Case WindowTypeEnum.MATERIAL Case WindowTypeEnum.MATERIAL
Select Case System.Windows.MessageBox.Show("Material already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel) Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Material will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
'System.Windows.MessageBox.Show("Material already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_ChangeName = False m_ChangeName = False
m_Active = True m_Active = True
@@ -594,7 +602,8 @@ Public Class ImpExpMachiningItem
End While End While
End If End If
m_sName = m_sOrigName & IMPEXPNAME & If(nImpNameIndex > 0, "_" & nImpNameIndex, "") m_sName = m_sOrigName & IMPEXPNAME & If(nImpNameIndex > 0, "_" & nImpNameIndex, "")
System.Windows.MessageBox.Show("Material will be imported with the name: " & m_sName, "", MessageBoxButton.OK) 'System.Windows.MessageBox.Show("Material will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Material will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
NotifyPropertyChanged(NameOf(sName)) NotifyPropertyChanged(NameOf(sName))
m_ChangeName = True m_ChangeName = True
m_Active = True m_Active = True
@@ -602,7 +611,8 @@ Public Class ImpExpMachiningItem
m_Active = False m_Active = False
End Select End Select
Case WindowTypeEnum.MACHINING Case WindowTypeEnum.MACHINING
Select Case System.Windows.MessageBox.Show("Machining already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel) Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Machining already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel)
'System.Windows.MessageBox.Show("Machining already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_ChangeName = False m_ChangeName = False
m_Active = True m_Active = True
@@ -616,7 +626,8 @@ Public Class ImpExpMachiningItem
End While End While
End If End If
m_sName = m_sOrigName & IMPEXPNAME & If(nImpNameIndex > 0, "_" & nImpNameIndex, "") m_sName = m_sOrigName & IMPEXPNAME & If(nImpNameIndex > 0, "_" & nImpNameIndex, "")
System.Windows.MessageBox.Show("Machining will be imported with the name: " & m_sName, "", MessageBoxButton.OK) 'System.Windows.MessageBox.Show("Machining will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Machining will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
NotifyPropertyChanged(NameOf(sName)) NotifyPropertyChanged(NameOf(sName))
m_ChangeName = True m_ChangeName = True
m_Active = True m_Active = True
@@ -96,8 +96,9 @@ Public Class MyInstrumentPanelVM
EgtDraw() EgtDraw()
' Ripristino stato segnalazione modifica ' Ripristino stato segnalazione modifica
DisableMgr.ReEnable() DisableMgr.ReEnable()
MessageBox.Show(sResult) 'MessageBox.Show(sResult)
Else EgtMessageBoxV.Show(Application.Current.MainWindow, sResult)
Else
' Disabilito segnalazione modificato ' Disabilito segnalazione modificato
Dim DisableMgr As New DisableModifiedMgr Dim DisableMgr As New DisableModifiedMgr
' cancello tutti i gruppi con i chunk ' cancello tutti i gruppi con i chunk
+2 -1
View File
@@ -48,7 +48,8 @@ Public Class MachSaveInDbWndVM
Public Sub Ok() Public Sub Ok()
If Map.refTopPanelVM.MachiningList.Any(Function(x As MachiningIndex) x.sName = m_sName) Then If Map.refTopPanelVM.MachiningList.Any(Function(x As MachiningIndex) x.sName = m_sName) Then
MessageBox.Show("Name already used in Db! Please insert a different name.", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning) 'MessageBox.Show("Name already used in Db! Please insert a different name.", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Name already used in Db! Please insert a different name.", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
Return Return
End If End If
RaiseEvent m_CloseWindow(True) RaiseEvent m_CloseWindow(True)
+53 -505
View File
@@ -45,6 +45,12 @@ Public Class Machining
SUPPORT = 4 SUPPORT = 4
End Enum End Enum
Public Enum MPAR_INFILL As Integer
NONE = 1
OFFSET = 2
ZIGZAG = 3
End Enum
Public Enum MPAR_DYNAMIC_MODE As Integer Public Enum MPAR_DYNAMIC_MODE As Integer
STANDARD = 1 STANDARD = 1
FAST = 2 FAST = 2
@@ -61,17 +67,6 @@ Public Class Machining
RIB_SUPPORT = 8 RIB_SUPPORT = 8
End Enum End Enum
Public Enum MPAR_INFILL_TYPE As Integer
NONE = 0
OFFSET = 16
ZIGZAG = 17
LINES = 32
GRID = 33
ZIGZAG_GRID = 34
HONEYCOMB = 35
HONEYCOMB_GRID = 36
End Enum
Protected m_CathegoryList As New ObservableCollection(Of MachiningCathegory) Protected m_CathegoryList As New ObservableCollection(Of MachiningCathegory)
Public ReadOnly Property CathegoryList As ObservableCollection(Of MachiningCathegory) Public ReadOnly Property CathegoryList As ObservableCollection(Of MachiningCathegory)
Get Get
@@ -152,7 +147,6 @@ Public Class Machining
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.RIBS, nIndex)) m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.RIBS, nIndex))
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nIndex)) m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nIndex))
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nIndex)) m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nIndex))
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.INFILL, nIndex))
m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.MATERIALS, nIndex)) m_CathegoryList.Add(New MachiningCathegory(MachiningCathegory.Cathegories.MATERIALS, nIndex))
For Each Cathegory In m_CathegoryList For Each Cathegory In m_CathegoryList
For Each MachiningParam In Cathegory.MachiningParamList For Each MachiningParam In Cathegory.MachiningParamList
@@ -279,8 +273,7 @@ Public Class MachiningCathegory
RIBS = 8 RIBS = 8
SHELL_NUMBER = 9 SHELL_NUMBER = 9
AUX_SOLID = 10 AUX_SOLID = 10
INFILL = 11 MATERIALS = 11
MATERIALS = 12
End Enum End Enum
Protected m_Type As Cathegories Protected m_Type As Cathegories
@@ -333,6 +326,7 @@ Public Class MachiningCathegory
New NumericMachiningParam(MachiningParam.Params.STARTPOINTOFFSETONSLICE, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.STARTPOINTOFFSETONSLICE, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.STRANDORDER, nIndex, Me), New ComboMachiningParam(MachiningParam.Params.STRANDORDER, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.DIRECTION, nIndex, Me), New ComboMachiningParam(MachiningParam.Params.DIRECTION, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.FLOORCOUNT, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.G0FEED, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.G0FEED, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.G0FEEDZ, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.G0FEEDZ, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.LINKZUP, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.LINKZUP, nIndex, Me),
@@ -342,13 +336,10 @@ Public Class MachiningCathegory
New OrderedMachiningParam(MachiningParam.Params.PRINT_ORDER, nIndex, Me), New OrderedMachiningParam(MachiningParam.Params.PRINT_ORDER, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.PREFLOWDELAY, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.PREFLOWDELAY, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.POSTFLOWDELAY, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.POSTFLOWDELAY, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.SCREWBACK, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.SCREWBACK, nIndex, Me)})
New NumericMachiningParam(MachiningParam.Params.SLICINGHEIGHT, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.MAXSLICESNUMBER, nIndex, Me)})
Case Cathegories.LINK Case Cathegories.LINK
m_sName = "Shell" m_sName = "Shell"
m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.INNERSHELLWIDTH, nIndex, Me), m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.OFFSETLEADPOINT, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.OFFSETLEADPOINT, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.LINKTYPE, nIndex, Me), New ComboMachiningParam(MachiningParam.Params.LINKTYPE, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.LINKPARAM, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.LINKPARAM, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.LEADIN, nIndex, Me), New ComboMachiningParam(MachiningParam.Params.LEADIN, nIndex, Me),
@@ -364,16 +355,11 @@ Public Class MachiningCathegory
'New NumericMachiningParam(MachiningParam.Params.WIPEDIR, nIndex, Me)}) 'New NumericMachiningParam(MachiningParam.Params.WIPEDIR, nIndex, Me)})
Case Cathegories.RIBS Case Cathegories.RIBS
m_sName = "Ribs" m_sName = "Ribs"
m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.RIBSSTRANDWIDTH, nIndex, Me), m_MachiningParamList = New List(Of MachiningParam)({New ComboMachiningParam(MachiningParam.Params.RIBSTYPE, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.RIBSTYPE, nIndex, Me),
New CheckMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nIndex, Me), New CheckMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.RIBSSTRANDOVERLAP, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nIndex, Me),
New CheckMachiningParam(MachiningParam.Params.RIBSLINK, nIndex, Me), New CheckMachiningParam(MachiningParam.Params.RIBSLINK, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.RIBSLINKFILLET, 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.RIBSINVERTORDER, nIndex, Me),
New CheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nIndex, Me), New CheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nIndex, Me),
New CheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nIndex, Me), New CheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nIndex, Me),
@@ -383,8 +369,7 @@ Public Class MachiningCathegory
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nIndex, Me)})
New NumericMachiningParam(MachiningParam.Params.RIBSLEADFILLET, nIndex, Me)})
Case Cathegories.SHELL_NUMBER Case Cathegories.SHELL_NUMBER
m_sName = "Reduce Shell Number" m_sName = "Reduce Shell Number"
m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nIndex, Me), m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nIndex, Me),
@@ -393,42 +378,15 @@ Public Class MachiningCathegory
New NumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nIndex, Me)}) New NumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nIndex, Me)})
Case Cathegories.AUX_SOLID Case Cathegories.AUX_SOLID
m_sName = "Filled Solid" m_sName = "Filled Solid"
m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDWIDTH, nIndex, Me), m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nIndex, Me), New ComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nIndex, Me),
New CheckMachiningParam(MachiningParam.Params.AUXSOLIDSINFILLLINK, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDCOUNT, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nIndex, Me), New ComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nIndex, Me), New ComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETLEADPOINT, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSDENSITY, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSGRIDOVERLAP, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSDIRECTION, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETX, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETY, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nIndex, Me), New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nIndex, Me)}) New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nIndex, Me)})
Case Cathegories.INFILL
m_sName = "Infill"
m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.INFILLSTRANDWIDTH, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.FLOORCOUNT, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.FLOORTYPE, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.CEILCOUNT, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.CEILTYPE, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.INFILLTYPE, nIndex, Me),
New CheckMachiningParam(MachiningParam.Params.INFILLLINK, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.INFILLDENSITY, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.INFILLGRIDOVERLAP, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.INFILLDIRECTION, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.INFILLOFFSETX, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.INFILLOFFSETY, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.INFILLOVERLAP, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.INFILLCOASTING, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.INFILLWIPE, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.INFILLWIPEDIR, nIndex, Me)})
Case Cathegories.MATERIALS Case Cathegories.MATERIALS
m_sName = "Materials" m_sName = "Materials"
Dim sMaterials As String = "" Dim sMaterials As String = ""
@@ -456,19 +414,6 @@ Public Class MachiningCathegory
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param) Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam() MachiningParam.ManageDependencyParam()
Next Next
For Each Param In {MachiningParam.Params.AUXSOLIDSSTRANDCOUNT}
Dim MachiningParam As NumericMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
Case Cathegories.INFILL
For Each Param In {MachiningParam.Params.FLOORCOUNT, MachiningParam.Params.CEILCOUNT}
Dim MachiningParam As NumericMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
For Each Param In {MachiningParam.Params.INFILLTYPE}
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
End Select End Select
End Sub End Sub
@@ -498,11 +443,6 @@ End Class
Public MustInherit Class MachiningParam Public MustInherit Class MachiningParam
Inherits VMBase Inherits VMBase
Public Enum MinMaxTypes As Integer
ABSOLUT = 1
PERCENTAGE = 2
End Enum
Public Enum Params As Integer Public Enum Params As Integer
SLICINGTYPE = 1 SLICINGTYPE = 1
SPIRALVASE = 2 SPIRALVASE = 2
@@ -514,6 +454,7 @@ Public MustInherit Class MachiningParam
STARTPOINTOFFSETONSLICE = 8 STARTPOINTOFFSETONSLICE = 8
STRANDORDER = 9 STRANDORDER = 9
DIRECTION = 10 DIRECTION = 10
FLOORCOUNT = 11
G0FEED = 12 G0FEED = 12
LINKZUP = 13 LINKZUP = 13
G0FEEDZ = 14 G0FEEDZ = 14
@@ -524,8 +465,6 @@ Public MustInherit Class MachiningParam
PREFLOWDELAY = 19 PREFLOWDELAY = 19
POSTFLOWDELAY = 20 POSTFLOWDELAY = 20
SCREWBACK = 21 SCREWBACK = 21
SLICINGHEIGHT = 22
MAXSLICESNUMBER = 23
LINKTYPE = 51 LINKTYPE = 51
LINKPARAM = 52 LINKPARAM = 52
LEADIN = 53 LEADIN = 53
@@ -539,29 +478,22 @@ Public MustInherit Class MachiningParam
COASTINGFEED_PC = 61 COASTINGFEED_PC = 61
WIPELEN = 62 WIPELEN = 62
WIPEFEED_PC = 63 WIPEFEED_PC = 63
INNERSHELLWIDTH = 64
'WIPEDIR = 64 'WIPEDIR = 64
RIBSTYPE = 101 RIBSTYPE = 101
RIBSOVERLAP = 102 RIBSOVERLAP = 102
RIBSSTRANDCOUNT = 103 RIBSSTRANDCOUNT = 103
RIBSLINK = 104 RIBSLINK = 104
RIBSMERGEWITHSHELL = 105 RIBSINVERTORDER = 105
RIBSINVERTMERGEDSHELLMAINLINK = 106 RIBSINVERTDIRECTION = 106
RIBSINVERTORDER = 107 RIBSINVERTSTRANDORDER = 107
RIBSINVERTDIRECTION = 108 RIBSLEADININVERT = 108
RIBSINVERTSTRANDORDER = 109 RIBSLEADINLEN = 109
RIBSLEADININVERT = 110 RIBSLEADOUTINVERT = 110
RIBSLEADINLEN = 111 RIBSLEADOUTLEN = 111
RIBSLEADOUTINVERT = 112 RIBSLEADOUTCOASTING = 112
RIBSLEADOUTLEN = 113 RIBSLEADOUTWIPE = 113
RIBSLEADOUTCOASTING = 114 RIBSLEADOUTWIPEDIR = 114
RIBSLEADOUTWIPE = 115 RIBSLIMITUNBOUNDEDWITHSOLID = 115
RIBSLEADOUTWIPEDIR = 116
RIBSLIMITUNBOUNDEDWITHSOLID = 117
RIBSSTRANDWIDTH = 118
RIBSLINKFILLET = 119
RIBSLEADFILLET = 120
RIBSSTRANDOVERLAP = 121
SHELLNBRDIFFERENCE = 151 SHELLNBRDIFFERENCE = 151
SHELLNBRCOASTING = 152 SHELLNBRCOASTING = 152
SHELLNBRWIPE = 153 SHELLNBRWIPE = 153
@@ -572,35 +504,10 @@ Public MustInherit Class MachiningParam
AUXSOLIDSLINKTYPE = 204 AUXSOLIDSLINKTYPE = 204
AUXSOLIDSLINKPARAM = 205 AUXSOLIDSLINKPARAM = 205
AUXSOLIDSSTARTPOINTOFFSETONSLICE = 206 AUXSOLIDSSTARTPOINTOFFSETONSLICE = 206
AUXSOLIDSOFFSETLEADPOINT = 207 AUXSOLIDSCOASTINGLEN = 207
AUXSOLIDSDENSITY = 208 AUXSOLIDSWIPELEN = 208
AUXSOLIDSGRIDOVERLAP = 209 AUXSOLIDSWIPEDIR = 209
AUXSOLIDSDIRECTION = 210 MATERIALS = 250
AUXSOLIDSOFFSETX = 211
AUXSOLIDSOFFSETY = 212
AUXSOLIDSCOASTINGLEN = 213
AUXSOLIDSWIPELEN = 214
AUXSOLIDSWIPEDIR = 215
AUXSOLIDSSTRANDCOUNT = 216
AUXSOLIDSINFILLLINK = 217
AUXSOLIDSSTRANDWIDTH = 218
FLOORCOUNT = 250
FLOORTYPE = 251
CEILCOUNT = 252
CEILTYPE = 253
INFILLTYPE = 254
INFILLLINK = 255
INFILLDENSITY = 256
INFILLOVERLAP = 257
INFILLGRIDOVERLAP = 258
INFILLDIRECTION = 259
INFILLOFFSETX = 260
INFILLOFFSETY = 261
INFILLCOASTING = 262
INFILLWIPE = 263
INFILLWIPEDIR = 264
INFILLSTRANDWIDTH = 265
Materials = 500
End Enum End Enum
Protected m_Type As Params Protected m_Type As Params
@@ -626,29 +533,12 @@ Public MustInherit Class MachiningParam
End Get End Get
End Property End Property
Public ReadOnly Property bIsBeta As Boolean
Get
Select Case m_Type
Case Params.FLOORCOUNT, Params.FLOORTYPE, Params.CEILCOUNT, Params.CEILTYPE, Params.INFILLTYPE
Return True
Case Else
Return False
End Select
End Get
End Property
Public ReadOnly Property IsBeta_Visibility As Visibility
Get
Return If(bIsBeta, Visibility.Visible, Visibility.Collapsed)
End Get
End Property
Sub New(Type As Params, Cathegory As MachiningCathegory) Sub New(Type As Params, Cathegory As MachiningCathegory)
m_Type = Type m_Type = Type
m_Cathegory = Cathegory m_Cathegory = Cathegory
Select Case m_Type Select Case m_Type
Case Params.SLICINGTYPE Case Params.SLICINGTYPE
m_sName = "Slicing Direction" m_sName = "Slicing direction"
Case Params.STRANDH Case Params.STRANDH
m_sName = "Strand Height" m_sName = "Strand Height"
Case Params.STRANDW Case Params.STRANDW
@@ -669,8 +559,6 @@ Public MustInherit Class MachiningParam
m_sName = "Link Param" m_sName = "Link Param"
Case Params.LINKZUP Case Params.LINKZUP
m_sName = "Link Z Up" m_sName = "Link Z Up"
Case Params.INNERSHELLWIDTH
m_sName = "Custom Inner Shell Width"
Case Params.OFFSETLEADPOINT Case Params.OFFSETLEADPOINT
m_sName = "Offset Lead Point" m_sName = "Offset Lead Point"
Case Params.LEADIN Case Params.LEADIN
@@ -707,28 +595,14 @@ Public MustInherit Class MachiningParam
m_sName = "Post Flow Delay" m_sName = "Post Flow Delay"
Case Params.SCREWBACK Case Params.SCREWBACK
m_sName = "Screw Back" m_sName = "Screw Back"
Case Params.SLICINGHEIGHT
m_sName = "Slicing Height"
Case Params.MAXSLICESNUMBER
m_sName = "Max Slices Number"
Case Params.RIBSSTRANDWIDTH
m_sName = "Custom Strand Width"
Case Params.RIBSTYPE Case Params.RIBSTYPE
m_sName = "Type" m_sName = "Type"
Case Params.RIBSOVERLAP Case Params.RIBSOVERLAP
m_sName = "Overlap [%]" m_sName = "Overlap [%]"
Case Params.RIBSSTRANDOVERLAP
m_sName = "Strand Overlap [%]"
Case Params.RIBSSTRANDCOUNT Case Params.RIBSSTRANDCOUNT
m_sName = "Strand Count" m_sName = "Strand Count"
Case Params.RIBSLINK Case Params.RIBSLINK
m_sName = "Link" m_sName = "Link"
Case Params.RIBSLINKFILLET
m_sName = "Link Fillet"
Case Params.RIBSMERGEWITHSHELL
m_sName = "Merge With Shell"
Case Params.RIBSINVERTMERGEDSHELLMAINLINK
m_sName = "Invert Merged Shell Main Link"
Case Params.RIBSINVERTORDER Case Params.RIBSINVERTORDER
m_sName = "Invert Order" m_sName = "Invert Order"
Case Params.RIBSINVERTDIRECTION Case Params.RIBSINVERTDIRECTION
@@ -749,8 +623,6 @@ Public MustInherit Class MachiningParam
m_sName = "Lead Out Wipe" m_sName = "Lead Out Wipe"
Case Params.RIBSLEADOUTWIPEDIR Case Params.RIBSLEADOUTWIPEDIR
m_sName = "Lead Out Wipe Dir [deg]" m_sName = "Lead Out Wipe Dir [deg]"
Case Params.RIBSLEADFILLET
m_sName = "Lead Fillet"
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
m_sName = "Limit Unbounded With Solid" m_sName = "Limit Unbounded With Solid"
Case Params.SHELLNBRDIFFERENCE Case Params.SHELLNBRDIFFERENCE
@@ -761,16 +633,10 @@ Public MustInherit Class MachiningParam
m_sName = "Wipe" m_sName = "Wipe"
Case Params.SHELLNBRWIPEDIR Case Params.SHELLNBRWIPEDIR
m_sName = "Wipe Direction [deg]" m_sName = "Wipe Direction [deg]"
Case Params.AUXSOLIDSSTRANDWIDTH
m_sName = "Custom Strand Width"
Case Params.AUXSOLIDSOVERLAP Case Params.AUXSOLIDSOVERLAP
m_sName = "Overlap [%]" m_sName = "Overlap [%]"
Case Params.AUXSOLIDSINFILL Case Params.AUXSOLIDSINFILL
m_sName = "Infill" m_sName = "Infill"
Case Params.AUXSOLIDSINFILLLINK
m_sName = "Infill Link"
Case Params.AUXSOLIDSSTRANDCOUNT
m_sName = "Strand Count"
Case Params.AUXSOLIDSSTRANDORDER Case Params.AUXSOLIDSSTRANDORDER
m_sName = "Strand Order" m_sName = "Strand Order"
Case Params.AUXSOLIDSLINKTYPE Case Params.AUXSOLIDSLINKTYPE
@@ -779,18 +645,6 @@ Public MustInherit Class MachiningParam
m_sName = "Link Parameter" m_sName = "Link Parameter"
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
m_sName = "Start Point Offset On Slice" m_sName = "Start Point Offset On Slice"
Case Params.AUXSOLIDSOFFSETLEADPOINT
m_sName = "Offset Lead Point"
Case Params.AUXSOLIDSDENSITY
m_sName = "Density [%]"
Case Params.AUXSOLIDSGRIDOVERLAP
m_sName = "Grid Overlap [%]"
Case Params.AUXSOLIDSDIRECTION
m_sName = "Direction"
Case Params.AUXSOLIDSOFFSETX
m_sName = "Offset X"
Case Params.AUXSOLIDSOFFSETY
m_sName = "Offset Y"
Case Params.AUXSOLIDSCOASTINGLEN Case Params.AUXSOLIDSCOASTINGLEN
m_sName = "Coasting Length" m_sName = "Coasting Length"
Case Params.AUXSOLIDSWIPELEN Case Params.AUXSOLIDSWIPELEN
@@ -804,41 +658,11 @@ Public MustInherit Class MachiningParam
Case Params.STRANDOVERLAP Case Params.STRANDOVERLAP
m_sName = "Strand Overlap [%]" m_sName = "Strand Overlap [%]"
Case Params.FLOWRATE_PC Case Params.FLOWRATE_PC
m_sName = "Flow Rate [%]" m_sName = "Flow rate [%]"
Case Params.DYNAMIC_MODE Case Params.DYNAMIC_MODE
m_sName = "Dynamic Mode" m_sName = "Dynamic Mode"
Case Params.PRINT_ORDER Case Params.PRINT_ORDER
m_sName = "Print Order" m_sName = "Print Order"
Case Params.INFILLSTRANDWIDTH
m_sName = "Custom Strand Width"
Case Params.FLOORTYPE
m_sName = "Floor Type"
Case Params.CEILCOUNT
m_sName = "Ceil Count"
Case Params.CEILTYPE
m_sName = "Ceil Type"
Case Params.INFILLTYPE
m_sName = "Infill Type"
Case Params.INFILLLINK
m_sName = "Link"
Case Params.INFILLDENSITY
m_sName = "Density [%]"
Case Params.INFILLOVERLAP
m_sName = "Overlap [%]"
Case Params.INFILLGRIDOVERLAP
m_sName = "Grid Overlap [%]"
Case Params.INFILLDIRECTION
m_sName = "Direction"
Case Params.INFILLOFFSETX
m_sName = "Offset X"
Case Params.INFILLOFFSETY
m_sName = "Offset Y"
Case Params.INFILLCOASTING
m_sName = "Coasting"
Case Params.INFILLWIPE
m_sName = "Wipe"
Case Params.INFILLWIPEDIR
m_sName = "Wipe Direction"
End Select End Select
End Sub End Sub
@@ -862,8 +686,6 @@ Public Class NumericMachiningParam
Protected m_bIsLen As Boolean = False Protected m_bIsLen As Boolean = False
Protected m_bIsActiveMinMax As Boolean = False Protected m_bIsActiveMinMax As Boolean = False
Protected m_MinMaxLinkedParam As Params = 0
Protected m_MinMaxType As MinMaxTypes = 0
Protected m_dMinValue As Double Protected m_dMinValue As Double
Protected m_dMaxValue As Double Protected m_dMaxValue As Double
@@ -885,31 +707,13 @@ Public Class NumericMachiningParam
StringToDouble(value, dTempValue) StringToDouble(value, dTempValue)
End If End If
If m_bIsActiveMinMax Then If m_bIsActiveMinMax Then
If m_MinMaxType = MinMaxTypes.ABSOLUT Then If dTempValue >= m_dMinValue AndAlso dTempValue <= m_dMaxValue Then
If dTempValue >= m_dMinValue AndAlso dTempValue <= m_dMaxValue Then m_dValue = dTempValue
m_dValue = dTempValue
End If
ElseIf m_MinMaxType = MinMaxTypes.PERCENTAGE Then
Dim LinkedParam As MachiningParam = Nothing
' cerco il parametro a cui e' collegato
For Each CurrCathegory In Map.refMachiningDbVM.SelMachining.CathegoryList
LinkedParam = CurrCathegory.MachiningParamList.FirstOrDefault(Function(x) x.Type = m_MinMaxLinkedParam)
If Not IsNothing(LinkedParam) Then Exit For
Next
If Not IsNothing(LinkedParam) AndAlso TypeOf LinkedParam Is NumericMachiningParam Then
Dim NumericLinkedParam As NumericMachiningParam = DirectCast(LinkedParam, NumericMachiningParam)
If dTempValue >= NumericLinkedParam.dValue * m_dMinValue / 100 AndAlso dTempValue <= NumericLinkedParam.dValue * m_dMaxValue / 100 Then
m_dValue = dTempValue
End If
Else
m_dValue = dTempValue
End If
End If End If
Else Else
m_dValue = dTempValue m_dValue = dTempValue
End If End If
NotifyPropertyChanged(NameOf(sValue)) NotifyPropertyChanged(NameOf(sValue))
ManageDependencyParam()
End Set End Set
End Property End Property
@@ -949,40 +753,12 @@ Public Class NumericMachiningParam
Dim sMinMaxValues() As String = sMinMax.Split(","c) Dim sMinMaxValues() As String = sMinMax.Split(","c)
Dim dMin As Double = 0 Dim dMin As Double = 0
Dim dMax As Double = 0 Dim dMax As Double = 0
If sMinMaxValues.Count() = 2 Then If StringToDouble(sMinMaxValues(0), dMin) AndAlso StringToDouble(sMinMaxValues(1), dMax) Then
If StringToDouble(sMinMaxValues(0), dMin) AndAlso StringToDouble(sMinMaxValues(1), dMax) Then m_dMinValue = dMin
m_MinMaxType = MinMaxTypes.ABSOLUT m_dMaxValue = dMax
m_dMinValue = dMin m_bIsActiveMinMax = True
m_dMaxValue = dMax
m_bIsActiveMinMax = True
End If
ElseIf sMinMaxValues.Count() > 2 Then
Dim nMinMaxType As Integer = 0
If StringToDouble(sMinMaxValues(0), nMinMaxType) AndAlso nMinMaxType = 1 Then
If StringToDouble(sMinMaxValues(0), dMin) AndAlso StringToDouble(sMinMaxValues(1), dMax) Then
m_MinMaxType = nMinMaxType
m_dMinValue = dMin
m_dMaxValue = dMax
m_bIsActiveMinMax = True
End If
ElseIf StringToDouble(sMinMaxValues(0), nMinMaxType) AndAlso nMinMaxType = 2 Then
Dim nMinMaxLinkedParam As Integer = 0
If sMinMaxValues.Count() >= 4 AndAlso Integer.TryParse(sMinMaxValues(1), nMinMaxLinkedParam) AndAlso StringToDouble(sMinMaxValues(2), dMin) AndAlso StringToDouble(sMinMaxValues(3), dMax) Then
m_MinMaxLinkedParam = nMinMaxLinkedParam
m_MinMaxType = nMinMaxType
m_dMinValue = dMin
m_dMaxValue = dMax
m_bIsActiveMinMax = True
End If
End If
End If End If
End If End If
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 ' leggo parametri da Db
If nIndex = 0 Then If nIndex = 0 Then
m_dValue = 0 m_dValue = 0
@@ -1013,9 +789,6 @@ Public Class NumericMachiningParam
Case Params.LINKZUP Case Params.LINKZUP
m_dValue = ReadMachiningParamDouble(nIndex, MAC_LINKZUP, 0) m_dValue = ReadMachiningParamDouble(nIndex, MAC_LINKZUP, 0)
m_bIsLen = True m_bIsLen = True
Case Params.INNERSHELLWIDTH
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INNERSHELLWIDTH, 0)
m_bIsLen = True
Case Params.OFFSETLEADPOINT Case Params.OFFSETLEADPOINT
m_dValue = ReadMachiningParamDouble(nIndex, MAC_OFFSETLEADPOINT, 0) m_dValue = ReadMachiningParamDouble(nIndex, MAC_OFFSETLEADPOINT, 0)
m_bIsLen = True m_bIsLen = True
@@ -1067,27 +840,12 @@ Public Class NumericMachiningParam
Case Params.SCREWBACK Case Params.SCREWBACK
m_dValue = ReadMachiningParamDouble(nIndex, MAC_SCREWBACK, 45) m_dValue = ReadMachiningParamDouble(nIndex, MAC_SCREWBACK, 45)
m_bIsLen = False m_bIsLen = False
Case Params.SLICINGHEIGHT
m_dValue = ReadMachiningParamDouble(nIndex, MAC_SLICINGHEIGHT, CurrentMachine.dSlicingMaxHeight)
m_bIsLen = False
Case Params.MAXSLICESNUMBER
m_dValue = ReadMachiningParamDouble(nIndex, MAC_MAXSLICESNUMBER, 0)
m_bIsLen = False
Case Params.RIBSSTRANDWIDTH
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSSTRANDWIDTH, 0)
m_bIsLen = True
Case Params.RIBSOVERLAP Case Params.RIBSOVERLAP
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSOVERLAP, 0) m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSOVERLAP, 0)
m_bIsLen = False m_bIsLen = False
Case Params.RIBSSTRANDOVERLAP
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSSTRANDOVERLAP, 0)
m_bIsLen = False
Case Params.RIBSSTRANDCOUNT Case Params.RIBSSTRANDCOUNT
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSSTRANDCOUNT, 0) m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSSTRANDCOUNT, 0)
m_bIsLen = False m_bIsLen = False
Case Params.RIBSLINKFILLET
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLINKFILLET, 0)
m_bIsLen = True
Case Params.RIBSLEADINLEN Case Params.RIBSLEADINLEN
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLEADINLEN, 0) m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLEADINLEN, 0)
m_bIsLen = True m_bIsLen = True
@@ -1103,9 +861,6 @@ Public Class NumericMachiningParam
Case Params.RIBSLEADOUTWIPEDIR Case Params.RIBSLEADOUTWIPEDIR
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLEADOUTWIPEDIR, 0) m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLEADOUTWIPEDIR, 0)
m_bIsLen = False m_bIsLen = False
Case Params.RIBSLEADFILLET
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLEADFILLET, 0)
m_bIsLen = True
Case Params.SHELLNBRDIFFERENCE Case Params.SHELLNBRDIFFERENCE
m_dValue = ReadMachiningParamDouble(nIndex, MAC_SHELLNBRDIFFERENCE, 0) m_dValue = ReadMachiningParamDouble(nIndex, MAC_SHELLNBRDIFFERENCE, 0)
m_bIsLen = False m_bIsLen = False
@@ -1118,12 +873,6 @@ Public Class NumericMachiningParam
Case Params.SHELLNBRWIPEDIR Case Params.SHELLNBRWIPEDIR
m_dValue = ReadMachiningParamDouble(nIndex, MAC_SHELLNBRWIPEDIR, 0) m_dValue = ReadMachiningParamDouble(nIndex, MAC_SHELLNBRWIPEDIR, 0)
m_bIsLen = False m_bIsLen = False
Case Params.AUXSOLIDSSTRANDWIDTH
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSSTRANDWIDTH, 0)
m_bIsLen = True
Case Params.AUXSOLIDSSTRANDCOUNT
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSSTRANDCOUNT, 0)
m_bIsLen = False
Case Params.AUXSOLIDSOVERLAP Case Params.AUXSOLIDSOVERLAP
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSOVERLAP, 0) m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSOVERLAP, 0)
m_bIsLen = False m_bIsLen = False
@@ -1133,24 +882,6 @@ Public Class NumericMachiningParam
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, 0) m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, 0)
m_bIsLen = True m_bIsLen = True
Case Params.AUXSOLIDSOFFSETLEADPOINT
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSOFFSETLEADPOINT, 0)
m_bIsLen = True
Case Params.AUXSOLIDSDENSITY
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSDENSITY, 0)
m_bIsLen = False
Case Params.AUXSOLIDSGRIDOVERLAP
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSGRIDOVERLAP, 0)
m_bIsLen = True
Case Params.AUXSOLIDSDIRECTION
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSDIRECTION, 0)
m_bIsLen = False
Case Params.AUXSOLIDSOFFSETX
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSOFFSETX, 0)
m_bIsLen = True
Case Params.AUXSOLIDSOFFSETY
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSOFFSETY, 0)
m_bIsLen = True
Case Params.AUXSOLIDSCOASTINGLEN Case Params.AUXSOLIDSCOASTINGLEN
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSCOASTINGLEN, 0) m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSCOASTINGLEN, 0)
m_bIsLen = True m_bIsLen = True
@@ -1163,68 +894,11 @@ Public Class NumericMachiningParam
Case Params.FLOWRATE_PC Case Params.FLOWRATE_PC
m_dValue = ReadMachiningParamDouble(nIndex, MAC_CONSTANT, 100) m_dValue = ReadMachiningParamDouble(nIndex, MAC_CONSTANT, 100)
m_bIsLen = False m_bIsLen = False
Case Params.INFILLSTRANDWIDTH
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INFILLSTRANDWIDTH, 0)
m_bIsLen = True
Case Params.CEILCOUNT
m_dValue = ReadMachiningParamDouble(nIndex, MAC_CEILCOUNT, 0)
m_bIsLen = False
Case Params.INFILLDENSITY
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INFILLDENSITY, 0)
m_bIsLen = False
Case Params.INFILLOVERLAP
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INFILLOVERLAP, 0)
m_bIsLen = False
Case Params.INFILLGRIDOVERLAP
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INFILLGRIDOVERLAP, 0)
m_bIsLen = False
Case Params.INFILLDIRECTION
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INFILLDIRECTION, 0)
m_bIsLen = False
Case Params.INFILLOFFSETX
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INFILLOFFSETX, 0)
m_bIsLen = True
Case Params.INFILLOFFSETY
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INFILLOFFSETY, 0)
m_bIsLen = True
Case Params.INFILLCOASTING
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INFILLCOASTING, 0)
m_bIsLen = True
Case Params.INFILLWIPE
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INFILLWIPE, 0)
m_bIsLen = True
Case Params.INFILLWIPEDIR
m_dValue = ReadMachiningParamDouble(nIndex, MAC_INFILLWIPEDIR, 0)
m_bIsLen = False
End Select End Select
End If End If
m_dOrigValue = m_dValue m_dOrigValue = m_dValue
End Sub End Sub
Friend Sub ManageDependencyParam()
' gestisco dis/attivazione parametri dipendenti
Select Case m_Type
Case Params.FLOORCOUNT
Dim ComboMachiningParam As ComboMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.FLOORTYPE)
ComboMachiningParam.SetIsActive(m_dValue <> 0)
Case Params.CEILCOUNT
Dim ComboMachiningParam As ComboMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.CEILTYPE)
ComboMachiningParam.SetIsActive(m_dValue <> 0)
Case Params.AUXSOLIDSSTRANDCOUNT
Dim AuxSolidsInfillParam As ComboMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSINFILL)
Dim ComboMachiningParam As ComboMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSSTRANDORDER)
ComboMachiningParam.SetIsActive(m_dValue > 0 OrElse AuxSolidsInfillParam.SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET)
ComboMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSLINKTYPE)
ComboMachiningParam.SetIsActive(m_dValue > 0 OrElse AuxSolidsInfillParam.SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET)
Dim NumericMachiningParam As NumericMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSLINKPARAM)
NumericMachiningParam.SetIsActive(m_dValue > 0 OrElse AuxSolidsInfillParam.SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET)
NumericMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE)
NumericMachiningParam.SetIsActive(m_dValue > 0 OrElse AuxSolidsInfillParam.SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET)
NumericMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSOFFSETLEADPOINT)
NumericMachiningParam.SetIsActive(m_dValue > 0 OrElse AuxSolidsInfillParam.SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET)
End Select
End Sub
Friend Overrides Sub WriteParamOnDb(nIndex As Integer, Optional sFilePath As String = "") Friend Overrides Sub WriteParamOnDb(nIndex As Integer, Optional sFilePath As String = "")
Dim sWriteValue As String = "" Dim sWriteValue As String = ""
If m_bIsLen Then If m_bIsLen Then
@@ -1249,8 +923,6 @@ Public Class NumericMachiningParam
WriteMachiningParam(nIndex, MAC_LINKPARAM, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_LINKPARAM, sWriteValue, sFilePath)
Case Params.LINKZUP Case Params.LINKZUP
WriteMachiningParam(nIndex, MAC_LINKZUP, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_LINKZUP, sWriteValue, sFilePath)
Case Params.INNERSHELLWIDTH
WriteMachiningParam(nIndex, MAC_INNERSHELLWIDTH, sWriteValue, sFilePath)
Case Params.OFFSETLEADPOINT Case Params.OFFSETLEADPOINT
WriteMachiningParam(nIndex, MAC_OFFSETLEADPOINT, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_OFFSETLEADPOINT, sWriteValue, sFilePath)
Case Params.LEADINTANGDIST Case Params.LEADINTANGDIST
@@ -1285,20 +957,10 @@ Public Class NumericMachiningParam
WriteMachiningParam(nIndex, MAC_POSTFLOWDELAY, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_POSTFLOWDELAY, sWriteValue, sFilePath)
Case Params.SCREWBACK Case Params.SCREWBACK
WriteMachiningParam(nIndex, MAC_SCREWBACK, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_SCREWBACK, sWriteValue, sFilePath)
Case Params.SLICINGHEIGHT
WriteMachiningParam(nIndex, MAC_SLICINGHEIGHT, sWriteValue, sFilePath)
Case Params.MAXSLICESNUMBER
WriteMachiningParam(nIndex, MAC_MAXSLICESNUMBER, sWriteValue, sFilePath)
Case Params.RIBSSTRANDWIDTH
WriteMachiningParam(nIndex, MAC_RIBSSTRANDWIDTH, sWriteValue, sFilePath)
Case Params.RIBSOVERLAP Case Params.RIBSOVERLAP
WriteMachiningParam(nIndex, MAC_RIBSOVERLAP, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_RIBSOVERLAP, sWriteValue, sFilePath)
Case Params.RIBSSTRANDOVERLAP
WriteMachiningParam(nIndex, MAC_RIBSSTRANDOVERLAP, sWriteValue, sFilePath)
Case Params.RIBSSTRANDCOUNT Case Params.RIBSSTRANDCOUNT
WriteMachiningParam(nIndex, MAC_RIBSSTRANDCOUNT, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_RIBSSTRANDCOUNT, sWriteValue, sFilePath)
Case Params.RIBSLINKFILLET
WriteMachiningParam(nIndex, MAC_RIBSLINKFILLET, sWriteValue, sFilePath)
Case Params.RIBSLEADINLEN Case Params.RIBSLEADINLEN
WriteMachiningParam(nIndex, MAC_RIBSLEADINLEN, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_RIBSLEADINLEN, sWriteValue, sFilePath)
Case Params.RIBSLEADOUTLEN Case Params.RIBSLEADOUTLEN
@@ -1309,8 +971,6 @@ Public Class NumericMachiningParam
WriteMachiningParam(nIndex, MAC_RIBSLEADOUTWIPE, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_RIBSLEADOUTWIPE, sWriteValue, sFilePath)
Case Params.RIBSLEADOUTWIPEDIR Case Params.RIBSLEADOUTWIPEDIR
WriteMachiningParam(nIndex, MAC_RIBSLEADOUTWIPEDIR, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_RIBSLEADOUTWIPEDIR, sWriteValue, sFilePath)
Case Params.RIBSLEADFILLET
WriteMachiningParam(nIndex, MAC_RIBSLEADFILLET, sWriteValue, sFilePath)
Case Params.SHELLNBRDIFFERENCE Case Params.SHELLNBRDIFFERENCE
WriteMachiningParam(nIndex, MAC_SHELLNBRDIFFERENCE, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_SHELLNBRDIFFERENCE, sWriteValue, sFilePath)
Case Params.SHELLNBRCOASTING Case Params.SHELLNBRCOASTING
@@ -1319,28 +979,12 @@ Public Class NumericMachiningParam
WriteMachiningParam(nIndex, MAC_SHELLNBRWIPE, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_SHELLNBRWIPE, sWriteValue, sFilePath)
Case Params.SHELLNBRWIPEDIR Case Params.SHELLNBRWIPEDIR
WriteMachiningParam(nIndex, MAC_SHELLNBRWIPEDIR, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_SHELLNBRWIPEDIR, sWriteValue, sFilePath)
Case Params.AUXSOLIDSSTRANDWIDTH
WriteMachiningParam(nIndex, MAC_AUXSOLIDSSTRANDWIDTH, sWriteValue, sFilePath)
Case Params.AUXSOLIDSSTRANDCOUNT
WriteMachiningParam(nIndex, MAC_AUXSOLIDSSTRANDCOUNT, sWriteValue, sFilePath)
Case Params.AUXSOLIDSOVERLAP Case Params.AUXSOLIDSOVERLAP
WriteMachiningParam(nIndex, MAC_AUXSOLIDSOVERLAP, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_AUXSOLIDSOVERLAP, sWriteValue, sFilePath)
Case Params.AUXSOLIDSLINKPARAM Case Params.AUXSOLIDSLINKPARAM
WriteMachiningParam(nIndex, MAC_AUXSOLIDSLINKPARAM, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_AUXSOLIDSLINKPARAM, sWriteValue, sFilePath)
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
WriteMachiningParam(nIndex, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, sWriteValue, sFilePath)
Case Params.AUXSOLIDSOFFSETLEADPOINT
WriteMachiningParam(nIndex, MAC_AUXSOLIDSOFFSETLEADPOINT, sWriteValue, sFilePath)
Case Params.AUXSOLIDSDENSITY
WriteMachiningParam(nIndex, MAC_AUXSOLIDSDENSITY, sWriteValue, sFilePath)
Case Params.AUXSOLIDSGRIDOVERLAP
WriteMachiningParam(nIndex, MAC_AUXSOLIDSGRIDOVERLAP, sWriteValue, sFilePath)
Case Params.AUXSOLIDSDIRECTION
WriteMachiningParam(nIndex, MAC_AUXSOLIDSDIRECTION, sWriteValue, sFilePath)
Case Params.AUXSOLIDSOFFSETX
WriteMachiningParam(nIndex, MAC_AUXSOLIDSOFFSETX, sWriteValue, sFilePath)
Case Params.AUXSOLIDSOFFSETY
WriteMachiningParam(nIndex, MAC_AUXSOLIDSOFFSETY, sWriteValue, sFilePath)
Case Params.AUXSOLIDSCOASTINGLEN Case Params.AUXSOLIDSCOASTINGLEN
WriteMachiningParam(nIndex, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue, sFilePath)
Case Params.AUXSOLIDSWIPELEN Case Params.AUXSOLIDSWIPELEN
@@ -1349,28 +993,6 @@ Public Class NumericMachiningParam
WriteMachiningParam(nIndex, MAC_AUXSOLIDSWIPEDIR, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_AUXSOLIDSWIPEDIR, sWriteValue, sFilePath)
Case Params.FLOWRATE_PC Case Params.FLOWRATE_PC
WriteMachiningParam(nIndex, MAC_CONSTANT, sWriteValue, sFilePath) WriteMachiningParam(nIndex, MAC_CONSTANT, sWriteValue, sFilePath)
Case Params.INFILLSTRANDWIDTH
WriteMachiningParam(nIndex, MAC_INFILLSTRANDWIDTH, sWriteValue, sFilePath)
Case Params.CEILCOUNT
WriteMachiningParam(nIndex, MAC_CEILCOUNT, sWriteValue, sFilePath)
Case Params.INFILLDENSITY
WriteMachiningParam(nIndex, MAC_INFILLDENSITY, sWriteValue, sFilePath)
Case Params.INFILLOVERLAP
WriteMachiningParam(nIndex, MAC_INFILLOVERLAP, sWriteValue, sFilePath)
Case Params.INFILLGRIDOVERLAP
WriteMachiningParam(nIndex, MAC_INFILLGRIDOVERLAP, sWriteValue, sFilePath)
Case Params.INFILLDIRECTION
WriteMachiningParam(nIndex, MAC_INFILLDIRECTION, sWriteValue, sFilePath)
Case Params.INFILLOFFSETX
WriteMachiningParam(nIndex, MAC_INFILLOFFSETX, sWriteValue, sFilePath)
Case Params.INFILLOFFSETY
WriteMachiningParam(nIndex, MAC_INFILLOFFSETY, sWriteValue, sFilePath)
Case Params.INFILLCOASTING
WriteMachiningParam(nIndex, MAC_INFILLCOASTING, sWriteValue, sFilePath)
Case Params.INFILLWIPE
WriteMachiningParam(nIndex, MAC_INFILLWIPE, sWriteValue, sFilePath)
Case Params.INFILLWIPEDIR
WriteMachiningParam(nIndex, MAC_INFILLWIPEDIR, sWriteValue, sFilePath)
End Select End Select
End Sub End Sub
@@ -1515,71 +1137,50 @@ Public Class ComboMachiningParam
Case Params.STRANDORDER Case Params.STRANDORDER
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_STRANDORDERS.OUTTOIN, "From Outside To Inside"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_STRANDORDERS.OUTTOIN, "From Outside To Inside"),
New IdNameStruct(Machining.MPAR_STRANDORDERS.INTOOUT, "From Inside To Outside")}) New IdNameStruct(Machining.MPAR_STRANDORDERS.INTOOUT, "From Inside To Outside")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_STRANDORDER, Machining.MPAR_STRANDORDERS.OUTTOIN)) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_STRANDORDER, 0))
Case Params.DIRECTION Case Params.DIRECTION
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_DIRECTIONS.CCW, "Counterclockwise"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_DIRECTIONS.CCW, "Counterclockwise"),
New IdNameStruct(Machining.MPAR_DIRECTIONS.CW, "Clockwise")}) New IdNameStruct(Machining.MPAR_DIRECTIONS.CW, "Clockwise")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_DIRECTION, Machining.MPAR_DIRECTIONS.CCW)) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_DIRECTION, 0))
Case Params.LINKTYPE Case Params.LINKTYPE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LINKTYPES.NONE, "None"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LINKTYPES.NONE, "None"),
New IdNameStruct(Machining.MPAR_LINKTYPES.LINEAR, "Linear"), New IdNameStruct(Machining.MPAR_LINKTYPES.LINEAR, "Linear"),
New IdNameStruct(Machining.MPAR_LINKTYPES.BIARC, "Biarc")}) New IdNameStruct(Machining.MPAR_LINKTYPES.BIARC, "Biarc")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_LINKTYPE, Machining.MPAR_LEADINOUT.NONE)) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_LINKTYPE, 0))
Case Params.LEADIN Case Params.LEADIN
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LEADINOUT.NONE, "None"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LEADINOUT.NONE, "None"),
New IdNameStruct(Machining.MPAR_LEADINOUT.LINEAR, "Linear"), New IdNameStruct(Machining.MPAR_LEADINOUT.LINEAR, "Linear"),
New IdNameStruct(Machining.MPAR_LEADINOUT.ARC, "Arc")}) New IdNameStruct(Machining.MPAR_LEADINOUT.ARC, "Arc")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_LEADIN, Machining.MPAR_LEADINOUT.NONE)) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_LEADIN, 0))
Case Params.LEADOUT Case Params.LEADOUT
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LEADINOUT.NONE, "None"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LEADINOUT.NONE, "None"),
New IdNameStruct(Machining.MPAR_LEADINOUT.LINEAR, "Linear"), New IdNameStruct(Machining.MPAR_LEADINOUT.LINEAR, "Linear"),
New IdNameStruct(Machining.MPAR_LEADINOUT.ARC, "Arc")}) New IdNameStruct(Machining.MPAR_LEADINOUT.ARC, "Arc")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_LEADOUT, Machining.MPAR_LEADINOUT.NONE)) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_LEADOUT, 0))
Case Params.RIBSTYPE Case Params.RIBSTYPE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_RIBSTYPE.INTERNAL, "Internal"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_RIBSTYPE.INTERNAL, "Internal"),
New IdNameStruct(Machining.MPAR_RIBSTYPE.EXTERNAL, "External"), New IdNameStruct(Machining.MPAR_RIBSTYPE.EXTERNAL, "External"),
New IdNameStruct(Machining.MPAR_RIBSTYPE.UNBOUNDED, "Unbounded"), New IdNameStruct(Machining.MPAR_RIBSTYPE.UNBOUNDED, "Unbounded"),
New IdNameStruct(Machining.MPAR_RIBSTYPE.SUPPORT, "Support")}) New IdNameStruct(Machining.MPAR_RIBSTYPE.SUPPORT, "Support")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_RIBSTYPE, Machining.MPAR_RIBSTYPE.INTERNAL)) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_RIBSTYPE, 1))
Case Params.AUXSOLIDSINFILL Case Params.AUXSOLIDSINFILL
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL.NONE, "None"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"), New IdNameStruct(Machining.MPAR_INFILL.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag"), New IdNameStruct(Machining.MPAR_INFILL.ZIGZAG, "ZigZag")})
New IdNameStruct(Machining.MPAR_INFILL_TYPE.LINES, "Lines"), m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSINFILL, 0))
New IdNameStruct(Machining.MPAR_INFILL_TYPE.GRID, "Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG_GRID, "Zigzag Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB, "Honeycomb"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB_GRID, "Honeycomb Grid")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSINFILL, Machining.MPAR_INFILL_TYPE.NONE))
Case Params.AUXSOLIDSSTRANDORDER Case Params.AUXSOLIDSSTRANDORDER
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_STRANDORDERS.OUTTOIN, "From Outside To Inside"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_STRANDORDERS.OUTTOIN, "From Outside To Inside"),
New IdNameStruct(Machining.MPAR_STRANDORDERS.INTOOUT, "From Inside To Outside")}) New IdNameStruct(Machining.MPAR_STRANDORDERS.INTOOUT, "From Inside To Outside")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSSTRANDORDER, Machining.MPAR_STRANDORDERS.OUTTOIN)) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSSTRANDORDER, 0))
Case Params.AUXSOLIDSLINKTYPE Case Params.AUXSOLIDSLINKTYPE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LINKTYPES.NONE, "None"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LINKTYPES.NONE, "None"),
New IdNameStruct(Machining.MPAR_LINKTYPES.LINEAR, "Linear"), New IdNameStruct(Machining.MPAR_LINKTYPES.LINEAR, "Linear"),
New IdNameStruct(Machining.MPAR_LINKTYPES.BIARC, "Biarc")}) New IdNameStruct(Machining.MPAR_LINKTYPES.BIARC, "Biarc")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSLINKTYPE, Machining.MPAR_LINKTYPES.NONE)) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSLINKTYPE, 0))
Case Params.DYNAMIC_MODE Case Params.DYNAMIC_MODE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_DYNAMIC_MODE.STANDARD, "Standard"), m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_DYNAMIC_MODE.STANDARD, "Standard"),
New IdNameStruct(Machining.MPAR_DYNAMIC_MODE.FAST, "Fast")}) New IdNameStruct(Machining.MPAR_DYNAMIC_MODE.FAST, "Fast")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_DYNAMICMODE, Machining.MPAR_DYNAMIC_MODE.STANDARD)) m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_DYNAMICMODE, 1))
Case Params.FLOORTYPE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_FLOORTYPE, Machining.MPAR_INFILL_TYPE.OFFSET))
Case Params.CEILTYPE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_CEILTYPE, Machining.MPAR_INFILL_TYPE.OFFSET))
Case Params.INFILLTYPE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.LINES, "Lines"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.GRID, "Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG_GRID, "Zigzag Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB, "Honeycomb"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB_GRID, "Honeycomb Grid")})
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_INFILLTYPE, Machining.MPAR_INFILL_TYPE.NONE))
End Select End Select
End If End If
m_OrigSelValue = m_SelValue m_OrigSelValue = m_SelValue
@@ -1605,43 +1206,12 @@ Public Class ComboMachiningParam
Dim CheckMachiningParam As CheckMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.RIBSLIMITUNBOUNDEDWITHSOLID) Dim CheckMachiningParam As CheckMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.RIBSLIMITUNBOUNDEDWITHSOLID)
CheckMachiningParam.SetIsActive(m_SelValue.Id = MPAR_RIBSTYPE.UNBOUNDED) CheckMachiningParam.SetIsActive(m_SelValue.Id = MPAR_RIBSTYPE.UNBOUNDED)
Case Params.AUXSOLIDSINFILL Case Params.AUXSOLIDSINFILL
Dim AuxSolidsStrandCountParam As NumericMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSSTRANDCOUNT)
Dim ComboMachiningParam As ComboMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSSTRANDORDER) Dim ComboMachiningParam As ComboMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSSTRANDORDER)
ComboMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET OrElse AuxSolidsStrandCountParam.dValue > 0) ComboMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL.OFFSET)
ComboMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSLINKTYPE) ComboMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSLINKTYPE)
ComboMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET OrElse AuxSolidsStrandCountParam.dValue > 0) ComboMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL.OFFSET)
Dim NumMachiningParam As NumericMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSLINKPARAM) Dim NumMachiningParam As NumericMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSLINKPARAM)
NumMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET OrElse AuxSolidsStrandCountParam.dValue > 0) NumMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL.OFFSET)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE)
NumMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET OrElse AuxSolidsStrandCountParam.dValue > 0)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSOFFSETLEADPOINT)
NumMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL_TYPE.OFFSET OrElse AuxSolidsStrandCountParam.dValue > 0)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSDENSITY)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.ZIGZAG AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.OFFSET)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSGRIDOVERLAP)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.ZIGZAG AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.OFFSET AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.LINES AndAlso
m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.GRID)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSDIRECTION)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.ZIGZAG AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.OFFSET)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSOFFSETX)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.ZIGZAG AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.OFFSET)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSOFFSETY)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.ZIGZAG AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.OFFSET)
Dim CheckMachiningParam As CheckMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSINFILLLINK)
CheckMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.ZIGZAG AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.OFFSET)
Case Params.INFILLTYPE
Dim NumMachiningParam As NumericMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.INFILLDENSITY)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.INFILLGRIDOVERLAP)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.LINES AndAlso m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.GRID)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.INFILLDIRECTION)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.INFILLOFFSETX)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.INFILLOFFSETY)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE)
Dim CheckMachiningParam As CheckMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.INFILLLINK)
CheckMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_INFILL_TYPE.NONE)
End Select End Select
End Sub End Sub
@@ -1669,12 +1239,6 @@ Public Class ComboMachiningParam
WriteMachiningParam(nIndex, MAC_AUXSOLIDSLINKTYPE, m_SelValue.Id, sFilePath) WriteMachiningParam(nIndex, MAC_AUXSOLIDSLINKTYPE, m_SelValue.Id, sFilePath)
Case Params.DYNAMIC_MODE Case Params.DYNAMIC_MODE
WriteMachiningParam(nIndex, MAC_DYNAMICMODE, m_SelValue.Id, sFilePath) WriteMachiningParam(nIndex, MAC_DYNAMICMODE, m_SelValue.Id, sFilePath)
Case Params.FLOORTYPE
WriteMachiningParam(nIndex, MAC_FLOORTYPE, m_SelValue.Id, sFilePath)
Case Params.CEILTYPE
WriteMachiningParam(nIndex, MAC_CEILTYPE, m_SelValue.Id, sFilePath)
Case Params.INFILLTYPE
WriteMachiningParam(nIndex, MAC_INFILLTYPE, m_SelValue.Id, sFilePath)
End Select End Select
End Sub End Sub
@@ -1741,10 +1305,6 @@ Public Class CheckMachiningParam
m_bValue = ReadMachiningParamDouble(nIndex, MAC_SPIRALVASE, 0) m_bValue = ReadMachiningParamDouble(nIndex, MAC_SPIRALVASE, 0)
Case Params.RIBSLINK Case Params.RIBSLINK
m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLINK, 0) 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 Case Params.RIBSINVERTORDER
m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSINVERTORDER, 0) m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSINVERTORDER, 0)
Case Params.RIBSINVERTDIRECTION Case Params.RIBSINVERTDIRECTION
@@ -1757,10 +1317,6 @@ Public Class CheckMachiningParam
m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLEADOUTINVERT, 0) m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLEADOUTINVERT, 0)
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, 0) m_bValue = ReadMachiningParamDouble(nIndex, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, 0)
Case Params.AUXSOLIDSINFILLLINK
m_bValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSINFILLLINK, 0)
Case Params.INFILLLINK
m_bValue = ReadMachiningParamDouble(nIndex, MAC_INFILLLINK, 0)
End Select End Select
End If End If
m_bOrigValue = m_bValue m_bOrigValue = m_bValue
@@ -1772,10 +1328,6 @@ Public Class CheckMachiningParam
WriteMachiningParam(nIndex, MAC_SPIRALVASE, If(m_bValue, 1, 0), sFilePath) WriteMachiningParam(nIndex, MAC_SPIRALVASE, If(m_bValue, 1, 0), sFilePath)
Case Params.RIBSLINK Case Params.RIBSLINK
WriteMachiningParam(nIndex, MAC_RIBSLINK, If(m_bValue, 1, 0), sFilePath) 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 Case Params.RIBSINVERTORDER
WriteMachiningParam(nIndex, MAC_RIBSINVERTORDER, If(m_bValue, 1, 0), sFilePath) WriteMachiningParam(nIndex, MAC_RIBSINVERTORDER, If(m_bValue, 1, 0), sFilePath)
Case Params.RIBSINVERTDIRECTION Case Params.RIBSINVERTDIRECTION
@@ -1788,10 +1340,6 @@ Public Class CheckMachiningParam
WriteMachiningParam(nIndex, MAC_RIBSLEADOUTINVERT, If(m_bValue, 1, 0), sFilePath) WriteMachiningParam(nIndex, MAC_RIBSLEADOUTINVERT, If(m_bValue, 1, 0), sFilePath)
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
WriteMachiningParam(nIndex, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, If(m_bValue, 1, 0), sFilePath) WriteMachiningParam(nIndex, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, If(m_bValue, 1, 0), sFilePath)
Case Params.AUXSOLIDSINFILLLINK
WriteMachiningParam(nIndex, MAC_AUXSOLIDSINFILLLINK, If(m_bValue, 1, 0), sFilePath)
Case Params.INFILLLINK
WriteMachiningParam(nIndex, MAC_INFILLLINK, If(m_bValue, 1, 0), sFilePath)
End Select End Select
End Sub End Sub
+9 -30
View File
@@ -140,16 +140,9 @@
<ColumnDefinition Width="2*"/> <ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding sName}"
<TextBlock Text="{Binding sName, Mode=OneWay}" Margin="0,0,2.5,0"
Margin="0,0,2.5,0" Style="{StaticResource ParameterList_TextBlock}"/>
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBlock Text=" (BETA)"
Margin="0,0,2.5,0"
Foreground="Red"
Visibility="{Binding IsBeta_Visibility}"
Style="{StaticResource ParameterList_TextBlock}"/>
</StackPanel>
<EgtWPFLib5:EgtTextBox2 Grid.Column="1" <EgtWPFLib5:EgtTextBox2 Grid.Column="1"
Text="{Binding sValue, UpdateSourceTrigger=Explicit}" Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
Margin="2.5,0,0,0" Margin="2.5,0,0,0"
@@ -163,16 +156,9 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding sName}"
<TextBlock Text="{Binding sName, Mode=OneWay}" Margin="0,0,2.5,0"
Margin="0,0,2.5,0" Style="{StaticResource ParameterList_TextBlock}"/>
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBlock Text=" (BETA)"
Margin="0,0,2.5,0"
Foreground="Red"
Visibility="{Binding IsBeta_Visibility}"
Style="{StaticResource ParameterList_TextBlock}"/>
</StackPanel>
<ComboBox Grid.Column="1" <ComboBox Grid.Column="1"
ItemsSource="{Binding ValueList}" ItemsSource="{Binding ValueList}"
SelectedItem="{Binding SelValue}" SelectedItem="{Binding SelValue}"
@@ -189,16 +175,9 @@
<ColumnDefinition Width="2*"/> <ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding sName}"
<TextBlock Text="{Binding sName, Mode=OneWay}" Margin="0,0,2.5,0"
Margin="0,0,2.5,0" Style="{StaticResource ParameterList_TextBlock}"/>
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBlock Text=" (BETA)"
Margin="0,0,2.5,0"
Foreground="Red"
Visibility="{Binding IsBeta_Visibility}"
Style="{StaticResource ParameterList_TextBlock}"/>
</StackPanel>
<CheckBox Grid.Column="1" <CheckBox Grid.Column="1"
IsChecked="{Binding bValue}" IsChecked="{Binding bValue}"
HorizontalAlignment="Center" HorizontalAlignment="Center"
+6 -3
View File
@@ -26,7 +26,8 @@ Public Class MachiningDbVM
' verifico se modificato ' verifico se modificato
If m_SelMachining.bIsModified Then If m_SelMachining.bIsModified Then
' chiedo se salvare ' chiedo se salvare
Select Case MessageBox.Show("Do you want to save the modification done on the selected machining?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question) Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Do you want to save the modification done on the selected machining?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
'MessageBox.Show("Do you want to save the modification done on the selected machining?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_SelMachining.Save() m_SelMachining.Save()
Case MessageBoxResult.No Case MessageBoxResult.No
@@ -198,7 +199,8 @@ Public Class MachiningDbVM
Public Sub Ok() Public Sub Ok()
If Not IsNothing(m_SelMachining) AndAlso m_SelMachining.bIsModified Then If Not IsNothing(m_SelMachining) AndAlso m_SelMachining.bIsModified Then
' chiedo se salvare ' chiedo se salvare
Select Case MessageBox.Show("Do you want to save modified parameters?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning) Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Do you want to save modified parameters?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning)
'MessageBox.Show("Do you want to save modified parameters?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_SelMachining.Save() m_SelMachining.Save()
Case MessageBoxResult.No Case MessageBoxResult.No
@@ -309,7 +311,8 @@ Public Class MachiningDbVM
Public Sub Delete() Public Sub Delete()
If IsNothing(m_SelMachining) Then Return If IsNothing(m_SelMachining) Then Return
' chiedo conferma ' chiedo conferma
Select Case MessageBox.Show("Are you sure you want to delete the selected machining?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Are you sure you want to delete the selected machining?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
'MessageBox.Show("Are you sure you want to delete the selected machining?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_MachiningList.Remove(m_SelMachining) m_MachiningList.Remove(m_SelMachining)
SetIsModified(True) SetIsModified(True)
+14 -10
View File
@@ -75,6 +75,13 @@ Public Class MainWindowM
End Get End Get
End Property End Property
Private m_bAutoNestOption As Boolean = False
Friend ReadOnly Property AutoNestOption As Boolean
Get
Return m_bAutoNestOption
End Get
End Property
Friend ReadOnly Property sVersion As String Friend ReadOnly Property sVersion As String
Get Get
Return My.Application.Info.Version.Major.ToString() & "." & Return My.Application.Info.Version.Major.ToString() & "." &
@@ -182,17 +189,14 @@ Public Class MainWindowM
Dim sKey As String = String.Empty Dim sKey As String = String.Empty
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile) EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
EgtSetKey(sKey) EgtSetKey(sKey)
' Impostazioni per chiave di rete Dim sNestKey As String = ""
Dim bNetKey As Boolean = ( GetMainPrivateProfileInt( S_GENERAL, K_NETKEY, 0) = 1) EgtUILib.GetPrivateProfileString(S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
EgtSetNetHwKey( bNetKey) 'EgtSetNestKey(sNestKey)
Dim sLockId As String = "" ' Verifico abilitazione nesting automatico
EgtUILib.GetPrivateProfileString( S_LICENCE, K_LOCKID, "", sLockId, sLicFile) m_bAutoNestOption = Not String.IsNullOrWhiteSpace(sNestKey)
If Not String.IsNullOrEmpty( sLockId) Then
EgtSetLockId( sLockId)
End If
' Recupero livello e opzioni della chiave ' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(5583, 2709, 1, m_nKeyLevel) And Dim bKey As Boolean = EgtGetKeyLevel(5583, 2505, 1, m_nKeyLevel) And
EgtGetKeyOptions(5583, 2709, 1, m_nKeyOptions) EgtGetKeyOptions(5583, 2505, 1, m_nKeyOptions)
' Inizializzazione generale di EgtInterface ' Inizializzazione generale di EgtInterface
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString()) m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
-2
View File
@@ -61,8 +61,6 @@ Class MainWindowV
Me.Activate() Me.Activate()
' Recupero l'array di stringhe con i nomi del file ' Recupero l'array di stringhe con i nomi del file
Dim sFiles() As String = DirectCast(e.Data.GetData(DataFormats.FileDrop), String()) Dim sFiles() As String = DirectCast(e.Data.GetData(DataFormats.FileDrop), String())
' Apro il primo
Map.refSecondaryWindowVM.OpenStdFile(sFiles(0))
End If End If
End Sub End Sub
+4 -3
View File
@@ -116,7 +116,7 @@ Public Class MainWindowVM
End If End If
' annullo trasparenza attivata durante edit rib ' annullo trasparenza attivata durante edit rib
If Not IsNothing(Map.refRibPanelVM.SelRib) Then If Not IsNothing(Map.refRibPanelVM.SelRib) Then
'EgtSetAlpha(Map.refRibPanelVM.SelRib.nExtrusionId, 100) EgtSetAlpha(Map.refRibPanelVM.SelRib.nExtrusionId, 100)
End If End If
ElseIf Map.refTopPanelVM.SelModifyMode.ModifyMode = ModifyModes.SHELLNUMBER Then ElseIf Map.refTopPanelVM.SelModifyMode.ModifyMode = ModifyModes.SHELLNUMBER Then
' cancello eventuali layer di modifica ' cancello eventuali layer di modifica
@@ -132,7 +132,7 @@ Public Class MainWindowVM
End If End If
' annullo trasparenza attivata durante edit rib ' annullo trasparenza attivata durante edit rib
If Not IsNothing(Map.refShellNumberPanelVM.SelShellNumber) Then If Not IsNothing(Map.refShellNumberPanelVM.SelShellNumber) Then
'EgtSetAlpha(Map.refShellNumberPanelVM.SelShellNumber.nExtrusionId, 100) EgtSetAlpha(Map.refShellNumberPanelVM.SelShellNumber.nExtrusionId, 100)
End If End If
End If End If
End If End If
@@ -226,7 +226,8 @@ Public Class MainWindowVM
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded. ' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
Public Sub CloseApplication(ByVal param As Object) Public Sub CloseApplication(ByVal param As Object)
If Map.refSliceManagerVM.bCalculating Then If Map.refSliceManagerVM.bCalculating Then
MessageBox.Show("Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
Return Return
End If End If
CloseApplication() CloseApplication()
+10 -1
View File
@@ -286,7 +286,8 @@ Public Class ManagePartPanelVM
Next Next
Next Next
If sErr.Count > 0 Then If sErr.Count > 0 Then
MessageBox.Show(String.Concat(sErr), "Error") 'MessageBox.Show(String.Concat(sErr), "Error")
EgtMessageBoxV.Show(Application.Current.MainWindow, String.Concat(sErr), "Error")
Return Return
Else Else
' Creo pezzi e layer necessari ' Creo pezzi e layer necessari
@@ -471,6 +472,14 @@ Public Class ManagePartPanelVM
Map.refSliceManagerVM.UpdateDimensions() Map.refSliceManagerVM.UpdateDimensions()
Next Next
End If End If
'EgtAddMachGroup("3dPrint")
'EgtSetTable("Tab")
'Dim nRawId As Integer = EgtAddRawPart(b3PrintSolid.Min, b3PrintSolid.DimX, b3PrintSolid.DimY, b3PrintSolid.DimZ, New Color3d(128, 128, 128, 30))
'EgtAddPartToRawPart(nPartId, b3PrintSolid.Min, nRawId)
'EgtMoveToCornerRawPart(nRawId, New Point3d(dPosX, dPosY, 0), MCH_CR.BL)
'EgtResetCurrMachGroup()
' seleziono ultimo pezzo aggiunto ' seleziono ultimo pezzo aggiunto
Map.refTopPanelVM.SelLastPart() Map.refTopPanelVM.SelLastPart()
+4 -2
View File
@@ -629,7 +629,8 @@ Public Class GeomEntity_MenuItem
Map.refManagePartPanelVM.SetIsEnabled(True) Map.refManagePartPanelVM.SetIsEnabled(True)
Return Return
ElseIf m_Type = ManagePart_Layer.LayerType.DELETE Then ElseIf m_Type = ManagePart_Layer.LayerType.DELETE Then
If MessageBox.Show("Are you sure you want to delete this entity?", "Delete confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then 'If MessageBox.Show("Are you sure you want to delete this entity?", "Delete confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, "Are you sure you want to delete this entity?", "Delete confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
EgtErase(m_OrigEntity.nId) EgtErase(m_OrigEntity.nId)
' se l'entita' e' gia' in lista pezzi ' se l'entita' e' gia' in lista pezzi
If Not IsNothing(m_OrigEntity.OrigLayer) Then If Not IsNothing(m_OrigEntity.OrigLayer) Then
@@ -1037,7 +1038,8 @@ Public Class ManagerLayer_MenuItem
Case Else ' PartMenuCmd.IMPORTPRINT Case Else ' PartMenuCmd.IMPORTPRINT
Dim bDeleteOldPrint As Boolean = False Dim bDeleteOldPrint As Boolean = False
If m_OrigLayer.EntityList.Count > 0 Then If m_OrigLayer.EntityList.Count > 0 Then
If MessageBox.Show("Importing a new print solid the current one will be deleted. Are you sure you want to proced?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then 'If MessageBox.Show("Importing a new print solid the current one will be deleted. Are you sure you want to proced?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, "Importing a new print solid the current one will be deleted. Are you sure you want to proced?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
Return Return
Else Else
bDeleteOldPrint = True bDeleteOldPrint = True
+2 -12
View File
@@ -285,8 +285,6 @@ Public Class MaterialIndex
sParamKey = MAT_KZ sParamKey = MAT_KZ
Case MaterialParam.Params.KN Case MaterialParam.Params.KN
sParamKey = MAT_KN sParamKey = MAT_KN
Case MaterialParam.Params.TDRYER
sParamKey = MAT_TDRYER
End Select End Select
Return ReadMaterialParamDouble(m_nIndex, sParamKey, dDefault) Return ReadMaterialParamDouble(m_nIndex, sParamKey, dDefault)
End Function End Function
@@ -348,7 +346,6 @@ Public Class MaterialCathegory
m_MaterialParamList = New List(Of MaterialParam)({New NumericMaterialParam(MaterialParam.Params.K_EXTRUSION, nIndex), 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.K_LAY_TIME, nIndex),
New NumericMaterialParam(MaterialParam.Params.DENSITY, nIndex), New NumericMaterialParam(MaterialParam.Params.DENSITY, nIndex),
New NumericMaterialParam(MaterialParam.Params.TDRYER, nIndex),
New StringMaterialParam(MaterialParam.Params.ORIG, nIndex)}) New StringMaterialParam(MaterialParam.Params.ORIG, nIndex)})
m_Cathegory_Visibility = Visibility.Visible m_Cathegory_Visibility = Visibility.Visible
Case Cathegories.TEMPERATURES Case Cathegories.TEMPERATURES
@@ -422,7 +419,6 @@ Public MustInherit Class MaterialParam
KZ = 20 KZ = 20
KN = 21 KN = 21
ORIG = 22 ORIG = 22
TDRYER = 23
End Enum End Enum
Private m_Type As Params Private m_Type As Params
@@ -482,8 +478,6 @@ Public MustInherit Class MaterialParam
m_sName = "KZ" m_sName = "KZ"
Case Params.KN Case Params.KN
m_sName = "KN" m_sName = "KN"
Case Params.TDRYER
m_sName = "Dryer Temperature"
Case Params.ORIG Case Params.ORIG
m_sName = "Original" m_sName = "Original"
End Select End Select
@@ -589,9 +583,6 @@ Public Class NumericMaterialParam
Case Params.KN Case Params.KN
m_dValue = ReadMaterialParamDouble(nIndex, MAT_KN, 0) m_dValue = ReadMaterialParamDouble(nIndex, MAT_KN, 0)
m_bIsLen = False m_bIsLen = False
Case Params.TDRYER
m_dValue = ReadMaterialParamDouble(nIndex, MAT_TDRYER, 0)
m_bIsLen = False
End Select End Select
m_dOrigValue = m_dValue m_dOrigValue = m_dValue
End Sub End Sub
@@ -642,8 +633,6 @@ Public Class NumericMaterialParam
WriteMaterialParam(nIndex, MAT_KZ, sWriteValue, sFilePath) WriteMaterialParam(nIndex, MAT_KZ, sWriteValue, sFilePath)
Case Params.KN Case Params.KN
WriteMaterialParam(nIndex, MAT_KN, sWriteValue, sFilePath) WriteMaterialParam(nIndex, MAT_KN, sWriteValue, sFilePath)
Case Params.TDRYER
WriteMaterialParam(nIndex, MAT_TDRYER, sWriteValue, sFilePath)
End Select End Select
End Sub End Sub
@@ -780,7 +769,8 @@ Public Class StringMaterialParam
End Property End Property
Public Sub Original() Public Sub Original()
If MessageBox.Show("Are you sure you want to set this material as original?", "Original material confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then 'If MessageBox.Show("Are you sure you want to set this material as original?", "Original material confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, "Are you sure you want to set this material as original?", "Original material confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
m_sGUID = ORIG_MATERIAL m_sGUID = ORIG_MATERIAL
m_sValue = ORIG_MATERIAL m_sValue = ORIG_MATERIAL
NotifyPropertyChanged(NameOf(sValue)) NotifyPropertyChanged(NameOf(sValue))
+10 -5
View File
@@ -24,7 +24,8 @@ Public Class MaterialDbVM
' verifico se modificato ' verifico se modificato
If Not IsNothing(m_SelMaterial) AndAlso m_SelMaterial.bIsModified Then If Not IsNothing(m_SelMaterial) AndAlso m_SelMaterial.bIsModified Then
' chiedo se salvare ' chiedo se salvare
Select Case MessageBox.Show("Do you want to save material modification?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question) 'Select Case MessageBox.Show("Do you want to save material modification?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Do you want to save material modification?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_SelMaterial.Save() m_SelMaterial.Save()
Case MessageBoxResult.No Case MessageBoxResult.No
@@ -236,7 +237,8 @@ Public Class MaterialDbVM
Public Sub Ok() Public Sub Ok()
If Not IsNothing(m_SelMaterial) AndAlso m_SelMaterial.bIsModified Then If Not IsNothing(m_SelMaterial) AndAlso m_SelMaterial.bIsModified Then
' chiedo se salvare ' chiedo se salvare
Select Case MessageBox.Show("Do you want to save material modification?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning) 'Select Case MessageBox.Show("Do you want to save material modification?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning)
Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Do you want to save material modification?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_SelMaterial.Save() m_SelMaterial.Save()
Case MessageBoxResult.No Case MessageBoxResult.No
@@ -365,17 +367,20 @@ Public Class MaterialDbVM
' se materiale originale, esco ' se materiale originale, esco
If SelMaterialIsOriginal() Then If SelMaterialIsOriginal() Then
If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 Then If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 Then
If MessageBox.Show("Trying to delete an Original Material! Are you sure you want to delete it?", "", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then 'If MessageBox.Show("Trying to delete an Original Material! Are you sure you want to delete it?", "", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, "Trying to delete an Original Material! Are you sure you want to delete it?", "", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
Return Return
End If End If
sCheckMessage = "Trying to delete an Original Material! Are you ABSOLUTELY sure you want to delete it?" sCheckMessage = "Trying to delete an Original Material! Are you ABSOLUTELY sure you want to delete it?"
Else Else
MessageBox.Show("Original material impossible to delete!") 'MessageBox.Show("Original material impossible to delete!")
EgtMessageBoxV.Show(Application.Current.MainWindow, "Original material impossible to delete!")
Return Return
End If End If
End If End If
' chiedo conferma ' chiedo conferma
Select Case MessageBox.Show(sCheckMessage, "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, sCheckMessage, "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
'MessageBox.Show(sCheckMessage, "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_MaterialList.Remove(m_SelMaterial) m_MaterialList.Remove(m_SelMaterial)
SetIsModified(True) SetIsModified(True)
+3 -3
View File
@@ -30,7 +30,7 @@ Imports System.Windows
#End If #End If
<Assembly: AssemblyCompany("Egalware s.r.l.")> <Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("Icarus")> <Assembly: AssemblyProduct("Icarus")>
<Assembly: AssemblyCopyright("Copyright © 2022-2025 by Egalware s.r.l.")> <Assembly: AssemblyCopyright("Copyright © 2022-2023 by Egalware s.r.l.")>
<Assembly: AssemblyTrademark("")> <Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(false)> <Assembly: ComVisible(false)>
@@ -70,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.7.9.1")> <Assembly: AssemblyVersion("2.5.5.1")>
<Assembly: AssemblyFileVersion("2.7.9.1")> <Assembly: AssemblyFileVersion("2.5.5.1")>
-19
View File
@@ -15,8 +15,6 @@ Friend Module OptionModule
Friend m_bThickLine As Boolean Friend m_bThickLine As Boolean
' Flag per visualizzazione smussata delle superfici ' Flag per visualizzazione smussata delle superfici
Friend m_bSmoothTriMesh As Boolean Friend m_bSmoothTriMesh As Boolean
' Flag per visualizzazione semplificate sezione strand
Friend m_bUseSimplifiedSection As Boolean
' Colore di default in disegno ' Colore di default in disegno
Friend m_DefMaterialColor As Color3d Friend m_DefMaterialColor As Color3d
@@ -45,14 +43,6 @@ Friend Module OptionModule
Friend m_sFont As String Friend m_sFont As String
Friend m_dTextHeight As Double 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 ' Variabili che indicano per ogni tipo di lavorazione quale geometria è selezionabile
'Friend m_SelGeomSawing As SceneSelModeOpt 'Friend m_SelGeomSawing As SceneSelModeOpt
'Friend m_SelGeomDrilling As SceneSelModeOpt 'Friend m_SelGeomDrilling As SceneSelModeOpt
@@ -109,8 +99,6 @@ Friend Module OptionModule
m_bThickLine = GetMainPrivateProfileInt(S_SCENE, K_LINEWIDTH, 1) <> 1 m_bThickLine = GetMainPrivateProfileInt(S_SCENE, K_LINEWIDTH, 1) <> 1
' Inizializzo flag visualizzazione smussata delle superfici ' Inizializzo flag visualizzazione smussata delle superfici
m_bSmoothTriMesh = GetMainPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0 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 ' Inizio colore di default in disegno
Dim DefColor As New Color3d(0, 0, 0) Dim DefColor As New Color3d(0, 0, 0)
GetMainPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor) GetMainPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
@@ -120,13 +108,6 @@ Friend Module OptionModule
' Inizializzo variabili per import ' Inizializzo variabili per import
m_dDxfScaleFactor = GetMainPrivateProfileDouble(S_IMPORT, K_DXFSCALE, 1) m_dDxfScaleFactor = GetMainPrivateProfileDouble(S_IMPORT, K_DXFSCALE, 1)
m_dStlScaleFactor = GetMainPrivateProfileDouble(S_IMPORT, K_STLSCALE, 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 Sub
End Module End Module
-5
View File
@@ -61,7 +61,6 @@
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="{Binding ThickLineMsg}" VerticalAlignment="Center" <TextBlock Text="{Binding ThickLineMsg}" VerticalAlignment="Center"
Grid.Row="0" Margin="0,5,0,5"/> Grid.Row="0" Margin="0,5,0,5"/>
@@ -71,10 +70,6 @@
Grid.Row="1" Margin="0,5,0,5"/> Grid.Row="1" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding SmoothTriMesh}" <CheckBox IsChecked="{Binding SmoothTriMesh}"
Grid.Column="1" Grid.Row="1" Margin="22,5,0,5" VerticalAlignment="Center"/> Grid.Column="1" Grid.Row="1" Margin="22,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding UseSimplifiedSectionMsg}" VerticalAlignment="Center"
Grid.Row="2" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding UseSimplifiedSection}"
Grid.Column="1" Grid.Row="2" Margin="22,5,0,5" VerticalAlignment="Center"/>
</Grid> </Grid>
<!--<UniformGrid Columns="2" <!--<UniformGrid Columns="2"
Margin="0,0,0,5"> Margin="0,0,0,5">
+10 -24
View File
@@ -147,7 +147,6 @@ Public Class OptionWindowVM
If StringToLen(value, dVal) AndAlso dVal > 0 Then If StringToLen(value, dVal) AndAlso dVal > 0 Then
OptionModule.m_dGeometryTolerance = dVal OptionModule.m_dGeometryTolerance = dVal
Map.refSceneHostVM.MainController.SetSurfTmTolerance(OptionModule.m_dGeometryTolerance) Map.refSceneHostVM.MainController.SetSurfTmTolerance(OptionModule.m_dGeometryTolerance)
Map.refSceneHostVM.MainController.SetAdvImpTolerance(OptionModule.m_dGeometryTolerance)
WriteMainPrivateProfileString(S_GEOMDB, K_SURFTMTOLER, DoubleToString(OptionModule.m_dGeometryTolerance, 5)) WriteMainPrivateProfileString(S_GEOMDB, K_SURFTMTOLER, DoubleToString(OptionModule.m_dGeometryTolerance, 5))
End If End If
End Set End Set
@@ -215,16 +214,6 @@ Public Class OptionWindowVM
End Set End Set
End Property End Property
Public Property UseSimplifiedSection As Boolean
Get
Return OptionModule.m_bUseSimplifiedSection
End Get
Set(value As Boolean)
OptionModule.m_bUseSimplifiedSection = value
WriteMainPrivateProfileString(S_SOLIDS, K_SIMPLIFIEDSECTION, If(value, "1", "0"))
End Set
End Property
'Public Property SelectedTextFont As String 'Public Property SelectedTextFont As String
' Get ' Get
' Return m_FontList(m_FontList.IndexOf(OptionModule.m_sFontText)) ' Return m_FontList(m_FontList.IndexOf(OptionModule.m_sFontText))
@@ -582,12 +571,6 @@ Public Class OptionWindowVM
Return EgtMsg(6518) ' Superfici smussate Return EgtMsg(6518) ' Superfici smussate
End Get End Get
End Property End Property
Public ReadOnly Property UseSimplifiedSectionMsg As String
Get
Return "Use simplified strand section"
End Get
End Property
Public ReadOnly Property UpdateLicenceMsg As String Public ReadOnly Property UpdateLicenceMsg As String
Get Get
Return EgtMsg(6553) ' Aggiorna licenza Return EgtMsg(6553) ' Aggiorna licenza
@@ -983,7 +966,8 @@ Public Class OptionWindowVM
Not My.Computer.FileSystem.FileExists(Path.Combine(sTempDir, sMachName, sMachName & ".mlde")) Then Not My.Computer.FileSystem.FileExists(Path.Combine(sTempDir, sMachName, sMachName & ".mlde")) Then
' Il file {0} non contiene una macchina - Avviso ' Il file {0} non contiene una macchina - Avviso
Dim sOut As String = String.Format(EgtMsg(6529), sMachZip) Dim sOut As String = String.Format(EgtMsg(6529), sMachZip)
MessageBox.Show(sOut, EgtMsg(MSG_MESSAGEBOX + 2), MessageBoxButton.OK, MessageBoxImage.Warning) 'MessageBox.Show(sOut, EgtMsg(MSG_MESSAGEBOX + 2), MessageBoxButton.OK, MessageBoxImage.Warning)
EgtMessageBoxV.Show(Application.Current.MainWindow, sOut, EgtMsg(MSG_MESSAGEBOX + 2), MessageBoxButton.OK, MessageBoxImage.Warning)
' Rimuovo il direttorio temporaneo ed esco ' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents) My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return Return
@@ -1022,7 +1006,8 @@ Public Class OptionWindowVM
' L'aggiornamento della macchina "{0}" non è riuscito. ' L'aggiornamento della macchina "{0}" non è riuscito.
Dim sKo As String = String.Format(EgtMsg(6535), sMachName) Dim sKo As String = String.Format(EgtMsg(6535), sMachName)
EgtOutLog(sKo) EgtOutLog(sKo)
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK) 'MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
EgtMessageBoxV.Show(Application.Current.MainWindow, sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
Return Return
End Try End Try
End If End If
@@ -1065,7 +1050,8 @@ Public Class OptionWindowVM
'La macchina "{0}" è stata aggiornata con successo. 'La macchina "{0}" è stata aggiornata con successo.
Dim sOk As String = String.Format(EgtMsg(6530), sMachName) Dim sOk As String = String.Format(EgtMsg(6530), sMachName)
EgtOutLog(sOk) EgtOutLog(sOk)
MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK) 'MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
EgtMessageBoxV.Show(Application.Current.MainWindow, sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
' Rimuovo il direttorio temporaneo ' Rimuovo il direttorio temporaneo
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents) My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
' Aggiorno la lista delle macchina ' Aggiorno la lista delle macchina
@@ -1110,8 +1096,6 @@ Public Class OptionWindowVM
End If End If
Try Try
Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out) 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 ' aggiungo i file della Macchina
Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sCurrMachineName Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sCurrMachineName
If Directory.Exists(sMachineDir) Then If Directory.Exists(sMachineDir) Then
@@ -1125,12 +1109,14 @@ Public Class OptionWindowVM
' L'esportazione della macchina "{0}" non è riuscita. ' L'esportazione della macchina "{0}" non è riuscita.
Dim sKo As String = String.Format(EgtMsg(6551), sCurrMachineName) Dim sKo As String = String.Format(EgtMsg(6551), sCurrMachineName)
EgtOutLog(sKo) EgtOutLog(sKo)
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK) 'MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
EgtMessageBoxV.Show(Application.Current.MainWindow, sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
End Try End Try
'La macchina "{0}" è stata esportata con successo. 'La macchina "{0}" è stata esportata con successo.
Dim sOk As String = String.Format(EgtMsg(6552), sCurrMachineName) Dim sOk As String = String.Format(EgtMsg(6552), sCurrMachineName)
EgtOutLog(sOk) EgtOutLog(sOk)
MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK) 'MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
EgtMessageBoxV.Show(Application.Current.MainWindow, sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
End Sub End Sub
#End Region ' ExportMachine #End Region ' ExportMachine
+21 -12
View File
@@ -2,7 +2,6 @@
Imports System.IO Imports System.IO
Imports EgtWPFLib5 Imports EgtWPFLib5
Imports EgtUILib Imports EgtUILib
Imports Newtonsoft.Json
Public Class ProjManagerVM Public Class ProjManagerVM
Inherits VMBase Inherits VMBase
@@ -150,6 +149,9 @@ Public Class ProjManagerVM
''' Execute the Save. This method is invoked by the SaveCommand. ''' Execute the Save. This method is invoked by the SaveCommand.
''' </summary> ''' </summary>
Public Sub NewProjectCmd() Public Sub NewProjectCmd()
' 'MessageBox.Show("Testo di prova EgtMessageBox", "Titolo di prova")
' Dim x = EgtMessageBoxV.Show(Application.Current.MainWindow, "Testo di prova EgtMessageBox", "Titolo di prova", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning, MessageBoxResult.Yes)
NewProject(True) NewProject(True)
End Sub End Sub
@@ -371,7 +373,8 @@ Public Class ProjManagerVM
GetMainPrivateProfileString(S_GENERAL, K_SUPPORT, "support@egaltech.com", sSupportAddress) GetMainPrivateProfileString(S_GENERAL, K_SUPPORT, "support@egaltech.com", sSupportAddress)
' se vuoto do messaggio di errore ed esco ' se vuoto do messaggio di errore ed esco
If String.IsNullOrWhiteSpace(sSupportAddress) Then If String.IsNullOrWhiteSpace(sSupportAddress) Then
MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 10), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 10), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_TOPCOMMANDBAR + 10), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return Return
End If End If
' Recupero numero chiave ' Recupero numero chiave
@@ -382,18 +385,28 @@ Public Class ProjManagerVM
EgtGetCurrFilePath(sCurrProject) EgtGetCurrFilePath(sCurrProject)
' se nome file vuoto o con estensione non valida, chiedo se si vuole salvare ' se nome file vuoto o con estensione non valida, chiedo se si vuole salvare
If String.IsNullOrWhiteSpace(sCurrProject) Or EgtGetFileType(sCurrProject) <> FT.NGE Then If String.IsNullOrWhiteSpace(sCurrProject) Or EgtGetFileType(sCurrProject) <> FT.NGE Then
If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then 'If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
Map.refSceneHostVM.SaveProject() Map.refSceneHostVM.SaveProject()
End If End If
EgtGetCurrFilePath(sCurrProject) EgtGetCurrFilePath(sCurrProject)
' se modificato, chiedo se si vuole salvare ' se modificato, chiedo se si vuole salvare
Else Else
If EgtGetModified() Then If EgtGetModified() Then
If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then 'If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
Map.refSceneHostVM.SaveProject() Map.refSceneHostVM.SaveProject()
End If End If
End If 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 ' Recupero macchine dei gruppi di lavoro del progetto
Dim Machines As New List(Of String) Dim Machines As New List(Of String)
Dim nMchGrpId As Integer = EgtGetFirstMachGroup() Dim nMchGrpId As Integer = EgtGetFirstMachGroup()
@@ -410,12 +423,9 @@ Public Class ProjManagerVM
If Not String.IsNullOrWhiteSpace(sCurrProject) Then If Not String.IsNullOrWhiteSpace(sCurrProject) Then
Dim sCurrProjectDir As String = Path.GetDirectoryName(sCurrProject) Dim sCurrProjectDir As String = Path.GetDirectoryName(sCurrProject)
If Not String.IsNullOrWhiteSpace(sCurrProjectDir) Then If Not String.IsNullOrWhiteSpace(sCurrProjectDir) Then
Dim sCurrProjName As String = Path.GetFileNameWithoutExtension(sCurrProject).ToUpper()
Dim TempFiles() As String = Directory.GetFiles(sCurrProjectDir) Dim TempFiles() As String = Directory.GetFiles(sCurrProjectDir)
For FileIndex = 0 To TempFiles.Count - 1 For FileIndex = 0 To TempFiles.Count - 1
If TempFiles(FileIndex) = sCurrProject Then Continue For If Path.GetFileNameWithoutExtension(TempFiles(FileIndex)).Contains(Path.GetFileNameWithoutExtension(sCurrProject)) AndAlso TempFiles(FileIndex) <> sCurrProject Then
Dim sCurrFileName As String = Path.GetFileNameWithoutExtension( TempFiles(FileIndex)).ToUpper()
If String.Compare(sCurrFileName, sCurrProjName) = 0 Then
OtherFiles.Add(TempFiles(FileIndex)) OtherFiles.Add(TempFiles(FileIndex))
End If End If
Next Next
@@ -428,13 +438,11 @@ Public Class ProjManagerVM
End If End If
Try Try
Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out) Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out)
zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
zip.AlternateEncoding = Text.Encoding.UTF8
' aggiungo file macchine ' aggiungo file macchine
For Each sMachineName As String In Machines For Each sMachineName As String In Machines
Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sMachineName Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sMachineName
If Directory.Exists(sMachineDir) Then If Directory.Exists(sMachineDir) Then
zip.AddSelectedFiles( "name != *\.git\*.* and name != *.git*", sMachineDir, sMachineName, True) zip.AddItem(sMachineDir, sMachineName)
End If End If
Next Next
' aggiungo progetto corrente ' aggiungo progetto corrente
@@ -473,7 +481,8 @@ Public Class ProjManagerVM
bEx = True bEx = True
End Try End Try
If bEx OrElse EgtWPFLib5.MapiMailMessage.m_ErrorCode <> 0 Then If bEx OrElse EgtWPFLib5.MapiMailMessage.m_ErrorCode <> 0 Then
MessageBox.Show(String.Format(EgtMsg(MSG_TOPCOMMANDBAR + 12), sSupportAddress, sZipToCreate), EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK, MessageBoxImage.Information) 'MessageBox.Show(String.Format(EgtMsg(MSG_TOPCOMMANDBAR + 12), sSupportAddress, sZipToCreate), EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK, MessageBoxImage.Information)
EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(MSG_TOPCOMMANDBAR + 12), sSupportAddress, sZipToCreate), EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK, MessageBoxImage.Information)
Else Else
Map.refMyStatusBarVM.SetOutputMessage(EgtMsg(MSG_TOPCOMMANDBAR + 14), 5) Map.refMyStatusBarVM.SetOutputMessage(EgtMsg(MSG_TOPCOMMANDBAR + 14), 5)
End If End If
Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

+79 -12
View File
@@ -620,7 +620,6 @@ Public Class RibPanelVM
Friend Sub Dispose() Friend Sub Dispose()
' ripristino frame originale ' ripristino frame originale
EgtSetGridFrame(m_OriginalGridFrame) EgtSetGridFrame(m_OriginalGridFrame)
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
' se in modifica parametri ' se in modifica parametri
If m_bMachParam_IsChecked Then If m_bMachParam_IsChecked Then
' ripristino modalita' standard ' ripristino modalita' standard
@@ -642,7 +641,7 @@ Public Class RibPanelVM
' attivo modifiche su scena ' attivo modifiche su scena
Map.refSceneHostVM.MainScene.ResetStatus() Map.refSceneHostVM.MainScene.ResetStatus()
' rendo traspanete estrusione ' rendo traspanete estrusione
'EgtSetAlpha(m_SelRib.nExtrusionId, 50) EgtSetAlpha(m_SelRib.nExtrusionId, 50)
' seleziono percorso corrente ' seleziono percorso corrente
EgtDeselectAll() EgtDeselectAll()
Select Case RibSelectionType Select Case RibSelectionType
@@ -693,12 +692,12 @@ Public Class RibPanelVM
' seleziono nuova estrusione ' seleziono nuova estrusione
EgtSelectObj(m_SelRib.nExtrusionId) EgtSelectObj(m_SelRib.nExtrusionId)
' ripristino trasparenza estrusione ' ripristino trasparenza estrusione
'EgtSetAlpha(m_SelRib.nExtrusionId, 100) EgtSetAlpha(m_SelRib.nExtrusionId, 100)
EgtDraw() EgtDraw()
' rimetto la selezione scena a null ' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull() Map.refSceneHostVM.MainScene.SetStatusNull()
Case Controller.CMD.MOVE, Controller.CMD.ROTATE Case Controller.CMD.MOVE, Controller.CMD.ROTATE
' EgtSetAlpha(Map.refRibPanelVM.SelRib.nExtrusionId, 100) EgtSetAlpha(Map.refRibPanelVM.SelRib.nExtrusionId, 100)
' seleziono nuova estrusione ' seleziono nuova estrusione
EgtSelectObj(m_SelRib.nExtrusionId) EgtSelectObj(m_SelRib.nExtrusionId)
EgtDraw() EgtDraw()
@@ -1097,7 +1096,6 @@ Public Class RibPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneTop(ByVal param As Object) Public Sub CPlaneTop(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.TOP)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -1123,7 +1121,6 @@ Public Class RibPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneFront(ByVal param As Object) Public Sub CPlaneFront(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.FRONT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -1149,7 +1146,6 @@ Public Class RibPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneRight(ByVal param As Object) Public Sub CPlaneRight(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.RIGHT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -1175,7 +1171,6 @@ Public Class RibPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneBack(ByVal param As Object) Public Sub CPlaneBack(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.BACK)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -1201,7 +1196,6 @@ Public Class RibPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneLeft(ByVal param As Object) Public Sub CPlaneLeft(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.LEFT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -1227,7 +1221,6 @@ Public Class RibPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneBottom(ByVal param As Object) Public Sub CPlaneBottom(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -1254,7 +1247,6 @@ Public Class RibPanelVM
Public Sub CPlaneElevation(ByVal param As Object) Public Sub CPlaneElevation(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False) ManageInterface(False)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub End Sub
@@ -1280,12 +1272,87 @@ Public Class RibPanelVM
Public Sub CPlaneOrigin(ByVal param As Object) Public Sub CPlaneOrigin(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False) ManageInterface(False)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub End Sub
#End Region ' CPlaneOrigin #End Region ' CPlaneOrigin
#Region "CPlaneRotate"
''' <summary>
''' Returns a command that do CPlaneRotate.
''' </summary>
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
''' <summary>
''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand.
''' </summary>
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"
''' <summary>
''' Returns a command that do CPlane3P.
''' </summary>
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
''' <summary>
''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand.
''' </summary>
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"
''' <summary>
''' Returns a command that do CPlanePerpObj.
''' </summary>
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
''' <summary>
''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand.
''' </summary>
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" #Region "CPlaneObj"
Private m_bCPlaneObj_IsActive As Boolean = False Private m_bCPlaneObj_IsActive As Boolean = False
+10 -29
View File
@@ -51,18 +51,15 @@ Public Class CopyFromWndVM
Public Sub Ok() Public Sub Ok()
If IsNothing(m_SelRib) Then If IsNothing(m_SelRib) Then
MessageBox.Show("Please select the rib from which to copy the parameters!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning) 'MessageBox.Show("Please select the rib from which to copy the parameters!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Please select the rib from which to copy the parameters!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
Return Return
End If End If
' copio i parametri nella rib corrente ' copio i parametri nella rib corrente
Dim ParamList As New List(Of MachiningParam.Params)({MachiningParam.Params.RIBSSTRANDWIDTH, Dim ParamList As New List(Of MachiningParam.Params)({MachiningParam.Params.RIBSTYPE,
MachiningParam.Params.RIBSTYPE,
MachiningParam.Params.RIBSOVERLAP, MachiningParam.Params.RIBSOVERLAP,
MachiningParam.Params.RIBSSTRANDOVERLAP,
MachiningParam.Params.RIBSSTRANDCOUNT, MachiningParam.Params.RIBSSTRANDCOUNT,
MachiningParam.Params.RIBSLINK, MachiningParam.Params.RIBSLINK,
MachiningParam.Params.RIBSLINKFILLET,
MachiningParam.Params.RIBSMERGEWITHSHELL,
MachiningParam.Params.RIBSINVERTDIRECTION, MachiningParam.Params.RIBSINVERTDIRECTION,
MachiningParam.Params.RIBSINVERTSTRANDORDER, MachiningParam.Params.RIBSINVERTSTRANDORDER,
MachiningParam.Params.RIBSLEADININVERT, MachiningParam.Params.RIBSLEADININVERT,
@@ -71,13 +68,12 @@ Public Class CopyFromWndVM
MachiningParam.Params.RIBSLEADOUTLEN, MachiningParam.Params.RIBSLEADOUTLEN,
MachiningParam.Params.RIBSLEADOUTCOASTING, MachiningParam.Params.RIBSLEADOUTCOASTING,
MachiningParam.Params.RIBSLEADOUTWIPE, MachiningParam.Params.RIBSLEADOUTWIPE,
MachiningParam.Params.RIBSLEADOUTWIPEDIR, MachiningParam.Params.RIBSLEADOUTWIPEDIR})
MachiningParam.Params.RIBSLEADFILLET})
For Each Param In ParamList For Each Param In ParamList
Select Case Map.refRibPanelVM.SelRib.Type Select Case Map.refRibPanelVM.SelRib.Type
Case RibEntity.RibTypes.FROMDRAW 'Case RibEntity.RibTypes.FROMDRAW
CopyParam(Param, m_SelRib.nExtrusionId, Map.refRibPanelVM.SelRib.nCurveId) ' CopyParam(Param, m_SelRib.nExtrusionId, Map.refRibPanelVM.SelRib.nCurveId)
CopyParam(Param, m_SelRib.nExtrusionId, Map.refRibPanelVM.SelRib.nExtrusionId) ' CopyParam(Param, m_SelRib.nExtrusionId, Map.refRibPanelVM.SelRib.nExtrusionId)
Case RibEntity.RibTypes.FROMIMPORT Case RibEntity.RibTypes.FROMIMPORT
CopyParam(Param, m_SelRib.nExtrusionId, Map.refRibPanelVM.SelRib.nExtrusionId) CopyParam(Param, m_SelRib.nExtrusionId, Map.refRibPanelVM.SelRib.nExtrusionId)
End Select End Select
@@ -103,26 +99,17 @@ Public Class CopyFromWndVM
Else Else
RibTypeParam.SelValue = RibTypeParam.PartSelValue RibTypeParam.SelValue = RibTypeParam.PartSelValue
End If End If
Case MachiningParam.Params.RIBSSTRANDWIDTH, MachiningParam.Params.RIBSOVERLAP, MachiningParam.Params.RIBSSTRANDOVERLAP, MachiningParam.Params.RIBSSTRANDCOUNT, MachiningParam.Params.RIBSLINKFILLET, MachiningParam.Params.RIBSLEADINLEN, MachiningParam.Params.RIBSLEADOUTLEN, Case MachiningParam.Params.RIBSOVERLAP, MachiningParam.Params.RIBSSTRANDCOUNT, MachiningParam.Params.RIBSLEADINLEN, MachiningParam.Params.RIBSLEADOUTLEN,
MachiningParam.Params.RIBSLEADOUTCOASTING, MachiningParam.Params.RIBSLEADOUTWIPE, MachiningParam.Params.RIBSLEADOUTWIPEDIR, MachiningParam.Params.RIBSLEADFILLET MachiningParam.Params.RIBSLEADOUTCOASTING, MachiningParam.Params.RIBSLEADOUTWIPE, MachiningParam.Params.RIBSLEADOUTWIPEDIR
Dim RibTypeParam As RibNumericMachiningParam = Nothing Dim RibTypeParam As RibNumericMachiningParam = Nothing
Dim dRibParam As Double = 0 Dim dRibParam As Double = 0
Select Case Type Select Case Type
Case MachiningParam.Params.RIBSSTRANDWIDTH
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSSTRANDWIDTH)
bRead = EgtGetInfo(nFromId, MAC_RIBSSTRANDWIDTH, dRibParam)
Case MachiningParam.Params.RIBSOVERLAP Case MachiningParam.Params.RIBSOVERLAP
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSOVERLAP) RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSOVERLAP)
bRead = EgtGetInfo(nFromId, MAC_RIBSOVERLAP, dRibParam) bRead = EgtGetInfo(nFromId, MAC_RIBSOVERLAP, dRibParam)
Case MachiningParam.Params.RIBSSTRANDOVERLAP
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSSTRANDOVERLAP)
bRead = EgtGetInfo(nFromId, MAC_RIBSSTRANDOVERLAP, dRibParam)
Case MachiningParam.Params.RIBSSTRANDCOUNT Case MachiningParam.Params.RIBSSTRANDCOUNT
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSSTRANDCOUNT) RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSSTRANDCOUNT)
bRead = EgtGetInfo(nFromId, MAC_RIBSSTRANDCOUNT, dRibParam) bRead = EgtGetInfo(nFromId, MAC_RIBSSTRANDCOUNT, dRibParam)
Case MachiningParam.Params.RIBSLINKFILLET
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLINKFILLET)
bRead = EgtGetInfo(nFromId, MAC_RIBSLINKFILLET, dRibParam)
Case MachiningParam.Params.RIBSLEADINLEN Case MachiningParam.Params.RIBSLEADINLEN
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLEADINLEN) RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLEADINLEN)
bRead = EgtGetInfo(nFromId, MAC_RIBSLEADINLEN, dRibParam) bRead = EgtGetInfo(nFromId, MAC_RIBSLEADINLEN, dRibParam)
@@ -138,25 +125,19 @@ Public Class CopyFromWndVM
Case MachiningParam.Params.RIBSLEADOUTWIPEDIR Case MachiningParam.Params.RIBSLEADOUTWIPEDIR
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLEADOUTWIPEDIR) RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLEADOUTWIPEDIR)
bRead = EgtGetInfo(nFromId, MAC_RIBSLEADOUTWIPEDIR, dRibParam) bRead = EgtGetInfo(nFromId, MAC_RIBSLEADOUTWIPEDIR, dRibParam)
Case MachiningParam.Params.RIBSLEADFILLET
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLEADFILLET)
bRead = EgtGetInfo(nFromId, MAC_RIBSLEADFILLET, dRibParam)
End Select End Select
If Not IsNothing(RibTypeParam) AndAlso bRead Then If Not IsNothing(RibTypeParam) AndAlso bRead Then
RibTypeParam.SetValue(dRibParam) RibTypeParam.SetValue(dRibParam)
Else Else
RibTypeParam.SetValue(RibTypeParam.dPartValue) RibTypeParam.SetValue(RibTypeParam.dPartValue)
End If End If
Case MachiningParam.Params.RIBSLINK, MachiningParam.Params.RIBSMERGEWITHSHELL, MachiningParam.Params.RIBSINVERTDIRECTION, MachiningParam.Params.RIBSINVERTSTRANDORDER, MachiningParam.Params.RIBSLEADININVERT, MachiningParam.Params.RIBSLEADOUTINVERT Case MachiningParam.Params.RIBSLINK, MachiningParam.Params.RIBSINVERTDIRECTION, MachiningParam.Params.RIBSINVERTSTRANDORDER, MachiningParam.Params.RIBSLEADININVERT, MachiningParam.Params.RIBSLEADOUTINVERT
Dim RibTypeParam As RibCheckMachiningParam = Nothing Dim RibTypeParam As RibCheckMachiningParam = Nothing
Dim bRibParam As Boolean = False Dim bRibParam As Boolean = False
Select Case Type Select Case Type
Case MachiningParam.Params.RIBSLINK Case MachiningParam.Params.RIBSLINK
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLINK) RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLINK)
bRead = EgtGetInfo(nFromId, MAC_RIBSLINK, bRibParam) 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 Case MachiningParam.Params.RIBSINVERTDIRECTION
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSINVERTDIRECTION) RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSINVERTDIRECTION)
bRead = EgtGetInfo(nFromId, MAC_RIBSINVERTDIRECTION, bRibParam) bRead = EgtGetInfo(nFromId, MAC_RIBSINVERTDIRECTION, bRibParam)
+3 -57
View File
@@ -42,14 +42,10 @@ Public Class RibParamPanelVM
m_Type = Cathegories.RIBS m_Type = Cathegories.RIBS
m_sName = "Ribs" m_sName = "Ribs"
m_MachiningParamList = New List(Of MachiningParam)({New RibNumericMachiningParam(MachiningParam.Params.RIBSSTRANDWIDTH, nRibId, nPartId, Me), m_MachiningParamList = New List(Of MachiningParam)({New RibComboMachiningParam(MachiningParam.Params.RIBSTYPE, nRibId, nPartId, Me),
New RibComboMachiningParam(MachiningParam.Params.RIBSTYPE, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nRibId, nPartId, Me), New RibNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSSTRANDOVERLAP, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nRibId, nPartId, Me), New RibNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nRibId, nPartId, Me),
New RibCheckMachiningParam(MachiningParam.Params.RIBSLINK, nRibId, nPartId, Me), New RibCheckMachiningParam(MachiningParam.Params.RIBSLINK, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLINKFILLET, nRibId, nPartId, Me),
New RibCheckMachiningParam(MachiningParam.Params.RIBSMERGEWITHSHELL, nRibId, nPartId, Me),
New RibCheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nRibId, nPartId, Me), New RibCheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nRibId, nPartId, Me),
New RibCheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nRibId, nPartId, Me), New RibCheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nRibId, nPartId, Me),
New RibCheckMachiningParam(MachiningParam.Params.RIBSLEADININVERT, nRibId, nPartId, Me), New RibCheckMachiningParam(MachiningParam.Params.RIBSLEADININVERT, nRibId, nPartId, Me),
@@ -58,8 +54,7 @@ Public Class RibParamPanelVM
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nRibId, nPartId, Me), New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nRibId, nPartId, Me), New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nRibId, nPartId, Me), New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nRibId, nPartId, Me), New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nRibId, nPartId, Me)})
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADFILLET, nRibId, nPartId, Me)})
NotifyPropertyChanged(NameOf(MachiningParamList)) NotifyPropertyChanged(NameOf(MachiningParamList))
NotifyPropertyChanged(NameOf(sName)) NotifyPropertyChanged(NameOf(sName))
End Sub End Sub
@@ -235,26 +230,14 @@ Public Class RibNumericMachiningParam
MyBase.New(Type, Cathegory) MyBase.New(Type, Cathegory)
Dim bReadFromPart As Boolean = False Dim bReadFromPart As Boolean = False
Select Case Type Select Case Type
Case Params.RIBSSTRANDWIDTH
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSSTRANDWIDTH, m_dValue)
EgtGetInfo(nPartId, MAC_RIBSSTRANDWIDTH, m_dPartValue)
m_bIsLen = True
Case Params.RIBSOVERLAP Case Params.RIBSOVERLAP
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSOVERLAP, m_dValue) bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSOVERLAP, m_dValue)
EgtGetInfo(nPartId, MAC_RIBSOVERLAP, m_dPartValue) EgtGetInfo(nPartId, MAC_RIBSOVERLAP, m_dPartValue)
m_bIsLen = False m_bIsLen = True
Case Params.RIBSSTRANDOVERLAP
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSSTRANDOVERLAP, m_dValue)
EgtGetInfo(nPartId, MAC_RIBSSTRANDOVERLAP, m_dPartValue)
m_bIsLen = False
Case Params.RIBSSTRANDCOUNT Case Params.RIBSSTRANDCOUNT
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSSTRANDCOUNT, m_dValue) bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSSTRANDCOUNT, m_dValue)
EgtGetInfo(nPartId, MAC_RIBSSTRANDCOUNT, m_dPartValue) EgtGetInfo(nPartId, MAC_RIBSSTRANDCOUNT, m_dPartValue)
m_bIsLen = True m_bIsLen = True
Case Params.RIBSLINKFILLET
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSLINKFILLET, m_dValue)
EgtGetInfo(nPartId, MAC_RIBSLINKFILLET, m_dPartValue)
m_bIsLen = True
Case Params.RIBSINVERTDIRECTION Case Params.RIBSINVERTDIRECTION
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSINVERTDIRECTION, m_dValue) bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSINVERTDIRECTION, m_dValue)
EgtGetInfo(nPartId, MAC_RIBSINVERTDIRECTION, m_dPartValue) EgtGetInfo(nPartId, MAC_RIBSINVERTDIRECTION, m_dPartValue)
@@ -291,10 +274,6 @@ Public Class RibNumericMachiningParam
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSLEADOUTWIPEDIR, m_dValue) bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSLEADOUTWIPEDIR, m_dValue)
EgtGetInfo(nPartId, MAC_RIBSLEADOUTWIPEDIR, m_dPartValue) EgtGetInfo(nPartId, MAC_RIBSLEADOUTWIPEDIR, m_dPartValue)
m_bIsLen = True m_bIsLen = True
Case Params.RIBSLEADFILLET
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSLEADFILLET, m_dValue)
EgtGetInfo(nPartId, MAC_RIBSLEADFILLET, m_dPartValue)
m_bIsLen = True
End Select End Select
m_dOrigValue = m_dValue m_dOrigValue = m_dValue
If Not bReadFromPart Then If Not bReadFromPart Then
@@ -311,36 +290,18 @@ Public Class RibNumericMachiningParam
sWriteValue = DoubleToString(m_dValue, 2) sWriteValue = DoubleToString(m_dValue, 2)
End If End If
Select Case Type Select Case Type
Case Params.RIBSSTRANDWIDTH
If bIsModifiedFromPart Then
EgtSetInfo(nRibId, MAC_RIBSSTRANDWIDTH, sWriteValue)
Else
EgtRemoveInfo(nRibId, MAC_RIBSSTRANDWIDTH)
End If
Case Params.RIBSOVERLAP Case Params.RIBSOVERLAP
If bIsModifiedFromPart Then If bIsModifiedFromPart Then
EgtSetInfo(nRibId, MAC_RIBSOVERLAP, sWriteValue) EgtSetInfo(nRibId, MAC_RIBSOVERLAP, sWriteValue)
Else Else
EgtRemoveInfo(nRibId, MAC_RIBSOVERLAP) EgtRemoveInfo(nRibId, MAC_RIBSOVERLAP)
End If End If
Case Params.RIBSSTRANDOVERLAP
If bIsModifiedFromPart Then
EgtSetInfo(nRibId, MAC_RIBSSTRANDOVERLAP, sWriteValue)
Else
EgtRemoveInfo(nRibId, MAC_RIBSSTRANDOVERLAP)
End If
Case Params.RIBSSTRANDCOUNT Case Params.RIBSSTRANDCOUNT
If bIsModifiedFromPart Then If bIsModifiedFromPart Then
EgtSetInfo(nRibId, MAC_RIBSSTRANDCOUNT, sWriteValue) EgtSetInfo(nRibId, MAC_RIBSSTRANDCOUNT, sWriteValue)
Else Else
EgtRemoveInfo(nRibId, MAC_RIBSSTRANDCOUNT) EgtRemoveInfo(nRibId, MAC_RIBSSTRANDCOUNT)
End If End If
Case Params.RIBSLINKFILLET
If bIsModifiedFromPart Then
EgtSetInfo(nRibId, MAC_RIBSLINKFILLET, sWriteValue)
Else
EgtRemoveInfo(nRibId, MAC_RIBSLINKFILLET)
End If
Case Params.RIBSINVERTDIRECTION Case Params.RIBSINVERTDIRECTION
If bIsModifiedFromPart Then If bIsModifiedFromPart Then
EgtSetInfo(nRibId, MAC_RIBSINVERTDIRECTION, sWriteValue) EgtSetInfo(nRibId, MAC_RIBSINVERTDIRECTION, sWriteValue)
@@ -395,12 +356,6 @@ Public Class RibNumericMachiningParam
Else Else
EgtRemoveInfo(nRibId, MAC_RIBSLEADOUTWIPEDIR) EgtRemoveInfo(nRibId, MAC_RIBSLEADOUTWIPEDIR)
End If End If
Case Params.RIBSLEADFILLET
If bIsModifiedFromPart Then
EgtSetInfo(nRibId, MAC_RIBSLEADFILLET, sWriteValue)
Else
EgtRemoveInfo(nRibId, MAC_RIBSLEADFILLET)
End If
End Select End Select
End Sub End Sub
@@ -579,9 +534,6 @@ Public Class RibCheckMachiningParam
Case Params.RIBSLINK Case Params.RIBSLINK
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSLINK, m_bValue) bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSLINK, m_bValue)
EgtGetInfo(nPartId, MAC_RIBSLINK, m_bPartValue) 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 Case Params.RIBSINVERTDIRECTION
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSINVERTDIRECTION, m_bValue) bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSINVERTDIRECTION, m_bValue)
EgtGetInfo(nPartId, MAC_RIBSINVERTDIRECTION, m_bPartValue) EgtGetInfo(nPartId, MAC_RIBSINVERTDIRECTION, m_bPartValue)
@@ -610,12 +562,6 @@ Public Class RibCheckMachiningParam
Else Else
EgtRemoveInfo(nRibId, MAC_RIBSLINK) EgtRemoveInfo(nRibId, MAC_RIBSLINK)
End If 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 Case Params.RIBSINVERTDIRECTION
If bIsModifiedFromPart Then If bIsModifiedFromPart Then
EgtSetInfo(nRibId, MAC_RIBSINVERTDIRECTION, If(m_bValue, 1, 0)) EgtSetInfo(nRibId, MAC_RIBSINVERTDIRECTION, If(m_bValue, 1, 0))
+105 -131
View File
@@ -49,8 +49,9 @@ Public Class MySceneHostVM
AddHandler MainController.OnOpenProject, AddressOf OnOpenProject AddHandler MainController.OnOpenProject, AddressOf OnOpenProject
AddHandler MainController.OnSavingProject, AddressOf OnSavingProject AddHandler MainController.OnSavingProject, AddressOf OnSavingProject
AddHandler MainController.OnSavedProject, AddressOf OnSavedProject AddHandler MainController.OnSavedProject, AddressOf OnSavedProject
AddHandler MainController.OnInsertingProject, AddressOf OnInsertingProject
AddHandler MainController.OnInsertedProject, AddressOf OnInsertedProject AddHandler MainController.OnInsertedProject, AddressOf OnInsertedProject
AddHandler MainController.OnImportingProject, AddressOf OnImportingProject
AddHandler MainController.OnImportedProject, AddressOf OnImportedProject
AddHandler MainController.PrepareInputBox, AddressOf PrepareInputBox AddHandler MainController.PrepareInputBox, AddressOf PrepareInputBox
AddHandler MainController.SetInputBoxText, AddressOf SetInputBoxText AddHandler MainController.SetInputBoxText, AddressOf SetInputBoxText
AddHandler MainController.SetInputBoxCheck, AddressOf SetInputBoxCheck AddHandler MainController.SetInputBoxCheck, AddressOf SetInputBoxCheck
@@ -70,8 +71,6 @@ Public Class MySceneHostVM
' Se tutto bene ' Se tutto bene
If MainScene.Init() And Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.BASE) Then If MainScene.Init() And Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.BASE) Then
PostInitializeScene() PostInitializeScene()
' Non imposto automaticamente il focus sulla scena muovendo il mouse sopra di essa (necessario click)
MainScene.SetFocusOnMove( True, 0.3, 0.3, 0.1, 0.2)
' Imposto stato gestione mouse diretto della scena a nessuno ' Imposto stato gestione mouse diretto della scena a nessuno
MainScene.SetStatusNull() MainScene.SetStatusNull()
EgtSetCurrentContext(MainScene.GetCtx()) EgtSetCurrentContext(MainScene.GetCtx())
@@ -82,40 +81,27 @@ Public Class MySceneHostVM
' Problemi ' Problemi
' Se manca la chiave ' Se manca la chiave
If Map.refMainWindowVM.MainWindowM.nKeyLevel = -1 Or Map.refMainWindowVM.MainWindowM.nKeyLevel = -2 Then If Map.refMainWindowVM.MainWindowM.nKeyLevel = -1 Or Map.refMainWindowVM.MainWindowM.nKeyLevel = -2 Then
If Not EgtGetNetHwKey() Then EgtOutLog("Missing Dongle")
EgtOutLog("Missing Dongle") ' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
' 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 sText As String = EgtMsg(10102) & vbCrLf & EgtMsg(10103) Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
Dim sTitle As String = EgtMsg(10101) 'MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error) EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
Else ' Altrimenti manca la licenza
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
Else Else
EgtOutLog("Problems with Licence") EgtOutLog("Problems with Licence")
' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore" ' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
Dim sText As String = EgtMsg(10105) & vbCrLf & EgtMsg(10106) Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 5) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 6)
Dim sTitle As String = EgtMsg(10101) Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
If MessageBox.Show(sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then 'If MessageBox.Show(sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
' Apro dialogo per richiesta file licenza ' Apro dialogo per richiesta file licenza
Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With { Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With {
.DefaultExt = ".lic", .DefaultExt = ".lic",
.Filter = "Licences (.lic)|*.lic", .Filter = "Licences (.lic)|*.lic",
.CheckFileExists = True, .CheckFileExists = True,
.ValidateNames = True .ValidateNames = True
} }
If LicDlg.ShowDialog() = True Then If LicDlg.ShowDialog() = True Then
' Recupero il direttorio del file ' Recupero il direttorio del file
Dim sDir As String = Path.GetDirectoryName(LicDlg.FileName) Dim sDir As String = Path.GetDirectoryName(LicDlg.FileName)
@@ -202,24 +188,33 @@ Public Class MySceneHostVM
Private Sub PostInitializeScene() Private Sub PostInitializeScene()
' Impostazioni Controller ' Impostazioni Controller
MainController.SetScene(MainScene) MainController.SetScene(MainScene)
MainController.SetSurfTmTolerance(OptionModule.m_dGeometryTolerance) MainController.SetSurfTmTolerance(0.05)
MainController.SetAdvImpTolerance(OptionModule.m_dGeometryTolerance)
MainController.SetUseCustomColors(True, S_SCENE, K_CUSTOMCOLORS) MainController.SetUseCustomColors(True, S_SCENE, K_CUSTOMCOLORS)
' imposto unità di misura per interfaccia utente ' imposto unità di misura per interfaccia utente
Dim bMmUnits As Boolean = GetMainPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0 Dim bMmUnits As Boolean = GetMainPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0
EgtSetUiUnits(bMmUnits) EgtSetUiUnits(bMmUnits)
'Map.refMyStatusBarVM.SetMeasureUnit(nMeasureUnit <> 0)
' imposto visualizzazione riferimento globale ' imposto visualizzazione riferimento globale
EgtSetGlobFrameShow(True) EgtSetGlobFrameShow(True)
' imposto i dati della griglia ' 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) Dim MinLnColor As Color3d = New Color3d(160, 160, 160)
GetMainPrivateProfileColor(S_GRID, K_MINLNCOLOR, MinLnColor) GetMainPrivateProfileColor(S_GRID, K_MINLNCOLOR, MinLnColor)
Dim MajLnColor As Color3d = New Color3d(160, 160, 160) Dim MajLnColor As Color3d = New Color3d(160, 160, 160)
GetMainPrivateProfileColor(S_GRID, K_MAJLNCOLOR, MajLnColor) GetMainPrivateProfileColor(S_GRID, K_MAJLNCOLOR, MajLnColor)
EgtSetGridFrame(Frame3d.GLOB) EgtSetGridFrame(Frame3d.GLOB)
EgtSetGridGeo( If( bMmUnits, OptionModule.m_dSnapStepMm, OptionModule.m_dSnapStepInch), If bMmUnits Then
OptionModule.m_nMinLineSStep, OptionModule.m_nMajLineSStep, OptionModule.m_nExtSStep) EgtSetGridGeo(dSnapStepMm, nMinLineSStep, nMajLineSStep, nExtSStep)
Else
EgtSetGridGeo(dSnapStepInch, nMinLineSStep, nMajLineSStep, nExtSStep)
End If
EgtSetGridColor(MinLnColor, MajLnColor) EgtSetGridColor(MinLnColor, MajLnColor)
EgtSetGridShow(OptionModule.m_bGridVisibility, OptionModule.m_bGridVisibility) EgtSetGridShow(bGridVisibility, bGridVisibility)
' imposto tipo coordinate ' imposto tipo coordinate
MainScene.SetGridCursorPos(True) MainScene.SetGridCursorPos(True)
' visualizzazione avanzata dei triangoli costituenti le superfici ' visualizzazione avanzata dei triangoli costituenti le superfici
@@ -354,7 +349,6 @@ Public Class MySceneHostVM
"|Step files (*.stp;*.step)|*.stp;*.step" & "|Step files (*.stp;*.step)|*.stp;*.step" &
"|3D Manufacturing format (*.3mf)|*.3mf" & "|3D Manufacturing format (*.3mf)|*.3mf" &
"|New geometry EgalTech(*.nge)|*.nge" & "|New geometry EgalTech(*.nge)|*.nge" &
"|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" &
"|All Files (*.*)|*.*", "|All Files (*.*)|*.*",
.FilterIndex = ExtIndex, .FilterIndex = ExtIndex,
.InitialDirectory = sDir} .InitialDirectory = sDir}
@@ -362,7 +356,8 @@ Public Class MySceneHostVM
Return False Return False
End If End If
WriteMainPrivateProfileString(S_PRINTING3D, K_IMPORTCURREXTENSION, OpenFileDialog.FilterIndex) WriteMainPrivateProfileString(S_PRINTING3D, K_IMPORTCURREXTENSION, OpenFileDialog.FilterIndex)
Dim sFile As String = OpenFileDialog.FileName Dim sFile As String = String.Empty
sFile = OpenFileDialog.FileName
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma ' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
Map.refProjManagerVM.SetProjCmdIsEnabled(False) Map.refProjManagerVM.SetProjCmdIsEnabled(False)
Map.refTopPanelVM.SetTopPanelIsEnabled(False) Map.refTopPanelVM.SetTopPanelIsEnabled(False)
@@ -417,9 +412,8 @@ Public Class MySceneHostVM
"|Step files (*.stp;*.step)|*.stp;*.step" & "|Step files (*.stp;*.step)|*.stp;*.step" &
"|3D Manufacturing format (*.3mf)|*.3mf" & "|3D Manufacturing format (*.3mf)|*.3mf" &
"|New geometry EgalTech(*.nge)|*.nge" & "|New geometry EgalTech(*.nge)|*.nge" &
"|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" &
"|All Files (*.*)|*.*", "|All Files (*.*)|*.*",
.FilterIndex = 6, .FilterIndex = 1,
.InitialDirectory = sDir} .InitialDirectory = sDir}
If Not OpenFileDialog.ShowDialog Then If Not OpenFileDialog.ShowDialog Then
Return False Return False
@@ -432,35 +426,29 @@ Public Class MySceneHostVM
' sposto le nuove geometrie nel layer rib del pezzo ' sposto le nuove geometrie nel layer rib del pezzo
Dim nNewPartId As Integer = EgtGetLastPart() Dim nNewPartId As Integer = EgtGetLastPart()
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId) Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
Dim frLayer As New Frame3d
EgtGetGroupGlobFrame( nNewLayerId, frLayer)
Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId) Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId)
While nNewEntityId <> GDB_ID.NULL While nNewEntityId <> GDB_ID.NULL
Dim EntityType As GDB_TY = EgtGetType(nNewEntityId) Dim EntityType As GDB_TY = EgtGetType(nNewEntityId)
Select Case EntityType Select Case EntityType
Case GDB_TY.CRV_COMPO, GDB_TY.CRV_LINE, GDB_TY.CRV_ARC Case GDB_TY.CRV_COMPO, GDB_TY.CRV_LINE, GDB_TY.CRV_ARC
Dim nNewRib As Integer = GDB_ID.NULL Dim nNewRib = nNewEntityId
If EntityType = GDB_TY.CRV_LINE OrElse EntityType = GDB_TY.CRV_ARC Then If EntityType = GDB_TY.CRV_LINE OrElse EntityType = GDB_TY.CRV_ARC Then
nNewRib = EgtCreateCurveCompo(nNewLayerId, nNewEntityId, False) nNewRib = EgtCreateCurveCompo(Map.refTopPanelVM.SelPart.nPartId, nNewEntityId, False)
EgtRelocate( nNewRib, Map.refRibPanelVM.nRibLayerId, GDB_POS.LAST_SON)
Else Else
' lo copio nel layer dei rib ' lo copio nel layer dei rib
nNewRib = EgtCopy(nNewEntityId, Map.refRibPanelVM.nRibLayerId, GDB_POS.LAST_SON) nNewRib = EgtCopy(nNewEntityId, Map.refRibPanelVM.nRibLayerId, GDB_POS.LAST_SON)
End If End If
EgtSetName(nNewRib, RIB_CURVE) EgtSetName(nNewRib, RIB_CURVE)
' elimino effetti di eventuale riferimento originale
EgtTransform( nNewRib, frLayer)
' elimino colore entita' ' elimino colore entita'
EgtResetColor(nNewEntityId) EgtResetColor(nNewEntityId)
' lo aggiungo alla lista ' lo aggiungo alla lista
Dim NewEntity As RibEntity = New RibEntity(RibEntity.RibTypes.FROMIMPORT, nNewRib) Dim NewEntity As RibEntity = New RibEntity(RibEntity.RibTypes.FROMIMPORT, nNewRib)
Map.refRibPanelVM.RibList.Add(NewEntity) Map.refRibPanelVM.RibList.Add(NewEntity)
Case GDB_TY.SRF_MESH, GDB_TY.SRF_FRGN, GDB_TY.SRF_BEZ Case GDB_TY.SRF_MESH, GDB_TY.SRF_FRGN, GDB_TY.SRF_BEZ
Dim nNewRib = nNewEntityId
' lo copio nel layer dei rib ' lo copio nel layer dei rib
Dim nNewRib As Integer = EgtCopy(nNewEntityId, Map.refRibPanelVM.nRibLayerId, GDB_POS.LAST_SON) nNewRib = EgtCopy(nNewEntityId, Map.refRibPanelVM.nRibLayerId, GDB_POS.LAST_SON)
EgtSetName(nNewRib, RIB_EXTRUSION) EgtSetName(nNewRib, RIB_EXTRUSION)
' elimino effetti di eventuale riferimento originale
EgtTransform( nNewRib, frLayer)
' elimino colore entita' ' elimino colore entita'
EgtResetColor(nNewEntityId) EgtResetColor(nNewEntityId)
' lo aggiungo alla lista ' lo aggiungo alla lista
@@ -495,32 +483,29 @@ Public Class MySceneHostVM
"|Step files (*.stp;*.step)|*.stp;*.step" & "|Step files (*.stp;*.step)|*.stp;*.step" &
"|3D Manufacturing format (*.3mf)|*.3mf" & "|3D Manufacturing format (*.3mf)|*.3mf" &
"|New geometry EgalTech(*.nge)|*.nge" & "|New geometry EgalTech(*.nge)|*.nge" &
"|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" &
"|All Files (*.*)|*.*", "|All Files (*.*)|*.*",
.FilterIndex = 6, .FilterIndex = 1,
.InitialDirectory = sDir} .InitialDirectory = sDir}
If Not OpenFileDialog.ShowDialog Then If Not OpenFileDialog.ShowDialog Then
Return False Return False
End If End If
Dim sFile As String = OpenFileDialog.FileName Dim sFile As String = String.Empty
sFile = OpenFileDialog.FileName
' importo la nuova geometria ' importo la nuova geometria
Dim bOk As Boolean = MainController.InsertProject(sFile, False) Dim bOk As Boolean = MainController.InsertProject(sFile, False)
If bOk Then If bOk Then
' sposto le nuove geometrie nel layer rib del pezzo ' sposto le nuove geometrie nel layer rib del pezzo
Dim nNewPartId As Integer = EgtGetLastPart() Dim nNewPartId As Integer = EgtGetLastPart()
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId) Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
Dim frLayer As New Frame3d
EgtGetGroupGlobFrame( nNewLayerId, frLayer)
' verifico che ci sia una sola entita' ' verifico che ci sia una sola entita'
If EgtGetGroupObjs(nNewLayerId) <> 1 Then If EgtGetGroupObjs(nNewLayerId) <> 1 Then
MessageBox.Show("Impossible importing file that contains more than one entity.", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Impossible importing file that contains more than one entity.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Impossible importing file that contains more than one entity.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
Else Else
' elimino eventuale entita' vecchia ' elimino eventuale entita' vecchia
If MenuItem.OrigLayer.EntityList.Count > 0 AndAlso MenuItem.OrigLayer.EntityList(0).nId <> GDB_ID.NULL Then EgtErase(MenuItem.OrigLayer.EntityList(0).nId) 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) Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId)
EgtRelocate(nNewEntityId, MenuItem.OrigLayer.nLayerId, GDB_POS.LAST_SON) EgtRelocate(nNewEntityId, MenuItem.OrigLayer.nLayerId, GDB_POS.LAST_SON)
' elimino effetti di eventuale riferimento originale
EgtTransform( nNewEntityId, frLayer)
' elimino colore entita' ' elimino colore entita'
EgtResetColor(nNewEntityId) EgtResetColor(nNewEntityId)
' aggiorno riferimento pezzo ' aggiorno riferimento pezzo
@@ -557,9 +542,8 @@ Public Class MySceneHostVM
"|Step files (*.stp;*.step)|*.stp;*.step" & "|Step files (*.stp;*.step)|*.stp;*.step" &
"|3D Manufacturing format (*.3mf)|*.3mf" & "|3D Manufacturing format (*.3mf)|*.3mf" &
"|New geometry EgalTech(*.nge)|*.nge" & "|New geometry EgalTech(*.nge)|*.nge" &
"|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" &
"|All Files (*.*)|*.*", "|All Files (*.*)|*.*",
.FilterIndex = 6, .FilterIndex = 1,
.InitialDirectory = sDir} .InitialDirectory = sDir}
If Not OpenFileDialog.ShowDialog Then If Not OpenFileDialog.ShowDialog Then
Return False Return False
@@ -572,35 +556,29 @@ Public Class MySceneHostVM
' sposto le nuove geometrie nel layer ShellNumber del pezzo ' sposto le nuove geometrie nel layer ShellNumber del pezzo
Dim nNewPartId As Integer = EgtGetLastPart() Dim nNewPartId As Integer = EgtGetLastPart()
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId) Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
Dim frLayer As New Frame3d
EgtGetGroupGlobFrame( nNewLayerId, frLayer)
Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId) Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId)
While nNewEntityId <> GDB_ID.NULL While nNewEntityId <> GDB_ID.NULL
Dim EntityType As GDB_TY = EgtGetType(nNewEntityId) Dim EntityType As GDB_TY = EgtGetType(nNewEntityId)
Select Case EntityType Select Case EntityType
Case GDB_TY.CRV_COMPO, GDB_TY.CRV_LINE, GDB_TY.CRV_ARC Case GDB_TY.CRV_COMPO, GDB_TY.CRV_LINE, GDB_TY.CRV_ARC
Dim nNewShellNumberId As Integer = GDB_ID.NULL Dim nNewShellNumberId As Integer = nNewEntityId
If EntityType = GDB_TY.CRV_LINE OrElse EntityType = GDB_TY.CRV_ARC Then If EntityType = GDB_TY.CRV_LINE OrElse EntityType = GDB_TY.CRV_ARC Then
nNewShellNumberId = EgtCreateCurveCompo(nNewLayerId, nNewEntityId, False) nNewShellNumberId = EgtCreateCurveCompo(Map.refTopPanelVM.SelPart.nPartId, nNewEntityId, False)
EgtRelocate( nNewShellNumberId, Map.refShellNumberPanelVM.nShellNumberLayerId, GDB_POS.LAST_SON)
Else Else
' lo copio nel layer dei shellnumber ' lo copio nel layer dei shellnumber
nNewShellNumberId = EgtCopy(nNewEntityId, Map.refShellNumberPanelVM.nShellNumberLayerId, GDB_POS.LAST_SON) nNewShellNumberId = EgtCopy(nNewEntityId, Map.refShellNumberPanelVM.nShellNumberLayerId, GDB_POS.LAST_SON)
End If End If
EgtSetName(nNewShellNumberId, RIB_CURVE) EgtSetName(nNewShellNumberId, RIB_CURVE)
' elimino effetti di eventuale riferimento originale
EgtTransform( nNewShellNumberId, frLayer)
' elimino colore entita' ' elimino colore entita'
EgtResetColor(nNewEntityId) EgtResetColor(nNewEntityId)
' lo aggiungo alla lista ' lo aggiungo alla lista
Dim NewEntity As ShellNumberEntity = New ShellNumberEntity(ShellNumberEntity.ShellNumberTypes.FROMIMPORT, nNewShellNumberId) Dim NewEntity As ShellNumberEntity = New ShellNumberEntity(ShellNumberEntity.ShellNumberTypes.FROMIMPORT, nNewShellNumberId)
Map.refShellNumberPanelVM.ShellNumberList.Add(NewEntity) Map.refShellNumberPanelVM.ShellNumberList.Add(NewEntity)
Case GDB_TY.SRF_MESH, GDB_TY.SRF_FRGN, GDB_TY.SRF_BEZ Case GDB_TY.SRF_MESH, GDB_TY.SRF_FRGN, GDB_TY.SRF_BEZ
' lo copio nel layer dei shellnumber Dim nNewShellNumberId = nNewEntityId
Dim nNewShellNumberId As Integer = EgtCopy(nNewEntityId, Map.refShellNumberPanelVM.nShellNumberLayerId, GDB_POS.LAST_SON) ' lo copio nel layer dei rib
nNewShellNumberId = EgtCopy(nNewEntityId, Map.refShellNumberPanelVM.nShellNumberLayerId, GDB_POS.LAST_SON)
EgtSetName(nNewShellNumberId, RIB_EXTRUSION) EgtSetName(nNewShellNumberId, RIB_EXTRUSION)
' elimino effetti di eventuale riferimento originale
EgtTransform( nNewShellNumberId, frLayer)
' elimino colore entita' ' elimino colore entita'
EgtResetColor(nNewEntityId) EgtResetColor(nNewEntityId)
' lo aggiungo alla lista ' lo aggiungo alla lista
@@ -610,7 +588,7 @@ Public Class MySceneHostVM
nNewEntityId = EgtGetNext(nNewEntityId) nNewEntityId = EgtGetNext(nNewEntityId)
End While End While
EgtErase(nNewPartId) EgtErase(nNewPartId)
' seleziono ultima ShellNumber ' seleziono ultima rib
Map.refShellNumberPanelVM.SelLastShellNumber() Map.refShellNumberPanelVM.SelLastShellNumber()
EgtDraw() EgtDraw()
' Imposto flag di ricalcolo slice ' Imposto flag di ricalcolo slice
@@ -635,9 +613,8 @@ Public Class MySceneHostVM
"|Step files (*.stp;*.step)|*.stp;*.step" & "|Step files (*.stp;*.step)|*.stp;*.step" &
"|3D Manufacturing format (*.3mf)|*.3mf" & "|3D Manufacturing format (*.3mf)|*.3mf" &
"|New geometry EgalTech(*.nge)|*.nge" & "|New geometry EgalTech(*.nge)|*.nge" &
"|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" &
"|All Files (*.*)|*.*", "|All Files (*.*)|*.*",
.FilterIndex = 6, .FilterIndex = 1,
.InitialDirectory = sDir} .InitialDirectory = sDir}
If Not OpenFileDialog.ShowDialog Then If Not OpenFileDialog.ShowDialog Then
Return False Return False
@@ -650,35 +627,29 @@ Public Class MySceneHostVM
' sposto le nuove geometrie nel layer ShellNumber del pezzo ' sposto le nuove geometrie nel layer ShellNumber del pezzo
Dim nNewPartId As Integer = EgtGetLastPart() Dim nNewPartId As Integer = EgtGetLastPart()
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId) Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
Dim frLayer As New Frame3d
EgtGetGroupGlobFrame( nNewLayerId, frLayer)
Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId) Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId)
While nNewEntityId <> GDB_ID.NULL While nNewEntityId <> GDB_ID.NULL
Dim EntityType As GDB_TY = EgtGetType(nNewEntityId) Dim EntityType As GDB_TY = EgtGetType(nNewEntityId)
Select Case EntityType Select Case EntityType
Case GDB_TY.CRV_COMPO, GDB_TY.CRV_LINE, GDB_TY.CRV_ARC Case GDB_TY.CRV_COMPO, GDB_TY.CRV_LINE, GDB_TY.CRV_ARC
Dim nNewFilledSolidId As Integer = GDB_ID.NULL Dim nNewFilledSolidId As Integer = nNewEntityId
If EntityType = GDB_TY.CRV_LINE OrElse EntityType = GDB_TY.CRV_ARC Then If EntityType = GDB_TY.CRV_LINE OrElse EntityType = GDB_TY.CRV_ARC Then
nNewFilledSolidId = EgtCreateCurveCompo(nNewLayerId, nNewEntityId, False) nNewFilledSolidId = EgtCreateCurveCompo(Map.refTopPanelVM.SelPart.nPartId, nNewEntityId, False)
EgtRelocate( nNewFilledSolidId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON)
Else Else
' lo copio nel layer dei FilledSolid ' lo copio nel layer dei shellnumber
nNewFilledSolidId = EgtCopy(nNewEntityId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON) nNewFilledSolidId = EgtCopy(nNewEntityId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON)
End If End If
EgtSetName(nNewFilledSolidId, RIB_CURVE) EgtSetName(nNewFilledSolidId, RIB_CURVE)
' elimino effetti di eventuale riferimento originale
EgtTransform( nNewFilledSolidId, frLayer)
' elimino colore entita' ' elimino colore entita'
EgtResetColor(nNewEntityId) EgtResetColor(nNewEntityId)
' lo aggiungo alla lista ' lo aggiungo alla lista
Dim NewEntity As FilledSolidEntity = New FilledSolidEntity(FilledSolidEntity.FilledSolidTypes.FROMIMPORT, nNewFilledSolidId) Dim NewEntity As FilledSolidEntity = New FilledSolidEntity(FilledSolidEntity.FilledSolidTypes.FROMIMPORT, nNewFilledSolidId)
Map.refFilledSolidPanelVM.FilledSolidList.Add(NewEntity) Map.refFilledSolidPanelVM.FilledSolidList.Add(NewEntity)
Case GDB_TY.SRF_MESH, GDB_TY.SRF_FRGN, GDB_TY.SRF_BEZ Case GDB_TY.SRF_MESH, GDB_TY.SRF_FRGN, GDB_TY.SRF_BEZ
' lo copio nel layer dei FilledSolid Dim nNewFilledSolidId = nNewEntityId
Dim nNewFilledSolidId As Integer = EgtCopy(nNewEntityId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON) ' lo copio nel layer dei rib
nNewFilledSolidId = EgtCopy(nNewEntityId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON)
EgtSetName(nNewFilledSolidId, RIB_EXTRUSION) EgtSetName(nNewFilledSolidId, RIB_EXTRUSION)
' elimino effetti di eventuale riferimento originale
EgtTransform( nNewFilledSolidId, frLayer)
' elimino colore entita' ' elimino colore entita'
EgtResetColor(nNewEntityId) EgtResetColor(nNewEntityId)
' lo aggiungo alla lista ' lo aggiungo alla lista
@@ -688,7 +659,7 @@ Public Class MySceneHostVM
nNewEntityId = EgtGetNext(nNewEntityId) nNewEntityId = EgtGetNext(nNewEntityId)
End While End While
EgtErase(nNewPartId) EgtErase(nNewPartId)
' seleziono ultima FilledSolid ' seleziono ultima rib
Map.refFilledSolidPanelVM.SelLastFilledSolid() Map.refFilledSolidPanelVM.SelLastFilledSolid()
EgtDraw() EgtDraw()
' Imposto flag di ricalcolo slice ' Imposto flag di ricalcolo slice
@@ -714,26 +685,6 @@ Public Class MySceneHostVM
Return MainController.ExportProject(SaveFileDialog.FileName, False) Return MainController.ExportProject(SaveFileDialog.FileName, False)
End Function End Function
Public Function ExportProjectForMachine(sFilePath As String) As Boolean
' 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)
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 Public Overrides Function ExecScript(sFilePath As String) As Boolean
Dim bOk As Boolean = False Dim bOk As Boolean = False
If String.IsNullOrEmpty(sFilePath) Then If String.IsNullOrEmpty(sFilePath) Then
@@ -1073,7 +1024,8 @@ Public Class MySceneHostVM
EgtErase(EgtGetFirstPart()) EgtErase(EgtGetFirstPart())
CurrentMachine.CreateMachineTable() CurrentMachine.CreateMachineTable()
If Not bOk Then If Not bOk Then
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10002), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error on new file - Error 'MessageBox.Show(Application.Current.MainWindow, EgtMsg(10002), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error on new file - Error
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(10002), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
Map.refTopPanelVM.PartList.Clear() Map.refTopPanelVM.PartList.Clear()
@@ -1102,7 +1054,8 @@ Public Class MySceneHostVM
Else Else
sMsg = EgtMsg(10009) & " '" & sFile & "'" 'Missing file sMsg = EgtMsg(10009) & " '" & sFile & "'" 'Missing file
End If End If
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error 'MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error
EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
' leggo materiale e macchina ' leggo materiale e macchina
Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE) Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE)
@@ -1114,7 +1067,8 @@ Public Class MySceneHostVM
' imposto la macchina ' imposto la macchina
Map.refMachinePanelVM.SelectedMachine = ProjectMachine Map.refMachinePanelVM.SelectedMachine = ProjectMachine
Else Else
MessageBox.Show("Project machine not found! Impossible to open the project.", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Project machine not found! Impossible to open the project.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Project machine not found! Impossible to open the project.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
Map.refProjManagerVM.NewProject(False) Map.refProjManagerVM.NewProject(False)
Return Return
End If End If
@@ -1137,7 +1091,9 @@ Public Class MySceneHostVM
Else Else
Dim sMaterialName As String = "" Dim sMaterialName As String = ""
EgtGetInfo(nTabPartId, KEY_MATERIAL_NAME, sMaterialName) EgtGetInfo(nTabPartId, KEY_MATERIAL_NAME, sMaterialName)
MessageBox.Show("Project material (Guid:" & sMaterialGuid & " Name:""" & sMaterialName & """) not found!" & Environment.NewLine & 'MessageBox.Show("Project material (Guid:" & sMaterialGuid & " Name:""" & sMaterialName & """) not found!" & Environment.NewLine &
' "Please select another material!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Project material (Guid:" & sMaterialGuid & " Name:""" & sMaterialName & """) not found!" & Environment.NewLine &
"Please select another material!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning) "Please select another material!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
End If End If
End If End If
@@ -1221,16 +1177,8 @@ Public Class MySceneHostVM
Else Else
Map.refProjManagerVM.MruFiles.Remove(sFile) Map.refProjManagerVM.MruFiles.Remove(sFile)
Dim sMsg As String = EgtMsg(10004) & " '" & sFile & "'" 'Error saving file Dim sMsg As String = EgtMsg(10004) & " '" & sFile & "'" 'Error saving file
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error 'MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
End If EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error)
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 If
End Sub End Sub
@@ -1238,7 +1186,8 @@ Public Class MySceneHostVM
' Segnalo eventuale errore ' Segnalo eventuale errore
If Not bOk Then If Not bOk Then
Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error 'MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
Map.refProjManagerVM.MruImportFiles.Add(sFile) Map.refProjManagerVM.MruImportFiles.Add(sFile)
EgtSetInfo(EgtGetLastPart(), FILE_PATH, sFile) EgtSetInfo(EgtGetLastPart(), FILE_PATH, sFile)
@@ -1246,6 +1195,39 @@ Public Class MySceneHostVM
MainScene.SetStatusNull() MainScene.SetStatusNull()
End Sub 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
EgtMessageBoxV.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
EgtMessageBoxV.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, Private Sub PrepareInputBox(ByVal sTitle As String, ByVal sLabel As String, ByVal sCheckLabel As String,
ByVal bShowCombo As Boolean, ByVal bShowBtn As Boolean) ByVal bShowCombo As Boolean, ByVal bShowBtn As Boolean)
Map.refControllerInputPanelVM.PrepareInputBox(sTitle, sLabel, sCheckLabel, bShowCombo, bShowBtn) Map.refControllerInputPanelVM.PrepareInputBox(sTitle, sLabel, sCheckLabel, bShowCombo, bShowBtn)
@@ -1518,8 +1500,6 @@ Public Class MySceneHostVM
' eseguo comando ' eseguo comando
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
Map.refStartMachPanelVM.ResetCPlaneObjIsActive() Map.refStartMachPanelVM.ResetCPlaneObjIsActive()
' imposto dimensioni griglia standard (non tavola)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
' ripristino selezioni precedenti ' ripristino selezioni precedenti
For Each Id In Map.refStartMachPanelVM.PrevSelObjs For Each Id In Map.refStartMachPanelVM.PrevSelObjs
EgtSelectObj(Id) EgtSelectObj(Id)
@@ -1604,8 +1584,6 @@ Public Class MySceneHostVM
' eseguo comando ' eseguo comando
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
Map.refRibPanelVM.ResetCPlaneObjIsActive() Map.refRibPanelVM.ResetCPlaneObjIsActive()
' imposto dimensioni griglia standard (non tavola)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
' ripristino selezioni precedenti ' ripristino selezioni precedenti
For Each Id In Map.refRibPanelVM.PrevSelObjs For Each Id In Map.refRibPanelVM.PrevSelObjs
EgtSelectObj(Id) EgtSelectObj(Id)
@@ -1691,8 +1669,6 @@ Public Class MySceneHostVM
' eseguo comando ' eseguo comando
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
Map.refShellNumberPanelVM.ResetCPlaneObjIsActive() Map.refShellNumberPanelVM.ResetCPlaneObjIsActive()
' imposto dimensioni griglia standard (non tavola)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
' ripristino selezioni precedenti ' ripristino selezioni precedenti
For Each Id In Map.refShellNumberPanelVM.PrevSelObjs For Each Id In Map.refShellNumberPanelVM.PrevSelObjs
EgtSelectObj(Id) EgtSelectObj(Id)
@@ -1778,8 +1754,6 @@ Public Class MySceneHostVM
' eseguo comando ' eseguo comando
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
Map.refFilledSolidPanelVM.ResetCPlaneObjIsActive() Map.refFilledSolidPanelVM.ResetCPlaneObjIsActive()
' imposto dimensioni griglia standard (non tavola)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
' ripristino selezioni precedenti ' ripristino selezioni precedenti
For Each Id In Map.refFilledSolidPanelVM.PrevSelObjs For Each Id In Map.refFilledSolidPanelVM.PrevSelObjs
EgtSelectObj(Id) EgtSelectObj(Id)
+2 -1
View File
@@ -183,7 +183,8 @@ Public Class SecondaryWindowVM
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded. ' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
Public Sub CloseApplication(ByVal param As Object) Public Sub CloseApplication(ByVal param As Object)
If Map.refSliceManagerVM.bCalculating Then If Map.refSliceManagerVM.bCalculating Then
MessageBox.Show("Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
Return Return
End If End If
Map.refMainWindowVM.CloseApplication() Map.refMainWindowVM.CloseApplication()
+79 -10
View File
@@ -600,7 +600,6 @@ Public Class ShellNumberPanelVM
Friend Sub Dispose() Friend Sub Dispose()
' ripristino frame originale ' ripristino frame originale
EgtSetGridFrame(m_OriginalGridFrame) EgtSetGridFrame(m_OriginalGridFrame)
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
' se in modifica parametri ' se in modifica parametri
If m_bMachParam_IsChecked Then If m_bMachParam_IsChecked Then
' ripristino modalita' standard ' ripristino modalita' standard
@@ -741,7 +740,6 @@ Public Class ShellNumberPanelVM
If NewGeomType = GDB_TY.CRV_COMPO Then If NewGeomType = GDB_TY.CRV_COMPO Then
If Not EgtCurveIsClosed(nNewEntityId) Then If Not EgtCurveIsClosed(nNewEntityId) Then
EgtCloseCurveCompo(nNewEntityId) EgtCloseCurveCompo(nNewEntityId)
m_bEscOnLine2P = True
End If End If
EgtSetName(nNewEntityId, RIB_CURVE) EgtSetName(nNewEntityId, RIB_CURVE)
' resetto colore entita' ' resetto colore entita'
@@ -770,6 +768,9 @@ Public Class ShellNumberPanelVM
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
m_bIsCreatingExtrusion = True m_bIsCreatingExtrusion = True
Map.refControllerInputPanelVM.IsChecked = True Map.refControllerInputPanelVM.IsChecked = True
If Not EgtCurveIsClosed(nNewEntityId) Then
m_bEscOnLine2P = True
End If
Else Else
' cancello layer ' cancello layer
EgtErase(nNewExtrusionLayerId) EgtErase(nNewExtrusionLayerId)
@@ -1082,7 +1083,6 @@ Public Class ShellNumberPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneTop(ByVal param As Object) Public Sub CPlaneTop(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.TOP)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -1108,7 +1108,6 @@ Public Class ShellNumberPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneFront(ByVal param As Object) Public Sub CPlaneFront(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.FRONT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -1134,7 +1133,6 @@ Public Class ShellNumberPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneRight(ByVal param As Object) Public Sub CPlaneRight(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.RIGHT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -1160,7 +1158,6 @@ Public Class ShellNumberPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneBack(ByVal param As Object) Public Sub CPlaneBack(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.BACK)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -1186,7 +1183,6 @@ Public Class ShellNumberPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneLeft(ByVal param As Object) Public Sub CPlaneLeft(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.LEFT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -1212,7 +1208,6 @@ Public Class ShellNumberPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneBottom(ByVal param As Object) Public Sub CPlaneBottom(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -1239,7 +1234,6 @@ Public Class ShellNumberPanelVM
Public Sub CPlaneElevation(ByVal param As Object) Public Sub CPlaneElevation(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False) ManageInterface(False)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub End Sub
@@ -1265,12 +1259,87 @@ Public Class ShellNumberPanelVM
Public Sub CPlaneOrigin(ByVal param As Object) Public Sub CPlaneOrigin(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False) ManageInterface(False)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub End Sub
#End Region ' CPlaneOrigin #End Region ' CPlaneOrigin
#Region "CPlaneRotate"
''' <summary>
''' Returns a command that do CPlaneRotate.
''' </summary>
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
''' <summary>
''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand.
''' </summary>
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"
''' <summary>
''' Returns a command that do CPlane3P.
''' </summary>
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
''' <summary>
''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand.
''' </summary>
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"
''' <summary>
''' Returns a command that do CPlanePerpObj.
''' </summary>
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
''' <summary>
''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand.
''' </summary>
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" #Region "CPlaneObj"
Private m_bCPlaneObj_IsActive As Boolean = False Private m_bCPlaneObj_IsActive As Boolean = False
+7 -24
View File
@@ -23,16 +23,6 @@ Public Class MySimulation
#End Region ' FIELDS & PROPERTIES #End Region ' FIELDS & PROPERTIES
#Region "Messages"
Public ReadOnly Property VMillAdditiveMsg As String
Get
Return "Virtual Additive"
End Get
End Property
#End Region ' Messages
#Region "CONSTRUCTOR" #Region "CONSTRUCTOR"
Sub New() Sub New()
@@ -67,13 +57,12 @@ Public Class MySimulation
SetShowPlay(True) SetShowPlay(True)
NotifyPropertyChanged("PlayPauseImage") NotifyPropertyChanged("PlayPauseImage")
End If End If
' Se movimento non riuscito ' Se movimento non riuscito
Else Else
SetSimulationStatus(MCH_SIM_ST.UI_STOP) SetSimulationStatus(MCH_SIM_ST.UI_STOP)
' Aggiornamenti per bottone Play/Pause ' Aggiornamenti per bottone Play/Pause
SetShowPlay(True) SetShowPlay(True)
NotifyPropertyChanged("PlayPauseImage") NotifyPropertyChanged("PlayPauseImage")
' Eventuale messaggio
Select Case nMove Select Case nMove
Case MCH_SIM.END_ Case MCH_SIM.END_
StatusMsg = EgtMsg(MSG_SIMULATIONPAGEUC + 1) 'Simulazione completata StatusMsg = EgtMsg(MSG_SIMULATIONPAGEUC + 1) 'Simulazione completata
@@ -82,11 +71,14 @@ Public Class MySimulation
Case MCH_SIM.OUTSTROKE Case MCH_SIM.OUTSTROKE
Dim sInfo As String = String.Empty Dim sInfo As String = String.Empty
EgtGetOutstrokeInfo(sInfo) EgtGetOutstrokeInfo(sInfo)
MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo, EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Extracorsa ... 'MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo, EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Extracorsa ...
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo, EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop)
Case MCH_SIM.DIR_ERR Case MCH_SIM.DIR_ERR
MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 3), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Direzione utensile irraggiungibile 'MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 3), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Direzione utensile irraggiungibile
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATIONPAGEUC + 3), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop)
Case Else Case Else
MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 4), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Errore 'MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 4), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Errore
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATIONPAGEUC + 4), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop)
End Select End Select
End If End If
' Aggiorno stato visualizzazione macchina (dipende anche da utensile) ' Aggiorno stato visualizzazione macchina (dipende anche da utensile)
@@ -115,15 +107,6 @@ Public Class MySimulation
MachineAxisList(Index).IsReadOnlyAxesValue = True MachineAxisList(Index).IsReadOnlyAxesValue = True
Next Next
End If End If
EgtSimSetUiStatus(GetStatus())
End Sub
Public Overrides Sub VMillActiveInfoTitle(VMillActive As Boolean)
If VMillActive Then
EgtSetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM, VMillActive)
Else
EgtRemoveInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM)
End If
End Sub End Sub
#End Region ' METHODS #End Region ' METHODS
@@ -67,40 +67,6 @@
</Button> </Button>
</UniformGrid> </UniformGrid>
<Grid DataContext="{Binding DataContext, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:SimulationPanelV}}}"
IsEnabled="{Binding MySimul.VMill_IsEnabled}"
Margin="2.5"
HorizontalAlignment="Center"
Visibility="{Binding MySimul.VMill_Visibility}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<CheckBox IsChecked="{Binding MySimul.VMillActive}"
VerticalAlignment="Center"
Margin="2.5"/>
<TextBlock Grid.Column="1"
Text="{Binding MySimul.VMillAdditiveMsg}"
Margin="2.5"
Style="{StaticResource Simulation_TextBlock}"/>
</Grid>
<Grid DataContext="{Binding DataContext, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:SimulationPanelV}}}"
IsEnabled="{Binding MySimul.Trace_IsEnabled}"
Margin="2.5"
HorizontalAlignment="Center"
Visibility="{Binding MySimul.Trace_Visibility}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<CheckBox IsChecked="{Binding MySimul.TraceActive}"
VerticalAlignment="Center"
Margin="2.5"/>
<TextBlock Grid.Column="1"
Text="{Binding MySimul.TraceMsg}"
Margin="2.5"
Style="{StaticResource Simulation_TextBlock}"/>
</Grid>
<TextBlock Text="{Binding StatusMsg}" <TextBlock Text="{Binding StatusMsg}"
TextAlignment="Center" TextAlignment="Center"
Margin="2.5" Margin="2.5"
+7 -40
View File
@@ -20,15 +20,6 @@ Public Class SimulationPanelVM
End Set End Set
End Property End Property
#Region "Messages"
Public ReadOnly Property VirtualAdditive_Msg As String
Get
Return "Virtual Additive"
End Get
End Property
#End Region
' Definizione comandi ' Definizione comandi
Private m_cmdOk As ICommand Private m_cmdOk As ICommand
@@ -97,10 +88,12 @@ Public Class SimulationPanelVM
If Not EgtSimInit() OrElse Not EgtSimStart() Then If Not EgtSimInit() OrElse Not EgtSimStart() Then
If EgtGetLastMachMgrErrorId() <> 0 Then If EgtGetLastMachMgrErrorId() <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString() Dim sErr As String = EgtGetLastMachMgrErrorString()
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) 'MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Else EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) Else
End If 'MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
End If
End If End If
' Imposto stato corrente ' Imposto stato corrente
MySimul.SetSimulationStatus(MCH_SIM_ST.UI_STOP) MySimul.SetSimulationStatus(MCH_SIM_ST.UI_STOP)
@@ -110,32 +103,6 @@ Public Class SimulationPanelVM
MySimul.SliderValue = SliderVal MySimul.SliderValue = SliderVal
MySimul.ShowCncData() MySimul.ShowCncData()
MySimul.StatusMsg = EgtMsg(MSG_SIMULATIONPAGEUC + 14) ' Home MySimul.StatusMsg = EgtMsg(MSG_SIMULATIONPAGEUC + 14) ' Home
' Gestione check VMill
If GetMainPrivateProfileInt(S_SIMUL, K_VIRTUALADDITIVE, 0) > 0 AndAlso
EgtUILib.GetPrivateProfileInt( S_VMILL, K_VM_ENABLE, 0, CurrentMachine.sMachIniFile) > 0 Then
MySimul.VMill_Visibility = Visibility.Visible
MySimul.VMill_IsEnabled = True
Dim bVal As Boolean
MySimul.SetVMillActive( EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM, bVal) AndAlso bVal)
Else
' Disabilito Vmill, ma inibisco dichiarazione progetto modificato
MySimul.VMill_Visibility = Visibility.Collapsed
MySimul.VMill_IsEnabled = False
MySimul.VMillActive = False
EgtDisableModified()
EgtRemoveInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM)
EgtEnableModified()
End If
' Gestione check Trace
If GetMainPrivateProfileInt(S_SIMUL, K_TRACEENABLE, 0) > 0 And
EgtUILib.GetPrivateProfileInt(S_TOOLTRACE, K_TT_ENABLE, 0, CurrentMachine.sMachIniFile) > 0 Then
MySimul.Trace_Visibility = Visibility.Visible
MySimul.Trace_IsEnabled = True
If MySimul.TraceActive Then MySimul.TraceActive = True
Else
MySimul.Trace_Visibility = Visibility.Collapsed
MySimul.Trace_IsEnabled = False
End If
' nascondo slider strati e layer da visualizzare ' nascondo slider strati e layer da visualizzare
Map.refSliderManagerVM.SetSliderVisibility(False) Map.refSliderManagerVM.SetSliderVisibility(False)
Map.refViewLayerManagerVM.SetViewLayerManagerVisibility(False) Map.refViewLayerManagerVM.SetViewLayerManagerVisibility(False)
@@ -182,7 +149,7 @@ Public Class SimulationPanelVM
' Abilito impostazione modificato ' Abilito impostazione modificato
EgtEnableModified() EgtEnableModified()
' Ripristino vista griglia ' Ripristino vista griglia
EgtSetGridShow(OptionModule.m_bGridVisibility, OptionModule.m_bGridVisibility) EgtSetGridShow(True, True)
' Cambio la vista della scena ' Cambio la vista della scena
EgtSetGenericView(m_dPrevAngVertDegView, m_dPrevAngHorizDegView, False) EgtSetGenericView(m_dPrevAngVertDegView, m_dPrevAngHorizDegView, False)
EgtZoom(ZM.ALL) EgtZoom(ZM.ALL)
+26 -172
View File
@@ -2,8 +2,6 @@
Imports EgtUILib Imports EgtUILib
Imports Microsoft.Win32 Imports Microsoft.Win32
Imports System.IO Imports System.IO
Imports Ionic.Zip
Imports Newtonsoft.Json
Public Class SliceManagerVM Public Class SliceManagerVM
Inherits VMBase Inherits VMBase
@@ -324,7 +322,8 @@ Public Class SliceManagerVM
End If End If
EgtGetCurrFilePath(sCurrProject) EgtGetCurrFilePath(sCurrProject)
If String.IsNullOrWhiteSpace(sCurrProject) Or EgtGetFileType(sCurrProject) <> FT.NGE Then If String.IsNullOrWhiteSpace(sCurrProject) Or EgtGetFileType(sCurrProject) <> FT.NGE Then
MessageBox.Show("Save project before calculating slices!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Save project before calculating slices!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Save project before calculating slices!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
Return False Return False
End If End If
' mostro barre di caricamento ' mostro barre di caricamento
@@ -398,7 +397,8 @@ Public Class SliceManagerVM
Map.refTopPanelVM.SelPart.RefreshPrintLayers() Map.refTopPanelVM.SelPart.RefreshPrintLayers()
' in caso di errore, segnalazione ' in caso di errore, segnalazione
If Not bOk Then If Not bOk Then
MessageBox.Show("Error in slicing! See log file.", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Error in slicing! See log file.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Error in slicing! See log file.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
If bOk And m_bGenerate Then If bOk And m_bGenerate Then
' verifico esistenza e correttezza machgroup ' verifico esistenza e correttezza machgroup
@@ -426,7 +426,8 @@ Public Class SliceManagerVM
Else Else
sOut &= sMsg sOut &= sMsg
End If End If
MessageBox.Show(sOut, "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(sOut, "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, sOut, "Error", MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
End If End If
' aggiorno tempo e massa ' aggiorno tempo e massa
@@ -456,7 +457,6 @@ Public Class SliceManagerVM
' Definisco e posiziono il grezzo sulla tavola ' Definisco e posiziono il grezzo sulla tavola
EgtAddMachGroup("3dPrint") EgtAddMachGroup("3dPrint")
EgtSetTable("Tab") EgtSetTable("Tab")
EgtSetTableAreaOffset( 500, 500, 500, 500)
For Each CurrPart In Map.refTopPanelVM.PartList For Each CurrPart In Map.refTopPanelVM.PartList
Dim b3Part As New BBox3d Dim b3Part As New BBox3d
Dim b3PrintSolid As New BBox3d Dim b3PrintSolid As New BBox3d
@@ -484,7 +484,8 @@ Public Class SliceManagerVM
EgtLuaCreateGlobTable("MACH") EgtLuaCreateGlobTable("MACH")
If Not EgtLuaExecFile(sInitMachScriptPath) Then If Not EgtLuaExecFile(sInitMachScriptPath) Then
EgtOutLog("Error executing Machining init script " & sInitMachScriptPath) EgtOutLog("Error executing Machining init script " & sInitMachScriptPath)
MessageBox.Show(EgtMsg(5463) & " " & sInitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(EgtMsg(5463) & " " & sInitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5463) & " " & sInitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error)
Return False Return False
End If End If
Dim nErr As Integer = 999 Dim nErr As Integer = 999
@@ -503,7 +504,8 @@ Public Class SliceManagerVM
EgtLuaCreateGlobTable("MACH") EgtLuaCreateGlobTable("MACH")
If Not EgtLuaExecFile(sExitMachScriptPath) Then If Not EgtLuaExecFile(sExitMachScriptPath) Then
EgtOutLog("Error executing Machining exit script " & sExitMachScriptPath) EgtOutLog("Error executing Machining exit script " & sExitMachScriptPath)
MessageBox.Show(EgtMsg(5464) & " " & sExitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(EgtMsg(5464) & " " & sExitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5464) & " " & sExitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error)
Return False Return False
End If End If
Dim nErr As Integer = 999 Dim nErr As Integer = 999
@@ -539,23 +541,27 @@ Public Class SliceManagerVM
If m_bCalculating Then Return If m_bCalculating Then Return
m_bCalculating = True m_bCalculating = True
If IsNothing(Map.refTopPanelVM.SelPart) Then If IsNothing(Map.refTopPanelVM.SelPart) Then
MessageBox.Show("No parts to slice!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("No parts to slice!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "No parts to slice!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
m_bCalculating = False m_bCalculating = False
Return Return
End If End If
If IsNothing(Map.refTopPanelVM.SelMaterial) Then If IsNothing(Map.refTopPanelVM.SelMaterial) Then
MessageBox.Show("No print material set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("No print material set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "No print material set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
m_bCalculating = False m_bCalculating = False
Return Return
End If End If
If IsNothing(Map.refTopPanelVM.SelMachining) OrElse IsNothing(Map.refTopPanelVM.CurrMachining) OrElse Map.refTopPanelVM.CurrMachining.dCurrStrandH <= 0 Then If IsNothing(Map.refTopPanelVM.SelMachining) OrElse IsNothing(Map.refTopPanelVM.CurrMachining) OrElse Map.refTopPanelVM.CurrMachining.dCurrStrandH <= 0 Then
MessageBox.Show("No print parameters set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("No print parameters set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "No print parameters set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
m_bCalculating = False m_bCalculating = False
Return Return
End If End If
Dim b3Print As BBox3d = Map.refDispositionPanelVM.GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart) Dim b3Print As BBox3d = Map.refDispositionPanelVM.GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
If Not String.IsNullOrWhiteSpace(CurrentMachine.sMachDataIniFile) AndAlso Not CurrentMachine.b3ExtrusionArea.EnclosesXY(b3Print) Then If Not String.IsNullOrWhiteSpace(CurrentMachine.sMachDataIniFile) AndAlso Not CurrentMachine.b3ExtrusionArea.EnclosesXY(b3Print) Then
MessageBox.Show("Part outside the extrusion area!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Part outside the extrusion area!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Part outside the extrusion area!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
m_bCalculating = False m_bCalculating = False
Return Return
End If End If
@@ -708,34 +714,18 @@ Public Class SliceManagerVM
End If End If
End If End If
' eseguo calcoli ' eseguo calcoli
Dim bOk As Boolean = CalcSlice(True, True) CalcSlice(True, True)
' se non ho interrotto calcoli ' se non ho interrotto calcoli
If bOk AndAlso Not m_bStopScriptToManage Then If Not m_bStopScriptToManage Then
' Se esiste l'iso If bShiftPressed Then
If File.Exists(sIsoFilePath) Then ' Se esiste ne lancio l'editing
If bShiftPressed Then If File.Exists(sIsoFilePath) Then
' Se esiste ne lancio l'editing
Process.Start("Notepad.exe", sIsoFilePath) Process.Start("Notepad.exe", sIsoFilePath)
' altrimenti lo segnalo ' altrimenti lo segnalo
Else
'MessageBox.Show("Edit failed, missing part program file" & " (" & sIsoFilePath & ")")
EgtMessageBoxV.Show(Application.Current.MainWindow, "Edit failed, missing part program file" & " (" & sIsoFilePath & ")")
End If End If
' verifico se creare pacchetto
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
' 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 End If
NotifyPropertyChanged(NameOf(Time_Visibility)) NotifyPropertyChanged(NameOf(Time_Visibility))
NotifyPropertyChanged(NameOf(Mass_Visibility)) NotifyPropertyChanged(NameOf(Mass_Visibility))
@@ -745,142 +735,6 @@ Public Class SliceManagerVM
m_bCalculating = False m_bCalculating = False
End Sub 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 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)
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, "").FileName = "ProjectSlice" & Path.GetExtension(sIsoFilePath)
' aggiungo file 3mf
zip.AddItem(s3dFilePath, "")
' 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 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)
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 #End Region ' Generate
#Region "Simulate" #Region "Simulate"
+45 -47
View File
@@ -20,22 +20,23 @@ Public Class SliderManagerVM
End Get End Get
Set(value As Integer) Set(value As Integer)
If IsNothing(Map.refTopPanelVM.SelPart) Then Return If IsNothing(Map.refTopPanelVM.SelPart) Then Return
Dim DisableMgr As New DisableModifiedMgr
Select Case m_nSelViewSlider Select Case m_nSelViewSlider
Case ViewSliderType.ONLY_SELECTED Case ViewSliderType.ONLY_SELECTED
' nascondo precedente ' se diverso da nullo nascondo precedente
' riporto vecchio strato a visualizzazione di tutti i solidi If Not IsNothing(Map.refTopPanelVM.SelPart) Then
If m_nLayerIndex > 0 Then dLayerAdvancement = 100 ' riporto vecchio strato a visualizzazione di tutti i solidi
If m_nLayerIndex = 0 Then If m_nLayerIndex > 0 Then dLayerAdvancement = 100
For Each Layer In Map.refTopPanelVM.SelPart.LayerList If m_nLayerIndex = 0 Then
EgtSetStatus(Layer.nLayerId, GDB_ST.OFF) For Each Layer In Map.refTopPanelVM.SelPart.LayerList
Next EgtSetStatus(Layer.nLayerId, GDB_ST.OFF)
ElseIf m_nLayerIndex > 0 Then Next
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.OFF) ElseIf m_nLayerIndex > 0 Then
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.OFF)
End If
End If End If
m_nLayerIndex = value m_nLayerIndex = value
' se diverso da nullo visualizzo corrente ' se diverso da nullo visualizzo corrente
If m_nLayerIndex > 0 Then EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.ON_) If Not IsNothing(Map.refTopPanelVM.SelPart) AndAlso m_nLayerIndex > 0 Then EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.ON_)
' porto barra nuovo strato a 100 ' porto barra nuovo strato a 100
If m_nLayerIndex > 0 Then SetLayerAdvancement(100) If m_nLayerIndex > 0 Then SetLayerAdvancement(100)
Case ViewSliderType.UNTIL_SELECTED Case ViewSliderType.UNTIL_SELECTED
@@ -63,7 +64,6 @@ Public Class SliderManagerVM
End If End If
m_nLayerIndex = value m_nLayerIndex = value
End Select End Select
DisableMgr.ReEnable()
NotifyPropertyChanged(NameOf(ghShowValue)) NotifyPropertyChanged(NameOf(ghShowValue))
NotifyPropertyChanged(NameOf(ghValueIndex)) NotifyPropertyChanged(NameOf(ghValueIndex))
NotifyPropertyChanged(NameOf(ghValueHeight)) NotifyPropertyChanged(NameOf(ghValueHeight))
@@ -71,44 +71,47 @@ Public Class SliderManagerVM
End Set End Set
End Property End Property
Private Sub SetLayerIndex(value As Integer) Private Sub SetLayerIndex(value As Integer)
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
Dim DisableMgr As New DisableModifiedMgr
Select Case m_nSelViewSlider Select Case m_nSelViewSlider
Case ViewSliderType.ONLY_SELECTED Case ViewSliderType.ONLY_SELECTED
' riporto vecchio strato a visualizzazione di tutti i solidi If Not IsNothing(Map.refTopPanelVM.SelPart) Then
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100 ' riporto vecchio strato a visualizzazione di tutti i solidi
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1 If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
If nLayerInd = value - 1 Then For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_) If nLayerInd = value - 1 Then
Else EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF) Else
End If EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
Next End If
Next
End If
m_nLayerIndex = value m_nLayerIndex = value
Case ViewSliderType.UNTIL_SELECTED Case ViewSliderType.UNTIL_SELECTED
' riporto vecchio strato a visualizzazione di tutti i solidi If Not IsNothing(Map.refTopPanelVM.SelPart) Then
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100 ' riporto vecchio strato a visualizzazione di tutti i solidi
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1 If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
If nLayerInd <= value - 1 Then For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_) If nLayerInd <= value - 1 Then
Else EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF) Else
End If EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
Next End If
Next
End If
m_nLayerIndex = value m_nLayerIndex = value
Case ViewSliderType.FROM_SELECTED Case ViewSliderType.FROM_SELECTED
' riporto vecchio strato a visualizzazione di tutti i solidi If Not IsNothing(Map.refTopPanelVM.SelPart) Then
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100 ' riporto vecchio strato a visualizzazione di tutti i solidi
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1 If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
If nLayerInd >= value - 1 Then For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_) If nLayerInd >= value - 1 Then
Else EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF) Else
End If EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
Next End If
Next
End If
m_nLayerIndex = value m_nLayerIndex = value
End Select End Select
DisableMgr.ReEnable()
NotifyPropertyChanged(NameOf(nLayerIndex)) NotifyPropertyChanged(NameOf(nLayerIndex))
NotifyPropertyChanged(NameOf(ghShowValue)) NotifyPropertyChanged(NameOf(ghShowValue))
NotifyPropertyChanged(NameOf(ghValueIndex)) NotifyPropertyChanged(NameOf(ghValueIndex))
@@ -198,8 +201,6 @@ Public Class SliderManagerVM
Return m_dLayerAdvancement Return m_dLayerAdvancement
End Get End Get
Set(value As Double) Set(value As Double)
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
Dim DisableMgr As New DisableModifiedMgr
Select Case m_nSelViewSlider Select Case m_nSelViewSlider
Case ViewSliderType.ONLY_SELECTED Case ViewSliderType.ONLY_SELECTED
Dim nTotSolid As Integer = 0 Dim nTotSolid As Integer = 0
@@ -246,7 +247,6 @@ Public Class SliderManagerVM
End If End If
m_dLayerAdvancement = value m_dLayerAdvancement = value
End Select End Select
DisableMgr.ReEnable()
EgtDraw() EgtDraw()
End Set End Set
End Property End Property
@@ -335,7 +335,6 @@ Public Class SliderManagerVM
WriteMainPrivateProfileString(S_PRINTING3D, K_VIEWSLIDER, m_nSelViewSlider) WriteMainPrivateProfileString(S_PRINTING3D, K_VIEWSLIDER, m_nSelViewSlider)
' ciclo tutti i layer per nasconderli/mostrarli ' ciclo tutti i layer per nasconderli/mostrarli
If IsNothing(Map.refTopPanelVM.SelPart) OrElse IsNothing(Map.refTopPanelVM.SelPart.LayerList) Then Return If IsNothing(Map.refTopPanelVM.SelPart) OrElse IsNothing(Map.refTopPanelVM.SelPart.LayerList) Then Return
Dim DisableMgr As New DisableModifiedMgr
Select Case m_nSelViewSlider Select Case m_nSelViewSlider
Case ViewSliderType.ONLY_SELECTED Case ViewSliderType.ONLY_SELECTED
For Each Layer In Map.refTopPanelVM.SelPart.LayerList For Each Layer In Map.refTopPanelVM.SelPart.LayerList
@@ -362,7 +361,6 @@ Public Class SliderManagerVM
End If End If
Next Next
End Select End Select
DisableMgr.ReEnable()
' mostro/nascondo slider orizzontale ' mostro/nascondo slider orizzontale
m_LayerAdvancement_Visibility = If(m_nSelViewSlider = ViewSliderType.ONLY_SELECTED, Visibility.Visible, Visibility.Hidden) m_LayerAdvancement_Visibility = If(m_nSelViewSlider = ViewSliderType.ONLY_SELECTED, Visibility.Visible, Visibility.Hidden)
NotifyPropertyChanged(NameOf(LayerAdvancement_Visibility)) NotifyPropertyChanged(NameOf(LayerAdvancement_Visibility))
@@ -484,7 +484,6 @@ Public Class StartMachPanelVM
Friend Sub Dispose() Friend Sub Dispose()
' ripristino frame originale ' ripristino frame originale
EgtSetGridFrame(m_OriginalGridFrame) EgtSetGridFrame(m_OriginalGridFrame)
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
EgtDeselectAll() EgtDeselectAll()
EgtDraw() EgtDraw()
Map.refSceneHostVM.MainScene.SetStatusNull() Map.refSceneHostVM.MainScene.SetStatusNull()
@@ -780,7 +779,6 @@ Public Class StartMachPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneTop(ByVal param As Object) Public Sub CPlaneTop(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.TOP)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -806,7 +804,6 @@ Public Class StartMachPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneFront(ByVal param As Object) Public Sub CPlaneFront(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.FRONT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -832,7 +829,6 @@ Public Class StartMachPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneRight(ByVal param As Object) Public Sub CPlaneRight(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.RIGHT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -858,7 +854,6 @@ Public Class StartMachPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneBack(ByVal param As Object) Public Sub CPlaneBack(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.BACK)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -884,7 +879,6 @@ Public Class StartMachPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneLeft(ByVal param As Object) Public Sub CPlaneLeft(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.LEFT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -910,7 +904,6 @@ Public Class StartMachPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneBottom(ByVal param As Object) Public Sub CPlaneBottom(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return 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.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub End Sub
@@ -937,7 +930,6 @@ Public Class StartMachPanelVM
Public Sub CPlaneElevation(ByVal param As Object) Public Sub CPlaneElevation(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False) ManageInterface(False)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub End Sub
@@ -963,7 +955,6 @@ Public Class StartMachPanelVM
Public Sub CPlaneOrigin(ByVal param As Object) Public Sub CPlaneOrigin(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False) ManageInterface(False)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub End Sub
+2 -4
View File
@@ -25,13 +25,11 @@ Public Class MyStatusBarVM
Set(value As Boolean) Set(value As Boolean)
If Map.refRibPanelVM.bGrid_IsChecked Or Map.refStartMachPanelVM.bGrid_IsChecked Or Map.refShellNumberPanelVM.bGrid_IsChecked Then Return If Map.refRibPanelVM.bGrid_IsChecked Or Map.refStartMachPanelVM.bGrid_IsChecked Or Map.refShellNumberPanelVM.bGrid_IsChecked Then Return
m_bGridVisibility = value m_bGridVisibility = value
OptionModule.m_bGridVisibility = m_bGridVisibility
EgtSetGridShow(value, value) EgtSetGridShow(value, value)
EgtDraw() EgtDraw()
Map.refStartMachPanelVM.NotifyPropertyChanged(NameOf(Map.refStartMachPanelVM.bGrid_IsEnabled))
Map.refRibPanelVM.NotifyPropertyChanged(NameOf(Map.refRibPanelVM.bGrid_IsEnabled)) Map.refRibPanelVM.NotifyPropertyChanged(NameOf(Map.refRibPanelVM.bGrid_IsEnabled))
Map.refStartMachPanelVM.NotifyPropertyChanged(NameOf(Map.refStartMachPanelVM.bGrid_IsEnabled))
Map.refShellNumberPanelVM.NotifyPropertyChanged(NameOf(Map.refShellNumberPanelVM.bGrid_IsEnabled)) Map.refShellNumberPanelVM.NotifyPropertyChanged(NameOf(Map.refShellNumberPanelVM.bGrid_IsEnabled))
Map.refFilledSolidPanelVM.NotifyPropertyChanged(NameOf(Map.refFilledSolidPanelVM.bGrid_IsEnabled))
End Set End Set
End Property End Property
@@ -119,7 +117,7 @@ Public Class MyStatusBarVM
' Installo funzione output testo su status per lua ' Installo funzione output testo su status per lua
EgtSetOutText(m_OutTextCallback) EgtSetOutText(m_OutTextCallback)
' imposto stato di visualizzazione della griglia ' imposto stato di visualizzazione della griglia
m_bGridVisibility = OptionModule.m_bGridVisibility m_bGridVisibility = GetMainPrivateProfileInt(S_GRID, K_SHOWGRID, 1) <> 0
NotifyPropertyChanged(NameOf(bGridVisibility)) NotifyPropertyChanged(NameOf(bGridVisibility))
End Sub End Sub
+2 -2
View File
@@ -264,7 +264,7 @@
</DataTemplate> </DataTemplate>
</DataGridTextColumn.HeaderTemplate> </DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn> </DataGridTextColumn>
<!--<DataGridTextColumn Header="FMin" <DataGridTextColumn Header="FMin"
Binding="{Binding sFMin}" Binding="{Binding sFMin}"
IsReadOnly="True" IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility, Visibility="{Binding DataContext.ColExtend_Visibility,
@@ -276,7 +276,7 @@
MeasureUnit="{Binding DataContext.MmPerMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/> MeasureUnit="{Binding DataContext.MmPerMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate> </DataTemplate>
</DataGridTextColumn.HeaderTemplate> </DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>--> </DataGridTextColumn>
<DataGridTextColumn Binding="{Binding sFTrg}" <DataGridTextColumn Binding="{Binding sFTrg}"
IsReadOnly="True" IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility, Visibility="{Binding DataContext.ColExtend_Visibility,
+1 -5
View File
@@ -962,8 +962,4 @@ Public Class TFSLayer
Return If(dHours > 0, dHours.ToString("00") & ":", "") & If(dHours > 0, dMinutes.ToString("00"), dMinutes.ToString()) & ":" & dSeconds.ToString("00") Return If(dHours > 0, dHours.ToString("00") & ":", "") & If(dHours > 0, dMinutes.ToString("00"), dMinutes.ToString()) & ":" & dSeconds.ToString("00")
End Function End Function
Friend Function ConvertToJsonLayer() As JsonLayer End Class
Return New JsonLayer(nIndex, dLength, dTMin, m_dTTrg, dTMax, dTCurr, m_dTWait, dFCurr, m_dFTrg, m_dFMax, m_dFCurr, dSpeed)
End Function
End Class
+29 -22
View File
@@ -274,27 +274,7 @@ Public Class TopPanelVM
WriteMainPrivateProfileString(S_PRINTING3D, K_CURRMACHINING, value.sGUID.ToString()) WriteMainPrivateProfileString(S_PRINTING3D, K_CURRMACHINING, value.sGUID.ToString())
' imposto selezionata come corrente ' imposto selezionata come corrente
If Not IsNothing(m_SelPart) AndAlso (IsNothing(m_SelMachining) OrElse value.sGUID <> m_SelMachining.sGUID) Then If Not IsNothing(m_SelPart) AndAlso (IsNothing(m_SelMachining) OrElse value.sGUID <> m_SelMachining.sGUID) Then
Dim GeneralCathegory As MachiningCathegory = Map.refTopPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL)
Dim OldSlicingTypeValue As Machining.MPAR_SLICINGTYPE = Nothing
Dim NewSlicingTypeValue As Machining.MPAR_SLICINGTYPE = Nothing
If Not IsNothing(GeneralCathegory) Then
Dim SlicingTypeParam As ComboMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.SLICINGTYPE)
If Not IsNothing(SlicingTypeParam) Then
OldSlicingTypeValue = SlicingTypeParam.SelValue.Id
End If
End If
Map.refCurrMachiningPanelVM.SetCurrMachining(New CurrMachining(m_SelPart.nPartId, value.nIndex)) Map.refCurrMachiningPanelVM.SetCurrMachining(New CurrMachining(m_SelPart.nPartId, value.nIndex))
GeneralCathegory = Map.refTopPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL)
If Not IsNothing(GeneralCathegory) Then
Dim SlicingTypeParam As ComboMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.SLICINGTYPE)
If Not IsNothing(SlicingTypeParam) Then
NewSlicingTypeValue = SlicingTypeParam.SelValue.Id
End If
End If
If IsNothing(OldSlicingTypeValue) OrElse IsNothing(NewSlicingTypeValue) OrElse OldSlicingTypeValue <> NewSlicingTypeValue Then
' aggiorno area di estrusione
CurrentMachine.UpdateExtrusionArea()
End If
End If End If
End If End If
m_SelMachining = value m_SelMachining = value
@@ -626,6 +606,15 @@ Public Class TopPanelVM
' rinomino pezzo e layer ' rinomino pezzo e layer
Dim nPartId As Integer = EgtGetLastPart() Dim nPartId As Integer = EgtGetLastPart()
EgtSetName(nPartId, PART) EgtSetName(nPartId, PART)
'Dim nLayerId As Integer = EgtGetFirstInGroup(nPartId)
'EgtSetName(nLayerId, ORIGINAL_SOLID)
'' Recupero o creo layer ausiliario
'Dim nAuxId As Integer = EgtGetFirstNameInGroup(nPartId, LAY_AUX)
'If Not nAuxId Then
' nAuxId = EgtCreateGroup(nPartId)
' EgtSetName(nAuxId, LAY_AUX)
'End If
' Richiedo posizione origine e offset pezzo ' Richiedo posizione origine e offset pezzo
Dim b3Part As New BBox3d Dim b3Part As New BBox3d
@@ -634,6 +623,24 @@ Public Class TopPanelVM
Dim nRefY As Integer = 1 Dim nRefY As Integer = 1
Dim dPosX As Double = CurrentMachine.b3Tab.DimX / 2 - b3Part.DimX / 2 Dim dPosX As Double = CurrentMachine.b3Tab.DimX / 2 - b3Part.DimX / 2
Dim dPosY As Double = CurrentMachine.b3Tab.DimY / 2 - b3Part.DimY / 2 Dim dPosY As Double = CurrentMachine.b3Tab.DimY / 2 - b3Part.DimY / 2
' Dim Positions = EgtDialogBox( 'Part position on table:', { 'Reference', 'CB:Left,Center,Right'},
' { '', 'CB:Bottom,Middle,Top'},
' { 'X', EgtNumToString( EgtToUiUnits( dPosX), 1)},
' { 'Y', EgtNumToString( EgtToUiUnits( dPosY), 1)})
'Dim ChooseReferenceWndVM As New ChooseReferenceWndVM
'Dim ChooseReferenceWndV As New ChooseReferenceWndV(Application.Current.MainWindow, ChooseReferenceWndVM)
'If Not ChooseReferenceWndV.ShowDialog() Then Return
'Dim gg = ChooseReferenceWndVM.SelReference
'' Aggiungo il box del solido
'Dim nBoxId As Integer = EgtSurftmb(nAuxId, b3Solid, False, GDB_RT.GLOB)
'' posiziono il pezzo al centro
'Dim b3Part As New BBox3d
'EgtGetBBoxGlob(nPartId, GDB_BB.EXACT, b3Part)
'Dim dPosX As Double = (CurrentMachine.b3Tab.DimX() / 2) - (b3Part.DimX() / 2)
'Dim dPosY As Double = (CurrentMachine.b3Tab.DimY() / 2) - (b3Part.DimY() / 2)
' Posiziono il pezzo e aggiorno il suo box ' Posiziono il pezzo e aggiorno il suo box
Dim vtMove As Vector3d = New Point3d(dPosX, dPosY, 0) - b3Part.Min() Dim vtMove As Vector3d = New Point3d(dPosX, dPosY, 0) - b3Part.Min()
@@ -650,7 +657,6 @@ Public Class TopPanelVM
EgtAddMachGroup("3dPrint") EgtAddMachGroup("3dPrint")
EgtSetTable("Tab") EgtSetTable("Tab")
EgtSetTableAreaOffset( 500, 500, 500, 500)
Dim nRawId As Integer = EgtAddRawPart(b3Part.Min, b3Part.DimX, b3Part.DimY, b3Part.DimZ, New Color3d(128, 128, 128, 30)) Dim nRawId As Integer = EgtAddRawPart(b3Part.Min, b3Part.DimX, b3Part.DimY, b3Part.DimZ, New Color3d(128, 128, 128, 30))
EgtAddPartToRawPart(nPartId, b3Part.Min, nRawId) EgtAddPartToRawPart(nPartId, b3Part.Min, nRawId)
@@ -746,7 +752,8 @@ Public Class TopPanelVM
Public Sub Machining() Public Sub Machining()
If IsNothing(m_SelPart) OrElse IsNothing(CurrMachining) Then Return If IsNothing(m_SelPart) OrElse IsNothing(CurrMachining) Then Return
If IsNothing(m_SelMachining) Then If IsNothing(m_SelMachining) Then
MessageBox.Show("Select current Db Machining first!", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation) 'MessageBox.Show("Select current Db Machining first!", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Select current Db Machining first!", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation)
Return Return
End If End If
SelPage = Pages.CURRMACHINING SelPage = Pages.CURRMACHINING
+9 -39
View File
@@ -79,14 +79,6 @@ Public Module CurrentMachine
End Get End Get
End Property End Property
' altezza massima di estrusione impostata in file ini macchina
Private m_dSlicingMaxHeight As Double
Public ReadOnly Property dSlicingMaxHeight As Double
Get
Return m_dSlicingMaxHeight
End Get
End Property
#Region "Init" #Region "Init"
Sub InitCurrentMachine(sMachinesRootDir As String, sMachineName As String) Sub InitCurrentMachine(sMachinesRootDir As String, sMachineName As String)
@@ -105,8 +97,6 @@ Public Module CurrentMachine
m_sMachiningFilePath = sMachinesRootDir & "\" & sMachineName & "\Machinings\Machinings.ini" m_sMachiningFilePath = sMachinesRootDir & "\" & sMachineName & "\Machinings\Machinings.ini"
' impostazione cartella materiali ' impostazione cartella materiali
m_sMaterialFilePath = sMachinesRootDir & "\" & sMachineName & "\Materials\Materials.ini" m_sMaterialFilePath = sMachinesRootDir & "\" & sMachineName & "\Materials\Materials.ini"
' leggo altezza massima estrusione impostata su macchina
m_dSlicingMaxHeight = GetPrivateProfileDouble(S_MACH_PRINTING3D, K_MAX_HEIGHT, 900, m_sMachIniFile)
' Disabilito segnalazione modificato ' Disabilito segnalazione modificato
Dim DisableMgr As New DisableModifiedMgr Dim DisableMgr As New DisableModifiedMgr
' recupero box macchina ' recupero box macchina
@@ -131,7 +121,7 @@ Public Module CurrentMachine
Public Sub CreateMachineTable() Public Sub CreateMachineTable()
' Disabilito segnalazione modificato ' Disabilito segnalazione modificato
Dim DisableMgr As New DisableModifiedMgr Dim DisableMgr As New DisableModifiedMgr
Dim dTabX = b3Tab.DimX() Dim dTabX = b3Tab.DimX
Dim dTabY = b3Tab.DimY() Dim dTabY = b3Tab.DimY()
' Disegno tavola ' Disegno tavola
Dim nTabPartId As Integer = EgtCreateGroup(GDB_ID.ROOT) Dim nTabPartId As Integer = EgtCreateGroup(GDB_ID.ROOT)
@@ -150,38 +140,25 @@ Public Module CurrentMachine
EgtSetInfo(nTabPartId, KEY_MATERIAL_GUID, Map.refTopPanelVM.SelMaterial.sGUID) EgtSetInfo(nTabPartId, KEY_MATERIAL_GUID, Map.refTopPanelVM.SelMaterial.sGUID)
EgtSetInfo(nTabPartId, KEY_MATERIAL_NAME, Map.refTopPanelVM.SelMaterial.sName) EgtSetInfo(nTabPartId, KEY_MATERIAL_NAME, Map.refTopPanelVM.SelMaterial.sName)
End If End If
' creo area di estrusione '' creo area di estrusione
UpdateExtrusionArea() UpdateExtrusionArea()
' imposto dati griglia (primi tre parametri -1 indica tieni i correnti)
EgtSetGridGeoAdv( -1, -1, -1, 0, dTabX, 0, dTabY)
' Ripristino stato segnalazione modifica ' Ripristino stato segnalazione modifica
DisableMgr.ReEnable() DisableMgr.ReEnable()
End Sub 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() Public Sub UpdateExtrusionArea()
Dim DisableMgr As New DisableModifiedMgr
' recupero eventuale vecchia area di estrusione ' recupero eventuale vecchia area di estrusione
Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE) Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE)
Dim nTabLayerId As Integer = EgtGetFirstNameInGroup(nTabPartId, TABLE) Dim nTabLayerId As Integer = EgtGetFirstNameInGroup(nTabPartId, TABLE)
Dim nExtrusionAreaId As Integer = EgtGetFirstNameInGroup(nTabLayerId, EXTRUSION_AREA) Dim nExtrusionAreaId As Integer = EgtGetFirstNameInGroup(nTabLayerId, EXTRUSION_AREA)
If nExtrusionAreaId <> GDB_ID.NULL Then EgtErase(nExtrusionAreaId) If nExtrusionAreaId <> GDB_ID.NULL Then
Dim nExtrusionRectId As Integer = EgtGetFirstNameInGroup(nTabLayerId, EXTRUSION_RECT) ' e la cancello
If nExtrusionRectId <> GDB_ID.NULL Then EgtErase(nExtrusionRectId) EgtErase(nExtrusionAreaId)
End If
' se lavorazione corrente nulla, esco ' se lavorazione corrente nulla, esco
If IsNothing(Map.refTopPanelVM.CurrMachining) Then If IsNothing(Map.refTopPanelVM.CurrMachining) Then Return
DisableMgr.ReEnable()
Return
End If
' se non esiste file dati macchina, esco ' se non esiste file dati macchina, esco
If String.IsNullOrWhiteSpace(m_sMachDataIniFile) Then If String.IsNullOrWhiteSpace(m_sMachDataIniFile) Then Return
DisableMgr.ReEnable()
Return
End If
' recupero tipo di slice ' recupero tipo di slice
Dim sExtrusionType As String = S_VERTICAL Dim sExtrusionType As String = S_VERTICAL
Dim GeneralCathegory As MachiningCathegory = Map.refTopPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL) Dim GeneralCathegory As MachiningCathegory = Map.refTopPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL)
@@ -201,19 +178,12 @@ Public Module CurrentMachine
Dim dExtrXMin = GetPrivateProfileDouble(sExtrusionType, K_MINX, 0, m_sMachDataIniFile) Dim dExtrXMin = GetPrivateProfileDouble(sExtrusionType, K_MINX, 0, m_sMachDataIniFile)
Dim dExtrYMax = GetPrivateProfileDouble(sExtrusionType, K_MAXY, 0, m_sMachDataIniFile) Dim dExtrYMax = GetPrivateProfileDouble(sExtrusionType, K_MAXY, 0, m_sMachDataIniFile)
Dim dExtrYMin = GetPrivateProfileDouble(sExtrusionType, K_MINY, 0, m_sMachDataIniFile) Dim dExtrYMin = GetPrivateProfileDouble(sExtrusionType, K_MINY, 0, m_sMachDataIniFile)
Const AREA_WIDTH As Double = 10 nExtrusionAreaId = EgtCreateRectangle2P(nTabLayerId, New Point3d(dExtrXMin, dExtrYMin, 0), New Point3d(dExtrXMax, dExtrYMax, 0))
Dim nAuxRectId As Integer = EgtCreateRectangle2P(nTabLayerId, New Point3d(dExtrXMin - AREA_WIDTH, dExtrYMin - AREA_WIDTH, 0), New Point3d(dExtrXMax + AREA_WIDTH, dExtrYMax + AREA_WIDTH, 0))
nExtrusionRectId = EgtCreateRectangle2P(nTabLayerId, New Point3d(dExtrXMin, dExtrYMin, 0), New Point3d(dExtrXMax, dExtrYMax, 0))
nExtrusionAreaId = EgtCreateSurfTmByRegion( nTabLayerId, { nAuxRectId, nExtrusionRectId}, EPS_STM)
EgtErase( nAuxRectId)
Dim c3Temp As New Color3d Dim c3Temp As New Color3d
c3Temp.FromColor(System.Drawing.Color.Lime) c3Temp.FromColor(System.Drawing.Color.Lime)
EgtSetColor(nExtrusionAreaId, c3Temp) EgtSetColor(nExtrusionAreaId, c3Temp)
EgtSetName(nExtrusionAreaId, EXTRUSION_AREA) EgtSetName(nExtrusionAreaId, EXTRUSION_AREA)
EgtSetColor(nExtrusionRectId, c3Temp)
EgtSetName(nExtrusionRectId, EXTRUSION_RECT)
m_b3ExtrusionArea = New BBox3d(New Point3d(dExtrXMin, dExtrYMin, 0), New Point3d(dExtrXMax, dExtrYMax, 0)) m_b3ExtrusionArea = New BBox3d(New Point3d(dExtrXMin, dExtrYMin, 0), New Point3d(dExtrXMax, dExtrYMax, 0))
DisableMgr.ReEnable()
EgtDraw() EgtDraw()
End Sub End Sub
-205
View File
@@ -1,205 +0,0 @@
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_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
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 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
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
-14
View File
@@ -115,18 +115,4 @@ Module LuaExec
Return bOk Return bOk
End Function 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 End Module
@@ -35,7 +35,7 @@ Public Class ViewLayerManagerVM
End Sub End Sub
Sub New() Sub New()
' Creo riferimento a questa classe in Map ' Creo riferimento a questa classe in EgtCAM5Map
Map.SetRefViewLayerManagerVM(Me) Map.SetRefViewLayerManagerVM(Me)
m_LayerList = New ObservableCollection(Of ViewLayer)({New ViewLayer(ViewLayer.ViewLayerType.PRINT_SOLID, "Print", True), m_LayerList = New ObservableCollection(Of ViewLayer)({New ViewLayer(ViewLayer.ViewLayerType.PRINT_SOLID, "Print", True),
New ViewLayer(ViewLayer.ViewLayerType.REFERENCE, "Origin Point", True), New ViewLayer(ViewLayer.ViewLayerType.REFERENCE, "Origin Point", True),
@@ -150,8 +150,8 @@ Public Class ViewLayer
End Sub End Sub
Friend Sub UpdateVisibility(bIsVisible As Boolean) Friend Sub UpdateVisibility(bIsVisible As Boolean)
Dim DisableMgr As New DisableModifiedMgr ' Disabilito segnalazione modificato
' se solidi Dim DisableMgr As New DisableModifiedMgr ' se solidi
If m_Type = ViewLayerType.SOLID_SLICE Then If m_Type = ViewLayerType.SOLID_SLICE Then
If Map.refSceneHostVM.MainController.GetStep() = 0 Then If Map.refSceneHostVM.MainController.GetStep() = 0 Then
' aggiorno parametro di calcolo solidi sui pezzi ' aggiorno parametro di calcolo solidi sui pezzi
@@ -242,6 +242,7 @@ Public Class ViewLayer
Next Next
Next Next
End If End If
' Ripristino stato segnalazione modifica
DisableMgr.ReEnable() DisableMgr.ReEnable()
End Sub End Sub
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" /> <package id="Ionic.Zip" version="1.9.1.8" targetFramework="net472" />
</packages> </packages>