Merge branch 'develop' into ImportExportMaterialDb
This commit is contained in:
@@ -154,9 +154,14 @@
|
||||
' materiale in progetto
|
||||
Public Const KEY_MATERIAL_GUID = "MaterialGuid"
|
||||
Public Const KEY_MATERIAL_NAME = "MaterialName"
|
||||
|
||||
' nome file cn in progetto
|
||||
Public Const KEY_ISOFILE_PATH = "IsoFilePath"
|
||||
|
||||
' info di spostamento pezzo per 45 gradi
|
||||
Public Const KEY_MOVEDPART = "MovedPart"
|
||||
Public Const KEY_MOVEDPART2 = "MovedPart2"
|
||||
|
||||
Public Const FILE_PATH = "FilePath"
|
||||
Public Const PART_NAME = "PartName"
|
||||
Public Const ENTITY_NAME = "EntityName"
|
||||
|
||||
@@ -1016,7 +1016,22 @@ Public Class CurrOrderedMachiningParam
|
||||
Dim bReadFromPart As Boolean = False
|
||||
Select Case Type
|
||||
Case Params.PRINT_ORDER
|
||||
m_ValueList = New ObservableCollection(Of IdNameStruct)
|
||||
m_StandardValueOrderList = New List(Of Integer)({Machining.MPAR_PRINT_ORDER.SHELL,
|
||||
Machining.MPAR_PRINT_ORDER.EXTRA_SHELL,
|
||||
Machining.MPAR_PRINT_ORDER.INFILL,
|
||||
Machining.MPAR_PRINT_ORDER.AUX_SOLID,
|
||||
Machining.MPAR_PRINT_ORDER.RIB_UNBOUNDED,
|
||||
Machining.MPAR_PRINT_ORDER.RIB_EXTERNAL,
|
||||
Machining.MPAR_PRINT_ORDER.RIB_INTERNAL,
|
||||
Machining.MPAR_PRINT_ORDER.RIB_SUPPORT})
|
||||
m_ValueList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_PRINT_ORDER.SHELL, "Shell"),
|
||||
New IdNameStruct(Machining.MPAR_PRINT_ORDER.EXTRA_SHELL, "Extra Shells"),
|
||||
New IdNameStruct(Machining.MPAR_PRINT_ORDER.INFILL, "Infills"),
|
||||
New IdNameStruct(Machining.MPAR_PRINT_ORDER.AUX_SOLID, "Filled Solids"),
|
||||
New IdNameStruct(Machining.MPAR_PRINT_ORDER.RIB_UNBOUNDED, "Unbounded Ribs"),
|
||||
New IdNameStruct(Machining.MPAR_PRINT_ORDER.RIB_EXTERNAL, "External Ribs"),
|
||||
New IdNameStruct(Machining.MPAR_PRINT_ORDER.RIB_INTERNAL, "Internal Ribs"),
|
||||
New IdNameStruct(Machining.MPAR_PRINT_ORDER.RIB_SUPPORT, "Support Ribs")})
|
||||
Dim sValue As String = ""
|
||||
bReadFromPart = EgtGetInfo(nPartId, MAC_PRINTORDER, sValue)
|
||||
Value = sValue
|
||||
@@ -1070,7 +1085,6 @@ Public Class CurrOrderedMachiningParam
|
||||
End Property
|
||||
|
||||
Public Sub ResetParamCmd()
|
||||
m_SelValue = Nothing
|
||||
Value = DbParam.OrigValue
|
||||
NotifyPropertyChanged(NameOf(Value))
|
||||
NotifyPropertyChanged(NameOf(SelValue))
|
||||
|
||||
@@ -39,6 +39,8 @@ Public Class DispositionPanelVM
|
||||
Map.refReferencePanelVM.UpdateFramePosition()
|
||||
EgtDraw()
|
||||
NotifyPropertyChanged(NameOf(sXPos))
|
||||
' Imposto flag di ricalcolo part-program
|
||||
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_GENERATE, True)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -76,6 +78,8 @@ Public Class DispositionPanelVM
|
||||
Map.refReferencePanelVM.UpdateFramePosition()
|
||||
EgtDraw()
|
||||
NotifyPropertyChanged(NameOf(sYPos))
|
||||
' Imposto flag di ricalcolo part-program
|
||||
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_GENERATE, True)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -107,6 +111,8 @@ Public Class DispositionPanelVM
|
||||
Map.refReferencePanelVM.UpdateFramePosition()
|
||||
EgtDraw()
|
||||
NotifyPropertyChanged(NameOf(sZPos))
|
||||
' Imposto flag di ricalcolo part-program
|
||||
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_GENERATE, True)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -146,7 +152,7 @@ Public Class DispositionPanelVM
|
||||
End If
|
||||
nRibId = EgtGetNext(nRibId)
|
||||
End While
|
||||
If b3Ribs.Min.x <> INFINITO Then
|
||||
If Not b3Ribs.IsEmpty() Then
|
||||
b3Print.Add(b3Ribs)
|
||||
End If
|
||||
End If
|
||||
@@ -204,13 +210,18 @@ Public Class DispositionPanelVM
|
||||
Return
|
||||
End If
|
||||
Dim vtMovedPart As Vector3d
|
||||
if EgtGetInfo(Map.refTopPanelVM.SelPart.nPartId, "MovedPart", vtMovedPart) Then
|
||||
Dim nEntId = EgtGetFirstInGroup( Map.refTopPanelVM.SelPart.nPrintSolidLayerId)
|
||||
If EgtGetInfo(Map.refTopPanelVM.SelPart.nPartId, KEY_MOVEDPART, vtMovedPart) Then
|
||||
Dim nEntId = EgtGetFirstInGroup(Map.refTopPanelVM.SelPart.nPrintSolidLayerId)
|
||||
While nEntId <> GDB_ID.NULL
|
||||
EgtMove(nEntId, -vtMovedPart, GDB_RT.GLOB)
|
||||
nEntId = EgtGetNext( nEntId)
|
||||
nEntId = EgtGetNext(nEntId)
|
||||
End While
|
||||
EgtRemoveInfo(Map.refTopPanelVM.SelPart.nPartId, "MovedPart")
|
||||
EgtRemoveInfo(Map.refTopPanelVM.SelPart.nPartId, KEY_MOVEDPART)
|
||||
End If
|
||||
If EgtGetInfo(Map.refTopPanelVM.SelPart.nPartId, KEY_MOVEDPART2, vtMovedPart) Then
|
||||
EgtMove(Map.refTopPanelVM.SelPart.nPartId, -vtMovedPart, GDB_RT.GLOB)
|
||||
EgtMove(Map.refTopPanelVM.SelPart.nReferenceId, vtMovedPart, GDB_RT.GLOB)
|
||||
EgtRemoveInfo(Map.refTopPanelVM.SelPart.nPartId, KEY_MOVEDPART2)
|
||||
End If
|
||||
Dim b3PrintSolid As New BBox3d
|
||||
EgtGetBBoxGlob(Map.refTopPanelVM.SelPart.nPartId, GDB_BB.STANDARD, b3PrintSolid)
|
||||
|
||||
@@ -59,7 +59,10 @@ Public Class Machining
|
||||
EXTRA_SHELL = 2
|
||||
INFILL = 3
|
||||
AUX_SOLID = 4
|
||||
RIB = 5
|
||||
RIB_UNBOUNDED = 5
|
||||
RIB_EXTERNAL = 6
|
||||
RIB_INTERNAL = 7
|
||||
RIB_SUPPORT = 8
|
||||
End Enum
|
||||
|
||||
Protected m_CathegoryList As New ObservableCollection(Of MachiningCathegory)
|
||||
@@ -1277,6 +1280,8 @@ End Class
|
||||
Public Class OrderedMachiningParam
|
||||
Inherits MachiningParam
|
||||
|
||||
Protected m_StandardValueOrderList As List(Of Integer)
|
||||
|
||||
Protected m_ValueList As ObservableCollection(Of IdNameStruct)
|
||||
Public ReadOnly Property ValueList As ObservableCollection(Of IdNameStruct)
|
||||
Get
|
||||
@@ -1312,48 +1317,44 @@ Public Class OrderedMachiningParam
|
||||
Set(value As String)
|
||||
Select Case Type
|
||||
Case Params.PRINT_ORDER
|
||||
Dim StandardValueList() As String = {Machining.MPAR_PRINT_ORDER.SHELL,
|
||||
Machining.MPAR_PRINT_ORDER.EXTRA_SHELL,
|
||||
Machining.MPAR_PRINT_ORDER.INFILL,
|
||||
Machining.MPAR_PRINT_ORDER.AUX_SOLID,
|
||||
Machining.MPAR_PRINT_ORDER.RIB}
|
||||
Dim StringValueList() As String = StandardValueList
|
||||
If value.Length = 9 Then
|
||||
Dim StringValueList() As String
|
||||
Dim IntegerValueList As New List(Of Integer)
|
||||
If value.Length = 15 Then
|
||||
StringValueList = value.Split(","c)
|
||||
For Each StringValue In StringValueList
|
||||
Dim IntegerValue As Integer = 0
|
||||
If Integer.TryParse(StringValue, IntegerValue) Then
|
||||
IntegerValueList.Add(IntegerValue)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If StringValueList.Count <> 5 Then
|
||||
StringValueList = StandardValueList
|
||||
If IntegerValueList.Count <> 8 Then
|
||||
IntegerValueList = m_StandardValueOrderList
|
||||
End If
|
||||
If Not StringValueList.Contains(Machining.MPAR_PRINT_ORDER.SHELL) OrElse
|
||||
Not StringValueList.Contains(Machining.MPAR_PRINT_ORDER.EXTRA_SHELL) OrElse
|
||||
Not StringValueList.Contains(Machining.MPAR_PRINT_ORDER.INFILL) OrElse
|
||||
Not StringValueList.Contains(Machining.MPAR_PRINT_ORDER.AUX_SOLID) OrElse
|
||||
Not StringValueList.Contains(Machining.MPAR_PRINT_ORDER.RIB) Then
|
||||
StringValueList = StandardValueList
|
||||
If Not IntegerValueList.Contains(Machining.MPAR_PRINT_ORDER.SHELL) OrElse
|
||||
Not IntegerValueList.Contains(Machining.MPAR_PRINT_ORDER.EXTRA_SHELL) OrElse
|
||||
Not IntegerValueList.Contains(Machining.MPAR_PRINT_ORDER.INFILL) OrElse
|
||||
Not IntegerValueList.Contains(Machining.MPAR_PRINT_ORDER.AUX_SOLID) OrElse
|
||||
Not IntegerValueList.Contains(Machining.MPAR_PRINT_ORDER.RIB_UNBOUNDED) OrElse
|
||||
Not IntegerValueList.Contains(Machining.MPAR_PRINT_ORDER.RIB_EXTERNAL) OrElse
|
||||
Not IntegerValueList.Contains(Machining.MPAR_PRINT_ORDER.RIB_INTERNAL) OrElse
|
||||
Not IntegerValueList.Contains(Machining.MPAR_PRINT_ORDER.RIB_SUPPORT) Then
|
||||
IntegerValueList = m_StandardValueOrderList
|
||||
End If
|
||||
m_ValueList.Clear()
|
||||
For Each StringValue In StringValueList
|
||||
Dim nValue As Integer = -1
|
||||
Integer.TryParse(StringValue, nValue)
|
||||
Dim ItemList As IdNameStruct
|
||||
Select Case nValue
|
||||
Case Machining.MPAR_PRINT_ORDER.SHELL
|
||||
ItemList = New IdNameStruct(Machining.MPAR_PRINT_ORDER.SHELL, "Shell")
|
||||
Case Machining.MPAR_PRINT_ORDER.EXTRA_SHELL
|
||||
ItemList = New IdNameStruct(Machining.MPAR_PRINT_ORDER.EXTRA_SHELL, "Extra Shell")
|
||||
Case Machining.MPAR_PRINT_ORDER.INFILL
|
||||
ItemList = New IdNameStruct(Machining.MPAR_PRINT_ORDER.INFILL, "Infill")
|
||||
Case Machining.MPAR_PRINT_ORDER.AUX_SOLID
|
||||
ItemList = New IdNameStruct(Machining.MPAR_PRINT_ORDER.AUX_SOLID, "Filled Solids")
|
||||
Case Machining.MPAR_PRINT_ORDER.RIB
|
||||
ItemList = New IdNameStruct(Machining.MPAR_PRINT_ORDER.RIB, "Ribs")
|
||||
End Select
|
||||
m_ValueList.Add(ItemList)
|
||||
Next
|
||||
OrderByReference(m_ValueList, IntegerValueList)
|
||||
End Select
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Shared Sub OrderByReference(collection As ObservableCollection(Of IdNameStruct), comparison As List(Of Integer))
|
||||
For i As Integer = 0 To comparison.Count - 1
|
||||
Dim Index As Integer = i
|
||||
If Not comparison.ElementAt(i).Equals(collection.ElementAt(i)) Then
|
||||
collection.Move(collection.IndexOf(collection.FirstOrDefault(Function(x) x.Id = comparison(Index))), i)
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property bIsModified As Boolean
|
||||
Get
|
||||
Return Value <> m_OrigValue
|
||||
@@ -1372,12 +1373,45 @@ Public Class OrderedMachiningParam
|
||||
Sub New(Type As Params, nIndex As Integer)
|
||||
MyBase.New(Type)
|
||||
If nIndex = 0 Then
|
||||
m_ValueList = New ObservableCollection(Of IdNameStruct)
|
||||
m_SelValue = Nothing
|
||||
Select Case Type
|
||||
Case Params.PRINT_ORDER
|
||||
m_StandardValueOrderList = New List(Of Integer)({Machining.MPAR_PRINT_ORDER.SHELL,
|
||||
Machining.MPAR_PRINT_ORDER.EXTRA_SHELL,
|
||||
Machining.MPAR_PRINT_ORDER.INFILL,
|
||||
Machining.MPAR_PRINT_ORDER.AUX_SOLID,
|
||||
Machining.MPAR_PRINT_ORDER.RIB_UNBOUNDED,
|
||||
Machining.MPAR_PRINT_ORDER.RIB_EXTERNAL,
|
||||
Machining.MPAR_PRINT_ORDER.RIB_INTERNAL,
|
||||
Machining.MPAR_PRINT_ORDER.RIB_SUPPORT})
|
||||
m_ValueList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_PRINT_ORDER.SHELL, "Shell"),
|
||||
New IdNameStruct(Machining.MPAR_PRINT_ORDER.EXTRA_SHELL, "Extra Shells"),
|
||||
New IdNameStruct(Machining.MPAR_PRINT_ORDER.INFILL, "Infills"),
|
||||
New IdNameStruct(Machining.MPAR_PRINT_ORDER.AUX_SOLID, "Filled Solids"),
|
||||
New IdNameStruct(Machining.MPAR_PRINT_ORDER.RIB_UNBOUNDED, "Unbounded Ribs"),
|
||||
New IdNameStruct(Machining.MPAR_PRINT_ORDER.RIB_EXTERNAL, "External Ribs"),
|
||||
New IdNameStruct(Machining.MPAR_PRINT_ORDER.RIB_INTERNAL, "Internal Ribs"),
|
||||
New IdNameStruct(Machining.MPAR_PRINT_ORDER.RIB_SUPPORT, "Support Ribs")})
|
||||
m_SelValue = Nothing
|
||||
End Select
|
||||
Else
|
||||
Select Case Type
|
||||
Case Params.PRINT_ORDER
|
||||
m_ValueList = New ObservableCollection(Of IdNameStruct)
|
||||
m_StandardValueOrderList = New List(Of Integer)({Machining.MPAR_PRINT_ORDER.SHELL,
|
||||
Machining.MPAR_PRINT_ORDER.EXTRA_SHELL,
|
||||
Machining.MPAR_PRINT_ORDER.INFILL,
|
||||
Machining.MPAR_PRINT_ORDER.AUX_SOLID,
|
||||
Machining.MPAR_PRINT_ORDER.RIB_UNBOUNDED,
|
||||
Machining.MPAR_PRINT_ORDER.RIB_EXTERNAL,
|
||||
Machining.MPAR_PRINT_ORDER.RIB_INTERNAL,
|
||||
Machining.MPAR_PRINT_ORDER.RIB_SUPPORT})
|
||||
m_ValueList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_PRINT_ORDER.SHELL, "Shell"),
|
||||
New IdNameStruct(Machining.MPAR_PRINT_ORDER.EXTRA_SHELL, "Extra Shells"),
|
||||
New IdNameStruct(Machining.MPAR_PRINT_ORDER.INFILL, "Infills"),
|
||||
New IdNameStruct(Machining.MPAR_PRINT_ORDER.AUX_SOLID, "Filled Solids"),
|
||||
New IdNameStruct(Machining.MPAR_PRINT_ORDER.RIB_UNBOUNDED, "Unbounded Ribs"),
|
||||
New IdNameStruct(Machining.MPAR_PRINT_ORDER.RIB_EXTERNAL, "External Ribs"),
|
||||
New IdNameStruct(Machining.MPAR_PRINT_ORDER.RIB_INTERNAL, "Internal Ribs"),
|
||||
New IdNameStruct(Machining.MPAR_PRINT_ORDER.RIB_SUPPORT, "Support Ribs")})
|
||||
ReadMachiningParamString(nIndex, MAC_PRINTORDER, "", Value)
|
||||
End Select
|
||||
End If
|
||||
@@ -1465,9 +1499,9 @@ Public Class OrderedMachiningParam
|
||||
|
||||
Public Sub ResetOrder()
|
||||
Dim CurrValue As String = Value
|
||||
OrderByReference(m_ValueList, m_StandardValueOrderList)
|
||||
m_ValueList = New ObservableCollection(Of IdNameStruct)(m_ValueList.OrderBy(Function(x) x.Id))
|
||||
If Value <> CurrValue Then
|
||||
SelValue = Nothing
|
||||
NotifyPropertyChanged(NameOf(ValueList))
|
||||
NotifyPropertyChanged(NameOf(Value))
|
||||
NotifyPropertyChanged(NameOf(SelValue))
|
||||
|
||||
@@ -359,15 +359,17 @@ Public Class ManagePartPanelVM
|
||||
nRibsLayerId = EgtCreateGroup(nPartId)
|
||||
EgtSetName(nRibsLayerId, LAY_RIBS)
|
||||
EgtSetColor(nRibsLayerId, GeomEntityColors.c3Rib)
|
||||
Dim nRibsIndex As Integer = 1
|
||||
For Each PartManager_GeomEntity In ManagePart_Layer.EntityList
|
||||
EgtSetInfo(PartManager_GeomEntity.nId, KEY_RIB_TYPE, RibEntity.RibTypes.FROMIMPORT)
|
||||
EgtSetInfo(PartManager_GeomEntity.nId, RIB_ID, RibPanelVM.GetNextRibIndex())
|
||||
EgtSetInfo(PartManager_GeomEntity.nId, RIB_ID, nRibsIndex)
|
||||
EgtRelocateGlob(PartManager_GeomEntity.nId, nRibsLayerId, GDB_POS.LAST_SON)
|
||||
' elimino colore entita'
|
||||
EgtResetColor(PartManager_GeomEntity.nId)
|
||||
If PartManager_GeomEntity.sName <> PartManager_GeomEntity.nId.ToString() Then
|
||||
EgtSetInfo(PartManager_GeomEntity.nId, ENTITY_NAME, PartManager_GeomEntity.sName)
|
||||
End If
|
||||
nRibsIndex += 1
|
||||
Next
|
||||
Case ManagePart_Layer.LayerType.SHELL_NUMBER
|
||||
nShellNumberLayerId = EgtCreateGroup(nPartId)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Windows.Forms.VisualStyles.VisualStyleElement
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -375,10 +376,11 @@ Public Class ManagePart_Layer
|
||||
|
||||
Public Enum LayerType As Integer
|
||||
PRINT_SOLID = 1
|
||||
MACH_START = 2
|
||||
RIBS = 3
|
||||
SHELL_NUMBER = 4
|
||||
AUX_SOLIDS = 5
|
||||
'REFERENCE = 2
|
||||
MACH_START = 3
|
||||
RIBS = 4
|
||||
SHELL_NUMBER = 5
|
||||
AUX_SOLIDS = 6
|
||||
OTHERS = 7
|
||||
CHANGENAME = 15
|
||||
DELETE = 16
|
||||
@@ -639,7 +641,7 @@ Public Class GeomEntity_MenuItem
|
||||
End If
|
||||
' se e' presente elimino flag di spostamento a 45 gradi
|
||||
Dim nPartId As Integer = EgtGetParent(EgtGetParent(m_OrigEntity.nId))
|
||||
EgtRemoveInfo(nPartId, "MovedPart")
|
||||
EgtRemoveInfo(nPartId, KEY_MOVEDPART)
|
||||
EgtDraw()
|
||||
' aggiorno riferimenti nel context menu item
|
||||
Map.refManagePartPanelVM.UpdateAllEntityContextMenu()
|
||||
@@ -666,6 +668,8 @@ Public Class GeomEntity_MenuItem
|
||||
NewLayer.EntityList.Add(m_OrigEntity)
|
||||
' aggiorno riferimenti nell'entita'
|
||||
m_OrigEntity.UpdateOrigLayer(NewLayer)
|
||||
' aggiorno colore
|
||||
EgtSetColor(m_OrigEntity.nId, GetColor(LayerType.PRINTPART))
|
||||
End If
|
||||
End If
|
||||
' aggiorno i contextmenu di tutti gli entity
|
||||
@@ -737,9 +741,10 @@ Public Class GeomEntity_MenuItem
|
||||
' Imposto flag di ricalcolo slice
|
||||
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
|
||||
End Select
|
||||
'' aggiorno visibilita' da check di categoria
|
||||
'Dim PrintLayer As ViewLayer = Map.refViewLayerManagerVM.LayerList.FirstOrDefault(Function(x) x.Type = ViewLayer.ViewLayerType.PRINT_SOLID)
|
||||
'EgtSetStatus(m_OrigEntity.nId, If(IsNothing(PrintLayer.bIsVisible) OrElse PrintLayer.bIsVisible, GDB_ST.ON_, GDB_ST.OFF))
|
||||
' aggiorno visibilita' da check di categoria
|
||||
Dim PrintViewlayer As ViewLayer = Map.refViewLayerManagerVM.LayerList.FirstOrDefault(Function(x) x.Type = ViewLayer.ViewLayerType.PRINT_SOLID)
|
||||
EgtSetStatus(m_OrigEntity.nId, If(IsNothing(PrintViewlayer.bIsVisible) OrElse PrintViewlayer.bIsVisible, GDB_ST.ON_, GDB_ST.OFF))
|
||||
EgtDraw()
|
||||
Return
|
||||
End If
|
||||
Select Case Map.refManagePartPanelVM.Type
|
||||
@@ -759,6 +764,12 @@ Public Class GeomEntity_MenuItem
|
||||
NewLayer.EntityList.Add(m_OrigEntity)
|
||||
' aggiorno riferimenti nell'entita'
|
||||
m_OrigEntity.UpdateOrigLayer(NewLayer)
|
||||
' aggiorno colore
|
||||
EgtSetColor(m_OrigEntity.nId, GetColor(m_Type))
|
||||
' aggiorno visibilita' da check di categoria
|
||||
Dim PrintViewlayer As ViewLayer = Map.refViewLayerManagerVM.LayerList.FirstOrDefault(Function(x) x.Type = m_Type)
|
||||
EgtSetStatus(m_OrigEntity.nId, If(IsNothing(PrintViewlayer.bIsVisible) OrElse PrintViewlayer.bIsVisible, GDB_ST.ON_, GDB_ST.OFF))
|
||||
EgtDraw()
|
||||
End If
|
||||
End If
|
||||
' aggiorno riferimenti nel context menu item
|
||||
@@ -786,14 +797,14 @@ Public Class GeomEntity_MenuItem
|
||||
' elimino info vecchio layer
|
||||
Select Case m_OrigEntity.OrigLayer.Type
|
||||
Case ManagePart_Layer.LayerType.PRINT_SOLID
|
||||
EgtResetMark(m_OrigEntity.nId)
|
||||
'EgtResetMark(m_OrigEntity.nId)
|
||||
' se e' presente flag di spostamento a 45 gradi
|
||||
Dim nPartId As Integer = EgtGetParent(EgtGetParent(m_OrigEntity.nId))
|
||||
Dim vtMoved As Vector3d
|
||||
If EgtGetInfo(nPartId, "MovedPart", vtMoved) Then
|
||||
If EgtGetInfo(nPartId, KEY_MOVEDPART, vtMoved) Then
|
||||
' lo sposto e rimuovo info
|
||||
EgtMove(m_OrigEntity.nId, -vtMoved, GDB_RT.GLOB)
|
||||
EgtRemoveInfo(nPartId, "MovedPart")
|
||||
EgtRemoveInfo(nPartId, KEY_MOVEDPART)
|
||||
End If
|
||||
Case ManagePart_Layer.LayerType.MACH_START
|
||||
Case ManagePart_Layer.LayerType.RIBS
|
||||
@@ -825,7 +836,7 @@ Public Class GeomEntity_MenuItem
|
||||
EgtSetName(m_OrigEntity.nId, PRINT_SOLID)
|
||||
EgtSetColor(m_OrigEntity.nId, c3Print)
|
||||
' rimuovo eventuale nota spostamento per 45 gradi
|
||||
EgtRemoveInfo(m_OrigEntity.OrigLayer.OrigPart.nId, "MovedPart")
|
||||
EgtRemoveInfo(m_OrigEntity.OrigLayer.OrigPart.nId, KEY_MOVEDPART)
|
||||
Case ManagePart_Layer.LayerType.MACH_START
|
||||
EgtSetName(m_OrigEntity.nId, LAY_MACH_START)
|
||||
EgtSetColor(m_OrigEntity.nId, c3MachStart)
|
||||
@@ -930,7 +941,8 @@ Public Class ManagerPart_MenuItem
|
||||
Select Case Map.refManagePartPanelVM.Type
|
||||
Case ManagePartPanelVM.ManagePartType.IMPORT
|
||||
For Each Layer In m_OrigPart.LayerList
|
||||
For Each Entity In Layer.EntityList
|
||||
For EntityIndex = Layer.EntityList.Count - 1 To 0 Step -1
|
||||
Dim Entity As PartManager_GeomEntity = Layer.EntityList(EntityIndex)
|
||||
' le rimuovo da lista entita' pezzo
|
||||
Layer.EntityList.Remove(Entity)
|
||||
' la rimetto in lista importati
|
||||
@@ -953,7 +965,9 @@ Public Class ManagerPart_MenuItem
|
||||
' aggiorno riferimenti nel context menu item
|
||||
Map.refManagePartPanelVM.UpdateAllEntityContextMenu()
|
||||
' Imposto flag di ricalcolo slice
|
||||
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
|
||||
If Not IsNothing(Map.refTopPanelVM.SelPart) Then ' in prima importazione non c'e' alcun pezzo selezionato
|
||||
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
|
||||
End If
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -70,5 +70,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.5.2.1")>
|
||||
<Assembly: AssemblyFileVersion("2.5.2.1")>
|
||||
<Assembly: AssemblyVersion("2.5.2.2")>
|
||||
<Assembly: AssemblyFileVersion("2.5.2.2")>
|
||||
|
||||
@@ -1162,11 +1162,12 @@ Public Class LayerColor
|
||||
|
||||
Public Enum LayerType As Integer
|
||||
PRINTPART = 1
|
||||
RIBS = 2
|
||||
SHELLNUMBERS = 3
|
||||
AUXSOLIDS = 4
|
||||
MACHSTART = 5
|
||||
OTHERS = 6
|
||||
'REFERENCE = 2
|
||||
MACHSTART = 3
|
||||
RIBS = 4
|
||||
SHELLNUMBERS = 5
|
||||
AUXSOLIDS = 6
|
||||
OTHERS = 7
|
||||
End Enum
|
||||
|
||||
Private m_Type As LayerType
|
||||
|
||||
@@ -110,8 +110,11 @@ Public Class ReferencePanelVM
|
||||
ptOrig += b3ToBePrintSolid.DimY() / 2 * Vector3d.Y_AX + b3ToBePrintSolid.DimX() / 2 * Vector3d.X_AX
|
||||
End Select
|
||||
Dim vtMovedPart As Vector3d
|
||||
EgtGetInfo(SelPart.nPartId, "MovedPart", vtMovedPart)
|
||||
ptOrig = ptOrig - vtMovedPart
|
||||
If EgtGetInfo(SelPart.nPartId, KEY_MOVEDPART, vtMovedPart) Then
|
||||
ptOrig = ptOrig - vtMovedPart
|
||||
ElseIf EgtGetInfo(SelPart.nPartId, KEY_MOVEDPART2, vtMovedPart) Then
|
||||
ptOrig = ptOrig - vtMovedPart
|
||||
End If
|
||||
frPrintSolid = New Frame3d(ptOrig)
|
||||
End If
|
||||
Dim nFrameId As Integer = EgtCreateGeoFrame(SelPart.nReferenceLayerId, frPrintSolid, GDB_RT.GLOB)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
Title="{Binding sTitle}" Icon="/Resources/Icarus.ico"
|
||||
WindowStyle="None" ResizeMode="NoResize" IsClosable="False"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
SizeToContent="WidthAndHeight">
|
||||
<Grid Margin="5">
|
||||
<Grid.RowDefinitions>
|
||||
|
||||
@@ -454,7 +454,7 @@ Public Class MySceneHostVM
|
||||
Map.refReferencePanelVM.UpdateFramePosition()
|
||||
Map.refDispositionPanelVM.UpdateZPos()
|
||||
' elimino eventuale flag di spostamento a 45 gradi
|
||||
EgtRemoveInfo(MenuItem.OrigLayer.OrigPart.PrintPart.nPartId, "MovedPart")
|
||||
EgtRemoveInfo(MenuItem.OrigLayer.OrigPart.PrintPart.nPartId, KEY_MOVEDPART)
|
||||
' elimino vecchio elemento ed aggiungo nuovo
|
||||
MenuItem.OrigLayer.EntityList.Clear()
|
||||
MenuItem.OrigLayer.EntityList.Add(New PartManager_GeomEntity(MenuItem.OrigLayer, nNewEntityId))
|
||||
|
||||
@@ -166,14 +166,14 @@ Public Class TopPanelVM
|
||||
End Get
|
||||
Set(value As Print3dPartVM)
|
||||
If Not IsNothing(m_SelPart) Then
|
||||
' deseleziono eventuale pezzo precedente
|
||||
EgtResetMark(m_SelPart.nPrintSolidId)
|
||||
'' deseleziono eventuale pezzo precedente
|
||||
'EgtResetMark(m_SelPart.nPrintSolidId)
|
||||
End If
|
||||
m_SelPart = value
|
||||
If Not IsNothing(value) Then
|
||||
' Eseguo la selezione
|
||||
EgtDeselectAll()
|
||||
EgtSetMark(m_SelPart.nPrintSolidId)
|
||||
' EgtSetMark(m_SelPart.nPrintSolidId)
|
||||
EgtDraw()
|
||||
' imposto lavorazione e materiale del pezzo selezionato
|
||||
Map.refCurrMachiningPanelVM.ReadMachParamFromSelPart()
|
||||
@@ -553,10 +553,10 @@ Public Class TopPanelVM
|
||||
Map.refSliderManagerVM.SetLayerIndexIsEnabled(False)
|
||||
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(False)
|
||||
Map.refInstrumentPanelVM.SetEdgeAnalysisIsEnabled(False)
|
||||
' tolgo mark da pezzo selezionato
|
||||
If Not IsNothing(SelPart) Then
|
||||
EgtResetMark(SelPart.nPrintSolidId)
|
||||
End If
|
||||
'' tolgo mark da pezzo selezionato
|
||||
'If Not IsNothing(SelPart) Then
|
||||
' EgtResetMark(SelPart.nPrintSolidId)
|
||||
'End If
|
||||
' imposto pagina
|
||||
Map.refLeftPanelVM.SetSelPanel(LeftPanelVM.Panels.MODIFYPART)
|
||||
End Sub
|
||||
@@ -569,10 +569,10 @@ Public Class TopPanelVM
|
||||
Map.refSliderManagerVM.SetLayerIndexIsEnabled(True)
|
||||
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(True)
|
||||
Map.refInstrumentPanelVM.SetEdgeAnalysisIsEnabled(True)
|
||||
' ripristino mark su pezzo selezionato
|
||||
If Not IsNothing(SelPart) Then
|
||||
EgtSetMark(SelPart.nPrintSolidId)
|
||||
End If
|
||||
'' ripristino mark su pezzo selezionato
|
||||
'If Not IsNothing(SelPart) Then
|
||||
' EgtSetMark(SelPart.nPrintSolidId)
|
||||
'End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
@@ -5,11 +5,12 @@ Module GeomEntityColors
|
||||
|
||||
Public Enum LayerType As Integer
|
||||
PRINTPART = 1
|
||||
RIBS = 2
|
||||
SHELLNUMBERS = 3
|
||||
AUXSOLIDS = 4
|
||||
MACHSTART = 5
|
||||
OTHERS = 6
|
||||
'REFERENCE = 2
|
||||
MACHSTART = 3
|
||||
RIBS = 4
|
||||
SHELLNUMBERS = 5
|
||||
AUXSOLIDS = 6
|
||||
OTHERS = 7
|
||||
ALL = 10
|
||||
End Enum
|
||||
|
||||
@@ -124,6 +125,23 @@ Module GeomEntityColors
|
||||
WritePrivateProfileColor(S_COLORS, sIniKey, c3Temp)
|
||||
UpdateColors(Type)
|
||||
End Sub
|
||||
Friend Function GetColor(Type As LayerType) As Color3d
|
||||
Dim sIniKey As String = ""
|
||||
Select Case Type
|
||||
Case LayerType.PRINTPART
|
||||
Return c3Print
|
||||
Case LayerType.RIBS
|
||||
Return c3Rib
|
||||
Case LayerType.SHELLNUMBERS
|
||||
Return c3ShellNumber
|
||||
Case LayerType.AUXSOLIDS
|
||||
Return c3AuxSolids
|
||||
Case LayerType.MACHSTART
|
||||
Return c3MachStart
|
||||
Case LayerType.OTHERS
|
||||
Return c3Others
|
||||
End Select
|
||||
End Function
|
||||
Friend Sub SetAlpha(Type As LayerType, dAlpha As Double)
|
||||
Dim c3Temp As Color3d = c3Print
|
||||
Dim sIniKey As String = ""
|
||||
@@ -222,12 +240,21 @@ Module GeomEntityColors
|
||||
End While
|
||||
EgtSetColor(nOthersLayerId, GeomEntityColors.c3Others)
|
||||
End If
|
||||
|
||||
' Ripristino stato segnalazione modifica
|
||||
DisableMgr.ReEnable()
|
||||
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
' se in import, aggiorno anche i pezzi di import
|
||||
If Map.refTopPanelVM.SelPage = Pages.IMPORT Then
|
||||
For Each ImportPart In Map.refManagePartPanelVM.ManagerPartList
|
||||
Dim Layer As ManagePart_Layer = ImportPart.LayerList.FirstOrDefault(Function(x) x.Type = Type)
|
||||
If Not IsNothing(Layer) Then
|
||||
For Each Entity In Layer.EntityList
|
||||
EgtSetColor(Entity.nId, GetColor(Type))
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -95,9 +95,9 @@ Public Class ViewLayer
|
||||
RIBS = 4
|
||||
SHELL_NUMBER = 5
|
||||
AUX_SOLIDS = 6
|
||||
SOLID_SLICE = 7
|
||||
SLICE_TOOLPATH = 8
|
||||
OTHERS = 9
|
||||
OTHERS = 7
|
||||
SOLID_SLICE = 8
|
||||
SLICE_TOOLPATH = 9
|
||||
End Enum
|
||||
|
||||
Private m_Type As ViewLayerType
|
||||
@@ -229,23 +229,23 @@ Public Class ViewLayer
|
||||
EgtSetStatus(CurrPart.nOthersLayerId, Status)
|
||||
End Select
|
||||
Next
|
||||
'' se sono in importazione, dis/attivo anche queste superfici
|
||||
'If Map.refTopPanelVM.SelPage = Pages.IMPORT Then
|
||||
' For Each CurrPart In Map.refManagePartPanelVM.ManagerPartList
|
||||
' For Each Layer In CurrPart.LayerList
|
||||
' If (Layer.Type = ManagePart_Layer.LayerType.PRINT_SOLID AndAlso m_Type = ViewLayerType.PRINT_SOLID) OrElse
|
||||
' (Layer.Type = ManagePart_Layer.LayerType.MACH_START AndAlso m_Type = ViewLayerType.START_MACHINING) OrElse
|
||||
' (Layer.Type = ManagePart_Layer.LayerType.RIBS AndAlso m_Type = ViewLayerType.RIBS) OrElse
|
||||
' (Layer.Type = ManagePart_Layer.LayerType.SHELL_NUMBER AndAlso m_Type = ViewLayerType.SHELL_NUMBER) OrElse
|
||||
' (Layer.Type = ManagePart_Layer.LayerType.AUX_SOLIDS AndAlso m_Type = ViewLayerType.AUX_SOLIDS) OrElse
|
||||
' (Layer.Type = ManagePart_Layer.LayerType.OTHERS AndAlso m_Type = ViewLayerType.OTHERS) Then
|
||||
' For Each Entity In Layer.EntityList
|
||||
' EgtSetStatus(Entity.nId, Status)
|
||||
' Next
|
||||
' End If
|
||||
' Next
|
||||
' Next
|
||||
'End If
|
||||
' se sono in importazione, dis/attivo anche queste superfici
|
||||
If Map.refTopPanelVM.SelPage = Pages.IMPORT Then
|
||||
For Each CurrPart In Map.refManagePartPanelVM.ManagerPartList
|
||||
For Each Layer In CurrPart.LayerList
|
||||
If (Layer.Type = ManagePart_Layer.LayerType.PRINT_SOLID AndAlso m_Type = ViewLayerType.PRINT_SOLID) OrElse
|
||||
(Layer.Type = ManagePart_Layer.LayerType.MACH_START AndAlso m_Type = ViewLayerType.START_MACHINING) OrElse
|
||||
(Layer.Type = ManagePart_Layer.LayerType.RIBS AndAlso m_Type = ViewLayerType.RIBS) OrElse
|
||||
(Layer.Type = ManagePart_Layer.LayerType.SHELL_NUMBER AndAlso m_Type = ViewLayerType.SHELL_NUMBER) OrElse
|
||||
(Layer.Type = ManagePart_Layer.LayerType.AUX_SOLIDS AndAlso m_Type = ViewLayerType.AUX_SOLIDS) OrElse
|
||||
(Layer.Type = ManagePart_Layer.LayerType.OTHERS AndAlso m_Type = ViewLayerType.OTHERS) Then
|
||||
For Each Entity In Layer.EntityList
|
||||
EgtSetStatus(Entity.nId, Status)
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
End If
|
||||
' Ripristino stato segnalazione modifica
|
||||
DisableMgr.ReEnable()
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user