Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 50d301e8cc | |||
| bfbb85feee | |||
| 9783731396 | |||
| 9ff14634dd | |||
| 42970892ba | |||
| 2bb8cfc4a1 | |||
| 902f610703 | |||
| cb6b2721fc | |||
| d7aa5f1739 | |||
| e67f863235 | |||
| 5f6660d642 | |||
| 437e698d10 | |||
| 9a187ac36b | |||
| 2c04b2e5cc | |||
| a6c10569e0 | |||
| f60be49005 | |||
| b8b42114b6 | |||
| 69b2734987 | |||
| a52a8dfe36 | |||
| b73a4ba6c0 | |||
| c9b9646bbb | |||
| c6732698e8 | |||
| 89ab41da44 | |||
| 2b5bb35e21 | |||
| 68ee954dd3 | |||
| a47a5ed09a | |||
| 5aba0cf14f | |||
| 1e61027dbd | |||
| 4d26959075 |
@@ -3,7 +3,6 @@
|
|||||||
Public Const TABLE = "Table"
|
Public Const TABLE = "Table"
|
||||||
Public Const TABLE_OUTLINE = "TableOutline"
|
Public Const TABLE_OUTLINE = "TableOutline"
|
||||||
Public Const PART = "Part"
|
Public Const PART = "Part"
|
||||||
Public Const ORIGINAL_SOLID = "OriginalSolid"
|
|
||||||
Public Const PRINT_SOLID = "PrintSolid"
|
Public Const PRINT_SOLID = "PrintSolid"
|
||||||
Public Const LAY_MACH_START = "MachStart"
|
Public Const LAY_MACH_START = "MachStart"
|
||||||
Public Const LAY_REFERENCE = "Frame"
|
Public Const LAY_REFERENCE = "Frame"
|
||||||
@@ -90,13 +89,14 @@
|
|||||||
Public Const MAC_LEADOUTTANGDIST = "LeadOutTangDist"
|
Public Const MAC_LEADOUTTANGDIST = "LeadOutTangDist"
|
||||||
Public Const MAC_LEADOUTORTHODIST = "LeadOutOrthoDist"
|
Public Const MAC_LEADOUTORTHODIST = "LeadOutOrthoDist"
|
||||||
Public Const MAC_COASTINGLEN = "CoastingLen"
|
Public Const MAC_COASTINGLEN = "CoastingLen"
|
||||||
Public Const MAC_COASTINGFEED = "CoastingFeed"
|
Public Const MAC_COASTINGFEEDPU = "CoastingFeedPu"
|
||||||
Public Const MAC_WIPELEN = "WipeLen"
|
Public Const MAC_WIPELEN = "WipeLen"
|
||||||
Public Const MAC_WIPEFEEDPU = "WipeFeedPu"
|
Public Const MAC_WIPEFEEDPU = "WipeFeedPu"
|
||||||
Public Const MAC_WIPEDIR = "WipeDir"
|
Public Const MAC_WIPEDIR = "WipeDir"
|
||||||
Public Const MAC_FLOORCOUNT = "FloorCount"
|
Public Const MAC_FLOORCOUNT = "FloorCount"
|
||||||
Public Const MAC_G0FEED = "G0Feed"
|
Public Const MAC_G0FEED = "G0Feed"
|
||||||
Public Const MAC_TOOLDIAM = "ToolDiam"
|
Public Const MAC_TOOLDIAM = "ToolDiam"
|
||||||
|
Public Const MAC_RIBSTYPE = "RibsType"
|
||||||
Public Const MAC_RIBSOVERLAP = "RibsOverlap"
|
Public Const MAC_RIBSOVERLAP = "RibsOverlap"
|
||||||
Public Const MAC_RIBSSTRANDCOUNT = "RibsStrandCount"
|
Public Const MAC_RIBSSTRANDCOUNT = "RibsStrandCount"
|
||||||
Public Const MAC_RIBSLINK = "RibsLink"
|
Public Const MAC_RIBSLINK = "RibsLink"
|
||||||
@@ -150,5 +150,7 @@
|
|||||||
Public Const KEY_ISOFILE_PATH = "IsoFilePath"
|
Public Const KEY_ISOFILE_PATH = "IsoFilePath"
|
||||||
|
|
||||||
Public Const FILE_PATH = "FilePath"
|
Public Const FILE_PATH = "FilePath"
|
||||||
|
Public Const PART_NAME = "PartName"
|
||||||
|
Public Const ENTITY_NAME = "EntityName"
|
||||||
|
|
||||||
End Module
|
End Module
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ Public Module ConstIni
|
|||||||
Public Const K_MOD_AUXSOLIDS As String = "ModAuxSolids"
|
Public Const K_MOD_AUXSOLIDS As String = "ModAuxSolids"
|
||||||
Public Const K_MOD_SOLIDSLICE As String = "ModSolidSlice"
|
Public Const K_MOD_SOLIDSLICE As String = "ModSolidSlice"
|
||||||
Public Const K_MOD_SLICETOOLPATH As String = "ModSliceToolPath"
|
Public Const K_MOD_SLICETOOLPATH As String = "ModSliceToolPath"
|
||||||
|
Public Const K_MOD_OTHERS As String = "ModOthers"
|
||||||
Public Const K_SLC_PRINTSOLID As String = "SlcPrintSolid"
|
Public Const K_SLC_PRINTSOLID As String = "SlcPrintSolid"
|
||||||
Public Const K_SLC_REFERENCE As String = "SlcReference"
|
Public Const K_SLC_REFERENCE As String = "SlcReference"
|
||||||
Public Const K_SLC_STARTMACHINING As String = "SlcStartMAchining"
|
Public Const K_SLC_STARTMACHINING As String = "SlcStartMAchining"
|
||||||
@@ -50,6 +51,7 @@ Public Module ConstIni
|
|||||||
Public Const K_SLC_AUXSOLIDS As String = "SlcAuxSolids"
|
Public Const K_SLC_AUXSOLIDS As String = "SlcAuxSolids"
|
||||||
Public Const K_SLC_SOLIDSLICE As String = "SlcSolidSlice"
|
Public Const K_SLC_SOLIDSLICE As String = "SlcSolidSlice"
|
||||||
Public Const K_SLC_SLICETOOLPATH As String = "SlcSliceToolPath"
|
Public Const K_SLC_SLICETOOLPATH As String = "SlcSliceToolPath"
|
||||||
|
Public Const K_SLC_OTHERS As String = "SlcOthers"
|
||||||
|
|
||||||
'Public Const S_LUA As String = "Lua"
|
'Public Const S_LUA As String = "Lua"
|
||||||
'Public Const K_LIBSDIR As String = "LibsDir"
|
'Public Const K_LIBSDIR As String = "LibsDir"
|
||||||
@@ -109,6 +111,7 @@ Public Module ConstIni
|
|||||||
Public Const K_CURRMATERIAL As String = "CurrMaterial"
|
Public Const K_CURRMATERIAL As String = "CurrMaterial"
|
||||||
Public Const K_CURRMACHINING As String = "CurrMachining"
|
Public Const K_CURRMACHINING As String = "CurrMachining"
|
||||||
Public Const K_VIEWSLIDER As String = "ViewSlider"
|
Public Const K_VIEWSLIDER As String = "ViewSlider"
|
||||||
|
Public Const K_IMPORTCURREXTENSION As String = "ImportCurrExtension"
|
||||||
|
|
||||||
Public Const S_MRUFILES As String = "MruFiles"
|
Public Const S_MRUFILES As String = "MruFiles"
|
||||||
Public Const S_MRUIMPORTFILES As String = "MruImportFiles"
|
Public Const S_MRUIMPORTFILES As String = "MruImportFiles"
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ Public Class CurrMachiningCathegory
|
|||||||
New CurrNumericMachiningParam(MachiningParam.Params.FLOORCOUNT, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.FLOORCOUNT, nPartId, nIndex, bForceFromDb),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.G0FEED, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.G0FEED, nPartId, nIndex, bForceFromDb),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.TOOLDIAM, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.TOOLDIAM, nPartId, nIndex, bForceFromDb),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.CONSTANT, nPartId, nIndex, bForceFromDb)})
|
New CurrNumericMachiningParam(MachiningParam.Params.FLOWRATE_PC, nPartId, nIndex, bForceFromDb)})
|
||||||
Case Cathegories.LINK
|
Case Cathegories.LINK
|
||||||
m_sName = "Shell"
|
m_sName = "Shell"
|
||||||
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.LINKTYPE, nPartId, nIndex, bForceFromDb),
|
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.LINKTYPE, nPartId, nIndex, bForceFromDb),
|
||||||
@@ -209,13 +209,14 @@ Public Class CurrMachiningCathegory
|
|||||||
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTTANGDIST, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTTANGDIST, nPartId, nIndex, bForceFromDb),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTORTHODIST, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTORTHODIST, nPartId, nIndex, bForceFromDb),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGLEN, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGLEN, nPartId, nIndex, bForceFromDb),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGFEED, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGFEED_PC, nPartId, nIndex, bForceFromDb),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.WIPELEN, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.WIPELEN, nPartId, nIndex, bForceFromDb),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.WIPEFEEDPU, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.WIPEFEED_PC, nPartId, nIndex, bForceFromDb),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.WIPEDIR, nPartId, nIndex, bForceFromDb)})
|
New CurrNumericMachiningParam(MachiningParam.Params.WIPEDIR, nPartId, nIndex, bForceFromDb)})
|
||||||
Case Cathegories.RIBS
|
Case Cathegories.RIBS
|
||||||
m_sName = "Ribs"
|
m_sName = "Ribs"
|
||||||
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nPartId, nIndex, bForceFromDb),
|
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.RIBSTYPE, nPartId, nIndex, bForceFromDb),
|
||||||
|
New CurrNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nPartId, nIndex, bForceFromDb),
|
||||||
New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nPartId, nIndex, bForceFromDb),
|
New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nPartId, nIndex, bForceFromDb),
|
||||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLINK, nPartId, nIndex, bForceFromDb),
|
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLINK, nPartId, nIndex, bForceFromDb),
|
||||||
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTORDER, nPartId, nIndex, bForceFromDb),
|
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTORDER, nPartId, nIndex, bForceFromDb),
|
||||||
@@ -272,13 +273,13 @@ Public Class CurrNumericMachiningParam
|
|||||||
|
|
||||||
Public Overrides Property sValue As String
|
Public Overrides Property sValue As String
|
||||||
Get
|
Get
|
||||||
Return If(m_bIsLen, LenToString(m_dValue, 1), m_dValue)
|
Return If(m_bIsLen, LenToString(m_dValue, 1), DoubleToString( m_dValue, 2))
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If m_bIsLen Then
|
If m_bIsLen Then
|
||||||
StringToLen(value, m_dValue)
|
StringToLen(value, m_dValue)
|
||||||
Else
|
Else
|
||||||
m_dValue = value
|
StringToDouble( value, m_dValue)
|
||||||
End If
|
End If
|
||||||
NotifyPropertyChanged(NameOf(sValue))
|
NotifyPropertyChanged(NameOf(sValue))
|
||||||
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
|
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
|
||||||
@@ -347,15 +348,15 @@ Public Class CurrNumericMachiningParam
|
|||||||
Case Params.COASTINGLEN
|
Case Params.COASTINGLEN
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_COASTINGLEN, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_COASTINGLEN, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
Case Params.COASTINGFEED
|
Case Params.COASTINGFEED_PC
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_COASTINGFEED, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_COASTINGFEEDPU, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = False
|
||||||
Case Params.WIPELEN
|
Case Params.WIPELEN
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_WIPELEN, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_WIPELEN, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
Case Params.WIPEFEEDPU
|
Case Params.WIPEFEED_PC
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_WIPEFEEDPU, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_WIPEFEEDPU, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = False
|
||||||
Case Params.WIPEDIR
|
Case Params.WIPEDIR
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_WIPEDIR, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_WIPEDIR, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
@@ -419,7 +420,7 @@ Public Class CurrNumericMachiningParam
|
|||||||
Case Params.AUXSOLIDSWIPEDIR
|
Case Params.AUXSOLIDSWIPEDIR
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSWIPEDIR, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSWIPEDIR, m_dValue)
|
||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
Case Params.CONSTANT
|
Case Params.FLOWRATE_PC
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_CONSTANT, m_dValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_CONSTANT, m_dValue)
|
||||||
m_bIsLen = False
|
m_bIsLen = False
|
||||||
End Select
|
End Select
|
||||||
@@ -427,24 +428,28 @@ Public Class CurrNumericMachiningParam
|
|||||||
If nIndex > 0 Then
|
If nIndex > 0 Then
|
||||||
Dim DbMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
|
Dim DbMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
|
||||||
Select Case Type
|
Select Case Type
|
||||||
Case Params.STRANDH, Params.STRANDW, Params.STRANDCOUNT, Params.OFFSET, Params.STRANDOVERLAP, Params.STARTPOINTOFFSETONSLICE, Params.FLOORCOUNT, Params.G0FEED, Params.TOOLDIAM, Params.CONSTANT
|
Case Params.STRANDH, Params.STRANDW, Params.STRANDCOUNT, Params.OFFSET, Params.STRANDOVERLAP, Params.STARTPOINTOFFSETONSLICE,
|
||||||
|
Params.FLOORCOUNT, Params.G0FEED, Params.TOOLDIAM, Params.FLOWRATE_PC
|
||||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
Case Params.LINKPARAM, Params.LINKZUP, Params.OFFSETLEADPOINT, Params.LEADINTANGDIST, Params.LEADINORTHODIST,
|
Case Params.LINKPARAM, Params.LINKZUP, Params.OFFSETLEADPOINT, Params.LEADINTANGDIST, Params.LEADINORTHODIST,
|
||||||
Params.LEADOUTTANGDIST, Params.LEADOUTORTHODIST, Params.COASTINGLEN, Params.COASTINGFEED, Params.WIPELEN, Params.WIPEFEEDPU, Params.WIPEDIR
|
Params.LEADOUTTANGDIST, Params.LEADOUTORTHODIST, Params.COASTINGLEN, Params.COASTINGFEED_PC,
|
||||||
|
Params.WIPELEN, Params.WIPEFEED_PC, Params.WIPEDIR
|
||||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.LINK).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
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, Params.RIBSLEADININVERT,
|
Case Params.RIBSOVERLAP, Params.RIBSSTRANDCOUNT, Params.RIBSLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION,
|
||||||
Params.RIBSLEADINLEN, Params.RIBSLEADOUTINVERT, Params.RIBSLEADOUTLEN, Params.RIBSLEADOUTCOASTING, Params.RIBSLEADOUTWIPE, Params.RIBSLEADOUTWIPEDIR
|
Params.RIBSLEADININVERT, Params.RIBSLEADINLEN, Params.RIBSLEADOUTINVERT, Params.RIBSLEADOUTLEN, Params.RIBSLEADOUTCOASTING,
|
||||||
|
Params.RIBSLEADOUTWIPE, Params.RIBSLEADOUTWIPEDIR
|
||||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
Case Params.SHELLNBRDIFFERENCE, Params.SHELLNBRCOASTING, Params.SHELLNBRWIPE, Params.SHELLNBRWIPEDIR
|
Case Params.SHELLNBRDIFFERENCE, Params.SHELLNBRCOASTING, Params.SHELLNBRWIPE, Params.SHELLNBRWIPEDIR
|
||||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.SHELL_NUMBER).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.SHELL_NUMBER).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
Case Params.AUXSOLIDSOVERLAP, Params.AUXSOLIDSLINKPARAM, Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, Params.AUXSOLIDSCOASTINGLEN, Params.AUXSOLIDSWIPELEN, Params.AUXSOLIDSWIPEDIR
|
Case Params.AUXSOLIDSOVERLAP, Params.AUXSOLIDSLINKPARAM, Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE,
|
||||||
|
Params.AUXSOLIDSCOASTINGLEN, Params.AUXSOLIDSWIPELEN, Params.AUXSOLIDSWIPEDIR
|
||||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
End Select
|
End Select
|
||||||
If bForceFromDb OrElse Not bReadFromPart Then
|
If bForceFromDb OrElse Not bReadFromPart Then
|
||||||
m_dValue = m_DbParam.dOrigValue
|
m_dValue = m_DbParam.dOrigValue
|
||||||
m_dOrigValue = m_DbParam.dOrigValue
|
m_dOrigValue = m_DbParam.dOrigValue
|
||||||
End If
|
End If
|
||||||
ElseIf Type = Params.CONSTANT AndAlso Not bReadFromPart Then
|
ElseIf Type = Params.FLOWRATE_PC AndAlso Not bReadFromPart Then
|
||||||
m_dValue = 100
|
m_dValue = 100
|
||||||
m_dOrigValue = 100
|
m_dOrigValue = 100
|
||||||
End If
|
End If
|
||||||
@@ -486,11 +491,11 @@ Public Class CurrNumericMachiningParam
|
|||||||
EgtSetInfo(nPartId, MAC_LEADOUTORTHODIST, sWriteValue)
|
EgtSetInfo(nPartId, MAC_LEADOUTORTHODIST, sWriteValue)
|
||||||
Case Params.COASTINGLEN
|
Case Params.COASTINGLEN
|
||||||
EgtSetInfo(nPartId, MAC_COASTINGLEN, sWriteValue)
|
EgtSetInfo(nPartId, MAC_COASTINGLEN, sWriteValue)
|
||||||
Case Params.COASTINGFEED
|
Case Params.COASTINGFEED_PC
|
||||||
EgtSetInfo(nPartId, MAC_COASTINGFEED, sWriteValue)
|
EgtSetInfo(nPartId, MAC_COASTINGFEEDPU, sWriteValue)
|
||||||
Case Params.WIPELEN
|
Case Params.WIPELEN
|
||||||
EgtSetInfo(nPartId, MAC_WIPELEN, sWriteValue)
|
EgtSetInfo(nPartId, MAC_WIPELEN, sWriteValue)
|
||||||
Case Params.WIPEFEEDPU
|
Case Params.WIPEFEED_PC
|
||||||
EgtSetInfo(nPartId, MAC_WIPEFEEDPU, sWriteValue)
|
EgtSetInfo(nPartId, MAC_WIPEFEEDPU, sWriteValue)
|
||||||
Case Params.WIPEDIR
|
Case Params.WIPEDIR
|
||||||
EgtSetInfo(nPartId, MAC_WIPEDIR, sWriteValue)
|
EgtSetInfo(nPartId, MAC_WIPEDIR, sWriteValue)
|
||||||
@@ -534,7 +539,7 @@ Public Class CurrNumericMachiningParam
|
|||||||
EgtSetInfo(nPartId, MAC_AUXSOLIDSWIPELEN, sWriteValue)
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSWIPELEN, sWriteValue)
|
||||||
Case Params.AUXSOLIDSWIPEDIR
|
Case Params.AUXSOLIDSWIPEDIR
|
||||||
EgtSetInfo(nPartId, MAC_AUXSOLIDSWIPEDIR, sWriteValue)
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSWIPEDIR, sWriteValue)
|
||||||
Case Params.CONSTANT
|
Case Params.FLOWRATE_PC
|
||||||
EgtSetInfo(nPartId, MAC_CONSTANT, sWriteValue)
|
EgtSetInfo(nPartId, MAC_CONSTANT, sWriteValue)
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
@@ -674,9 +679,9 @@ Public Class CurrComboMachiningParam
|
|||||||
Case Params.SLICINGTYPE
|
Case Params.SLICINGTYPE
|
||||||
Dim nHorizontalPrint As Integer = GetPrivateProfileInt(S_MACH_PRINTING3D, K_HORIZONTAL_PRINT, 0, CurrentMachine.sMachIniFile)
|
Dim nHorizontalPrint As Integer = GetPrivateProfileInt(S_MACH_PRINTING3D, K_HORIZONTAL_PRINT, 0, CurrentMachine.sMachIniFile)
|
||||||
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_SLICINGTYPE.VERTICAL, "Vertical"),
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_SLICINGTYPE.VERTICAL, "Vertical"),
|
||||||
New IdNameStruct(Machining.MPAR_SLICINGTYPE.HORIZONTAL, "Horizontal")})
|
New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45, "45°")})
|
||||||
If nHorizontalPrint > 0 Then
|
If nHorizontalPrint > 0 Then
|
||||||
m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45, "45°"))
|
m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.HORIZONTAL, "Horizontal"))
|
||||||
End If
|
End If
|
||||||
Dim nSelValue As Integer = 0
|
Dim nSelValue As Integer = 0
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_SLICINGTYPE, nSelValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_SLICINGTYPE, nSelValue)
|
||||||
@@ -719,6 +724,13 @@ Public Class CurrComboMachiningParam
|
|||||||
Dim nSelValue As Integer = 0
|
Dim nSelValue As Integer = 0
|
||||||
bReadFromPart = EgtGetInfo(nPartId, MAC_LEADOUT, nSelValue)
|
bReadFromPart = EgtGetInfo(nPartId, MAC_LEADOUT, nSelValue)
|
||||||
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
||||||
|
Case Params.RIBSTYPE
|
||||||
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_RIBSTYPE.INTERNAL, "Internal"),
|
||||||
|
New IdNameStruct(Machining.MPAR_RIBSTYPE.EXTERNAL, "External"),
|
||||||
|
New IdNameStruct(Machining.MPAR_RIBSTYPE.UNBOUNDED, "Unbounded")})
|
||||||
|
Dim nSelValue As Integer = 0
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSTYPE, nSelValue)
|
||||||
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
||||||
Case Params.AUXSOLIDSINFILL
|
Case Params.AUXSOLIDSINFILL
|
||||||
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL.NONE, "None"),
|
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.OFFSET, "Offset"),
|
||||||
@@ -748,6 +760,8 @@ Public Class CurrComboMachiningParam
|
|||||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
Case Params.LINKTYPE, Params.LEADIN, Params.LEADOUT
|
Case Params.LINKTYPE, Params.LEADIN, Params.LEADOUT
|
||||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.LINK).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.LINK).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
|
Case Params.RIBSTYPE
|
||||||
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
Case Params.AUXSOLIDSINFILL, Params.AUXSOLIDSSTRANDORDER, Params.AUXSOLIDSLINKTYPE
|
Case Params.AUXSOLIDSINFILL, Params.AUXSOLIDSSTRANDORDER, Params.AUXSOLIDSLINKTYPE
|
||||||
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
|
||||||
End Select
|
End Select
|
||||||
@@ -755,6 +769,9 @@ Public Class CurrComboMachiningParam
|
|||||||
m_SelValue = m_DbParam.OrigSelValue
|
m_SelValue = m_DbParam.OrigSelValue
|
||||||
m_OrigSelValue = m_DbParam.OrigSelValue
|
m_OrigSelValue = m_DbParam.OrigSelValue
|
||||||
End If
|
End If
|
||||||
|
ElseIf Type = Params.RIBSTYPE AndAlso Not bReadFromPart Then
|
||||||
|
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_RIBSTYPE.INTERNAL)
|
||||||
|
m_SelValue = m_OrigSelValue
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -772,6 +789,8 @@ Public Class CurrComboMachiningParam
|
|||||||
EgtSetInfo(nPartId, MAC_LEADIN, m_SelValue.Id)
|
EgtSetInfo(nPartId, MAC_LEADIN, m_SelValue.Id)
|
||||||
Case Params.LEADOUT
|
Case Params.LEADOUT
|
||||||
EgtSetInfo(nPartId, MAC_LEADOUT, m_SelValue.Id)
|
EgtSetInfo(nPartId, MAC_LEADOUT, m_SelValue.Id)
|
||||||
|
Case Params.RIBSTYPE
|
||||||
|
EgtSetInfo(nPartId, MAC_RIBSTYPE, m_SelValue.Id)
|
||||||
Case Params.AUXSOLIDSINFILL
|
Case Params.AUXSOLIDSINFILL
|
||||||
EgtSetInfo(nPartId, MAC_AUXSOLIDSINFILL, m_SelValue.Id)
|
EgtSetInfo(nPartId, MAC_AUXSOLIDSINFILL, m_SelValue.Id)
|
||||||
Case Params.AUXSOLIDSSTRANDORDER
|
Case Params.AUXSOLIDSSTRANDORDER
|
||||||
|
|||||||
+9
-18
@@ -123,11 +123,6 @@
|
|||||||
<DependentUpon>DispositionPanelV.xaml</DependentUpon>
|
<DependentUpon>DispositionPanelV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="DispositionPanel\DispositionPanelVM.vb" />
|
<Compile Include="DispositionPanel\DispositionPanelVM.vb" />
|
||||||
<Compile Include="ImportPanel\ImportPanelV.xaml.vb">
|
|
||||||
<DependentUpon>ImportPanelV.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="ImportPanel\ImportPanelVM.vb" />
|
|
||||||
<Compile Include="ImportPanel\ImportUtility.vb" />
|
|
||||||
<Compile Include="InstrumentPanel\InstrumentPanelV.xaml.vb">
|
<Compile Include="InstrumentPanel\InstrumentPanelV.xaml.vb">
|
||||||
<DependentUpon>InstrumentPanelV.xaml</DependentUpon>
|
<DependentUpon>InstrumentPanelV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -154,16 +149,16 @@
|
|||||||
<DependentUpon>MachSaveInDbWindowV.xaml</DependentUpon>
|
<DependentUpon>MachSaveInDbWindowV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="MachSaveInDbWnd\MachSaveInDbWndVM.vb" />
|
<Compile Include="MachSaveInDbWnd\MachSaveInDbWndVM.vb" />
|
||||||
|
<Compile Include="ManagePartPanel\ManagePartPanelV.xaml.vb">
|
||||||
|
<DependentUpon>ManagePartPanelV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ManagePartPanel\ManagePartPanelVM.vb" />
|
||||||
|
<Compile Include="ManagePartPanel\ManagePartUtility.vb" />
|
||||||
<Compile Include="MaterialDb\Material.vb" />
|
<Compile Include="MaterialDb\Material.vb" />
|
||||||
<Compile Include="MaterialDb\MaterialDbV.xaml.vb">
|
<Compile Include="MaterialDb\MaterialDbV.xaml.vb">
|
||||||
<DependentUpon>MaterialDbV.xaml</DependentUpon>
|
<DependentUpon>MaterialDbV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="MaterialDb\MaterialDbVM.vb" />
|
<Compile Include="MaterialDb\MaterialDbVM.vb" />
|
||||||
<Compile Include="ModifyPartPanel\ModifyPartPanelV.xaml.vb">
|
|
||||||
<DependentUpon>ModifyPartPanelV.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="ModifyPartPanel\ModifyPartPanelVM.vb" />
|
|
||||||
<Compile Include="ModifyPartPanel\ModifyPartUtility.vb" />
|
|
||||||
<Compile Include="OptionsWindow\MachineBox.xaml.vb">
|
<Compile Include="OptionsWindow\MachineBox.xaml.vb">
|
||||||
<DependentUpon>MachineBox.xaml</DependentUpon>
|
<DependentUpon>MachineBox.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -304,10 +299,6 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="ImportPanel\ImportPanelV.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="InstrumentPanel\InstrumentPanelV.xaml">
|
<Page Include="InstrumentPanel\InstrumentPanelV.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@@ -348,14 +339,14 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="ManagePartPanel\ManagePartPanelV.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
<Page Include="MaterialDb\MaterialDbV.xaml">
|
<Page Include="MaterialDb\MaterialDbV.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="ModifyPartPanel\ModifyPartPanelV.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
<Page Include="OptionsWindow\MachineBox.xaml">
|
<Page Include="OptionsWindow\MachineBox.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
|
|||||||
@@ -15,7 +15,8 @@
|
|||||||
<TabItem Header="NULL">
|
<TabItem Header="NULL">
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="IMPORT">
|
<TabItem Header="IMPORT">
|
||||||
<PrintApp:ImportPanelV DataContext="{StaticResource ImportPanelVM}"/>
|
<!--<PrintApp:ImportPanelV DataContext="{StaticResource ImportPanelVM}"/>-->
|
||||||
|
<PrintApp:ManagePartPanelV DataContext="{StaticResource ManagePartPanelVM}"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="DISPOSITION">
|
<TabItem Header="DISPOSITION">
|
||||||
<PrintApp:DispositionPanelV DataContext="{StaticResource DispositionPanelVM}"/>
|
<PrintApp:DispositionPanelV DataContext="{StaticResource DispositionPanelVM}"/>
|
||||||
@@ -36,7 +37,8 @@
|
|||||||
<Button Height="100"/>
|
<Button Height="100"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="MODIFYPART">
|
<TabItem Header="MODIFYPART">
|
||||||
<PrintApp:ModifyPartPanelV DataContext="{StaticResource ModifyPartPanelVM}"/>
|
<!--<PrintApp:ModifyPartPanelV DataContext="{StaticResource ModifyPartPanelVM}"/>-->
|
||||||
|
<PrintApp:ManagePartPanelV DataContext="{StaticResource ManagePartPanelVM}"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ Public Class LeftPanelVM
|
|||||||
Case Panels.SHELLNUMBER
|
Case Panels.SHELLNUMBER
|
||||||
Map.refShellNumberPanelVM.Init()
|
Map.refShellNumberPanelVM.Init()
|
||||||
Case Panels.MODIFYPART
|
Case Panels.MODIFYPART
|
||||||
Map.refModifyPartPanelVM.Init()
|
''Map.refModifyPartPanelVM.Init()
|
||||||
|
Map.refManagePartPanelVM.Init(ManagePartPanelVM.ManagePartType.MODIFY)
|
||||||
End Select
|
End Select
|
||||||
Map.refViewLayerManagerVM.UpdateForced()
|
Map.refViewLayerManagerVM.UpdateForced()
|
||||||
NotifyPropertyChanged(NameOf(SelPanel))
|
NotifyPropertyChanged(NameOf(SelPanel))
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ Public Class Machining
|
|||||||
|
|
||||||
Public Enum MPAR_SLICINGTYPE As Integer
|
Public Enum MPAR_SLICINGTYPE As Integer
|
||||||
VERTICAL = 1
|
VERTICAL = 1
|
||||||
HORIZONTAL = 2
|
DEG45 = 2
|
||||||
DEG45 = 3
|
HORIZONTAL = 3
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
Public Enum MPAR_STRANDORDERS As Integer
|
Public Enum MPAR_STRANDORDERS As Integer
|
||||||
@@ -34,6 +34,12 @@ Public Class Machining
|
|||||||
ARC = 3
|
ARC = 3
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
|
Public Enum MPAR_RIBSTYPE As Integer
|
||||||
|
INTERNAL = 1
|
||||||
|
EXTERNAL = 2
|
||||||
|
UNBOUNDED = 3
|
||||||
|
End Enum
|
||||||
|
|
||||||
Public Enum MPAR_INFILL As Integer
|
Public Enum MPAR_INFILL As Integer
|
||||||
NONE = 1
|
NONE = 1
|
||||||
OFFSET = 2
|
OFFSET = 2
|
||||||
@@ -298,7 +304,7 @@ Public Class MachiningCathegory
|
|||||||
New NumericMachiningParam(MachiningParam.Params.FLOORCOUNT, nIndex),
|
New NumericMachiningParam(MachiningParam.Params.FLOORCOUNT, nIndex),
|
||||||
New NumericMachiningParam(MachiningParam.Params.G0FEED, nIndex),
|
New NumericMachiningParam(MachiningParam.Params.G0FEED, nIndex),
|
||||||
New NumericMachiningParam(MachiningParam.Params.TOOLDIAM, nIndex),
|
New NumericMachiningParam(MachiningParam.Params.TOOLDIAM, nIndex),
|
||||||
New NumericMachiningParam(MachiningParam.Params.CONSTANT, nIndex)})
|
New NumericMachiningParam(MachiningParam.Params.FLOWRATE_PC, nIndex)})
|
||||||
Case Cathegories.LINK
|
Case Cathegories.LINK
|
||||||
m_sName = "Shell"
|
m_sName = "Shell"
|
||||||
m_MachiningParamList = New List(Of MachiningParam)({New ComboMachiningParam(MachiningParam.Params.LINKTYPE, nIndex),
|
m_MachiningParamList = New List(Of MachiningParam)({New ComboMachiningParam(MachiningParam.Params.LINKTYPE, nIndex),
|
||||||
@@ -312,13 +318,14 @@ Public Class MachiningCathegory
|
|||||||
New NumericMachiningParam(MachiningParam.Params.LEADOUTTANGDIST, nIndex),
|
New NumericMachiningParam(MachiningParam.Params.LEADOUTTANGDIST, nIndex),
|
||||||
New NumericMachiningParam(MachiningParam.Params.LEADOUTORTHODIST, nIndex),
|
New NumericMachiningParam(MachiningParam.Params.LEADOUTORTHODIST, nIndex),
|
||||||
New NumericMachiningParam(MachiningParam.Params.COASTINGLEN, nIndex),
|
New NumericMachiningParam(MachiningParam.Params.COASTINGLEN, nIndex),
|
||||||
New NumericMachiningParam(MachiningParam.Params.COASTINGFEED, nIndex),
|
New NumericMachiningParam(MachiningParam.Params.COASTINGFEED_PC, nIndex),
|
||||||
New NumericMachiningParam(MachiningParam.Params.WIPELEN, nIndex),
|
New NumericMachiningParam(MachiningParam.Params.WIPELEN, nIndex),
|
||||||
New NumericMachiningParam(MachiningParam.Params.WIPEFEEDPU, nIndex),
|
New NumericMachiningParam(MachiningParam.Params.WIPEFEED_PC, nIndex),
|
||||||
New NumericMachiningParam(MachiningParam.Params.WIPEDIR, nIndex)})
|
New NumericMachiningParam(MachiningParam.Params.WIPEDIR, nIndex)})
|
||||||
Case Cathegories.RIBS
|
Case Cathegories.RIBS
|
||||||
m_sName = "Ribs"
|
m_sName = "Ribs"
|
||||||
m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nIndex),
|
m_MachiningParamList = New List(Of MachiningParam)({New ComboMachiningParam(MachiningParam.Params.RIBSTYPE, nIndex),
|
||||||
|
New NumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nIndex),
|
||||||
New NumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nIndex),
|
New NumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nIndex),
|
||||||
New CheckMachiningParam(MachiningParam.Params.RIBSLINK, nIndex),
|
New CheckMachiningParam(MachiningParam.Params.RIBSLINK, nIndex),
|
||||||
New CheckMachiningParam(MachiningParam.Params.RIBSINVERTORDER, nIndex),
|
New CheckMachiningParam(MachiningParam.Params.RIBSINVERTORDER, nIndex),
|
||||||
@@ -406,41 +413,42 @@ Public MustInherit Class MachiningParam
|
|||||||
LEADOUTTANGDIST = 19
|
LEADOUTTANGDIST = 19
|
||||||
LEADOUTORTHODIST = 20
|
LEADOUTORTHODIST = 20
|
||||||
COASTINGLEN = 21
|
COASTINGLEN = 21
|
||||||
COASTINGFEED = 22
|
COASTINGFEED_PC = 22
|
||||||
WIPELEN = 23
|
WIPELEN = 23
|
||||||
WIPEFEEDPU = 24
|
WIPEFEED_PC = 24
|
||||||
FLOORCOUNT = 25
|
FLOORCOUNT = 25
|
||||||
G0FEED = 26
|
G0FEED = 26
|
||||||
TOOLDIAM = 27
|
TOOLDIAM = 27
|
||||||
RIBSOVERLAP = 28
|
RIBSTYPE = 28
|
||||||
RIBSSTRANDCOUNT = 29
|
RIBSOVERLAP = 29
|
||||||
RIBSLINK = 30
|
RIBSSTRANDCOUNT = 30
|
||||||
RIBSINVERTORDER = 31
|
RIBSLINK = 31
|
||||||
RIBSINVERTDIRECTION = 32
|
RIBSINVERTORDER = 32
|
||||||
RIBSLEADININVERT = 33
|
RIBSINVERTDIRECTION = 33
|
||||||
RIBSLEADINLEN = 34
|
RIBSLEADININVERT = 34
|
||||||
RIBSLEADOUTINVERT = 35
|
RIBSLEADINLEN = 35
|
||||||
RIBSLEADOUTLEN = 36
|
RIBSLEADOUTINVERT = 36
|
||||||
RIBSLEADOUTCOASTING = 37
|
RIBSLEADOUTLEN = 37
|
||||||
RIBSLEADOUTWIPE = 38
|
RIBSLEADOUTCOASTING = 38
|
||||||
RIBSLEADOUTWIPEDIR = 39
|
RIBSLEADOUTWIPE = 39
|
||||||
SHELLNBRDIFFERENCE = 40
|
RIBSLEADOUTWIPEDIR = 40
|
||||||
SHELLNBRCOASTING = 41
|
SHELLNBRDIFFERENCE = 41
|
||||||
SHELLNBRWIPE = 42
|
SHELLNBRCOASTING = 42
|
||||||
SHELLNBRWIPEDIR = 43
|
SHELLNBRWIPE = 43
|
||||||
AUXSOLIDSOVERLAP = 44
|
SHELLNBRWIPEDIR = 44
|
||||||
AUXSOLIDSINFILL = 45
|
AUXSOLIDSOVERLAP = 45
|
||||||
AUXSOLIDSSTRANDORDER = 46
|
AUXSOLIDSINFILL = 46
|
||||||
AUXSOLIDSLINKTYPE = 47
|
AUXSOLIDSSTRANDORDER = 47
|
||||||
AUXSOLIDSLINKPARAM = 48
|
AUXSOLIDSLINKTYPE = 48
|
||||||
AUXSOLIDSSTARTPOINTOFFSETONSLICE = 49
|
AUXSOLIDSLINKPARAM = 49
|
||||||
AUXSOLIDSCOASTINGLEN = 50
|
AUXSOLIDSSTARTPOINTOFFSETONSLICE = 50
|
||||||
AUXSOLIDSWIPELEN = 51
|
AUXSOLIDSCOASTINGLEN = 51
|
||||||
AUXSOLIDSWIPEDIR = 52
|
AUXSOLIDSWIPELEN = 52
|
||||||
SPIRALVASE = 53
|
AUXSOLIDSWIPEDIR = 53
|
||||||
WIPEDIR = 54
|
SPIRALVASE = 54
|
||||||
STRANDOVERLAP = 55
|
WIPEDIR = 55
|
||||||
CONSTANT = 56
|
STRANDOVERLAP = 56
|
||||||
|
FLOWRATE_PC = 57
|
||||||
MATERIALS = 100
|
MATERIALS = 100
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
@@ -501,20 +509,22 @@ Public MustInherit Class MachiningParam
|
|||||||
m_sName = "Lead Out Ortho Dist"
|
m_sName = "Lead Out Ortho Dist"
|
||||||
Case Params.COASTINGLEN
|
Case Params.COASTINGLEN
|
||||||
m_sName = "Coasting Len"
|
m_sName = "Coasting Len"
|
||||||
Case Params.COASTINGFEED
|
Case Params.COASTINGFEED_PC
|
||||||
m_sName = "Coasting Feed"
|
m_sName = "Coasting Feed [%]"
|
||||||
Case Params.WIPELEN
|
Case Params.WIPELEN
|
||||||
m_sName = "Wipe Len"
|
m_sName = "Wipe Len"
|
||||||
Case Params.WIPEFEEDPU
|
Case Params.WIPEFEED_PC
|
||||||
m_sName = "Wipe Feed Pu"
|
m_sName = "Wipe Feed [%]"
|
||||||
Case Params.FLOORCOUNT
|
Case Params.FLOORCOUNT
|
||||||
m_sName = "Floor Count"
|
m_sName = "Floor Count"
|
||||||
Case Params.G0FEED
|
Case Params.G0FEED
|
||||||
m_sName = "G0 Feed"
|
m_sName = "G0 Feed"
|
||||||
Case Params.TOOLDIAM
|
Case Params.TOOLDIAM
|
||||||
m_sName = "Nozzle Diameter"
|
m_sName = "Nozzle Diameter"
|
||||||
|
Case Params.RIBSTYPE
|
||||||
|
m_sName = "Type"
|
||||||
Case Params.RIBSOVERLAP
|
Case Params.RIBSOVERLAP
|
||||||
m_sName = "Overlap"
|
m_sName = "Overlap [%]"
|
||||||
Case Params.RIBSSTRANDCOUNT
|
Case Params.RIBSSTRANDCOUNT
|
||||||
m_sName = "Strand Count"
|
m_sName = "Strand Count"
|
||||||
Case Params.RIBSLINK
|
Case Params.RIBSLINK
|
||||||
@@ -536,7 +546,7 @@ Public MustInherit Class MachiningParam
|
|||||||
Case Params.RIBSLEADOUTWIPE
|
Case Params.RIBSLEADOUTWIPE
|
||||||
m_sName = "Lead Out Wipe"
|
m_sName = "Lead Out Wipe"
|
||||||
Case Params.RIBSLEADOUTWIPEDIR
|
Case Params.RIBSLEADOUTWIPEDIR
|
||||||
m_sName = "Lead Out Wipe Dir"
|
m_sName = "Lead Out Wipe Dir [deg]"
|
||||||
Case Params.SHELLNBRDIFFERENCE
|
Case Params.SHELLNBRDIFFERENCE
|
||||||
m_sName = "Difference"
|
m_sName = "Difference"
|
||||||
Case Params.SHELLNBRCOASTING
|
Case Params.SHELLNBRCOASTING
|
||||||
@@ -544,9 +554,9 @@ Public MustInherit Class MachiningParam
|
|||||||
Case Params.SHELLNBRWIPE
|
Case Params.SHELLNBRWIPE
|
||||||
m_sName = "Wipe"
|
m_sName = "Wipe"
|
||||||
Case Params.SHELLNBRWIPEDIR
|
Case Params.SHELLNBRWIPEDIR
|
||||||
m_sName = "Wipe Direction"
|
m_sName = "Wipe Direction [deg]"
|
||||||
Case Params.AUXSOLIDSOVERLAP
|
Case Params.AUXSOLIDSOVERLAP
|
||||||
m_sName = "Overlap"
|
m_sName = "Overlap [%]"
|
||||||
Case Params.AUXSOLIDSINFILL
|
Case Params.AUXSOLIDSINFILL
|
||||||
m_sName = "Infill"
|
m_sName = "Infill"
|
||||||
Case Params.AUXSOLIDSSTRANDORDER
|
Case Params.AUXSOLIDSSTRANDORDER
|
||||||
@@ -562,15 +572,15 @@ Public MustInherit Class MachiningParam
|
|||||||
Case Params.AUXSOLIDSWIPELEN
|
Case Params.AUXSOLIDSWIPELEN
|
||||||
m_sName = "Wipe Length"
|
m_sName = "Wipe Length"
|
||||||
Case Params.AUXSOLIDSWIPEDIR
|
Case Params.AUXSOLIDSWIPEDIR
|
||||||
m_sName = "Wipe Direction"
|
m_sName = "Wipe Direction [deg]"
|
||||||
Case Params.SPIRALVASE
|
Case Params.SPIRALVASE
|
||||||
m_sName = "Spiral Vase"
|
m_sName = "Spiral Vase"
|
||||||
Case Params.WIPEDIR
|
Case Params.WIPEDIR
|
||||||
m_sName = "Wipe Direction"
|
m_sName = "Wipe Direction [deg]"
|
||||||
Case Params.STRANDOVERLAP
|
Case Params.STRANDOVERLAP
|
||||||
m_sName = "Strand Overlap"
|
m_sName = "Strand Overlap [%]"
|
||||||
Case Params.CONSTANT
|
Case Params.FLOWRATE_PC
|
||||||
m_sName = "Constant"
|
m_sName = "Flow rate [%]"
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -600,13 +610,13 @@ Public Class NumericMachiningParam
|
|||||||
End Property
|
End Property
|
||||||
Public Overridable Property sValue As String
|
Public Overridable Property sValue As String
|
||||||
Get
|
Get
|
||||||
Return If(m_bIsLen, LenToString(m_dValue, 1), m_dValue)
|
Return If(m_bIsLen, LenToString(m_dValue, 1), DoubleToString( m_dValue, 2))
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If m_bIsLen Then
|
If m_bIsLen Then
|
||||||
StringToLen(value, m_dValue)
|
StringToLen(value, m_dValue)
|
||||||
Else
|
Else
|
||||||
m_dValue = value
|
StringToDouble( value, m_dValue)
|
||||||
End If
|
End If
|
||||||
NotifyPropertyChanged(NameOf(sValue))
|
NotifyPropertyChanged(NameOf(sValue))
|
||||||
End Set
|
End Set
|
||||||
@@ -678,21 +688,21 @@ Public Class NumericMachiningParam
|
|||||||
Case Params.COASTINGLEN
|
Case Params.COASTINGLEN
|
||||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_COASTINGLEN, 0)
|
m_dValue = ReadMachiningParamDouble(nIndex, MAC_COASTINGLEN, 0)
|
||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
Case Params.COASTINGFEED
|
Case Params.COASTINGFEED_PC
|
||||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_COASTINGFEED, 0)
|
m_dValue = ReadMachiningParamDouble(nIndex, MAC_COASTINGFEEDPU, 0)
|
||||||
m_bIsLen = True
|
m_bIsLen = False
|
||||||
Case Params.WIPELEN
|
Case Params.WIPELEN
|
||||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_WIPELEN, 0)
|
m_dValue = ReadMachiningParamDouble(nIndex, MAC_WIPELEN, 0)
|
||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
Case Params.WIPEFEEDPU
|
Case Params.WIPEFEED_PC
|
||||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_WIPEFEEDPU, 0)
|
m_dValue = ReadMachiningParamDouble(nIndex, MAC_WIPEFEEDPU, 0)
|
||||||
m_bIsLen = True
|
m_bIsLen = False
|
||||||
Case Params.WIPEDIR
|
Case Params.WIPEDIR
|
||||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_WIPEDIR, 0)
|
m_dValue = ReadMachiningParamDouble(nIndex, MAC_WIPEDIR, 0)
|
||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
Case Params.FLOORCOUNT
|
Case Params.FLOORCOUNT
|
||||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_FLOORCOUNT, 0)
|
m_dValue = ReadMachiningParamDouble(nIndex, MAC_FLOORCOUNT, 0)
|
||||||
m_bIsLen = True
|
m_bIsLen = False
|
||||||
Case Params.G0FEED
|
Case Params.G0FEED
|
||||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_G0FEED, 0)
|
m_dValue = ReadMachiningParamDouble(nIndex, MAC_G0FEED, 0)
|
||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
@@ -750,7 +760,7 @@ Public Class NumericMachiningParam
|
|||||||
Case Params.AUXSOLIDSWIPEDIR
|
Case Params.AUXSOLIDSWIPEDIR
|
||||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSWIPEDIR, 0)
|
m_dValue = ReadMachiningParamDouble(nIndex, MAC_AUXSOLIDSWIPEDIR, 0)
|
||||||
m_bIsLen = True
|
m_bIsLen = True
|
||||||
Case Params.CONSTANT
|
Case Params.FLOWRATE_PC
|
||||||
m_dValue = ReadMachiningParamDouble(nIndex, MAC_CONSTANT, 100)
|
m_dValue = ReadMachiningParamDouble(nIndex, MAC_CONSTANT, 100)
|
||||||
m_bIsLen = False
|
m_bIsLen = False
|
||||||
End Select
|
End Select
|
||||||
@@ -794,11 +804,11 @@ Public Class NumericMachiningParam
|
|||||||
WriteMachiningParam(nIndex, MAC_LEADOUTORTHODIST, sWriteValue)
|
WriteMachiningParam(nIndex, MAC_LEADOUTORTHODIST, sWriteValue)
|
||||||
Case Params.COASTINGLEN
|
Case Params.COASTINGLEN
|
||||||
WriteMachiningParam(nIndex, MAC_COASTINGLEN, sWriteValue)
|
WriteMachiningParam(nIndex, MAC_COASTINGLEN, sWriteValue)
|
||||||
Case Params.COASTINGFEED
|
Case Params.COASTINGFEED_PC
|
||||||
WriteMachiningParam(nIndex, MAC_COASTINGFEED, sWriteValue)
|
WriteMachiningParam(nIndex, MAC_COASTINGFEEDPU, sWriteValue)
|
||||||
Case Params.WIPELEN
|
Case Params.WIPELEN
|
||||||
WriteMachiningParam(nIndex, MAC_WIPELEN, sWriteValue)
|
WriteMachiningParam(nIndex, MAC_WIPELEN, sWriteValue)
|
||||||
Case Params.WIPEFEEDPU
|
Case Params.WIPEFEED_PC
|
||||||
WriteMachiningParam(nIndex, MAC_WIPEFEEDPU, sWriteValue)
|
WriteMachiningParam(nIndex, MAC_WIPEFEEDPU, sWriteValue)
|
||||||
Case Params.WIPEDIR
|
Case Params.WIPEDIR
|
||||||
WriteMachiningParam(nIndex, MAC_WIPEDIR, sWriteValue)
|
WriteMachiningParam(nIndex, MAC_WIPEDIR, sWriteValue)
|
||||||
@@ -842,7 +852,7 @@ Public Class NumericMachiningParam
|
|||||||
WriteMachiningParam(nIndex, MAC_AUXSOLIDSWIPELEN, sWriteValue)
|
WriteMachiningParam(nIndex, MAC_AUXSOLIDSWIPELEN, sWriteValue)
|
||||||
Case Params.AUXSOLIDSWIPEDIR
|
Case Params.AUXSOLIDSWIPEDIR
|
||||||
WriteMachiningParam(nIndex, MAC_AUXSOLIDSWIPEDIR, sWriteValue)
|
WriteMachiningParam(nIndex, MAC_AUXSOLIDSWIPEDIR, sWriteValue)
|
||||||
Case Params.CONSTANT
|
Case Params.FLOWRATE_PC
|
||||||
WriteMachiningParam(nIndex, MAC_CONSTANT, sWriteValue)
|
WriteMachiningParam(nIndex, MAC_CONSTANT, sWriteValue)
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
@@ -943,6 +953,10 @@ Public Class ComboMachiningParam
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Sub New(Type As Params)
|
||||||
|
MyBase.New(Type)
|
||||||
|
End Sub
|
||||||
|
|
||||||
Sub New(Type As Params, nIndex As Integer)
|
Sub New(Type As Params, nIndex As Integer)
|
||||||
MyBase.New(Type)
|
MyBase.New(Type)
|
||||||
If nIndex = 0 Then
|
If nIndex = 0 Then
|
||||||
@@ -953,9 +967,9 @@ Public Class ComboMachiningParam
|
|||||||
Case Params.SLICINGTYPE
|
Case Params.SLICINGTYPE
|
||||||
Dim nHorizontalPrint As Integer = GetPrivateProfileInt(S_MACH_PRINTING3D, K_HORIZONTAL_PRINT, 0, CurrentMachine.sMachIniFile)
|
Dim nHorizontalPrint As Integer = GetPrivateProfileInt(S_MACH_PRINTING3D, K_HORIZONTAL_PRINT, 0, CurrentMachine.sMachIniFile)
|
||||||
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_SLICINGTYPE.VERTICAL, "Vertical"),
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_SLICINGTYPE.VERTICAL, "Vertical"),
|
||||||
New IdNameStruct(Machining.MPAR_SLICINGTYPE.HORIZONTAL, "Horizontal")})
|
New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45, "45°")})
|
||||||
If nHorizontalPrint > 0 Then
|
If nHorizontalPrint > 0 Then
|
||||||
m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.DEG45, "45°"))
|
m_ValueList.Add(New IdNameStruct(Machining.MPAR_SLICINGTYPE.HORIZONTAL, "Horizontal"))
|
||||||
End If
|
End If
|
||||||
Dim nSelValue As Double = ReadMachiningParamDouble(nIndex, MAC_SLICINGTYPE, -1)
|
Dim nSelValue As Double = ReadMachiningParamDouble(nIndex, MAC_SLICINGTYPE, -1)
|
||||||
If nSelValue = -1 Then
|
If nSelValue = -1 Then
|
||||||
@@ -987,6 +1001,11 @@ Public Class ComboMachiningParam
|
|||||||
New IdNameStruct(Machining.MPAR_LEADINOUT.LINEAR, "Linear"),
|
New IdNameStruct(Machining.MPAR_LEADINOUT.LINEAR, "Linear"),
|
||||||
New IdNameStruct(Machining.MPAR_LEADINOUT.ARC, "Arc")})
|
New IdNameStruct(Machining.MPAR_LEADINOUT.ARC, "Arc")})
|
||||||
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_LEADOUT, 0))
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_LEADOUT, 0))
|
||||||
|
Case Params.RIBSTYPE
|
||||||
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_RIBSTYPE.INTERNAL, "Internal"),
|
||||||
|
New IdNameStruct(Machining.MPAR_RIBSTYPE.EXTERNAL, "External"),
|
||||||
|
New IdNameStruct(Machining.MPAR_RIBSTYPE.UNBOUNDED, "Unbounded")})
|
||||||
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = ReadMachiningParamDouble(nIndex, MAC_RIBSTYPE, 1))
|
||||||
Case Params.AUXSOLIDSINFILL
|
Case Params.AUXSOLIDSINFILL
|
||||||
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL.NONE, "None"),
|
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.OFFSET, "Offset"),
|
||||||
@@ -1009,7 +1028,7 @@ Public Class ComboMachiningParam
|
|||||||
Friend Overrides Sub WriteParamOnDb(nIndex As Integer)
|
Friend Overrides Sub WriteParamOnDb(nIndex As Integer)
|
||||||
Select Case Type
|
Select Case Type
|
||||||
Case Params.SLICINGTYPE
|
Case Params.SLICINGTYPE
|
||||||
WriteMachiningParam(nIndex, MAC_SLICING45, m_SelValue.Id)
|
WriteMachiningParam(nIndex, MAC_SLICINGTYPE, m_SelValue.Id)
|
||||||
Case Params.STRANDORDER
|
Case Params.STRANDORDER
|
||||||
WriteMachiningParam(nIndex, MAC_STRANDORDER, m_SelValue.Id)
|
WriteMachiningParam(nIndex, MAC_STRANDORDER, m_SelValue.Id)
|
||||||
Case Params.DIRECTION
|
Case Params.DIRECTION
|
||||||
@@ -1020,6 +1039,8 @@ Public Class ComboMachiningParam
|
|||||||
WriteMachiningParam(nIndex, MAC_LEADIN, m_SelValue.Id)
|
WriteMachiningParam(nIndex, MAC_LEADIN, m_SelValue.Id)
|
||||||
Case Params.LEADOUT
|
Case Params.LEADOUT
|
||||||
WriteMachiningParam(nIndex, MAC_LEADOUT, m_SelValue.Id)
|
WriteMachiningParam(nIndex, MAC_LEADOUT, m_SelValue.Id)
|
||||||
|
Case Params.RIBSTYPE
|
||||||
|
WriteMachiningParam(nIndex, MAC_RIBSTYPE, m_SelValue.Id)
|
||||||
Case Params.AUXSOLIDSINFILL
|
Case Params.AUXSOLIDSINFILL
|
||||||
WriteMachiningParam(nIndex, MAC_AUXSOLIDSINFILL, m_SelValue.Id)
|
WriteMachiningParam(nIndex, MAC_AUXSOLIDSINFILL, m_SelValue.Id)
|
||||||
Case Params.AUXSOLIDSSTRANDORDER
|
Case Params.AUXSOLIDSSTRANDORDER
|
||||||
@@ -1067,6 +1088,10 @@ Public Class CheckMachiningParam
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Sub New(Type As Params)
|
||||||
|
MyBase.New(Type)
|
||||||
|
End Sub
|
||||||
|
|
||||||
Sub New(Type As Params, nIndex As Integer)
|
Sub New(Type As Params, nIndex As Integer)
|
||||||
MyBase.New(Type)
|
MyBase.New(Type)
|
||||||
If nIndex = 0 Then
|
If nIndex = 0 Then
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ Class MainWindowV
|
|||||||
AddHandler Me.ContentRendered, AddressOf MainWindowV_ContentRendered
|
AddHandler Me.ContentRendered, AddressOf MainWindowV_ContentRendered
|
||||||
AddHandler Me.Closing, AddressOf MainWindowV_Closing
|
AddHandler Me.Closing, AddressOf MainWindowV_Closing
|
||||||
AddHandler Me.KeyDown, AddressOf MainWindowV_KeyDown
|
AddHandler Me.KeyDown, AddressOf MainWindowV_KeyDown
|
||||||
|
AddHandler Me.StateChanged, AddressOf MainWindowV_StateChanged
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
#End Region ' CONSTRUCTOR
|
||||||
@@ -63,6 +64,14 @@ Class MainWindowV
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub MainWindowV_StateChanged(sender As Object, e As EventArgs)
|
||||||
|
If Not IsNothing(Map.refSecondaryWindowV) AndAlso Not Map.refSecondaryWindowV.WindowChangingState Then
|
||||||
|
Map.refSecondaryWindowV.WindowState = Me.WindowState
|
||||||
|
'Application.Current.MainWindow.Topmost = True
|
||||||
|
'Application.Current.MainWindow.Topmost = False
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region ' EVENTS
|
#End Region ' EVENTS
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -285,7 +285,11 @@ Public Class MainWindowVM
|
|||||||
' Se non confermata chiusura, esco
|
' Se non confermata chiusura, esco
|
||||||
If Not bAllowClose Then Return
|
If Not bAllowClose Then Return
|
||||||
' salvo modo di visualizzazione
|
' salvo modo di visualizzazione
|
||||||
WriteMainPrivateProfileString(S_SCENE, K_SHOWMODE, EgtGetShowMode().ToString)
|
WriteMainPrivateProfileString(S_SCENE, K_SHOWMODE, EgtGetShowMode().ToString())
|
||||||
|
' Salvo stato visualizzazione direzione curve
|
||||||
|
WriteMainPrivateProfileString(S_SCENE, K_CURVEDIR, If(EgtGetShowCurveDirection(), "1", "0"))
|
||||||
|
' Salvo stato visualizzazione griglia
|
||||||
|
WriteMainPrivateProfileString(S_GRID, K_SHOWGRID, If(Map.refMyStatusBarVM.bGridVisibility, "1", "0"))
|
||||||
' Termino il Model
|
' Termino il Model
|
||||||
m_MainWindowM.Close()
|
m_MainWindowM.Close()
|
||||||
' Termino il programma
|
' Termino il programma
|
||||||
|
|||||||
@@ -0,0 +1,147 @@
|
|||||||
|
<UserControl x:Class="ManagePartPanelV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:local="clr-namespace:Icarus"
|
||||||
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
|
Width="150"
|
||||||
|
Margin="5,0,0,0"
|
||||||
|
VerticalAlignment="Stretch">
|
||||||
|
<Grid DockPanel.Dock="Left">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border Style="{StaticResource LeftPanelTitle_Border}">
|
||||||
|
<TextBlock Text="Part Entity List"
|
||||||
|
FontWeight="DemiBold"
|
||||||
|
FontSize="14"/>
|
||||||
|
</Border>
|
||||||
|
<!--<UniformGrid Grid.Row="1" Rows="1"
|
||||||
|
IsEnabled="{Binding IsEnabled}">
|
||||||
|
<Button DockPanel.Dock="Left"
|
||||||
|
Content="+"
|
||||||
|
FontSize="20"
|
||||||
|
Command="{Binding AddPart_Command}"
|
||||||
|
Style="{StaticResource LeftPanel_Button}"/>
|
||||||
|
<Button DockPanel.Dock="Left"
|
||||||
|
Content="-"
|
||||||
|
FontSize="20"
|
||||||
|
Command="{Binding RemovePart_Command}"
|
||||||
|
Style="{StaticResource LeftPanel_Button}"/>
|
||||||
|
</UniformGrid>-->
|
||||||
|
<TreeView Grid.Row="2"
|
||||||
|
ItemsSource="{Binding ManagerPartList}"
|
||||||
|
MinHeight="200"
|
||||||
|
IsEnabled="{Binding IsEnabled}">
|
||||||
|
<TreeView.Resources>
|
||||||
|
<HierarchicalDataTemplate DataType="{x:Type local:ManagePart_Part}"
|
||||||
|
ItemsSource="{Binding LayerList}">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<Image Source="/Resources/TreeView/Folder.png"
|
||||||
|
Height="15"/>
|
||||||
|
<Grid>
|
||||||
|
<TextBlock Text="{Binding sName}"
|
||||||
|
Visibility="{Binding TextBlock_Visibility}"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding sName, UpdateSourceTrigger=Explicit}"
|
||||||
|
IsExplicitFocused="{Binding UserShouldEditValueNow}"
|
||||||
|
Visibility="{Binding TextBox_Visibility}"
|
||||||
|
Style="{StaticResource OptionTextBox}"/>
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
</HierarchicalDataTemplate>
|
||||||
|
<HierarchicalDataTemplate DataType="{x:Type local:ManagePart_Layer}"
|
||||||
|
ItemsSource="{Binding EntityList, UpdateSourceTrigger=PropertyChanged}">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<Image Source="/Resources/TreeView/Folder.png"
|
||||||
|
Height="15"/>
|
||||||
|
<TextBlock Text="{Binding sName}" />
|
||||||
|
</StackPanel>
|
||||||
|
</HierarchicalDataTemplate>
|
||||||
|
<HierarchicalDataTemplate DataType="{x:Type local:PartManager_GeomEntity}">
|
||||||
|
<Grid>
|
||||||
|
<TextBlock Text="{Binding sName}" />
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding sName, UpdateSourceTrigger=Explicit}"
|
||||||
|
IsExplicitFocused="{Binding UserShouldEditValueNow}"
|
||||||
|
Visibility="{Binding TextBox_Visibility}"
|
||||||
|
Style="{StaticResource OptionTextBox}"/>
|
||||||
|
</Grid>
|
||||||
|
</HierarchicalDataTemplate>
|
||||||
|
<!-- Menu' tasto destro -->
|
||||||
|
<ContextMenu x:Key="RowMenu" ItemsSource="{Binding MenuList}" >
|
||||||
|
<ContextMenu.ItemContainerStyle>
|
||||||
|
<Style TargetType="MenuItem">
|
||||||
|
<Setter Property="Command" Value="{Binding MenuItem_Command}"/>
|
||||||
|
<Setter Property="Header" Value="{Binding sMsg}"/>
|
||||||
|
</Style>
|
||||||
|
</ContextMenu.ItemContainerStyle>
|
||||||
|
</ContextMenu>
|
||||||
|
</TreeView.Resources>
|
||||||
|
<TreeView.ItemContainerStyle>
|
||||||
|
<Style TargetType="{x:Type TreeViewItem}">
|
||||||
|
<Setter Property="IsSelected" Value="{Binding bIsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<Setter Property="IsExpanded" Value="True"/>
|
||||||
|
<Setter Property="ContextMenu" Value="{StaticResource RowMenu}"/>
|
||||||
|
<EventSetter Event="ContextMenuOpening" Handler="Item_ContextMenuOpening"/>
|
||||||
|
</Style>
|
||||||
|
</TreeView.ItemContainerStyle>
|
||||||
|
</TreeView>
|
||||||
|
<Border Grid.Row="3"
|
||||||
|
Visibility="{Binding IsImport_Visibility}"
|
||||||
|
Style="{StaticResource LeftPanelTitle_Border}">
|
||||||
|
<TextBlock Text="Imported Entity List"
|
||||||
|
FontWeight="DemiBold"
|
||||||
|
FontSize="14"/>
|
||||||
|
</Border>
|
||||||
|
<ListBox Grid.Row="4"
|
||||||
|
ItemsSource="{Binding ImportedEntityList, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
SelectedItem="{Binding SelImportedEntity}"
|
||||||
|
MinHeight="100"
|
||||||
|
IsEnabled="{Binding IsEnabled}"
|
||||||
|
Visibility="{Binding IsImport_Visibility}">
|
||||||
|
<ListBox.Resources>
|
||||||
|
<!-- Menu' tasto destro -->
|
||||||
|
<ContextMenu x:Key="RowMenu" ItemsSource="{Binding MenuList}" >
|
||||||
|
<ContextMenu.ItemContainerStyle>
|
||||||
|
<Style TargetType="MenuItem">
|
||||||
|
<Setter Property="Command" Value="{Binding MenuItem_Command}"/>
|
||||||
|
<Setter Property="Header" Value="{Binding sMsg}"/>
|
||||||
|
</Style>
|
||||||
|
</ContextMenu.ItemContainerStyle>
|
||||||
|
</ContextMenu>
|
||||||
|
</ListBox.Resources>
|
||||||
|
<ListBox.ItemContainerStyle>
|
||||||
|
<Style TargetType="ListBoxItem">
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||||
|
<Setter Property="ContextMenu" Value="{StaticResource RowMenu}" />
|
||||||
|
</Style>
|
||||||
|
</ListBox.ItemContainerStyle>
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid HorizontalAlignment="Stretch">
|
||||||
|
<Grid.InputBindings>
|
||||||
|
<MouseBinding Gesture="LeftDoubleClick"
|
||||||
|
Command="{Binding GeomEntityDoubleClick_Command}"/>
|
||||||
|
</Grid.InputBindings>
|
||||||
|
<TextBlock Text="{Binding ghName}">
|
||||||
|
</TextBlock>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>
|
||||||
|
<UniformGrid Grid.Row="5"
|
||||||
|
Rows="1"
|
||||||
|
IsEnabled="{Binding IsEnabled}">
|
||||||
|
<Button Content="Ok"
|
||||||
|
Command="{Binding Ok_Command}"
|
||||||
|
Style="{StaticResource ToolBar_TextButton}"/>
|
||||||
|
<Button Content="Cancel"
|
||||||
|
Command="{Binding Cancel_Command}"
|
||||||
|
Visibility="{Binding IsImport_Visibility}"
|
||||||
|
Style="{StaticResource ToolBar_TextButton}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
Public Class ManagePartPanelV
|
||||||
|
|
||||||
|
Protected Sub Item_ContextMenuOpening(sender As Object, e As ContextMenuEventArgs)
|
||||||
|
Dim PartItem As ManagePart_Part
|
||||||
|
Dim LayerItem As ManagePart_Layer
|
||||||
|
Dim EntityItem As PartManager_GeomEntity
|
||||||
|
Select Case e.OriginalSource.DataContext.GetType()
|
||||||
|
Case GetType(ManagePart_Part)
|
||||||
|
PartItem = DirectCast(e.OriginalSource.DataContext, ManagePart_Part)
|
||||||
|
If PartItem.MenuList.Count = 0 Then
|
||||||
|
e.Handled = True
|
||||||
|
End If
|
||||||
|
Case GetType(ManagePart_Layer)
|
||||||
|
LayerItem = DirectCast(e.OriginalSource.DataContext, ManagePart_Layer)
|
||||||
|
e.Handled = True
|
||||||
|
Case GetType(PartManager_GeomEntity)
|
||||||
|
EntityItem = DirectCast(e.OriginalSource.DataContext, PartManager_GeomEntity)
|
||||||
|
If EntityItem.MenuList.Count = 0 Then
|
||||||
|
e.Handled = True
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,506 @@
|
|||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
|
Public Class ManagePartPanelVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Public Enum ManagePartType
|
||||||
|
IMPORT = 1
|
||||||
|
MODIFY = 2
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Private m_Type As ManagePartType
|
||||||
|
Friend ReadOnly Property Type As ManagePartType
|
||||||
|
Get
|
||||||
|
Return m_Type
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nImportedPartId As Integer = GDB_ID.NULL
|
||||||
|
Friend ReadOnly Property nImportedPartId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nImportedPartId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_ImportedEntityList As New ObservableCollection(Of PartManager_GeomEntity)
|
||||||
|
Public Property ImportedEntityList As ObservableCollection(Of PartManager_GeomEntity)
|
||||||
|
Get
|
||||||
|
Return m_ImportedEntityList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of PartManager_GeomEntity))
|
||||||
|
m_ImportedEntityList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelImportedEntity As PartManager_GeomEntity
|
||||||
|
Public Property SelImportedEntity As PartManager_GeomEntity
|
||||||
|
Get
|
||||||
|
Return m_SelImportedEntity
|
||||||
|
End Get
|
||||||
|
Set(value As PartManager_GeomEntity)
|
||||||
|
m_SelImportedEntity = value
|
||||||
|
EgtDeselectAll()
|
||||||
|
If Not IsNothing(m_SelImportedEntity) Then
|
||||||
|
EgtSelectObj(m_SelImportedEntity.nId)
|
||||||
|
End If
|
||||||
|
EgtDraw()
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Friend Sub SetSelImportedEntity(nId As Integer)
|
||||||
|
Dim SelEntity As PartManager_GeomEntity = Nothing
|
||||||
|
' cerco tra entita' importate
|
||||||
|
SelEntity = m_ImportedEntityList.FirstOrDefault(Function(x) x.nId = nId)
|
||||||
|
If IsNothing(SelEntity) Then
|
||||||
|
' cerco tra pezzi creati
|
||||||
|
For Each ManagePart In m_ManagerPartList
|
||||||
|
For Each Layer In ManagePart.LayerList
|
||||||
|
SelEntity = Layer.EntityList.FirstOrDefault(Function(x) x.nId = nId)
|
||||||
|
If Not IsNothing(SelEntity) Then
|
||||||
|
SelEntity.bIsSelected = True
|
||||||
|
SelEntity.NotifyPropertyChanged(NameOf(SelEntity.bIsSelected))
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If Not IsNothing(SelEntity) Then
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
m_SelImportedEntity = SelEntity
|
||||||
|
EgtDeselectAll()
|
||||||
|
If Not IsNothing(m_SelImportedEntity) Then
|
||||||
|
EgtSelectObj(m_SelImportedEntity.nId)
|
||||||
|
End If
|
||||||
|
EgtDraw()
|
||||||
|
NotifyPropertyChanged(NameOf(SelImportedEntity))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_ManagerPartList As New ObservableCollection(Of ManagePart_Part)
|
||||||
|
Public ReadOnly Property ManagerPartList As ObservableCollection(Of ManagePart_Part)
|
||||||
|
Get
|
||||||
|
Return m_ManagerPartList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelManagerPart As ManagePart_Part
|
||||||
|
Friend Sub SetSelManagerPart(SelManagePart_Part As ManagePart_Part)
|
||||||
|
m_SelManagerPart = SelManagePart_Part
|
||||||
|
m_SelManagerLayer = Nothing
|
||||||
|
End Sub
|
||||||
|
Public ReadOnly Property SelManagerPart As ManagePart_Part
|
||||||
|
Get
|
||||||
|
Return m_SelManagerPart
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelManagerLayer As ManagePart_Layer
|
||||||
|
Public ReadOnly Property SelManagerLayer As ManagePart_Layer
|
||||||
|
Get
|
||||||
|
Return m_SelManagerLayer
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetSelManagerLayer(SelManagePart_Layer As ManagePart_Layer)
|
||||||
|
m_SelManagerPart = m_ManagerPartList.FirstOrDefault(Function(x) x.LayerList.Contains(SelManagePart_Layer))
|
||||||
|
m_SelManagerLayer = SelManagePart_Layer
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_SelPartManager_GeomEntity As PartManager_GeomEntity
|
||||||
|
Public ReadOnly Property SelPartManager_GeomEntity As PartManager_GeomEntity
|
||||||
|
Get
|
||||||
|
Return m_SelPartManager_GeomEntity
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetSelPartManager_GeomEntity(SelPartManager_GeomEntity As PartManager_GeomEntity)
|
||||||
|
For Each CurrPart In m_ManagerPartList
|
||||||
|
Dim CurrLayer As ManagePart_Layer = CurrPart.LayerList.FirstOrDefault(Function(x) x.EntityList.Contains(SelPartManager_GeomEntity))
|
||||||
|
If Not IsNothing(CurrLayer) Then
|
||||||
|
m_SelManagerPart = CurrPart
|
||||||
|
m_SelManagerLayer = CurrLayer
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
m_SelPartManager_GeomEntity = SelPartManager_GeomEntity
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public ReadOnly Property IsImport_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Select Case m_Type
|
||||||
|
Case ManagePartType.IMPORT
|
||||||
|
Return Visibility.Visible
|
||||||
|
Case Else ' ManagePartType.MODIFY
|
||||||
|
Return Visibility.Collapsed
|
||||||
|
End Select
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_IsEnabled As Boolean = True
|
||||||
|
Public ReadOnly Property IsEnabled As Boolean
|
||||||
|
Get
|
||||||
|
Return m_IsEnabled
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetIsEnabled(value As Boolean)
|
||||||
|
m_IsEnabled = value
|
||||||
|
NotifyPropertyChanged(NameOf(IsEnabled))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdSetReference As ICommand
|
||||||
|
Private m_cmdAddPart As ICommand
|
||||||
|
Private m_cmdRemovePart As ICommand
|
||||||
|
Private m_cmdOk As ICommand
|
||||||
|
Private m_cmdCancel As ICommand
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
' Creo riferimento a questa classe in EgtCAM5Map
|
||||||
|
Map.SetRefManagePartPanelVM(Me)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Friend Sub Init(Type As ManagePartType)
|
||||||
|
m_Type = Type
|
||||||
|
Select Case Type
|
||||||
|
Case ManagePartType.IMPORT
|
||||||
|
' import
|
||||||
|
m_ImportedEntityList.Clear()
|
||||||
|
m_ManagerPartList.Clear()
|
||||||
|
' aggiungo geometrie importate a lista
|
||||||
|
m_nImportedPartId = EgtGetLastPart()
|
||||||
|
Dim nLayerId As Integer = EgtGetFirstLayer(m_nImportedPartId)
|
||||||
|
Dim nGeometryId As Integer = EgtGetFirstInGroup(nLayerId)
|
||||||
|
While nGeometryId <> GDB_ID.NULL
|
||||||
|
Dim sGeometryName As String = ""
|
||||||
|
EgtGetName(nGeometryId, sGeometryName)
|
||||||
|
m_ImportedEntityList.Add(New PartManager_GeomEntity(Nothing, nGeometryId))
|
||||||
|
nGeometryId = EgtGetNext(nGeometryId)
|
||||||
|
End While
|
||||||
|
' aggiungo primo pezzo
|
||||||
|
m_ManagerPartList.Add(New ManagePart_Part(Nothing))
|
||||||
|
m_ManagerPartList(0).LayerList.FirstOrDefault(Function(x) x.Type = ManagePart_Layer.LayerType.PRINT_SOLID).bIsSelected = True
|
||||||
|
' aggiorno i contextmenu di tutti gli entity
|
||||||
|
UpdateAllEntityContextMenu()
|
||||||
|
Case ManagePartType.MODIFY
|
||||||
|
' modify
|
||||||
|
m_ImportedEntityList.Clear()
|
||||||
|
m_ManagerPartList.Clear()
|
||||||
|
' carico pezzi in lista
|
||||||
|
For Each PrintPart In Map.refTopPanelVM.PartList
|
||||||
|
m_ManagerPartList.Add(New ManagePart_Part(PrintPart))
|
||||||
|
Next
|
||||||
|
End Select
|
||||||
|
NotifyPropertyChanged(NameOf(IsImport_Visibility))
|
||||||
|
EgtDeselectAll()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub UpdateAllEntityContextMenu()
|
||||||
|
' aggiorno i contextmenu di tutti gli entity
|
||||||
|
For Each ManagePart In m_ManagerPartList
|
||||||
|
For Each Layer In ManagePart.LayerList
|
||||||
|
For Each Entity In Layer.EntityList
|
||||||
|
Entity.UpdateContextMenu()
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
For Each Entity In ImportedEntityList
|
||||||
|
Entity.UpdateContextMenu()
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' METHODS
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "AddPart"
|
||||||
|
|
||||||
|
Public ReadOnly Property AddPart_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdAddPart Is Nothing Then
|
||||||
|
m_cmdAddPart = New Command(AddressOf AddPart)
|
||||||
|
End If
|
||||||
|
Return m_cmdAddPart
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub AddPart()
|
||||||
|
m_ManagerPartList.Add(New ManagePart_Part(Nothing))
|
||||||
|
' aggiorno i contextmenu di tutti gli entity
|
||||||
|
UpdateAllEntityContextMenu()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' AddPart
|
||||||
|
|
||||||
|
#Region "RemovePart"
|
||||||
|
|
||||||
|
Public ReadOnly Property RemovePart_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdRemovePart Is Nothing Then
|
||||||
|
m_cmdRemovePart = New Command(AddressOf RemovePart)
|
||||||
|
End If
|
||||||
|
Return m_cmdRemovePart
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub RemovePart()
|
||||||
|
If IsNothing(SelManagerLayer) AndAlso m_ManagerPartList.Count > 1 Then
|
||||||
|
' rimuovo pezzo
|
||||||
|
m_ManagerPartList.Remove(SelManagerPart)
|
||||||
|
'Else
|
||||||
|
' ' rimuovo geometria
|
||||||
|
' Dim CurrEntity As PartManager_GeomEntity = m_SelPartManager_GeomEntity
|
||||||
|
' SelManagerLayer.EntityList.Remove(m_SelPartManager_GeomEntity)
|
||||||
|
' ' la rimetto in lista importati
|
||||||
|
' ImportedEntityList.Add(CurrEntity)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' RemovePart
|
||||||
|
|
||||||
|
#Region "Ok"
|
||||||
|
|
||||||
|
Public ReadOnly Property Ok_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdOk Is Nothing Then
|
||||||
|
m_cmdOk = New Command(AddressOf Ok)
|
||||||
|
End If
|
||||||
|
Return m_cmdOk
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Ok()
|
||||||
|
Select Case m_Type
|
||||||
|
Case ManagePartType.IMPORT
|
||||||
|
Dim sErr As New List(Of String)
|
||||||
|
' verifico che tutti i pezzi abbiano una superficie da stampare nel layer apposito
|
||||||
|
For Each CurrPart In m_ManagerPartList
|
||||||
|
For Each CurrLayer In CurrPart.LayerList
|
||||||
|
Select Case CurrLayer.Type
|
||||||
|
Case ManagePart_Layer.LayerType.PRINT_SOLID
|
||||||
|
If CurrLayer.EntityList.Count = 0 Then
|
||||||
|
If sErr.Count > 0 Then sErr(sErr.Count - 1) &= Environment.NewLine
|
||||||
|
sErr.Add(CurrPart.sName & " - No print surface defined!")
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
If sErr.Count > 0 Then
|
||||||
|
MessageBox.Show(String.Concat(sErr), "Error")
|
||||||
|
Return
|
||||||
|
Else
|
||||||
|
' Creo pezzi e layer necessari
|
||||||
|
For ManagePart_PartIndex = 0 To m_ManagerPartList.Count - 1
|
||||||
|
Dim ManagePart_Part As ManagePart_Part = m_ManagerPartList(ManagePart_PartIndex)
|
||||||
|
Dim frImportedPart As New Frame3d
|
||||||
|
EgtGetGroupGlobFrame(m_nImportedPartId, frImportedPart)
|
||||||
|
Dim nPartId As Integer = EgtCreateGroup(GDB_ID.ROOT, frImportedPart)
|
||||||
|
EgtSetName(nPartId, PART)
|
||||||
|
Dim nFrameId As Integer = GDB_ID.NULL
|
||||||
|
Dim b3PrintSolid As New BBox3d
|
||||||
|
Dim nPrintPartLayerId As Integer = GDB_ID.NULL
|
||||||
|
Dim PrintSolidEntity As PartManager_GeomEntity = Nothing
|
||||||
|
Dim nRibsLayerId As Integer = GDB_ID.NULL
|
||||||
|
Dim nShellNumberLayerId As Integer = GDB_ID.NULL
|
||||||
|
Dim nAuxSolidsLayerId As Integer = GDB_ID.NULL
|
||||||
|
Dim nMachStartLayerId As Integer = GDB_ID.NULL
|
||||||
|
Dim nOthersLayerId As Integer = GDB_ID.NULL
|
||||||
|
For Each ManagePart_Layer In ManagePart_Part.LayerList
|
||||||
|
Select Case ManagePart_Layer.Type
|
||||||
|
Case ManagePart_Layer.LayerType.PRINT_SOLID
|
||||||
|
nPrintPartLayerId = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nPrintPartLayerId, PRINT_SOLID)
|
||||||
|
If ManagePart_Layer.EntityList.Count > 0 Then
|
||||||
|
PrintSolidEntity = ManagePart_Layer.EntityList(0)
|
||||||
|
EgtRelocateGlob(PrintSolidEntity.nId, nPrintPartLayerId, GDB_POS.LAST_SON)
|
||||||
|
' calcolo box superficie per creazione riferimento
|
||||||
|
EgtGetBBoxGlob(PrintSolidEntity.nId, GDB_BB.STANDARD, b3PrintSolid)
|
||||||
|
' coloro l'entita'
|
||||||
|
EgtSetColor(PrintSolidEntity.nId, GeomEntityColors.c3Print)
|
||||||
|
If PrintSolidEntity.sName <> PrintSolidEntity.nId.ToString() Then
|
||||||
|
EgtSetInfo(PrintSolidEntity.nId, ENTITY_NAME, PrintSolidEntity.sName)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Case ManagePart_Layer.LayerType.MACH_START
|
||||||
|
nMachStartLayerId = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nMachStartLayerId, LAY_MACH_START)
|
||||||
|
Dim nMachStartId As Integer = GDB_ID.NULL
|
||||||
|
If ManagePart_Layer.EntityList.Count > 0 Then
|
||||||
|
For Each PartManager_GeomEntity In ManagePart_Layer.EntityList
|
||||||
|
' se punto o curva compo
|
||||||
|
Dim EntityType As GDB_TY = EgtGetType(PartManager_GeomEntity.nId)
|
||||||
|
Select Case EntityType
|
||||||
|
Case GDB_TY.GEO_POINT, GDB_TY.CRV_COMPO
|
||||||
|
' gli cambio layer
|
||||||
|
EgtRelocateGlob(PartManager_GeomEntity.nId, nMachStartLayerId, GDB_POS.LAST_SON)
|
||||||
|
nMachStartId = PartManager_GeomEntity.nId
|
||||||
|
Case GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_LINE
|
||||||
|
' altrimenti la trasformo in curva compo
|
||||||
|
nMachStartId = EgtCreateCurveCompo(nMachStartLayerId, PartManager_GeomEntity.nId, True)
|
||||||
|
End Select
|
||||||
|
EgtSetName(nMachStartId, START_GEOM)
|
||||||
|
' coloro l'entita'
|
||||||
|
EgtSetColor(nMachStartId, GeomEntityColors.c3MachStart)
|
||||||
|
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
|
||||||
|
EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
' creo punto di partenza
|
||||||
|
Dim ptStart As Point3d = b3PrintSolid.Center() - 0.6 * b3PrintSolid.DimY() * Vector3d.Y_AX() - 0.5 * b3PrintSolid.DimZ() * Vector3d.Z_AX()
|
||||||
|
nMachStartId = EgtCreateGeoPoint(nMachStartLayerId, ptStart, GDB_RT.GLOB)
|
||||||
|
EgtSetName(nMachStartId, START_GEOM)
|
||||||
|
' coloro l'entita' di rosso
|
||||||
|
EgtSetColor(nMachStartId, GeomEntityColors.c3MachStart)
|
||||||
|
End If
|
||||||
|
Case ManagePart_Layer.LayerType.RIBS
|
||||||
|
nRibsLayerId = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nRibsLayerId, LAY_RIBS)
|
||||||
|
For Each PartManager_GeomEntity In ManagePart_Layer.EntityList
|
||||||
|
EgtSetInfo(PartManager_GeomEntity.nId, KEY_RIB_TYPE, RibEntity.RibTypes.FROMIMPORT)
|
||||||
|
EgtRelocateGlob(PartManager_GeomEntity.nId, nRibsLayerId, GDB_POS.LAST_SON)
|
||||||
|
' coloro l'entita'
|
||||||
|
EgtSetColor(PartManager_GeomEntity.nId, GeomEntityColors.c3Rib)
|
||||||
|
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
|
||||||
|
EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Case ManagePart_Layer.LayerType.SHELL_NUMBER
|
||||||
|
nShellNumberLayerId = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nShellNumberLayerId, LAY_SHELL_NBR)
|
||||||
|
For Each PartManager_GeomEntity In ManagePart_Layer.EntityList
|
||||||
|
EgtSetInfo(PartManager_GeomEntity.nId, KEY_SHELLNBR_TYPE, ShellNumberEntity.ShellNumberTypes.FROMIMPORT)
|
||||||
|
EgtRelocateGlob(PartManager_GeomEntity.nId, nShellNumberLayerId, GDB_POS.LAST_SON)
|
||||||
|
' coloro l'entita'
|
||||||
|
EgtSetColor(PartManager_GeomEntity.nId, GeomEntityColors.c3ShellNumber)
|
||||||
|
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
|
||||||
|
EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Case ManagePart_Layer.LayerType.AUX_SOLIDS
|
||||||
|
nAuxSolidsLayerId = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nAuxSolidsLayerId, LAY_AUX_SOLIDS)
|
||||||
|
For Each PartManager_GeomEntity In ManagePart_Layer.EntityList
|
||||||
|
EgtSetInfo(PartManager_GeomEntity.nId, KEY_AUXSOLID_TYPE, RibEntity.RibTypes.FROMIMPORT)
|
||||||
|
EgtRelocateGlob(PartManager_GeomEntity.nId, nAuxSolidsLayerId, GDB_POS.LAST_SON)
|
||||||
|
' coloro l'entita'
|
||||||
|
EgtSetColor(PartManager_GeomEntity.nId, GeomEntityColors.c3AuxSolids)
|
||||||
|
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
|
||||||
|
EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Case ManagePart_Layer.LayerType.OTHERS
|
||||||
|
nOthersLayerId = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nOthersLayerId, LAY_OTHERS)
|
||||||
|
For Each PartManager_GeomEntity In ManagePart_Layer.EntityList
|
||||||
|
EgtRelocateGlob(PartManager_GeomEntity.nId, nOthersLayerId, GDB_POS.LAST_SON)
|
||||||
|
' coloro l'entita'
|
||||||
|
EgtSetColor(PartManager_GeomEntity.nId, GeomEntityColors.c3Others)
|
||||||
|
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
|
||||||
|
EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If ManagePart_PartIndex = 0 Then
|
||||||
|
For Each PartManager_GeomEntity In ImportedEntityList
|
||||||
|
' se curva
|
||||||
|
Dim EntityType As GDB_TY = EgtGetType(PartManager_GeomEntity.nId)
|
||||||
|
Select Case EntityType
|
||||||
|
Case GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_LINE
|
||||||
|
' la trasformo in curva compo
|
||||||
|
Dim nOtherId As Integer = EgtCreateCurveCompo(nOthersLayerId, PartManager_GeomEntity.nId, True)
|
||||||
|
' coloro l'entita'
|
||||||
|
EgtSetColor(nOtherId, GeomEntityColors.c3Others)
|
||||||
|
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
|
||||||
|
EgtSetInfo(nOtherId, ENTITY_NAME, PartManager_GeomEntity.sName)
|
||||||
|
End If
|
||||||
|
Case Else
|
||||||
|
' altrimenti la sposto solamente
|
||||||
|
EgtRelocateGlob(PartManager_GeomEntity.nId, nOthersLayerId, GDB_POS.LAST_SON)
|
||||||
|
' coloro l'entita'
|
||||||
|
EgtSetColor(PartManager_GeomEntity.nId, GeomEntityColors.c3Others)
|
||||||
|
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
|
||||||
|
EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName)
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
Next
|
||||||
|
' aggiungo riferimento
|
||||||
|
Dim nReferenceLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nReferenceLayerId, LAY_REFERENCE)
|
||||||
|
' Creo riferimento
|
||||||
|
Dim ptOrig As New Point3d(b3PrintSolid.Min())
|
||||||
|
Dim frPrintSolid As New Frame3d(ptOrig)
|
||||||
|
nFrameId = EgtCreateGeoFrame(nReferenceLayerId, frPrintSolid, GDB_RT.GLOB)
|
||||||
|
If nFrameId Then
|
||||||
|
EgtSetName(nFrameId, FRAME_PART)
|
||||||
|
EgtSetMode(nFrameId, GDB_MD.LOCKED)
|
||||||
|
End If
|
||||||
|
EgtSetInfo(nReferenceLayerId, KEY_REFERENCE, ReferenceBtn.References.BL)
|
||||||
|
' appoggio il pezzo sulla tavola
|
||||||
|
EgtMove(nPartId, New Vector3d(0, 0, -b3PrintSolid.Min.z))
|
||||||
|
' lo aggiungo a lista pezzi
|
||||||
|
Dim sFilePath As String = ""
|
||||||
|
EgtGetInfo(m_nImportedPartId, FILE_PATH, sFilePath)
|
||||||
|
EgtSetInfo(nPartId, FILE_PATH, sFilePath)
|
||||||
|
EgtSetInfo(nPartId, PART_NAME, ManagePart_Part.sName)
|
||||||
|
EgtSetInfo(nPartId, "PartOnTable", 1)
|
||||||
|
Dim NewPart As New Print3dPartVM(nPartId, nPrintPartLayerId, nReferenceLayerId, nFrameId, nMachStartLayerId, nRibsLayerId, nShellNumberLayerId, nAuxSolidsLayerId, nOthersLayerId, sFilePath)
|
||||||
|
Map.refTopPanelVM.PartList.Add(NewPart)
|
||||||
|
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()
|
||||||
|
' elimino vecchio pezzo d'importazione
|
||||||
|
EgtErase(m_nImportedPartId)
|
||||||
|
|
||||||
|
EgtDraw()
|
||||||
|
|
||||||
|
Case ManagePartType.MODIFY
|
||||||
|
' nulla da fare
|
||||||
|
End Select
|
||||||
|
' ripristino modalita' standard
|
||||||
|
Map.refTopPanelVM.SelPage = Pages.MODIFY
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Ok
|
||||||
|
|
||||||
|
#Region "Cancel"
|
||||||
|
|
||||||
|
Public ReadOnly Property Cancel_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdCancel Is Nothing Then
|
||||||
|
m_cmdCancel = New Command(AddressOf Cancel)
|
||||||
|
End If
|
||||||
|
Return m_cmdCancel
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Cancel()
|
||||||
|
' elimino pezzo importato
|
||||||
|
EgtErase(m_nImportedPartId)
|
||||||
|
EgtDraw()
|
||||||
|
' se ci sono pezzi
|
||||||
|
If Map.refTopPanelVM.PartList.Count > 0 Then
|
||||||
|
' ripristino modalita' standard
|
||||||
|
Map.refTopPanelVM.SelPage = Pages.MODIFY
|
||||||
|
Else
|
||||||
|
Map.refTopPanelVM.SelPage = Pages.NULL
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Cancel
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,907 @@
|
|||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
|
Public Class PartManager_GeomEntity
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
' layer sotto cui e' questa entita'
|
||||||
|
Private m_OrigLayer As ManagePart_Layer
|
||||||
|
Friend ReadOnly Property OrigLayer As ManagePart_Layer
|
||||||
|
Get
|
||||||
|
Return m_OrigLayer
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_bIsSelected As Boolean
|
||||||
|
Public Property bIsSelected As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bIsSelected
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_bIsSelected = value
|
||||||
|
' seleziono in scena
|
||||||
|
EgtDeselectAll()
|
||||||
|
If Not IsNothing(value) Then
|
||||||
|
EgtSelectObj(m_nId)
|
||||||
|
End If
|
||||||
|
EgtDraw()
|
||||||
|
' segno come elemento selezionato in treeview
|
||||||
|
Map.refManagePartPanelVM.SetSelPartManager_GeomEntity(Me)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nId As Integer = GDB_ID.NULL
|
||||||
|
Public ReadOnly Property nId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sName As String
|
||||||
|
Public Property sName As String
|
||||||
|
Get
|
||||||
|
Return m_sName
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sName = value
|
||||||
|
SetTextBoxVisibility(False)
|
||||||
|
NotifyPropertyChanged(NameOf(sName))
|
||||||
|
If Map.refManagePartPanelVM.Type = ManagePartPanelVM.ManagePartType.MODIFY Then
|
||||||
|
EgtSetInfo(m_nId, ENTITY_NAME, value)
|
||||||
|
End If
|
||||||
|
Map.refManagePartPanelVM.SetIsEnabled(True)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property ghName As String
|
||||||
|
Get
|
||||||
|
Return m_nId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_MenuList As New ObservableCollection(Of GeomEntity_MenuItem)
|
||||||
|
Public Property MenuList As ObservableCollection(Of GeomEntity_MenuItem)
|
||||||
|
Get
|
||||||
|
Return m_MenuList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of GeomEntity_MenuItem))
|
||||||
|
m_MenuList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_UserShouldEditValueNow As Boolean = False
|
||||||
|
Public Property UserShouldEditValueNow As Boolean
|
||||||
|
Get
|
||||||
|
Return m_UserShouldEditValueNow
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_UserShouldEditValueNow = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Friend Sub SetUserShouldEditValueNow()
|
||||||
|
m_UserShouldEditValueNow = True
|
||||||
|
NotifyPropertyChanged(NameOf(UserShouldEditValueNow))
|
||||||
|
m_UserShouldEditValueNow = False
|
||||||
|
NotifyPropertyChanged(NameOf(UserShouldEditValueNow))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_TextBox_Visibility As Visibility = Visibility.Collapsed
|
||||||
|
Public ReadOnly Property TextBox_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_TextBox_Visibility
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_TextBlock_Visibility As Visibility = Visibility.Visible
|
||||||
|
Public ReadOnly Property TextBlock_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_TextBlock_Visibility
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdGeomEntityDoubleClick As ICommand
|
||||||
|
|
||||||
|
Sub New(OrigLayer As ManagePart_Layer, nId As Integer)
|
||||||
|
m_nId = nId
|
||||||
|
Dim sName As String = ""
|
||||||
|
EgtGetInfo(m_nId, ENTITY_NAME, sName)
|
||||||
|
m_sName = If(String.IsNullOrWhiteSpace(sName), m_nId, sName)
|
||||||
|
m_OrigLayer = OrigLayer
|
||||||
|
' aggiungo voci layer a contextmenu
|
||||||
|
UpdateContextMenu()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub UpdateContextMenu()
|
||||||
|
m_MenuList.Clear()
|
||||||
|
Select Case Map.refManagePartPanelVM.Type
|
||||||
|
Case ManagePartPanelVM.ManagePartType.IMPORT
|
||||||
|
Dim bIsSurface As Boolean = False
|
||||||
|
For Each ProjectPart In Map.refManagePartPanelVM.ManagerPartList
|
||||||
|
' verifico in quali layer puo' andare questo elemento
|
||||||
|
Dim EntityType As GDB_TY = EgtGetType(nId)
|
||||||
|
Dim nPrintSolidCount As Integer = 0
|
||||||
|
Dim ManageLayer As ManagePart_Layer = ProjectPart.LayerList.FirstOrDefault(Function(x) x.Type = ManagePart_Layer.LayerType.PRINT_SOLID)
|
||||||
|
If Not IsNothing(ManageLayer) Then
|
||||||
|
nPrintSolidCount = ManageLayer.EntityList.Count
|
||||||
|
End If
|
||||||
|
Select Case EntityType
|
||||||
|
Case GDB_TY.GEO_POINT, GDB_TY.CRV_COMPO, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_LINE
|
||||||
|
If Not IsNothing(OrigLayer) Then
|
||||||
|
' recupero i layer
|
||||||
|
If Not ProjectPart Is OrigLayer.OrigPart OrElse OrigLayer.Type <> ManagePart_Layer.LayerType.MACH_START Then m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.MACH_START, ProjectPart))
|
||||||
|
If Not ProjectPart Is OrigLayer.OrigPart OrElse OrigLayer.Type <> ManagePart_Layer.LayerType.OTHERS Then m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.OTHERS, ProjectPart))
|
||||||
|
Else
|
||||||
|
m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.MACH_START, ProjectPart))
|
||||||
|
m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.OTHERS, ProjectPart))
|
||||||
|
End If
|
||||||
|
Case GDB_TY.SRF_MESH
|
||||||
|
bIsSurface = True
|
||||||
|
If Not IsNothing(OrigLayer) Then
|
||||||
|
' verifico se volume chiuso
|
||||||
|
If nPrintSolidCount = 0 AndAlso (Not ProjectPart Is OrigLayer.OrigPart OrElse OrigLayer.Type <> ManagePart_Layer.LayerType.PRINT_SOLID) Then m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.PRINT_SOLID, ProjectPart))
|
||||||
|
If Not ProjectPart Is OrigLayer.OrigPart OrElse OrigLayer.Type <> ManagePart_Layer.LayerType.SHELL_NUMBER Then m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.SHELL_NUMBER, ProjectPart))
|
||||||
|
If Not ProjectPart Is OrigLayer.OrigPart OrElse OrigLayer.Type <> ManagePart_Layer.LayerType.AUX_SOLIDS Then m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.AUX_SOLIDS, ProjectPart))
|
||||||
|
If Not ProjectPart Is OrigLayer.OrigPart OrElse OrigLayer.Type <> ManagePart_Layer.LayerType.RIBS Then m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.RIBS, ProjectPart))
|
||||||
|
If Not ProjectPart Is OrigLayer.OrigPart OrElse OrigLayer.Type <> ManagePart_Layer.LayerType.OTHERS Then m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.OTHERS, ProjectPart))
|
||||||
|
Else
|
||||||
|
If nPrintSolidCount = 0 Then m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.PRINT_SOLID, ProjectPart))
|
||||||
|
m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.SHELL_NUMBER, ProjectPart))
|
||||||
|
m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.AUX_SOLIDS, ProjectPart))
|
||||||
|
m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.RIBS, ProjectPart))
|
||||||
|
m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.OTHERS, ProjectPart))
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
Next
|
||||||
|
If bIsSurface Then m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.NEWPART))
|
||||||
|
m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.CHANGENAME))
|
||||||
|
m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.DELETE))
|
||||||
|
Case ManagePartPanelVM.ManagePartType.MODIFY
|
||||||
|
Dim bIsSurface As Boolean = False
|
||||||
|
For Each ProjectPart In Map.refTopPanelVM.PartList
|
||||||
|
' verifico in quali layer puo' andare questo elemento
|
||||||
|
Dim EntityType As GDB_TY = EgtGetType(nId)
|
||||||
|
Dim nPrintSolidCount As Integer = EgtGetGroupObjs(ProjectPart.nPrintSolidLayerId)
|
||||||
|
Select Case EntityType
|
||||||
|
Case GDB_TY.GEO_POINT, GDB_TY.CRV_COMPO, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_LINE
|
||||||
|
If Not IsNothing(OrigLayer) Then
|
||||||
|
' recupero i layer
|
||||||
|
If ProjectPart.nPartId <> OrigLayer.OrigPart.PrintPart.nPartId OrElse OrigLayer.Type <> ManagePart_Layer.LayerType.MACH_START Then m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.MACH_START, ProjectPart))
|
||||||
|
If ProjectPart.nPartId <> OrigLayer.OrigPart.PrintPart.nPartId OrElse OrigLayer.Type <> ManagePart_Layer.LayerType.OTHERS Then m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.OTHERS, ProjectPart))
|
||||||
|
Else
|
||||||
|
m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.MACH_START, ProjectPart))
|
||||||
|
m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.OTHERS, ProjectPart))
|
||||||
|
End If
|
||||||
|
Case GDB_TY.SRF_MESH
|
||||||
|
bIsSurface = True
|
||||||
|
If Not IsNothing(OrigLayer) Then
|
||||||
|
' verifico se volume chiuso
|
||||||
|
If nPrintSolidCount = 0 AndAlso (ProjectPart.nPartId <> OrigLayer.OrigPart.PrintPart.nPartId OrElse OrigLayer.Type <> ManagePart_Layer.LayerType.PRINT_SOLID) Then m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.PRINT_SOLID, ProjectPart))
|
||||||
|
If ProjectPart.nPartId <> OrigLayer.OrigPart.PrintPart.nPartId OrElse OrigLayer.Type <> ManagePart_Layer.LayerType.SHELL_NUMBER Then m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.SHELL_NUMBER, ProjectPart))
|
||||||
|
If ProjectPart.nPartId <> OrigLayer.OrigPart.PrintPart.nPartId OrElse OrigLayer.Type <> ManagePart_Layer.LayerType.AUX_SOLIDS Then m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.AUX_SOLIDS, ProjectPart))
|
||||||
|
If ProjectPart.nPartId <> OrigLayer.OrigPart.PrintPart.nPartId OrElse OrigLayer.Type <> ManagePart_Layer.LayerType.RIBS Then m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.RIBS, ProjectPart))
|
||||||
|
If ProjectPart.nPartId <> OrigLayer.OrigPart.PrintPart.nPartId OrElse OrigLayer.Type <> ManagePart_Layer.LayerType.OTHERS Then m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.OTHERS, ProjectPart))
|
||||||
|
Else
|
||||||
|
If nPrintSolidCount = 0 Then m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.PRINT_SOLID, ProjectPart))
|
||||||
|
m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.SHELL_NUMBER, ProjectPart))
|
||||||
|
m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.AUX_SOLIDS, ProjectPart))
|
||||||
|
m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.RIBS, ProjectPart))
|
||||||
|
m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.OTHERS, ProjectPart))
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
Next
|
||||||
|
If bIsSurface Then m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.NEWPART))
|
||||||
|
m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.CHANGENAME))
|
||||||
|
m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.DELETE))
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub UpdateOrigLayer(NewLayer As ManagePart_Layer)
|
||||||
|
m_OrigLayer = NewLayer
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub SetTextBoxVisibility(bValue As Boolean)
|
||||||
|
m_TextBox_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
m_TextBlock_Visibility = If(Not bValue, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
NotifyPropertyChanged(NameOf(TextBox_Visibility))
|
||||||
|
NotifyPropertyChanged(NameOf(TextBlock_Visibility))
|
||||||
|
If bValue Then SetUserShouldEditValueNow()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "GeomEntityDoubleClick"
|
||||||
|
|
||||||
|
Public ReadOnly Property GeomEntityDoubleClick_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdGeomEntityDoubleClick Is Nothing Then
|
||||||
|
m_cmdGeomEntityDoubleClick = New Command(AddressOf GeomEntityDoubleClick)
|
||||||
|
End If
|
||||||
|
Return m_cmdGeomEntityDoubleClick
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub GeomEntityDoubleClick()
|
||||||
|
If Not IsNothing(Map.refManagePartPanelVM.SelManagerLayer) Then
|
||||||
|
Map.refManagePartPanelVM.ImportedEntityList.Remove(Me)
|
||||||
|
' aggiorno riferimenti layer e context menu
|
||||||
|
UpdateOrigLayer(Map.refManagePartPanelVM.SelManagerLayer)
|
||||||
|
UpdateContextMenu()
|
||||||
|
Map.refManagePartPanelVM.SelManagerLayer.EntityList.Add(Me)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' ImportedEntity
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class ManagePart_Part
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Private m_bIsSelected As Boolean
|
||||||
|
Public Property bIsSelected As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bIsSelected
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_bIsSelected = value
|
||||||
|
Map.refManagePartPanelVM.SetSelManagerPart(Me)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nId As Integer
|
||||||
|
Public ReadOnly Property nId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_PrintPart As Print3dPartVM
|
||||||
|
Public ReadOnly Property PrintPart As Print3dPartVM
|
||||||
|
Get
|
||||||
|
Return m_PrintPart
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sName As String
|
||||||
|
Public Property sName As String
|
||||||
|
Get
|
||||||
|
Return m_sName
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sName = value
|
||||||
|
SetTextBoxVisibility(False)
|
||||||
|
NotifyPropertyChanged(NameOf(sName))
|
||||||
|
If Map.refManagePartPanelVM.Type = ManagePartPanelVM.ManagePartType.MODIFY Then
|
||||||
|
m_PrintPart.UpdateName(value)
|
||||||
|
EgtSetInfo(m_PrintPart.nPartId, PART_NAME, value)
|
||||||
|
End If
|
||||||
|
Map.refManagePartPanelVM.SetIsEnabled(True)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_MenuList As New List(Of ManagerPart_MenuItem)
|
||||||
|
Public Property MenuList As List(Of ManagerPart_MenuItem)
|
||||||
|
Get
|
||||||
|
Return m_MenuList
|
||||||
|
End Get
|
||||||
|
Set(value As List(Of ManagerPart_MenuItem))
|
||||||
|
m_MenuList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_LayerList As New ObservableCollection(Of ManagePart_Layer)
|
||||||
|
Public ReadOnly Property LayerList As ObservableCollection(Of ManagePart_Layer)
|
||||||
|
Get
|
||||||
|
Return m_LayerList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_UserShouldEditValueNow As Boolean = False
|
||||||
|
Public Property UserShouldEditValueNow As Boolean
|
||||||
|
Get
|
||||||
|
Return m_UserShouldEditValueNow
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_UserShouldEditValueNow = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Friend Sub SetUserShouldEditValueNow()
|
||||||
|
m_UserShouldEditValueNow = True
|
||||||
|
NotifyPropertyChanged(NameOf(UserShouldEditValueNow))
|
||||||
|
m_UserShouldEditValueNow = False
|
||||||
|
NotifyPropertyChanged(NameOf(UserShouldEditValueNow))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_TextBox_Visibility As Visibility = Visibility.Collapsed
|
||||||
|
Public ReadOnly Property TextBox_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_TextBox_Visibility
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_TextBlock_Visibility As Visibility = Visibility.Visible
|
||||||
|
Public ReadOnly Property TextBlock_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_TextBlock_Visibility
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(PrintPart As Print3dPartVM)
|
||||||
|
m_PrintPart = PrintPart
|
||||||
|
'NotifyPropertyChanged(NameOf(sName))
|
||||||
|
If Map.refManagePartPanelVM.ManagerPartList.Count = 0 Then
|
||||||
|
m_nId = 1
|
||||||
|
Else
|
||||||
|
m_nId = Map.refManagePartPanelVM.ManagerPartList.Max(Function(x) x.nId) + 1
|
||||||
|
End If
|
||||||
|
If Not IsNothing(PrintPart) Then
|
||||||
|
m_sName = m_PrintPart.sName
|
||||||
|
m_LayerList.Add(New ManagePart_Layer(Me, ManagePart_Layer.LayerType.PRINT_SOLID, "Print", PrintPart))
|
||||||
|
m_LayerList.Add(New ManagePart_Layer(Me, ManagePart_Layer.LayerType.MACH_START, "Layer Start", PrintPart))
|
||||||
|
m_LayerList.Add(New ManagePart_Layer(Me, ManagePart_Layer.LayerType.RIBS, "Ribs", PrintPart))
|
||||||
|
m_LayerList.Add(New ManagePart_Layer(Me, ManagePart_Layer.LayerType.SHELL_NUMBER, "Reduce Shell Number", PrintPart))
|
||||||
|
m_LayerList.Add(New ManagePart_Layer(Me, ManagePart_Layer.LayerType.AUX_SOLIDS, "Filled Solids", PrintPart))
|
||||||
|
m_LayerList.Add(New ManagePart_Layer(Me, ManagePart_Layer.LayerType.OTHERS, "Others", PrintPart))
|
||||||
|
Else
|
||||||
|
m_sName = "Part" & m_nId
|
||||||
|
m_LayerList.Add(New ManagePart_Layer(Me, ManagePart_Layer.LayerType.PRINT_SOLID, "Print"))
|
||||||
|
m_LayerList.Add(New ManagePart_Layer(Me, ManagePart_Layer.LayerType.MACH_START, "Layer Start"))
|
||||||
|
m_LayerList.Add(New ManagePart_Layer(Me, ManagePart_Layer.LayerType.RIBS, "Ribs"))
|
||||||
|
m_LayerList.Add(New ManagePart_Layer(Me, ManagePart_Layer.LayerType.SHELL_NUMBER, "Reduce Shell Number"))
|
||||||
|
m_LayerList.Add(New ManagePart_Layer(Me, ManagePart_Layer.LayerType.AUX_SOLIDS, "Filled Solids"))
|
||||||
|
m_LayerList.Add(New ManagePart_Layer(Me, ManagePart_Layer.LayerType.OTHERS, "Others"))
|
||||||
|
End If
|
||||||
|
' creo context menu per cambio nome ed eliminazione
|
||||||
|
m_MenuList.Add(New ManagerPart_MenuItem(Me, ManagerPart_MenuItem.PartMenuCmd.CHANGENAME))
|
||||||
|
m_MenuList.Add(New ManagerPart_MenuItem(Me, ManagerPart_MenuItem.PartMenuCmd.DELETE))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub SetTextBoxVisibility(bValue As Boolean)
|
||||||
|
m_TextBox_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
m_TextBlock_Visibility = If(Not bValue, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
NotifyPropertyChanged(NameOf(TextBox_Visibility))
|
||||||
|
NotifyPropertyChanged(NameOf(TextBlock_Visibility))
|
||||||
|
If bValue Then SetUserShouldEditValueNow()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class ManagePart_Layer
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Public Enum LayerType As Integer
|
||||||
|
PRINT_SOLID = 1
|
||||||
|
MACH_START = 2
|
||||||
|
RIBS = 3
|
||||||
|
SHELL_NUMBER = 4
|
||||||
|
AUX_SOLIDS = 5
|
||||||
|
OTHERS = 7
|
||||||
|
CHANGENAME = 15
|
||||||
|
DELETE = 16
|
||||||
|
NEWPART = 17
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
' enita' di origine
|
||||||
|
Private m_OrigPart As ManagePart_Part
|
||||||
|
Public ReadOnly Property OrigPart As ManagePart_Part
|
||||||
|
Get
|
||||||
|
Return m_OrigPart
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nLayerId As Integer
|
||||||
|
|
||||||
|
Private m_bIsSelected As Boolean
|
||||||
|
Public Property bIsSelected As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bIsSelected
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_bIsSelected = value
|
||||||
|
Map.refManagePartPanelVM.SetSelManagerLayer(Me)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Type As LayerType
|
||||||
|
Public Property Type As LayerType
|
||||||
|
Get
|
||||||
|
Return m_Type
|
||||||
|
End Get
|
||||||
|
Set(value As LayerType)
|
||||||
|
m_Type = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sName As String
|
||||||
|
Public Property sName As String
|
||||||
|
Get
|
||||||
|
Return m_sName
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sName = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_EntityList As New ObservableCollection(Of PartManager_GeomEntity)
|
||||||
|
Public Property EntityList As ObservableCollection(Of PartManager_GeomEntity)
|
||||||
|
Get
|
||||||
|
Return m_EntityList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of PartManager_GeomEntity))
|
||||||
|
m_EntityList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(OrigPart As ManagePart_Part, Type As LayerType, sName As String)
|
||||||
|
m_OrigPart = OrigPart
|
||||||
|
m_Type = Type
|
||||||
|
m_sName = sName
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub New(OrigPart As ManagePart_Part, Type As LayerType, sName As String, PrintPart As Print3dPartVM)
|
||||||
|
m_OrigPart = OrigPart
|
||||||
|
m_Type = Type
|
||||||
|
m_sName = sName
|
||||||
|
Select Case Type
|
||||||
|
Case LayerType.PRINT_SOLID
|
||||||
|
m_nLayerId = PrintPart.nPrintSolidLayerId
|
||||||
|
Dim nEntityId As Integer = EgtGetFirstInGroup(m_nLayerId)
|
||||||
|
If nEntityId <> GDB_ID.NULL Then
|
||||||
|
m_EntityList.Add(New PartManager_GeomEntity(Me, nEntityId))
|
||||||
|
End If
|
||||||
|
Case LayerType.MACH_START
|
||||||
|
m_nLayerId = PrintPart.nMachStartLayerId
|
||||||
|
Dim nEntityId As Integer = EgtGetFirstInGroup(m_nLayerId)
|
||||||
|
While nEntityId <> GDB_ID.NULL
|
||||||
|
m_EntityList.Add(New PartManager_GeomEntity(Me, nEntityId))
|
||||||
|
nEntityId = EgtGetNext(nEntityId)
|
||||||
|
End While
|
||||||
|
Case LayerType.RIBS
|
||||||
|
m_nLayerId = PrintPart.nRibsLayerId
|
||||||
|
Dim nEntityId As Integer = EgtGetFirstInGroup(m_nLayerId)
|
||||||
|
While nEntityId <> GDB_ID.NULL
|
||||||
|
Dim RibType As Integer = RibEntity.RibTypes.FROMDRAW
|
||||||
|
EgtGetInfo(nEntityId, KEY_RIB_TYPE, RibType)
|
||||||
|
If RibType = RibEntity.RibTypes.FROMIMPORT Then
|
||||||
|
m_EntityList.Add(New PartManager_GeomEntity(Me, nEntityId))
|
||||||
|
End If
|
||||||
|
nEntityId = EgtGetNext(nEntityId)
|
||||||
|
End While
|
||||||
|
Case LayerType.SHELL_NUMBER
|
||||||
|
m_nLayerId = PrintPart.nShellNumberLayerId
|
||||||
|
Dim nEntityId As Integer = EgtGetFirstInGroup(m_nLayerId)
|
||||||
|
While nEntityId <> GDB_ID.NULL
|
||||||
|
Dim ShellType As Integer = ShellNumberEntity.ShellNumberTypes.FROMDRAW
|
||||||
|
EgtGetInfo(nEntityId, KEY_SHELLNBR_TYPE, ShellType)
|
||||||
|
If ShellType = ShellNumberEntity.ShellNumberTypes.FROMIMPORT Then
|
||||||
|
m_EntityList.Add(New PartManager_GeomEntity(Me, nEntityId))
|
||||||
|
End If
|
||||||
|
nEntityId = EgtGetNext(nEntityId)
|
||||||
|
End While
|
||||||
|
Case LayerType.AUX_SOLIDS
|
||||||
|
m_nLayerId = PrintPart.nAuxSolidsLayerId
|
||||||
|
Dim nEntityId As Integer = EgtGetFirstInGroup(m_nLayerId)
|
||||||
|
While nEntityId <> GDB_ID.NULL
|
||||||
|
'Dim ShellType As Integer = ShellNumberEntity.ShellNumberTypes.FROMDRAW
|
||||||
|
'EgtGetInfo(nEntityId, KEY_SHELLNBR_TYPE, ShellType)
|
||||||
|
'If ShellType = ShellNumberEntity.ShellNumberTypes.FROMIMPORT Then
|
||||||
|
m_EntityList.Add(New PartManager_GeomEntity(Me, nEntityId))
|
||||||
|
'End If
|
||||||
|
nEntityId = EgtGetNext(nEntityId)
|
||||||
|
End While
|
||||||
|
Case LayerType.OTHERS
|
||||||
|
m_nLayerId = PrintPart.nOthersLayerId
|
||||||
|
Dim nEntityId As Integer = EgtGetFirstInGroup(m_nLayerId)
|
||||||
|
While nEntityId <> GDB_ID.NULL
|
||||||
|
m_EntityList.Add(New PartManager_GeomEntity(Me, nEntityId))
|
||||||
|
nEntityId = EgtGetNext(nEntityId)
|
||||||
|
End While
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class GeomEntity_MenuItem
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
' enita' di origine
|
||||||
|
Private m_OrigEntity As PartManager_GeomEntity
|
||||||
|
|
||||||
|
' pezzo in cui spostare
|
||||||
|
Private m_GeomPart As Print3dPartVM
|
||||||
|
Private m_Part As ManagePart_Part
|
||||||
|
|
||||||
|
' tipo del layer indicato
|
||||||
|
Private m_Type As ManagePart_Layer.LayerType
|
||||||
|
Public Property Type As ManagePart_Layer.LayerType
|
||||||
|
Get
|
||||||
|
Return m_Type
|
||||||
|
End Get
|
||||||
|
Set(value As ManagePart_Layer.LayerType)
|
||||||
|
m_Type = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sMsg As String
|
||||||
|
Get
|
||||||
|
Dim sType As String = ""
|
||||||
|
Select Case m_Type
|
||||||
|
Case ManagePart_Layer.LayerType.PRINT_SOLID
|
||||||
|
sType = "Print"
|
||||||
|
Case ManagePart_Layer.LayerType.MACH_START
|
||||||
|
sType = "Layer Start"
|
||||||
|
Case ManagePart_Layer.LayerType.RIBS
|
||||||
|
sType = "Ribs"
|
||||||
|
Case ManagePart_Layer.LayerType.SHELL_NUMBER
|
||||||
|
sType = "Reduce shell number"
|
||||||
|
Case ManagePart_Layer.LayerType.AUX_SOLIDS
|
||||||
|
sType = "Filled Solids"
|
||||||
|
Case ManagePart_Layer.LayerType.OTHERS
|
||||||
|
sType = "Others"
|
||||||
|
Case ManagePart_Layer.LayerType.NEWPART
|
||||||
|
Return "Create New Part"
|
||||||
|
Case ManagePart_Layer.LayerType.CHANGENAME
|
||||||
|
Return "Change Name"
|
||||||
|
Case ManagePart_Layer.LayerType.DELETE
|
||||||
|
Return "Delete Entity"
|
||||||
|
End Select
|
||||||
|
Dim PartName As String = ""
|
||||||
|
If Map.refManagePartPanelVM.ManagerPartList.Count > 1 Then
|
||||||
|
Dim NewPart As ManagePart_Part = Nothing
|
||||||
|
Select Case Map.refManagePartPanelVM.Type
|
||||||
|
Case ManagePartPanelVM.ManagePartType.IMPORT
|
||||||
|
NewPart = Map.refManagePartPanelVM.ManagerPartList.FirstOrDefault(Function(x) x Is m_Part)
|
||||||
|
Case ManagePartPanelVM.ManagePartType.MODIFY
|
||||||
|
NewPart = Map.refManagePartPanelVM.ManagerPartList.FirstOrDefault(Function(x) x.PrintPart.nPartId = m_GeomPart.nPartId)
|
||||||
|
End Select
|
||||||
|
If Not IsNothing(NewPart) Then
|
||||||
|
PartName = " (" & NewPart.sName & ")"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Return "Move to " & sType & PartName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Definizione comando
|
||||||
|
Private m_cmdCommand As ICommand
|
||||||
|
|
||||||
|
Sub New(OrigEntity As PartManager_GeomEntity, Type As ManagePart_Layer.LayerType, GeomPart As Print3dPartVM)
|
||||||
|
m_OrigEntity = OrigEntity
|
||||||
|
m_Type = Type
|
||||||
|
m_GeomPart = GeomPart
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub New(OrigEntity As PartManager_GeomEntity, Type As ManagePart_Layer.LayerType, Part As ManagePart_Part)
|
||||||
|
m_OrigEntity = OrigEntity
|
||||||
|
m_Type = Type
|
||||||
|
m_Part = Part
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub New(OrigEntity As PartManager_GeomEntity, Type As ManagePart_Layer.LayerType)
|
||||||
|
m_OrigEntity = OrigEntity
|
||||||
|
m_Type = Type
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "Command"
|
||||||
|
|
||||||
|
Public ReadOnly Property MenuItem_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdCommand Is Nothing Then
|
||||||
|
m_cmdCommand = New Command(AddressOf Command)
|
||||||
|
End If
|
||||||
|
Return m_cmdCommand
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Command()
|
||||||
|
If m_Type = ManagePart_Layer.LayerType.CHANGENAME Then
|
||||||
|
m_OrigEntity.SetTextBoxVisibility(True)
|
||||||
|
Map.refManagePartPanelVM.SetIsEnabled(True)
|
||||||
|
Return
|
||||||
|
ElseIf m_Type = ManagePart_Layer.LayerType.DELETE Then
|
||||||
|
If MessageBox.Show("Are you sure you want to delete this entity?", "Delete confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||||
|
EgtErase(m_OrigEntity.nId)
|
||||||
|
' se l'entita' e' gia' in lista pezzi
|
||||||
|
If Not IsNothing(m_OrigEntity.OrigLayer) Then
|
||||||
|
' elimino dalla lista pezzi
|
||||||
|
m_OrigEntity.OrigLayer.EntityList.Remove(m_OrigEntity)
|
||||||
|
Else
|
||||||
|
' altrimenti lo elimino dalla lista entita' importate
|
||||||
|
Map.refManagePartPanelVM.ImportedEntityList.Remove(m_OrigEntity)
|
||||||
|
End If
|
||||||
|
EgtDraw()
|
||||||
|
End If
|
||||||
|
Return
|
||||||
|
ElseIf m_Type = ManagePart_Layer.LayerType.NEWPART Then
|
||||||
|
Select Case Map.refManagePartPanelVM.Type
|
||||||
|
Case ManagePartPanelVM.ManagePartType.IMPORT
|
||||||
|
Dim NewPart As ManagePart_Part = New ManagePart_Part(Nothing)
|
||||||
|
Map.refManagePartPanelVM.ManagerPartList.Add(NewPart)
|
||||||
|
' elimino entity dalla lista entita' importate
|
||||||
|
Map.refManagePartPanelVM.ImportedEntityList.Remove(m_OrigEntity)
|
||||||
|
If Not IsNothing(NewPart) Then
|
||||||
|
Dim NewLayer As ManagePart_Layer = NewPart.LayerList.FirstOrDefault(Function(x) x.Type = ManagePart_Layer.LayerType.PRINT_SOLID)
|
||||||
|
If Not IsNothing(NewLayer) Then
|
||||||
|
NewLayer.EntityList.Add(m_OrigEntity)
|
||||||
|
' aggiorno riferimenti nell'entita'
|
||||||
|
m_OrigEntity.UpdateOrigLayer(NewLayer)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
' aggiorno i contextmenu di tutti gli entity
|
||||||
|
Map.refManagePartPanelVM.UpdateAllEntityContextMenu()
|
||||||
|
Case ManagePartPanelVM.ManagePartType.MODIFY
|
||||||
|
' recupero path da vecchio pezzo
|
||||||
|
Dim sFilePath As String = ""
|
||||||
|
EgtGetInfo(m_OrigEntity.OrigLayer.OrigPart.PrintPart.nPartId, FILE_PATH, sFilePath)
|
||||||
|
'Dim frImportedPart As New Frame3d
|
||||||
|
'EgtGetGroupGlobFrame(m_nImportedPartId, frImportedPart)
|
||||||
|
' creo pezzo
|
||||||
|
Dim nPartId As Integer = EgtCreateGroup(GDB_ID.ROOT) ', frImportedPart)
|
||||||
|
EgtSetName(nPartId, PART)
|
||||||
|
Dim nFrameId As Integer = GDB_ID.NULL
|
||||||
|
Dim b3PrintSolid As New BBox3d
|
||||||
|
' creo layer solido di stampa
|
||||||
|
Dim nPrintPartLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nPrintPartLayerId, PRINT_SOLID)
|
||||||
|
EgtRelocateGlob(m_OrigEntity.nId, nPrintPartLayerId, GDB_POS.LAST_SON)
|
||||||
|
' calcolo box superficie per creazione riferimento
|
||||||
|
EgtGetBBoxGlob(m_OrigEntity.nId, GDB_BB.STANDARD, b3PrintSolid)
|
||||||
|
' coloro l'entita'
|
||||||
|
EgtSetColor(m_OrigEntity.nId, GeomEntityColors.c3Print)
|
||||||
|
' creo layer mach start
|
||||||
|
Dim nMachStartLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nMachStartLayerId, LAY_MACH_START)
|
||||||
|
Dim nMachStartId As Integer = GDB_ID.NULL
|
||||||
|
' creo punto di partenza
|
||||||
|
Dim ptStart As Point3d = b3PrintSolid.Center() - 0.6 * b3PrintSolid.DimY() * Vector3d.Y_AX() - 0.5 * b3PrintSolid.DimZ() * Vector3d.Z_AX()
|
||||||
|
nMachStartId = EgtCreateGeoPoint(nMachStartLayerId, ptStart, GDB_RT.GLOB)
|
||||||
|
EgtSetName(nMachStartId, START_GEOM)
|
||||||
|
' coloro l'entita' di rosso
|
||||||
|
EgtSetColor(nMachStartId, GeomEntityColors.c3MachStart)
|
||||||
|
' creo layer ribs
|
||||||
|
Dim nRibsLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nRibsLayerId, LAY_RIBS)
|
||||||
|
' creo layer shell number
|
||||||
|
Dim nShellNumberLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nShellNumberLayerId, LAY_SHELL_NBR)
|
||||||
|
' creo layer aux
|
||||||
|
Dim nAuxSolidsLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nAuxSolidsLayerId, LAY_AUX_SOLIDS)
|
||||||
|
' creo layer others
|
||||||
|
Dim nOthersLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nOthersLayerId, LAY_OTHERS)
|
||||||
|
' aggiungo riferimento
|
||||||
|
Dim nReferenceLayerId As Integer = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nReferenceLayerId, LAY_REFERENCE)
|
||||||
|
' Creo riferimento
|
||||||
|
Dim ptOrig As New Point3d(b3PrintSolid.Min())
|
||||||
|
Dim frPrintSolid As New Frame3d(ptOrig)
|
||||||
|
nFrameId = EgtCreateGeoFrame(nReferenceLayerId, frPrintSolid, GDB_RT.GLOB)
|
||||||
|
If nFrameId Then
|
||||||
|
EgtSetName(nFrameId, FRAME_PART)
|
||||||
|
EgtSetMode(nFrameId, GDB_MD.LOCKED)
|
||||||
|
End If
|
||||||
|
EgtSetInfo(nReferenceLayerId, KEY_REFERENCE, ReferenceBtn.References.BL)
|
||||||
|
' appoggio il pezzo sulla tavola
|
||||||
|
EgtMove(nPartId, New Vector3d(0, 0, -b3PrintSolid.Min.z))
|
||||||
|
' lo aggiungo a lista pezzi
|
||||||
|
EgtSetInfo(nPartId, FILE_PATH, sFilePath)
|
||||||
|
EgtSetInfo(nPartId, "PartOnTable", 1)
|
||||||
|
Dim NewPart As New Print3dPartVM(nPartId, nPrintPartLayerId, nReferenceLayerId, nFrameId, nMachStartLayerId, nRibsLayerId, nShellNumberLayerId, nAuxSolidsLayerId, nOthersLayerId, sFilePath)
|
||||||
|
Map.refTopPanelVM.PartList.Add(NewPart)
|
||||||
|
Dim ManagePart_Part As ManagePart_Part = New ManagePart_Part(NewPart)
|
||||||
|
' elimino da posizione originale
|
||||||
|
m_OrigEntity.OrigLayer.EntityList.Remove(m_OrigEntity)
|
||||||
|
'Dim bUpdateAllContextMenu As Boolean = False
|
||||||
|
'Dim NewLayer As ManagePart_Layer = ManagePart_Part.LayerList.FirstOrDefault(Function(x) x.Type = ManagePart_Layer.LayerType.PRINT_SOLID)
|
||||||
|
'If Not IsNothing(NewLayer) Then
|
||||||
|
' NewLayer.EntityList.Add(m_OrigEntity)
|
||||||
|
' ' aggiorno riferimenti nell'entita'
|
||||||
|
' m_OrigEntity.UpdateOrigLayer(NewLayer)
|
||||||
|
'End If
|
||||||
|
EgtSetInfo(nPartId, PART_NAME, ManagePart_Part.sName)
|
||||||
|
' lo aggiungo a lista
|
||||||
|
Map.refManagePartPanelVM.ManagerPartList.Add(ManagePart_Part)
|
||||||
|
' aggiorno riferimenti nel context menu item
|
||||||
|
Map.refManagePartPanelVM.UpdateAllEntityContextMenu()
|
||||||
|
End Select
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
Select Case Map.refManagePartPanelVM.Type
|
||||||
|
Case ManagePartPanelVM.ManagePartType.IMPORT
|
||||||
|
' se l'entita' e' gia' in lista pezzi
|
||||||
|
If Not IsNothing(m_OrigEntity.OrigLayer) Then
|
||||||
|
' elimino dalla lista pezzi
|
||||||
|
m_OrigEntity.OrigLayer.EntityList.Remove(m_OrigEntity)
|
||||||
|
Else
|
||||||
|
' altrimenti lo elimino dalla lista entita' importate
|
||||||
|
Map.refManagePartPanelVM.ImportedEntityList.Remove(m_OrigEntity)
|
||||||
|
End If
|
||||||
|
Dim NewPart As ManagePart_Part = Map.refManagePartPanelVM.ManagerPartList.FirstOrDefault(Function(x) x Is m_Part)
|
||||||
|
If Not IsNothing(NewPart) Then
|
||||||
|
Dim NewLayer As ManagePart_Layer = NewPart.LayerList.FirstOrDefault(Function(x) x.Type = m_Type)
|
||||||
|
If Not IsNothing(NewLayer) Then
|
||||||
|
NewLayer.EntityList.Add(m_OrigEntity)
|
||||||
|
' aggiorno riferimenti nell'entita'
|
||||||
|
m_OrigEntity.UpdateOrigLayer(NewLayer)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
' aggiorno riferimenti nel context menu item
|
||||||
|
m_OrigEntity.UpdateContextMenu()
|
||||||
|
Case ManagePartPanelVM.ManagePartType.MODIFY
|
||||||
|
' recupero layer da pezzo
|
||||||
|
Dim nLayerId As Integer = GDB_ID.NULL
|
||||||
|
Select Case m_Type
|
||||||
|
Case ManagePart_Layer.LayerType.PRINT_SOLID
|
||||||
|
nLayerId = m_GeomPart.nPrintSolidLayerId
|
||||||
|
Case ManagePart_Layer.LayerType.MACH_START
|
||||||
|
nLayerId = m_GeomPart.nMachStartLayerId
|
||||||
|
Case ManagePart_Layer.LayerType.RIBS
|
||||||
|
nLayerId = m_GeomPart.nRibsLayerId
|
||||||
|
Case ManagePart_Layer.LayerType.SHELL_NUMBER
|
||||||
|
nLayerId = m_GeomPart.nShellNumberLayerId
|
||||||
|
Case ManagePart_Layer.LayerType.AUX_SOLIDS
|
||||||
|
nLayerId = m_GeomPart.nAuxSolidsLayerId
|
||||||
|
Case ManagePart_Layer.LayerType.OTHERS
|
||||||
|
nLayerId = m_GeomPart.nOthersLayerId
|
||||||
|
End Select
|
||||||
|
' sposto entita'
|
||||||
|
If EgtRelocateGlob(m_OrigEntity.nId, nLayerId) Then
|
||||||
|
' elimino info vecchio layer
|
||||||
|
Select Case m_OrigEntity.OrigLayer.Type
|
||||||
|
Case ManagePart_Layer.LayerType.PRINT_SOLID
|
||||||
|
EgtResetMark(m_OrigEntity.nId)
|
||||||
|
Case ManagePart_Layer.LayerType.MACH_START
|
||||||
|
Case ManagePart_Layer.LayerType.RIBS
|
||||||
|
EgtRemoveInfo(m_OrigEntity.nId, KEY_RIB_TYPE)
|
||||||
|
Case ManagePart_Layer.LayerType.SHELL_NUMBER
|
||||||
|
EgtRemoveInfo(m_OrigEntity.nId, KEY_SHELLNBR_TYPE)
|
||||||
|
Case ManagePart_Layer.LayerType.AUX_SOLIDS
|
||||||
|
EgtRemoveInfo(m_OrigEntity.nId, KEY_AUXSOLID_TYPE)
|
||||||
|
Case ManagePart_Layer.LayerType.OTHERS
|
||||||
|
End Select
|
||||||
|
' sposto in lista
|
||||||
|
m_OrigEntity.OrigLayer.EntityList.Remove(m_OrigEntity)
|
||||||
|
Dim bUpdateAllContextMenu As Boolean = False
|
||||||
|
Dim NewPart As ManagePart_Part = Map.refManagePartPanelVM.ManagerPartList.FirstOrDefault(Function(x) x.PrintPart.nPartId = m_GeomPart.nPartId)
|
||||||
|
If Not IsNothing(NewPart) Then
|
||||||
|
Dim NewLayer As ManagePart_Layer = NewPart.LayerList.FirstOrDefault(Function(x) x.Type = m_Type)
|
||||||
|
If Not IsNothing(NewLayer) Then
|
||||||
|
NewLayer.EntityList.Add(m_OrigEntity)
|
||||||
|
bUpdateAllContextMenu = (m_OrigEntity.OrigLayer.Type = ManagePart_Layer.LayerType.PRINT_SOLID) OrElse (NewLayer.Type = ManagePart_Layer.LayerType.PRINT_SOLID)
|
||||||
|
' aggiorno riferimenti nell'entita'
|
||||||
|
m_OrigEntity.UpdateOrigLayer(NewLayer)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
' aggiungo info nuovo layer
|
||||||
|
Select Case m_Type
|
||||||
|
Case ManagePart_Layer.LayerType.PRINT_SOLID
|
||||||
|
EgtSetName(m_OrigEntity.nId, PRINT_SOLID)
|
||||||
|
EgtSetColor(m_OrigEntity.nId, c3Print)
|
||||||
|
Case ManagePart_Layer.LayerType.MACH_START
|
||||||
|
EgtSetName(m_OrigEntity.nId, LAY_MACH_START)
|
||||||
|
EgtSetColor(m_OrigEntity.nId, c3MachStart)
|
||||||
|
Case ManagePart_Layer.LayerType.RIBS
|
||||||
|
EgtSetName(m_OrigEntity.nId, LAY_RIBS)
|
||||||
|
EgtSetInfo(m_OrigEntity.nId, KEY_RIB_TYPE, RibEntity.RibTypes.FROMIMPORT)
|
||||||
|
EgtSetColor(m_OrigEntity.nId, c3Rib)
|
||||||
|
Case ManagePart_Layer.LayerType.SHELL_NUMBER
|
||||||
|
EgtSetName(m_OrigEntity.nId, LAY_SHELL_NBR)
|
||||||
|
EgtSetInfo(m_OrigEntity.nId, KEY_SHELLNBR_TYPE, ShellNumberEntity.ShellNumberTypes.FROMIMPORT)
|
||||||
|
EgtSetColor(m_OrigEntity.nId, c3ShellNumber)
|
||||||
|
Case ManagePart_Layer.LayerType.AUX_SOLIDS
|
||||||
|
EgtSetName(m_OrigEntity.nId, LAY_AUX_SOLIDS)
|
||||||
|
EgtSetInfo(m_OrigEntity.nId, KEY_AUXSOLID_TYPE, RibEntity.RibTypes.FROMIMPORT)
|
||||||
|
EgtSetColor(m_OrigEntity.nId, c3AuxSolids)
|
||||||
|
Case ManagePart_Layer.LayerType.OTHERS
|
||||||
|
EgtSetName(m_OrigEntity.nId, LAY_OTHERS)
|
||||||
|
EgtSetColor(m_OrigEntity.nId, c3Others)
|
||||||
|
End Select
|
||||||
|
EgtDraw()
|
||||||
|
' aggiorno riferimenti nel context menu item
|
||||||
|
If bUpdateAllContextMenu Then
|
||||||
|
Map.refManagePartPanelVM.UpdateAllEntityContextMenu()
|
||||||
|
Else
|
||||||
|
m_OrigEntity.UpdateContextMenu()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Command
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class ManagerPart_MenuItem
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Public Enum PartMenuCmd
|
||||||
|
CHANGENAME = 1
|
||||||
|
DELETE = 2
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Private m_OrigPart As ManagePart_Part
|
||||||
|
|
||||||
|
' tipo del comando
|
||||||
|
Private m_Type As PartMenuCmd
|
||||||
|
Public Property Type As PartMenuCmd
|
||||||
|
Get
|
||||||
|
Return m_Type
|
||||||
|
End Get
|
||||||
|
Set(value As PartMenuCmd)
|
||||||
|
m_Type = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sMsg As String
|
||||||
|
Get
|
||||||
|
Select Case m_Type
|
||||||
|
Case PartMenuCmd.CHANGENAME
|
||||||
|
Return "Change Name"
|
||||||
|
Case Else ' PartMenuCmd.DELETE
|
||||||
|
Return "Delete Part"
|
||||||
|
End Select
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Definizione comando
|
||||||
|
Private m_cmdCommand As ICommand
|
||||||
|
|
||||||
|
Sub New(OrigPart As ManagePart_Part, Type As PartMenuCmd)
|
||||||
|
m_OrigPart = OrigPart
|
||||||
|
m_Type = Type
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "Cancel"
|
||||||
|
|
||||||
|
Public ReadOnly Property MenuItem_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdCommand Is Nothing Then
|
||||||
|
m_cmdCommand = New Command(AddressOf Command)
|
||||||
|
End If
|
||||||
|
Return m_cmdCommand
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Command()
|
||||||
|
Select Case m_Type
|
||||||
|
Case PartMenuCmd.CHANGENAME
|
||||||
|
m_OrigPart.SetTextBoxVisibility(True)
|
||||||
|
Map.refManagePartPanelVM.SetIsEnabled(True)
|
||||||
|
Case PartMenuCmd.DELETE
|
||||||
|
If Map.refManagePartPanelVM.ManagerPartList.Count <= 1 Then Return
|
||||||
|
Select Case Map.refManagePartPanelVM.Type
|
||||||
|
Case ManagePartPanelVM.ManagePartType.IMPORT
|
||||||
|
For Each Layer In m_OrigPart.LayerList
|
||||||
|
For Each Entity In Layer.EntityList
|
||||||
|
' le rimuovo da lista entita' pezzo
|
||||||
|
Layer.EntityList.Remove(Entity)
|
||||||
|
' la rimetto in lista importati
|
||||||
|
Map.refManagePartPanelVM.ImportedEntityList.Add(Entity)
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
' elimino pezzo da lista
|
||||||
|
Map.refManagePartPanelVM.ManagerPartList.Remove(m_OrigPart)
|
||||||
|
Case ManagePartPanelVM.ManagePartType.MODIFY
|
||||||
|
' elimino pezzo geometrico
|
||||||
|
EgtErase(m_OrigPart.PrintPart.nPartId)
|
||||||
|
' elimino pezzo da lista
|
||||||
|
Map.refManagePartPanelVM.ManagerPartList.Remove(m_OrigPart)
|
||||||
|
Dim bSelFirstPart As Boolean = m_OrigPart.PrintPart.nPartId = Map.refTopPanelVM.SelPart.nPartId
|
||||||
|
' elimino pezzo da lista Top
|
||||||
|
Map.refTopPanelVM.PartList.Remove(m_OrigPart.PrintPart)
|
||||||
|
EgtDraw()
|
||||||
|
If bSelFirstPart Then Map.refTopPanelVM.SelFirstPart()
|
||||||
|
End Select
|
||||||
|
' aggiorno riferimenti nel context menu item
|
||||||
|
Map.refManagePartPanelVM.UpdateAllEntityContextMenu()
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Cancel
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -204,7 +204,7 @@ Public Class Material
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ReadAllParams()
|
Private Sub ReadAllParams()
|
||||||
'm_bSlicing45 = ReadMaterialParamDouble(m_nIndex, MAC_SLICING45, 0, CurrentMachine.sMachiningFilePath)
|
'm_nSlicingType = ReadMaterialParamDouble(m_nIndex, MAC_SLICINGTYPE, 0, CurrentMachine.sMachiningFilePath)
|
||||||
'm_dStrandH = ReadMaterialParamDouble(m_nIndex, MAC_STRANDH, 0, CurrentMachine.sMachiningFilePath)
|
'm_dStrandH = ReadMaterialParamDouble(m_nIndex, MAC_STRANDH, 0, CurrentMachine.sMachiningFilePath)
|
||||||
'm_dStrandW = ReadMaterialParamDouble(m_nIndex, MAC_STRANDW, 0, CurrentMachine.sMachiningFilePath)
|
'm_dStrandW = ReadMaterialParamDouble(m_nIndex, MAC_STRANDW, 0, CurrentMachine.sMachiningFilePath)
|
||||||
'm_nStrandCount = ReadMaterialParamDouble(m_nIndex, MAC_STRANDCOUNT, 0, CurrentMachine.sMachiningFilePath)
|
'm_nStrandCount = ReadMaterialParamDouble(m_nIndex, MAC_STRANDCOUNT, 0, CurrentMachine.sMachiningFilePath)
|
||||||
@@ -871,16 +871,12 @@ Public Class CheckMaterialParam
|
|||||||
Sub New(Type As Params, nIndex As Integer)
|
Sub New(Type As Params, nIndex As Integer)
|
||||||
MyBase.New(Type)
|
MyBase.New(Type)
|
||||||
Select Case Type
|
Select Case Type
|
||||||
'Case Params.SLICING45
|
|
||||||
' m_bValue = ReadMaterialParamDouble(nIndex, MAC_SLICING45, 0)
|
|
||||||
End Select
|
End Select
|
||||||
m_bOrigValue = m_bValue
|
m_bOrigValue = m_bValue
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Overrides Sub WriteParamOnDb(nIndex As Integer)
|
Friend Overrides Sub WriteParamOnDb(nIndex As Integer)
|
||||||
Select Case Type
|
Select Case Type
|
||||||
'Case Params.SLICING45
|
|
||||||
' WriteMaterialParam(nIndex, MAC_SLICING45, If(m_bValue, 1, 0))
|
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -60,5 +60,5 @@ Imports System.Windows
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.4.10.3")>
|
<Assembly: AssemblyVersion("2.4.11.1")>
|
||||||
<Assembly: AssemblyFileVersion("2.4.10.3")>
|
<Assembly: AssemblyFileVersion("2.4.11.1")>
|
||||||
|
|||||||
@@ -162,6 +162,9 @@ Public Class ProjManagerVM
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub NewProject(bDialog As Boolean)
|
Friend Sub NewProject(bDialog As Boolean)
|
||||||
|
' Gestisco eventuale file corrente modificato
|
||||||
|
If Not Map.refSceneHostVM.MainController.ManageModified() Then Return
|
||||||
|
EgtResetModified()
|
||||||
Dim NewProjMachine As Machine
|
Dim NewProjMachine As Machine
|
||||||
If bDialog AndAlso Map.refMachinePanelVM.MachineList.Count > 0 Then
|
If bDialog AndAlso Map.refMachinePanelVM.MachineList.Count > 0 Then
|
||||||
Dim ChooseMachineWndVM As New ChooseMachineWndVM
|
Dim ChooseMachineWndVM As New ChooseMachineWndVM
|
||||||
|
|||||||
@@ -270,29 +270,17 @@
|
|||||||
<Image Source="/Resources/GridViewPanel/CplaneELEVATION.png" Stretch="Uniform"/>
|
<Image Source="/Resources/GridViewPanel/CplaneELEVATION.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Grid.Column="7"
|
<Button Grid.Column="7"
|
||||||
Command="{Binding CPlaneRotate_Command}"
|
Command="{Binding CPlaneOrigin_Command}"
|
||||||
ToolTip="{Binding CPlaneRotateToolTip}"
|
ToolTip="{Binding CPlaneOriginToolTip}"
|
||||||
Style="{StaticResource ToolBar_Button}">
|
Style="{StaticResource ToolBar_Button}">
|
||||||
<Image Source="/Resources/GridViewPanel/CplaneROTATE.png" Stretch="Uniform"/>
|
<Image Source="/Resources/GridViewPanel/CplaneORIGIN.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Grid.Column="8"
|
<Button Grid.Column="8"
|
||||||
Command="{Binding CPlane3P_Command}"
|
|
||||||
ToolTip="{Binding CPlane3PToolTip}"
|
|
||||||
Style="{StaticResource ToolBar_Button}">
|
|
||||||
<Image Source="/Resources/GridViewPanel/CPlane3POINTS.png" Stretch="Uniform"/>
|
|
||||||
</Button>
|
|
||||||
<Button Grid.Column="9"
|
|
||||||
Command="{Binding CPlanePerpObj_Command}"
|
|
||||||
ToolTip="{Binding CPlanePerpObjToolTip}"
|
|
||||||
Style="{StaticResource ToolBar_Button}">
|
|
||||||
<Image Source="/Resources/GridViewPanel/CPlanePERPCURVE.png" Stretch="Uniform"/>
|
|
||||||
</Button>
|
|
||||||
<!--<Button Grid.Column="10"
|
|
||||||
Command="{Binding CPlaneObj_Command}"
|
Command="{Binding CPlaneObj_Command}"
|
||||||
ToolTip="{Binding CPlaneObjToolTip}"
|
ToolTip="{Binding CPlaneObjToolTip}"
|
||||||
Style="{StaticResource ToolBar_Button}">
|
Style="{StaticResource ToolBar_Button}">
|
||||||
<Image Source="/Resources/GridViewPanel/CplaneOBJECT.png" Stretch="Uniform"/>
|
<Image Source="/Resources/GridViewPanel/CplaneOBJECT.png" Stretch="Uniform"/>
|
||||||
</Button>-->
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
<!--<Popup IsOpen="{Binding IsChecked, ElementName=GridBtn}"
|
<!--<Popup IsOpen="{Binding IsChecked, ElementName=GridBtn}"
|
||||||
|
|||||||
@@ -612,7 +612,18 @@ Public Class RibPanelVM
|
|||||||
|
|
||||||
Friend Sub OnKeyDown(Key As Forms.Keys)
|
Friend Sub OnKeyDown(Key As Forms.Keys)
|
||||||
If Key = Forms.Keys.Escape Then
|
If Key = Forms.Keys.Escape Then
|
||||||
|
' se attiva, disattivo griglia su oggetto
|
||||||
|
If m_bCPlaneObj_IsActive Then
|
||||||
|
m_bCPlaneObj_IsActive = False
|
||||||
|
ResetCPlaneObjIsActive()
|
||||||
|
' ripristino selezioni precedenti
|
||||||
|
For Each Id In Map.refShellNumberPanelVM.PrevSelObjs
|
||||||
|
EgtSelectObj(Id)
|
||||||
|
Next
|
||||||
|
EgtDraw()
|
||||||
|
' rimetto la selezione scena a null
|
||||||
|
Map.refSceneHostVM.MainScene.SetStatusNull()
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1117,6 +1128,22 @@ Public Class RibPanelVM
|
|||||||
|
|
||||||
#Region "CPlaneObj"
|
#Region "CPlaneObj"
|
||||||
|
|
||||||
|
Private m_bCPlaneObj_IsActive As Boolean = False
|
||||||
|
Friend ReadOnly Property bCPlaneObj_IsActive As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bCPlaneObj_IsActive
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub ResetCPlaneObjIsActive()
|
||||||
|
m_bCPlaneObj_IsActive = False
|
||||||
|
End Sub
|
||||||
|
Private m_PrevSelObjs As New List(Of Integer)
|
||||||
|
Friend ReadOnly Property PrevSelObjs As List(Of Integer)
|
||||||
|
Get
|
||||||
|
Return m_PrevSelObjs
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Returns a command that do CPlanepObj.
|
''' Returns a command that do CPlanepObj.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
@@ -1134,7 +1161,15 @@ Public Class RibPanelVM
|
|||||||
''' </summary>
|
''' </summary>
|
||||||
Public Sub CPlaneObj(ByVal param As Object)
|
Public Sub CPlaneObj(ByVal param As Object)
|
||||||
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
|
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
|
||||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
|
' salvo selezione precedente e deseleziono altri oggetti
|
||||||
|
Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
|
||||||
|
While nSelObjId <> GDB_ID.NULL
|
||||||
|
m_PrevSelObjs.Add(nSelObjId)
|
||||||
|
nSelObjId = EgtGetNextSelectedObj()
|
||||||
|
End While
|
||||||
|
EgtDeselectAll()
|
||||||
|
m_bCPlaneObj_IsActive = True
|
||||||
|
' Map.refControllerInputPanelVM.PrepareInputBox("Grid from Selection", "Select the face of the object where to place the grid", "", False, False)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CPlaneObj
|
#End Region ' CPlaneObj
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
<Button Grid.Column="2"
|
<Button Grid.Column="2"
|
||||||
Content="R"
|
Content="R"
|
||||||
Command="{Binding ResetParam_Command}"
|
Command="{Binding ResetParam_Command}"
|
||||||
IsEnabled="{Binding bIsModifiedFromDb}"
|
IsEnabled="{Binding bIsModifiedFromPart}"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
HorizontalContentAlignment="Center"
|
HorizontalContentAlignment="Center"
|
||||||
Margin="5,0,0,0"
|
Margin="5,0,0,0"
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
<Button Grid.Column="2"
|
<Button Grid.Column="2"
|
||||||
Content="R"
|
Content="R"
|
||||||
Command="{Binding ResetParam_Command}"
|
Command="{Binding ResetParam_Command}"
|
||||||
IsEnabled="{Binding bIsModifiedFromDb}"
|
IsEnabled="{Binding bIsModifiedFromPart}"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
HorizontalContentAlignment="Center"
|
HorizontalContentAlignment="Center"
|
||||||
Margin="5,0,0,0"
|
Margin="5,0,0,0"
|
||||||
|
|||||||
@@ -41,12 +41,13 @@ Public Class RibParamPanelVM
|
|||||||
|
|
||||||
m_Type = Cathegories.RIBS
|
m_Type = Cathegories.RIBS
|
||||||
m_sName = "Ribs"
|
m_sName = "Ribs"
|
||||||
m_MachiningParamList = New List(Of MachiningParam)({New RibNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nRibId, nPartId),
|
m_MachiningParamList = New List(Of MachiningParam)({New RibComboMachiningParam(MachiningParam.Params.RIBSTYPE, nRibId, nPartId),
|
||||||
|
New RibNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nRibId, nPartId),
|
||||||
New RibNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nRibId, nPartId),
|
New RibNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nRibId, nPartId),
|
||||||
New RibNumericMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nRibId, nPartId),
|
New RibCheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nRibId, nPartId),
|
||||||
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADININVERT, nRibId, nPartId),
|
New RibCheckMachiningParam(MachiningParam.Params.RIBSLEADININVERT, nRibId, nPartId),
|
||||||
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADINLEN, nRibId, nPartId),
|
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADINLEN, nRibId, nPartId),
|
||||||
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTINVERT, nRibId, nPartId),
|
New RibCheckMachiningParam(MachiningParam.Params.RIBSLEADOUTINVERT, nRibId, nPartId),
|
||||||
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nRibId, nPartId),
|
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nRibId, nPartId),
|
||||||
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nRibId, nPartId),
|
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nRibId, nPartId),
|
||||||
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nRibId, nPartId),
|
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nRibId, nPartId),
|
||||||
@@ -70,9 +71,21 @@ Public Class RibParamPanelVM
|
|||||||
Friend Sub WriteParamsInRib(nRibId As Integer)
|
Friend Sub WriteParamsInRib(nRibId As Integer)
|
||||||
' se parametri modificati
|
' se parametri modificati
|
||||||
Dim bModified As Boolean = False
|
Dim bModified As Boolean = False
|
||||||
For Each Param As RibNumericMachiningParam In m_MachiningParamList
|
For Each Param In m_MachiningParamList
|
||||||
If Param.bIsModified AndAlso Not bModified Then bModified = True
|
Select Case Param.GetType()
|
||||||
Param.WriteParamInRib(nRibId)
|
Case GetType(RibNumericMachiningParam)
|
||||||
|
Dim NumericParam As RibNumericMachiningParam = TryCast(Param, RibNumericMachiningParam)
|
||||||
|
If NumericParam.bIsModified AndAlso Not bModified Then bModified = True
|
||||||
|
NumericParam.WriteParamInRib(nRibId)
|
||||||
|
Case GetType(RibComboMachiningParam)
|
||||||
|
Dim ComboParam As RibComboMachiningParam = TryCast(Param, RibComboMachiningParam)
|
||||||
|
If ComboParam.bIsModified AndAlso Not bModified Then bModified = True
|
||||||
|
ComboParam.WriteParamInRib(nRibId)
|
||||||
|
Case GetType(RibCheckMachiningParam)
|
||||||
|
Dim CheckParam As RibCheckMachiningParam = TryCast(Param, RibCheckMachiningParam)
|
||||||
|
If CheckParam.bIsModified AndAlso Not bModified Then bModified = True
|
||||||
|
CheckParam.WriteParamInRib(nRibId)
|
||||||
|
End Select
|
||||||
Next
|
Next
|
||||||
If bModified Then
|
If bModified Then
|
||||||
' Imposto flag di ricalcolo slice
|
' Imposto flag di ricalcolo slice
|
||||||
@@ -324,4 +337,226 @@ Public Class RibNumericMachiningParam
|
|||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class RibComboMachiningParam
|
||||||
|
Inherits ComboMachiningParam
|
||||||
|
|
||||||
|
Public Overrides Property SelValue As IdNameStruct
|
||||||
|
Get
|
||||||
|
Return m_SelValue
|
||||||
|
End Get
|
||||||
|
Set(value As IdNameStruct)
|
||||||
|
m_SelValue = value
|
||||||
|
NotifyPropertyChanged(NameOf(SelValue))
|
||||||
|
NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Protected m_PartSelValue As IdNameStruct
|
||||||
|
Public ReadOnly Property PartSelValue As IdNameStruct
|
||||||
|
Get
|
||||||
|
Return m_PartSelValue
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property bIsModifiedFromPart As Boolean
|
||||||
|
Get
|
||||||
|
Return m_SelValue.Id <> m_PartSelValue.Id
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdResetParam As ICommand
|
||||||
|
|
||||||
|
Sub New(Type As Params, nRibId As Integer, nPartId As Integer)
|
||||||
|
MyBase.New(Type)
|
||||||
|
Dim bReadFromRib As Boolean = False
|
||||||
|
Dim bReadFromPart As Boolean = False
|
||||||
|
Select Case Type
|
||||||
|
Case Params.RIBSTYPE
|
||||||
|
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_RIBSTYPE.INTERNAL, "Internal"),
|
||||||
|
New IdNameStruct(Machining.MPAR_RIBSTYPE.EXTERNAL, "External"),
|
||||||
|
New IdNameStruct(Machining.MPAR_RIBSTYPE.UNBOUNDED, "Unbounded")})
|
||||||
|
Dim nSelValue As Integer = 1
|
||||||
|
bReadFromRib = EgtGetInfo(nRibId, MAC_RIBSTYPE, nSelValue)
|
||||||
|
If bReadFromRib Then
|
||||||
|
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
||||||
|
End If
|
||||||
|
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSTYPE, nSelValue)
|
||||||
|
m_PartSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
|
||||||
|
End Select
|
||||||
|
m_OrigSelValue = m_SelValue
|
||||||
|
If Not bReadFromRib Then
|
||||||
|
If bReadFromPart Then
|
||||||
|
m_SelValue = m_PartSelValue
|
||||||
|
m_OrigSelValue = m_PartSelValue
|
||||||
|
ElseIf Type = Params.RIBSTYPE Then
|
||||||
|
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_RIBSTYPE.INTERNAL)
|
||||||
|
m_SelValue = m_OrigSelValue
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub WriteParamInRib(nRibId As Integer)
|
||||||
|
Select Case Type
|
||||||
|
Case Params.RIBSTYPE
|
||||||
|
If bIsModifiedFromPart Then
|
||||||
|
EgtSetInfo(nRibId, MAC_RIBSTYPE, m_SelValue.Id)
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nRibId, MAC_RIBSTYPE)
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Overrides Sub SaveParam()
|
||||||
|
m_OrigSelValue = m_SelValue
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Overrides Sub ResetParam()
|
||||||
|
m_SelValue = m_OrigSelValue
|
||||||
|
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_SelValue = m_PartSelValue
|
||||||
|
NotifyPropertyChanged(NameOf(SelValue))
|
||||||
|
NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' ResetParam
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class RibCheckMachiningParam
|
||||||
|
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, nRibId As Integer, nPartId As Integer)
|
||||||
|
MyBase.New(Type)
|
||||||
|
Dim bReadFromPart As Boolean = False
|
||||||
|
Select Case Type
|
||||||
|
'Case Params.RIBSLINK
|
||||||
|
' bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSLINK, m_bValue)
|
||||||
|
' EgtGetInfo(nPartId, MAC_RIBSOVERLAP, m_bPartValue)
|
||||||
|
Case Params.RIBSINVERTDIRECTION
|
||||||
|
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSINVERTDIRECTION, m_bValue)
|
||||||
|
EgtGetInfo(nPartId, MAC_RIBSINVERTDIRECTION, m_bPartValue)
|
||||||
|
Case Params.RIBSLEADININVERT
|
||||||
|
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSLEADININVERT, m_bValue)
|
||||||
|
EgtGetInfo(nPartId, MAC_RIBSLEADININVERT, m_bPartValue)
|
||||||
|
Case Params.RIBSLEADOUTINVERT
|
||||||
|
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSLEADOUTINVERT, m_bValue)
|
||||||
|
EgtGetInfo(nPartId, MAC_RIBSLEADOUTINVERT, 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(nRibId As Integer)
|
||||||
|
Select Case Type
|
||||||
|
'Case Params.RIBSLINK
|
||||||
|
' If bIsModifiedFromPart Then
|
||||||
|
' EgtSetInfo(nRibId, MAC_RIBSLINK, If(m_bValue, 1, 0))
|
||||||
|
' Else
|
||||||
|
' EgtRemoveInfo(nRibId, MAC_RIBSLINK)
|
||||||
|
' End If
|
||||||
|
Case Params.RIBSINVERTDIRECTION
|
||||||
|
If bIsModifiedFromPart Then
|
||||||
|
EgtSetInfo(nRibId, MAC_RIBSINVERTDIRECTION, If(m_bValue, 1, 0))
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nRibId, MAC_RIBSINVERTDIRECTION)
|
||||||
|
End If
|
||||||
|
Case Params.RIBSLEADININVERT
|
||||||
|
If bIsModifiedFromPart Then
|
||||||
|
EgtSetInfo(nRibId, MAC_RIBSLEADININVERT, If(m_bValue, 1, 0))
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nRibId, MAC_RIBSLEADININVERT)
|
||||||
|
End If
|
||||||
|
Case Params.RIBSLEADOUTINVERT
|
||||||
|
If bIsModifiedFromPart Then
|
||||||
|
EgtSetInfo(nRibId, MAC_RIBSLEADOUTINVERT, If(m_bValue, 1, 0))
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nRibId, MAC_RIBSLEADOUTINVERT)
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Overrides Sub SaveParam()
|
||||||
|
m_bOrigValue = m_bValue
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Overrides Sub ResetParam()
|
||||||
|
m_bValue = m_bOrigValue
|
||||||
|
NotifyPropertyChanged(NameOf(bValue))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "ResetParam"
|
||||||
|
|
||||||
|
Public ReadOnly Property ResetParam_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdResetParam Is Nothing Then
|
||||||
|
m_cmdResetParam = New Command(AddressOf ResetParamCmd)
|
||||||
|
End If
|
||||||
|
Return m_cmdResetParam
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub ResetParamCmd()
|
||||||
|
m_bValue = m_bPartValue
|
||||||
|
NotifyPropertyChanged(NameOf(bValue))
|
||||||
|
NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' ResetParam
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -187,12 +187,13 @@ Public Class MySceneHostVM
|
|||||||
MainController.SetSurfTmTolerance(0.05)
|
MainController.SetSurfTmTolerance(0.05)
|
||||||
MainController.SetUseCustomColors(True, S_SCENE, K_CUSTOMCOLORS)
|
MainController.SetUseCustomColors(True, S_SCENE, K_CUSTOMCOLORS)
|
||||||
' imposto unità di misura per interfaccia utente
|
' imposto unità di misura per interfaccia utente
|
||||||
Dim bMmUnits As Boolean = (GetMainPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0)
|
Dim bMmUnits As Boolean = GetMainPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0
|
||||||
EgtSetUiUnits(bMmUnits)
|
EgtSetUiUnits(bMmUnits)
|
||||||
'Map.refMyStatusBarVM.SetMeasureUnit(nMeasureUnit <> 0)
|
'Map.refMyStatusBarVM.SetMeasureUnit(nMeasureUnit <> 0)
|
||||||
' imposto visualizzazione riferimento globale
|
' imposto visualizzazione riferimento globale
|
||||||
EgtSetGlobFrameShow(True)
|
EgtSetGlobFrameShow(True)
|
||||||
' imposto i dati della griglia
|
' imposto i dati della griglia
|
||||||
|
Dim bGridVisibility As Boolean = (GetMainPrivateProfileInt(S_GRID, K_SHOWGRID, 1) <> 0)
|
||||||
Dim dSnapStepMm As Double = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEP, 10)
|
Dim dSnapStepMm As Double = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEP, 10)
|
||||||
Dim dSnapStepInch As Double = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEPINCH, 10)
|
Dim dSnapStepInch As Double = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEPINCH, 10)
|
||||||
Dim nMinLineSStep As Integer = GetMainPrivateProfileInt(S_GRID, K_MINLINESSTEP, 1)
|
Dim nMinLineSStep As Integer = GetMainPrivateProfileInt(S_GRID, K_MINLINESSTEP, 1)
|
||||||
@@ -209,15 +210,15 @@ Public Class MySceneHostVM
|
|||||||
EgtSetGridGeo(dSnapStepInch, nMinLineSStep, nMajLineSStep, nExtSStep)
|
EgtSetGridGeo(dSnapStepInch, nMinLineSStep, nMajLineSStep, nExtSStep)
|
||||||
End If
|
End If
|
||||||
EgtSetGridColor(MinLnColor, MajLnColor)
|
EgtSetGridColor(MinLnColor, MajLnColor)
|
||||||
EgtSetGridShow(True, False)
|
EgtSetGridShow(bGridVisibility, bGridVisibility)
|
||||||
' imposto tipo coordinate
|
' imposto tipo coordinate
|
||||||
MainScene.SetGridCursorPos(True)
|
MainScene.SetGridCursorPos(True)
|
||||||
' modo di visualizzazione
|
|
||||||
Dim nShowMode As Integer = GetMainPrivateProfileInt(S_SCENE, K_SHOWMODE, SM.SHADING)
|
|
||||||
'Map.refShowPanelVM.SetShowMode(DirectCast(nShowMode, SM))
|
|
||||||
' visualizzazione avanzata dei triangoli costituenti le superfici
|
' visualizzazione avanzata dei triangoli costituenti le superfici
|
||||||
Dim bShowTriaAdv As Boolean = (GetMainPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0)
|
Dim bShowTriaAdv As Boolean = (GetMainPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0)
|
||||||
EgtSetShowTriaAdv(bShowTriaAdv)
|
EgtSetShowTriaAdv(bShowTriaAdv)
|
||||||
|
' visualizzazione direzione curve
|
||||||
|
Dim bShowCurveDirection As Boolean = (GetMainPrivateProfileInt(S_SCENE, K_CURVEDIR, 0) <> 0)
|
||||||
|
EgtSetShowCurveDirection(bShowCurveDirection)
|
||||||
' tipo visualizzazione per Zmap
|
' tipo visualizzazione per Zmap
|
||||||
Dim nShowZmap As Integer = GetMainPrivateProfileInt(S_SCENE, K_SHOWZMAP, 1)
|
Dim nShowZmap As Integer = GetMainPrivateProfileInt(S_SCENE, K_SHOWZMAP, 1)
|
||||||
EgtSetShowZmap(DirectCast(nShowZmap, ZSM), False)
|
EgtSetShowZmap(DirectCast(nShowZmap, ZSM), False)
|
||||||
@@ -225,7 +226,7 @@ Public Class MySceneHostVM
|
|||||||
Dim nTxrMaxLinPix As Integer = GetMainPrivateProfileInt(S_SCENE, K_TEXMAXLINPIX, 4096)
|
Dim nTxrMaxLinPix As Integer = GetMainPrivateProfileInt(S_SCENE, K_TEXMAXLINPIX, 4096)
|
||||||
EgtSetTextureMaxLinPixels(nTxrMaxLinPix)
|
EgtSetTextureMaxLinPixels(nTxrMaxLinPix)
|
||||||
' tipo snap point
|
' tipo snap point
|
||||||
MainScene.SetSnapPointType(SP.PT_SKETCH)
|
MainScene.SetSnapPointType(SP.PT_GRID)
|
||||||
' nascondo input box
|
' nascondo input box
|
||||||
'Map.refFreeContourInputVM.ResetInputBox()
|
'Map.refFreeContourInputVM.ResetInputBox()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -308,6 +309,7 @@ Public Class MySceneHostVM
|
|||||||
sDir = Path.GetDirectoryName(sDir)
|
sDir = Path.GetDirectoryName(sDir)
|
||||||
End If
|
End If
|
||||||
If Not Directory.Exists(sDir) Then sDir = ""
|
If Not Directory.Exists(sDir) Then sDir = ""
|
||||||
|
Dim ExtIndex As Integer = GetMainPrivateProfileInt(S_PRINTING3D, K_IMPORTCURREXTENSION, 1)
|
||||||
Dim OpenFileDialog As New OpenFileDialog With {.Title = "Insert",
|
Dim OpenFileDialog As New OpenFileDialog With {.Title = "Insert",
|
||||||
.Filter = "Stereolithography (*.stl)|*.stl" &
|
.Filter = "Stereolithography (*.stl)|*.stl" &
|
||||||
"|Iges files (*.igs;*.iges)|*.igs;*.iges" &
|
"|Iges files (*.igs;*.iges)|*.igs;*.iges" &
|
||||||
@@ -315,11 +317,12 @@ Public Class MySceneHostVM
|
|||||||
"|3D Manufacturing format (*.3mf)|*.3mf" &
|
"|3D Manufacturing format (*.3mf)|*.3mf" &
|
||||||
"|New geometry EgalTech(*.nge)|*.nge" &
|
"|New geometry EgalTech(*.nge)|*.nge" &
|
||||||
"|All Files (*.*)|*.*",
|
"|All Files (*.*)|*.*",
|
||||||
.FilterIndex = 1,
|
.FilterIndex = ExtIndex,
|
||||||
.InitialDirectory = sDir}
|
.InitialDirectory = sDir}
|
||||||
If Not OpenFileDialog.ShowDialog Then
|
If Not OpenFileDialog.ShowDialog Then
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
WriteMainPrivateProfileString(S_PRINTING3D, K_IMPORTCURREXTENSION, OpenFileDialog.FilterIndex)
|
||||||
Dim sFile As String = String.Empty
|
Dim sFile As String = String.Empty
|
||||||
sFile = OpenFileDialog.FileName
|
sFile = OpenFileDialog.FileName
|
||||||
' importo la nuova geometria
|
' importo la nuova geometria
|
||||||
@@ -842,11 +845,16 @@ Public Class MySceneHostVM
|
|||||||
If Not bOk Then
|
If Not bOk Then
|
||||||
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10002), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error on new file - Error
|
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10002), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error on new file - Error
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Map.refTopPanelVM.PartList.Clear()
|
Map.refTopPanelVM.PartList.Clear()
|
||||||
Map.refTopPanelVM.SetSelModifyMode(ModifyModes.NULL)
|
Map.refTopPanelVM.SetSelModifyMode(ModifyModes.NULL)
|
||||||
Map.refSliceManagerVM.UpdateTimeAndMass()
|
Map.refSliceManagerVM.UpdateTimeAndMass()
|
||||||
Map.refSliderManagerVM.RefreshSlider(0, 0)
|
Map.refSliderManagerVM.RefreshSlider(0, 0)
|
||||||
Map.refSliderManagerVM.SetLayerIndexToMax()
|
Map.refSliderManagerVM.SetLayerIndexToMax()
|
||||||
|
|
||||||
|
' resetto calcolo solidi
|
||||||
|
Map.refViewLayerManagerVM.ResetSolid()
|
||||||
|
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
MainScene.SetStatusNull()
|
MainScene.SetStatusNull()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -865,9 +873,20 @@ Public Class MySceneHostVM
|
|||||||
End If
|
End If
|
||||||
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error
|
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error
|
||||||
End If
|
End If
|
||||||
' leggo materiale
|
' leggo materiale e macchina
|
||||||
Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE)
|
Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE)
|
||||||
If nTabPartId <> GDB_ID.NULL Then
|
If nTabPartId <> GDB_ID.NULL Then
|
||||||
|
Dim sMachineName As String = ""
|
||||||
|
if Not EgtGetInfo(nTabPartId, KEY_MACHINE_NAME, sMachineName) Then sMachineName = "Cms-Kreator"
|
||||||
|
Dim ProjectMachine As Machine = Map.refMachinePanelVM.MachineList.FirstOrDefault(Function(x) x.Name = sMachineName)
|
||||||
|
If Not IsNothing(ProjectMachine) Then
|
||||||
|
' imposto la macchina
|
||||||
|
Map.refMachinePanelVM.SelectedMachine = ProjectMachine
|
||||||
|
Else
|
||||||
|
MessageBox.Show("Project machine not found! Impossible to open the project.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
|
Map.refProjManagerVM.NewProject(False)
|
||||||
|
Return
|
||||||
|
End If
|
||||||
Dim sMaterialGuid As String = ""
|
Dim sMaterialGuid As String = ""
|
||||||
EgtGetInfo(nTabPartId, KEY_MATERIAL_GUID, sMaterialGuid)
|
EgtGetInfo(nTabPartId, KEY_MATERIAL_GUID, sMaterialGuid)
|
||||||
Dim MaterialGuid As Guid
|
Dim MaterialGuid As Guid
|
||||||
@@ -881,7 +900,7 @@ Public Class MySceneHostVM
|
|||||||
ProjectMaterial = Map.refTopPanelVM.MaterialList.FirstOrDefault(Function(x) x.sName = sMaterialName)
|
ProjectMaterial = Map.refTopPanelVM.MaterialList.FirstOrDefault(Function(x) x.sName = sMaterialName)
|
||||||
End If
|
End If
|
||||||
If Not IsNothing(ProjectMaterial) Then
|
If Not IsNothing(ProjectMaterial) Then
|
||||||
Map.refTopPanelVM.SelMaterial = ProjectMaterial
|
Map.refTopPanelVM.SetSelMaterial(ProjectMaterial, True)
|
||||||
Map.refTopPanelVM.NotifyPropertyChanged(NameOf(Map.refTopPanelVM.SelMaterial))
|
Map.refTopPanelVM.NotifyPropertyChanged(NameOf(Map.refTopPanelVM.SelMaterial))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -897,7 +916,6 @@ Public Class MySceneHostVM
|
|||||||
End If
|
End If
|
||||||
Dim nPrintPartLayerId As Integer = EgtGetFirstNameInGroup(nPartId, PRINT_SOLID)
|
Dim nPrintPartLayerId As Integer = EgtGetFirstNameInGroup(nPartId, PRINT_SOLID)
|
||||||
Dim nPrintPartId As Integer = EgtGetFirstInGroup(nPrintPartLayerId)
|
Dim nPrintPartId As Integer = EgtGetFirstInGroup(nPrintPartLayerId)
|
||||||
Dim nOriginalPartLayerId As Integer = EgtGetFirstNameInGroup(nPartId, ORIGINAL_SOLID)
|
|
||||||
Dim nRibsLayerId As Integer = EgtGetFirstNameInGroup(nPartId, LAY_RIBS)
|
Dim nRibsLayerId As Integer = EgtGetFirstNameInGroup(nPartId, LAY_RIBS)
|
||||||
Dim nShellNumberLayerId As Integer = EgtGetFirstNameInGroup(nPartId, LAY_SHELL_NBR)
|
Dim nShellNumberLayerId As Integer = EgtGetFirstNameInGroup(nPartId, LAY_SHELL_NBR)
|
||||||
Dim nAuxSolidsLayerId As Integer = EgtGetFirstNameInGroup(nPartId, LAY_AUX_SOLIDS)
|
Dim nAuxSolidsLayerId As Integer = EgtGetFirstNameInGroup(nPartId, LAY_AUX_SOLIDS)
|
||||||
@@ -907,7 +925,7 @@ Public Class MySceneHostVM
|
|||||||
EgtGetInfo(nPartId, FILE_PATH, sFilePath)
|
EgtGetInfo(nPartId, FILE_PATH, sFilePath)
|
||||||
Dim nReferenceLayerId As Integer = EgtGetFirstNameInGroup(nPartId, LAY_REFERENCE)
|
Dim nReferenceLayerId As Integer = EgtGetFirstNameInGroup(nPartId, LAY_REFERENCE)
|
||||||
Dim nFrameId As Integer = EgtGetFirstInGroup(nReferenceLayerId)
|
Dim nFrameId As Integer = EgtGetFirstInGroup(nReferenceLayerId)
|
||||||
Dim NewPart As New Print3dPartVM(nPartId, nPrintPartLayerId, nPrintPartId, nOriginalPartLayerId, nReferenceLayerId, nFrameId, nMachStartLayerId, nRibsLayerId, nShellNumberLayerId, nAuxSolidsLayerId, nOthersLayerId, sFilePath)
|
Dim NewPart As New Print3dPartVM(nPartId, nPrintPartLayerId, nReferenceLayerId, nFrameId, nMachStartLayerId, nRibsLayerId, nShellNumberLayerId, nAuxSolidsLayerId, nOthersLayerId, sFilePath)
|
||||||
Map.refTopPanelVM.PartList.Add(NewPart)
|
Map.refTopPanelVM.PartList.Add(NewPart)
|
||||||
Dim bPartToRecalc As Boolean = False
|
Dim bPartToRecalc As Boolean = False
|
||||||
EgtGetInfo(nPartId, MAC_TORECALC_SLICE, bPartToRecalc)
|
EgtGetInfo(nPartId, MAC_TORECALC_SLICE, bPartToRecalc)
|
||||||
@@ -932,6 +950,9 @@ Public Class MySceneHostVM
|
|||||||
' seleziono primo pezzo trovato
|
' seleziono primo pezzo trovato
|
||||||
Map.refTopPanelVM.SelFirstPart()
|
Map.refTopPanelVM.SelFirstPart()
|
||||||
|
|
||||||
|
' resetto calcolo solidi
|
||||||
|
Map.refViewLayerManagerVM.ResetSolid()
|
||||||
|
|
||||||
' imposto modalita' modifica
|
' imposto modalita' modifica
|
||||||
Map.refTopPanelVM.SelPage = Pages.MODIFY
|
Map.refTopPanelVM.SelPage = Pages.MODIFY
|
||||||
|
|
||||||
@@ -1155,7 +1176,7 @@ Public Class MySceneHostVM
|
|||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
' Recupero l'identificativo del pezzo cui appartiene
|
' Recupero l'identificativo del pezzo cui appartiene
|
||||||
Dim nPartId As Integer = EgtGetParent(EgtGetParent(nId))
|
Dim nPartId As Integer = EgtGetParent(EgtGetParent(nId))
|
||||||
If nPartId = Map.refImportPanelVM.nImportedPartId Then
|
If nPartId = Map.refManagePartPanelVM.nImportedPartId Then
|
||||||
Dim EntityType As GDB_TY = EgtGetType(nId)
|
Dim EntityType As GDB_TY = EgtGetType(nId)
|
||||||
Select Case EntityType
|
Select Case EntityType
|
||||||
Case GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO, GDB_TY.CRV_LINE
|
Case GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO, GDB_TY.CRV_LINE
|
||||||
@@ -1205,7 +1226,7 @@ Public Class MySceneHostVM
|
|||||||
If Not m_bDragToStart Then
|
If Not m_bDragToStart Then
|
||||||
' Se selezione da eseguire
|
' Se selezione da eseguire
|
||||||
ElseIf m_nIdToSel <> GDB_ID.NULL Then
|
ElseIf m_nIdToSel <> GDB_ID.NULL Then
|
||||||
Map.refImportPanelVM.SetSelImportedEntity(m_nIdToSel)
|
Map.refManagePartPanelVM.SetSelImportedEntity(m_nIdToSel)
|
||||||
End If
|
End If
|
||||||
' Reset
|
' Reset
|
||||||
m_bDrag = False
|
m_bDrag = False
|
||||||
@@ -1224,19 +1245,35 @@ Public Class MySceneHostVM
|
|||||||
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel)
|
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel)
|
||||||
Dim nId As Integer = EgtGetFirstObjInSelWin()
|
Dim nId As Integer = EgtGetFirstObjInSelWin()
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
' Recupero l'identificativo del pezzo cui appartiene
|
' Se per Griglia da faccia di oggetto
|
||||||
Dim nPartId As Integer = EgtGetParent(nId)
|
If Map.refStartMachPanelVM.bCPlaneObj_IsActive Then
|
||||||
Dim bFound As Boolean = False
|
If EgtGetType( nId) = GDB_TY.SRF_MESH Then
|
||||||
If nPartId = Map.refStartMachPanelVM.nStartMachLayerId Then bFound = True
|
m_nIdToSel = nId
|
||||||
If Not bFound Then
|
Exit While
|
||||||
nId = EgtGetNextObjInSelWin()
|
End If
|
||||||
Continue While
|
Else
|
||||||
|
' Recupero l'identificativo del pezzo cui appartiene
|
||||||
|
Dim nPartId As Integer = EgtGetParent(nId)
|
||||||
|
Dim bFound As Boolean = False
|
||||||
|
If nPartId = Map.refStartMachPanelVM.nStartMachLayerId Then bFound = True
|
||||||
|
If bFound Then
|
||||||
|
m_nIdToSel = nId
|
||||||
|
Exit While
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
' Memorizzo Id da selezionare
|
|
||||||
m_nIdToSel = nId
|
|
||||||
Exit While
|
|
||||||
nId = EgtGetNextObjInSelWin()
|
nId = EgtGetNextObjInSelWin()
|
||||||
End While
|
End While
|
||||||
|
If m_nIdToSel <> GDB_ID.NULL Then
|
||||||
|
' recupero dati punto di selezione
|
||||||
|
Dim PtTemp As Point3d
|
||||||
|
Dim nAux As Integer
|
||||||
|
If EgtGetPointFromSelect(m_nIdToSel, e.Location, PtTemp, nAux) Then
|
||||||
|
' eseguo la selezione
|
||||||
|
EgtSelectObj(m_nIdToSel)
|
||||||
|
' dati ausiliari
|
||||||
|
EgtSetSelInfo(m_nIdToSel, nAux, PtTemp)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
' Dati per drag
|
' Dati per drag
|
||||||
m_bDragToStart = True
|
m_bDragToStart = True
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1257,10 +1294,22 @@ Public Class MySceneHostVM
|
|||||||
Friend Sub StartMach_OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
Friend Sub StartMach_OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||||
' Se eseguito drag
|
' Se eseguito drag
|
||||||
If Not m_bDragToStart Then
|
If Not m_bDragToStart Then
|
||||||
' Se selezione da eseguire
|
|
||||||
|
' Se selezione da eseguire
|
||||||
ElseIf m_nIdToSel <> GDB_ID.NULL Then
|
ElseIf m_nIdToSel <> GDB_ID.NULL Then
|
||||||
' Eseguo la selezione
|
If Map.refStartMachPanelVM.bCPlaneObj_IsActive Then
|
||||||
Map.refStartMachPanelVM.SelStartFromId(m_nIdToSel)
|
' eseguo comando
|
||||||
|
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
|
||||||
|
Map.refStartMachPanelVM.ResetCPlaneObjIsActive()
|
||||||
|
' ripristino selezioni precedenti
|
||||||
|
For Each Id In Map.refStartMachPanelVM.PrevSelObjs
|
||||||
|
EgtSelectObj(Id)
|
||||||
|
Next
|
||||||
|
Map.refControllerInputPanelVM.ResetInputBox()
|
||||||
|
Else
|
||||||
|
' Eseguo la selezione
|
||||||
|
Map.refStartMachPanelVM.SelStartFromId(m_nIdToSel)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
' Reset
|
' Reset
|
||||||
m_bDrag = False
|
m_bDrag = False
|
||||||
@@ -1280,19 +1329,35 @@ Public Class MySceneHostVM
|
|||||||
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel)
|
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel)
|
||||||
Dim nId As Integer = EgtGetFirstObjInSelWin()
|
Dim nId As Integer = EgtGetFirstObjInSelWin()
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
' Recupero l'identificativo del pezzo cui appartiene
|
' Se per Griglia da faccia di oggetto
|
||||||
Dim nPartId As Integer = EgtGetParent(nId)
|
If Map.refRibPanelVM.bCPlaneObj_IsActive Then
|
||||||
Dim bFound As Boolean = False
|
If EgtGetType( nId) = GDB_TY.SRF_MESH Then
|
||||||
If nPartId = Map.refRibPanelVM.nRibLayerId Then bFound = True
|
m_nIdToSel = nId
|
||||||
If Not bFound Then
|
Exit While
|
||||||
nId = EgtGetNextObjInSelWin()
|
End If
|
||||||
Continue While
|
Else
|
||||||
|
' Recupero l'identificativo del pezzo cui appartiene
|
||||||
|
Dim nPartId As Integer = EgtGetParent(nId)
|
||||||
|
Dim bFound As Boolean = False
|
||||||
|
If nPartId = Map.refRibPanelVM.nRibLayerId Then bFound = True
|
||||||
|
If bFound Then
|
||||||
|
m_nIdToSel = nId
|
||||||
|
Exit While
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
' Memorizzo Id da selezionare
|
|
||||||
m_nIdToSel = nId
|
|
||||||
Exit While
|
|
||||||
nId = EgtGetNextObjInSelWin()
|
nId = EgtGetNextObjInSelWin()
|
||||||
End While
|
End While
|
||||||
|
If m_nIdToSel <> GDB_ID.NULL Then
|
||||||
|
' recupero dati punto di selezione
|
||||||
|
Dim PtTemp As Point3d
|
||||||
|
Dim nAux As Integer
|
||||||
|
If EgtGetPointFromSelect(m_nIdToSel, e.Location, PtTemp, nAux) Then
|
||||||
|
' eseguo la selezione
|
||||||
|
EgtSelectObj(m_nIdToSel)
|
||||||
|
' dati ausiliari
|
||||||
|
EgtSetSelInfo(m_nIdToSel, nAux, PtTemp)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
' Dati per drag
|
' Dati per drag
|
||||||
m_bDragToStart = True
|
m_bDragToStart = True
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1313,10 +1378,22 @@ Public Class MySceneHostVM
|
|||||||
Friend Sub Rib_OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
Friend Sub Rib_OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||||
' Se eseguito drag
|
' Se eseguito drag
|
||||||
If Not m_bDragToStart Then
|
If Not m_bDragToStart Then
|
||||||
' Se selezione da eseguire
|
|
||||||
|
' Se selezione da eseguire
|
||||||
ElseIf m_nIdToSel <> GDB_ID.NULL Then
|
ElseIf m_nIdToSel <> GDB_ID.NULL Then
|
||||||
' Eseguo la selezione
|
If Map.refRibPanelVM.bCPlaneObj_IsActive Then
|
||||||
Map.refRibPanelVM.SelStartFromId(m_nIdToSel)
|
' eseguo comando
|
||||||
|
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
|
||||||
|
Map.refRibPanelVM.ResetCPlaneObjIsActive()
|
||||||
|
' ripristino selezioni precedenti
|
||||||
|
For Each Id In Map.refRibPanelVM.PrevSelObjs
|
||||||
|
EgtSelectObj(Id)
|
||||||
|
Next
|
||||||
|
Map.refControllerInputPanelVM.ResetInputBox()
|
||||||
|
Else
|
||||||
|
' Eseguo la selezione
|
||||||
|
Map.refRibPanelVM.SelStartFromId(m_nIdToSel)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
' Reset
|
' Reset
|
||||||
m_bDrag = False
|
m_bDrag = False
|
||||||
@@ -1330,6 +1407,7 @@ Public Class MySceneHostVM
|
|||||||
#Region "ShellNumber"
|
#Region "ShellNumber"
|
||||||
|
|
||||||
Friend Sub ShellNumber_OnMouseDownScene(sender As Object, e As Forms.MouseEventArgs)
|
Friend Sub ShellNumber_OnMouseDownScene(sender As Object, e As Forms.MouseEventArgs)
|
||||||
|
m_nIdToSel = GDB_ID.NULL
|
||||||
' Verifico se selezionato indicativo di pezzo
|
' Verifico se selezionato indicativo di pezzo
|
||||||
EgtSetObjFilterForSelWin(True, True, True, True, True)
|
EgtSetObjFilterForSelWin(True, True, True, True, True)
|
||||||
Dim nSel As Integer
|
Dim nSel As Integer
|
||||||
@@ -1340,15 +1418,23 @@ Public Class MySceneHostVM
|
|||||||
Dim nPartId As Integer = EgtGetParent(nId)
|
Dim nPartId As Integer = EgtGetParent(nId)
|
||||||
Dim bFound As Boolean = False
|
Dim bFound As Boolean = False
|
||||||
If nPartId = Map.refShellNumberPanelVM.nShellNumberLayerId Then bFound = True
|
If nPartId = Map.refShellNumberPanelVM.nShellNumberLayerId Then bFound = True
|
||||||
If Not bFound Then
|
If bFound Then
|
||||||
nId = EgtGetNextObjInSelWin()
|
m_nIdToSel = nId
|
||||||
Continue While
|
Exit While
|
||||||
End If
|
End If
|
||||||
' Memorizzo Id da selezionare
|
|
||||||
m_nIdToSel = nId
|
|
||||||
Exit While
|
|
||||||
nId = EgtGetNextObjInSelWin()
|
nId = EgtGetNextObjInSelWin()
|
||||||
End While
|
End While
|
||||||
|
If m_nIdToSel <> GDB_ID.NULL Then
|
||||||
|
' recupero dati punto di selezione
|
||||||
|
Dim PtTemp As Point3d
|
||||||
|
Dim nAux As Integer
|
||||||
|
If EgtGetPointFromSelect(m_nIdToSel, e.Location, PtTemp, nAux) Then
|
||||||
|
' eseguo la selezione
|
||||||
|
EgtSelectObj(m_nIdToSel)
|
||||||
|
' dati ausiliari
|
||||||
|
EgtSetSelInfo(m_nIdToSel, nAux, PtTemp)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
' Dati per drag
|
' Dati per drag
|
||||||
m_bDragToStart = True
|
m_bDragToStart = True
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1369,11 +1455,10 @@ Public Class MySceneHostVM
|
|||||||
Friend Sub ShellNumber_OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
Friend Sub ShellNumber_OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||||
' Se eseguito drag
|
' Se eseguito drag
|
||||||
If Not m_bDragToStart Then
|
If Not m_bDragToStart Then
|
||||||
' Se selezione da eseguire
|
|
||||||
|
' Se selezione da eseguire
|
||||||
ElseIf m_nIdToSel <> GDB_ID.NULL Then
|
ElseIf m_nIdToSel <> GDB_ID.NULL Then
|
||||||
If Map.refShellNumberPanelVM.bCPlaneObj_IsActive Then
|
If Map.refShellNumberPanelVM.bCPlaneObj_IsActive Then
|
||||||
' eseguo la selezione
|
|
||||||
EgtSelectObj(m_nIdToSel)
|
|
||||||
' eseguo comando
|
' eseguo comando
|
||||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
|
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
|
||||||
Map.refShellNumberPanelVM.ResetCPlaneObjIsActive()
|
Map.refShellNumberPanelVM.ResetCPlaneObjIsActive()
|
||||||
|
|||||||
@@ -4,6 +4,12 @@ Imports EgtUILib
|
|||||||
Public Class SecondaryWindowV
|
Public Class SecondaryWindowV
|
||||||
|
|
||||||
Private m_SecondaryWindowVM As SecondaryWindowVM
|
Private m_SecondaryWindowVM As SecondaryWindowVM
|
||||||
|
Private m_WindowChangingState As Boolean = False
|
||||||
|
Public ReadOnly Property WindowChangingState As Boolean
|
||||||
|
Get
|
||||||
|
Return m_WindowChangingState
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
@@ -55,9 +61,11 @@ Public Class SecondaryWindowV
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SecondaryWindowV_StateChanged(sender As Object, e As EventArgs)
|
Private Sub SecondaryWindowV_StateChanged(sender As Object, e As EventArgs)
|
||||||
|
m_WindowChangingState = True
|
||||||
Application.Current.MainWindow.WindowState = Me.WindowState
|
Application.Current.MainWindow.WindowState = Me.WindowState
|
||||||
Application.Current.MainWindow.Topmost = True
|
Application.Current.MainWindow.Topmost = True
|
||||||
Application.Current.MainWindow.Topmost = False
|
Application.Current.MainWindow.Topmost = False
|
||||||
|
m_WindowChangingState = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
#End Region ' CONSTRUCTOR
|
||||||
|
|||||||
@@ -83,10 +83,10 @@ Public Class SecondaryWindowVM
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SplashScreenTimer_Tick()
|
Private Sub SplashScreenTimer_Tick()
|
||||||
If m_WaitAfterRender > 4 Then
|
If m_WaitAfterRender > 1 Then
|
||||||
' chiudo SplashScreen
|
' chiudo SplashScreen
|
||||||
Map.refSplashScreen.Close()
|
Map.refSplashScreen.Close()
|
||||||
ElseIf m_WaitAfterRender >= 1 Then
|
ElseIf m_WaitAfterRender > 0 Then
|
||||||
m_WaitAfterRender += 1
|
m_WaitAfterRender += 1
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -269,30 +269,18 @@
|
|||||||
Style="{StaticResource ToolBar_Button}">
|
Style="{StaticResource ToolBar_Button}">
|
||||||
<Image Source="/Resources/GridViewPanel/CplaneELEVATION.png" Stretch="Uniform"/>
|
<Image Source="/Resources/GridViewPanel/CplaneELEVATION.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Grid.Column="7"
|
<Button Grid.Column="7"
|
||||||
Command="{Binding CPlaneRotate_Command}"
|
Command="{Binding CPlaneOrigin_Command}"
|
||||||
ToolTip="{Binding CPlaneRotateToolTip}"
|
ToolTip="{Binding CPlaneOriginToolTip}"
|
||||||
Style="{StaticResource ToolBar_Button}">
|
Style="{StaticResource ToolBar_Button}">
|
||||||
<Image Source="/Resources/GridViewPanel/CplaneROTATE.png" Stretch="Uniform"/>
|
<Image Source="/Resources/GridViewPanel/CPlaneORIGIN.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Grid.Column="8"
|
<Button Grid.Column="8"
|
||||||
Command="{Binding CPlane3P_Command}"
|
|
||||||
ToolTip="{Binding CPlane3PToolTip}"
|
|
||||||
Style="{StaticResource ToolBar_Button}">
|
|
||||||
<Image Source="/Resources/GridViewPanel/CPlane3POINTS.png" Stretch="Uniform"/>
|
|
||||||
</Button>
|
|
||||||
<Button Grid.Column="9"
|
|
||||||
Command="{Binding CPlanePerpObj_Command}"
|
|
||||||
ToolTip="{Binding CPlanePerpObjToolTip}"
|
|
||||||
Style="{StaticResource ToolBar_Button}">
|
|
||||||
<Image Source="/Resources/GridViewPanel/CPlanePERPCURVE.png" Stretch="Uniform"/>
|
|
||||||
</Button>
|
|
||||||
<!--<Button Grid.Column="10"
|
|
||||||
Command="{Binding CPlaneObj_Command}"
|
Command="{Binding CPlaneObj_Command}"
|
||||||
ToolTip="{Binding CPlaneObjToolTip}"
|
ToolTip="{Binding CPlaneObjToolTip}"
|
||||||
Style="{StaticResource ToolBar_Button}">
|
Style="{StaticResource ToolBar_Button}">
|
||||||
<Image Source="/Resources/GridViewPanel/CplaneOBJECT.png" Stretch="Uniform"/>
|
<Image Source="/Resources/GridViewPanel/CplaneOBJECT.png" Stretch="Uniform"/>
|
||||||
</Button>-->
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
<!--<Popup IsOpen="{Binding IsChecked, ElementName=GridBtn}"
|
<!--<Popup IsOpen="{Binding IsChecked, ElementName=GridBtn}"
|
||||||
|
|||||||
@@ -1173,7 +1173,7 @@ Public Class ShellNumberPanelVM
|
|||||||
End While
|
End While
|
||||||
EgtDeselectAll()
|
EgtDeselectAll()
|
||||||
m_bCPlaneObj_IsActive = True
|
m_bCPlaneObj_IsActive = True
|
||||||
Map.refControllerInputPanelVM.PrepareInputBox("Grid from Selection", "Select the face of the object where to place the grid", "", False, False)
|
' Map.refControllerInputPanelVM.PrepareInputBox("Grid from Selection", "Select the face of the object where to place the grid", "", False, False)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CPlaneObj
|
#End Region ' CPlaneObj
|
||||||
|
|||||||
@@ -14,10 +14,10 @@
|
|||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock Text="{Binding ghTime}"
|
<TextBlock Text="{Binding ghTime}"
|
||||||
Visibility="{Binding TimeMass_Visibility}"/>
|
Visibility="{Binding Time_Visibility}"/>
|
||||||
<TextBlock Grid.Row="1"
|
<TextBlock Grid.Row="1"
|
||||||
Text="{Binding ghMass}"
|
Text="{Binding ghMass}"
|
||||||
Visibility="{Binding TimeMass_Visibility}"
|
Visibility="{Binding Mass_Visibility}"
|
||||||
Margin="0,0,0,5"/>
|
Margin="0,0,0,5"/>
|
||||||
<TextBlock Grid.Row="2"
|
<TextBlock Grid.Row="2"
|
||||||
Text="{Binding sLoadingText}"
|
Text="{Binding sLoadingText}"
|
||||||
|
|||||||
@@ -126,12 +126,18 @@ Public Class SliceManagerVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property TimeMass_Visibility As Visibility
|
Public ReadOnly Property Time_Visibility As Visibility
|
||||||
Get
|
Get
|
||||||
Return If(m_dTime > 0, Visibility.Visible, Visibility.Collapsed)
|
Return If(m_dTime > 0, Visibility.Visible, Visibility.Collapsed)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Mass_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return If(m_dMass > 0, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_Buttons_IsEnabled As Boolean = True
|
Private m_Buttons_IsEnabled As Boolean = True
|
||||||
Public ReadOnly Property Buttons_IsEnabled As Boolean
|
Public ReadOnly Property Buttons_IsEnabled As Boolean
|
||||||
Get
|
Get
|
||||||
@@ -203,11 +209,11 @@ Public Class SliceManagerVM
|
|||||||
End If
|
End If
|
||||||
NotifyPropertyChanged(NameOf(ghTime))
|
NotifyPropertyChanged(NameOf(ghTime))
|
||||||
NotifyPropertyChanged(NameOf(ghMass))
|
NotifyPropertyChanged(NameOf(ghMass))
|
||||||
NotifyPropertyChanged(NameOf(TimeMass_Visibility))
|
NotifyPropertyChanged(NameOf(Time_Visibility))
|
||||||
|
NotifyPropertyChanged(NameOf(Mass_Visibility))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer
|
Private Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer
|
||||||
EgtOutLog(nProg)
|
|
||||||
' Se previsto, imposto progress
|
' Se previsto, imposto progress
|
||||||
If nProg >= 0 Then
|
If nProg >= 0 Then
|
||||||
Dim dPartialProgress As Integer = 0
|
Dim dPartialProgress As Integer = 0
|
||||||
@@ -335,7 +341,11 @@ Public Class SliceManagerVM
|
|||||||
m_bGenerate = bForceGenerate OrElse (bGenerate AndAlso bToRecalcGenerate)
|
m_bGenerate = bForceGenerate OrElse (bGenerate AndAlso bToRecalcGenerate)
|
||||||
End If
|
End If
|
||||||
If m_bSlice OrElse m_bCalcTFS Then
|
If m_bSlice OrElse m_bCalcTFS Then
|
||||||
EgtSetInfo(nPartId, MAC_TORECALC_GENERATE, True)
|
nPartId = EgtGetFirstPart()
|
||||||
|
While nPartId <> GDB_ID.NULL
|
||||||
|
EgtSetInfo(nPartId, MAC_TORECALC_GENERATE, True)
|
||||||
|
nPartId = EgtGetNextPart(nPartId)
|
||||||
|
End While
|
||||||
End If
|
End If
|
||||||
' Aggiorno dati macchina
|
' Aggiorno dati macchina
|
||||||
If m_bCalcTFS Then Map.refTFSEditorVM.UpdateSpeedMinMax()
|
If m_bCalcTFS Then Map.refTFSEditorVM.UpdateSpeedMinMax()
|
||||||
@@ -507,7 +517,8 @@ Public Class SliceManagerVM
|
|||||||
CalcSlice(False)
|
CalcSlice(False)
|
||||||
Map.refTopPanelVM.SelPage = Pages.SLICE
|
Map.refTopPanelVM.SelPage = Pages.SLICE
|
||||||
Map.refSliderManagerVM.SetLayerIndexToMax()
|
Map.refSliderManagerVM.SetLayerIndexToMax()
|
||||||
NotifyPropertyChanged(NameOf(TimeMass_Visibility))
|
NotifyPropertyChanged(NameOf(Time_Visibility))
|
||||||
|
NotifyPropertyChanged(NameOf(Mass_Visibility))
|
||||||
m_bCalculating = False
|
m_bCalculating = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -535,6 +546,8 @@ Public Class SliceManagerVM
|
|||||||
m_bCalculating = True
|
m_bCalculating = True
|
||||||
' eseguo calcoli
|
' eseguo calcoli
|
||||||
CalcSlice(False)
|
CalcSlice(False)
|
||||||
|
NotifyPropertyChanged(NameOf(Time_Visibility))
|
||||||
|
NotifyPropertyChanged(NameOf(Mass_Visibility))
|
||||||
m_bCalculating = False
|
m_bCalculating = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -615,6 +628,8 @@ Public Class SliceManagerVM
|
|||||||
MessageBox.Show("Edit failed, missing part program file" & " (" & sIsoFilePath & ")")
|
MessageBox.Show("Edit failed, missing part program file" & " (" & sIsoFilePath & ")")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
NotifyPropertyChanged(NameOf(Time_Visibility))
|
||||||
|
NotifyPropertyChanged(NameOf(Mass_Visibility))
|
||||||
m_bCalculating = False
|
m_bCalculating = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -207,6 +207,7 @@
|
|||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button Command="{Binding CPlaneTop_Command}"
|
<Button Command="{Binding CPlaneTop_Command}"
|
||||||
ToolTip="{Binding CPlaneTopToolTip}"
|
ToolTip="{Binding CPlaneTopToolTip}"
|
||||||
@@ -255,6 +256,12 @@
|
|||||||
Style="{StaticResource ToolBar_Button}">
|
Style="{StaticResource ToolBar_Button}">
|
||||||
<Image Source="/Resources/GridViewPanel/CplaneORIGIN.png" Stretch="Uniform"/>
|
<Image Source="/Resources/GridViewPanel/CplaneORIGIN.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button Grid.Column="8"
|
||||||
|
Command="{Binding CPlaneObj_Command}"
|
||||||
|
ToolTip="{Binding CPlaneObjToolTip}"
|
||||||
|
Style="{StaticResource ToolBar_Button}">
|
||||||
|
<Image Source="/Resources/GridViewPanel/CplaneOBJECT.png" Stretch="Uniform"/>
|
||||||
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
<!--<Popup IsOpen="{Binding IsChecked, ElementName=GridBtn}"
|
<!--<Popup IsOpen="{Binding IsChecked, ElementName=GridBtn}"
|
||||||
|
|||||||
@@ -421,7 +421,18 @@ Public Class StartMachPanelVM
|
|||||||
|
|
||||||
Friend Sub OnKeyDown(Key As Forms.Keys)
|
Friend Sub OnKeyDown(Key As Forms.Keys)
|
||||||
If Key = Forms.Keys.Escape Then
|
If Key = Forms.Keys.Escape Then
|
||||||
|
' se attiva, disattivo griglia su oggetto
|
||||||
|
If m_bCPlaneObj_IsActive Then
|
||||||
|
m_bCPlaneObj_IsActive = False
|
||||||
|
ResetCPlaneObjIsActive()
|
||||||
|
' ripristino selezioni precedenti
|
||||||
|
For Each Id In Map.refShellNumberPanelVM.PrevSelObjs
|
||||||
|
EgtSelectObj(Id)
|
||||||
|
Next
|
||||||
|
EgtDraw()
|
||||||
|
' rimetto la selezione scena a null
|
||||||
|
Map.refSceneHostVM.MainScene.SetStatusNull()
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -789,6 +800,54 @@ Public Class StartMachPanelVM
|
|||||||
|
|
||||||
#End Region ' CPlaneOrigin
|
#End Region ' CPlaneOrigin
|
||||||
|
|
||||||
|
#Region "CPlaneObj"
|
||||||
|
|
||||||
|
Private m_bCPlaneObj_IsActive As Boolean = False
|
||||||
|
Friend ReadOnly Property bCPlaneObj_IsActive As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bCPlaneObj_IsActive
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub ResetCPlaneObjIsActive()
|
||||||
|
m_bCPlaneObj_IsActive = False
|
||||||
|
End Sub
|
||||||
|
Private m_PrevSelObjs As New List(Of Integer)
|
||||||
|
Friend ReadOnly Property PrevSelObjs As List(Of Integer)
|
||||||
|
Get
|
||||||
|
Return m_PrevSelObjs
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns a command that do CPlanepObj.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property CPlaneObj_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdCPlaneObj Is Nothing Then
|
||||||
|
m_cmdCPlaneObj = New Command(AddressOf CPlaneObj)
|
||||||
|
End If
|
||||||
|
Return m_cmdCPlaneObj
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Execute the CPlaneObj. This method is invoked by the CPlaneObjCommand.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub CPlaneObj(ByVal param As Object)
|
||||||
|
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
|
||||||
|
' salvo selezione precedente e deseleziono altri oggetti
|
||||||
|
Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
|
||||||
|
While nSelObjId <> GDB_ID.NULL
|
||||||
|
m_PrevSelObjs.Add(nSelObjId)
|
||||||
|
nSelObjId = EgtGetNextSelectedObj()
|
||||||
|
End While
|
||||||
|
EgtDeselectAll()
|
||||||
|
m_bCPlaneObj_IsActive = True
|
||||||
|
' Map.refControllerInputPanelVM.PrepareInputBox("Grid from Selection", "Select the face of the object where to place the grid", "", False, False)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' CPlaneObj
|
||||||
|
|
||||||
#Region "DragMove"
|
#Region "DragMove"
|
||||||
|
|
||||||
Public ReadOnly Property DragMove_Command As ICommand
|
Public ReadOnly Property DragMove_Command As ICommand
|
||||||
|
|||||||
@@ -17,15 +17,27 @@ Public Class MyStatusBarVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
'Public ReadOnly Property CurrMachine As String
|
Private m_bGridVisibility As Boolean
|
||||||
' Get
|
Public Property bGridVisibility As Boolean
|
||||||
' Return If(Not IsNothing(Map.refMachinePanelVM.SelectedMachine), Map.refMachinePanelVM.SelectedMachine.Name, "")
|
Get
|
||||||
' End Get
|
Return m_bGridVisibility
|
||||||
'End Property
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_bGridVisibility = value
|
||||||
|
EgtSetGridShow(value, value)
|
||||||
|
EgtDraw()
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
Private m_cmdStopProgress As ICommand
|
Private m_cmdStopProgress As ICommand
|
||||||
|
|
||||||
|
Public ReadOnly Property GridVisibilityMsg As String
|
||||||
|
Get
|
||||||
|
Return "GRID"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
' Creo riferimento a questa classe in Map
|
' Creo riferimento a questa classe in Map
|
||||||
Map.SetRefMyStatusBarVM(Me)
|
Map.SetRefMyStatusBarVM(Me)
|
||||||
@@ -33,6 +45,14 @@ Public Class MyStatusBarVM
|
|||||||
EgtSetProcessEvents(m_ProcEventsCallback)
|
EgtSetProcessEvents(m_ProcEventsCallback)
|
||||||
' Installo funzione output testo su status per lua
|
' Installo funzione output testo su status per lua
|
||||||
EgtSetOutText(m_OutTextCallback)
|
EgtSetOutText(m_OutTextCallback)
|
||||||
|
' imposto stato di visualizzazione della griglia
|
||||||
|
m_bGridVisibility = GetMainPrivateProfileInt(S_GRID, K_SHOWGRID, 1) <> 0
|
||||||
|
NotifyPropertyChanged(NameOf(bGridVisibility))
|
||||||
|
' modo di visualizzazione
|
||||||
|
Dim nShowMode As Integer = GetMainPrivateProfileInt(S_SCENE, K_SHOWMODE, SM.SHADING)
|
||||||
|
Map.refShowPanelVM.SetShowMode(DirectCast(nShowMode, SM))
|
||||||
|
' visualizzazione freccia direzione su curve
|
||||||
|
Map.refShowPanelVM.CurveDirIsChecked = EgtGetShowCurveDirection()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Overloads Sub SetSnapPointType(sSnapPntType As SP)
|
Friend Overloads Sub SetSnapPointType(sSnapPntType As SP)
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
@@ -121,16 +122,24 @@
|
|||||||
<TextBlock Text="{Binding OutputMessage}"
|
<TextBlock Text="{Binding OutputMessage}"
|
||||||
Foreground="{Binding OutputMessage_Foreground}"/>
|
Foreground="{Binding OutputMessage_Foreground}"/>
|
||||||
</StatusBarItem>
|
</StatusBarItem>
|
||||||
|
|
||||||
<!--Indica il tipo di punto notevole selezionato-->
|
<!--Indica se la griglia è attiva o disattiva-->
|
||||||
<StatusBarItem Grid.Column="4">
|
<StatusBarItem Grid.Column="4">
|
||||||
|
<ToggleButton Content="{Binding GridVisibilityMsg}"
|
||||||
|
IsChecked="{Binding bGridVisibility}"
|
||||||
|
Width="80"/>
|
||||||
|
</StatusBarItem>
|
||||||
|
|
||||||
|
<!--Indica il tipo di punto notevole selezionato-->
|
||||||
|
<StatusBarItem Grid.Column="5">
|
||||||
<Button Content="{Binding SnapPointType}"
|
<Button Content="{Binding SnapPointType}"
|
||||||
Background="{Binding SnapPointType_Background}"
|
Background="{Binding SnapPointType_Background}"
|
||||||
|
IsHitTestVisible="False"
|
||||||
Width="80"/>
|
Width="80"/>
|
||||||
</StatusBarItem>
|
</StatusBarItem>
|
||||||
|
|
||||||
<!--Indica la posizione del mouse quando è sulla scena-->
|
<!--Indica la posizione del mouse quando è sulla scena-->
|
||||||
<StatusBarItem Grid.Column="5">
|
<StatusBarItem Grid.Column="6">
|
||||||
<TextBlock Text="{Binding CurrPos}"
|
<TextBlock Text="{Binding CurrPos}"
|
||||||
TextAlignment="Center"
|
TextAlignment="Center"
|
||||||
Foreground="Black"
|
Foreground="Black"
|
||||||
@@ -138,17 +147,10 @@
|
|||||||
</StatusBarItem>
|
</StatusBarItem>
|
||||||
|
|
||||||
<!--Indica l'unità di misura-->
|
<!--Indica l'unità di misura-->
|
||||||
<StatusBarItem Grid.Column="6">
|
<StatusBarItem Grid.Column="7">
|
||||||
<TextBlock Text="{Binding MeasureUnit}"
|
<TextBlock Text="{Binding MeasureUnit}"
|
||||||
Foreground="Black"
|
Foreground="Black"
|
||||||
Width="35"/>
|
Width="35"/>
|
||||||
</StatusBarItem>
|
</StatusBarItem>
|
||||||
|
|
||||||
<!--Indica la macchina corrente--><!--
|
|
||||||
<StatusBarItem Grid.Column="7">
|
|
||||||
<TextBlock Text="{Binding CurrMachine}"
|
|
||||||
Foreground="Black"
|
|
||||||
Margin="0,0,5,0"/>
|
|
||||||
</StatusBarItem>-->
|
|
||||||
|
|
||||||
</StatusBar>
|
</StatusBar>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<WrapPanel Orientation="Horizontal" x:Name="TFSEditorStackPanel">
|
<WrapPanel Orientation="Horizontal" x:Name="TFSEditorStackPanel">
|
||||||
<ComboBox ItemsSource="{Binding MediaTypeList}"
|
<ComboBox ItemsSource="{Binding MediaTypeList}"
|
||||||
SelectedIndex="{Binding ghSelMediaType}"
|
SelectedIndex="{Binding ghSelMediaType}"
|
||||||
Margin="0,0,10,0"
|
Margin="0,5,10,5"
|
||||||
Style="{StaticResource PartParam_ComboBox}"/>
|
Style="{StaticResource PartParam_ComboBox}"/>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -31,11 +31,13 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="Slice Number:"
|
<TextBlock Text="Slice Number:"
|
||||||
Visibility="{Binding MediaHeight_Visibility}"
|
Visibility="{Binding MediaHeight_Visibility}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
Style="{StaticResource TSFEditor_TextBlock}"/>
|
Style="{StaticResource TSFEditor_TextBlock}"/>
|
||||||
<TextBox Grid.Column="1"
|
<TextBox Grid.Column="1"
|
||||||
Text="{Binding sMediaHeight}"
|
Text="{Binding sMediaHeight}"
|
||||||
Width="50"
|
Width="50"
|
||||||
Visibility="{Binding MediaHeight_Visibility}"
|
Visibility="{Binding MediaHeight_Visibility}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
Style="{StaticResource ControllerInputPanel_TextBox}"/>
|
Style="{StaticResource ControllerInputPanel_TextBox}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid>
|
<Grid>
|
||||||
@@ -45,11 +47,13 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="Difference:"
|
<TextBlock Text="Difference:"
|
||||||
Visibility="{Binding Difference_Visibility}"
|
Visibility="{Binding Difference_Visibility}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
Style="{StaticResource TSFEditor_TextBlock}"/>
|
Style="{StaticResource TSFEditor_TextBlock}"/>
|
||||||
<TextBox Grid.Column="1"
|
<TextBox Grid.Column="1"
|
||||||
Text="{Binding sDifference}"
|
Text="{Binding sDifference}"
|
||||||
Width="50"
|
Width="50"
|
||||||
Visibility="{Binding Difference_Visibility}"
|
Visibility="{Binding Difference_Visibility}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
Style="{StaticResource ControllerInputPanel_TextBox}"/>
|
Style="{StaticResource ControllerInputPanel_TextBox}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid>
|
<Grid>
|
||||||
@@ -59,11 +63,13 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="F:"
|
<TextBlock Text="F:"
|
||||||
Visibility="{Binding FCurr_Visibility}"
|
Visibility="{Binding FCurr_Visibility}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
Style="{StaticResource TSFEditor_TextBlock}"/>
|
Style="{StaticResource TSFEditor_TextBlock}"/>
|
||||||
<TextBox Grid.Column="1"
|
<TextBox Grid.Column="1"
|
||||||
Text="{Binding sFCurr}"
|
Text="{Binding sFCurr}"
|
||||||
Width="50"
|
Width="50"
|
||||||
Visibility="{Binding FCurr_Visibility}"
|
Visibility="{Binding FCurr_Visibility}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
Style="{StaticResource ControllerInputPanel_TextBox}"/>
|
Style="{StaticResource ControllerInputPanel_TextBox}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<StackPanel Grid.Column="1"
|
<StackPanel Grid.Column="1"
|
||||||
@@ -71,12 +77,15 @@
|
|||||||
<Button Content="Set"
|
<Button Content="Set"
|
||||||
Command="{Binding Set_Command}"
|
Command="{Binding Set_Command}"
|
||||||
Visibility="{Binding FCurr_Visibility}"
|
Visibility="{Binding FCurr_Visibility}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
Style="{StaticResource ToolBar_TextButton}"/>
|
Style="{StaticResource ToolBar_TextButton}"/>
|
||||||
<Button Content="Media"
|
<Button Content="Media"
|
||||||
Command="{Binding Media_Command}"
|
Command="{Binding Media_Command}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
Style="{StaticResource ToolBar_TextButton}"/>
|
Style="{StaticResource ToolBar_TextButton}"/>
|
||||||
<Button Content="Reset"
|
<Button Content="Reset"
|
||||||
Command="{Binding Reset_Command}"
|
Command="{Binding Reset_Command}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
Style="{StaticResource ToolBar_TextButton}"/>
|
Style="{StaticResource ToolBar_TextButton}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -92,7 +101,7 @@
|
|||||||
ScrollViewer.CanContentScroll="True"
|
ScrollViewer.CanContentScroll="True"
|
||||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||||
Margin="0,0,0,5">
|
Margin="0,5,0,5">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn Header="Index"
|
<DataGridTextColumn Header="Index"
|
||||||
Binding="{Binding nIndex}"
|
Binding="{Binding nIndex}"
|
||||||
@@ -166,9 +175,11 @@
|
|||||||
<StackPanel Grid.Row="2" Orientation="Horizontal">
|
<StackPanel Grid.Row="2" Orientation="Horizontal">
|
||||||
<ComboBox ItemsSource="{Binding FilterList}"
|
<ComboBox ItemsSource="{Binding FilterList}"
|
||||||
SelectedIndex="{Binding nSelFilter}"
|
SelectedIndex="{Binding nSelFilter}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
Style="{StaticResource PartParam_ComboBox}"/>
|
Style="{StaticResource PartParam_ComboBox}"/>
|
||||||
<Button Content="Extend"
|
<Button Content="Extend"
|
||||||
Command="{Binding Extend_Command}"
|
Command="{Binding Extend_Command}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
Style="{StaticResource ToolBar_TextButton}"/>
|
Style="{StaticResource ToolBar_TextButton}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
ItemsSource="{Binding PartList}"
|
ItemsSource="{Binding PartList}"
|
||||||
SelectedItem="{Binding SelPart}"
|
SelectedItem="{Binding SelPart}"
|
||||||
DisplayMemberPath="sImportedFileName"
|
DisplayMemberPath="sName"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
FontFamily="/Resources/Fonts/#Roboto"
|
FontFamily="/Resources/Fonts/#Roboto"
|
||||||
FontWeight="Light"
|
FontWeight="Light"
|
||||||
@@ -148,8 +148,8 @@
|
|||||||
Style="{StaticResource PrintParam_ToggleButton}">
|
Style="{StaticResource PrintParam_ToggleButton}">
|
||||||
<Grid HorizontalAlignment="Stretch">
|
<Grid HorizontalAlignment="Stretch">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="3*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1.5*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
|
|||||||
@@ -205,8 +205,9 @@ Public Class TopPanelVM
|
|||||||
Set(value As MaterialIndex)
|
Set(value As MaterialIndex)
|
||||||
' salvo materiale selezionato come ultimo utilizzato
|
' salvo materiale selezionato come ultimo utilizzato
|
||||||
If Not IsNothing(value) Then WriteMainPrivateProfileString(S_PRINTING3D, K_CURRMATERIAL, value.sGUID)
|
If Not IsNothing(value) Then WriteMainPrivateProfileString(S_PRINTING3D, K_CURRMATERIAL, value.sGUID)
|
||||||
' salvo lavorazione selezionata per riselezionarlo
|
' salvo lavorazione selezionata per riselezionarla
|
||||||
Dim PrevMachiningGuid As Guid = m_SelMachining.sGUID
|
Dim PrevMachiningGuid As Guid = Guid.Empty
|
||||||
|
If Not IsNothing(m_SelMachining) Then PrevMachiningGuid = m_SelMachining.sGUID
|
||||||
' seleziono materiale
|
' seleziono materiale
|
||||||
m_SelMaterial = value
|
m_SelMaterial = value
|
||||||
' scrivo materiale sulla tavola
|
' scrivo materiale sulla tavola
|
||||||
@@ -223,9 +224,18 @@ Public Class TopPanelVM
|
|||||||
SetSelMachining(If(Not IsNothing(PrevMachining), PrevMachining, MachiningIndex.Empty()))
|
SetSelMachining(If(Not IsNothing(PrevMachining), PrevMachining, MachiningIndex.Empty()))
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Friend Sub SetSelMaterial(value As MaterialIndex)
|
Friend Sub SetSelMaterial(value As MaterialIndex, Optional bUpdateMaterialList As Boolean = False)
|
||||||
m_SelMaterial = value
|
m_SelMaterial = value
|
||||||
NotifyPropertyChanged(NameOf(SelMaterial))
|
NotifyPropertyChanged(NameOf(SelMaterial))
|
||||||
|
If bUpdateMaterialList Then
|
||||||
|
' salvo lavorazione selezionata per riselezionarla
|
||||||
|
Dim PrevMachiningGuid As Guid = Guid.Empty
|
||||||
|
If Not IsNothing(m_SelMachining) Then PrevMachiningGuid = m_SelMachining.sGUID
|
||||||
|
' ricarico lista lavorazioni valide per il materiale selezionato
|
||||||
|
InitMachiningsList()
|
||||||
|
Dim PrevMachining As MachiningIndex = m_MachiningList.FirstOrDefault(Function(x) x.sGUID = PrevMachiningGuid)
|
||||||
|
SetSelMachining(If(Not IsNothing(PrevMachining), PrevMachining, MachiningIndex.Empty()))
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Material
|
#End Region ' Material
|
||||||
@@ -393,11 +403,25 @@ Public Class TopPanelVM
|
|||||||
#Region "Pages"
|
#Region "Pages"
|
||||||
|
|
||||||
Private Sub InitIMPORT()
|
Private Sub InitIMPORT()
|
||||||
|
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
|
||||||
|
Map.refProjManagerVM.SetProjCmdIsEnabled(False)
|
||||||
|
Map.refTopPanelVM.SetTopPanelIsEnabled(False)
|
||||||
|
Map.refSliceManagerVM.SetButtonsIsEnabled(False)
|
||||||
|
Map.refSliderManagerVM.SetLayerIndexIsEnabled(False)
|
||||||
|
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(False)
|
||||||
|
' imposto pagina
|
||||||
Map.refLeftPanelVM.SetSelPanel(LeftPanelVM.Panels.IMPORT)
|
Map.refLeftPanelVM.SetSelPanel(LeftPanelVM.Panels.IMPORT)
|
||||||
Map.refImportPanelVM.Init()
|
''Map.refImportPanelVM.Init()
|
||||||
|
Map.refManagePartPanelVM.Init(ManagePartPanelVM.ManagePartType.IMPORT)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function ExitIMPORT()
|
Private Function ExitIMPORT()
|
||||||
|
' riabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
|
||||||
|
Map.refProjManagerVM.SetProjCmdIsEnabled(True)
|
||||||
|
Map.refTopPanelVM.SetTopPanelIsEnabled(True)
|
||||||
|
Map.refSliceManagerVM.SetButtonsIsEnabled(True)
|
||||||
|
Map.refSliderManagerVM.SetLayerIndexIsEnabled(True)
|
||||||
|
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(True)
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -509,11 +533,31 @@ Public Class TopPanelVM
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub InitMODIFYPART()
|
Private Sub InitMODIFYPART()
|
||||||
|
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
|
||||||
|
Map.refProjManagerVM.SetProjCmdIsEnabled(False)
|
||||||
|
Map.refTopPanelVM.SetTopPanelIsEnabled(False)
|
||||||
|
Map.refSliceManagerVM.SetButtonsIsEnabled(False)
|
||||||
|
Map.refSliderManagerVM.SetLayerIndexIsEnabled(False)
|
||||||
|
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(False)
|
||||||
|
' tolgo mark da pezzo selezionato
|
||||||
|
If Not IsNothing(SelPart) Then
|
||||||
|
EgtResetMark(SelPart.nPrintSolidId)
|
||||||
|
End If
|
||||||
|
' imposto pagina
|
||||||
Map.refLeftPanelVM.SetSelPanel(LeftPanelVM.Panels.MODIFYPART)
|
Map.refLeftPanelVM.SetSelPanel(LeftPanelVM.Panels.MODIFYPART)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function ExitMODIFYPART()
|
Private Function ExitMODIFYPART()
|
||||||
|
' riabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
|
||||||
|
Map.refProjManagerVM.SetProjCmdIsEnabled(True)
|
||||||
|
Map.refTopPanelVM.SetTopPanelIsEnabled(True)
|
||||||
|
Map.refSliceManagerVM.SetButtonsIsEnabled(True)
|
||||||
|
Map.refSliderManagerVM.SetLayerIndexIsEnabled(True)
|
||||||
|
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(True)
|
||||||
|
' ripristino mark su pezzo selezionato
|
||||||
|
If Not IsNothing(SelPart) Then
|
||||||
|
EgtSetMark(SelPart.nPrintSolidId)
|
||||||
|
End If
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -529,8 +573,8 @@ Public Class TopPanelVM
|
|||||||
' rinomino pezzo e layer
|
' rinomino pezzo e layer
|
||||||
Dim nPartId As Integer = EgtGetLastPart()
|
Dim nPartId As Integer = EgtGetLastPart()
|
||||||
EgtSetName(nPartId, PART)
|
EgtSetName(nPartId, PART)
|
||||||
Dim nLayerId As Integer = EgtGetFirstInGroup(nPartId)
|
'Dim nLayerId As Integer = EgtGetFirstInGroup(nPartId)
|
||||||
EgtSetName(nLayerId, ORIGINAL_SOLID)
|
'EgtSetName(nLayerId, ORIGINAL_SOLID)
|
||||||
|
|
||||||
'' Recupero o creo layer ausiliario
|
'' Recupero o creo layer ausiliario
|
||||||
'Dim nAuxId As Integer = EgtGetFirstNameInGroup(nPartId, LAY_AUX)
|
'Dim nAuxId As Integer = EgtGetFirstNameInGroup(nPartId, LAY_AUX)
|
||||||
|
|||||||
@@ -79,7 +79,8 @@ Public Module CurrentMachine
|
|||||||
Dim nQqqId = EgtAddMachGroup("qqq")
|
Dim nQqqId = EgtAddMachGroup("qqq")
|
||||||
EgtSetTable("Tab")
|
EgtSetTable("Tab")
|
||||||
EgtGetTableArea(1, m_b3Tab)
|
EgtGetTableArea(1, m_b3Tab)
|
||||||
EgtRemoveMachGroup(nQqqId Or GDB_ID.NULL)
|
EgtResetCurrMachGroup()
|
||||||
|
EgtRemoveMachGroup(nQqqId)
|
||||||
' carico materiali e lavorazioni
|
' carico materiali e lavorazioni
|
||||||
Map.refTopPanelVM.InitMaterialList()
|
Map.refTopPanelVM.InitMaterialList()
|
||||||
Map.refMaterialDbVM.Init()
|
Map.refMaterialDbVM.Init()
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<PrintApp:DispositionPanelVM x:Key="DispositionPanelVM"/>
|
<PrintApp:DispositionPanelVM x:Key="DispositionPanelVM"/>
|
||||||
<PrintApp:StartMachPanelVM x:Key="StartMachPanelVM"/>
|
<PrintApp:StartMachPanelVM x:Key="StartMachPanelVM"/>
|
||||||
<PrintApp:RibPanelVM x:Key="RibPanelVM"/>
|
<PrintApp:RibPanelVM x:Key="RibPanelVM"/>
|
||||||
<PrintApp:ImportPanelVM x:Key="ImportPanelVM"/>
|
<!--<PrintApp:ImportPanelVM x:Key="ImportPanelVM"/>-->
|
||||||
<PrintApp:TopPanelVM x:Key="TopPanelVM"/>
|
<PrintApp:TopPanelVM x:Key="TopPanelVM"/>
|
||||||
<PrintApp:ControllerInputPanelVM x:Key="ControllerInputPanelVM"/>
|
<PrintApp:ControllerInputPanelVM x:Key="ControllerInputPanelVM"/>
|
||||||
<PrintApp:SliceManagerVM x:Key="SliceManagerVM"/>
|
<PrintApp:SliceManagerVM x:Key="SliceManagerVM"/>
|
||||||
@@ -44,7 +44,8 @@
|
|||||||
<PrintApp:SimulationPanelVM x:Key="SimulationPanelVM"/>
|
<PrintApp:SimulationPanelVM x:Key="SimulationPanelVM"/>
|
||||||
<PrintApp:ReferencePanelVM x:Key="ReferencePanelVM"/>
|
<PrintApp:ReferencePanelVM x:Key="ReferencePanelVM"/>
|
||||||
<PrintApp:ViewLayerManagerVM x:Key="ViewLayerManagerVM"/>
|
<PrintApp:ViewLayerManagerVM x:Key="ViewLayerManagerVM"/>
|
||||||
<PrintApp:ModifyPartPanelVM x:Key="ModifyPartPanelVM"/>
|
<!--<PrintApp:ModifyPartPanelVM x:Key="ModifyPartPanelVM"/>-->
|
||||||
|
<PrintApp:ManagePartPanelVM x:Key="ManagePartPanelVM"/>
|
||||||
<!--<EgtBEAMWALL:CALCPanelVM x:Key="CALCPanelVM"/>
|
<!--<EgtBEAMWALL:CALCPanelVM x:Key="CALCPanelVM"/>
|
||||||
<EgtBEAMWALL:PartParametersVM x:Key="PartParametersVM"/>
|
<EgtBEAMWALL:PartParametersVM x:Key="PartParametersVM"/>
|
||||||
<EgtBEAMWALL:LeftPanelVM x:Key="LeftPanelVM"/>
|
<EgtBEAMWALL:LeftPanelVM x:Key="LeftPanelVM"/>
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ Module GeomEntityColors
|
|||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
' imposto colori superfici
|
' imposto colori superfici
|
||||||
m_c3Print.FromColor(System.Drawing.Color.Yellow)
|
m_c3Print.FromColor(System.Drawing.Color.Aqua)
|
||||||
m_c3MachStart.FromColor(System.Drawing.Color.Red)
|
m_c3MachStart.FromColor(System.Drawing.Color.Red)
|
||||||
m_c3Rib.FromColor(System.Drawing.Color.MediumOrchid)
|
m_c3Rib.FromColor(System.Drawing.Color.MediumOrchid)
|
||||||
m_c3ShellNumber.FromColor(System.Drawing.Color.Lime)
|
m_c3ShellNumber.FromColor(System.Drawing.Color.Lime)
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ Module LuaExec
|
|||||||
Dim SelMaterialParam As Material = Map.refTopPanelVM.GetSelMaterialData()
|
Dim SelMaterialParam As Material = Map.refTopPanelVM.GetSelMaterialData()
|
||||||
Dim dMachiningConstant As Double = 100
|
Dim dMachiningConstant As Double = 100
|
||||||
If Not IsNothing(Map.refTopPanelVM.CurrMachining) Then
|
If Not IsNothing(Map.refTopPanelVM.CurrMachining) Then
|
||||||
Dim MachiningConstant As CurrNumericMachiningParam = Map.refTopPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.CONSTANT)
|
Dim MachiningConstant As CurrNumericMachiningParam = Map.refTopPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.FLOWRATE_PC)
|
||||||
If Not IsNothing(MachiningConstant) Then
|
If Not IsNothing(MachiningConstant) Then
|
||||||
dMachiningConstant = MachiningConstant.dValue
|
dMachiningConstant = MachiningConstant.dValue
|
||||||
End If
|
End If
|
||||||
|
|||||||
+35
-23
@@ -47,7 +47,7 @@ Module Map
|
|||||||
'Private m_refSplitModeVM As SplitModeVM
|
'Private m_refSplitModeVM As SplitModeVM
|
||||||
'Private m_refMoveRawModeVM As MoveRawModeVM
|
'Private m_refMoveRawModeVM As MoveRawModeVM
|
||||||
'Private m_refSimulTabVM As SimulTabVM
|
'Private m_refSimulTabVM As SimulTabVM
|
||||||
Private m_refImportPanelVM As ImportPanelVM
|
''Private m_refImportPanelVM As ImportPanelVM
|
||||||
Private m_refSliceManagerVM As SliceManagerVM
|
Private m_refSliceManagerVM As SliceManagerVM
|
||||||
Private m_refTFSEditorVM As TFSEditorVM
|
Private m_refTFSEditorVM As TFSEditorVM
|
||||||
Private m_refCurrMachiningPanelVM As CurrMachiningPanelVM
|
Private m_refCurrMachiningPanelVM As CurrMachiningPanelVM
|
||||||
@@ -61,7 +61,8 @@ Module Map
|
|||||||
Private m_refShellNumberPanelVM As ShellNumberPanelVM
|
Private m_refShellNumberPanelVM As ShellNumberPanelVM
|
||||||
Private m_refShellNumberParamPanelVM As ShellNumberParamPanelVM
|
Private m_refShellNumberParamPanelVM As ShellNumberParamPanelVM
|
||||||
Private m_refSplashScreen As SplashScreen
|
Private m_refSplashScreen As SplashScreen
|
||||||
Private m_refModifyPartPanelVM As ModifyPartPanelVM
|
''Private m_refModifyPartPanelVM As ModifyPartPanelVM
|
||||||
|
Private m_refManagePartPanelVM As ManagePartPanelVM
|
||||||
|
|
||||||
#Region "Get"
|
#Region "Get"
|
||||||
|
|
||||||
@@ -106,11 +107,11 @@ Module Map
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
'Public ReadOnly Property refShowPanelVM As ShowPanelVM
|
Public ReadOnly Property refShowPanelVM As ShowPanelVM
|
||||||
' Get
|
Get
|
||||||
' Return LibMap.refShowPanelVM
|
Return LibMap.refShowPanelVM
|
||||||
' End Get
|
End Get
|
||||||
'End Property
|
End Property
|
||||||
|
|
||||||
'Public ReadOnly Property refMainMenuVM As MainMenuVM
|
'Public ReadOnly Property refMainMenuVM As MainMenuVM
|
||||||
' Get
|
' Get
|
||||||
@@ -346,11 +347,11 @@ Module Map
|
|||||||
' End Get
|
' End Get
|
||||||
'End Property
|
'End Property
|
||||||
|
|
||||||
Public ReadOnly Property refImportPanelVM As ImportPanelVM
|
'Public ReadOnly Property refImportPanelVM As ImportPanelVM
|
||||||
Get
|
' Get
|
||||||
Return m_refImportPanelVM
|
' Return m_refImportPanelVM
|
||||||
End Get
|
' End Get
|
||||||
End Property
|
'End Property
|
||||||
|
|
||||||
Public ReadOnly Property refSliceManagerVM As SliceManagerVM
|
Public ReadOnly Property refSliceManagerVM As SliceManagerVM
|
||||||
Get
|
Get
|
||||||
@@ -429,10 +430,16 @@ Module Map
|
|||||||
Return m_refSplashScreen
|
Return m_refSplashScreen
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property refModifyPartPanelVM As ModifyPartPanelVM
|
''Public ReadOnly Property refModifyPartPanelVM As ModifyPartPanelVM
|
||||||
|
'' Get
|
||||||
|
'' Return m_refModifyPartPanelVM
|
||||||
|
'' End Get
|
||||||
|
''End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property refManagePartPanelVM As ManagePartPanelVM
|
||||||
Get
|
Get
|
||||||
Return m_refModifyPartPanelVM
|
Return m_refManagePartPanelVM
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -674,10 +681,10 @@ Module Map
|
|||||||
' Return Not IsNothing(m_refSimulTabVM)
|
' Return Not IsNothing(m_refSimulTabVM)
|
||||||
'End Function
|
'End Function
|
||||||
|
|
||||||
Friend Function SetRefImportPanelVM(ImportPanelVM As ImportPanelVM) As Boolean
|
''Friend Function SetRefImportPanelVM(ImportPanelVM As ImportPanelVM) As Boolean
|
||||||
m_refImportPanelVM = ImportPanelVM
|
'' m_refImportPanelVM = ImportPanelVM
|
||||||
Return Not IsNothing(m_refImportPanelVM)
|
'' Return Not IsNothing(m_refImportPanelVM)
|
||||||
End Function
|
''End Function
|
||||||
|
|
||||||
Friend Function SetRefSliceManagerVM(SliceManagerVM As SliceManagerVM) As Boolean
|
Friend Function SetRefSliceManagerVM(SliceManagerVM As SliceManagerVM) As Boolean
|
||||||
m_refSliceManagerVM = SliceManagerVM
|
m_refSliceManagerVM = SliceManagerVM
|
||||||
@@ -743,10 +750,15 @@ Module Map
|
|||||||
m_refSplashScreen = SplashScreen
|
m_refSplashScreen = SplashScreen
|
||||||
Return Not IsNothing(m_refSplashScreen)
|
Return Not IsNothing(m_refSplashScreen)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function SetRefModifyPartPanelVM(ModifyPartPanelVM As ModifyPartPanelVM) As Boolean
|
''Friend Function SetRefModifyPartPanelVM(ModifyPartPanelVM As ModifyPartPanelVM) As Boolean
|
||||||
m_refModifyPartPanelVM = ModifyPartPanelVM
|
'' m_refModifyPartPanelVM = ModifyPartPanelVM
|
||||||
Return Not IsNothing(m_refModifyPartPanelVM)
|
'' Return Not IsNothing(m_refModifyPartPanelVM)
|
||||||
|
''End Function
|
||||||
|
|
||||||
|
Friend Function SetRefManagePartPanelVM(ManagePartPanelVM As ManagePartPanelVM) As Boolean
|
||||||
|
m_refManagePartPanelVM = ManagePartPanelVM
|
||||||
|
Return Not IsNothing(m_refManagePartPanelVM)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
#End Region ' Set
|
#End Region ' Set
|
||||||
|
|||||||
@@ -44,7 +44,23 @@ Public Class ViewLayerManagerVM
|
|||||||
New ViewLayer(ViewLayer.ViewLayerType.SHELL_NUMBER, "Reduce Shell Number", True),
|
New ViewLayer(ViewLayer.ViewLayerType.SHELL_NUMBER, "Reduce Shell Number", True),
|
||||||
New ViewLayer(ViewLayer.ViewLayerType.AUX_SOLIDS, "Filled Solids", True),
|
New ViewLayer(ViewLayer.ViewLayerType.AUX_SOLIDS, "Filled Solids", True),
|
||||||
New ViewLayer(ViewLayer.ViewLayerType.SOLID_SLICE, "Solid Slice", True),
|
New ViewLayer(ViewLayer.ViewLayerType.SOLID_SLICE, "Solid Slice", True),
|
||||||
New ViewLayer(ViewLayer.ViewLayerType.SLICE_TOOLPATH, "Slice Toolpath", True)})
|
New ViewLayer(ViewLayer.ViewLayerType.SLICE_TOOLPATH, "Slice Toolpath", True),
|
||||||
|
New ViewLayer(ViewLayer.ViewLayerType.OTHERS, "Others", True)})
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub ResetSolid()
|
||||||
|
Dim ViewLayerSolid As ViewLayer = m_LayerList.FirstOrDefault(Function(x) x.Type = ViewLayer.ViewLayerType.SOLID_SLICE)
|
||||||
|
If Not IsNothing(ViewLayerSolid) Then
|
||||||
|
ViewLayerSolid.bIsVisible = False
|
||||||
|
If Map.refTopPanelVM.SelPage = Pages.MODIFY Then
|
||||||
|
WriteMainPrivateProfileString(S_VIEWLAYER, K_SLC_SOLIDSLICE, "0")
|
||||||
|
ElseIf Map.refTopPanelVM.SelPage = Pages.SLICE Then
|
||||||
|
WriteMainPrivateProfileString(S_VIEWLAYER, K_MOD_SOLIDSLICE, "0")
|
||||||
|
ElseIf Map.refTopPanelVM.SelPage = Pages.NULL then
|
||||||
|
WriteMainPrivateProfileString(S_VIEWLAYER, K_MOD_SOLIDSLICE, "0")
|
||||||
|
WriteMainPrivateProfileString(S_VIEWLAYER, K_SLC_SOLIDSLICE, "0")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub UpdateIsVisibleFromIni()
|
Friend Sub UpdateIsVisibleFromIni()
|
||||||
@@ -81,6 +97,7 @@ Public Class ViewLayer
|
|||||||
AUX_SOLIDS = 6
|
AUX_SOLIDS = 6
|
||||||
SOLID_SLICE = 7
|
SOLID_SLICE = 7
|
||||||
SLICE_TOOLPATH = 8
|
SLICE_TOOLPATH = 8
|
||||||
|
OTHERS = 9
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
Private m_Type As ViewLayerType
|
Private m_Type As ViewLayerType
|
||||||
@@ -208,6 +225,8 @@ Public Class ViewLayer
|
|||||||
EgtSetStatus(Entity, Status)
|
EgtSetStatus(Entity, Status)
|
||||||
Next
|
Next
|
||||||
Next
|
Next
|
||||||
|
Case ViewLayerType.OTHERS
|
||||||
|
EgtSetStatus(CurrPart.nOthersLayerId, Status)
|
||||||
End Select
|
End Select
|
||||||
Next
|
Next
|
||||||
' Ripristino stato segnalazione modifica
|
' Ripristino stato segnalazione modifica
|
||||||
@@ -258,6 +277,8 @@ Public Class ViewLayer
|
|||||||
nStatus = If(bSolid, GetMainPrivateProfileInt(S_VIEWLAYER, K_MOD_SOLIDSLICE, 1), 0)
|
nStatus = If(bSolid, GetMainPrivateProfileInt(S_VIEWLAYER, K_MOD_SOLIDSLICE, 1), 0)
|
||||||
Case ViewLayerType.SLICE_TOOLPATH
|
Case ViewLayerType.SLICE_TOOLPATH
|
||||||
nStatus = GetMainPrivateProfileInt(S_VIEWLAYER, K_MOD_SLICETOOLPATH, 1)
|
nStatus = GetMainPrivateProfileInt(S_VIEWLAYER, K_MOD_SLICETOOLPATH, 1)
|
||||||
|
Case ViewLayerType.OTHERS
|
||||||
|
nStatus = GetMainPrivateProfileInt(S_VIEWLAYER, K_MOD_OTHERS, 1)
|
||||||
End Select
|
End Select
|
||||||
Case Pages.SLICE
|
Case Pages.SLICE
|
||||||
Select Case m_Type
|
Select Case m_Type
|
||||||
@@ -277,6 +298,8 @@ Public Class ViewLayer
|
|||||||
nStatus = GetMainPrivateProfileInt(S_VIEWLAYER, K_SLC_SOLIDSLICE, 1)
|
nStatus = GetMainPrivateProfileInt(S_VIEWLAYER, K_SLC_SOLIDSLICE, 1)
|
||||||
Case ViewLayerType.SLICE_TOOLPATH
|
Case ViewLayerType.SLICE_TOOLPATH
|
||||||
nStatus = GetMainPrivateProfileInt(S_VIEWLAYER, K_SLC_SLICETOOLPATH, 1)
|
nStatus = GetMainPrivateProfileInt(S_VIEWLAYER, K_SLC_SLICETOOLPATH, 1)
|
||||||
|
Case ViewLayerType.OTHERS
|
||||||
|
nStatus = GetMainPrivateProfileInt(S_VIEWLAYER, K_SLC_OTHERS, 1)
|
||||||
End Select
|
End Select
|
||||||
End Select
|
End Select
|
||||||
m_IsVisible = nStatus
|
m_IsVisible = nStatus
|
||||||
@@ -305,6 +328,8 @@ Public Class ViewLayer
|
|||||||
WriteMainPrivateProfileString(S_VIEWLAYER, K_MOD_SOLIDSLICE, nStatus)
|
WriteMainPrivateProfileString(S_VIEWLAYER, K_MOD_SOLIDSLICE, nStatus)
|
||||||
Case ViewLayerType.SLICE_TOOLPATH
|
Case ViewLayerType.SLICE_TOOLPATH
|
||||||
WriteMainPrivateProfileString(S_VIEWLAYER, K_MOD_SLICETOOLPATH, nStatus)
|
WriteMainPrivateProfileString(S_VIEWLAYER, K_MOD_SLICETOOLPATH, nStatus)
|
||||||
|
Case ViewLayerType.OTHERS
|
||||||
|
WriteMainPrivateProfileString(S_VIEWLAYER, K_MOD_OTHERS, nStatus)
|
||||||
End Select
|
End Select
|
||||||
Case Pages.SLICE
|
Case Pages.SLICE
|
||||||
Select Case m_Type
|
Select Case m_Type
|
||||||
@@ -324,6 +349,8 @@ Public Class ViewLayer
|
|||||||
WriteMainPrivateProfileString(S_VIEWLAYER, K_SLC_SOLIDSLICE, nStatus)
|
WriteMainPrivateProfileString(S_VIEWLAYER, K_SLC_SOLIDSLICE, nStatus)
|
||||||
Case ViewLayerType.SLICE_TOOLPATH
|
Case ViewLayerType.SLICE_TOOLPATH
|
||||||
WriteMainPrivateProfileString(S_VIEWLAYER, K_SLC_SLICETOOLPATH, nStatus)
|
WriteMainPrivateProfileString(S_VIEWLAYER, K_SLC_SLICETOOLPATH, nStatus)
|
||||||
|
Case ViewLayerType.OTHERS
|
||||||
|
WriteMainPrivateProfileString(S_VIEWLAYER, K_SLC_OTHERS, nStatus)
|
||||||
End Select
|
End Select
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.Collections.ObjectModel
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public Class Print3dPartVM
|
Public Class Print3dPartVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
Private m_nPartId As Integer
|
Private m_nPartId As Integer
|
||||||
Public ReadOnly Property nPartId As Integer
|
Public ReadOnly Property nPartId As Integer
|
||||||
@@ -17,18 +19,9 @@ Public Class Print3dPartVM
|
|||||||
Return m_nPrintSolidLayerId
|
Return m_nPrintSolidLayerId
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Private m_nPrintSolidId As Integer = GDB_ID.NULL
|
|
||||||
Public ReadOnly Property nPrintSolidId As Integer
|
Public ReadOnly Property nPrintSolidId As Integer
|
||||||
Get
|
Get
|
||||||
Return m_nPrintSolidId
|
Return EgtGetFirstInGroup(m_nPrintSolidLayerId)
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
' solido/superficie originale
|
|
||||||
Private m_nOriginalPartLayerId As Integer = GDB_ID.NULL
|
|
||||||
Public ReadOnly Property nOriginalPartLayerId As Integer
|
|
||||||
Get
|
|
||||||
Return m_nOriginalPartLayerId
|
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -87,6 +80,13 @@ Public Class Print3dPartVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_sName As String
|
||||||
|
Public ReadOnly Property sName As String
|
||||||
|
Get
|
||||||
|
Return m_sName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property sImportedFileName As String
|
Public ReadOnly Property sImportedFileName As String
|
||||||
Get
|
Get
|
||||||
Return If(Not String.IsNullOrWhiteSpace(m_sImportedFilePath), IO.Path.GetFileName(m_sImportedFilePath), "")
|
Return If(Not String.IsNullOrWhiteSpace(m_sImportedFilePath), IO.Path.GetFileName(m_sImportedFilePath), "")
|
||||||
@@ -118,15 +118,14 @@ Public Class Print3dPartVM
|
|||||||
|
|
||||||
Sub New(nPartId As Integer, sImportedFilePath As String)
|
Sub New(nPartId As Integer, sImportedFilePath As String)
|
||||||
m_nPartId = nPartId
|
m_nPartId = nPartId
|
||||||
|
m_sName = IO.Path.GetFileName(sImportedFilePath)
|
||||||
m_sImportedFilePath = sImportedFilePath
|
m_sImportedFilePath = sImportedFilePath
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub New(nPartId As Integer, nPrintSolidLayerId As Integer, nPrintSolidId As Integer, nOriginalPartLayerId As Integer, nReferenceLayerId As Integer, nReferenceId As Integer, nMachStartLayerId As Integer,
|
Sub New(nPartId As Integer, nPrintSolidLayerId As Integer, nReferenceLayerId As Integer, nReferenceId As Integer, nMachStartLayerId As Integer,
|
||||||
nRibsLayerId As Integer, nShellNumberLayerId As Integer, nAuxSolidsLayerId As Integer, nOthersLayerId As Integer, sImportedFilePath As String)
|
nRibsLayerId As Integer, nShellNumberLayerId As Integer, nAuxSolidsLayerId As Integer, nOthersLayerId As Integer, sImportedFilePath As String)
|
||||||
m_nPartId = nPartId
|
m_nPartId = nPartId
|
||||||
m_nPrintSolidLayerId = nPrintSolidLayerId
|
m_nPrintSolidLayerId = nPrintSolidLayerId
|
||||||
m_nPrintSolidId = nPrintSolidId
|
|
||||||
m_nOriginalPartLayerId = nOriginalPartLayerId
|
|
||||||
m_nReferenceLayerId = nReferenceLayerId
|
m_nReferenceLayerId = nReferenceLayerId
|
||||||
m_nReferenceId = nReferenceId
|
m_nReferenceId = nReferenceId
|
||||||
m_nMachStartLayerId = nMachStartLayerId
|
m_nMachStartLayerId = nMachStartLayerId
|
||||||
@@ -134,6 +133,9 @@ Public Class Print3dPartVM
|
|||||||
m_nRibsLayerId = nRibsLayerId
|
m_nRibsLayerId = nRibsLayerId
|
||||||
m_nShellNumberLayerId = nShellNumberLayerId
|
m_nShellNumberLayerId = nShellNumberLayerId
|
||||||
m_nOthersLayerId = nOthersLayerId
|
m_nOthersLayerId = nOthersLayerId
|
||||||
|
If Not EgtGetInfo(nPartId, PART_NAME, m_sName) Then
|
||||||
|
m_sName = IO.Path.GetFileName(sImportedFilePath)
|
||||||
|
End If
|
||||||
m_sImportedFilePath = sImportedFilePath
|
m_sImportedFilePath = sImportedFilePath
|
||||||
RefreshPrintLayers()
|
RefreshPrintLayers()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -159,6 +161,11 @@ Public Class Print3dPartVM
|
|||||||
m_nReferenceId = nNewReferenceId
|
m_nReferenceId = nNewReferenceId
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub UpdateName(Name As String)
|
||||||
|
m_sName = Name
|
||||||
|
NotifyPropertyChanged(NameOf(sName))
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region ' METHODS
|
#End Region ' METHODS
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user