- correzioni e miglioramenti
- aggiunto creazione e rimozione pezzi su tasto destro
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
Public Const TABLE = "Table"
|
||||
Public Const TABLE_OUTLINE = "TableOutline"
|
||||
Public Const PART = "Part"
|
||||
Public Const ORIGINAL_SOLID = "OriginalSolid"
|
||||
Public Const PRINT_SOLID = "PrintSolid"
|
||||
Public Const LAY_MACH_START = "MachStart"
|
||||
Public Const LAY_REFERENCE = "Frame"
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
xmlns:local="clr-namespace:Icarus"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
Width="150"
|
||||
Margin="5,0,0,0">
|
||||
Margin="5,0,0,0"
|
||||
VerticalAlignment="Stretch">
|
||||
<Grid DockPanel.Dock="Left">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
@@ -19,9 +20,8 @@
|
||||
FontWeight="DemiBold"
|
||||
FontSize="14"/>
|
||||
</Border>
|
||||
<DockPanel Grid.Row="1"
|
||||
IsEnabled="{Binding IsEnabled}"
|
||||
Visibility="{Binding IsImport_Visibility}">
|
||||
<!--<UniformGrid Grid.Row="1" Rows="1"
|
||||
IsEnabled="{Binding IsEnabled}">
|
||||
<Button DockPanel.Dock="Left"
|
||||
Content="+"
|
||||
FontSize="20"
|
||||
@@ -32,7 +32,7 @@
|
||||
FontSize="20"
|
||||
Command="{Binding RemovePart_Command}"
|
||||
Style="{StaticResource LeftPanel_Button}"/>
|
||||
</DockPanel>
|
||||
</UniformGrid>-->
|
||||
<TreeView Grid.Row="2"
|
||||
ItemsSource="{Binding ManagerPartList}"
|
||||
MinHeight="200"
|
||||
|
||||
@@ -244,15 +244,15 @@ Public Class ManagePartPanelVM
|
||||
End Property
|
||||
|
||||
Public Sub RemovePart()
|
||||
If IsNothing(SelManagerLayer) Then
|
||||
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)
|
||||
'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
|
||||
|
||||
@@ -300,7 +300,6 @@ Public Class ManagePartPanelVM
|
||||
Dim b3PrintSolid As New BBox3d
|
||||
Dim nPrintPartLayerId As Integer = GDB_ID.NULL
|
||||
Dim PrintSolidEntity As PartManager_GeomEntity = Nothing
|
||||
Dim nOriginalPartLayerId As Integer = GDB_ID.NULL
|
||||
Dim nRibsLayerId As Integer = GDB_ID.NULL
|
||||
Dim nShellNumberLayerId As Integer = GDB_ID.NULL
|
||||
Dim nAuxSolidsLayerId As Integer = GDB_ID.NULL
|
||||
@@ -352,9 +351,7 @@ Public Class ManagePartPanelVM
|
||||
nMachStartId = EgtCreateGeoPoint(nMachStartLayerId, ptStart, GDB_RT.GLOB)
|
||||
EgtSetName(nMachStartId, START_GEOM)
|
||||
' coloro l'entita' di rosso
|
||||
Dim c3Red As Color3d
|
||||
c3Red.FromColor(System.Drawing.Color.Red)
|
||||
EgtSetColor(nMachStartId, c3Red)
|
||||
EgtSetColor(nMachStartId, GeomEntityColors.c3MachStart)
|
||||
End If
|
||||
Case ManagePart_Layer.LayerType.RIBS
|
||||
nRibsLayerId = EgtCreateGroup(nPartId)
|
||||
@@ -449,7 +446,7 @@ Public Class ManagePartPanelVM
|
||||
EgtSetInfo(nPartId, FILE_PATH, sFilePath)
|
||||
EgtSetInfo(nPartId, PART_NAME, ManagePart_Part.sName)
|
||||
EgtSetInfo(nPartId, "PartOnTable", 1)
|
||||
Dim NewPart As New Print3dPartVM(nPartId, nPrintPartLayerId, 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)
|
||||
Next
|
||||
End If
|
||||
|
||||
@@ -143,12 +143,14 @@ Public Class PartManager_GeomEntity
|
||||
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))
|
||||
m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.NEWPART))
|
||||
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))
|
||||
m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.NEWPART))
|
||||
End If
|
||||
End Select
|
||||
Next
|
||||
@@ -177,12 +179,14 @@ Public Class PartManager_GeomEntity
|
||||
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))
|
||||
m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.NEWPART))
|
||||
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))
|
||||
m_MenuList.Add(New GeomEntity_MenuItem(Me, ManagePart_Layer.LayerType.NEWPART))
|
||||
End If
|
||||
End Select
|
||||
Next
|
||||
@@ -349,8 +353,9 @@ Public Class ManagePart_Part
|
||||
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
|
||||
m_MenuList.Add(New ManagerPart_MenuItem(Me))
|
||||
' 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)
|
||||
@@ -375,6 +380,7 @@ Public Class ManagePart_Layer
|
||||
OTHERS = 7
|
||||
CHANGENAME = 15
|
||||
DELETE = 16
|
||||
NEWPART = 17
|
||||
End Enum
|
||||
|
||||
' enita' di origine
|
||||
@@ -534,10 +540,12 @@ Public Class GeomEntity_MenuItem
|
||||
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"
|
||||
Return "Delete Entity"
|
||||
End Select
|
||||
Dim PartName As String = ""
|
||||
If Map.refManagePartPanelVM.ManagerPartList.Count > 1 Then
|
||||
@@ -606,6 +614,87 @@ Public Class GeomEntity_MenuItem
|
||||
EgtDraw()
|
||||
End If
|
||||
Return
|
||||
ElseIf m_Type = ManagePart_Layer.LayerType.NEWPART Then
|
||||
Select Case Map.refManagePartPanelVM.Type
|
||||
Case ManagePartPanelVM.ManagePartType.IMPORT
|
||||
Map.refManagePartPanelVM.AddPart()
|
||||
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
|
||||
@@ -715,19 +804,41 @@ 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
|
||||
Return "Change Name"
|
||||
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)
|
||||
Sub New(OrigPart As ManagePart_Part, Type As PartMenuCmd)
|
||||
m_OrigPart = OrigPart
|
||||
m_Type = Type
|
||||
End Sub
|
||||
|
||||
#Region "Cancel"
|
||||
@@ -742,14 +853,36 @@ Public Class ManagerPart_MenuItem
|
||||
End Property
|
||||
|
||||
Public Sub Command()
|
||||
Select Case Map.refManagePartPanelVM.Type
|
||||
Case ManagePartPanelVM.ManagePartType.IMPORT
|
||||
|
||||
Case ManagePartPanelVM.ManagePartType.MODIFY
|
||||
|
||||
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
|
||||
End Select
|
||||
m_OrigPart.SetTextBoxVisibility(True)
|
||||
Map.refManagePartPanelVM.SetIsEnabled(True)
|
||||
End Sub
|
||||
|
||||
#End Region ' Cancel
|
||||
|
||||
@@ -164,6 +164,7 @@ Public Class ProjManagerVM
|
||||
Friend Sub NewProject(bDialog As Boolean)
|
||||
' Gestisco eventuale file corrente modificato
|
||||
If Not Map.refSceneHostVM.MainController.ManageModified() Then Return
|
||||
EgtResetModified()
|
||||
Dim NewProjMachine As Machine
|
||||
If bDialog AndAlso Map.refMachinePanelVM.MachineList.Count > 0 Then
|
||||
Dim ChooseMachineWndVM As New ChooseMachineWndVM
|
||||
|
||||
@@ -916,7 +916,6 @@ Public Class MySceneHostVM
|
||||
End If
|
||||
Dim nPrintPartLayerId As Integer = EgtGetFirstNameInGroup(nPartId, PRINT_SOLID)
|
||||
Dim nPrintPartId As Integer = EgtGetFirstInGroup(nPrintPartLayerId)
|
||||
Dim nOriginalPartLayerId As Integer = EgtGetFirstNameInGroup(nPartId, ORIGINAL_SOLID)
|
||||
Dim nRibsLayerId As Integer = EgtGetFirstNameInGroup(nPartId, LAY_RIBS)
|
||||
Dim nShellNumberLayerId As Integer = EgtGetFirstNameInGroup(nPartId, LAY_SHELL_NBR)
|
||||
Dim nAuxSolidsLayerId As Integer = EgtGetFirstNameInGroup(nPartId, LAY_AUX_SOLIDS)
|
||||
@@ -926,7 +925,7 @@ Public Class MySceneHostVM
|
||||
EgtGetInfo(nPartId, FILE_PATH, sFilePath)
|
||||
Dim nReferenceLayerId As Integer = EgtGetFirstNameInGroup(nPartId, LAY_REFERENCE)
|
||||
Dim nFrameId As Integer = EgtGetFirstInGroup(nReferenceLayerId)
|
||||
Dim NewPart As New Print3dPartVM(nPartId, nPrintPartLayerId, 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)
|
||||
Dim bPartToRecalc As Boolean = False
|
||||
EgtGetInfo(nPartId, MAC_TORECALC_SLICE, bPartToRecalc)
|
||||
|
||||
@@ -403,15 +403,25 @@ Public Class TopPanelVM
|
||||
#Region "Pages"
|
||||
|
||||
Private Sub InitIMPORT()
|
||||
' tolgo mark a pezzo selezionato
|
||||
' EgtResetMark(SelPart.nPartId)
|
||||
' 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.refImportPanelVM.Init()
|
||||
Map.refManagePartPanelVM.Init(ManagePartPanelVM.ManagePartType.IMPORT)
|
||||
End Sub
|
||||
|
||||
Private Function ExitIMPORT()
|
||||
' rimetto mark a pezzo selezionato
|
||||
' 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
|
||||
End Function
|
||||
|
||||
@@ -523,14 +533,27 @@ Public Class TopPanelVM
|
||||
End Function
|
||||
|
||||
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)
|
||||
End Sub
|
||||
|
||||
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)
|
||||
@@ -550,8 +573,8 @@ Public Class TopPanelVM
|
||||
' rinomino pezzo e layer
|
||||
Dim nPartId As Integer = EgtGetLastPart()
|
||||
EgtSetName(nPartId, PART)
|
||||
Dim nLayerId As Integer = EgtGetFirstInGroup(nPartId)
|
||||
EgtSetName(nLayerId, ORIGINAL_SOLID)
|
||||
'Dim nLayerId As Integer = EgtGetFirstInGroup(nPartId)
|
||||
'EgtSetName(nLayerId, ORIGINAL_SOLID)
|
||||
|
||||
'' Recupero o creo layer ausiliario
|
||||
'Dim nAuxId As Integer = EgtGetFirstNameInGroup(nPartId, LAY_AUX)
|
||||
|
||||
@@ -25,14 +25,6 @@ Public Class Print3dPartVM
|
||||
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 Property
|
||||
|
||||
' riferimento del solido/superficie di stampa
|
||||
Private m_nReferenceLayerId As Integer = GDB_ID.NULL
|
||||
Public ReadOnly Property nReferenceLayerId As Integer
|
||||
@@ -130,11 +122,10 @@ Public Class Print3dPartVM
|
||||
m_sImportedFilePath = sImportedFilePath
|
||||
End Sub
|
||||
|
||||
Sub New(nPartId As Integer, nPrintSolidLayerId 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)
|
||||
m_nPartId = nPartId
|
||||
m_nPrintSolidLayerId = nPrintSolidLayerId
|
||||
m_nOriginalPartLayerId = nOriginalPartLayerId
|
||||
m_nReferenceLayerId = nReferenceLayerId
|
||||
m_nReferenceId = nReferenceId
|
||||
m_nMachStartLayerId = nMachStartLayerId
|
||||
|
||||
Reference in New Issue
Block a user