Compare commits
72 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 21ff4be8ec | |||
| 228a751335 | |||
| d5188fcd96 | |||
| 1b131fd781 | |||
| 6f1ea25aaa | |||
| 6d18e9eba5 | |||
| bd43571e10 | |||
| 757c4d7b6f | |||
| 251ae061f1 | |||
| f0eec3b4da | |||
| b529aa7e99 | |||
| dd31c112a6 | |||
| 738945927b | |||
| 6827c7f971 | |||
| 7abeca0815 | |||
| c758f5474e | |||
| 99750342ad | |||
| dfb555c7ea | |||
| 429e82e349 | |||
| c1a0d1267e | |||
| efbc378b9e | |||
| 60323f2929 | |||
| da1e7b8104 | |||
| b8fdd83f88 | |||
| 5a3a36c02d | |||
| e65a5a7b4b | |||
| 4e80a94013 | |||
| 98f9a3917c | |||
| a737a9313d | |||
| 1f94bff09b | |||
| 849b5e6f45 | |||
| 0a77a8e32f | |||
| 084a71bf54 | |||
| bdc26a0bf6 | |||
| ca32de50f0 | |||
| a0d7687214 | |||
| 412c3c4b5d | |||
| 90b1fa9221 | |||
| 11704fa33d | |||
| 97442a5d65 | |||
| 4f1a9b8938 | |||
| c96c3ef581 | |||
| fdf33ef796 | |||
| a599fde07a | |||
| 7267b77522 | |||
| 1ebf4a3f54 | |||
| 4b85c118cd | |||
| 53a79186c9 | |||
| 4d37978789 | |||
| 12081cec28 | |||
| 109feeb6f7 | |||
| da0bcbac69 | |||
| 27a54b0034 | |||
| c1aee47e53 | |||
| 93b573f1f0 | |||
| e19c3bf83d | |||
| 63fa6ba9b8 | |||
| e59d50923b | |||
| e5fca60809 | |||
| 91582b4ab9 | |||
| f7631e5201 | |||
| 4604ae3558 | |||
| 624eb0566f | |||
| f45efb2310 | |||
| c32bfd55d0 | |||
| db65ef9e15 | |||
| d2a6a27200 | |||
| 6bad0e177f | |||
| 667b8fde7c | |||
| 48d0063167 | |||
| 13d89a3857 | |||
| df7bb978b8 |
@@ -18,12 +18,24 @@ Public Class AboutBoxV
|
||||
Dim sLeftDays As String = ""
|
||||
Dim nLeftDays As Integer
|
||||
If EgtGetKeyLeftDays(nLeftDays) AndAlso nLeftDays < 500 Then sLeftDays = " (" & nLeftDays.ToString() & ")"
|
||||
Dim sAssStatus As String = " discontinued"
|
||||
Dim nAssLeftDays As Integer
|
||||
If EgtGetKeyAssLeftDays( nAssLeftDays) And nAssLeftDays >= 0 Then
|
||||
If nAssLeftDays > 30 then
|
||||
sAssStatus = "expires within " & nAssLeftDays.ToString() & " days"
|
||||
Else If nAssLeftDays > 0 then
|
||||
sAssStatus = "to be renewed within " & nAssLeftDays.ToString() & " days"
|
||||
Else
|
||||
sAssStatus = "to be renewed by today"
|
||||
End If
|
||||
End If
|
||||
sInfo = If(EgtIsDebug(), "*** Debug Libraries ***" & Environment.NewLine, "")
|
||||
sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName &
|
||||
" Inst" & Map.refMainWindowVM.MainWindowM.nInstance.ToString() &
|
||||
" Ulv" & Map.refMainWindowVM.MainWindowM.nUserLevel.ToString() &
|
||||
" Dbg" & Map.refMainWindowVM.MainWindowM.DebugLevel().ToString() & Environment.NewLine
|
||||
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
|
||||
sInfo &= "Maintenance plan " & sAssStatus & Environment.NewLine
|
||||
sInfo &= "DataRoot " & Map.refMainWindowVM.MainWindowM.sDataRoot & Environment.NewLine
|
||||
sInfo &= "MachinesRoot " & Map.refMainWindowVM.MainWindowM.sMachinesRoot & Environment.NewLine
|
||||
Dim sOpSys As String = String.Empty
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
Public Const TABLE = "Table"
|
||||
Public Const TABLE_OUTLINE = "TableOutline"
|
||||
Public Const EXTRUSION_AREA = "ExtrusionArea"
|
||||
Public Const EXTRUSION_RECT = "ExtrusionRect"
|
||||
Public Const PART = "Part"
|
||||
Public Const PRINT_SOLID = "PrintSolid"
|
||||
Public Const LAY_MACH_START = "MachStart"
|
||||
@@ -67,6 +68,7 @@
|
||||
Public Const MAT_KW = "KW"
|
||||
Public Const MAT_KZ = "KZ"
|
||||
Public Const MAT_KN = "KN"
|
||||
Public Const MAT_TDRYER = "TDRYER"
|
||||
Public Const MAT_ORIG = "Orig"
|
||||
|
||||
' parametri Lavorazione
|
||||
@@ -89,8 +91,10 @@
|
||||
Public Const MAC_LINKTYPE = "LinkType"
|
||||
Public Const MAC_LINKPARAM = "LinkParam"
|
||||
Public Const MAC_LINKZUP = "LinkZup"
|
||||
Public Const MAC_INNERSHELLWIDTH = "InnerStrandW"
|
||||
Public Const MAC_OFFSETLEADPOINT = "OffsetLeadPoint"
|
||||
Public Const MAC_LEADIN = "LeadIn"
|
||||
Public Const MAC_SINGLELEADIN = "SingleLeadIn"
|
||||
Public Const MAC_LEADINTANGDIST = "LeadInTangDist"
|
||||
Public Const MAC_LEADINORTHODIST = "LeadInOrthoDist"
|
||||
Public Const MAC_LEADOUT = "LeadOut"
|
||||
@@ -100,6 +104,7 @@
|
||||
Public Const MAC_COASTINGFEEDPU = "CoastingFeedPu"
|
||||
Public Const MAC_WIPELEN = "WipeLen"
|
||||
Public Const MAC_WIPEFEEDPU = "WipeFeedPu"
|
||||
Public Const MAC_SPIRALVASELEN = "SpiralVaseLen"
|
||||
Public Const MAC_WIPEDIR = "WipeDir"
|
||||
Public Const MAC_FLOORCOUNT = "FloorCount"
|
||||
Public Const MAC_G0FEED = "G0Feed"
|
||||
@@ -108,10 +113,17 @@
|
||||
Public Const MAC_PREFLOWDELAY = "PreFlowDelay"
|
||||
Public Const MAC_POSTFLOWDELAY = "PostFlowDelay"
|
||||
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_RIBSOVERLAP = "RibsOverlap"
|
||||
Public Const MAC_RIBSSTRANDOVERLAP = "RibsStrandOverlap"
|
||||
Public Const MAC_RIBSSTRANDCOUNT = "RibsStrandCount"
|
||||
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_RIBSINVERTDIRECTION = "RibsInvertDirection"
|
||||
Public Const MAC_RIBSINVERTSTRANDORDER = "RibsInvertStrandOrder"
|
||||
@@ -122,20 +134,45 @@
|
||||
Public Const MAC_RIBSLEADOUTCOASTING = "RibsLeadOutCoasting"
|
||||
Public Const MAC_RIBSLEADOUTWIPE = "RibsLeadOutWipe"
|
||||
Public Const MAC_RIBSLEADOUTWIPEDIR = "RibsLeadOutWipeDir"
|
||||
Public Const MAC_RIBSLEADFILLET = "RibsLeadFillet"
|
||||
Public Const MAC_RIBSLIMITUNBOUNDEDWITHSOLID = "LimitUnboundedRibsWithSolid"
|
||||
Public Const MAC_SHELLNBRDIFFERENCE = "ShellNbrDifference"
|
||||
Public Const MAC_SHELLNBRCOASTING = "ShellNbrCoasting"
|
||||
Public Const MAC_SHELLNBRWIPE = "ShellNbrWipe"
|
||||
Public Const MAC_SHELLNBRWIPEDIR = "ShellNbrWipeDir"
|
||||
Public Const MAC_AUXSOLIDSSTRANDWIDTH = "AuxSolidsStrandW"
|
||||
Public Const MAC_AUXSOLIDSOVERLAP = "AuxSolidsOverlap"
|
||||
Public Const MAC_AUXSOLIDSINFILL = "AuxSolidsInfill"
|
||||
Public Const MAC_AUXSOLIDSINFILLLINK = "AuxSolidsInfillLink"
|
||||
Public Const MAC_AUXSOLIDSSTRANDCOUNT = "AuxSolidsStrandCount"
|
||||
Public Const MAC_AUXSOLIDSSTRANDORDER = "AuxSolidsStrandOrder"
|
||||
Public Const MAC_AUXSOLIDSLINKTYPE = "AuxSolidsLinkType"
|
||||
Public Const MAC_AUXSOLIDSLINKPARAM = "AuxSolidsLinkParam"
|
||||
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_AUXSOLIDSWIPELEN = "AuxSolidsWipeLen"
|
||||
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_PRINTORDER = "PrintOrder"
|
||||
Public Const MAC_CONSTANT = "Constant"
|
||||
|
||||
@@ -21,6 +21,7 @@ Public Module ConstGen
|
||||
' File con dati di licenza
|
||||
Public Const LIC_FILE_NAME As String = "Icarus.lic"
|
||||
Public Const S_LICENCE As String = "Licence"
|
||||
Public Const K_LOCKID As String = "LockId"
|
||||
Public Const K_KEY As String = "Key"
|
||||
Public Const K_NESTKEY As String = "NestKey"
|
||||
|
||||
@@ -52,6 +53,7 @@ Public Module ConstGen
|
||||
' Abilitazioni licenza
|
||||
Friend Enum KEY_OPT As UInteger
|
||||
BASE = 1 ' Prodotto Icarus
|
||||
MACHINE_EXPORT = 2 ' opzione per esportare file icrx per macchina
|
||||
End Enum
|
||||
|
||||
' File di log generale
|
||||
@@ -76,4 +78,7 @@ Public Module ConstGen
|
||||
' Nome file Lua con le funzioni di attrezzaggio
|
||||
Public Const SETUP_LUA As String = "SetUp.lua"
|
||||
|
||||
' Chiave di Info in gruppo di lavoro per attivazione Virtual Milling
|
||||
Public Const KEY_MCHGRP_VM As String = "Vm"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -26,8 +26,10 @@ Public Module ConstIni
|
||||
'Public Const K_MESSAGES As String = "Messages"
|
||||
'Public Const K_WINPLACE As String = "WinPlace"
|
||||
'Public Const K_LASTPROJ As String = "LastProj"
|
||||
Public Const K_NETKEY As String = "NetKey"
|
||||
Public Const K_LASTNGEDIR As String = "LastNgeDir"
|
||||
Public Const K_LASTIMPDIR As String = "LastImpDir"
|
||||
Public Const K_MACHINEEXPORT As String = "MachineExport"
|
||||
'Public Const K_SUPPORT As String = "Support"
|
||||
|
||||
'Public Const S_LANGUAGES As String = "Languages"
|
||||
@@ -101,11 +103,15 @@ Public Module ConstIni
|
||||
Public Const K_DXFSCALE As String = "DxfScale"
|
||||
Public Const K_STLSCALE As String = "StlScale"
|
||||
Public Const K_CNCFLAG As String = "CncFlag"
|
||||
Public Const K_ADVFLAG As String = "AdvFlag"
|
||||
Public Const K_ADVTOLER As String = "AdvToler"
|
||||
|
||||
'Public Const S_SIMUL As String = "Simul"
|
||||
'Public Const K_SLIDERX As String = "SliderX"
|
||||
'Public Const K_SLIDERVAL As String = "SliderVal"
|
||||
Public Const K_MACHVIEWMODE As String = "MachViewMode"
|
||||
Public Const K_VIRTUALADDITIVE As String = "VirtualAdditive"
|
||||
Public Const K_TRACEENABLE As String = "TraceEnable"
|
||||
|
||||
Public Const S_PRINTING3D As String = "3dPrinting"
|
||||
Public Const K_3PRNBASEDIR As String = "BaseDir"
|
||||
@@ -114,6 +120,9 @@ Public Module ConstIni
|
||||
Public Const K_VIEWSLIDER As String = "ViewSlider"
|
||||
Public Const K_IMPORTCURREXTENSION As String = "ImportCurrExtension"
|
||||
|
||||
Public Const S_SOLIDS As String = "Solids"
|
||||
Public Const K_SIMPLIFIEDSECTION As String = "SimplifiedSection"
|
||||
|
||||
Public Const S_COLORS As String = "Colors"
|
||||
Public Const K_CLR_PRINTPART As String = "PrintPart"
|
||||
Public Const K_CLR_RIBS As String = "Ribs"
|
||||
|
||||
@@ -26,6 +26,7 @@ Public Module ConstMachDataIni
|
||||
Public Const S_45DEGX As String = "45DegX"
|
||||
Public Const S_45DEGY As String = "45DegY"
|
||||
Public Const S_HORIZONTAL As String = "Horizontal"
|
||||
Public Const S_MULTIPLANAR As String = "MultiPlanar"
|
||||
Public Const K_MINX As String = "MinX"
|
||||
Public Const K_MAXX As String = "MaxX"
|
||||
Public Const K_MINY As String = "MinY"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Public Module ConstMachIni
|
||||
|
||||
Public Const MACH_INI_FILE_NAME As String = "MachData.ini"
|
||||
Public Const S_GENERAL As String = "General"
|
||||
Public Const K_GEN_STD_VIEW As String = "StandardView"
|
||||
|
||||
Public Const S_MACHINING As String = "Machining"
|
||||
Public Const K_MACH_INITSCRIPT As String = "InitScript"
|
||||
@@ -8,9 +9,17 @@
|
||||
|
||||
Public Const S_MACH_PRINTING3D As String = "3dPrinting"
|
||||
Public Const K_SLICINGTYPE As String = "SlicingType"
|
||||
Public Const K_NEWSLICINGTYPE As String = "NewSlicingType"
|
||||
Public Const K_SPEED_MIN As String = "SpeedMin"
|
||||
Public Const K_SPEED_MAX As String = "SpeedMax"
|
||||
Public Const K_MAX_HEIGHT As String = "HMax"
|
||||
|
||||
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
|
||||
|
||||
@@ -106,11 +106,12 @@ Public Class CurrMachining
|
||||
Else
|
||||
m_nIndex = 0
|
||||
End If
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.GENERAL, nPartId, m_nIndex, False))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.LINK, 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.AUX_SOLID, nPartId, m_nIndex, False))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.GENERAL, nPartId, m_nIndex, False, Me))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.LINK, nPartId, m_nIndex, False, Me))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, False, Me))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, False, Me))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, False, Me))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.INFILL, nPartId, m_nIndex, False, Me))
|
||||
For Each Cathegory In m_CathegoryList
|
||||
For Each MachiningParam In Cathegory.MachiningParamList
|
||||
AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged
|
||||
@@ -123,11 +124,12 @@ Public Class CurrMachining
|
||||
' ricavo lavorazione da lista
|
||||
Dim CurrMachiningInDb As MachiningIndex = Map.refTopPanelVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
|
||||
m_sCurrGUID = CurrMachiningInDb.sGUID
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.GENERAL, nPartId, m_nIndex, True))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.LINK, 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.AUX_SOLID, nPartId, m_nIndex, True))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.GENERAL, nPartId, m_nIndex, True, Me))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.LINK, nPartId, m_nIndex, True, Me))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, True, Me))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, True, Me))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, True, Me))
|
||||
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.INFILL, nPartId, m_nIndex, True, Me))
|
||||
For Each Cathegory In m_CathegoryList
|
||||
For Each MachiningParam In Cathegory.MachiningParamList
|
||||
AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged
|
||||
@@ -194,8 +196,9 @@ End Class
|
||||
Public Class CurrMachiningCathegory
|
||||
Inherits MachiningCathegory
|
||||
|
||||
Sub New(Type As Cathegories, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean)
|
||||
Sub New(Type As Cathegories, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean, Machining As Machining)
|
||||
m_Type = Type
|
||||
m_Machining = Machining
|
||||
Select Case m_Type
|
||||
Case Cathegories.GENERAL
|
||||
m_sName = "General"
|
||||
@@ -209,7 +212,6 @@ Public Class CurrMachiningCathegory
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.STARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrComboMachiningParam(MachiningParam.Params.STRANDORDER, 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.G0FEEDZ, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.LINKZUP, nPartId, nIndex, bForceFromDb, Me),
|
||||
@@ -219,30 +221,40 @@ Public Class CurrMachiningCathegory
|
||||
New CurrOrderedMachiningParam(MachiningParam.Params.PRINT_ORDER, 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.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
|
||||
m_sName = "Shell"
|
||||
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.LINKTYPE, nPartId, nIndex, bForceFromDb, Me),
|
||||
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.INNERSHELLWIDTH, 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 CurrComboMachiningParam(MachiningParam.Params.LEADIN, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrCheckMachiningParam(MachiningParam.Params.SINGLELEADIN, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.LEADINTANGDIST, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.LEADINORTHODIST, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.OFFSETLEADPOINT, 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.LEADOUTORTHODIST, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGLEN, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGFEED_PC, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.WIPELEN, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.WIPEFEED_PC, nPartId, nIndex, bForceFromDb, Me)})
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.WIPEFEED_PC, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.SPIRALVASELEN, nPartId, nIndex, bForceFromDb, Me)})
|
||||
'New CurrNumericMachiningParam(MachiningParam.Params.WIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
|
||||
Case Cathegories.RIBS
|
||||
m_sName = "Ribs"
|
||||
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.RIBSTYPE, nPartId, nIndex, bForceFromDb, Me),
|
||||
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDWIDTH, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrComboMachiningParam(MachiningParam.Params.RIBSTYPE, 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.RIBSSTRANDOVERLAP, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, 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.RIBSINVERTDIRECTION, nPartId, nIndex, bForceFromDb, Me),
|
||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nPartId, nIndex, bForceFromDb, Me),
|
||||
@@ -252,7 +264,8 @@ Public Class CurrMachiningCathegory
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, 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.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
|
||||
m_sName = "Reduce Shell Number"
|
||||
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nPartId, nIndex, bForceFromDb, Me),
|
||||
@@ -261,15 +274,42 @@ Public Class CurrMachiningCathegory
|
||||
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
|
||||
Case Cathegories.AUX_SOLID
|
||||
m_sName = "Filled Solid"
|
||||
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nPartId, nIndex, bForceFromDb, Me),
|
||||
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDWIDTH, 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.AUXSOLIDSLINKTYPE, 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.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.AUXSOLIDSWIPELEN, 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
|
||||
' verifico dipendenze tra parametri
|
||||
Select Case m_Type
|
||||
@@ -278,6 +318,11 @@ Public Class CurrMachiningCathegory
|
||||
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
||||
MachiningParam.ManageDependencyParam()
|
||||
Next
|
||||
For Each Param In {MachiningParam.Params.SPIRALVASE}
|
||||
Dim GeneralCathegory As MachiningCathegory = Machining.CathegoryList.FirstOrDefault(Function(z) z.Type = Cathegories.GENERAL)
|
||||
Dim MachiningParam As CheckMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
||||
MachiningParam.ManageDependencyParam(Me)
|
||||
Next
|
||||
Case Cathegories.RIBS
|
||||
For Each Param In {MachiningParam.Params.RIBSTYPE}
|
||||
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
||||
@@ -288,6 +333,19 @@ Public Class CurrMachiningCathegory
|
||||
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
|
||||
MachiningParam.ManageDependencyParam()
|
||||
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 Sub
|
||||
|
||||
@@ -310,7 +368,7 @@ Public Class CurrNumericMachiningParam
|
||||
|
||||
Public Overrides Property sValue As String
|
||||
Get
|
||||
Return If(m_bIsLen, LenToString(m_dValue, 1), DoubleToString(m_dValue, 2))
|
||||
Return If(m_bIsLen, LenToString(m_dValue, 2), DoubleToString(m_dValue, 2))
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dTempValue As Double = 0
|
||||
@@ -320,14 +378,32 @@ Public Class CurrNumericMachiningParam
|
||||
StringToDouble(value, dTempValue)
|
||||
End If
|
||||
If m_bIsActiveMinMax Then
|
||||
If dTempValue >= m_dMinValue AndAlso dTempValue <= m_dMaxValue Then
|
||||
m_dValue = dTempValue
|
||||
If m_MinMaxType = MinMaxTypes.ABSOLUT Then
|
||||
If dTempValue >= m_dMinValue AndAlso dTempValue <= m_dMaxValue Then
|
||||
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
|
||||
Else
|
||||
m_dValue = dTempValue
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(sValue))
|
||||
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
|
||||
ManageDependencyParam()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -375,6 +451,9 @@ Public Class CurrNumericMachiningParam
|
||||
Case Params.LINKZUP
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_LINKZUP, m_dValue)
|
||||
m_bIsLen = True
|
||||
Case Params.INNERSHELLWIDTH
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_INNERSHELLWIDTH, m_dValue)
|
||||
m_bIsLen = True
|
||||
Case Params.OFFSETLEADPOINT
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_OFFSETLEADPOINT, m_dValue)
|
||||
m_bIsLen = True
|
||||
@@ -402,6 +481,9 @@ Public Class CurrNumericMachiningParam
|
||||
Case Params.WIPEFEED_PC
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_WIPEFEEDPU, m_dValue)
|
||||
m_bIsLen = False
|
||||
Case Params.SPIRALVASELEN
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SPIRALVASELEN, m_dValue)
|
||||
m_bIsLen = True
|
||||
'Case Params.WIPEDIR
|
||||
' bReadFromPart = EgtGetInfo(nPartId, MAC_WIPEDIR, m_dValue)
|
||||
' m_bIsLen = True
|
||||
@@ -419,19 +501,34 @@ Public Class CurrNumericMachiningParam
|
||||
m_bIsLen = True
|
||||
Case Params.PREFLOWDELAY
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_PREFLOWDELAY, m_dValue)
|
||||
m_bIsLen = True
|
||||
m_bIsLen = False
|
||||
Case Params.POSTFLOWDELAY
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_POSTFLOWDELAY, m_dValue)
|
||||
m_bIsLen = True
|
||||
m_bIsLen = False
|
||||
Case Params.SCREWBACK
|
||||
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
|
||||
Case Params.RIBSOVERLAP
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSOVERLAP, m_dValue)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSSTRANDOVERLAP
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSSTRANDOVERLAP, m_dValue)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSSTRANDCOUNT
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSSTRANDCOUNT, m_dValue)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSLINKFILLET
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLINKFILLET, m_dValue)
|
||||
m_bIsLen = True
|
||||
Case Params.RIBSLEADINLEN
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADINLEN, m_dValue)
|
||||
m_bIsLen = True
|
||||
@@ -447,6 +544,9 @@ Public Class CurrNumericMachiningParam
|
||||
Case Params.RIBSLEADOUTWIPEDIR
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTWIPEDIR, m_dValue)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSLEADFILLET
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADFILLET, m_dValue)
|
||||
m_bIsLen = True
|
||||
Case Params.SHELLNBRDIFFERENCE
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SHELLNBRDIFFERENCE, m_dValue)
|
||||
m_bIsLen = False
|
||||
@@ -459,15 +559,39 @@ Public Class CurrNumericMachiningParam
|
||||
Case Params.SHELLNBRWIPEDIR
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SHELLNBRWIPEDIR, m_dValue)
|
||||
m_bIsLen = False
|
||||
Case Params.AUXSOLIDSSTRANDWIDTH
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDWIDTH, m_dValue)
|
||||
m_bIsLen = True
|
||||
Case Params.AUXSOLIDSOVERLAP
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, m_dValue)
|
||||
m_bIsLen = False
|
||||
Case Params.AUXSOLIDSLINKPARAM
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, m_dValue)
|
||||
m_bIsLen = True
|
||||
Case Params.AUXSOLIDSSTRANDCOUNT
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDCOUNT, m_dValue)
|
||||
m_bIsLen = False
|
||||
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dValue)
|
||||
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
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, m_dValue)
|
||||
m_bIsLen = True
|
||||
@@ -480,27 +604,66 @@ Public Class CurrNumericMachiningParam
|
||||
Case Params.FLOWRATE_PC
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_CONSTANT, m_dValue)
|
||||
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
|
||||
m_dOrigValue = m_dValue
|
||||
If nIndex > 0 Then
|
||||
Dim DbMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
|
||||
Select Case Type
|
||||
Case Params.STRANDH, Params.STRANDW, Params.STRANDCOUNT, Params.OFFSET, Params.STRANDOVERLAP, Params.STARTPOINTOFFSETONSLICE,
|
||||
Params.FLOORCOUNT, Params.G0FEED, Params.G0FEEDZ, Params.LINKZUP, Params.TOOLDIAM, Params.FLOWRATE_PC, Params.PREFLOWDELAY, Params.POSTFLOWDELAY, Params.SCREWBACK
|
||||
Params.G0FEED, Params.G0FEEDZ, Params.LINKZUP, Params.TOOLDIAM, Params.FLOWRATE_PC, Params.PREFLOWDELAY, Params.POSTFLOWDELAY, Params.SCREWBACK, Params.SLICINGHEIGHT, Params.MAXSLICESNUMBER
|
||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||
Case Params.LINKPARAM, Params.OFFSETLEADPOINT, Params.LEADINTANGDIST, Params.LEADINORTHODIST,
|
||||
Case Params.LINKPARAM, Params.INNERSHELLWIDTH, Params.OFFSETLEADPOINT, Params.LEADINTANGDIST, Params.LEADINORTHODIST,
|
||||
Params.LEADOUTTANGDIST, Params.LEADOUTORTHODIST, Params.COASTINGLEN, Params.COASTINGFEED_PC,
|
||||
Params.WIPELEN, Params.WIPEFEED_PC ' Params.WIPEDIR
|
||||
Params.WIPELEN, Params.WIPEFEED_PC, Params.SPIRALVASELEN, Params.SINGLELEADIN ' Params.WIPEDIR
|
||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.LINK).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||
Case Params.RIBSOVERLAP, Params.RIBSSTRANDCOUNT, Params.RIBSLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION,
|
||||
Case Params.RIBSSTRANDWIDTH, Params.RIBSOVERLAP, Params.RIBSSTRANDOVERLAP, Params.RIBSSTRANDCOUNT, Params.RIBSLINK, Params.RIBSLINKFILLET, Params.RIBSMERGEWITHSHELL, Params.RIBSINVERTMERGEDSHELLMAINLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION,
|
||||
Params.RIBSLEADININVERT, Params.RIBSLEADINLEN, Params.RIBSLEADOUTINVERT, Params.RIBSLEADOUTLEN, Params.RIBSLEADOUTCOASTING,
|
||||
Params.RIBSLEADOUTWIPE, Params.RIBSLEADOUTWIPEDIR
|
||||
Params.RIBSLEADOUTWIPE, Params.RIBSLEADOUTWIPEDIR, Params.RIBSLEADFILLET
|
||||
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
|
||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.SHELL_NUMBER).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||
Case Params.AUXSOLIDSOVERLAP, Params.AUXSOLIDSLINKPARAM, Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE,
|
||||
Params.AUXSOLIDSCOASTINGLEN, Params.AUXSOLIDSWIPELEN, Params.AUXSOLIDSWIPEDIR
|
||||
Case Params.AUXSOLIDSSTRANDWIDTH, Params.AUXSOLIDSOVERLAP, Params.AUXSOLIDSLINKPARAM, Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE,
|
||||
Params.AUXSOLIDSOFFSETLEADPOINT, Params.AUXSOLIDSDENSITY, Params.AUXSOLIDSGRIDOVERLAP,
|
||||
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)
|
||||
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
|
||||
If bForceFromDb OrElse Not bReadFromPart Then
|
||||
m_dValue = m_DbParam.dOrigValue
|
||||
@@ -539,6 +702,8 @@ Public Class CurrNumericMachiningParam
|
||||
EgtSetInfo(nPartId, MAC_LINKPARAM, sWriteValue)
|
||||
Case Params.LINKZUP
|
||||
EgtSetInfo(nPartId, MAC_LINKZUP, sWriteValue)
|
||||
Case Params.INNERSHELLWIDTH
|
||||
EgtSetInfo(nPartId, MAC_INNERSHELLWIDTH, sWriteValue)
|
||||
Case Params.OFFSETLEADPOINT
|
||||
EgtSetInfo(nPartId, MAC_OFFSETLEADPOINT, sWriteValue)
|
||||
Case Params.LEADINTANGDIST
|
||||
@@ -557,6 +722,8 @@ Public Class CurrNumericMachiningParam
|
||||
EgtSetInfo(nPartId, MAC_WIPELEN, sWriteValue)
|
||||
Case Params.WIPEFEED_PC
|
||||
EgtSetInfo(nPartId, MAC_WIPEFEEDPU, sWriteValue)
|
||||
Case Params.SPIRALVASELEN
|
||||
EgtSetInfo(nPartId, MAC_SPIRALVASELEN, sWriteValue)
|
||||
'Case Params.WIPEDIR
|
||||
' EgtSetInfo(nPartId, MAC_WIPEDIR, sWriteValue)
|
||||
Case Params.FLOORCOUNT
|
||||
@@ -573,10 +740,20 @@ Public Class CurrNumericMachiningParam
|
||||
EgtSetInfo(nPartId, MAC_POSTFLOWDELAY, sWriteValue)
|
||||
Case Params.SCREWBACK
|
||||
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
|
||||
EgtSetInfo(nPartId, MAC_RIBSOVERLAP, sWriteValue)
|
||||
Case Params.RIBSSTRANDOVERLAP
|
||||
EgtSetInfo(nPartId, MAC_RIBSSTRANDOVERLAP, sWriteValue)
|
||||
Case Params.RIBSSTRANDCOUNT
|
||||
EgtSetInfo(nPartId, MAC_RIBSSTRANDCOUNT, sWriteValue)
|
||||
Case Params.RIBSLINKFILLET
|
||||
EgtSetInfo(nPartId, MAC_RIBSLINKFILLET, sWriteValue)
|
||||
Case Params.RIBSLEADINLEN
|
||||
EgtSetInfo(nPartId, MAC_RIBSLEADINLEN, sWriteValue)
|
||||
Case Params.RIBSLEADOUTLEN
|
||||
@@ -587,6 +764,8 @@ Public Class CurrNumericMachiningParam
|
||||
EgtSetInfo(nPartId, MAC_RIBSLEADOUTWIPE, sWriteValue)
|
||||
Case Params.RIBSLEADOUTWIPEDIR
|
||||
EgtSetInfo(nPartId, MAC_RIBSLEADOUTWIPEDIR, sWriteValue)
|
||||
Case Params.RIBSLEADFILLET
|
||||
EgtSetInfo(nPartId, MAC_RIBSLEADFILLET, sWriteValue)
|
||||
Case Params.SHELLNBRDIFFERENCE
|
||||
EgtSetInfo(nPartId, MAC_SHELLNBRDIFFERENCE, sWriteValue)
|
||||
Case Params.SHELLNBRCOASTING
|
||||
@@ -595,12 +774,28 @@ Public Class CurrNumericMachiningParam
|
||||
EgtSetInfo(nPartId, MAC_SHELLNBRWIPE, sWriteValue)
|
||||
Case Params.SHELLNBRWIPEDIR
|
||||
EgtSetInfo(nPartId, MAC_SHELLNBRWIPEDIR, sWriteValue)
|
||||
Case Params.AUXSOLIDSSTRANDWIDTH
|
||||
EgtSetInfo(nPartId, MAC_AUXSOLIDSSTRANDWIDTH, sWriteValue)
|
||||
Case Params.AUXSOLIDSSTRANDCOUNT
|
||||
EgtSetInfo(nPartId, MAC_AUXSOLIDSSTRANDCOUNT, sWriteValue)
|
||||
Case Params.AUXSOLIDSOVERLAP
|
||||
EgtSetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, sWriteValue)
|
||||
Case Params.AUXSOLIDSLINKPARAM
|
||||
EgtSetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, sWriteValue)
|
||||
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
|
||||
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
|
||||
EgtSetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue)
|
||||
Case Params.AUXSOLIDSWIPELEN
|
||||
@@ -609,6 +804,28 @@ Public Class CurrNumericMachiningParam
|
||||
EgtSetInfo(nPartId, MAC_AUXSOLIDSWIPEDIR, sWriteValue)
|
||||
Case Params.FLOWRATE_PC
|
||||
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 Sub
|
||||
|
||||
@@ -750,17 +967,15 @@ Public Class CurrComboMachiningParam
|
||||
Dim bReadFromPart As Boolean = False
|
||||
Select Case Type
|
||||
Case Params.SLICINGTYPE
|
||||
Dim nSlicingType As Integer = GetPrivateProfileInt(S_MACH_PRINTING3D, K_SLICINGTYPE, 0, CurrentMachine.sMachIniFile)
|
||||
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_SLICINGTYPE.VERTICAL, "Vertical")})
|
||||
If nSlicingType >= 1 Then
|
||||
m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45, "45deg X"))
|
||||
If nSlicingType >= 2 Then
|
||||
m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45_Y, "45deg Y"))
|
||||
If nSlicingType >= 3 Then
|
||||
m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.HORIZONTAL, "Horizontal"))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Dim nNewSlicingType As Integer = CurrentMachine.GetSlicingType()
|
||||
m_ValueList = New List(Of IdNameStruct)
|
||||
If (nNewSlicingType And 1) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.VERTICAL, "Vertical"))
|
||||
If (nNewSlicingType And 2) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45, "45deg X"))
|
||||
If (nNewSlicingType And 4) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45_Y, "45deg Y"))
|
||||
If (nNewSlicingType And 8) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.HORIZONTAL, "Horizontal"))
|
||||
If (nNewSlicingType And 16) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR, "MultiPlanar"))
|
||||
If (nNewSlicingType And 32) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR_DEG45, "MultiPlanar 45deg"))
|
||||
If (nNewSlicingType And 64) <> 0 Then m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.MULTIPLANAR_HORIZ, "MultiPlanar Horiz"))
|
||||
Dim nSelValue As Integer = 0
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SLICINGTYPE, nSelValue)
|
||||
If Not bReadFromPart Then
|
||||
@@ -811,9 +1026,14 @@ Public Class CurrComboMachiningParam
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSTYPE, nSelValue)
|
||||
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
||||
Case Params.AUXSOLIDSINFILL
|
||||
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL.NONE, "None"),
|
||||
New IdNameStruct(Machining.MPAR_INFILL.OFFSET, "Offset"),
|
||||
New IdNameStruct(Machining.MPAR_INFILL.ZIGZAG, "ZigZag")})
|
||||
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"),
|
||||
New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
|
||||
New IdNameStruct(Machining.MPAR_INFILL_TYPE.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
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSINFILL, nSelValue)
|
||||
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
||||
@@ -836,6 +1056,28 @@ Public Class CurrComboMachiningParam
|
||||
Dim nSelValue As Integer = 0
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_DYNAMICMODE, 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
|
||||
m_OrigSelValue = m_SelValue
|
||||
If nIndex > 0 Then
|
||||
@@ -849,6 +1091,8 @@ Public Class CurrComboMachiningParam
|
||||
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
|
||||
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
|
||||
If bForceFromDb OrElse Not bReadFromPart Then
|
||||
m_SelValue = m_DbParam.OrigSelValue
|
||||
@@ -887,6 +1131,12 @@ Public Class CurrComboMachiningParam
|
||||
EgtSetInfo(nPartId, MAC_AUXSOLIDSLINKTYPE, m_SelValue.Id)
|
||||
Case Params.DYNAMIC_MODE
|
||||
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 Sub
|
||||
|
||||
@@ -937,6 +1187,7 @@ Public Class CurrCheckMachiningParam
|
||||
m_bValue = value
|
||||
NotifyPropertyChanged(NameOf(bValue))
|
||||
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
|
||||
ManageDependencyParam()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -962,8 +1213,14 @@ Public Class CurrCheckMachiningParam
|
||||
Select Case Type
|
||||
Case Params.SPIRALVASE
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SPIRALVASE, m_bValue)
|
||||
Case Params.SINGLELEADIN
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SINGLELEADIN, m_bValue)
|
||||
Case Params.RIBSLINK
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLINK, m_bValue)
|
||||
Case Params.RIBSMERGEWITHSHELL
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSMERGEWITHSHELL, m_bValue)
|
||||
Case Params.RIBSINVERTMERGEDSHELLMAINLINK
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSINVERTMERGEDSHELLMAINLINK, m_bValue)
|
||||
Case Params.RIBSINVERTORDER
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSINVERTORDER, m_bValue)
|
||||
Case Params.RIBSINVERTDIRECTION
|
||||
@@ -976,6 +1233,10 @@ Public Class CurrCheckMachiningParam
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTINVERT, m_bValue)
|
||||
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
|
||||
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
|
||||
m_bOrigValue = m_bValue
|
||||
If nIndex > 0 Then
|
||||
@@ -983,8 +1244,14 @@ Public Class CurrCheckMachiningParam
|
||||
Select Case Type
|
||||
Case Params.SPIRALVASE
|
||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||
Case Params.RIBSLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION, Params.RIBSINVERTSTRANDORDER, Params.RIBSLEADININVERT, Params.RIBSLEADOUTINVERT, Params.RIBSLIMITUNBOUNDEDWITHSOLID
|
||||
Case Params.SINGLELEADIN
|
||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.LINK).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||
Case Params.RIBSLINK, Params.RIBSMERGEWITHSHELL, Params.RIBSINVERTMERGEDSHELLMAINLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION, Params.RIBSINVERTSTRANDORDER, Params.RIBSLEADININVERT, Params.RIBSLEADOUTINVERT, Params.RIBSLIMITUNBOUNDEDWITHSOLID
|
||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||
Case Params.AUXSOLIDSINFILLLINK
|
||||
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
|
||||
If bForceFromDb OrElse Not bReadFromPart Then
|
||||
m_bValue = m_DbParam.bOrigValue
|
||||
@@ -997,8 +1264,14 @@ Public Class CurrCheckMachiningParam
|
||||
Select Case Type
|
||||
Case Params.SPIRALVASE
|
||||
EgtSetInfo(nPartId, MAC_SPIRALVASE, If(m_bValue, 1, 0))
|
||||
Case Params.SINGLELEADIN
|
||||
EgtSetInfo(nPartId, MAC_SINGLELEADIN, If(m_bValue, 1, 0))
|
||||
Case Params.RIBSLINK
|
||||
EgtSetInfo(nPartId, MAC_RIBSLINK, If(m_bValue, 1, 0))
|
||||
Case Params.RIBSMERGEWITHSHELL
|
||||
EgtSetInfo(nPartId, MAC_RIBSMERGEWITHSHELL, If(m_bValue, 1, 0))
|
||||
Case Params.RIBSINVERTMERGEDSHELLMAINLINK
|
||||
EgtSetInfo(nPartId, MAC_RIBSINVERTMERGEDSHELLMAINLINK, If(m_bValue, 1, 0))
|
||||
Case Params.RIBSINVERTORDER
|
||||
EgtSetInfo(nPartId, MAC_RIBSINVERTORDER, If(m_bValue, 1, 0))
|
||||
Case Params.RIBSINVERTDIRECTION
|
||||
@@ -1011,6 +1284,10 @@ Public Class CurrCheckMachiningParam
|
||||
EgtSetInfo(nPartId, MAC_RIBSLEADOUTINVERT, If(m_bValue, 1, 0))
|
||||
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
|
||||
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 Sub
|
||||
|
||||
|
||||
@@ -54,9 +54,16 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Margin="0,0,2.5,0"
|
||||
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding sName, Mode=OneWay}"
|
||||
Margin="0,0,2.5,0"
|
||||
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"
|
||||
Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
@@ -79,9 +86,16 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Margin="0,0,2.5,0"
|
||||
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding sName, Mode=OneWay}"
|
||||
Margin="0,0,2.5,0"
|
||||
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"
|
||||
ItemsSource="{Binding ValueList}"
|
||||
SelectedItem="{Binding SelValue}"
|
||||
@@ -107,9 +121,16 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Margin="0,0,2.5,0"
|
||||
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding sName, Mode=OneWay}"
|
||||
Margin="0,0,2.5,0"
|
||||
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"
|
||||
IsChecked="{Binding bValue}"
|
||||
HorizontalAlignment="Center"
|
||||
|
||||
@@ -140,7 +140,7 @@ Public Class CurrMachiningPanelVM
|
||||
WriteMachiningParam(nIndex, MAC_GUID, sNewMachGUID.ToString())
|
||||
WriteMachiningParam(nIndex, MAC_NAME, SaveInDbWndVM.sName)
|
||||
' creo categoria materiali con attivo materiale corrente
|
||||
Dim MaterialCathegory As New MachiningCathegory(MachiningCathegory.Cathegories.MATERIALS, 0)
|
||||
Dim MaterialCathegory As New MachiningCathegory(MachiningCathegory.Cathegories.MATERIALS, 0, m_CurrMachining)
|
||||
Dim SelMaterialParam As MaterialMachiningParam = MaterialCathegory.MachiningParamList.FirstOrDefault(Function(x As MaterialMachiningParam) x.sGUID = Map.refTopPanelVM.SelMaterial.sGUID)
|
||||
If Not IsNothing(SelMaterialParam) Then
|
||||
SelMaterialParam.bValue = True
|
||||
|
||||
@@ -21,8 +21,8 @@ Public Class DispositionPanelVM
|
||||
Dim dNewXPos As Double = ptReference.x
|
||||
StringToLen(value, dNewXPos)
|
||||
Dim b3Print As BBox3d = GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
|
||||
Dim dMin As Double = 0
|
||||
Dim dMax As Double = CurrentMachine.b3Tab.DimX
|
||||
Dim dMin As Double = Math.Min( 0, CurrentMachine.b3ExtrusionArea.Min.x)
|
||||
Dim dMax As Double = Math.Max( CurrentMachine.b3Tab.DimX, CurrentMachine.b3ExtrusionArea.Max.x)
|
||||
If b3Print.Max.x > ptReference.x Then
|
||||
dMax -= b3Print.Max.x - ptReference.x
|
||||
End If
|
||||
@@ -60,8 +60,8 @@ Public Class DispositionPanelVM
|
||||
Dim dNewYPos As Double = ptReference.y
|
||||
StringToLen(value, dNewYPos)
|
||||
Dim b3Print As BBox3d = GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
|
||||
Dim dMin As Double = 0
|
||||
Dim dMax As Double = CurrentMachine.b3Tab.DimY
|
||||
Dim dMin As Double = Math.Min( 0, CurrentMachine.b3ExtrusionArea.Min.y)
|
||||
Dim dMax As Double = Math.Max( CurrentMachine.b3Tab.DimY, CurrentMachine.b3ExtrusionArea.Max.y)
|
||||
If b3Print.Max.y > ptReference.y Then
|
||||
dMax -= b3Print.Max.y - ptReference.y
|
||||
End If
|
||||
|
||||
@@ -595,6 +595,7 @@ Public Class FilledSolidPanelVM
|
||||
Friend Sub Dispose()
|
||||
' ripristino frame originale
|
||||
EgtSetGridFrame(m_OriginalGridFrame)
|
||||
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
|
||||
' se in modifica parametri
|
||||
If m_bMachParam_IsChecked Then
|
||||
' ripristino modalita' standard
|
||||
@@ -735,6 +736,7 @@ Public Class FilledSolidPanelVM
|
||||
If NewGeomType = GDB_TY.CRV_COMPO Then
|
||||
If Not EgtCurveIsClosed(nNewEntityId) Then
|
||||
EgtCloseCurveCompo(nNewEntityId)
|
||||
m_bEscOnLine2P = True
|
||||
End If
|
||||
EgtSetName(nNewEntityId, RIB_CURVE)
|
||||
' resetto colore entita'
|
||||
@@ -763,9 +765,6 @@ Public Class FilledSolidPanelVM
|
||||
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
|
||||
m_bIsCreatingExtrusion = True
|
||||
Map.refControllerInputPanelVM.IsChecked = True
|
||||
If Not EgtCurveIsClosed(nNewEntityId) Then
|
||||
m_bEscOnLine2P = True
|
||||
End If
|
||||
Else
|
||||
' cancello layer
|
||||
EgtErase(nNewExtrusionLayerId)
|
||||
@@ -1077,6 +1076,7 @@ Public Class FilledSolidPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneTop(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1102,6 +1102,7 @@ Public Class FilledSolidPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneFront(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1127,6 +1128,7 @@ Public Class FilledSolidPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneRight(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1152,6 +1154,7 @@ Public Class FilledSolidPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneBack(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1177,6 +1180,7 @@ Public Class FilledSolidPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneLeft(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1202,6 +1206,7 @@ Public Class FilledSolidPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneBottom(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1228,6 +1233,7 @@ Public Class FilledSolidPanelVM
|
||||
Public Sub CPlaneElevation(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
ManageInterface(False)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
|
||||
End Sub
|
||||
|
||||
@@ -1253,87 +1259,12 @@ Public Class FilledSolidPanelVM
|
||||
Public Sub CPlaneOrigin(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
ManageInterface(False)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlaneOrigin
|
||||
|
||||
#Region "CPlaneRotate"
|
||||
|
||||
''' <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"
|
||||
|
||||
Private m_bCPlaneObj_IsActive As Boolean = False
|
||||
|
||||
@@ -84,6 +84,32 @@
|
||||
Style="{StaticResource ToolBar_SmallButton}"/>
|
||||
</Grid>
|
||||
</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>
|
||||
</ScrollViewer>
|
||||
|
||||
@@ -42,12 +42,21 @@ Public Class FilledSolidParamPanelVM
|
||||
|
||||
m_Type = Cathegories.AUX_SOLID
|
||||
m_sName = "Filled Solid"
|
||||
m_MachiningParamList = New List(Of MachiningParam)({New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nFilledSolidId, nPartId, Me),
|
||||
m_MachiningParamList = New List(Of MachiningParam)({New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDWIDTH, 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.AUXSOLIDSLINKTYPE, nFilledSolidId, nPartId, Me),
|
||||
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, 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.AUXSOLIDSWIPELEN, nFilledSolidId, nPartId, Me),
|
||||
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nFilledSolidId, nPartId, Me)})
|
||||
@@ -157,13 +166,13 @@ Public Class FilledSolidNumericMachiningParam
|
||||
|
||||
Public Overrides Property sValue As String
|
||||
Get
|
||||
Return If(m_bIsLen, LenToString(m_dValue, 1), m_dValue)
|
||||
Return If(m_bIsLen, LenToString(m_dValue, 2), DoubleToString(m_dValue, 2))
|
||||
End Get
|
||||
Set(value As String)
|
||||
If m_bIsLen Then
|
||||
StringToLen(value, m_dValue)
|
||||
Else
|
||||
m_dValue = value
|
||||
StringToDouble(value, m_dValue)
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(sValue))
|
||||
NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
|
||||
@@ -190,6 +199,14 @@ Public Class FilledSolidNumericMachiningParam
|
||||
MyBase.New(Type, Cathegory)
|
||||
Dim bReadFromPart As Boolean = False
|
||||
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
|
||||
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSOVERLAP, m_dValue)
|
||||
EgtGetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, m_dPartValue)
|
||||
@@ -202,6 +219,30 @@ Public Class FilledSolidNumericMachiningParam
|
||||
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dValue)
|
||||
EgtGetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dPartValue)
|
||||
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
|
||||
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSCOASTINGLEN, m_dValue)
|
||||
EgtGetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, m_dPartValue)
|
||||
@@ -230,6 +271,18 @@ Public Class FilledSolidNumericMachiningParam
|
||||
sWriteValue = DoubleToString(m_dValue, 2)
|
||||
End If
|
||||
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
|
||||
If bIsModifiedFromPart Then
|
||||
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSOVERLAP, sWriteValue)
|
||||
@@ -248,6 +301,42 @@ Public Class FilledSolidNumericMachiningParam
|
||||
Else
|
||||
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE)
|
||||
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
|
||||
If bIsModifiedFromPart Then
|
||||
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue)
|
||||
@@ -339,9 +428,14 @@ Public Class FilledSolidComboMachiningParam
|
||||
Dim bReadFromPart As Boolean = False
|
||||
Select Case Type
|
||||
Case Params.AUXSOLIDSINFILL
|
||||
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL.NONE, "None"),
|
||||
New IdNameStruct(Machining.MPAR_INFILL.OFFSET, "Offset"),
|
||||
New IdNameStruct(Machining.MPAR_INFILL.ZIGZAG, "ZigZag")})
|
||||
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"),
|
||||
New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
|
||||
New IdNameStruct(Machining.MPAR_INFILL_TYPE.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
|
||||
bReadFromRib = EgtGetInfo(nRibId, MAC_AUXSOLIDSINFILL, nSelValue)
|
||||
If bReadFromRib Then
|
||||
@@ -379,7 +473,7 @@ Public Class FilledSolidComboMachiningParam
|
||||
Else
|
||||
Select Case Type
|
||||
Case Params.AUXSOLIDSINFILL
|
||||
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_INFILL.NONE)
|
||||
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_INFILL_TYPE.NONE)
|
||||
m_SelValue = m_OrigSelValue
|
||||
Case Params.AUXSOLIDSSTRANDORDER
|
||||
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_STRANDORDERS.OUTTOIN)
|
||||
@@ -447,4 +541,95 @@ Public Class FilledSolidComboMachiningParam
|
||||
#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
|
||||
|
||||
@@ -76,6 +76,9 @@
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DotNetZip">
|
||||
<HintPath>..\..\..\EgtProg\Icarus\DotNetZip.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtUILib, Version=2.4.7.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
|
||||
@@ -84,8 +87,8 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Ionic.Zip.1.9.1.8\lib\Ionic.Zip.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationFramework.Aero2" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -320,6 +323,7 @@
|
||||
<Compile Include="Utility\DisableModifiedMgr.vb" />
|
||||
<Compile Include="Utility\EgwCrypto.vb" />
|
||||
<Compile Include="Utility\GeomEntityColors.vb" />
|
||||
<Compile Include="Utility\JsonUtility.vb" />
|
||||
<Compile Include="Utility\LuaExec.vb" />
|
||||
<Compile Include="Utility\Map.vb" />
|
||||
<Compile Include="Utility\MyMachine.vb" />
|
||||
|
||||
@@ -1,30 +1,37 @@
|
||||
<StackPanel x:Class="InstrumentPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:local="clr-namespace:Icarus"
|
||||
IsEnabled="{Binding InstrumentPanel_IsEnabled}"
|
||||
Orientation="Horizontal">
|
||||
<Border x:Class="InstrumentPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:local="clr-namespace:Icarus"
|
||||
IsEnabled="{Binding InstrumentPanel_IsEnabled}"
|
||||
Background="{DynamicResource EgaltechWhite}"
|
||||
CornerRadius="0,4,0,0"
|
||||
Padding="0,0,8,0">
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
|
||||
<local:CheckedImageToggleButton ToolTip="{Binding GetDist_ToolTip}"
|
||||
IsChecked="{Binding GetDistIsChecked}"
|
||||
ImageSource="/Resources/InstrumentPanel/GetDist.png"
|
||||
CheckedImageSource="/Resources/InstrumentPanel/GetDist_White.png"
|
||||
Width="15"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource BottomPanel_ToggleButton}">
|
||||
<local:CheckedImageToggleButton.Resources>
|
||||
<sys:Double x:Key="ToggleButton.Image.Height">25</sys:Double>
|
||||
<sys:Double x:Key="ToggleButton.Image.Width">25</sys:Double>
|
||||
</local:CheckedImageToggleButton.Resources>
|
||||
</local:CheckedImageToggleButton>
|
||||
<local:CheckedImageToggleButton ToolTip="{Binding EdgeAnalysis_ToolTip}"
|
||||
IsChecked="{Binding bEdgeAnalysis_IsChecked}"
|
||||
IsEnabled="{Binding bEdgeAnalysis_IsEnabled}"
|
||||
ImageSource="/Resources/InstrumentPanel/EdgeAnalysis.png"
|
||||
CheckedImageSource="/Resources/InstrumentPanel/EdgeAnalysis_White.png"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource BottomPanel_ToggleButton}">
|
||||
</local:CheckedImageToggleButton>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<local:CheckedImageToggleButton ToolTip="{Binding GetDist_ToolTip}"
|
||||
IsChecked="{Binding GetDistIsChecked}"
|
||||
ImageSource="/Resources/InstrumentPanel/GetDist.png"
|
||||
CheckedImageSource="/Resources/InstrumentPanel/GetDist_White.png"
|
||||
Width="15"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource BottomPanel_ToggleButton}">
|
||||
<local:CheckedImageToggleButton.Resources>
|
||||
<sys:Double x:Key="ToggleButton.Image.Height">25</sys:Double>
|
||||
<sys:Double x:Key="ToggleButton.Image.Width">25</sys:Double>
|
||||
</local:CheckedImageToggleButton.Resources>
|
||||
</local:CheckedImageToggleButton>
|
||||
<local:CheckedImageToggleButton ToolTip="{Binding EdgeAnalysis_ToolTip}"
|
||||
IsChecked="{Binding bEdgeAnalysis_IsChecked}"
|
||||
IsEnabled="{Binding bEdgeAnalysis_IsEnabled}"
|
||||
ImageSource="/Resources/InstrumentPanel/EdgeAnalysis.png"
|
||||
CheckedImageSource="/Resources/InstrumentPanel/EdgeAnalysis_White.png"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource BottomPanel_ToggleButton}">
|
||||
</local:CheckedImageToggleButton>
|
||||
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
+568
-74
File diff suppressed because it is too large
Load Diff
@@ -140,9 +140,16 @@
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Margin="0,0,2.5,0"
|
||||
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding sName, Mode=OneWay}"
|
||||
Margin="0,0,2.5,0"
|
||||
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"
|
||||
Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
|
||||
Margin="2.5,0,0,0"
|
||||
@@ -156,9 +163,16 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Margin="0,0,2.5,0"
|
||||
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding sName, Mode=OneWay}"
|
||||
Margin="0,0,2.5,0"
|
||||
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"
|
||||
ItemsSource="{Binding ValueList}"
|
||||
SelectedItem="{Binding SelValue}"
|
||||
@@ -175,9 +189,16 @@
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Margin="0,0,2.5,0"
|
||||
Style="{StaticResource ParameterList_TextBlock}"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding sName, Mode=OneWay}"
|
||||
Margin="0,0,2.5,0"
|
||||
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"
|
||||
IsChecked="{Binding bValue}"
|
||||
HorizontalAlignment="Center"
|
||||
|
||||
@@ -8,7 +8,7 @@ Public Class MainWindowM
|
||||
#Region "FIELDS"
|
||||
|
||||
' massimo numero di istanze del programma ammesse
|
||||
Const MAX_INST As Integer = 32
|
||||
Const MAX_INST As Integer = 4
|
||||
|
||||
Private m_objMutex As Mutex
|
||||
|
||||
@@ -75,13 +75,6 @@ Public Class MainWindowM
|
||||
End Get
|
||||
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
|
||||
Get
|
||||
Return My.Application.Info.Version.Major.ToString() & "." &
|
||||
@@ -189,14 +182,17 @@ Public Class MainWindowM
|
||||
Dim sKey As String = String.Empty
|
||||
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
|
||||
EgtSetKey(sKey)
|
||||
Dim sNestKey As String = ""
|
||||
EgtUILib.GetPrivateProfileString(S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
|
||||
'EgtSetNestKey(sNestKey)
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNestOption = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||
' Impostazioni per chiave di rete
|
||||
Dim bNetKey As Boolean = ( GetMainPrivateProfileInt( S_GENERAL, K_NETKEY, 0) = 1)
|
||||
EgtSetNetHwKey( bNetKey)
|
||||
Dim sLockId As String = ""
|
||||
EgtUILib.GetPrivateProfileString( S_LICENCE, K_LOCKID, "", sLockId, sLicFile)
|
||||
If Not String.IsNullOrEmpty( sLockId) Then
|
||||
EgtSetLockId( sLockId)
|
||||
End If
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5583, 2505, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5583, 2505, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5583, 3105, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5583, 3105, 1, m_nKeyOptions)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
@@ -321,7 +317,7 @@ Public Class MainWindowM
|
||||
Friend Function GetMaxInstances() As Integer
|
||||
' Leggo il massimo numero di istanze ammesse
|
||||
Dim nMaxInst As Integer = GetMainPrivateProfileInt(S_GENERAL, K_MAXINST, 1)
|
||||
Return 1 ' Max(1, Min(nMaxInst, MAX_INST))
|
||||
Return Max(1, Min(nMaxInst, MAX_INST))
|
||||
End Function
|
||||
|
||||
Friend Sub Close()
|
||||
|
||||
@@ -40,7 +40,7 @@ Class MainWindowV
|
||||
End Sub
|
||||
|
||||
Private Sub MainWindowV_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs)
|
||||
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
||||
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt AndAlso Keyboard.IsKeyDown(Key.F4) Then
|
||||
e.Cancel = True
|
||||
Return
|
||||
End If
|
||||
@@ -61,6 +61,8 @@ Class MainWindowV
|
||||
Me.Activate()
|
||||
' Recupero l'array di stringhe con i nomi del file
|
||||
Dim sFiles() As String = DirectCast(e.Data.GetData(DataFormats.FileDrop), String())
|
||||
' Apro il primo
|
||||
Map.refSecondaryWindowVM.OpenStdFile(sFiles(0))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ Public Class MainWindowVM
|
||||
End If
|
||||
' annullo trasparenza attivata durante edit rib
|
||||
If Not IsNothing(Map.refRibPanelVM.SelRib) Then
|
||||
EgtSetAlpha(Map.refRibPanelVM.SelRib.nExtrusionId, 100)
|
||||
'EgtSetAlpha(Map.refRibPanelVM.SelRib.nExtrusionId, 100)
|
||||
End If
|
||||
ElseIf Map.refTopPanelVM.SelModifyMode.ModifyMode = ModifyModes.SHELLNUMBER Then
|
||||
' cancello eventuali layer di modifica
|
||||
@@ -132,7 +132,7 @@ Public Class MainWindowVM
|
||||
End If
|
||||
' annullo trasparenza attivata durante edit rib
|
||||
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
|
||||
@@ -159,21 +159,19 @@ Public Class MainWindowVM
|
||||
End Function
|
||||
|
||||
Friend Sub CloseApplication()
|
||||
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
||||
' Se simulazione in corso
|
||||
If Not IsNothing( Map.refSimulationPanelVM) AndAlso Map.refSimulationPanelVM.MySimul.bSimExecuting Then
|
||||
' Avvio l'arresto della simulazione
|
||||
Map.refSimulationPanelVM.MySimul.SetSimulationStatus(MCH_SIM_ST.UI_STOP)
|
||||
Map.refSimulationPanelVM.MySimul.m_bSimulEndExitApp = True
|
||||
Return
|
||||
End If
|
||||
' gestisco la chiusura della simulazione
|
||||
' Chiusura della simulazione
|
||||
If Map.refRightPanelVM.SelPanel = RightPanelVM.Panels.SIMULATION AndAlso Not IsNothing(Map.refSimulationPanelVM) Then
|
||||
Map.refSimulationPanelVM.MySimul.ResetSimulation()
|
||||
End If
|
||||
' Gestisco eventuale file corrente modificato
|
||||
Dim bOk As Boolean = True
|
||||
'bOk = ProjFileVM.VerifyProjectModification(Map.refProjManagerVM.CurrProj, ProjectType.PROJ)
|
||||
' se salvataggio annullato, rimango
|
||||
If Not bOk Then Return
|
||||
Dim bAllowClose As Boolean = Map.refSceneHostVM.MainController.ManageModified()
|
||||
' Salvo impostazione macchina corrente
|
||||
'Map.refMachinePanelVM.SaveCurrentMachine()
|
||||
' Se non confermata chiusura, esco
|
||||
If Not bAllowClose Then Return
|
||||
' salvo modo di visualizzazione
|
||||
|
||||
@@ -49,8 +49,13 @@
|
||||
Style="{StaticResource BaseTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding sName, UpdateSourceTrigger=Explicit}"
|
||||
IsExplicitFocused="{Binding UserShouldEditValueNow}"
|
||||
Visibility="{Binding TextBox_Visibility}"
|
||||
Style="{StaticResource OptionTextBox}"/>
|
||||
Visibility="{Binding TextBox_Visibility}">
|
||||
<EgtWPFLib5:EgtTextBox.Style>
|
||||
<Style TargetType="{x:Type EgtWPFLib5:EgtTextBox}" BasedOn="{StaticResource OptionTextBox}">
|
||||
<EventSetter Event="PreviewKeyDown" Handler="TextBox_PreviewKeyDown"/>
|
||||
</Style>
|
||||
</EgtWPFLib5:EgtTextBox.Style>
|
||||
</EgtWPFLib5:EgtTextBox>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</HierarchicalDataTemplate>
|
||||
@@ -69,8 +74,13 @@
|
||||
Style="{StaticResource BaseTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding sName, UpdateSourceTrigger=Explicit}"
|
||||
IsExplicitFocused="{Binding UserShouldEditValueNow}"
|
||||
Visibility="{Binding TextBox_Visibility}"
|
||||
Style="{StaticResource OptionTextBox}"/>
|
||||
Visibility="{Binding TextBox_Visibility}">
|
||||
<EgtWPFLib5:EgtTextBox.Style>
|
||||
<Style TargetType="{x:Type EgtWPFLib5:EgtTextBox}" BasedOn="{StaticResource OptionTextBox}">
|
||||
<EventSetter Event="PreviewKeyDown" Handler="TextBox_PreviewKeyDown"/>
|
||||
</Style>
|
||||
</EgtWPFLib5:EgtTextBox.Style>
|
||||
</EgtWPFLib5:EgtTextBox>
|
||||
</Grid>
|
||||
</HierarchicalDataTemplate>
|
||||
<!-- Menu' tasto destro -->
|
||||
|
||||
@@ -23,4 +23,12 @@
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub TextBox_PreviewKeyDown(sender As Object, e As KeyEventArgs)
|
||||
' per evitare che il click del tasto Enter a fine edit faccia scattare anche la chiusura
|
||||
' di tutto il pannello a causa del IsDefault sul tasto di chiusura, termino la gestione del click
|
||||
If e.Key = Key.Enter Then
|
||||
e.Handled = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -471,14 +471,6 @@ Public Class ManagePartPanelVM
|
||||
Map.refSliceManagerVM.UpdateDimensions()
|
||||
Next
|
||||
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
|
||||
Map.refTopPanelVM.SelLastPart()
|
||||
|
||||
@@ -285,6 +285,8 @@ Public Class MaterialIndex
|
||||
sParamKey = MAT_KZ
|
||||
Case MaterialParam.Params.KN
|
||||
sParamKey = MAT_KN
|
||||
Case MaterialParam.Params.TDRYER
|
||||
sParamKey = MAT_TDRYER
|
||||
End Select
|
||||
Return ReadMaterialParamDouble(m_nIndex, sParamKey, dDefault)
|
||||
End Function
|
||||
@@ -346,6 +348,7 @@ Public Class MaterialCathegory
|
||||
m_MaterialParamList = New List(Of MaterialParam)({New NumericMaterialParam(MaterialParam.Params.K_EXTRUSION, nIndex),
|
||||
New NumericMaterialParam(MaterialParam.Params.K_LAY_TIME, nIndex),
|
||||
New NumericMaterialParam(MaterialParam.Params.DENSITY, nIndex),
|
||||
New NumericMaterialParam(MaterialParam.Params.TDRYER, nIndex),
|
||||
New StringMaterialParam(MaterialParam.Params.ORIG, nIndex)})
|
||||
m_Cathegory_Visibility = Visibility.Visible
|
||||
Case Cathegories.TEMPERATURES
|
||||
@@ -419,6 +422,7 @@ Public MustInherit Class MaterialParam
|
||||
KZ = 20
|
||||
KN = 21
|
||||
ORIG = 22
|
||||
TDRYER = 23
|
||||
End Enum
|
||||
|
||||
Private m_Type As Params
|
||||
@@ -478,6 +482,8 @@ Public MustInherit Class MaterialParam
|
||||
m_sName = "KZ"
|
||||
Case Params.KN
|
||||
m_sName = "KN"
|
||||
Case Params.TDRYER
|
||||
m_sName = "Dryer Temperature"
|
||||
Case Params.ORIG
|
||||
m_sName = "Original"
|
||||
End Select
|
||||
@@ -498,13 +504,13 @@ Public Class NumericMaterialParam
|
||||
Private m_dValue As Double
|
||||
Public Property dValue As String
|
||||
Get
|
||||
Return If(m_bIsLen, LenToString(m_dValue, 1), m_dValue)
|
||||
Return If(m_bIsLen, LenToString(m_dValue, 5), DoubleToString(m_dValue, 5))
|
||||
End Get
|
||||
Set(value As String)
|
||||
If m_bIsLen Then
|
||||
StringToLen(value, m_dValue)
|
||||
Else
|
||||
m_dValue = value
|
||||
StringToDouble(value, m_dValue)
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(dValue))
|
||||
End Set
|
||||
@@ -583,6 +589,9 @@ Public Class NumericMaterialParam
|
||||
Case Params.KN
|
||||
m_dValue = ReadMaterialParamDouble(nIndex, MAT_KN, 0)
|
||||
m_bIsLen = False
|
||||
Case Params.TDRYER
|
||||
m_dValue = ReadMaterialParamDouble(nIndex, MAT_TDRYER, 0)
|
||||
m_bIsLen = False
|
||||
End Select
|
||||
m_dOrigValue = m_dValue
|
||||
End Sub
|
||||
@@ -633,6 +642,8 @@ Public Class NumericMaterialParam
|
||||
WriteMaterialParam(nIndex, MAT_KZ, sWriteValue, sFilePath)
|
||||
Case Params.KN
|
||||
WriteMaterialParam(nIndex, MAT_KN, sWriteValue, sFilePath)
|
||||
Case Params.TDRYER
|
||||
WriteMaterialParam(nIndex, MAT_TDRYER, sWriteValue, sFilePath)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -283,17 +283,19 @@ Public Class MaterialDbVM
|
||||
' aggiorno lista materiali Db
|
||||
Init()
|
||||
' aggiorno lista materiali TopBar
|
||||
Dim PrevMaterialGuid As String = Map.refTopPanelVM.SelMaterial.sGUID
|
||||
Map.refTopPanelVM.InitMaterialList()
|
||||
Dim PrevMaterial As MaterialIndex = Map.refTopPanelVM.MaterialList.FirstOrDefault(Function(x) x.sGUID = PrevMaterialGuid)
|
||||
If Not IsNothing(PrevMaterial) Then
|
||||
Map.refTopPanelVM.SetSelMaterial(PrevMaterial)
|
||||
Else
|
||||
Map.refTopPanelVM.SelMaterial = Nothing
|
||||
Map.refTopPanelVM.NotifyPropertyChanged(NameOf(Map.refTopPanelVM.SelMaterial))
|
||||
If Not IsNothing(Map.refTopPanelVM.SelMaterial) Then
|
||||
Dim PrevMaterialGuid As String = Map.refTopPanelVM.SelMaterial.sGUID
|
||||
Dim PrevMaterial As MaterialIndex = Map.refTopPanelVM.MaterialList.FirstOrDefault(Function(x) x.sGUID = PrevMaterialGuid)
|
||||
If Not IsNothing(PrevMaterial) Then
|
||||
Map.refTopPanelVM.SetSelMaterial(PrevMaterial)
|
||||
Else
|
||||
Map.refTopPanelVM.SelMaterial = Nothing
|
||||
Map.refTopPanelVM.NotifyPropertyChanged(NameOf(Map.refTopPanelVM.SelMaterial))
|
||||
End If
|
||||
' ricarico lavorazioni per aggiorno liste materiali all'interno
|
||||
Map.refMachiningDbVM.Init()
|
||||
End If
|
||||
' ricarico lavorazioni per aggiorno liste materiali all'interno
|
||||
Map.refMachiningDbVM.Init()
|
||||
End If
|
||||
' ripristino modalita' standard
|
||||
Map.refTopPanelVM.SelPage = Pages.MODIFY
|
||||
|
||||
@@ -30,7 +30,7 @@ Imports System.Windows
|
||||
#End If
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("Icarus")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2022-2023 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2022-2026 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
|
||||
@@ -70,5 +70,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.5.5.1")>
|
||||
<Assembly: AssemblyFileVersion("2.5.5.1")>
|
||||
<Assembly: AssemblyVersion("3.1.5.1")>
|
||||
<Assembly: AssemblyFileVersion("3.1.5.1")>
|
||||
|
||||
@@ -15,6 +15,8 @@ Friend Module OptionModule
|
||||
Friend m_bThickLine As Boolean
|
||||
' Flag per visualizzazione smussata delle superfici
|
||||
Friend m_bSmoothTriMesh As Boolean
|
||||
' Flag per visualizzazione semplificate sezione strand
|
||||
Friend m_bUseSimplifiedSection As Boolean
|
||||
|
||||
' Colore di default in disegno
|
||||
Friend m_DefMaterialColor As Color3d
|
||||
@@ -43,6 +45,14 @@ Friend Module OptionModule
|
||||
Friend m_sFont As String
|
||||
Friend m_dTextHeight As Double
|
||||
|
||||
' Parametri per la griglia
|
||||
Friend m_bGridVisibility As Boolean
|
||||
Friend m_dSnapStepMm As Double
|
||||
Friend m_dSnapStepInch As Double
|
||||
Friend m_nMinLineSStep As Integer
|
||||
Friend m_nMajLineSStep As Integer
|
||||
Friend m_nExtSStep As Integer
|
||||
|
||||
' Variabili che indicano per ogni tipo di lavorazione quale geometria è selezionabile
|
||||
'Friend m_SelGeomSawing As SceneSelModeOpt
|
||||
'Friend m_SelGeomDrilling As SceneSelModeOpt
|
||||
@@ -99,6 +109,8 @@ Friend Module OptionModule
|
||||
m_bThickLine = GetMainPrivateProfileInt(S_SCENE, K_LINEWIDTH, 1) <> 1
|
||||
' Inizializzo flag visualizzazione smussata delle superfici
|
||||
m_bSmoothTriMesh = GetMainPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0
|
||||
' Inizializzo flag visualizzazione sezione strand semplificata
|
||||
m_bUseSimplifiedSection = GetMainPrivateProfileInt(S_SOLIDS, K_SIMPLIFIEDSECTION, 0) <> 0
|
||||
' Inizio colore di default in disegno
|
||||
Dim DefColor As New Color3d(0, 0, 0)
|
||||
GetMainPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
|
||||
@@ -108,6 +120,13 @@ Friend Module OptionModule
|
||||
' Inizializzo variabili per import
|
||||
m_dDxfScaleFactor = GetMainPrivateProfileDouble(S_IMPORT, K_DXFSCALE, 1)
|
||||
m_dStlScaleFactor = GetMainPrivateProfileDouble(S_IMPORT, K_STLSCALE, 1)
|
||||
' Inizializzo parametri griglia
|
||||
m_bGridVisibility = (GetMainPrivateProfileInt(S_GRID, K_SHOWGRID, 1) <> 0)
|
||||
m_dSnapStepMm = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEP, 10)
|
||||
m_dSnapStepInch = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEPINCH, 12.7)
|
||||
m_nMinLineSStep = GetMainPrivateProfileInt(S_GRID, K_MINLINESSTEP, 1)
|
||||
m_nMajLineSStep = GetMainPrivateProfileInt(S_GRID, K_MAJLINESSTEP, 10)
|
||||
m_nExtSStep = GetMainPrivateProfileInt(S_GRID, K_EXTSSTEP, 100)
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
@@ -61,6 +61,7 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding ThickLineMsg}" VerticalAlignment="Center"
|
||||
Grid.Row="0" Margin="0,5,0,5"/>
|
||||
@@ -70,6 +71,10 @@
|
||||
Grid.Row="1" Margin="0,5,0,5"/>
|
||||
<CheckBox IsChecked="{Binding SmoothTriMesh}"
|
||||
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>
|
||||
<!--<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5">
|
||||
|
||||
@@ -147,6 +147,7 @@ Public Class OptionWindowVM
|
||||
If StringToLen(value, dVal) AndAlso dVal > 0 Then
|
||||
OptionModule.m_dGeometryTolerance = dVal
|
||||
Map.refSceneHostVM.MainController.SetSurfTmTolerance(OptionModule.m_dGeometryTolerance)
|
||||
Map.refSceneHostVM.MainController.SetAdvImpTolerance(OptionModule.m_dGeometryTolerance)
|
||||
WriteMainPrivateProfileString(S_GEOMDB, K_SURFTMTOLER, DoubleToString(OptionModule.m_dGeometryTolerance, 5))
|
||||
End If
|
||||
End Set
|
||||
@@ -214,6 +215,16 @@ Public Class OptionWindowVM
|
||||
End Set
|
||||
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
|
||||
' Get
|
||||
' Return m_FontList(m_FontList.IndexOf(OptionModule.m_sFontText))
|
||||
@@ -257,152 +268,6 @@ Public Class OptionWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Public Property ImageScaleFactor As String
|
||||
' Get
|
||||
' Return LenToString(OptionModule.m_dImgScaleFactor, 5)
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' Dim dVal As Double = 0
|
||||
' If StringToLen(value, dVal) AndAlso dVal > 0 Then
|
||||
' OptionModule.m_dImgScaleFactor = dVal
|
||||
' WritePrivateProfileString(S_IMPORT, K_IMGSCALE, DoubleToString(OptionModule.m_dImgScaleFactor, 5))
|
||||
' Map.refProjectVM.GetController().SetScaleForImageImport(OptionModule.m_dImgScaleFactor)
|
||||
' NotifyPropertyChanged("ImageScaleFactor")
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Public Property ImageWidth As String
|
||||
' Get
|
||||
' Return OptionModule.m_nImgWidth.ToString()
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' Dim nVal As Integer = 0
|
||||
' If Integer.TryParse(value, nVal) AndAlso nVal > 0 Then
|
||||
' OptionModule.m_nImgWidth = nVal
|
||||
' WritePrivateProfileString(S_EXPORT, K_IMGWIDTH, OptionModule.m_nImgWidth.ToString())
|
||||
' Map.refProjectVM.GetController().SetDefaultForImageExport(OptionModule.m_nImgWidth, OptionModule.m_nImgHeight)
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Public Property ImageHeight As String
|
||||
' Get
|
||||
' Return OptionModule.m_nImgHeight.ToString()
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' Dim nVal As Integer = 0
|
||||
' If Integer.TryParse(value, nVal) AndAlso nVal > 0 Then
|
||||
' OptionModule.m_nImgHeight = nVal
|
||||
' WritePrivateProfileString(S_EXPORT, K_IMGHEIGHT, OptionModule.m_nImgHeight.ToString())
|
||||
' Map.refProjectVM.GetController().SetDefaultForImageExport(OptionModule.m_nImgWidth, OptionModule.m_nImgHeight)
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Public Property ExtLineLen As String
|
||||
' Get
|
||||
' Return LenToString(OptionModule.m_dExtLineLen, 5)
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' Dim dVal As Double = 0
|
||||
' If StringToLen(value, dVal) AndAlso dVal > 0 Then
|
||||
' OptionModule.m_dExtLineLen = dVal
|
||||
' EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight)
|
||||
' WritePrivateProfileString(S_DIMENSIONSTYLE, K_EXTLINELEN, DoubleToString(OptionModule.m_dExtLineLen, 5))
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Public Property ArrowLen As String
|
||||
' Get
|
||||
' Return LenToString(OptionModule.m_dArrowLen, 5)
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' Dim dVal As Double = 0
|
||||
' If StringToLen(value, dVal) AndAlso dVal > 0 Then
|
||||
' OptionModule.m_dArrowLen = dVal
|
||||
' EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight)
|
||||
' WritePrivateProfileString(S_DIMENSIONSTYLE, K_ARROWLEN, DoubleToString(OptionModule.m_dArrowLen, 5))
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Public Property TextDist As String
|
||||
' Get
|
||||
' Return LenToString(OptionModule.m_dTextDist, 5)
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' Dim dVal As Double = 0
|
||||
' If StringToLen(value, dVal) AndAlso dVal > 0 Then
|
||||
' OptionModule.m_dTextDist = dVal
|
||||
' EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight)
|
||||
' WritePrivateProfileString(S_DIMENSIONSTYLE, K_TEXTDIST, DoubleToString(OptionModule.m_dTextDist, 5))
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Public Property SelectedUnitMeasure As String
|
||||
' Get
|
||||
' If OptionModule.m_nLenIsMM = 0 Then
|
||||
' Return "inch"
|
||||
' ElseIf OptionModule.m_nLenIsMM = 1 Then
|
||||
' Return "mm"
|
||||
' Else
|
||||
' Return EgtMsg(MSG_OPTIONPAGE + 45)
|
||||
' End If
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' Dim nVal As Integer = 2
|
||||
' If value = "inch" Then
|
||||
' nVal = 0
|
||||
' ElseIf value = "mm" Then
|
||||
' nVal = 1
|
||||
' End If
|
||||
' OptionModule.m_nLenIsMM = nVal
|
||||
' EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight)
|
||||
' WritePrivateProfileString(S_DIMENSIONSTYLE, K_LENISMM, OptionModule.m_nLenIsMM.ToString())
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Public Property DecDigit As String
|
||||
' Get
|
||||
' Return OptionModule.m_nDecDigit.ToString()
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' Dim nVal As Integer = 0
|
||||
' If Integer.TryParse(value, nVal) AndAlso nVal > 0 Then
|
||||
' OptionModule.m_nDecDigit = nVal
|
||||
' EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight)
|
||||
' WritePrivateProfileString(S_DIMENSIONSTYLE, K_DECDIGIT, OptionModule.m_nDecDigit.ToString())
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Public Property SelectedFont As String
|
||||
' Get
|
||||
' Return m_FontList(m_FontList.IndexOf(OptionModule.m_sFont))
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' OptionModule.m_sFont = value
|
||||
' EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight)
|
||||
' WritePrivateProfileString(S_DIMENSIONSTYLE, K_DIMFONT, OptionModule.m_sFont)
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Public Property TextHeight As String
|
||||
' Get
|
||||
' Return LenToString(OptionModule.m_dTextHeight, 5)
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' Dim dVal As Double = 0
|
||||
' If StringToLen(value, dVal) AndAlso dVal > 0 Then
|
||||
' OptionModule.m_dTextHeight = dVal
|
||||
' EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight)
|
||||
' WritePrivateProfileString(S_DIMENSIONSTYLE, K_TEXTHEIGHT, DoubleToString(OptionModule.m_dTextHeight, 5))
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
Private m_DXFScaleEnable As Boolean = False
|
||||
Public Property DXFScaleEnable As Boolean
|
||||
@@ -487,32 +352,6 @@ Public Class OptionWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Public Property SelectedImageScale As String
|
||||
' Get
|
||||
' If Math.Abs(OptionModule.m_dImgScaleFactor - ONEMM) < EPS_SMALL * 10 Then
|
||||
' Return ScaleImageList(ScaleImageList.IndexOf("mm"))
|
||||
' ElseIf Math.Abs(OptionModule.m_dImgScaleFactor - ONEINCH) < EPS_SMALL * 10 Then
|
||||
' Return ScaleImageList(ScaleImageList.IndexOf("inch"))
|
||||
' Else
|
||||
' ImageScaleEnable = True
|
||||
' Return ScaleImageList(ScaleImageList.IndexOf(EgtMsg(6546)))
|
||||
' ImageScaleEnable = True
|
||||
' End If
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' If value = "mm" Then
|
||||
' ImageScaleFactor = LenToString(ONEMM, 3)
|
||||
' ImageScaleEnable = False
|
||||
' ElseIf value = "inch" Then
|
||||
' ImageScaleFactor = LenToString(ONEINCH, 4)
|
||||
' ImageScaleEnable = False
|
||||
' Else
|
||||
' ImageScaleFactor = LenToString(OptionModule.m_dImgScaleFactor, 4)
|
||||
' ImageScaleEnable = True
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
' Definizione comandi
|
||||
|
||||
Private m_cmdTopSceneBackground As ICommand
|
||||
@@ -563,17 +402,23 @@ Public Class OptionWindowVM
|
||||
End Property
|
||||
Public ReadOnly Property ThickLineMsg As String
|
||||
Get
|
||||
Return EgtMsg( 6536) ' Linee spesse
|
||||
Return EgtMsg(6536) ' Linee spesse
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property SmoothTriMeshMsg As String
|
||||
Get
|
||||
Return EgtMsg( 6518) ' Superfici smussate
|
||||
Return EgtMsg(6518) ' Superfici smussate
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property UseSimplifiedSectionMsg As String
|
||||
Get
|
||||
Return "Use simplified strand section"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property UpdateLicenceMsg As String
|
||||
Get
|
||||
Return EgtMsg( 6553) ' Aggiorna licenza
|
||||
Return EgtMsg(6553) ' Aggiorna licenza
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -953,31 +798,31 @@ Public Class OptionWindowVM
|
||||
Dim sMachDir As String = Path.Combine(Map.refMainWindowVM.MainWindowM.sMachinesRoot, sMachName)
|
||||
' Preparo direttorio temporaneo
|
||||
Dim sTempDir As String = Path.Combine(Map.refMainWindowVM.MainWindowM.sMachinesRoot, "Temp")
|
||||
If My.Computer.FileSystem.DirectoryExists( sTempDir) Then
|
||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||
If My.Computer.FileSystem.DirectoryExists(sTempDir) Then
|
||||
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||
End If
|
||||
My.Computer.FileSystem.CreateDirectory( sTempDir)
|
||||
My.Computer.FileSystem.CreateDirectory(sTempDir)
|
||||
' Unzip nel direttorio temporaneo
|
||||
Using zip As New Ionic.Zip.ZipFile(sMachZip)
|
||||
zip.ExtractAll( sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
|
||||
zip.ExtractAll(sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
|
||||
End Using
|
||||
' Se non è una macchina segnalo il problema ed esco
|
||||
If Not My.Computer.FileSystem.FileExists( Path.Combine( sTempDir, sMachName, sMachName & ".ini")) Or
|
||||
Not My.Computer.FileSystem.FileExists( Path.Combine( sTempDir, sMachName, sMachName & ".mlde")) Then
|
||||
If Not My.Computer.FileSystem.FileExists(Path.Combine(sTempDir, sMachName, sMachName & ".ini")) Or
|
||||
Not My.Computer.FileSystem.FileExists(Path.Combine(sTempDir, sMachName, sMachName & ".mlde")) Then
|
||||
' Il file {0} non contiene una macchina - Avviso
|
||||
Dim sOut As String = String.Format(EgtMsg(6529), sMachZip)
|
||||
MessageBox.Show(sOut, EgtMsg(MSG_MESSAGEBOX + 2), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
' Rimuovo il direttorio temporaneo ed esco
|
||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||
Return
|
||||
End If
|
||||
' Imposto data e ora correnti al file mlde della macchina
|
||||
Try
|
||||
File.SetLastWriteTime( Path.Combine( sTempDir, sMachName, sMachName & ".mlde"), System.DateTime.Now)
|
||||
File.SetLastWriteTime(Path.Combine(sTempDir, sMachName, sMachName & ".mlde"), System.DateTime.Now)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
' Verifico esistenza di una macchina con lo stesso nome
|
||||
Dim bOldExists As Boolean = My.Computer.FileSystem.DirectoryExists( sMachDir)
|
||||
Dim bOldExists As Boolean = My.Computer.FileSystem.DirectoryExists(sMachDir)
|
||||
Dim bUpdate As Boolean = True
|
||||
If bOldExists Then
|
||||
Dim MachBox As New UpdateMachineV(Application.Current.MainWindow, New UpdateMachineVM(sMachName))
|
||||
@@ -994,23 +839,23 @@ Public Class OptionWindowVM
|
||||
End Select
|
||||
' Faccio una copia di backup della macchina corrente
|
||||
Dim sBackupDir As String = sMachDir & ".old"
|
||||
If My.Computer.FileSystem.DirectoryExists( sBackupDir) Then
|
||||
My.Computer.FileSystem.DeleteDirectory( sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||
If My.Computer.FileSystem.DirectoryExists(sBackupDir) Then
|
||||
My.Computer.FileSystem.DeleteDirectory(sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||
End If
|
||||
Try
|
||||
My.Computer.FileSystem.MoveDirectory( sMachDir, sBackupDir, True)
|
||||
My.Computer.FileSystem.MoveDirectory(sMachDir, sBackupDir, True)
|
||||
Catch ex As Exception
|
||||
' Ripristino lo stato originale ed esco
|
||||
My.Computer.FileSystem.MoveDirectory( sBackupDir, sMachDir, True)
|
||||
My.Computer.FileSystem.MoveDirectory(sBackupDir, sMachDir, True)
|
||||
' L'aggiornamento della macchina "{0}" non è riuscito.
|
||||
Dim sKo As String = String.Format(EgtMsg(6535), sMachName)
|
||||
EgtOutLog( sKo)
|
||||
EgtOutLog(sKo)
|
||||
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
|
||||
Return
|
||||
End Try
|
||||
End If
|
||||
' Installo la macchina
|
||||
My.Computer.FileSystem.MoveDirectory( Path.Combine( sTempDir, sMachName), sMachDir, True)
|
||||
My.Computer.FileSystem.MoveDirectory(Path.Combine(sTempDir, sMachName), sMachDir, True)
|
||||
' Se è un aggiornamento, recupero utensili, lavorazioni, attrezzaggi e dati per travi
|
||||
If bOldExists And bUpdate Then
|
||||
Dim sBackupDir As String = sMachDir & ".old"
|
||||
@@ -1047,10 +892,10 @@ Public Class OptionWindowVM
|
||||
End If
|
||||
'La macchina "{0}" è stata aggiornata con successo.
|
||||
Dim sOk As String = String.Format(EgtMsg(6530), sMachName)
|
||||
EgtOutLog( sOk)
|
||||
EgtOutLog(sOk)
|
||||
MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
|
||||
' 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
|
||||
MyMachine.InsertMachine(sMachDir, Map.refMachinePanelVM.MachineList)
|
||||
End Sub
|
||||
@@ -1093,10 +938,12 @@ Public Class OptionWindowVM
|
||||
End If
|
||||
Try
|
||||
Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out)
|
||||
zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
|
||||
zip.AlternateEncoding = Text.Encoding.UTF8
|
||||
' aggiungo i file della Macchina
|
||||
Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sCurrMachineName
|
||||
If Directory.Exists(sMachineDir) Then
|
||||
zip.AddSelectedFiles( "name != *\.git\*.* and name != *.git*", sMachineDir, sCurrMachineName, True)
|
||||
zip.AddSelectedFiles("name != *\.git\*.* and name != *.git*", sMachineDir, sCurrMachineName, True)
|
||||
End If
|
||||
' salvo lo zip
|
||||
zip.Save()
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Imports System.IO
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtUILib
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Public Class ProjManagerVM
|
||||
Inherits VMBase
|
||||
@@ -385,7 +386,7 @@ Public Class ProjManagerVM
|
||||
Map.refSceneHostVM.SaveProject()
|
||||
End If
|
||||
EgtGetCurrFilePath(sCurrProject)
|
||||
' se modificato, chiedo se si vuole salvare
|
||||
' se modificato, chiedo se si vuole salvare
|
||||
Else
|
||||
If EgtGetModified() Then
|
||||
If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
@@ -393,14 +394,6 @@ Public Class ProjManagerVM
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' Verifico se il progetto corrente è una porta
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
If nPartId = GDB_ID.NULL Then
|
||||
nPartId = EgtGetFirstPartInRawPart(EgtGetFirstRawPart())
|
||||
End If
|
||||
Dim sPartName As String = String.Empty
|
||||
EgtGetName(nPartId, sPartName)
|
||||
Dim bPrjIsDoor As Boolean = (String.Compare(sPartName, "DOOR") = 0)
|
||||
' Recupero macchine dei gruppi di lavoro del progetto
|
||||
Dim Machines As New List(Of String)
|
||||
Dim nMchGrpId As Integer = EgtGetFirstMachGroup()
|
||||
@@ -417,9 +410,12 @@ Public Class ProjManagerVM
|
||||
If Not String.IsNullOrWhiteSpace(sCurrProject) Then
|
||||
Dim sCurrProjectDir As String = Path.GetDirectoryName(sCurrProject)
|
||||
If Not String.IsNullOrWhiteSpace(sCurrProjectDir) Then
|
||||
Dim sCurrProjName As String = Path.GetFileNameWithoutExtension(sCurrProject).ToUpper()
|
||||
Dim TempFiles() As String = Directory.GetFiles(sCurrProjectDir)
|
||||
For FileIndex = 0 To TempFiles.Count - 1
|
||||
If Path.GetFileNameWithoutExtension(TempFiles(FileIndex)).Contains(Path.GetFileNameWithoutExtension(sCurrProject)) AndAlso TempFiles(FileIndex) <> sCurrProject Then
|
||||
If TempFiles(FileIndex) = sCurrProject Then Continue For
|
||||
Dim sCurrFileName As String = Path.GetFileNameWithoutExtension( TempFiles(FileIndex)).ToUpper()
|
||||
If String.Compare(sCurrFileName, sCurrProjName) = 0 Then
|
||||
OtherFiles.Add(TempFiles(FileIndex))
|
||||
End If
|
||||
Next
|
||||
@@ -432,11 +428,13 @@ Public Class ProjManagerVM
|
||||
End If
|
||||
Try
|
||||
Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out)
|
||||
zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
|
||||
zip.AlternateEncoding = Text.Encoding.UTF8
|
||||
' aggiungo file macchine
|
||||
For Each sMachineName As String In Machines
|
||||
Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sMachineName
|
||||
If Directory.Exists(sMachineDir) Then
|
||||
zip.AddItem(sMachineDir, sMachineName)
|
||||
zip.AddSelectedFiles( "name != *\.git\*.* and name != *.git*", sMachineDir, sMachineName, True)
|
||||
End If
|
||||
Next
|
||||
' aggiungo progetto corrente
|
||||
|
||||
@@ -620,6 +620,7 @@ Public Class RibPanelVM
|
||||
Friend Sub Dispose()
|
||||
' ripristino frame originale
|
||||
EgtSetGridFrame(m_OriginalGridFrame)
|
||||
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
|
||||
' se in modifica parametri
|
||||
If m_bMachParam_IsChecked Then
|
||||
' ripristino modalita' standard
|
||||
@@ -641,7 +642,7 @@ Public Class RibPanelVM
|
||||
' attivo modifiche su scena
|
||||
Map.refSceneHostVM.MainScene.ResetStatus()
|
||||
' rendo traspanete estrusione
|
||||
EgtSetAlpha(m_SelRib.nExtrusionId, 50)
|
||||
'EgtSetAlpha(m_SelRib.nExtrusionId, 50)
|
||||
' seleziono percorso corrente
|
||||
EgtDeselectAll()
|
||||
Select Case RibSelectionType
|
||||
@@ -692,12 +693,12 @@ Public Class RibPanelVM
|
||||
' seleziono nuova estrusione
|
||||
EgtSelectObj(m_SelRib.nExtrusionId)
|
||||
' ripristino trasparenza estrusione
|
||||
EgtSetAlpha(m_SelRib.nExtrusionId, 100)
|
||||
'EgtSetAlpha(m_SelRib.nExtrusionId, 100)
|
||||
EgtDraw()
|
||||
' rimetto la selezione scena a null
|
||||
Map.refSceneHostVM.MainScene.SetStatusNull()
|
||||
Case Controller.CMD.MOVE, Controller.CMD.ROTATE
|
||||
EgtSetAlpha(Map.refRibPanelVM.SelRib.nExtrusionId, 100)
|
||||
' EgtSetAlpha(Map.refRibPanelVM.SelRib.nExtrusionId, 100)
|
||||
' seleziono nuova estrusione
|
||||
EgtSelectObj(m_SelRib.nExtrusionId)
|
||||
EgtDraw()
|
||||
@@ -1096,6 +1097,7 @@ Public Class RibPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneTop(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1121,6 +1123,7 @@ Public Class RibPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneFront(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1146,6 +1149,7 @@ Public Class RibPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneRight(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1171,6 +1175,7 @@ Public Class RibPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneBack(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1196,6 +1201,7 @@ Public Class RibPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneLeft(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1221,6 +1227,7 @@ Public Class RibPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneBottom(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1247,6 +1254,7 @@ Public Class RibPanelVM
|
||||
Public Sub CPlaneElevation(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
ManageInterface(False)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
|
||||
End Sub
|
||||
|
||||
@@ -1272,87 +1280,12 @@ Public Class RibPanelVM
|
||||
Public Sub CPlaneOrigin(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
ManageInterface(False)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlaneOrigin
|
||||
|
||||
#Region "CPlaneRotate"
|
||||
|
||||
''' <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"
|
||||
|
||||
Private m_bCPlaneObj_IsActive As Boolean = False
|
||||
|
||||
@@ -55,10 +55,14 @@ Public Class CopyFromWndVM
|
||||
Return
|
||||
End If
|
||||
' copio i parametri nella rib corrente
|
||||
Dim ParamList As New List(Of MachiningParam.Params)({MachiningParam.Params.RIBSTYPE,
|
||||
Dim ParamList As New List(Of MachiningParam.Params)({MachiningParam.Params.RIBSSTRANDWIDTH,
|
||||
MachiningParam.Params.RIBSTYPE,
|
||||
MachiningParam.Params.RIBSOVERLAP,
|
||||
MachiningParam.Params.RIBSSTRANDOVERLAP,
|
||||
MachiningParam.Params.RIBSSTRANDCOUNT,
|
||||
MachiningParam.Params.RIBSLINK,
|
||||
MachiningParam.Params.RIBSLINKFILLET,
|
||||
MachiningParam.Params.RIBSMERGEWITHSHELL,
|
||||
MachiningParam.Params.RIBSINVERTDIRECTION,
|
||||
MachiningParam.Params.RIBSINVERTSTRANDORDER,
|
||||
MachiningParam.Params.RIBSLEADININVERT,
|
||||
@@ -67,12 +71,13 @@ Public Class CopyFromWndVM
|
||||
MachiningParam.Params.RIBSLEADOUTLEN,
|
||||
MachiningParam.Params.RIBSLEADOUTCOASTING,
|
||||
MachiningParam.Params.RIBSLEADOUTWIPE,
|
||||
MachiningParam.Params.RIBSLEADOUTWIPEDIR})
|
||||
MachiningParam.Params.RIBSLEADOUTWIPEDIR,
|
||||
MachiningParam.Params.RIBSLEADFILLET})
|
||||
For Each Param In ParamList
|
||||
Select Case Map.refRibPanelVM.SelRib.Type
|
||||
'Case RibEntity.RibTypes.FROMDRAW
|
||||
' CopyParam(Param, m_SelRib.nExtrusionId, Map.refRibPanelVM.SelRib.nCurveId)
|
||||
' CopyParam(Param, m_SelRib.nExtrusionId, Map.refRibPanelVM.SelRib.nExtrusionId)
|
||||
Case RibEntity.RibTypes.FROMDRAW
|
||||
CopyParam(Param, m_SelRib.nExtrusionId, Map.refRibPanelVM.SelRib.nCurveId)
|
||||
CopyParam(Param, m_SelRib.nExtrusionId, Map.refRibPanelVM.SelRib.nExtrusionId)
|
||||
Case RibEntity.RibTypes.FROMIMPORT
|
||||
CopyParam(Param, m_SelRib.nExtrusionId, Map.refRibPanelVM.SelRib.nExtrusionId)
|
||||
End Select
|
||||
@@ -98,17 +103,26 @@ Public Class CopyFromWndVM
|
||||
Else
|
||||
RibTypeParam.SelValue = RibTypeParam.PartSelValue
|
||||
End If
|
||||
Case MachiningParam.Params.RIBSOVERLAP, MachiningParam.Params.RIBSSTRANDCOUNT, MachiningParam.Params.RIBSLEADINLEN, MachiningParam.Params.RIBSLEADOUTLEN,
|
||||
MachiningParam.Params.RIBSLEADOUTCOASTING, MachiningParam.Params.RIBSLEADOUTWIPE, MachiningParam.Params.RIBSLEADOUTWIPEDIR
|
||||
Case MachiningParam.Params.RIBSSTRANDWIDTH, MachiningParam.Params.RIBSOVERLAP, MachiningParam.Params.RIBSSTRANDOVERLAP, MachiningParam.Params.RIBSSTRANDCOUNT, MachiningParam.Params.RIBSLINKFILLET, MachiningParam.Params.RIBSLEADINLEN, MachiningParam.Params.RIBSLEADOUTLEN,
|
||||
MachiningParam.Params.RIBSLEADOUTCOASTING, MachiningParam.Params.RIBSLEADOUTWIPE, MachiningParam.Params.RIBSLEADOUTWIPEDIR, MachiningParam.Params.RIBSLEADFILLET
|
||||
Dim RibTypeParam As RibNumericMachiningParam = Nothing
|
||||
Dim dRibParam As Double = 0
|
||||
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
|
||||
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSOVERLAP)
|
||||
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
|
||||
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSSTRANDCOUNT)
|
||||
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
|
||||
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLEADINLEN)
|
||||
bRead = EgtGetInfo(nFromId, MAC_RIBSLEADINLEN, dRibParam)
|
||||
@@ -124,19 +138,25 @@ Public Class CopyFromWndVM
|
||||
Case MachiningParam.Params.RIBSLEADOUTWIPEDIR
|
||||
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLEADOUTWIPEDIR)
|
||||
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
|
||||
If Not IsNothing(RibTypeParam) AndAlso bRead Then
|
||||
RibTypeParam.SetValue(dRibParam)
|
||||
Else
|
||||
RibTypeParam.SetValue(RibTypeParam.dPartValue)
|
||||
End If
|
||||
Case MachiningParam.Params.RIBSLINK, MachiningParam.Params.RIBSINVERTDIRECTION, MachiningParam.Params.RIBSINVERTSTRANDORDER, MachiningParam.Params.RIBSLEADININVERT, MachiningParam.Params.RIBSLEADOUTINVERT
|
||||
Case MachiningParam.Params.RIBSLINK, MachiningParam.Params.RIBSMERGEWITHSHELL, MachiningParam.Params.RIBSINVERTDIRECTION, MachiningParam.Params.RIBSINVERTSTRANDORDER, MachiningParam.Params.RIBSLEADININVERT, MachiningParam.Params.RIBSLEADOUTINVERT
|
||||
Dim RibTypeParam As RibCheckMachiningParam = Nothing
|
||||
Dim bRibParam As Boolean = False
|
||||
Select Case Type
|
||||
Case MachiningParam.Params.RIBSLINK
|
||||
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLINK)
|
||||
bRead = EgtGetInfo(nFromId, MAC_RIBSLINK, bRibParam)
|
||||
Case MachiningParam.Params.RIBSMERGEWITHSHELL
|
||||
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSMERGEWITHSHELL)
|
||||
bRead = EgtGetInfo(nFromId, MAC_RIBSMERGEWITHSHELL, bRibParam)
|
||||
Case MachiningParam.Params.RIBSINVERTDIRECTION
|
||||
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSINVERTDIRECTION)
|
||||
bRead = EgtGetInfo(nFromId, MAC_RIBSINVERTDIRECTION, bRibParam)
|
||||
|
||||
@@ -42,10 +42,14 @@ Public Class RibParamPanelVM
|
||||
|
||||
m_Type = Cathegories.RIBS
|
||||
m_sName = "Ribs"
|
||||
m_MachiningParamList = New List(Of MachiningParam)({New RibComboMachiningParam(MachiningParam.Params.RIBSTYPE, nRibId, nPartId, Me),
|
||||
m_MachiningParamList = New List(Of MachiningParam)({New RibNumericMachiningParam(MachiningParam.Params.RIBSSTRANDWIDTH, nRibId, nPartId, Me),
|
||||
New RibComboMachiningParam(MachiningParam.Params.RIBSTYPE, 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 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.RIBSINVERTSTRANDORDER, nRibId, nPartId, Me),
|
||||
New RibCheckMachiningParam(MachiningParam.Params.RIBSLEADININVERT, nRibId, nPartId, Me),
|
||||
@@ -54,7 +58,8 @@ Public Class RibParamPanelVM
|
||||
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nRibId, nPartId, Me),
|
||||
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, 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(sName))
|
||||
End Sub
|
||||
@@ -192,13 +197,13 @@ Public Class RibNumericMachiningParam
|
||||
|
||||
Public Overrides Property sValue As String
|
||||
Get
|
||||
Return If(m_bIsLen, LenToString(m_dValue, 1), m_dValue)
|
||||
Return If(m_bIsLen, LenToString(m_dValue, 2), DoubleToString(m_dValue, 2))
|
||||
End Get
|
||||
Set(value As String)
|
||||
If m_bIsLen Then
|
||||
StringToLen(value, m_dValue)
|
||||
Else
|
||||
m_dValue = value
|
||||
StringToDouble(value, m_dValue)
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(sValue))
|
||||
NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
|
||||
@@ -230,14 +235,26 @@ Public Class RibNumericMachiningParam
|
||||
MyBase.New(Type, Cathegory)
|
||||
Dim bReadFromPart As Boolean = False
|
||||
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
|
||||
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSOVERLAP, m_dValue)
|
||||
EgtGetInfo(nPartId, MAC_RIBSOVERLAP, m_dPartValue)
|
||||
m_bIsLen = True
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSSTRANDOVERLAP
|
||||
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSSTRANDOVERLAP, m_dValue)
|
||||
EgtGetInfo(nPartId, MAC_RIBSSTRANDOVERLAP, m_dPartValue)
|
||||
m_bIsLen = False
|
||||
Case Params.RIBSSTRANDCOUNT
|
||||
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSSTRANDCOUNT, m_dValue)
|
||||
EgtGetInfo(nPartId, MAC_RIBSSTRANDCOUNT, m_dPartValue)
|
||||
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
|
||||
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSINVERTDIRECTION, m_dValue)
|
||||
EgtGetInfo(nPartId, MAC_RIBSINVERTDIRECTION, m_dPartValue)
|
||||
@@ -274,6 +291,10 @@ Public Class RibNumericMachiningParam
|
||||
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSLEADOUTWIPEDIR, m_dValue)
|
||||
EgtGetInfo(nPartId, MAC_RIBSLEADOUTWIPEDIR, m_dPartValue)
|
||||
m_bIsLen = True
|
||||
Case Params.RIBSLEADFILLET
|
||||
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSLEADFILLET, m_dValue)
|
||||
EgtGetInfo(nPartId, MAC_RIBSLEADFILLET, m_dPartValue)
|
||||
m_bIsLen = True
|
||||
End Select
|
||||
m_dOrigValue = m_dValue
|
||||
If Not bReadFromPart Then
|
||||
@@ -290,18 +311,36 @@ Public Class RibNumericMachiningParam
|
||||
sWriteValue = DoubleToString(m_dValue, 2)
|
||||
End If
|
||||
Select Case Type
|
||||
Case Params.RIBSSTRANDWIDTH
|
||||
If bIsModifiedFromPart Then
|
||||
EgtSetInfo(nRibId, MAC_RIBSSTRANDWIDTH, sWriteValue)
|
||||
Else
|
||||
EgtRemoveInfo(nRibId, MAC_RIBSSTRANDWIDTH)
|
||||
End If
|
||||
Case Params.RIBSOVERLAP
|
||||
If bIsModifiedFromPart Then
|
||||
EgtSetInfo(nRibId, MAC_RIBSOVERLAP, sWriteValue)
|
||||
Else
|
||||
EgtRemoveInfo(nRibId, MAC_RIBSOVERLAP)
|
||||
End If
|
||||
Case Params.RIBSSTRANDOVERLAP
|
||||
If bIsModifiedFromPart Then
|
||||
EgtSetInfo(nRibId, MAC_RIBSSTRANDOVERLAP, sWriteValue)
|
||||
Else
|
||||
EgtRemoveInfo(nRibId, MAC_RIBSSTRANDOVERLAP)
|
||||
End If
|
||||
Case Params.RIBSSTRANDCOUNT
|
||||
If bIsModifiedFromPart Then
|
||||
EgtSetInfo(nRibId, MAC_RIBSSTRANDCOUNT, sWriteValue)
|
||||
Else
|
||||
EgtRemoveInfo(nRibId, MAC_RIBSSTRANDCOUNT)
|
||||
End If
|
||||
Case Params.RIBSLINKFILLET
|
||||
If bIsModifiedFromPart Then
|
||||
EgtSetInfo(nRibId, MAC_RIBSLINKFILLET, sWriteValue)
|
||||
Else
|
||||
EgtRemoveInfo(nRibId, MAC_RIBSLINKFILLET)
|
||||
End If
|
||||
Case Params.RIBSINVERTDIRECTION
|
||||
If bIsModifiedFromPart Then
|
||||
EgtSetInfo(nRibId, MAC_RIBSINVERTDIRECTION, sWriteValue)
|
||||
@@ -356,6 +395,12 @@ Public Class RibNumericMachiningParam
|
||||
Else
|
||||
EgtRemoveInfo(nRibId, MAC_RIBSLEADOUTWIPEDIR)
|
||||
End If
|
||||
Case Params.RIBSLEADFILLET
|
||||
If bIsModifiedFromPart Then
|
||||
EgtSetInfo(nRibId, MAC_RIBSLEADFILLET, sWriteValue)
|
||||
Else
|
||||
EgtRemoveInfo(nRibId, MAC_RIBSLEADFILLET)
|
||||
End If
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -534,6 +579,9 @@ Public Class RibCheckMachiningParam
|
||||
Case Params.RIBSLINK
|
||||
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSLINK, m_bValue)
|
||||
EgtGetInfo(nPartId, MAC_RIBSLINK, m_bPartValue)
|
||||
Case Params.RIBSMERGEWITHSHELL
|
||||
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSMERGEWITHSHELL, m_bValue)
|
||||
EgtGetInfo(nPartId, MAC_RIBSMERGEWITHSHELL, m_bPartValue)
|
||||
Case Params.RIBSINVERTDIRECTION
|
||||
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSINVERTDIRECTION, m_bValue)
|
||||
EgtGetInfo(nPartId, MAC_RIBSINVERTDIRECTION, m_bPartValue)
|
||||
@@ -562,6 +610,12 @@ Public Class RibCheckMachiningParam
|
||||
Else
|
||||
EgtRemoveInfo(nRibId, MAC_RIBSLINK)
|
||||
End If
|
||||
Case Params.RIBSMERGEWITHSHELL
|
||||
If bIsModifiedFromPart Then
|
||||
EgtSetInfo(nRibId, MAC_RIBSMERGEWITHSHELL, If(m_bValue, 1, 0))
|
||||
Else
|
||||
EgtRemoveInfo(nRibId, MAC_RIBSMERGEWITHSHELL)
|
||||
End If
|
||||
Case Params.RIBSINVERTDIRECTION
|
||||
If bIsModifiedFromPart Then
|
||||
EgtSetInfo(nRibId, MAC_RIBSINVERTDIRECTION, If(m_bValue, 1, 0))
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports System.IO
|
||||
Imports System.Windows.Forms.VisualStyles.VisualStyleElement
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports Microsoft.Win32
|
||||
@@ -49,9 +50,8 @@ Public Class MySceneHostVM
|
||||
AddHandler MainController.OnOpenProject, AddressOf OnOpenProject
|
||||
AddHandler MainController.OnSavingProject, AddressOf OnSavingProject
|
||||
AddHandler MainController.OnSavedProject, AddressOf OnSavedProject
|
||||
AddHandler MainController.OnInsertingProject, AddressOf OnInsertingProject
|
||||
AddHandler MainController.OnInsertedProject, AddressOf OnInsertedProject
|
||||
AddHandler MainController.OnImportingProject, AddressOf OnImportingProject
|
||||
AddHandler MainController.OnImportedProject, AddressOf OnImportedProject
|
||||
AddHandler MainController.PrepareInputBox, AddressOf PrepareInputBox
|
||||
AddHandler MainController.SetInputBoxText, AddressOf SetInputBoxText
|
||||
AddHandler MainController.SetInputBoxCheck, AddressOf SetInputBoxCheck
|
||||
@@ -71,6 +71,8 @@ Public Class MySceneHostVM
|
||||
' Se tutto bene
|
||||
If MainScene.Init() And Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.BASE) Then
|
||||
PostInitializeScene()
|
||||
' Non imposto automaticamente il focus sulla scena muovendo il mouse sopra di essa (necessario click)
|
||||
MainScene.SetFocusOnMove( True, 0.3, 0.3, 0.1, 0.2)
|
||||
' Imposto stato gestione mouse diretto della scena a nessuno
|
||||
MainScene.SetStatusNull()
|
||||
EgtSetCurrentContext(MainScene.GetCtx())
|
||||
@@ -81,17 +83,33 @@ Public Class MySceneHostVM
|
||||
' Problemi
|
||||
' Se manca la chiave
|
||||
If Map.refMainWindowVM.MainWindowM.nKeyLevel = -1 Or Map.refMainWindowVM.MainWindowM.nKeyLevel = -2 Then
|
||||
EgtOutLog("Missing Dongle")
|
||||
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
|
||||
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3)
|
||||
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
|
||||
If Not EgtGetNetHwKey() Then
|
||||
EgtOutLog("Missing Dongle")
|
||||
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
|
||||
Dim sText As String = EgtMsg(10102) & vbCrLf & EgtMsg(10103)
|
||||
Dim sTitle As String = EgtMsg(10101)
|
||||
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Else
|
||||
EgtOutLog("NetDongle is full")
|
||||
' Box di avviso slot chiave di rete occupato : "Chiave di Rete completamente occupata. \n Uscire dal programma su un altro PC." "Errore"
|
||||
Dim sText As String = EgtMsg(10110) & vbCrLf & EgtMsg(10111)
|
||||
Dim sTitle As String = EgtMsg(10101)
|
||||
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
' Se altrimenti manca il collegamento con la chiave di rete
|
||||
ElseIf Map.refMainWindowVM.MainWindowM.nKeyLevel = -9 Then
|
||||
EgtOutLog("Missing Link with Net Dongle")
|
||||
' Box di avviso chiave mancante : "Collegamento con la Chiave di rete non riuscito. \n Verificare la connessione." "Errore"
|
||||
Dim sText As String = EgtMsg(10108) & vbCrLf & EgtMsg(10109)
|
||||
Dim sTitle As String = EgtMsg(10101)
|
||||
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' Altrimenti manca la licenza
|
||||
' Altrimenti manca la licenza
|
||||
Else
|
||||
EgtOutLog("Problems with Licence")
|
||||
' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
|
||||
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 5) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 6)
|
||||
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
|
||||
' Box di avviso licenza con problemi : sKeyInfo \n "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
|
||||
Dim sKeyInfo As String = "" : EgtGetKeyInfo(sKeyInfo)
|
||||
Dim sText As String = sKeyInfo & vbCrLf & EgtMsg(10105) & vbCrLf & EgtMsg(10106)
|
||||
Dim sTitle As String = EgtMsg(10101)
|
||||
If MessageBox.Show(sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
|
||||
' Apro dialogo per richiesta file licenza
|
||||
Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With {
|
||||
@@ -186,33 +204,24 @@ Public Class MySceneHostVM
|
||||
Private Sub PostInitializeScene()
|
||||
' Impostazioni Controller
|
||||
MainController.SetScene(MainScene)
|
||||
MainController.SetSurfTmTolerance(0.05)
|
||||
MainController.SetSurfTmTolerance(OptionModule.m_dGeometryTolerance)
|
||||
MainController.SetAdvImpTolerance(OptionModule.m_dGeometryTolerance)
|
||||
MainController.SetUseCustomColors(True, S_SCENE, K_CUSTOMCOLORS)
|
||||
' imposto unità di misura per interfaccia utente
|
||||
Dim bMmUnits As Boolean = GetMainPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0
|
||||
EgtSetUiUnits(bMmUnits)
|
||||
'Map.refMyStatusBarVM.SetMeasureUnit(nMeasureUnit <> 0)
|
||||
' imposto visualizzazione riferimento globale
|
||||
EgtSetGlobFrameShow(True)
|
||||
' imposto i dati della griglia
|
||||
Dim bGridVisibility As Boolean = (GetMainPrivateProfileInt(S_GRID, K_SHOWGRID, 1) <> 0)
|
||||
Dim dSnapStepMm As Double = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEP, 10)
|
||||
Dim dSnapStepInch As Double = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEPINCH, 10)
|
||||
Dim nMinLineSStep As Integer = GetMainPrivateProfileInt(S_GRID, K_MINLINESSTEP, 1)
|
||||
Dim nMajLineSStep As Integer = GetMainPrivateProfileInt(S_GRID, K_MAJLINESSTEP, 10)
|
||||
Dim nExtSStep As Integer = GetMainPrivateProfileInt(S_GRID, K_EXTSSTEP, 50)
|
||||
Dim MinLnColor As Color3d = New Color3d(160, 160, 160)
|
||||
GetMainPrivateProfileColor(S_GRID, K_MINLNCOLOR, MinLnColor)
|
||||
Dim MajLnColor As Color3d = New Color3d(160, 160, 160)
|
||||
GetMainPrivateProfileColor(S_GRID, K_MAJLNCOLOR, MajLnColor)
|
||||
EgtSetGridFrame(Frame3d.GLOB)
|
||||
If bMmUnits Then
|
||||
EgtSetGridGeo(dSnapStepMm, nMinLineSStep, nMajLineSStep, nExtSStep)
|
||||
Else
|
||||
EgtSetGridGeo(dSnapStepInch, nMinLineSStep, nMajLineSStep, nExtSStep)
|
||||
End If
|
||||
EgtSetGridGeo( If( bMmUnits, OptionModule.m_dSnapStepMm, OptionModule.m_dSnapStepInch),
|
||||
OptionModule.m_nMinLineSStep, OptionModule.m_nMajLineSStep, OptionModule.m_nExtSStep)
|
||||
EgtSetGridColor(MinLnColor, MajLnColor)
|
||||
EgtSetGridShow(bGridVisibility, bGridVisibility)
|
||||
EgtSetGridShow(OptionModule.m_bGridVisibility, OptionModule.m_bGridVisibility)
|
||||
' imposto tipo coordinate
|
||||
MainScene.SetGridCursorPos(True)
|
||||
' visualizzazione avanzata dei triangoli costituenti le superfici
|
||||
@@ -285,10 +294,12 @@ Public Class MySceneHostVM
|
||||
If String.IsNullOrWhiteSpace(sCurrFile) Or EgtGetFileType(sCurrFile) <> FT.NGE Then
|
||||
bOk = SaveAsProject()
|
||||
Else
|
||||
Dim bDeleteNgeFile As Boolean = Path.GetExtension(sCurrFile) = ".nge"
|
||||
Dim bDeleteNgeFile As Boolean = ( Path.GetExtension(sCurrFile) = ".nge")
|
||||
EgtSetCurrFilePath(Path.ChangeExtension(sCurrFile, "icrs"))
|
||||
' Formato di salvataggio
|
||||
Dim nSaveType As NGE = DirectCast( GetMainPrivateProfileInt(S_GEOMDB, K_SAVETYPE, NGE.CMPTEXT), NGE)
|
||||
' Salvataggio standard
|
||||
bOk = MainController.SaveProject()
|
||||
bOk = MainController.SaveProject(nSaveType)
|
||||
If bOk AndAlso bDeleteNgeFile AndAlso File.Exists(sCurrFile) Then
|
||||
Try
|
||||
File.Delete(sCurrFile)
|
||||
@@ -321,8 +332,10 @@ Public Class MySceneHostVM
|
||||
If SaveFileDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
|
||||
Dim sFileName As String = SaveFileDialog.FileName
|
||||
EgtSetCurrFilePath(sFileName)
|
||||
' Formato di salvataggio
|
||||
Dim nSaveType As NGE = DirectCast( GetMainPrivateProfileInt(S_GEOMDB, K_SAVETYPE, NGE.CMPTEXT), NGE)
|
||||
' Salvataggio standard
|
||||
bOk = MainController.SaveProject()
|
||||
bOk = MainController.SaveProject(nSaveType)
|
||||
End If
|
||||
m_bIsSaveAs = False
|
||||
' Imposto stato gestione mouse diretto della scena a nessuno
|
||||
@@ -346,7 +359,9 @@ Public Class MySceneHostVM
|
||||
"|Iges files (*.igs;*.iges)|*.igs;*.iges" &
|
||||
"|Step files (*.stp;*.step)|*.stp;*.step" &
|
||||
"|3D Manufacturing format (*.3mf)|*.3mf" &
|
||||
"|Rhino format (*.3dm)|*.3dm" &
|
||||
"|New geometry EgalTech(*.nge)|*.nge" &
|
||||
"|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" &
|
||||
"|All Files (*.*)|*.*",
|
||||
.FilterIndex = ExtIndex,
|
||||
.InitialDirectory = sDir}
|
||||
@@ -354,8 +369,7 @@ Public Class MySceneHostVM
|
||||
Return False
|
||||
End If
|
||||
WriteMainPrivateProfileString(S_PRINTING3D, K_IMPORTCURREXTENSION, OpenFileDialog.FilterIndex)
|
||||
Dim sFile As String = String.Empty
|
||||
sFile = OpenFileDialog.FileName
|
||||
Dim sFile As String = OpenFileDialog.FileName
|
||||
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
|
||||
Map.refProjManagerVM.SetProjCmdIsEnabled(False)
|
||||
Map.refTopPanelVM.SetTopPanelIsEnabled(False)
|
||||
@@ -409,9 +423,11 @@ Public Class MySceneHostVM
|
||||
"|Iges files (*.igs;*.iges)|*.igs;*.iges" &
|
||||
"|Step files (*.stp;*.step)|*.stp;*.step" &
|
||||
"|3D Manufacturing format (*.3mf)|*.3mf" &
|
||||
"|Rhino format (*.3dm)|*.3dm" &
|
||||
"|New geometry EgalTech(*.nge)|*.nge" &
|
||||
"|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" &
|
||||
"|All Files (*.*)|*.*",
|
||||
.FilterIndex = 1,
|
||||
.FilterIndex = 7,
|
||||
.InitialDirectory = sDir}
|
||||
If Not OpenFileDialog.ShowDialog Then
|
||||
Return False
|
||||
@@ -424,29 +440,35 @@ Public Class MySceneHostVM
|
||||
' sposto le nuove geometrie nel layer rib del pezzo
|
||||
Dim nNewPartId As Integer = EgtGetLastPart()
|
||||
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
|
||||
Dim frLayer As New Frame3d
|
||||
EgtGetGroupGlobFrame( nNewLayerId, frLayer)
|
||||
Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId)
|
||||
While nNewEntityId <> GDB_ID.NULL
|
||||
Dim EntityType As GDB_TY = EgtGetType(nNewEntityId)
|
||||
Select Case EntityType
|
||||
Case GDB_TY.CRV_COMPO, GDB_TY.CRV_LINE, GDB_TY.CRV_ARC
|
||||
Dim nNewRib = nNewEntityId
|
||||
Dim nNewRib As Integer = GDB_ID.NULL
|
||||
If EntityType = GDB_TY.CRV_LINE OrElse EntityType = GDB_TY.CRV_ARC Then
|
||||
nNewRib = EgtCreateCurveCompo(Map.refTopPanelVM.SelPart.nPartId, nNewEntityId, False)
|
||||
nNewRib = EgtCreateCurveCompo(nNewLayerId, nNewEntityId, False)
|
||||
EgtRelocate( nNewRib, Map.refRibPanelVM.nRibLayerId, GDB_POS.LAST_SON)
|
||||
Else
|
||||
' lo copio nel layer dei rib
|
||||
nNewRib = EgtCopy(nNewEntityId, Map.refRibPanelVM.nRibLayerId, GDB_POS.LAST_SON)
|
||||
End If
|
||||
EgtSetName(nNewRib, RIB_CURVE)
|
||||
' elimino effetti di eventuale riferimento originale
|
||||
EgtTransform( nNewRib, frLayer)
|
||||
' elimino colore entita'
|
||||
EgtResetColor(nNewEntityId)
|
||||
' lo aggiungo alla lista
|
||||
Dim NewEntity As RibEntity = New RibEntity(RibEntity.RibTypes.FROMIMPORT, nNewRib)
|
||||
Map.refRibPanelVM.RibList.Add(NewEntity)
|
||||
Case GDB_TY.SRF_MESH, GDB_TY.SRF_FRGN, GDB_TY.SRF_BEZ
|
||||
Dim nNewRib = nNewEntityId
|
||||
' lo copio nel layer dei rib
|
||||
nNewRib = EgtCopy(nNewEntityId, Map.refRibPanelVM.nRibLayerId, GDB_POS.LAST_SON)
|
||||
Dim nNewRib As Integer = EgtCopy(nNewEntityId, Map.refRibPanelVM.nRibLayerId, GDB_POS.LAST_SON)
|
||||
EgtSetName(nNewRib, RIB_EXTRUSION)
|
||||
' elimino effetti di eventuale riferimento originale
|
||||
EgtTransform( nNewRib, frLayer)
|
||||
' elimino colore entita'
|
||||
EgtResetColor(nNewEntityId)
|
||||
' lo aggiungo alla lista
|
||||
@@ -480,21 +502,24 @@ Public Class MySceneHostVM
|
||||
"|Iges files (*.igs;*.iges)|*.igs;*.iges" &
|
||||
"|Step files (*.stp;*.step)|*.stp;*.step" &
|
||||
"|3D Manufacturing format (*.3mf)|*.3mf" &
|
||||
"|Rhino format (*.3dm)|*.3dm" &
|
||||
"|New geometry EgalTech(*.nge)|*.nge" &
|
||||
"|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" &
|
||||
"|All Files (*.*)|*.*",
|
||||
.FilterIndex = 1,
|
||||
.FilterIndex = 7,
|
||||
.InitialDirectory = sDir}
|
||||
If Not OpenFileDialog.ShowDialog Then
|
||||
Return False
|
||||
End If
|
||||
Dim sFile As String = String.Empty
|
||||
sFile = OpenFileDialog.FileName
|
||||
Dim sFile As String = OpenFileDialog.FileName
|
||||
' importo la nuova geometria
|
||||
Dim bOk As Boolean = MainController.InsertProject(sFile, False)
|
||||
If bOk Then
|
||||
' sposto le nuove geometrie nel layer rib del pezzo
|
||||
Dim nNewPartId As Integer = EgtGetLastPart()
|
||||
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
|
||||
Dim frLayer As New Frame3d
|
||||
EgtGetGroupGlobFrame( nNewLayerId, frLayer)
|
||||
' verifico che ci sia una sola entita'
|
||||
If EgtGetGroupObjs(nNewLayerId) <> 1 Then
|
||||
MessageBox.Show("Impossible importing file that contains more than one entity.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
@@ -503,6 +528,8 @@ Public Class MySceneHostVM
|
||||
If MenuItem.OrigLayer.EntityList.Count > 0 AndAlso MenuItem.OrigLayer.EntityList(0).nId <> GDB_ID.NULL Then EgtErase(MenuItem.OrigLayer.EntityList(0).nId)
|
||||
Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId)
|
||||
EgtRelocate(nNewEntityId, MenuItem.OrigLayer.nLayerId, GDB_POS.LAST_SON)
|
||||
' elimino effetti di eventuale riferimento originale
|
||||
EgtTransform( nNewEntityId, frLayer)
|
||||
' elimino colore entita'
|
||||
EgtResetColor(nNewEntityId)
|
||||
' aggiorno riferimento pezzo
|
||||
@@ -538,9 +565,11 @@ Public Class MySceneHostVM
|
||||
"|Iges files (*.igs;*.iges)|*.igs;*.iges" &
|
||||
"|Step files (*.stp;*.step)|*.stp;*.step" &
|
||||
"|3D Manufacturing format (*.3mf)|*.3mf" &
|
||||
"|Rhino format (*.3dm)|*.3dm" &
|
||||
"|New geometry EgalTech(*.nge)|*.nge" &
|
||||
"|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" &
|
||||
"|All Files (*.*)|*.*",
|
||||
.FilterIndex = 1,
|
||||
.FilterIndex = 7,
|
||||
.InitialDirectory = sDir}
|
||||
If Not OpenFileDialog.ShowDialog Then
|
||||
Return False
|
||||
@@ -553,29 +582,35 @@ Public Class MySceneHostVM
|
||||
' sposto le nuove geometrie nel layer ShellNumber del pezzo
|
||||
Dim nNewPartId As Integer = EgtGetLastPart()
|
||||
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
|
||||
Dim frLayer As New Frame3d
|
||||
EgtGetGroupGlobFrame( nNewLayerId, frLayer)
|
||||
Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId)
|
||||
While nNewEntityId <> GDB_ID.NULL
|
||||
Dim EntityType As GDB_TY = EgtGetType(nNewEntityId)
|
||||
Select Case EntityType
|
||||
Case GDB_TY.CRV_COMPO, GDB_TY.CRV_LINE, GDB_TY.CRV_ARC
|
||||
Dim nNewShellNumberId As Integer = nNewEntityId
|
||||
Dim nNewShellNumberId As Integer = GDB_ID.NULL
|
||||
If EntityType = GDB_TY.CRV_LINE OrElse EntityType = GDB_TY.CRV_ARC Then
|
||||
nNewShellNumberId = EgtCreateCurveCompo(Map.refTopPanelVM.SelPart.nPartId, nNewEntityId, False)
|
||||
nNewShellNumberId = EgtCreateCurveCompo(nNewLayerId, nNewEntityId, False)
|
||||
EgtRelocate( nNewShellNumberId, Map.refShellNumberPanelVM.nShellNumberLayerId, GDB_POS.LAST_SON)
|
||||
Else
|
||||
' lo copio nel layer dei shellnumber
|
||||
nNewShellNumberId = EgtCopy(nNewEntityId, Map.refShellNumberPanelVM.nShellNumberLayerId, GDB_POS.LAST_SON)
|
||||
End If
|
||||
EgtSetName(nNewShellNumberId, RIB_CURVE)
|
||||
' elimino effetti di eventuale riferimento originale
|
||||
EgtTransform( nNewShellNumberId, frLayer)
|
||||
' elimino colore entita'
|
||||
EgtResetColor(nNewEntityId)
|
||||
' lo aggiungo alla lista
|
||||
Dim NewEntity As ShellNumberEntity = New ShellNumberEntity(ShellNumberEntity.ShellNumberTypes.FROMIMPORT, nNewShellNumberId)
|
||||
Map.refShellNumberPanelVM.ShellNumberList.Add(NewEntity)
|
||||
Case GDB_TY.SRF_MESH, GDB_TY.SRF_FRGN, GDB_TY.SRF_BEZ
|
||||
Dim nNewShellNumberId = nNewEntityId
|
||||
' lo copio nel layer dei rib
|
||||
nNewShellNumberId = EgtCopy(nNewEntityId, Map.refShellNumberPanelVM.nShellNumberLayerId, GDB_POS.LAST_SON)
|
||||
' lo copio nel layer dei shellnumber
|
||||
Dim nNewShellNumberId As Integer = EgtCopy(nNewEntityId, Map.refShellNumberPanelVM.nShellNumberLayerId, GDB_POS.LAST_SON)
|
||||
EgtSetName(nNewShellNumberId, RIB_EXTRUSION)
|
||||
' elimino effetti di eventuale riferimento originale
|
||||
EgtTransform( nNewShellNumberId, frLayer)
|
||||
' elimino colore entita'
|
||||
EgtResetColor(nNewEntityId)
|
||||
' lo aggiungo alla lista
|
||||
@@ -585,7 +620,7 @@ Public Class MySceneHostVM
|
||||
nNewEntityId = EgtGetNext(nNewEntityId)
|
||||
End While
|
||||
EgtErase(nNewPartId)
|
||||
' seleziono ultima rib
|
||||
' seleziono ultima ShellNumber
|
||||
Map.refShellNumberPanelVM.SelLastShellNumber()
|
||||
EgtDraw()
|
||||
' Imposto flag di ricalcolo slice
|
||||
@@ -609,9 +644,11 @@ Public Class MySceneHostVM
|
||||
"|Iges files (*.igs;*.iges)|*.igs;*.iges" &
|
||||
"|Step files (*.stp;*.step)|*.stp;*.step" &
|
||||
"|3D Manufacturing format (*.3mf)|*.3mf" &
|
||||
"|Rhino format (*.3dm)|*.3dm" &
|
||||
"|New geometry EgalTech(*.nge)|*.nge" &
|
||||
"|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" &
|
||||
"|All Files (*.*)|*.*",
|
||||
.FilterIndex = 1,
|
||||
.FilterIndex = 7,
|
||||
.InitialDirectory = sDir}
|
||||
If Not OpenFileDialog.ShowDialog Then
|
||||
Return False
|
||||
@@ -624,29 +661,35 @@ Public Class MySceneHostVM
|
||||
' sposto le nuove geometrie nel layer ShellNumber del pezzo
|
||||
Dim nNewPartId As Integer = EgtGetLastPart()
|
||||
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
|
||||
Dim frLayer As New Frame3d
|
||||
EgtGetGroupGlobFrame( nNewLayerId, frLayer)
|
||||
Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId)
|
||||
While nNewEntityId <> GDB_ID.NULL
|
||||
Dim EntityType As GDB_TY = EgtGetType(nNewEntityId)
|
||||
Select Case EntityType
|
||||
Case GDB_TY.CRV_COMPO, GDB_TY.CRV_LINE, GDB_TY.CRV_ARC
|
||||
Dim nNewFilledSolidId As Integer = nNewEntityId
|
||||
Dim nNewFilledSolidId As Integer = GDB_ID.NULL
|
||||
If EntityType = GDB_TY.CRV_LINE OrElse EntityType = GDB_TY.CRV_ARC Then
|
||||
nNewFilledSolidId = EgtCreateCurveCompo(Map.refTopPanelVM.SelPart.nPartId, nNewEntityId, False)
|
||||
nNewFilledSolidId = EgtCreateCurveCompo(nNewLayerId, nNewEntityId, False)
|
||||
EgtRelocate( nNewFilledSolidId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON)
|
||||
Else
|
||||
' lo copio nel layer dei shellnumber
|
||||
' lo copio nel layer dei FilledSolid
|
||||
nNewFilledSolidId = EgtCopy(nNewEntityId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON)
|
||||
End If
|
||||
EgtSetName(nNewFilledSolidId, RIB_CURVE)
|
||||
' elimino effetti di eventuale riferimento originale
|
||||
EgtTransform( nNewFilledSolidId, frLayer)
|
||||
' elimino colore entita'
|
||||
EgtResetColor(nNewEntityId)
|
||||
' lo aggiungo alla lista
|
||||
Dim NewEntity As FilledSolidEntity = New FilledSolidEntity(FilledSolidEntity.FilledSolidTypes.FROMIMPORT, nNewFilledSolidId)
|
||||
Map.refFilledSolidPanelVM.FilledSolidList.Add(NewEntity)
|
||||
Case GDB_TY.SRF_MESH, GDB_TY.SRF_FRGN, GDB_TY.SRF_BEZ
|
||||
Dim nNewFilledSolidId = nNewEntityId
|
||||
' lo copio nel layer dei rib
|
||||
nNewFilledSolidId = EgtCopy(nNewEntityId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON)
|
||||
' lo copio nel layer dei FilledSolid
|
||||
Dim nNewFilledSolidId As Integer = EgtCopy(nNewEntityId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON)
|
||||
EgtSetName(nNewFilledSolidId, RIB_EXTRUSION)
|
||||
' elimino effetti di eventuale riferimento originale
|
||||
EgtTransform( nNewFilledSolidId, frLayer)
|
||||
' elimino colore entita'
|
||||
EgtResetColor(nNewEntityId)
|
||||
' lo aggiungo alla lista
|
||||
@@ -656,7 +699,7 @@ Public Class MySceneHostVM
|
||||
nNewEntityId = EgtGetNext(nNewEntityId)
|
||||
End While
|
||||
EgtErase(nNewPartId)
|
||||
' seleziono ultima rib
|
||||
' seleziono ultima FilledSolid
|
||||
Map.refFilledSolidPanelVM.SelLastFilledSolid()
|
||||
EgtDraw()
|
||||
' Imposto flag di ricalcolo slice
|
||||
@@ -682,6 +725,26 @@ Public Class MySceneHostVM
|
||||
Return MainController.ExportProject(SaveFileDialog.FileName, False)
|
||||
End Function
|
||||
|
||||
Public Function ExportProjectForMachine(sFilePath As String) As Boolean
|
||||
' Reset controller e scena
|
||||
MainController.ResetStatus()
|
||||
MainController.SetDefaultFilterForExport(EEX_FLT.MODE_HIDDEN + EEX_FLT.MODE_STD + EEX_FLT.STAT_ON + EEX_FLT.STAT_OFF + EEX_FLT.LEV_TEMP)
|
||||
Return MainController.ExportGeomId(Map.refTopPanelVM.SelPart.nPartId, sFilePath, False)
|
||||
End Function
|
||||
Public Function ExportProjectForMachine(sDirPath As String, b3dm As Boolean, ByRef sFilePath As String) As Boolean
|
||||
sFilePath = sDirPath & "\ProjectSlice" & If(b3dm, ".3dm", ".3mf")
|
||||
' Reset controller e scena
|
||||
MainController.ResetStatus()
|
||||
MainController.SetDefaultFilterForExport(EEX_FLT.MODE_HIDDEN + EEX_FLT.MODE_STD + EEX_FLT.STAT_ON + EEX_FLT.STAT_OFF + EEX_FLT.LEV_TEMP)
|
||||
Dim nExportGeomId As Integer = 0
|
||||
If b3dm Then
|
||||
If Not ExecPrepare3dmExport(nExportGeomId) Then Return False
|
||||
Else
|
||||
nExportGeomId = Map.refTopPanelVM.SelPart.nPartId
|
||||
End If
|
||||
Return MainController.ExportGeomId(nExportGeomId, sFilePath, False)
|
||||
End Function
|
||||
|
||||
Public Overrides Function ExecScript(sFilePath As String) As Boolean
|
||||
Dim bOk As Boolean = False
|
||||
If String.IsNullOrEmpty(sFilePath) Then
|
||||
@@ -1089,6 +1152,10 @@ Public Class MySceneHostVM
|
||||
"Please select another material!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
End If
|
||||
End If
|
||||
' aggiorno punto di vista e griglia
|
||||
EgtSetView( CurrentMachine.nStandardView, False)
|
||||
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
|
||||
EgtZoom(ZM.ALL, False)
|
||||
' leggo pezzi
|
||||
Map.refTopPanelVM.PartList.Clear()
|
||||
Dim bProjectToRecalc As Boolean = False
|
||||
@@ -1147,7 +1214,7 @@ Public Class MySceneHostVM
|
||||
' imposto modalita' modifica
|
||||
Map.refTopPanelVM.SelPage = Pages.MODIFY
|
||||
|
||||
EgtZoom(ZM.ALL)
|
||||
EgtDraw()
|
||||
|
||||
MainScene.SetStatusNull()
|
||||
End Sub
|
||||
@@ -1173,6 +1240,17 @@ Public Class MySceneHostVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OnInsertingProject(sender As Object, nType As Integer, ByRef nFlag As Integer)
|
||||
If nType = FT.OBJ Or nType = FT.IGES Or nType = FT.STEP_ Or nType = FT.ACIS Or
|
||||
nType = FT.PARASOLID Or nType = FT.JT Or nType = FT.VRML Or nType = FT.C3D Then
|
||||
nFlag = GetMainPrivateProfileInt(S_IMPORT, K_ADVFLAG, 0)
|
||||
Dim dToler As Double = GetMainPrivateProfileDouble(S_IMPORT, K_ADVTOLER, 0.1)
|
||||
MainController.SetAdvImpTolerance( dToler)
|
||||
Else
|
||||
nFlag = 0
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OnInsertedProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean)
|
||||
' Segnalo eventuale errore
|
||||
If Not bOk Then
|
||||
@@ -1185,37 +1263,6 @@ Public Class MySceneHostVM
|
||||
MainScene.SetStatusNull()
|
||||
End Sub
|
||||
|
||||
Private Sub OnImportingProject(sender As Object, nType As Integer, ByRef nFlag As Integer)
|
||||
If nType <> FT.NULL Then
|
||||
If nType = FT.CNC Then
|
||||
nFlag = GetMainPrivateProfileInt(S_IMPORT, K_CNCFLAG, EIC_FL.NONE)
|
||||
Else
|
||||
nFlag = 0
|
||||
End If
|
||||
' Abilito progress e bottone stop
|
||||
Map.refMyStatusBarVM.StartLoading("", True)
|
||||
Else
|
||||
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OnImportedProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean)
|
||||
EgtZoom(ZM.ALL)
|
||||
' Disabilito progress e bottone stop
|
||||
Map.refMyStatusBarVM.EndLoading("")
|
||||
' Salvo path
|
||||
WriteMainPrivateProfileString(S_GENERAL, K_LASTIMPDIR, Path.GetDirectoryName(sFile))
|
||||
' Segnalo eventuale errore
|
||||
If Not bOk Then
|
||||
Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file
|
||||
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
ElseIf Path.GetExtension(sFile) <> ".cnc" Then
|
||||
' creo oggetto pezzo in lista
|
||||
'Map.refProjectVM.
|
||||
End If
|
||||
MainScene.SetStatusNull()
|
||||
End Sub
|
||||
|
||||
Private Sub PrepareInputBox(ByVal sTitle As String, ByVal sLabel As String, ByVal sCheckLabel As String,
|
||||
ByVal bShowCombo As Boolean, ByVal bShowBtn As Boolean)
|
||||
Map.refControllerInputPanelVM.PrepareInputBox(sTitle, sLabel, sCheckLabel, bShowCombo, bShowBtn)
|
||||
@@ -1488,6 +1535,8 @@ Public Class MySceneHostVM
|
||||
' eseguo comando
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
|
||||
Map.refStartMachPanelVM.ResetCPlaneObjIsActive()
|
||||
' imposto dimensioni griglia standard (non tavola)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
' ripristino selezioni precedenti
|
||||
For Each Id In Map.refStartMachPanelVM.PrevSelObjs
|
||||
EgtSelectObj(Id)
|
||||
@@ -1572,6 +1621,8 @@ Public Class MySceneHostVM
|
||||
' eseguo comando
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
|
||||
Map.refRibPanelVM.ResetCPlaneObjIsActive()
|
||||
' imposto dimensioni griglia standard (non tavola)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
' ripristino selezioni precedenti
|
||||
For Each Id In Map.refRibPanelVM.PrevSelObjs
|
||||
EgtSelectObj(Id)
|
||||
@@ -1657,6 +1708,8 @@ Public Class MySceneHostVM
|
||||
' eseguo comando
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
|
||||
Map.refShellNumberPanelVM.ResetCPlaneObjIsActive()
|
||||
' imposto dimensioni griglia standard (non tavola)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
' ripristino selezioni precedenti
|
||||
For Each Id In Map.refShellNumberPanelVM.PrevSelObjs
|
||||
EgtSelectObj(Id)
|
||||
@@ -1742,6 +1795,8 @@ Public Class MySceneHostVM
|
||||
' eseguo comando
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
|
||||
Map.refFilledSolidPanelVM.ResetCPlaneObjIsActive()
|
||||
' imposto dimensioni griglia standard (non tavola)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
' ripristino selezioni precedenti
|
||||
For Each Id In Map.refFilledSolidPanelVM.PrevSelObjs
|
||||
EgtSelectObj(Id)
|
||||
|
||||
@@ -37,7 +37,7 @@ Public Class SecondaryWindowV
|
||||
End Sub
|
||||
|
||||
Private Sub SecondaryWindowV_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs)
|
||||
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
||||
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt AndAlso Keyboard.IsKeyDown(Key.F4) Then
|
||||
e.Cancel = True
|
||||
Return
|
||||
End If
|
||||
|
||||
@@ -97,7 +97,7 @@ Public Class SecondaryWindowVM
|
||||
' imposto SnapPoint
|
||||
Map.refMyStatusBarVM.SetSnapPointType(Map.refSceneHostVM.SnapType)
|
||||
Map.refMyStatusBarVM.SetMeasureUnit(EgtUiUnitsAreMM)
|
||||
EgtSetView(VT.ISO_SW, False)
|
||||
EgtSetView(CurrentMachine.nStandardView, False)
|
||||
' provo a caricare progetto da linea di comando
|
||||
If Not ProcessCommandLine() Then
|
||||
' altrimenti creo nuovo progetto di partenza
|
||||
|
||||
@@ -600,6 +600,7 @@ Public Class ShellNumberPanelVM
|
||||
Friend Sub Dispose()
|
||||
' ripristino frame originale
|
||||
EgtSetGridFrame(m_OriginalGridFrame)
|
||||
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
|
||||
' se in modifica parametri
|
||||
If m_bMachParam_IsChecked Then
|
||||
' ripristino modalita' standard
|
||||
@@ -740,6 +741,7 @@ Public Class ShellNumberPanelVM
|
||||
If NewGeomType = GDB_TY.CRV_COMPO Then
|
||||
If Not EgtCurveIsClosed(nNewEntityId) Then
|
||||
EgtCloseCurveCompo(nNewEntityId)
|
||||
m_bEscOnLine2P = True
|
||||
End If
|
||||
EgtSetName(nNewEntityId, RIB_CURVE)
|
||||
' resetto colore entita'
|
||||
@@ -768,9 +770,6 @@ Public Class ShellNumberPanelVM
|
||||
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
|
||||
m_bIsCreatingExtrusion = True
|
||||
Map.refControllerInputPanelVM.IsChecked = True
|
||||
If Not EgtCurveIsClosed(nNewEntityId) Then
|
||||
m_bEscOnLine2P = True
|
||||
End If
|
||||
Else
|
||||
' cancello layer
|
||||
EgtErase(nNewExtrusionLayerId)
|
||||
@@ -1083,6 +1082,7 @@ Public Class ShellNumberPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneTop(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1108,6 +1108,7 @@ Public Class ShellNumberPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneFront(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1133,6 +1134,7 @@ Public Class ShellNumberPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneRight(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1158,6 +1160,7 @@ Public Class ShellNumberPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneBack(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1183,6 +1186,7 @@ Public Class ShellNumberPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneLeft(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1208,6 +1212,7 @@ Public Class ShellNumberPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneBottom(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -1234,6 +1239,7 @@ Public Class ShellNumberPanelVM
|
||||
Public Sub CPlaneElevation(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
ManageInterface(False)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
|
||||
End Sub
|
||||
|
||||
@@ -1259,87 +1265,12 @@ Public Class ShellNumberPanelVM
|
||||
Public Sub CPlaneOrigin(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
ManageInterface(False)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlaneOrigin
|
||||
|
||||
#Region "CPlaneRotate"
|
||||
|
||||
''' <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"
|
||||
|
||||
Private m_bCPlaneObj_IsActive As Boolean = False
|
||||
|
||||
@@ -135,13 +135,13 @@ Public Class ShellNumberNumericMachiningParam
|
||||
|
||||
Public Overrides Property sValue As String
|
||||
Get
|
||||
Return If(m_bIsLen, LenToString(m_dValue, 1), m_dValue)
|
||||
Return If(m_bIsLen, LenToString(m_dValue, 2), DoubleToString(m_dValue, 2))
|
||||
End Get
|
||||
Set(value As String)
|
||||
If m_bIsLen Then
|
||||
StringToLen(value, m_dValue)
|
||||
Else
|
||||
m_dValue = value
|
||||
StringToDouble(value, m_dValue)
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(sValue))
|
||||
NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
|
||||
|
||||
@@ -1,33 +1,40 @@
|
||||
<UniformGrid x:Class="ShowPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Icarus"
|
||||
Rows="1">
|
||||
|
||||
<local:CheckedImageRadioButton ToolTip="{Binding RenderingWFToolTip}"
|
||||
IsChecked="{Binding WireframeIsChecked}"
|
||||
ImageSource="/Resources/ShowPanel/RenderingWF.png"
|
||||
CheckedImageSource="/Resources/ShowPanel/RenderingWF_White.png"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource BottomPanel_ToggleButton}"/>
|
||||
<local:CheckedImageRadioButton ToolTip="{Binding RenderingHLToolTip}"
|
||||
IsChecked="{Binding HiddenLineIsChecked}"
|
||||
ImageSource="/Resources/ShowPanel/RenderingHL.png"
|
||||
CheckedImageSource="/Resources/ShowPanel/RenderingHL_White.png"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource BottomPanel_ToggleButton}"/>
|
||||
<local:CheckedImageRadioButton ToolTip="{Binding RenderingSHToolTip}"
|
||||
IsChecked="{Binding ShadingIsChecked}"
|
||||
ImageSource="/Resources/ShowPanel/RenderingSH.png"
|
||||
CheckedImageSource="/Resources/ShowPanel/RenderingSH_White.png"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource BottomPanel_ToggleButton}"/>
|
||||
<local:CheckedImageToggleButton ToolTip="{Binding CurveDirToolTip}"
|
||||
IsChecked="{Binding CurveDirIsChecked}"
|
||||
ImageSource="/Resources/ShowPanel/CurveDir.png"
|
||||
CheckedImageSource="/Resources/ShowPanel/CurveDir_White.png"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource BottomPanel_ToggleButton}"/>
|
||||
<Border x:Class="ShowPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Icarus"
|
||||
Background="{DynamicResource EgaltechWhite}"
|
||||
CornerRadius="4,0,0,0"
|
||||
Padding="10,0,0,0">
|
||||
|
||||
<UniformGrid Rows="1">
|
||||
|
||||
<local:CheckedImageRadioButton ToolTip="{Binding RenderingWFToolTip}"
|
||||
IsChecked="{Binding WireframeIsChecked}"
|
||||
ImageSource="/Resources/ShowPanel/RenderingWF.png"
|
||||
CheckedImageSource="/Resources/ShowPanel/RenderingWF_White.png"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource BottomPanel_ToggleButton}"/>
|
||||
<local:CheckedImageRadioButton ToolTip="{Binding RenderingHLToolTip}"
|
||||
IsChecked="{Binding HiddenLineIsChecked}"
|
||||
ImageSource="/Resources/ShowPanel/RenderingHL.png"
|
||||
CheckedImageSource="/Resources/ShowPanel/RenderingHL_White.png"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource BottomPanel_ToggleButton}"/>
|
||||
<local:CheckedImageRadioButton ToolTip="{Binding RenderingSHToolTip}"
|
||||
IsChecked="{Binding ShadingIsChecked}"
|
||||
ImageSource="/Resources/ShowPanel/RenderingSH.png"
|
||||
CheckedImageSource="/Resources/ShowPanel/RenderingSH_White.png"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource BottomPanel_ToggleButton}"/>
|
||||
<local:CheckedImageToggleButton ToolTip="{Binding CurveDirToolTip}"
|
||||
IsChecked="{Binding CurveDirIsChecked}"
|
||||
ImageSource="/Resources/ShowPanel/CurveDir.png"
|
||||
CheckedImageSource="/Resources/ShowPanel/CurveDir_White.png"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource BottomPanel_ToggleButton}"/>
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
</Border>
|
||||
|
||||
@@ -21,16 +21,30 @@ Public Class MySimulation
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bStopOnNextCollision As Boolean = True
|
||||
|
||||
Friend m_bSimulEndExitApp As Boolean = False
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property VMillAdditiveMsg As String
|
||||
Get
|
||||
Return "Virtual Additive"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
SetPlayImagePath("/Resources/SimulationPanel/Play.png")
|
||||
SetPauseImagePath("/Resources/SimulationPanel/Pause.png")
|
||||
SetPauseMsg(EgtMsg(90561)) ' Pausa
|
||||
SetStopMsg(EgtMsg(90562)) ' Simulazione interrotta
|
||||
SetHomeMsg(EgtMsg(90564)) ' Home
|
||||
SetPauseMsg(EgtMsg(5311)) ' Pausa
|
||||
SetStopMsg(EgtMsg(5312)) ' Stop
|
||||
SetHomeMsg(EgtMsg(5314)) ' Home
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
@@ -38,8 +52,10 @@ Public Class MySimulation
|
||||
#Region "METHODS"
|
||||
|
||||
Public Overrides Sub ExecSim()
|
||||
SetSimExecuting(True)
|
||||
EgtSimStart(False)
|
||||
EgtSimSetStep(SliderValue * GetSliderX())
|
||||
m_bStopOnNextCollision = True
|
||||
Dim nShowDataCounter As Integer = 0
|
||||
While GetStatus() <> MCH_SIM_ST.UI_STOP
|
||||
' Se simulazione in svolgimento
|
||||
@@ -52,30 +68,54 @@ Public Class MySimulation
|
||||
If GetStatus() = MCH_SIM_ST.UI_STEP And nMove = MCH_SIM.END_STEP Then
|
||||
' Imposto stato Pausa
|
||||
SetSimulationStatus(MCH_SIM_ST.UI_PAUSE)
|
||||
StatusMsg = EgtMsg(MSG_SIMULATIONPAGEUC + 11) ' Pausa
|
||||
StatusMsg = EgtMsg(5311) ' Pausa
|
||||
' Aggiornamenti per bottone Play/Pause
|
||||
SetShowPlay(True)
|
||||
NotifyPropertyChanged("PlayPauseImage")
|
||||
End If
|
||||
' Se movimento non riuscito
|
||||
' Se movimento con collisione
|
||||
ElseIf nMove = MCH_SIM.COLLISION Then
|
||||
If m_bStopOnNextCollision Then
|
||||
' Imposto stato Pausa
|
||||
SetSimulationStatus(MCH_SIM_ST.UI_PAUSE)
|
||||
StatusMsg = EgtMsg(5311) ' PAUSA
|
||||
' Aggiornamenti per bottone Play/Pause
|
||||
SetShowPlay(True)
|
||||
NotifyPropertyChanged("PlayPauseImage")
|
||||
' Messaggio
|
||||
MessageBox.Show(EgtMsg(5319), EgtMsg(5315), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
Else
|
||||
m_bStopOnNextCollision = True
|
||||
End If
|
||||
' Se movimento non riuscito
|
||||
Else
|
||||
SetSimulationStatus(MCH_SIM_ST.UI_STOP)
|
||||
' Aggiornamenti per bottone Play/Pause
|
||||
SetShowPlay(True)
|
||||
NotifyPropertyChanged("PlayPauseImage")
|
||||
' Eventuale messaggio
|
||||
Select Case nMove
|
||||
Case MCH_SIM.END_
|
||||
StatusMsg = EgtMsg(MSG_SIMULATIONPAGEUC + 1) 'Simulazione completata
|
||||
StatusMsg = EgtMsg(5301) 'Simulazione completata
|
||||
Case MCH_SIM.STOP_
|
||||
' Simulazione fermata dall'utente (non necessita messaggio)
|
||||
Case MCH_SIM.OUTSTROKE
|
||||
Dim sInfo As String = String.Empty
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo, EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Extracorsa ...
|
||||
'Extracorsa ...
|
||||
MessageBox.Show(EgtMsg(5302) & " " & sInfo, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Stop)
|
||||
Case MCH_SIM.DIR_ERR
|
||||
MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 3), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Direzione utensile irraggiungibile
|
||||
'Direzione utensile irraggiungibile
|
||||
MessageBox.Show(EgtMsg(5303), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Stop)
|
||||
Case Else
|
||||
MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 4), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Errore
|
||||
If EgtGetLastMachMgrErrorId() <> 0 Then
|
||||
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
||||
'..... - Errore
|
||||
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
Else
|
||||
'Errore - Errore
|
||||
MessageBox.Show(EgtMsg(5304), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Stop)
|
||||
End If
|
||||
End Select
|
||||
End If
|
||||
' Aggiorno stato visualizzazione macchina (dipende anche da utensile)
|
||||
@@ -83,14 +123,25 @@ Public Class MySimulation
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
' Aggiorno dati CNC
|
||||
ShowCncData()
|
||||
If nShowDataCounter = 5 Or GetSimulationStatus() = MCH_SIM_ST.UI_PAUSE Or GetSimulationStatus() = MCH_SIM_ST.UI_STOP Then
|
||||
ShowCncData()
|
||||
nShowDataCounter = 0
|
||||
ElseIf nShowDataCounter > 5 Then
|
||||
nShowDataCounter = 0
|
||||
Else
|
||||
nShowDataCounter += 1
|
||||
End If
|
||||
Else
|
||||
' Per evitare di ciclare rapidissimamente e consumare inutilmente CPU
|
||||
System.Threading.Thread.Sleep(1)
|
||||
System.Threading.Thread.Sleep(5)
|
||||
End If
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
End While
|
||||
SetSimExecuting(False)
|
||||
If m_bSimulEndExitApp Then
|
||||
refMainWindowVM.CloseApplication( Nothing)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub OnPostSetSimulationStatus(value As MCH_SIM_ST)
|
||||
@@ -104,6 +155,30 @@ Public Class MySimulation
|
||||
MachineAxisList(Index).IsReadOnlyAxesValue = True
|
||||
Next
|
||||
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
|
||||
|
||||
Public Sub Update_CncData( nFlag As Integer)
|
||||
ShowCncData()
|
||||
' Se fermo per Collisione rilevata da script Lua o per altra richiesta
|
||||
If nFlag = 11 Or nFlag = 12 Then
|
||||
' Imposto stato Pausa
|
||||
SetSimulationStatus(MCH_SIM_ST.UI_PAUSE)
|
||||
StatusMsg = EgtMsg(5311) ' PAUSA
|
||||
' Aggiornamenti per bottone Play/Pause
|
||||
SetShowPlay(True)
|
||||
NotifyPropertyChanged("PlayPauseImage")
|
||||
' Se fermo per Collisione, dichiaro di non arrestarsi alla successiva notifica di collisione
|
||||
If nFlag = 11 Then m_bStopOnNextCollision = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
@@ -67,6 +67,40 @@
|
||||
</Button>
|
||||
|
||||
</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}"
|
||||
TextAlignment="Center"
|
||||
Margin="2.5"
|
||||
|
||||
@@ -20,6 +20,15 @@ Public Class SimulationPanelVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property VirtualAdditive_Msg As String
|
||||
Get
|
||||
Return "Virtual Additive"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdOk As ICommand
|
||||
@@ -79,7 +88,7 @@ Public Class SimulationPanelVM
|
||||
UpdateUI()
|
||||
'Cambio la vista della scena
|
||||
EgtGetGenericView(m_dPrevAngVertDegView, m_dPrevAngHorizDegView)
|
||||
EgtSetView(VT.ISO_SW, False)
|
||||
EgtSetView(CurrentMachine.nStandardView, False)
|
||||
EgtSetMachineLook(MySimul.GetMachLook())
|
||||
' Nascondo griglia
|
||||
EgtSetGridShow(False, False)
|
||||
@@ -101,6 +110,32 @@ Public Class SimulationPanelVM
|
||||
MySimul.SliderValue = SliderVal
|
||||
MySimul.ShowCncData()
|
||||
MySimul.StatusMsg = EgtMsg(MSG_SIMULATIONPAGEUC + 14) ' Home
|
||||
' Gestione check VMill
|
||||
If GetMainPrivateProfileInt(S_SIMUL, K_VIRTUALADDITIVE, 0) > 0 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
|
||||
Map.refSliderManagerVM.SetSliderVisibility(False)
|
||||
Map.refViewLayerManagerVM.SetViewLayerManagerVisibility(False)
|
||||
@@ -147,7 +182,7 @@ Public Class SimulationPanelVM
|
||||
' Abilito impostazione modificato
|
||||
EgtEnableModified()
|
||||
' Ripristino vista griglia
|
||||
EgtSetGridShow(True, True)
|
||||
EgtSetGridShow(OptionModule.m_bGridVisibility, OptionModule.m_bGridVisibility)
|
||||
' Cambio la vista della scena
|
||||
EgtSetGenericView(m_dPrevAngVertDegView, m_dPrevAngHorizDegView, False)
|
||||
EgtZoom(ZM.ALL)
|
||||
@@ -166,6 +201,10 @@ Public Class SimulationPanelVM
|
||||
Map.refInstrumentPanelVM.SetEdgeAnalysisIsEnabled(True)
|
||||
End Sub
|
||||
|
||||
Friend Sub SimulationExpander_Update_CncData( nFlag As Integer)
|
||||
MySimul.Update_CncData(nFlag)
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
Imports EgtUILib
|
||||
Imports Microsoft.Win32
|
||||
Imports System.IO
|
||||
Imports Ionic.Zip
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Public Class SliceManagerVM
|
||||
Inherits VMBase
|
||||
@@ -454,6 +456,7 @@ Public Class SliceManagerVM
|
||||
' Definisco e posiziono il grezzo sulla tavola
|
||||
EgtAddMachGroup("3dPrint")
|
||||
EgtSetTable("Tab")
|
||||
EgtSetTableAreaOffset( 500, 500, 500, 500)
|
||||
For Each CurrPart In Map.refTopPanelVM.PartList
|
||||
Dim b3Part As New BBox3d
|
||||
Dim b3PrintSolid As New BBox3d
|
||||
@@ -705,17 +708,34 @@ Public Class SliceManagerVM
|
||||
End If
|
||||
End If
|
||||
' eseguo calcoli
|
||||
CalcSlice(True, True)
|
||||
Dim bOk As Boolean = CalcSlice(True, True)
|
||||
' se non ho interrotto calcoli
|
||||
If Not m_bStopScriptToManage Then
|
||||
If bShiftPressed Then
|
||||
' Se esiste ne lancio l'editing
|
||||
If File.Exists(sIsoFilePath) Then
|
||||
If bOk AndAlso Not m_bStopScriptToManage Then
|
||||
' Se esiste l'iso
|
||||
If File.Exists(sIsoFilePath) Then
|
||||
If bShiftPressed Then
|
||||
' Se esiste ne lancio l'editing
|
||||
Process.Start("Notepad.exe", sIsoFilePath)
|
||||
' altrimenti lo segnalo
|
||||
Else
|
||||
MessageBox.Show("Edit failed, missing part program file" & " (" & sIsoFilePath & ")")
|
||||
End If
|
||||
' verifico se creare pacchetto
|
||||
If Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.MACHINE_EXPORT) 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
|
||||
NotifyPropertyChanged(NameOf(Time_Visibility))
|
||||
NotifyPropertyChanged(NameOf(Mass_Visibility))
|
||||
@@ -725,6 +745,142 @@ Public Class SliceManagerVM
|
||||
m_bCalculating = False
|
||||
End Sub
|
||||
|
||||
Private Function CreateProjectForMachine(sIsoFilePath As String) As Boolean
|
||||
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
|
||||
Map.refProjManagerVM.SetProjCmdIsEnabled(False)
|
||||
Map.refTopPanelVM.SetTopPanelIsEnabled(False)
|
||||
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(False)
|
||||
Map.refTFSEditorVM.SetTFSEditorIsEnabled(False)
|
||||
Map.refSliderManagerVM.SetLayerIndexIsEnabled(False)
|
||||
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(False)
|
||||
SetButtonsIsEnabled(False)
|
||||
' creo cartella file da esportare in Temp
|
||||
Dim sExportTempFolderPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\MachineExport"
|
||||
If Directory.Exists(sExportTempFolderPath) Then
|
||||
Try
|
||||
Directory.Delete(sExportTempFolderPath, True)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error! Impossible deleting folder " & sExportTempFolderPath & "!")
|
||||
Return False
|
||||
End Try
|
||||
End If
|
||||
Try
|
||||
Directory.CreateDirectory(sExportTempFolderPath)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error! Impossible creating folder " & sExportTempFolderPath & "!")
|
||||
Return False
|
||||
End Try
|
||||
' mostro solido per eportazione
|
||||
Dim SolidCheck As ViewLayer = Map.refViewLayerManagerVM.LayerList.FirstOrDefault(Function(x) x.Type = ViewLayer.ViewLayerType.SOLID_SLICE)
|
||||
Dim CurrSolidCheckValue As Boolean? = SolidCheck.bIsVisible
|
||||
If IsNothing(SolidCheck.bIsVisible) OrElse Not SolidCheck.bIsVisible Then
|
||||
SolidCheck.bIsVisible = True
|
||||
End If
|
||||
' esporto file 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(CurrentMachine.nStandardView, False)
|
||||
SetTableVisibility(False)
|
||||
EgtZoom(ZM.ALL, False)
|
||||
'EgtExportSvg(GDB_ID.ROOT, sPreviewImagePath)
|
||||
EgtGetImage(SM.SHADING, New Color3d(255, 255, 255, 255), New Color3d(255, 255, 255, 255), 3000, 3000, sPreviewImagePath)
|
||||
EgtSetGenericView(nCurrAngVertDeg, nCurrAngHorizDeg, False)
|
||||
SetTableVisibility(True)
|
||||
EgtZoom(ZM.ALL, True)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
#End Region ' Generate
|
||||
|
||||
#Region "Simulate"
|
||||
|
||||
@@ -20,23 +20,22 @@ Public Class SliderManagerVM
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
Select Case m_nSelViewSlider
|
||||
Case ViewSliderType.ONLY_SELECTED
|
||||
' se diverso da nullo nascondo precedente
|
||||
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||
If m_nLayerIndex > 0 Then dLayerAdvancement = 100
|
||||
If m_nLayerIndex = 0 Then
|
||||
For Each Layer In Map.refTopPanelVM.SelPart.LayerList
|
||||
EgtSetStatus(Layer.nLayerId, GDB_ST.OFF)
|
||||
Next
|
||||
ElseIf m_nLayerIndex > 0 Then
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.OFF)
|
||||
End If
|
||||
' nascondo precedente
|
||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||
If m_nLayerIndex > 0 Then dLayerAdvancement = 100
|
||||
If m_nLayerIndex = 0 Then
|
||||
For Each Layer In Map.refTopPanelVM.SelPart.LayerList
|
||||
EgtSetStatus(Layer.nLayerId, GDB_ST.OFF)
|
||||
Next
|
||||
ElseIf m_nLayerIndex > 0 Then
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.OFF)
|
||||
End If
|
||||
m_nLayerIndex = value
|
||||
' se diverso da nullo visualizzo corrente
|
||||
If Not IsNothing(Map.refTopPanelVM.SelPart) AndAlso m_nLayerIndex > 0 Then EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.ON_)
|
||||
If m_nLayerIndex > 0 Then EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.ON_)
|
||||
' porto barra nuovo strato a 100
|
||||
If m_nLayerIndex > 0 Then SetLayerAdvancement(100)
|
||||
Case ViewSliderType.UNTIL_SELECTED
|
||||
@@ -64,6 +63,7 @@ Public Class SliderManagerVM
|
||||
End If
|
||||
m_nLayerIndex = value
|
||||
End Select
|
||||
DisableMgr.ReEnable()
|
||||
NotifyPropertyChanged(NameOf(ghShowValue))
|
||||
NotifyPropertyChanged(NameOf(ghValueIndex))
|
||||
NotifyPropertyChanged(NameOf(ghValueHeight))
|
||||
@@ -71,47 +71,44 @@ Public Class SliderManagerVM
|
||||
End Set
|
||||
End Property
|
||||
Private Sub SetLayerIndex(value As Integer)
|
||||
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
Select Case m_nSelViewSlider
|
||||
Case ViewSliderType.ONLY_SELECTED
|
||||
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
||||
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
||||
If nLayerInd = value - 1 Then
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
||||
Else
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
||||
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
||||
If nLayerInd = value - 1 Then
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
||||
Else
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
||||
End If
|
||||
Next
|
||||
m_nLayerIndex = value
|
||||
Case ViewSliderType.UNTIL_SELECTED
|
||||
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
||||
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
||||
If nLayerInd <= value - 1 Then
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
||||
Else
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
||||
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
||||
If nLayerInd <= value - 1 Then
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
||||
Else
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
||||
End If
|
||||
Next
|
||||
m_nLayerIndex = value
|
||||
Case ViewSliderType.FROM_SELECTED
|
||||
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
||||
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
||||
If nLayerInd >= value - 1 Then
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
||||
Else
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
||||
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
||||
If nLayerInd >= value - 1 Then
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
||||
Else
|
||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
||||
End If
|
||||
Next
|
||||
m_nLayerIndex = value
|
||||
End Select
|
||||
DisableMgr.ReEnable()
|
||||
NotifyPropertyChanged(NameOf(nLayerIndex))
|
||||
NotifyPropertyChanged(NameOf(ghShowValue))
|
||||
NotifyPropertyChanged(NameOf(ghValueIndex))
|
||||
@@ -201,6 +198,8 @@ Public Class SliderManagerVM
|
||||
Return m_dLayerAdvancement
|
||||
End Get
|
||||
Set(value As Double)
|
||||
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
Select Case m_nSelViewSlider
|
||||
Case ViewSliderType.ONLY_SELECTED
|
||||
Dim nTotSolid As Integer = 0
|
||||
@@ -247,6 +246,7 @@ Public Class SliderManagerVM
|
||||
End If
|
||||
m_dLayerAdvancement = value
|
||||
End Select
|
||||
DisableMgr.ReEnable()
|
||||
EgtDraw()
|
||||
End Set
|
||||
End Property
|
||||
@@ -335,6 +335,7 @@ Public Class SliderManagerVM
|
||||
WriteMainPrivateProfileString(S_PRINTING3D, K_VIEWSLIDER, m_nSelViewSlider)
|
||||
' ciclo tutti i layer per nasconderli/mostrarli
|
||||
If IsNothing(Map.refTopPanelVM.SelPart) OrElse IsNothing(Map.refTopPanelVM.SelPart.LayerList) Then Return
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
Select Case m_nSelViewSlider
|
||||
Case ViewSliderType.ONLY_SELECTED
|
||||
For Each Layer In Map.refTopPanelVM.SelPart.LayerList
|
||||
@@ -361,6 +362,7 @@ Public Class SliderManagerVM
|
||||
End If
|
||||
Next
|
||||
End Select
|
||||
DisableMgr.ReEnable()
|
||||
' mostro/nascondo slider orizzontale
|
||||
m_LayerAdvancement_Visibility = If(m_nSelViewSlider = ViewSliderType.ONLY_SELECTED, Visibility.Visible, Visibility.Hidden)
|
||||
NotifyPropertyChanged(NameOf(LayerAdvancement_Visibility))
|
||||
|
||||
@@ -484,6 +484,7 @@ Public Class StartMachPanelVM
|
||||
Friend Sub Dispose()
|
||||
' ripristino frame originale
|
||||
EgtSetGridFrame(m_OriginalGridFrame)
|
||||
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
|
||||
EgtDeselectAll()
|
||||
EgtDraw()
|
||||
Map.refSceneHostVM.MainScene.SetStatusNull()
|
||||
@@ -779,6 +780,7 @@ Public Class StartMachPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneTop(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -804,6 +806,7 @@ Public Class StartMachPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneFront(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -829,6 +832,7 @@ Public Class StartMachPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneRight(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -854,6 +858,7 @@ Public Class StartMachPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneBack(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -879,6 +884,7 @@ Public Class StartMachPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneLeft(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -904,6 +910,7 @@ Public Class StartMachPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneBottom(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
@@ -930,6 +937,7 @@ Public Class StartMachPanelVM
|
||||
Public Sub CPlaneElevation(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
ManageInterface(False)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
|
||||
End Sub
|
||||
|
||||
@@ -955,6 +963,7 @@ Public Class StartMachPanelVM
|
||||
Public Sub CPlaneOrigin(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
|
||||
ManageInterface(False)
|
||||
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -25,11 +25,13 @@ Public Class MyStatusBarVM
|
||||
Set(value As Boolean)
|
||||
If Map.refRibPanelVM.bGrid_IsChecked Or Map.refStartMachPanelVM.bGrid_IsChecked Or Map.refShellNumberPanelVM.bGrid_IsChecked Then Return
|
||||
m_bGridVisibility = value
|
||||
OptionModule.m_bGridVisibility = m_bGridVisibility
|
||||
EgtSetGridShow(value, value)
|
||||
EgtDraw()
|
||||
Map.refRibPanelVM.NotifyPropertyChanged(NameOf(Map.refRibPanelVM.bGrid_IsEnabled))
|
||||
Map.refStartMachPanelVM.NotifyPropertyChanged(NameOf(Map.refStartMachPanelVM.bGrid_IsEnabled))
|
||||
Map.refRibPanelVM.NotifyPropertyChanged(NameOf(Map.refRibPanelVM.bGrid_IsEnabled))
|
||||
Map.refShellNumberPanelVM.NotifyPropertyChanged(NameOf(Map.refShellNumberPanelVM.bGrid_IsEnabled))
|
||||
Map.refFilledSolidPanelVM.NotifyPropertyChanged(NameOf(Map.refFilledSolidPanelVM.bGrid_IsEnabled))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -117,7 +119,7 @@ Public Class MyStatusBarVM
|
||||
' Installo funzione output testo su status per lua
|
||||
EgtSetOutText(m_OutTextCallback)
|
||||
' imposto stato di visualizzazione della griglia
|
||||
m_bGridVisibility = GetMainPrivateProfileInt(S_GRID, K_SHOWGRID, 1) <> 0
|
||||
m_bGridVisibility = OptionModule.m_bGridVisibility
|
||||
NotifyPropertyChanged(NameOf(bGridVisibility))
|
||||
End Sub
|
||||
|
||||
@@ -163,10 +165,21 @@ Public Class MyStatusBarVM
|
||||
Friend Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer
|
||||
' Se previsto, imposto progress
|
||||
If nProg > 0 Then SetLoadingProgress(Math.Min(nProg, 100))
|
||||
' Se simulazione attiva, notifico aggiornamento dati
|
||||
If Not IsNothing( Map.refSimulationPanelVM) Then
|
||||
' Uso i valori negativi del primo parametro come flag per la Simulazione
|
||||
Dim nFlag As Integer = If( nProg < 0, -nProg, 0)
|
||||
Map.refSimulationPanelVM.SimulationExpander_Update_CncData( nFlag)
|
||||
End If
|
||||
' Costringo ad aggiornare
|
||||
UpdateUI()
|
||||
' Eventuale attesa
|
||||
Thread.Sleep(nPause)
|
||||
If nPause >= 0 Then
|
||||
Thread.Sleep(nPause)
|
||||
' se altrimenti richiesto aggiornamento visualizzazione
|
||||
ElseIf nPause = -1
|
||||
EgtDraw()
|
||||
End If
|
||||
' Ritorno eventuale stop
|
||||
If m_bStopProgress Then
|
||||
m_bStopProgress = False
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Header="FMin"
|
||||
<!--<DataGridTextColumn Header="FMin"
|
||||
Binding="{Binding sFMin}"
|
||||
IsReadOnly="True"
|
||||
Visibility="{Binding DataContext.ColExtend_Visibility,
|
||||
@@ -276,7 +276,7 @@
|
||||
MeasureUnit="{Binding DataContext.MmPerMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
</DataGridTextColumn>-->
|
||||
<DataGridTextColumn Binding="{Binding sFTrg}"
|
||||
IsReadOnly="True"
|
||||
Visibility="{Binding DataContext.ColExtend_Visibility,
|
||||
|
||||
@@ -962,4 +962,8 @@ Public Class TFSLayer
|
||||
Return If(dHours > 0, dHours.ToString("00") & ":", "") & If(dHours > 0, dMinutes.ToString("00"), dMinutes.ToString()) & ":" & dSeconds.ToString("00")
|
||||
End Function
|
||||
|
||||
End Class
|
||||
Friend Function ConvertToJsonLayer() As JsonLayer
|
||||
Return New JsonLayer(nIndex, dLength, dTMin, m_dTTrg, dTMax, dTCurr, m_dTWait, dFCurr, m_dFTrg, m_dFMax, m_dFCurr, dSpeed)
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -274,7 +274,27 @@ Public Class TopPanelVM
|
||||
WriteMainPrivateProfileString(S_PRINTING3D, K_CURRMACHINING, value.sGUID.ToString())
|
||||
' imposto selezionata come corrente
|
||||
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))
|
||||
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
|
||||
m_SelMachining = value
|
||||
@@ -606,15 +626,6 @@ Public Class TopPanelVM
|
||||
' rinomino pezzo e layer
|
||||
Dim nPartId As Integer = EgtGetLastPart()
|
||||
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
|
||||
Dim b3Part As New BBox3d
|
||||
@@ -623,24 +634,6 @@ Public Class TopPanelVM
|
||||
Dim nRefY As Integer = 1
|
||||
Dim dPosX As Double = CurrentMachine.b3Tab.DimX / 2 - b3Part.DimX / 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
|
||||
Dim vtMove As Vector3d = New Point3d(dPosX, dPosY, 0) - b3Part.Min()
|
||||
@@ -657,6 +650,7 @@ Public Class TopPanelVM
|
||||
|
||||
EgtAddMachGroup("3dPrint")
|
||||
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))
|
||||
EgtAddPartToRawPart(nPartId, b3Part.Min, nRawId)
|
||||
|
||||
@@ -79,6 +79,22 @@ Public Module CurrentMachine
|
||||
End Get
|
||||
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
|
||||
|
||||
' direzione di vista standard
|
||||
Private m_nStandardView As VT = VT.ISO_SW
|
||||
Public ReadOnly Property nStandardView As VT
|
||||
Get
|
||||
Return m_nStandardView
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "Init"
|
||||
|
||||
Sub InitCurrentMachine(sMachinesRootDir As String, sMachineName As String)
|
||||
@@ -97,6 +113,23 @@ Public Module CurrentMachine
|
||||
m_sMachiningFilePath = sMachinesRootDir & "\" & sMachineName & "\Machinings\Machinings.ini"
|
||||
' impostazione cartella materiali
|
||||
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)
|
||||
' leggo direzione di vista standard
|
||||
Dim sView As String = ""
|
||||
GetPrivateProfileString( S_GENERAL, K_GEN_STD_VIEW, "", sView, m_sMachIniFile)
|
||||
Select sView
|
||||
Case "SW"
|
||||
m_nStandardView = VT.ISO_SW
|
||||
Case "SE"
|
||||
m_nStandardView = VT.ISO_SE
|
||||
Case "NE"
|
||||
m_nStandardView = VT.ISO_NE
|
||||
Case "NW"
|
||||
m_nStandardView = VT.ISO_NW
|
||||
Case Else
|
||||
m_nStandardView = VT.ISO_SW
|
||||
End Select
|
||||
' Disabilito segnalazione modificato
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
' recupero box macchina
|
||||
@@ -121,7 +154,7 @@ Public Module CurrentMachine
|
||||
Public Sub CreateMachineTable()
|
||||
' Disabilito segnalazione modificato
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
Dim dTabX = b3Tab.DimX
|
||||
Dim dTabX = b3Tab.DimX()
|
||||
Dim dTabY = b3Tab.DimY()
|
||||
' Disegno tavola
|
||||
Dim nTabPartId As Integer = EgtCreateGroup(GDB_ID.ROOT)
|
||||
@@ -140,25 +173,38 @@ Public Module CurrentMachine
|
||||
EgtSetInfo(nTabPartId, KEY_MATERIAL_GUID, Map.refTopPanelVM.SelMaterial.sGUID)
|
||||
EgtSetInfo(nTabPartId, KEY_MATERIAL_NAME, Map.refTopPanelVM.SelMaterial.sName)
|
||||
End If
|
||||
'' creo area di estrusione
|
||||
' creo area di estrusione
|
||||
UpdateExtrusionArea()
|
||||
' imposto dati griglia (primi tre parametri -1 indica tieni i correnti)
|
||||
EgtSetGridGeoAdv( -1, -1, -1, 0, dTabX, 0, dTabY)
|
||||
' Ripristino stato segnalazione modifica
|
||||
DisableMgr.ReEnable()
|
||||
End Sub
|
||||
|
||||
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()
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
' recupero eventuale vecchia area di estrusione
|
||||
Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE)
|
||||
Dim nTabLayerId As Integer = EgtGetFirstNameInGroup(nTabPartId, TABLE)
|
||||
Dim nExtrusionAreaId As Integer = EgtGetFirstNameInGroup(nTabLayerId, EXTRUSION_AREA)
|
||||
If nExtrusionAreaId <> GDB_ID.NULL Then
|
||||
' e la cancello
|
||||
EgtErase(nExtrusionAreaId)
|
||||
End If
|
||||
If nExtrusionAreaId <> GDB_ID.NULL Then EgtErase(nExtrusionAreaId)
|
||||
Dim nExtrusionRectId As Integer = EgtGetFirstNameInGroup(nTabLayerId, EXTRUSION_RECT)
|
||||
If nExtrusionRectId <> GDB_ID.NULL Then EgtErase(nExtrusionRectId)
|
||||
' se lavorazione corrente nulla, esco
|
||||
If IsNothing(Map.refTopPanelVM.CurrMachining) Then Return
|
||||
If IsNothing(Map.refTopPanelVM.CurrMachining) Then
|
||||
DisableMgr.ReEnable()
|
||||
Return
|
||||
End If
|
||||
' se non esiste file dati macchina, esco
|
||||
If String.IsNullOrWhiteSpace(m_sMachDataIniFile) Then Return
|
||||
If String.IsNullOrWhiteSpace(m_sMachDataIniFile) Then
|
||||
DisableMgr.ReEnable()
|
||||
Return
|
||||
End If
|
||||
' recupero tipo di slice
|
||||
Dim sExtrusionType As String = S_VERTICAL
|
||||
Dim GeneralCathegory As MachiningCathegory = Map.refTopPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL)
|
||||
@@ -173,17 +219,26 @@ Public Module CurrentMachine
|
||||
sExtrusionType = S_45DEGY
|
||||
Case Machining.MPAR_SLICINGTYPE.HORIZONTAL
|
||||
sExtrusionType = S_HORIZONTAL
|
||||
Case Machining.MPAR_SLICINGTYPE.MULTIPLANAR, Machining.MPAR_SLICINGTYPE.MULTIPLANAR_DEG45, Machining.MPAR_SLICINGTYPE.MULTIPLANAR_HORIZ
|
||||
sExtrusionType = S_MULTIPLANAR
|
||||
End Select
|
||||
Dim dExtrXMax = GetPrivateProfileDouble(sExtrusionType, K_MAXX, 0, m_sMachDataIniFile)
|
||||
Dim dExtrXMin = GetPrivateProfileDouble(sExtrusionType, K_MINX, 0, m_sMachDataIniFile)
|
||||
Dim dExtrYMax = GetPrivateProfileDouble(sExtrusionType, K_MAXY, 0, m_sMachDataIniFile)
|
||||
Dim dExtrYMin = GetPrivateProfileDouble(sExtrusionType, K_MINY, 0, m_sMachDataIniFile)
|
||||
nExtrusionAreaId = EgtCreateRectangle2P(nTabLayerId, New Point3d(dExtrXMin, dExtrYMin, 0), New Point3d(dExtrXMax, dExtrYMax, 0))
|
||||
Const AREA_WIDTH As Double = 10
|
||||
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
|
||||
c3Temp.FromColor(System.Drawing.Color.Lime)
|
||||
EgtSetColor(nExtrusionAreaId, c3Temp)
|
||||
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))
|
||||
DisableMgr.ReEnable()
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
@@ -259,6 +314,24 @@ Public Module CurrentMachine
|
||||
Return WritePrivateProfileString(lpAppName, lpKeyName, EgwCrypto.PowerEncryptString(lpString, m_Salt), If(Not String.IsNullOrWhiteSpace(sFilePath), sFilePath, m_sMaterialFilePath))
|
||||
End Function
|
||||
|
||||
Friend Function GetSlicingType() As Integer
|
||||
Dim nNewSlicingType As Integer = GetPrivateProfileInt(S_MACH_PRINTING3D, K_NEWSLICINGTYPE, 0, sMachIniFile)
|
||||
If nNewSlicingType = 0 Then
|
||||
Dim nSlicingType As Integer = GetPrivateProfileInt(S_MACH_PRINTING3D, K_SLICINGTYPE, 0, sMachIniFile)
|
||||
nNewSlicingType = 1
|
||||
If nSlicingType = 1 Then
|
||||
nNewSlicingType = 3
|
||||
ElseIf nSlicingType = 2 Then
|
||||
nNewSlicingType = 7
|
||||
ElseIf nSlicingType = 3 Then
|
||||
nNewSlicingType = 15
|
||||
ElseIf nSlicingType = 4 Then
|
||||
nNewSlicingType = 21
|
||||
End If
|
||||
End If
|
||||
Return nNewSlicingType
|
||||
End Function
|
||||
|
||||
#End Region 'Methods
|
||||
|
||||
End Module
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
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
|
||||
@@ -115,4 +115,18 @@ Module LuaExec
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function ExecPrepare3dmExport(ByRef nExportGeomId As Integer) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
EgtLuaCreateGlobTable("PRINT")
|
||||
EgtLuaSetGlobStringVar("PRINT.BASEDIR", Map.refMainWindowVM.MainWindowM.s3dPrintingDir)
|
||||
bOk = EgtLuaExecFile(Map.refMainWindowVM.MainWindowM.s3dPrintingDir & "\PrepareExport.lua")
|
||||
If bOk Then
|
||||
EgtLuaGetGlobIntVar("PRINT.EXPORTLAYER", nExportGeomId)
|
||||
End If
|
||||
' Cancello tavola globale
|
||||
EgtLuaResetGlobVar("PRINT")
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
|
||||
End Module
|
||||
|
||||
@@ -35,7 +35,7 @@ Public Class ViewLayerManagerVM
|
||||
End Sub
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in EgtCAM5Map
|
||||
' Creo riferimento a questa classe in Map
|
||||
Map.SetRefViewLayerManagerVM(Me)
|
||||
m_LayerList = New ObservableCollection(Of ViewLayer)({New ViewLayer(ViewLayer.ViewLayerType.PRINT_SOLID, "Print", True),
|
||||
New ViewLayer(ViewLayer.ViewLayerType.REFERENCE, "Origin Point", True),
|
||||
@@ -150,8 +150,8 @@ Public Class ViewLayer
|
||||
End Sub
|
||||
|
||||
Friend Sub UpdateVisibility(bIsVisible As Boolean)
|
||||
' Disabilito segnalazione modificato
|
||||
Dim DisableMgr As New DisableModifiedMgr ' se solidi
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
' se solidi
|
||||
If m_Type = ViewLayerType.SOLID_SLICE Then
|
||||
If Map.refSceneHostVM.MainController.GetStep() = 0 Then
|
||||
' aggiorno parametro di calcolo solidi sui pezzi
|
||||
@@ -242,7 +242,6 @@ Public Class ViewLayer
|
||||
Next
|
||||
Next
|
||||
End If
|
||||
' Ripristino stato segnalazione modifica
|
||||
DisableMgr.ReEnable()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<UniformGrid x:Class="ViewPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Rows="1">
|
||||
Rows="1" Background="{DynamicResource EgaltechWhite}">
|
||||
|
||||
<Button ToolTip="{Binding ZoomAllToolTip}"
|
||||
Command="{Binding ZoomAllCommand}"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Ionic.Zip" version="1.9.1.8" targetFramework="net472" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user