diff --git a/Icarus/Constants/Const3dPrint.vb b/Icarus/Constants/Const3dPrint.vb
index e72f458..d34df6b 100644
--- a/Icarus/Constants/Const3dPrint.vb
+++ b/Icarus/Constants/Const3dPrint.vb
@@ -15,6 +15,8 @@
Public Const RIB_EXTRUSION = "RibExtrusion"
Public Const RIB_CURVE = "RibCurve"
Public Const RIB_ID = "RibId"
+ Public Const SHELLNUMBER_ID = "ShellNumberId"
+ Public Const FILLEDSOLID_ID = "FilledSolidId"
Public Const VIEWPARAMS = "ViewParams"
Public Const IMPORTED_SOLID = "ImportedSolid"
Public Const RESULT_READ_PROG = "ResultReadProg"
diff --git a/Icarus/CurrMachiningPanel/CurrMachiningPanelV.xaml b/Icarus/CurrMachiningPanel/CurrMachiningPanelV.xaml
index b67e184..2eb7cec 100644
--- a/Icarus/CurrMachiningPanel/CurrMachiningPanelV.xaml
+++ b/Icarus/CurrMachiningPanel/CurrMachiningPanelV.xaml
@@ -198,10 +198,13 @@
-
+ Style="{StaticResource RightPanel_HalfRound_Button}">
+
+
diff --git a/Icarus/FilledSolidPanel/FilledSolidPanelV.xaml b/Icarus/FilledSolidPanel/FilledSolidPanelV.xaml
new file mode 100644
index 0000000..ef181f8
--- /dev/null
+++ b/Icarus/FilledSolidPanel/FilledSolidPanelV.xaml
@@ -0,0 +1,361 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Icarus/FilledSolidPanel/FilledSolidPanelV.xaml.vb b/Icarus/FilledSolidPanel/FilledSolidPanelV.xaml.vb
new file mode 100644
index 0000000..8d2de0b
--- /dev/null
+++ b/Icarus/FilledSolidPanel/FilledSolidPanelV.xaml.vb
@@ -0,0 +1,3 @@
+Public Class FilledSolidPanelV
+
+End Class
diff --git a/Icarus/FilledSolidPanel/FilledSolidPanelVM.vb b/Icarus/FilledSolidPanel/FilledSolidPanelVM.vb
new file mode 100644
index 0000000..08d2cc3
--- /dev/null
+++ b/Icarus/FilledSolidPanel/FilledSolidPanelVM.vb
@@ -0,0 +1,1358 @@
+Imports System.Collections.ObjectModel
+Imports System.Collections.Specialized
+Imports System.Globalization
+Imports EgtUILib
+Imports EgtWPFLib5
+
+Public Class FilledSolidPanelVM
+ Inherits VMBase
+
+#Region "FIELDS & PROPERTIES"
+
+ Public Enum FilledSolidSelectionTypes As Integer
+ CURVE = 1
+ EXTRUSION = 2
+ BOTH = 3
+ End Enum
+
+ Private m_nPartId As Integer = GDB_ID.NULL
+ Private m_nFilledSolidLayerId As Integer = GDB_ID.NULL
+ Friend ReadOnly Property nFilledSolidLayerId As Integer
+ Get
+ Return m_nFilledSolidLayerId
+ End Get
+ End Property
+
+ Private m_FilledSolidList As New ObservableCollection(Of FilledSolidEntity)
+ Public ReadOnly Property FilledSolidList As ObservableCollection(Of FilledSolidEntity)
+ Get
+ Return m_FilledSolidList
+ End Get
+ End Property
+ Private m_SelFilledSolid As FilledSolidEntity
+ Public Property SelFilledSolid As FilledSolidEntity
+ Get
+ Return m_SelFilledSolid
+ End Get
+ Set(value As FilledSolidEntity)
+ m_SelFilledSolid = value
+ EgtDeselectAll()
+ If Not IsNothing(value) Then
+ EgtSelectObj(value.nCurveId)
+ EgtSelectObj(value.nExtrusionId)
+ ' aggiorno visibilita' bottoni edit
+ NotifyPropertyChanged(NameOf(Compo_Visibility))
+ ' aggiorno campi di testo posizione
+ NotifyPropertyChanged(NameOf(sXPos))
+ NotifyPropertyChanged(NameOf(sYPos))
+ NotifyPropertyChanged(NameOf(sZPos))
+ End If
+ EgtDraw()
+ End Set
+ End Property
+
+ Public Property sXPos As String
+ Get
+ If Not IsNothing(m_SelFilledSolid) Then
+ Dim nId As Integer = If(m_SelFilledSolid.Type = FilledSolidEntity.FilledSolidTypes.FROMDRAW, m_SelFilledSolid.nCurveId, m_SelFilledSolid.nExtrusionId)
+ Dim b3Reference As New BBox3d
+ EgtGetBBoxGlob(nId, GDB_BB.STANDARD, b3Reference)
+ Return LenToString(b3Reference.Min.x, 1)
+ Else
+ Return ""
+ End If
+ End Get
+ Set(value As String)
+ Dim nId As Integer = If(m_SelFilledSolid.Type = FilledSolidEntity.FilledSolidTypes.FROMDRAW, m_SelFilledSolid.nCurveId, m_SelFilledSolid.nExtrusionId)
+ Dim b3Reference As New BBox3d
+ EgtGetBBoxGlob(nId, GDB_BB.STANDARD, b3Reference)
+ Dim dNewXPos As Double = b3Reference.Min.x
+ StringToLen(value, dNewXPos)
+ If dNewXPos >= -b3Reference.DimX AndAlso dNewXPos <= CurrentMachine.b3Tab.DimX - b3Reference.DimX Then
+ EgtMove(m_SelFilledSolid.nCurveId, New Point3d(dNewXPos, b3Reference.Min.y, b3Reference.Min.z) - b3Reference.Min, GDB_RT.GLOB)
+ EgtMove(m_SelFilledSolid.nExtrusionId, New Point3d(dNewXPos, b3Reference.Min.y, b3Reference.Min.z) - b3Reference.Min, GDB_RT.GLOB)
+ EgtDraw()
+ Else
+ NotifyPropertyChanged(NameOf(sXPos))
+ End If
+ ' Imposto flag di ricalcolo slice
+ EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
+ End Set
+ End Property
+
+ Public Property sYPos As String
+ Get
+ If Not IsNothing(m_SelFilledSolid) Then
+ Dim nId As Integer = If(m_SelFilledSolid.Type = FilledSolidEntity.FilledSolidTypes.FROMDRAW, m_SelFilledSolid.nCurveId, m_SelFilledSolid.nExtrusionId)
+ Dim b3Reference As New BBox3d
+ EgtGetBBoxGlob(nId, GDB_BB.STANDARD, b3Reference)
+ Return LenToString(b3Reference.Min.y, 1)
+ Else
+ Return ""
+ End If
+ End Get
+ Set(value As String)
+ Dim nId As Integer = If(m_SelFilledSolid.Type = FilledSolidEntity.FilledSolidTypes.FROMDRAW, m_SelFilledSolid.nCurveId, m_SelFilledSolid.nExtrusionId)
+ Dim b3Reference As New BBox3d
+ EgtGetBBoxGlob(nId, GDB_BB.STANDARD, b3Reference)
+ Dim dNewYPos As Double = b3Reference.Min.y
+ StringToLen(value, dNewYPos)
+ If dNewYPos >= -b3Reference.DimY AndAlso dNewYPos <= CurrentMachine.b3Tab.DimY - b3Reference.DimY Then
+ EgtMove(m_SelFilledSolid.nCurveId, New Point3d(b3Reference.Min.x, dNewYPos, b3Reference.Min.z) - b3Reference.Min, GDB_RT.GLOB)
+ EgtMove(m_SelFilledSolid.nExtrusionId, New Point3d(b3Reference.Min.x, dNewYPos, b3Reference.Min.z) - b3Reference.Min, GDB_RT.GLOB)
+ EgtDraw()
+ Else
+ NotifyPropertyChanged(NameOf(sYPos))
+ End If
+ ' Imposto flag di ricalcolo slice
+ EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
+ End Set
+ End Property
+
+ Public Property sZPos As String
+ Get
+ If Not IsNothing(m_SelFilledSolid) Then
+ Dim nId As Integer = If(m_SelFilledSolid.Type = FilledSolidEntity.FilledSolidTypes.FROMDRAW, m_SelFilledSolid.nCurveId, m_SelFilledSolid.nExtrusionId)
+ Dim b3Reference As New BBox3d
+ EgtGetBBoxGlob(nId, GDB_BB.STANDARD, b3Reference)
+ Return LenToString(b3Reference.Min.z, 1)
+ Else
+ Return ""
+ End If
+ End Get
+ Set(value As String)
+ Dim nId As Integer = If(m_SelFilledSolid.Type = FilledSolidEntity.FilledSolidTypes.FROMDRAW, m_SelFilledSolid.nCurveId, m_SelFilledSolid.nExtrusionId)
+ Dim b3Reference As New BBox3d
+ EgtGetBBoxGlob(nId, GDB_BB.STANDARD, b3Reference)
+ Dim dNewZPos As Double = b3Reference.Min.y
+ StringToLen(value, dNewZPos)
+ If dNewZPos >= -1000 Then
+ EgtMove(m_SelFilledSolid.nCurveId, New Point3d(b3Reference.Min.x, b3Reference.Min.y, dNewZPos) - b3Reference.Min, GDB_RT.GLOB)
+ EgtMove(m_SelFilledSolid.nExtrusionId, New Point3d(b3Reference.Min.x, b3Reference.Min.y, dNewZPos) - b3Reference.Min, GDB_RT.GLOB)
+ EgtDraw()
+ Else
+ NotifyPropertyChanged(NameOf(sZPos))
+ End If
+ ' Imposto flag di ricalcolo slice
+ EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
+ End Set
+ End Property
+
+ Private m_RotAxes() As Boolean = {False, False, True}
+ Public Property RotX As Boolean
+ Get
+ Return m_RotAxes(0)
+ End Get
+ Set(value As Boolean)
+ m_RotAxes(0) = value
+ End Set
+ End Property
+ Public Property RotY As Boolean
+ Get
+ Return m_RotAxes(1)
+ End Get
+ Set(value As Boolean)
+ m_RotAxes(1) = value
+ End Set
+ End Property
+ Public Property RotZ As Boolean
+ Get
+ Return m_RotAxes(2)
+ End Get
+ Set(value As Boolean)
+ m_RotAxes(2) = value
+ End Set
+ End Property
+
+ Public ReadOnly Property vtSelRotAxes As Vector3d
+ Get
+ If m_RotAxes(0) Then
+ Return Vector3d.X_AX
+ ElseIf m_RotAxes(1) Then
+ Return Vector3d.Y_AX
+ Else
+ Return Vector3d.Z_AX
+ End If
+ End Get
+ End Property
+
+ Private m_sRotAngle As String
+ Public Property sRotAngle As String
+ Get
+ Return m_sRotAngle
+ End Get
+ Set(value As String)
+ Dim dNewAngle As Double = 0
+ If Not StringToLen(value, dNewAngle) Then
+ m_sRotAngle = 0
+ NotifyPropertyChanged(NameOf(sRotAngle))
+ Return
+ End If
+ Dim nId As Integer = If(m_SelFilledSolid.Type = FilledSolidEntity.FilledSolidTypes.FROMDRAW, m_SelFilledSolid.nCurveId, m_SelFilledSolid.nExtrusionId)
+ Dim b3Rib As New BBox3d
+ EgtGetBBoxGlob(nId, GDB_BB.STANDARD, b3Rib)
+ Dim bOk As Boolean = False
+ bOk = EgtRotate(nId, b3Rib.Center(), vtSelRotAxes, dNewAngle, GDB_RT.GLOB)
+ If bOk AndAlso m_SelFilledSolid.Type = FilledSolidEntity.FilledSolidTypes.FROMDRAW Then EgtRotate(m_SelFilledSolid.nExtrusionId, b3Rib.Center, vtSelRotAxes, dNewAngle, GDB_RT.GLOB)
+ If bOk Then
+ EgtDraw()
+ RefreshPos()
+ m_sRotAngle = 0
+ NotifyPropertyChanged(NameOf(sRotAngle))
+ ' Imposto flag di ricalcolo slice
+ EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
+ Else
+ m_sRotAngle = value
+ End If
+ End Set
+ End Property
+
+ Private m_bAdd_IsChecked As Boolean
+ Public Property bAdd_IsChecked As Boolean
+ Get
+ Return m_bAdd_IsChecked
+ End Get
+ Set(value As Boolean)
+ If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
+ m_bAdd_IsChecked = value
+ If value Then
+ m_bEdit_IsChecked = False
+ m_bGrid_IsChecked = False
+ m_bMove_IsChecked = False
+ m_bRotate_IsChecked = False
+ NotifyPropertyChanged(NameOf(bEdit_IsChecked))
+ NotifyPropertyChanged(NameOf(bGrid_IsChecked))
+ NotifyPropertyChanged(NameOf(bMove_IsChecked))
+ NotifyPropertyChanged(NameOf(bRotate_IsChecked))
+ End If
+ End If
+ End Set
+ End Property
+
+ Private m_bEdit_IsChecked As Boolean
+ Public Property bEdit_IsChecked As Boolean
+ Get
+ Return m_bEdit_IsChecked
+ End Get
+ Set(value As Boolean)
+ If Not IsNothing(m_SelFilledSolid) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
+ m_bEdit_IsChecked = value
+ If value Then
+ m_bAdd_IsChecked = False
+ m_bGrid_IsChecked = False
+ m_bMove_IsChecked = False
+ m_bRotate_IsChecked = False
+ NotifyPropertyChanged(NameOf(bAdd_IsChecked))
+ NotifyPropertyChanged(NameOf(bGrid_IsChecked))
+ NotifyPropertyChanged(NameOf(bMove_IsChecked))
+ NotifyPropertyChanged(NameOf(bRotate_IsChecked))
+ End If
+ Else
+ NotifyPropertyChanged(NameOf(bEdit_IsChecked))
+ End If
+ End Set
+ End Property
+
+ Private m_bGrid_IsChecked As Boolean
+ Public Property bGrid_IsChecked As Boolean
+ Get
+ Return m_bGrid_IsChecked
+ End Get
+ Set(value As Boolean)
+ If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
+ m_bGrid_IsChecked = value
+ If value Then
+ m_bAdd_IsChecked = False
+ m_bEdit_IsChecked = False
+ m_bMove_IsChecked = False
+ m_bRotate_IsChecked = False
+ NotifyPropertyChanged(NameOf(bAdd_IsChecked))
+ NotifyPropertyChanged(NameOf(bEdit_IsChecked))
+ NotifyPropertyChanged(NameOf(bMove_IsChecked))
+ NotifyPropertyChanged(NameOf(bRotate_IsChecked))
+ End If
+ End If
+ End Set
+ End Property
+
+ Public ReadOnly Property bGrid_IsEnabled As Boolean
+ Get
+ Return Map.refMyStatusBarVM.bGridVisibility
+ End Get
+ End Property
+
+ Private m_bMove_IsChecked As Boolean
+ Public Property bMove_IsChecked As Boolean
+ Get
+ Return m_bMove_IsChecked
+ End Get
+ Set(value As Boolean)
+ If Not IsNothing(m_SelFilledSolid) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
+ m_bMove_IsChecked = value
+ If value Then
+ m_bAdd_IsChecked = False
+ m_bEdit_IsChecked = False
+ m_bGrid_IsChecked = False
+ m_bRotate_IsChecked = False
+ NotifyPropertyChanged(NameOf(bAdd_IsChecked))
+ NotifyPropertyChanged(NameOf(bEdit_IsChecked))
+ NotifyPropertyChanged(NameOf(bGrid_IsChecked))
+ NotifyPropertyChanged(NameOf(bRotate_IsChecked))
+ End If
+ Else
+ NotifyPropertyChanged(NameOf(bMove_IsChecked))
+ End If
+ End Set
+ End Property
+
+ Private m_bRotate_IsChecked As Boolean
+ Public Property bRotate_IsChecked As Boolean
+ Get
+ Return m_bRotate_IsChecked
+ End Get
+ Set(value As Boolean)
+ If Not IsNothing(m_SelFilledSolid) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
+ m_bRotate_IsChecked = value
+ If value Then
+ m_bAdd_IsChecked = False
+ m_bEdit_IsChecked = False
+ m_bGrid_IsChecked = False
+ m_bMove_IsChecked = False
+ NotifyPropertyChanged(NameOf(bAdd_IsChecked))
+ NotifyPropertyChanged(NameOf(bEdit_IsChecked))
+ NotifyPropertyChanged(NameOf(bGrid_IsChecked))
+ NotifyPropertyChanged(NameOf(bMove_IsChecked))
+ End If
+ Else
+ NotifyPropertyChanged(NameOf(bRotate_IsChecked))
+ End If
+ End Set
+ End Property
+
+ Private m_bMachParam_IsChecked As Boolean
+ Public Property bMachParam_IsChecked As Boolean
+ Get
+ Return m_bMachParam_IsChecked
+ End Get
+ Set(value As Boolean)
+ If Not IsNothing(m_SelFilledSolid) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not IsNothing(Map.refTopPanelVM.SelMachining) AndAlso value Then
+ m_bMachParam_IsChecked = True
+ m_bAdd_IsChecked = False
+ m_bEdit_IsChecked = False
+ m_bGrid_IsChecked = False
+ m_bMove_IsChecked = False
+ m_bRotate_IsChecked = False
+ NotifyPropertyChanged(NameOf(bAdd_IsChecked))
+ NotifyPropertyChanged(NameOf(bEdit_IsChecked))
+ NotifyPropertyChanged(NameOf(bGrid_IsChecked))
+ NotifyPropertyChanged(NameOf(bMove_IsChecked))
+ NotifyPropertyChanged(NameOf(bRotate_IsChecked))
+ Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.AUXSOLIDPARAM)
+ NotifyPropertyChanged(NameOf(FilledSolidList_IsEnabled))
+ Else
+ NotifyPropertyChanged(NameOf(m_bMachParam_IsChecked))
+ End If
+ End Set
+ End Property
+ Friend Sub ResetMachParamIsChecked()
+ m_bMachParam_IsChecked = False
+ NotifyPropertyChanged(NameOf(bMachParam_IsChecked))
+ NotifyPropertyChanged(NameOf(FilledSolidList_IsEnabled))
+ End Sub
+
+ Public ReadOnly Property Compo_Visibility As Visibility
+ Get
+ Return If(Not IsNothing(m_SelFilledSolid) AndAlso m_SelFilledSolid.Type = FilledSolidEntity.FilledSolidTypes.FROMDRAW, Visibility.Visible, Visibility.Collapsed)
+ End Get
+ End Property
+
+ Public ReadOnly Property FilledSolidList_IsEnabled As Boolean
+ Get
+ Return Not m_bMachParam_IsChecked
+ End Get
+ End Property
+ ' riferimento griglia all'ingresso in questa pagina
+ Private m_OriginalGridFrame As New Frame3d
+
+ ' parametro che indica se e' in corso il disegno di un percorso
+ Private m_bIsCreatingPath As Boolean = False
+ Public ReadOnly Property bIsCreatingPath As Boolean
+ Get
+ Return m_bIsCreatingPath
+ End Get
+ End Property
+ Private m_bIsCreatingExtrusion As Boolean = False
+ Public ReadOnly Property bIsCreatingExtrusion As Boolean
+ Get
+ Return m_bIsCreatingExtrusion
+ End Get
+ End Property
+
+
+ ' Definizione comandi
+ Private m_cmdImport As ICommand
+ Private m_cmdLine2P As ICommand
+ Private m_cmdDelete As ICommand
+ Private m_cmdModifyCurve As ICommand
+ Private m_cmdAddPointCurve As ICommand
+ Private m_cmdRemovePointCurve As ICommand
+ Private m_cmdExtrude As ICommand
+ Private m_cmdCPlaneTop As ICommand
+ Private m_cmdCPlaneFront As ICommand
+ Private m_cmdCPlaneRight As ICommand
+ Private m_cmdCPlaneBack As ICommand
+ Private m_cmdCPlaneLeft As ICommand
+ Private m_cmdCPlaneBottom As ICommand
+ Private m_cmdCPlaneView As ICommand
+ Private m_cmdCPlaneElevation As ICommand
+ Private m_cmdCPlaneOrigin As ICommand
+ Private m_cmdCPlaneRotate As ICommand
+ Private m_cmdCPlane3P As ICommand
+ Private m_cmdCPlanePerpObj As ICommand
+ Private m_cmdCPlaneObj As ICommand
+ Private m_cmdDragMove As ICommand
+ Private m_cmdDragRotate As ICommand
+ Private m_cmdMachParam As ICommand
+
+#End Region ' FIELDS & PROPERTIES
+
+#Region "CONSTRUCTORS"
+
+ Sub New()
+ ' Creo riferimento a questa classe in EgtCAM5Map
+ Map.SetRefFilledSolidPanelVM(Me)
+ End Sub
+
+#End Region ' CONSTRUCTORS
+
+#Region "METHODS"
+
+ Friend Sub Init()
+ ' asse rotazione di default
+ RotZ = True
+ NotifyPropertyChanged(NameOf(RotZ))
+ ' azzero indice
+ StartEntity.ResetSharedIndex()
+ ' fisso frame originale
+ m_OriginalGridFrame = EgtGetGridFrame()
+ ' recupero dati pezzo selezionato layer ed entita'
+ m_nPartId = Map.refTopPanelVM.SelPart.nPartId
+ m_nFilledSolidLayerId = Map.refTopPanelVM.SelPart.nAuxSolidsLayerId
+ If m_nFilledSolidLayerId = GDB_ID.NULL Then
+ m_nFilledSolidLayerId = EgtCreateGroup(m_nPartId)
+ EgtSetName(m_nFilledSolidLayerId, LAY_AUX_SOLIDS)
+ End If
+ 'recupero tutte le entita' filled solid
+ m_FilledSolidList.Clear()
+ Dim nFilledSolidId As Integer = EgtGetFirstInGroup(m_nFilledSolidLayerId)
+ While nFilledSolidId <> GDB_ID.NULL
+ Dim EntityType As GDB_TY = EgtGetType(nFilledSolidId)
+ Dim DrawType As Integer = FilledSolidEntity.FilledSolidTypes.FROMDRAW
+ EgtGetInfo(nFilledSolidId, KEY_AUXSOLID_TYPE, DrawType)
+ If EntityType = GDB_TY.CRV_COMPO AndAlso DrawType = FilledSolidEntity.FilledSolidTypes.FROMDRAW Then
+ Dim nExtrusionId As Integer = GDB_ID.NULL
+ EgtGetInfo(nFilledSolidId, KEY_EXTRUSION_ID, nExtrusionId)
+ Dim FilledSolidEntity As FilledSolidEntity = New FilledSolidEntity(FilledSolidEntity.FilledSolidTypes.FROMDRAW, nFilledSolidId)
+ If nExtrusionId <> GDB_ID.NULL Then
+ FilledSolidEntity.SetExtrusionId(nExtrusionId)
+ End If
+ m_FilledSolidList.Add(FilledSolidEntity)
+ ElseIf (EntityType = GDB_TY.SRF_BEZ OrElse EntityType = GDB_TY.SRF_MESH OrElse EntityType = GDB_TY.SRF_FRGN) AndAlso DrawType = FilledSolidEntity.FilledSolidTypes.FROMIMPORT Then
+ Dim FilledSolidEntity As FilledSolidEntity = New FilledSolidEntity(FilledSolidEntity.FilledSolidTypes.FROMIMPORT, nFilledSolidId)
+ m_FilledSolidList.Add(FilledSolidEntity)
+ End If
+ nFilledSolidId = EgtGetNext(nFilledSolidId)
+ End While
+ If m_FilledSolidList.Count > 0 Then
+ SelFilledSolid = m_FilledSolidList(0)
+ NotifyPropertyChanged(NameOf(SelFilledSolid))
+ End If
+ Map.refSceneHostVM.MainScene.SetStatusNull()
+ End Sub
+
+ Friend Sub Dispose()
+ ' ripristino frame originale
+ EgtSetGridFrame(m_OriginalGridFrame)
+ ' se in modifica parametri
+ If m_bMachParam_IsChecked Then
+ ' ripristino modalita' standard
+ Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.NULL)
+ Map.refFilledSolidPanelVM.ResetMachParamIsChecked()
+ End If
+ EgtDeselectAll()
+ EgtDraw()
+ Map.refSceneHostVM.MainScene.SetStatusNull()
+ End Sub
+
+ Friend Sub RefreshPos()
+ NotifyPropertyChanged(NameOf(sXPos))
+ NotifyPropertyChanged(NameOf(sYPos))
+ NotifyPropertyChanged(NameOf(sZPos))
+ End Sub
+
+ Private Function InitCommand(FilledSolidSelectionType As FilledSolidSelectionTypes) As Boolean
+ ' attivo modifiche su scena
+ Map.refSceneHostVM.MainScene.ResetStatus()
+ ' rendo traspanete estrusione
+ EgtSetAlpha(m_SelFilledSolid.nExtrusionId, 50)
+ ' seleziono percorso corrente
+ EgtDeselectAll()
+ Select Case FilledSolidSelectionType
+ Case FilledSolidSelectionTypes.CURVE
+ EgtSelectObj(m_SelFilledSolid.nCurveId)
+ Case FilledSolidSelectionTypes.EXTRUSION
+ ' creo layer per estrusione
+ Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId)
+ EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
+ EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId)
+ EgtSelectObj(m_SelFilledSolid.nCurveId)
+ Case FilledSolidSelectionTypes.BOTH
+ EgtSelectObj(m_SelFilledSolid.nCurveId)
+ EgtSelectObj(m_SelFilledSolid.nExtrusionId)
+ End Select
+ EgtDraw()
+ Return True
+ End Function
+
+ Friend Sub UpdateUI()
+ ' se attiva operazione in piu' passaggi, esco
+ If Map.refSceneHostVM.MainController.GetContinue() Then Return
+ End Sub
+
+ Friend Sub OnExecCmdEnd(command As Controller.CMD)
+ Select Case command
+ Case Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE
+ ' leggo altezza estrusione
+ Dim dExtrusionLength As Double = 0
+ EgtGetInfo(m_SelFilledSolid.nExtrusionId, KEY_EXTRUSION_LENGTH, dExtrusionLength)
+ ' cancello estrusione
+ EgtErase(m_SelFilledSolid.nExtrusionId)
+ Dim nNewEntityId As Integer = EgtCreateSurfTmByRegionExtrusion(m_nFilledSolidLayerId, 1, {m_SelFilledSolid.nCurveId}, Vector3d.Z_AX * dExtrusionLength, EPS_STM)
+ EgtSetName(nNewEntityId, RIB_EXTRUSION)
+ EgtSetInfo(nNewEntityId, KEY_EXTRUSION_LENGTH, dExtrusionLength)
+ ' resetto colore entita'
+ EgtResetColor(nNewEntityId)
+ ' aggiorno riferimento nella curva
+ m_SelFilledSolid.SetExtrusionId(nNewEntityId)
+ ' seleziono nuova estrusione
+ EgtSelectObj(m_SelFilledSolid.nExtrusionId)
+ ' ripristino trasparenza estrusione
+ EgtSetAlpha(m_SelFilledSolid.nExtrusionId, 100)
+ EgtDraw()
+ ' rimetto la selezione scena a null
+ Map.refSceneHostVM.MainScene.SetStatusNull()
+ Case Controller.CMD.MOVE, Controller.CMD.ROTATE
+ EgtSetAlpha(Map.refFilledSolidPanelVM.SelFilledSolid.nExtrusionId, 100)
+ ' seleziono nuova estrusione
+ EgtSelectObj(m_SelFilledSolid.nExtrusionId)
+ EgtDraw()
+ ' rimetto la selezione scena a null
+ Map.refSceneHostVM.MainScene.SetStatusNull()
+ Case Controller.CMD.GRID_ELEVATION, Controller.CMD.GRID_3P, Controller.CMD.GRID_ORIGIN, Controller.CMD.GRID_PERPCURVE,
+ Controller.CMD.GRID_ROTATE, Controller.CMD.GRID_ROTATE3D, Controller.CMD.GRID_OBJ
+ ' rimetto la selezione scena a null
+ Map.refSceneHostVM.MainScene.SetStatusNull()
+ End Select
+ Select Case command
+ Case Controller.CMD.LINE2P, Controller.CMD.DELETE, Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE, Controller.CMD.EXTRUDE,
+ Controller.CMD.MOVE, Controller.CMD.ROTATE
+ ' Imposto flag di ricalcolo slice
+ EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
+ End Select
+ If command <> Controller.CMD.LINE2P AndAlso command <> Controller.CMD.EXTRUDE Then Return
+ ' se finita creazione estrusione
+ If m_bIsCreatingExtrusion Then
+ m_bIsCreatingExtrusion = False
+ ' se riferimento non nullo, elimino vecchia estrusione
+ If m_SelFilledSolid.nExtrusionId <> GDB_ID.NULL Then
+ EgtErase(m_SelFilledSolid.nExtrusionId)
+ End If
+ Dim NewEntity As FilledSolidEntity = Nothing
+ Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION)
+ Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewExtrusionLayerId)
+ Dim NewGeomType As GDB_TY = EgtGetType(nNewEntityId)
+ If NewGeomType = GDB_TY.SRF_FRGN OrElse NewGeomType = GDB_TY.SRF_MESH Then
+ EgtSetName(nNewEntityId, RIB_EXTRUSION)
+ Dim dExtrusionLength As Double = 0
+ StringToLen(Map.refControllerInputPanelVM.Text, dExtrusionLength)
+ EgtSetInfo(nNewEntityId, KEY_EXTRUSION_LENGTH, dExtrusionLength)
+ ' resetto colore entita'
+ EgtResetColor(nNewEntityId)
+ '' lo sposto nel layer dei rib
+ EgtRelocateGlob(nNewEntityId, m_nFilledSolidLayerId, GDB_POS.LAST_SON)
+ ' aggiungo riferimento a curva
+ m_SelFilledSolid.SetExtrusionId(nNewEntityId)
+ End If
+ ' cancello layer estrusione
+ EgtErase(nNewExtrusionLayerId)
+ ' aggiorno posizione
+ RefreshPos()
+ EgtDraw()
+ ' rimetto la selezione scena a null
+ Map.refSceneHostVM.MainScene.SetStatusNull()
+ End If
+ ' se finita creazione curva
+ If bIsCreatingPath Then
+ m_bIsCreatingPath = False
+ Dim NewEntity As FilledSolidEntity = Nothing
+ Dim nNewRibLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWRIB)
+ Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewRibLayerId)
+ Dim NewGeomType As GDB_TY = EgtGetType(nNewEntityId)
+ If NewGeomType = GDB_TY.CRV_COMPO Then
+ If Not EgtCurveIsClosed(nNewEntityId) Then
+ EgtCloseCurveCompo(nNewEntityId)
+ End If
+ EgtSetName(nNewEntityId, RIB_CURVE)
+ ' resetto colore entita'
+ EgtResetColor(nNewEntityId)
+ ' lo sposto nel layer dei rib
+ EgtRelocateGlob(nNewEntityId, m_nFilledSolidLayerId, GDB_POS.LAST_SON)
+ ' lo aggiungo alla lista
+ NewEntity = New FilledSolidEntity(FilledSolidEntity.FilledSolidTypes.FROMDRAW, nNewEntityId)
+ m_FilledSolidList.Add(NewEntity)
+ ' lo seleziono
+ SelFilledSolid = NewEntity
+ NotifyPropertyChanged(NameOf(SelFilledSolid))
+ ' creo layer per estrusione
+ Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId)
+ EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
+ EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId)
+ ' seleziono percorso da estrudere
+ EgtDeselectAll()
+ EgtSelectObj(nNewEntityId)
+ If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
+ m_bIsCreatingExtrusion = True
+ Map.refControllerInputPanelVM.IsChecked = True
+ Else
+ ' cancello layer
+ EgtErase(nNewExtrusionLayerId)
+ End If
+ End If
+ ' cancello layer di disegno
+ EgtErase(nNewRibLayerId)
+ End If
+ End Sub
+
+ Friend Sub OnKeyDown(Key As Forms.Keys)
+ 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.refFilledSolidPanelVM.PrevSelObjs
+ EgtSelectObj(Id)
+ Next
+ EgtDraw()
+ ' rimetto la selezione scena a null
+ Map.refSceneHostVM.MainScene.SetStatusNull()
+ End If
+ End If
+ End Sub
+
+ Friend Function OnMouseSelectingObj(nId As Integer) As Boolean
+ Return EgtGetParent(nId) = m_nFilledSolidLayerId
+ End Function
+
+ Friend Sub SelStartFromId(nId)
+ Dim SelFilledSolidEntity As FilledSolidEntity = m_FilledSolidList.FirstOrDefault(Function(x) x.nCurveId = nId OrElse x.nExtrusionId = nId)
+ If Not IsNothing(SelFilledSolidEntity) Then
+ SelFilledSolid = SelFilledSolidEntity
+ NotifyPropertyChanged(NameOf(SelFilledSolid))
+ End If
+ End Sub
+
+ Friend Sub SelLastFilledSolid()
+ If FilledSolidList.Count <= 0 Then Return
+ SelFilledSolid = FilledSolidList(FilledSolidList.Count - 1)
+ NotifyPropertyChanged(NameOf(SelFilledSolid))
+ End Sub
+
+ Friend Shared Function GetNextFilledSolidIndex()
+ Dim nFilledSolidIndex As Integer = 0
+ Dim nFilledSolidId As Integer = EgtGetFirstInGroup(Map.refTopPanelVM.SelPart.nAuxSolidsLayerId)
+ While nFilledSolidId <> GDB_ID.NULL
+ Dim nCurrIndex As Integer = GDB_ID.NULL
+ EgtGetInfo(nFilledSolidId, FILLEDSOLID_ID, nCurrIndex)
+ If nCurrIndex > nFilledSolidIndex Then
+ nFilledSolidIndex = nCurrIndex
+ End If
+ nFilledSolidId = EgtGetNext(nFilledSolidId)
+ End While
+ Return nFilledSolidIndex + 1
+ End Function
+
+#End Region ' METHODS
+
+#Region "COMMANDS"
+
+#Region "Import"
+
+ '''
+ ''' Returns a command that do CPlaneTop.
+ '''
+ Public ReadOnly Property Import_Command As ICommand
+ Get
+ If m_cmdImport Is Nothing Then
+ m_cmdImport = New Command(AddressOf Import)
+ End If
+ Return m_cmdImport
+ End Get
+ End Property
+
+ '''
+ ''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
+ '''
+ Public Sub Import(ByVal param As Object)
+ If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
+ Map.refSceneHostVM.InsertFilledSolid()
+ End Sub
+
+#End Region ' Import
+
+#Region "Line2P"
+
+ '''
+ ''' Returns a command that do CPlaneTop.
+ '''
+ Public ReadOnly Property Line2P_Command As ICommand
+ Get
+ If m_cmdLine2P Is Nothing Then
+ m_cmdLine2P = New Command(AddressOf Line2P)
+ End If
+ Return m_cmdLine2P
+ End Get
+ End Property
+
+ '''
+ ''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
+ '''
+ Public Sub Line2P(ByVal param As Object)
+ If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
+ Dim nNewShellNumberLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWRIB)
+ If nNewShellNumberLayerId = GDB_ID.NULL Then nNewShellNumberLayerId = EgtCreateGroup(m_nPartId)
+ EgtSetName(nNewShellNumberLayerId, LAY_NEWRIB)
+ EgtSetCurrPartLayer(m_nPartId, nNewShellNumberLayerId)
+ Map.refSceneHostVM.MainController.SetContinue()
+ If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.LINE2P) Then
+ m_bIsCreatingPath = True
+ End If
+ End Sub
+
+#End Region ' Line2P
+
+#Region "Delete"
+
+ Public ReadOnly Property Delete_Command As ICommand
+ Get
+ If m_cmdDelete Is Nothing Then
+ m_cmdDelete = New Command(AddressOf Delete)
+ End If
+ Return m_cmdDelete
+ End Get
+ End Property
+
+ Public Sub Delete()
+ If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
+ If IsNothing(SelFilledSolid) Then Return
+ Dim bOk As Boolean = False
+ Select Case m_SelFilledSolid.Type
+ Case FilledSolidEntity.FilledSolidTypes.FROMDRAW
+ bOk = EgtErase(m_SelFilledSolid.nCurveId)
+ If bOk Then EgtErase(m_SelFilledSolid.nExtrusionId)
+ Case FilledSolidEntity.FilledSolidTypes.FROMIMPORT
+ bOk = EgtErase(m_SelFilledSolid.nExtrusionId)
+ End Select
+ If bOk Then
+ Dim nSelStartIndex As Integer = m_FilledSolidList.IndexOf(SelFilledSolid)
+ m_FilledSolidList.Remove(SelFilledSolid)
+ If nSelStartIndex < m_FilledSolidList.Count Then
+ SelFilledSolid = m_FilledSolidList(nSelStartIndex)
+ ElseIf m_FilledSolidList.Count > 0 Then
+ SelFilledSolid = m_FilledSolidList(m_FilledSolidList.Count - 1)
+ Else
+ SelFilledSolid = Nothing
+ End If
+ NotifyPropertyChanged(NameOf(SelFilledSolid))
+ End If
+ End Sub
+
+#End Region ' Delete
+
+#Region "ModifyCurve"
+
+ '''
+ ''' Returns a command that do Linear Dimension.
+ '''
+ Public ReadOnly Property ModifyCurve_Command As ICommand
+ Get
+ If m_cmdModifyCurve Is Nothing Then
+ m_cmdModifyCurve = New Command(AddressOf ModifyCurve)
+ End If
+ Return m_cmdModifyCurve
+ End Get
+ End Property
+
+ '''
+ ''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
+ '''
+ Public Sub ModifyCurve(ByVal param As Object)
+ If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
+ InitCommand(FilledSolidSelectionTypes.CURVE)
+ Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MODIFYCURVE)
+ End Sub
+
+#End Region ' ModifyCurve
+
+#Region "AddPointCurve"
+
+ '''
+ ''' Returns a command that do Linear Dimension.
+ '''
+ Public ReadOnly Property AddPointCurve_Command As ICommand
+ Get
+ If m_cmdAddPointCurve Is Nothing Then
+ m_cmdAddPointCurve = New Command(AddressOf AddPointCurve)
+ End If
+ Return m_cmdAddPointCurve
+ End Get
+ End Property
+
+ '''
+ ''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
+ '''
+ Public Sub AddPointCurve(ByVal param As Object)
+ If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
+ InitCommand(FilledSolidSelectionTypes.CURVE)
+ If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
+ Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOARC)
+ Else
+ Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.ADDPOINTCURVE)
+ End If
+ End Sub
+
+#End Region ' AddPointCurve
+
+#Region "RemovePointCurve"
+
+ '''
+ ''' Returns a command that do Linear Dimension.
+ '''
+ Public ReadOnly Property RemovePointCurve_Command As ICommand
+ Get
+ If m_cmdRemovePointCurve Is Nothing Then
+ m_cmdRemovePointCurve = New Command(AddressOf RemovePointCurve)
+ End If
+ Return m_cmdRemovePointCurve
+ End Get
+ End Property
+
+ '''
+ ''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
+ '''
+ Public Sub RemovePointCurve(ByVal param As Object)
+ If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
+ InitCommand(FilledSolidSelectionTypes.CURVE)
+ If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
+ Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOLINE)
+ Else
+ Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.REMOVEPOINTCURVE)
+ End If
+ End Sub
+
+#End Region ' RemovePointCurve
+
+#Region "Extrude"
+
+ '''
+ ''' Returns a command that do Extrude.
+ '''
+ Public ReadOnly Property Extrude_Command As ICommand
+ Get
+ If m_cmdExtrude Is Nothing Then
+ m_cmdExtrude = New Command(AddressOf Extrude)
+ End If
+ Return m_cmdExtrude
+ End Get
+ End Property
+
+ '''
+ ''' Execute the Extrude. This method is invoked by the ExtrudeCommand.
+ '''
+ Public Sub Extrude(ByVal param As Object)
+ If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
+ InitCommand(FilledSolidSelectionTypes.EXTRUSION)
+ If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
+ m_bIsCreatingExtrusion = True
+ Map.refControllerInputPanelVM.IsChecked = True
+ End If
+ End Sub
+
+#End Region ' Extrude
+
+#Region "CPlaneTop"
+
+ '''
+ ''' Returns a command that do CPlaneTop.
+ '''
+ Public ReadOnly Property CPlaneTop_Command As ICommand
+ Get
+ If m_cmdCPlaneTop Is Nothing Then
+ m_cmdCPlaneTop = New Command(AddressOf CPlaneTop)
+ End If
+ Return m_cmdCPlaneTop
+ End Get
+ End Property
+
+ '''
+ ''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
+ '''
+ Public Sub CPlaneTop(ByVal param As Object)
+ If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
+ Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
+ Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
+ End Sub
+
+#End Region ' CPlaneTop
+
+#Region "CPlaneFront"
+
+ '''
+ ''' Returns a command that do CPlaneFront.
+ '''
+ Public ReadOnly Property CPlaneFront_Command As ICommand
+ Get
+ If m_cmdCPlaneFront Is Nothing Then
+ m_cmdCPlaneFront = New Command(AddressOf CPlaneFront)
+ End If
+ Return m_cmdCPlaneFront
+ End Get
+ End Property
+
+ '''
+ ''' Execute the CPlaneFront. This method is invoked by the CPlaneFrontCommand.
+ '''
+ Public Sub CPlaneFront(ByVal param As Object)
+ If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
+ Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
+ Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
+ End Sub
+
+#End Region ' CPlaneFront
+
+#Region "CPlaneRight"
+
+ '''
+ ''' Returns a command that do CPlaneRight.
+ '''
+ Public ReadOnly Property CPlaneRight_Command As ICommand
+ Get
+ If m_cmdCPlaneRight Is Nothing Then
+ m_cmdCPlaneRight = New Command(AddressOf CPlaneRight)
+ End If
+ Return m_cmdCPlaneRight
+ End Get
+ End Property
+
+ '''
+ ''' Execute the CPlaneRight. This method is invoked by the CPlaneRightCommand.
+ '''
+ Public Sub CPlaneRight(ByVal param As Object)
+ If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
+ Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
+ Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
+ End Sub
+
+#End Region ' CPlaneRight
+
+#Region "CPlaneBack"
+
+ '''
+ ''' Returns a command that do CPlaneBack.
+ '''
+ Public ReadOnly Property CPlaneBack_Command As ICommand
+ Get
+ If m_cmdCPlaneBack Is Nothing Then
+ m_cmdCPlaneBack = New Command(AddressOf CPlaneBack)
+ End If
+ Return m_cmdCPlaneBack
+ End Get
+ End Property
+
+ '''
+ ''' Execute the CPlaneBack. This method is invoked by the CPlaneBackCommand.
+ '''
+ Public Sub CPlaneBack(ByVal param As Object)
+ If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
+ Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
+ Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
+ End Sub
+
+#End Region ' CPlaneBack
+
+#Region "CPlaneLeft"
+
+ '''
+ ''' Returns a command that do CPlaneLeft.
+ '''
+ Public ReadOnly Property CPlaneLeft_Command As ICommand
+ Get
+ If m_cmdCPlaneLeft Is Nothing Then
+ m_cmdCPlaneLeft = New Command(AddressOf CPlaneLeft)
+ End If
+ Return m_cmdCPlaneLeft
+ End Get
+ End Property
+
+ '''
+ ''' Execute the CPlaneLeft. This method is invoked by the CPlaneLeftCommand.
+ '''
+ Public Sub CPlaneLeft(ByVal param As Object)
+ If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
+ Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
+ Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
+ End Sub
+
+#End Region ' CPlaneLeft
+
+#Region "CPlaneBottom"
+
+ '''
+ ''' Returns a command that do CPlaneBottom.
+ '''
+ Public ReadOnly Property CPlaneBottom_Command As ICommand
+ Get
+ If m_cmdCPlaneBottom Is Nothing Then
+ m_cmdCPlaneBottom = New Command(AddressOf CPlaneBottom)
+ End If
+ Return m_cmdCPlaneBottom
+ End Get
+ End Property
+
+ '''
+ ''' Execute the CPlaneBottom. This method is invoked by the CPlaneBottomCommand.
+ '''
+ Public Sub CPlaneBottom(ByVal param As Object)
+ If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
+ Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
+ Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
+ End Sub
+
+#End Region ' CPlaneBottom
+
+#Region "CPlaneElevation"
+
+ '''
+ ''' Returns a command that do CPlaneElevation.
+ '''
+ Public ReadOnly Property CPlaneElevation_Command As ICommand
+ Get
+ If m_cmdCPlaneElevation Is Nothing Then
+ m_cmdCPlaneElevation = New Command(AddressOf CPlaneElevation)
+ End If
+ Return m_cmdCPlaneElevation
+ End Get
+ End Property
+
+ '''
+ ''' Execute the CPlaneElevation. This method is invoked by the CPlaneElevationCommand.
+ '''
+ Public Sub CPlaneElevation(ByVal param As Object)
+ If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
+ Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
+ End Sub
+
+#End Region ' CPlaneElevation
+
+#Region "CPlaneOrigin"
+
+ '''
+ ''' Returns a command that do CPlaneOrigin.
+ '''
+ Public ReadOnly Property CPlaneOrigin_Command As ICommand
+ Get
+ If m_cmdCPlaneOrigin Is Nothing Then
+ m_cmdCPlaneOrigin = New Command(AddressOf CPlaneOrigin)
+ End If
+ Return m_cmdCPlaneOrigin
+ End Get
+ End Property
+
+ '''
+ ''' Execute the CPlaneOrigin. This method is invoked by the CPlaneOriginCommand.
+ '''
+ Public Sub CPlaneOrigin(ByVal param As Object)
+ If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
+ Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
+ End Sub
+
+#End Region ' CPlaneOrigin
+
+#Region "CPlaneRotate"
+
+ '''
+ ''' Returns a command that do CPlaneRotate.
+ '''
+ Public ReadOnly Property CPlaneRotate_Command As ICommand
+ Get
+ If m_cmdCPlaneRotate Is Nothing Then
+ m_cmdCPlaneRotate = New Command(AddressOf CPlaneRotate)
+ End If
+ Return m_cmdCPlaneRotate
+ End Get
+ End Property
+
+ '''
+ ''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand.
+ '''
+ Public Sub CPlaneRotate(ByVal param As Object)
+ If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
+ If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
+ Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE)
+ Else
+ Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE3D)
+ End If
+ End Sub
+
+#End Region ' CPlaneRotate
+
+#Region "CPlane3P"
+
+ '''
+ ''' Returns a command that do CPlane3P.
+ '''
+ Public ReadOnly Property CPlane3P_Command As ICommand
+ Get
+ If m_cmdCPlane3P Is Nothing Then
+ m_cmdCPlane3P = New Command(AddressOf CPlane3P)
+ End If
+ Return m_cmdCPlane3P
+ End Get
+ End Property
+
+ '''
+ ''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand.
+ '''
+ Public Sub CPlane3P(ByVal param As Object)
+ If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
+ Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_3P)
+ End Sub
+
+#End Region ' CPlane3P
+
+#Region "CPlanePerpObj"
+
+ '''
+ ''' Returns a command that do CPlanePerpObj.
+ '''
+ Public ReadOnly Property CPlanePerpObj_Command As ICommand
+ Get
+ If m_cmdCPlanePerpObj Is Nothing Then
+ m_cmdCPlanePerpObj = New Command(AddressOf CPlanePerpObj)
+ End If
+ Return m_cmdCPlanePerpObj
+ End Get
+ End Property
+
+ '''
+ ''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand.
+ '''
+ Public Sub CPlanePerpObj(ByVal param As Object)
+ If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
+ Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_PERPCURVE)
+ End Sub
+
+#End Region ' CPlanePerpObj
+
+#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
+
+ '''
+ ''' Returns a command that do CPlanepObj.
+ '''
+ 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
+
+ '''
+ ''' Execute the CPlaneObj. This method is invoked by the CPlaneObjCommand.
+ '''
+ Public Sub CPlaneObj(ByVal param As Object)
+ If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
+ ' salvo selezione precedente e deseleziono altri oggetti
+ m_PrevSelObjs.Clear()
+ 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"
+
+ Public ReadOnly Property DragMove_Command As ICommand
+ Get
+ If m_cmdDragMove Is Nothing Then
+ m_cmdDragMove = New Command(AddressOf DragMove)
+ End If
+ Return m_cmdDragMove
+ End Get
+ End Property
+
+ Public Sub DragMove()
+ If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
+ InitCommand(FilledSolidSelectionTypes.BOTH)
+ Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MOVE)
+ End Sub
+
+#End Region ' DragMove
+
+#Region "DragRotate"
+
+ Public ReadOnly Property DragRotate_Command As ICommand
+ Get
+ If m_cmdDragRotate Is Nothing Then
+ m_cmdDragRotate = New Command(AddressOf DragRotate)
+ End If
+ Return m_cmdDragRotate
+ End Get
+ End Property
+
+ Public Sub DragRotate()
+ If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
+ InitCommand(FilledSolidSelectionTypes.BOTH)
+ Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.ROTATE)
+ End Sub
+
+#End Region ' DragRotate
+
+#Region "MachParam"
+
+ Public ReadOnly Property MachParam_Command As ICommand
+ Get
+ If m_cmdMachParam Is Nothing Then
+ m_cmdMachParam = New Command(AddressOf MachParam)
+ End If
+ Return m_cmdMachParam
+ End Get
+ End Property
+
+ Public Sub MachParam()
+ If IsNothing(Map.refTopPanelVM.SelMachining) Then Return
+ m_bAdd_IsChecked = False
+ m_bEdit_IsChecked = False
+ m_bGrid_IsChecked = False
+ m_bMove_IsChecked = False
+ m_bRotate_IsChecked = False
+ NotifyPropertyChanged(NameOf(bAdd_IsChecked))
+ NotifyPropertyChanged(NameOf(bEdit_IsChecked))
+ NotifyPropertyChanged(NameOf(bGrid_IsChecked))
+ NotifyPropertyChanged(NameOf(bMove_IsChecked))
+ NotifyPropertyChanged(NameOf(bRotate_IsChecked))
+ Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.AUXSOLIDPARAM)
+ End Sub
+
+#End Region ' MachParam
+
+#End Region ' COMMANDS
+
+End Class
+
+Public Class FilledSolidEntity
+ Inherits VMBase
+
+ Public Enum FilledSolidTypes As Integer
+ FROMDRAW = 1
+ FROMIMPORT = 2
+ End Enum
+
+ Private Shared m_nSharedIndex As Integer = 0
+ Private ReadOnly Property nSharedIndex As Integer
+ Get
+ m_nSharedIndex += 1
+ Return m_nSharedIndex
+ End Get
+ End Property
+ Friend Shared Sub ResetSharedIndex()
+ m_nSharedIndex = 0
+ End Sub
+
+ Private m_Type As FilledSolidTypes
+ Public ReadOnly Property Type As FilledSolidTypes
+ Get
+ Return m_Type
+ End Get
+ End Property
+
+ Private m_nCurveId As Integer = GDB_ID.NULL
+ Public ReadOnly Property nCurveId As Integer
+ Get
+ Return m_nCurveId
+ End Get
+ End Property
+
+ Private m_nExtrusionId As Integer = GDB_ID.NULL
+ Public ReadOnly Property nExtrusionId As Integer
+ Get
+ Return m_nExtrusionId
+ End Get
+ End Property
+ Friend Sub SetExtrusionId(nId As Integer)
+ m_nExtrusionId = nId
+ EgtSetInfo(m_nCurveId, KEY_EXTRUSION_ID, m_nExtrusionId)
+ End Sub
+
+ Private m_nIndex As Integer
+ Public ReadOnly Property nIndex As Integer
+ Get
+ Return m_nIndex
+ End Get
+ End Property
+
+ Public ReadOnly Property ghName As String
+ Get
+ Return String.Format("[{0}] {1}", {m_nIndex, If(m_Type = FilledSolidTypes.FROMDRAW, "Draw Filled Solid", "Import Filled Solid")})
+ End Get
+ End Property
+
+ Sub New(Type As FilledSolidTypes, nId As Integer)
+ If Not EgtGetInfo(nId, FILLEDSOLID_ID, m_nIndex) Then
+ m_nIndex = FilledSolidPanelVM.GetNextFilledSolidIndex()
+ EgtSetInfo(nId, FILLEDSOLID_ID, m_nIndex)
+ End If
+ m_Type = Type
+ EgtSetInfo(nId, KEY_AUXSOLID_TYPE, Type)
+ Select Case Type
+ Case FilledSolidTypes.FROMDRAW
+ m_nCurveId = nId
+ Case FilledSolidTypes.FROMIMPORT
+ m_nExtrusionId = nId
+ End Select
+ End Sub
+
+End Class
diff --git a/Icarus/FilledSolidParamPanel/FilledSolidParamPanelV.xaml b/Icarus/FilledSolidParamPanel/FilledSolidParamPanelV.xaml
new file mode 100644
index 0000000..ef39a21
--- /dev/null
+++ b/Icarus/FilledSolidParamPanel/FilledSolidParamPanelV.xaml
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Icarus/FilledSolidParamPanel/FilledSolidParamPanelV.xaml.vb b/Icarus/FilledSolidParamPanel/FilledSolidParamPanelV.xaml.vb
new file mode 100644
index 0000000..4edf7fc
--- /dev/null
+++ b/Icarus/FilledSolidParamPanel/FilledSolidParamPanelV.xaml.vb
@@ -0,0 +1,3 @@
+Public Class FilledSolidParamPanelV
+
+End Class
diff --git a/Icarus/FilledSolidParamPanel/FilledSolidParamPanelVM.vb b/Icarus/FilledSolidParamPanel/FilledSolidParamPanelVM.vb
new file mode 100644
index 0000000..5e8247c
--- /dev/null
+++ b/Icarus/FilledSolidParamPanel/FilledSolidParamPanelVM.vb
@@ -0,0 +1,441 @@
+Imports System.Collections.ObjectModel
+Imports System.Reflection
+Imports EgtUILib
+Imports EgtWPFLib5
+
+Public Class FilledSolidParamPanelVM
+ Inherits MachiningCathegory
+
+#Region "FIELDS & PROPERTIES"
+
+ ' Definizione comandi
+ Private m_cmdOk As ICommand
+ Private m_cmdCancel As ICommand
+
+#End Region ' FIELDS & PROPERTIES
+
+#Region "CONSTRUCTORS"
+
+ Sub New()
+ ' Creo riferimento a questa classe in EgtCAM5Map
+ Map.SetRefFilledSolidParamPanelVM(Me)
+ End Sub
+
+#End Region ' CONSTRUCTORS
+
+#Region "METHODS"
+
+ Friend Sub Init()
+ If IsNothing(Map.refFilledSolidPanelVM.SelFilledSolid) Then
+ ' ripristino modalita' standard
+ Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.NULL)
+ Return
+ End If
+ Dim nPartId As Integer = Map.refTopPanelVM.SelPart.nPartId
+ Dim nFilledSolidId As Integer = GDB_ID.NULL
+ Select Case Map.refFilledSolidPanelVM.SelFilledSolid.Type
+ Case RibEntity.RibTypes.FROMDRAW
+ nFilledSolidId = Map.refFilledSolidPanelVM.SelFilledSolid.nCurveId
+ Case RibEntity.RibTypes.FROMIMPORT
+ nFilledSolidId = Map.refFilledSolidPanelVM.SelFilledSolid.nExtrusionId
+ End Select
+
+ m_Type = Cathegories.AUX_SOLID
+ m_sName = "Filled Solid"
+ m_MachiningParamList = New List(Of MachiningParam)({New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nFilledSolidId, nPartId),
+ New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nFilledSolidId, nPartId),
+ New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nFilledSolidId, nPartId),
+ New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nFilledSolidId, nPartId),
+ New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nFilledSolidId, nPartId),
+ New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nFilledSolidId, nPartId),
+ New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nFilledSolidId, nPartId),
+ New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nFilledSolidId, nPartId),
+ New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nFilledSolidId, nPartId)})
+ NotifyPropertyChanged(NameOf(MachiningParamList))
+ NotifyPropertyChanged(NameOf(sName))
+ End Sub
+
+ Friend Sub SaveCurrParams()
+ For Each Param In m_MachiningParamList
+ Param.SaveParam()
+ Next
+ End Sub
+
+ Friend Sub ResetCurrParams()
+ For Each Param In m_MachiningParamList
+ Param.ResetParam()
+ Next
+ End Sub
+
+ Friend Sub WriteParamsInFilledSolid(nRibId As Integer)
+ ' se parametri modificati
+ Dim bModified As Boolean = False
+ For Each Param In m_MachiningParamList
+ Select Case Param.GetType()
+ Case GetType(FilledSolidNumericMachiningParam)
+ Dim NumericParam As FilledSolidNumericMachiningParam = TryCast(Param, FilledSolidNumericMachiningParam)
+ If NumericParam.bIsModified AndAlso Not bModified Then bModified = True
+ NumericParam.WriteParamInFilledSolid(nRibId)
+ Case GetType(FilledSolidComboMachiningParam)
+ Dim NumericParam As FilledSolidComboMachiningParam = TryCast(Param, FilledSolidComboMachiningParam)
+ If NumericParam.bIsModified AndAlso Not bModified Then bModified = True
+ NumericParam.WriteParamInFilledSolid(nRibId)
+ End Select
+ Next
+ If bModified Then
+ ' Imposto flag di ricalcolo slice
+ EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
+ End If
+ End Sub
+
+#End Region ' METHODS
+
+#Region "COMMANDS"
+
+#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()
+ If Not IsNothing(Map.refFilledSolidPanelVM.SelFilledSolid) Then
+ ' scrivo i parametri modificati
+ Select Case Map.refFilledSolidPanelVM.SelFilledSolid.Type
+ Case FilledSolidEntity.FilledSolidTypes.FROMDRAW
+ WriteParamsInFilledSolid(Map.refFilledSolidPanelVM.SelFilledSolid.nCurveId)
+ WriteParamsInFilledSolid(Map.refFilledSolidPanelVM.SelFilledSolid.nExtrusionId)
+ Case FilledSolidEntity.FilledSolidTypes.FROMIMPORT
+ WriteParamsInFilledSolid(Map.refFilledSolidPanelVM.SelFilledSolid.nExtrusionId)
+ End Select
+ End If
+ ' ripristino modalita' standard
+ Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.NULL)
+ Map.refFilledSolidPanelVM.ResetMachParamIsChecked()
+ 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()
+ ' ripristino modalita' standard
+ Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.NULL)
+ Map.refFilledSolidPanelVM.ResetMachParamIsChecked()
+ End Sub
+
+#End Region ' Cancel
+
+#End Region ' COMMANDS
+
+End Class
+
+Public Class FilledSolidNumericMachiningParam
+ Inherits NumericMachiningParam
+
+ Public Overrides Property sValue As String
+ Get
+ Return If(m_bIsLen, LenToString(m_dValue, 1), m_dValue)
+ End Get
+ Set(value As String)
+ If m_bIsLen Then
+ StringToLen(value, m_dValue)
+ Else
+ m_dValue = value
+ End If
+ NotifyPropertyChanged(NameOf(sValue))
+ NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
+ End Set
+ End Property
+
+ Private m_dPartValue As Double
+ Public ReadOnly Property dPartValue As Double
+ Get
+ Return m_dPartValue
+ End Get
+ End Property
+
+ Public ReadOnly Property bIsModifiedFromPart As Boolean
+ Get
+ Return m_dValue <> m_dPartValue
+ End Get
+ End Property
+
+ ' Definizione comandi
+ Private m_cmdResetParam As ICommand
+
+ Sub New(Type As Params, nFilledSolidId As Integer, nPartId As Integer)
+ MyBase.New(Type)
+ Dim bReadFromPart As Boolean = False
+ Select Case Type
+ Case Params.AUXSOLIDSOVERLAP
+ bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSOVERLAP, m_dValue)
+ EgtGetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, m_dPartValue)
+ m_bIsLen = True
+ Case Params.AUXSOLIDSLINKPARAM
+ bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSLINKPARAM, m_dValue)
+ EgtGetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, m_dPartValue)
+ m_bIsLen = True
+ Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
+ bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dValue)
+ EgtGetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dPartValue)
+ m_bIsLen = True
+ Case Params.AUXSOLIDSCOASTINGLEN
+ bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSCOASTINGLEN, m_dValue)
+ EgtGetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, m_dPartValue)
+ m_bIsLen = True
+ Case Params.AUXSOLIDSWIPELEN
+ bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSWIPELEN, m_dValue)
+ EgtGetInfo(nPartId, MAC_AUXSOLIDSWIPELEN, m_dPartValue)
+ m_bIsLen = True
+ Case Params.AUXSOLIDSWIPEDIR
+ bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSWIPEDIR, m_dValue)
+ EgtGetInfo(nPartId, MAC_AUXSOLIDSWIPEDIR, m_dPartValue)
+ m_bIsLen = True
+ End Select
+ m_dOrigValue = m_dValue
+ If Not bReadFromPart Then
+ m_dValue = m_dPartValue
+ m_dOrigValue = m_dPartValue
+ End If
+ End Sub
+
+ Friend Sub WriteParamInFilledSolid(nFilledSolidId As Integer)
+ Dim sWriteValue As String = ""
+ If m_bIsLen Then
+ sWriteValue = LenToString(m_dValue, 2)
+ Else
+ sWriteValue = DoubleToString(m_dValue, 2)
+ End If
+ Select Case Type
+ Case Params.AUXSOLIDSOVERLAP
+ If bIsModifiedFromPart Then
+ EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSOVERLAP, sWriteValue)
+ Else
+ EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSOVERLAP)
+ End If
+ Case Params.AUXSOLIDSLINKPARAM
+ If bIsModifiedFromPart Then
+ EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSLINKPARAM, sWriteValue)
+ Else
+ EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSLINKPARAM)
+ End If
+ Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
+ If bIsModifiedFromPart Then
+ EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, sWriteValue)
+ Else
+ EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE)
+ End If
+ Case Params.AUXSOLIDSCOASTINGLEN
+ If bIsModifiedFromPart Then
+ EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue)
+ Else
+ EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSCOASTINGLEN)
+ End If
+ Case Params.AUXSOLIDSWIPELEN
+ If bIsModifiedFromPart Then
+ EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSWIPELEN, sWriteValue)
+ Else
+ EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSWIPELEN)
+ End If
+ Case Params.AUXSOLIDSWIPEDIR
+ If bIsModifiedFromPart Then
+ EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSWIPEDIR, sWriteValue)
+ Else
+ EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSWIPEDIR)
+ End If
+ End Select
+ End Sub
+
+ Friend Overrides Sub SaveParam()
+ m_dOrigValue = m_dValue
+ End Sub
+
+ Friend Overrides Sub ResetParam()
+ m_dValue = m_dOrigValue
+ 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_dValue = m_dPartValue
+ NotifyPropertyChanged(NameOf(sValue))
+ NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
+ End Sub
+
+#End Region ' ResetParam
+
+#End Region ' COMMANDS
+
+End Class
+
+Public Class FilledSolidComboMachiningParam
+ 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.AUXSOLIDSINFILL
+ m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL.NONE, "None"),
+ New IdNameStruct(Machining.MPAR_INFILL.OFFSET, "Offset"),
+ New IdNameStruct(Machining.MPAR_INFILL.ZIGZAG, "ZigZag")})
+ Dim nSelValue As Integer = 1
+ bReadFromRib = EgtGetInfo(nRibId, MAC_AUXSOLIDSINFILL, nSelValue)
+ If bReadFromRib Then
+ m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
+ End If
+ bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSINFILL, nSelValue)
+ m_PartSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
+ Case Params.AUXSOLIDSSTRANDORDER
+ m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_STRANDORDERS.OUTTOIN, "From Outside To Inside"),
+ New IdNameStruct(Machining.MPAR_STRANDORDERS.INTOOUT, "From Inside To Outside")})
+ Dim nSelValue As Integer = 1
+ bReadFromRib = EgtGetInfo(nRibId, MAC_AUXSOLIDSSTRANDORDER, nSelValue)
+ If bReadFromRib Then
+ m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
+ End If
+ bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDORDER, nSelValue)
+ m_PartSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
+ Case Params.AUXSOLIDSLINKTYPE
+ m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_LINKTYPES.NONE, "None"),
+ New IdNameStruct(Machining.MPAR_LINKTYPES.LINEAR, "Linear"),
+ New IdNameStruct(Machining.MPAR_LINKTYPES.BIARC, "Biarc")})
+ Dim nSelValue As Integer = 1
+ bReadFromRib = EgtGetInfo(nRibId, MAC_AUXSOLIDSLINKTYPE, nSelValue)
+ If bReadFromRib Then
+ m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
+ End If
+ bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSLINKTYPE, 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
+ Else
+ Select Case Type
+ Case Params.AUXSOLIDSINFILL
+ m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_INFILL.NONE)
+ m_SelValue = m_OrigSelValue
+ Case Params.AUXSOLIDSSTRANDORDER
+ m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_STRANDORDERS.OUTTOIN)
+ m_SelValue = m_OrigSelValue
+ Case Params.AUXSOLIDSLINKTYPE
+ m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_LINKTYPES.NONE)
+ m_SelValue = m_OrigSelValue
+ End Select
+ End If
+ End If
+ End Sub
+
+ Friend Sub WriteParamInFilledSolid(nRibId As Integer)
+ Select Case Type
+ Case Params.AUXSOLIDSINFILL
+ If bIsModifiedFromPart Then
+ EgtSetInfo(nRibId, MAC_AUXSOLIDSINFILL, m_SelValue.Id)
+ Else
+ EgtRemoveInfo(nRibId, MAC_AUXSOLIDSINFILL)
+ End If
+ Case Params.AUXSOLIDSSTRANDORDER
+ If bIsModifiedFromPart Then
+ EgtSetInfo(nRibId, MAC_AUXSOLIDSSTRANDORDER, m_SelValue.Id)
+ Else
+ EgtRemoveInfo(nRibId, MAC_AUXSOLIDSSTRANDORDER)
+ End If
+ Case Params.AUXSOLIDSLINKTYPE
+ If bIsModifiedFromPart Then
+ EgtSetInfo(nRibId, MAC_AUXSOLIDSLINKTYPE, m_SelValue.Id)
+ Else
+ EgtRemoveInfo(nRibId, MAC_AUXSOLIDSLINKTYPE)
+ 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
diff --git a/Icarus/Icarus.vbproj b/Icarus/Icarus.vbproj
index 112989c..94de932 100644
--- a/Icarus/Icarus.vbproj
+++ b/Icarus/Icarus.vbproj
@@ -149,6 +149,14 @@
DispositionPanelV.xaml
+
+ FilledSolidPanelV.xaml
+
+
+
+ FilledSolidParamPanelV.xaml
+
+ ImportExportMachiningPanelV.xaml
@@ -281,6 +289,9 @@
StartMachPanelV.xaml
+
+ MessagePanelV.xaml
+ StatusBarV.xaml
@@ -342,6 +353,14 @@
MSBuild:CompileDesigner
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+ DesignerXamlIntelliSenseFileGenerator
@@ -486,6 +505,10 @@
MSBuild:CompileDesigner
+
+ Designer
+ MSBuild:Compile
+ MSBuild:CompileDesigner
@@ -753,6 +776,9 @@
+
+
+ IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Icarus\IcarusR32.exe
diff --git a/Icarus/LeftPanel/LeftPanelV.xaml b/Icarus/LeftPanel/LeftPanelV.xaml
index 298132e..1d611b8 100644
--- a/Icarus/LeftPanel/LeftPanelV.xaml
+++ b/Icarus/LeftPanel/LeftPanelV.xaml
@@ -36,7 +36,7 @@
-
+
diff --git a/Icarus/LeftPanel/LeftPanelVM.vb b/Icarus/LeftPanel/LeftPanelVM.vb
index 505bbd6..e69b106 100644
--- a/Icarus/LeftPanel/LeftPanelVM.vb
+++ b/Icarus/LeftPanel/LeftPanelVM.vb
@@ -39,6 +39,8 @@ Public Class LeftPanelVM
Map.refRibPanelVM.Dispose()
Case Panels.SHELLNUMBER
Map.refShellNumberPanelVM.Dispose()
+ Case Panels.AUXSOLIDS
+ Map.refFilledSolidPanelVM.Dispose()
End Select
m_SelPanel = Panel
Select Case Panel
@@ -54,8 +56,9 @@ Public Class LeftPanelVM
Map.refRibPanelVM.Init()
Case Panels.SHELLNUMBER
Map.refShellNumberPanelVM.Init()
+ Case Panels.AUXSOLIDS
+ Map.refFilledSolidPanelVM.Init()
Case Panels.MODIFYPART
- ''Map.refModifyPartPanelVM.Init()
Map.refManagePartPanelVM.Init(ManagePartPanelVM.ManagePartType.MODIFY)
End Select
If Not IsNothing(Map.refViewLayerManagerVM) Then Map.refViewLayerManagerVM.UpdateForced()
diff --git a/Icarus/ManagePartPanel/ManagePartPanelVM.vb b/Icarus/ManagePartPanel/ManagePartPanelVM.vb
index 7f83613..388f587 100644
--- a/Icarus/ManagePartPanel/ManagePartPanelVM.vb
+++ b/Icarus/ManagePartPanel/ManagePartPanelVM.vb
@@ -375,27 +375,33 @@ Public Class ManagePartPanelVM
nShellNumberLayerId = EgtCreateGroup(nPartId)
EgtSetName(nShellNumberLayerId, LAY_SHELL_NBR)
EgtSetColor(nShellNumberLayerId, GeomEntityColors.c3ShellNumber)
+ Dim nShellNumberIndex As Integer = 1
For Each PartManager_GeomEntity In ManagePart_Layer.EntityList
EgtSetInfo(PartManager_GeomEntity.nId, KEY_SHELLNBR_TYPE, ShellNumberEntity.ShellNumberTypes.FROMIMPORT)
+ EgtSetInfo(PartManager_GeomEntity.nId, SHELLNUMBER_ID, nShellNumberIndex)
EgtRelocateGlob(PartManager_GeomEntity.nId, nShellNumberLayerId, 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
+ nShellNumberIndex += 1
Next
Case ManagePart_Layer.LayerType.AUX_SOLIDS
nAuxSolidsLayerId = EgtCreateGroup(nPartId)
EgtSetName(nAuxSolidsLayerId, LAY_AUX_SOLIDS)
EgtSetColor(nAuxSolidsLayerId, GeomEntityColors.c3AuxSolids)
+ Dim nFilledSolidIndex As Integer = 1
For Each PartManager_GeomEntity In ManagePart_Layer.EntityList
EgtSetInfo(PartManager_GeomEntity.nId, KEY_AUXSOLID_TYPE, RibEntity.RibTypes.FROMIMPORT)
+ EgtSetInfo(PartManager_GeomEntity.nId, FILLEDSOLID_ID, nFilledSolidIndex)
EgtRelocateGlob(PartManager_GeomEntity.nId, nAuxSolidsLayerId, 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
+ nFilledSolidIndex += 1
Next
Case ManagePart_Layer.LayerType.OTHERS
nOthersLayerId = EgtCreateGroup(nPartId)
diff --git a/Icarus/ManagePartPanel/ManagePartUtility.vb b/Icarus/ManagePartPanel/ManagePartUtility.vb
index 267900f..cb96f95 100644
--- a/Icarus/ManagePartPanel/ManagePartUtility.vb
+++ b/Icarus/ManagePartPanel/ManagePartUtility.vb
@@ -512,11 +512,11 @@ Public Class ManagePart_Layer
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
+ Dim FIlledSolidType As Integer = FilledSolidEntity.FilledSolidTypes.FROMDRAW
+ EgtGetInfo(nEntityId, KEY_AUXSOLID_TYPE, FIlledSolidType)
+ If FIlledSolidType = FilledSolidEntity.FilledSolidTypes.FROMIMPORT Then
+ m_EntityList.Add(New PartManager_GeomEntity(Me, nEntityId))
+ End If
nEntityId = EgtGetNext(nEntityId)
End While
Case LayerType.OTHERS
@@ -835,31 +835,27 @@ Public Class GeomEntity_MenuItem
Select Case m_Type
Case ManagePart_Layer.LayerType.PRINT_SOLID
EgtSetName(m_OrigEntity.nId, PRINT_SOLID)
- EgtSetColor(m_OrigEntity.nId, c3Print)
' rimuovo eventuale nota spostamento per 45 gradi
EgtRemoveInfo(m_OrigEntity.OrigLayer.OrigPart.nId, KEY_MOVEDPART)
bIsMovedPartOrRib = True
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)
EgtSetInfo(m_OrigEntity.nId, RIB_ID, RibPanelVM.GetNextRibIndex())
- EgtSetColor(m_OrigEntity.nId, c3Rib)
bIsMovedPartOrRib = True
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
+ ' resetto colore entita'
+ EgtResetColor(m_OrigEntity.nId)
' se spostato un Rib, aggiorno posizione riferimento e pezzo
If bIsMovedPartOrRib Then
Map.refReferencePanelVM.UpdateFramePosition(NewPart.PrintPart)
diff --git a/Icarus/Project/ProjectV.xaml b/Icarus/Project/ProjectV.xaml
index 1a0fe9c..a0ab6d4 100644
--- a/Icarus/Project/ProjectV.xaml
+++ b/Icarus/Project/ProjectV.xaml
@@ -30,6 +30,9 @@
+
diff --git a/Icarus/Resources/CurrMachining/SaveInDb.png b/Icarus/Resources/CurrMachining/SaveInDb.png
new file mode 100644
index 0000000..22e7041
Binary files /dev/null and b/Icarus/Resources/CurrMachining/SaveInDb.png differ
diff --git a/Icarus/Resources/ProjectManager/Import.png b/Icarus/Resources/ProjectManager/Import.png
index 5fb8d4b..ba84af5 100644
Binary files a/Icarus/Resources/ProjectManager/Import.png and b/Icarus/Resources/ProjectManager/Import.png differ
diff --git a/Icarus/Resources/TopPanel/MaterialDb.horizontal.png b/Icarus/Resources/TopPanel/MaterialDb.horizontal.png
new file mode 100644
index 0000000..263a51f
Binary files /dev/null and b/Icarus/Resources/TopPanel/MaterialDb.horizontal.png differ
diff --git a/Icarus/Resources/TopPanel/MaterialDb.png b/Icarus/Resources/TopPanel/MaterialDb.png
index 263a51f..91c78d9 100644
Binary files a/Icarus/Resources/TopPanel/MaterialDb.png and b/Icarus/Resources/TopPanel/MaterialDb.png differ
diff --git a/Icarus/Resources/TopPanel/Offset.png b/Icarus/Resources/TopPanel/Offset.png
index 508de53..50d8421 100644
Binary files a/Icarus/Resources/TopPanel/Offset.png and b/Icarus/Resources/TopPanel/Offset.png differ
diff --git a/Icarus/Resources/TopPanel/StrandH.png b/Icarus/Resources/TopPanel/StrandH.png
index 15df1b6..b2a9d00 100644
Binary files a/Icarus/Resources/TopPanel/StrandH.png and b/Icarus/Resources/TopPanel/StrandH.png differ
diff --git a/Icarus/Resources/TopPanel/StrandW.png b/Icarus/Resources/TopPanel/StrandW.png
index 5968c91..60e1153 100644
Binary files a/Icarus/Resources/TopPanel/StrandW.png and b/Icarus/Resources/TopPanel/StrandW.png differ
diff --git a/Icarus/RibPanel/RibPanelVM.vb b/Icarus/RibPanel/RibPanelVM.vb
index 5be6e39..22a65c4 100644
--- a/Icarus/RibPanel/RibPanelVM.vb
+++ b/Icarus/RibPanel/RibPanelVM.vb
@@ -555,10 +555,8 @@ Public Class RibPanelVM
Dim nNewEntityId As Integer = EgtCreateSurfTmByRegionExtrusion(m_nRibLayerId, 1, {m_SelRib.nCurveId}, Vector3d.Z_AX * dExtrusionLength, EPS_STM)
EgtSetName(nNewEntityId, RIB_EXTRUSION)
EgtSetInfo(nNewEntityId, KEY_EXTRUSION_LENGTH, dExtrusionLength)
- ' coloro l'entita' di viola
- Dim c3LightBlue As Color3d
- c3LightBlue.FromColor(System.Drawing.Color.MediumOrchid)
- EgtSetColor(nNewEntityId, c3LightBlue)
+ ' resetto colore entita'
+ EgtResetColor(nNewEntityId)
' aggiorno riferimento nella curva
m_SelRib.SetExtrusionId(nNewEntityId)
' seleziono nuova estrusione
@@ -580,6 +578,12 @@ Public Class RibPanelVM
' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull()
End Select
+ Select Case command
+ Case Controller.CMD.LINE2P, Controller.CMD.DELETE, Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE, Controller.CMD.EXTRUDE,
+ Controller.CMD.MOVE, Controller.CMD.ROTATE
+ ' Imposto flag di ricalcolo slice
+ EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
+ End Select
If command <> Controller.CMD.LINE2P AndAlso command <> Controller.CMD.EXTRUDE Then Return
' se finita creazione estrusione
If m_bIsCreatingExtrusion Then
@@ -597,10 +601,8 @@ Public Class RibPanelVM
Dim dExtrusionLength As Double = 0
StringToLen(Map.refControllerInputPanelVM.Text, dExtrusionLength)
EgtSetInfo(nNewEntityId, KEY_EXTRUSION_LENGTH, dExtrusionLength)
- ' coloro l'entita' di blu
- Dim c3LightBlue As Color3d
- c3LightBlue.FromColor(System.Drawing.Color.MediumOrchid)
- EgtSetColor(nNewEntityId, c3LightBlue)
+ ' resetto colore entita'
+ EgtResetColor(nNewEntityId)
'' lo sposto nel layer dei rib
EgtRelocateGlob(nNewEntityId, m_nRibLayerId, GDB_POS.LAST_SON)
' aggiungo riferimento a curva
@@ -623,10 +625,8 @@ Public Class RibPanelVM
Dim NewGeomType As GDB_TY = EgtGetType(nNewEntityId)
If NewGeomType = GDB_TY.CRV_COMPO Then
EgtSetName(nNewEntityId, RIB_CURVE)
- ' coloro l'entita' di blu
- Dim c3LightBlue As Color3d
- c3LightBlue.FromColor(System.Drawing.Color.MediumOrchid)
- EgtSetColor(nNewEntityId, c3LightBlue)
+ ' resetto colore entita'
+ EgtResetColor(nNewEntityId)
' lo sposto nel layer dei rib
EgtRelocateGlob(nNewEntityId, m_nRibLayerId, GDB_POS.LAST_SON)
' lo aggiungo alla lista
@@ -653,12 +653,6 @@ Public Class RibPanelVM
' cancello layer di disegno
EgtErase(nNewRibLayerId)
End If
- Select Case command
- Case Controller.CMD.LINE2P, Controller.CMD.DELETE, Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE, Controller.CMD.EXTRUDE,
- Controller.CMD.MOVE, Controller.CMD.ROTATE
- ' Imposto flag di ricalcolo slice
- EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
- End Select
End Sub
Friend Sub OnKeyDown(Key As Forms.Keys)
diff --git a/Icarus/RightPanel/RightPanelV.xaml b/Icarus/RightPanel/RightPanelV.xaml
index b453b10..0c11cf0 100644
--- a/Icarus/RightPanel/RightPanelV.xaml
+++ b/Icarus/RightPanel/RightPanelV.xaml
@@ -32,7 +32,7 @@
-
+
diff --git a/Icarus/RightPanel/RightPanelVM.vb b/Icarus/RightPanel/RightPanelVM.vb
index 3409383..55447cb 100644
--- a/Icarus/RightPanel/RightPanelVM.vb
+++ b/Icarus/RightPanel/RightPanelVM.vb
@@ -54,6 +54,8 @@ Public Class RightPanelVM
Map.refRibParamPanelVM.Init()
Case Panels.SHELLNUMBERPARAM
Map.refShellNumberParamPanelVM.Init()
+ Case Panels.AUXSOLIDPARAM
+ Map.refFilledSolidParamPanelVM.Init()
Case Panels.TFSEDITOR
'Map.refTFSEditorVM.Refresh()
Case Panels.SIMULATION
diff --git a/Icarus/SceneHost/MySceneHostVM.vb b/Icarus/SceneHost/MySceneHostVM.vb
index 215ea67..32bb71f 100644
--- a/Icarus/SceneHost/MySceneHostVM.vb
+++ b/Icarus/SceneHost/MySceneHostVM.vb
@@ -536,6 +536,75 @@ Public Class MySceneHostVM
End If
End Sub
+ Public Sub InsertFilledSolid()
+ ' Recupero cartella dell'ultimo progetto aperto
+ Dim sDir As String = MainController.GetCurrFile()
+ If String.IsNullOrWhiteSpace(sDir) Then
+ GetMainPrivateProfileString(S_MRUIMPORTFILES, K_FILE & 1, "", sDir)
+ End If
+ If Not String.IsNullOrWhiteSpace(sDir) Then
+ sDir = Path.GetDirectoryName(sDir)
+ End If
+ If Not Directory.Exists(sDir) Then sDir = ""
+ Dim OpenFileDialog As New OpenFileDialog With {.Title = "Insert",
+ .Filter = "Stereolithography (*.stl)|*.stl" &
+ "|Iges files (*.igs;*.iges)|*.igs;*.iges" &
+ "|Step files (*.stp;*.step)|*.stp;*.step" &
+ "|3D Manufacturing format (*.3mf)|*.3mf" &
+ "|New geometry EgalTech(*.nge)|*.nge" &
+ "|All Files (*.*)|*.*",
+ .FilterIndex = 1,
+ .InitialDirectory = sDir}
+ If Not OpenFileDialog.ShowDialog Then
+ Return
+ End If
+ Dim sFile As String = String.Empty
+ sFile = OpenFileDialog.FileName
+ ' importo la nuova geometria
+ If MainController.InsertProject(sFile, False) Then
+ ' sposto le nuove geometrie nel layer ShellNumber del pezzo
+ Dim nNewPartId As Integer = EgtGetLastPart()
+ Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
+ Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId)
+ While nNewEntityId <> GDB_ID.NULL
+ Dim EntityType As GDB_TY = EgtGetType(nNewEntityId)
+ Select Case EntityType
+ Case GDB_TY.CRV_COMPO, GDB_TY.CRV_LINE, GDB_TY.CRV_ARC
+ Dim nNewFilledSolidId As Integer = nNewEntityId
+ If EntityType = GDB_TY.CRV_LINE OrElse EntityType = GDB_TY.CRV_ARC Then
+ nNewFilledSolidId = EgtCreateCurveCompo(Map.refTopPanelVM.SelPart.nPartId, nNewEntityId, False)
+ Else
+ ' lo copio nel layer dei shellnumber
+ nNewFilledSolidId = EgtCopy(nNewEntityId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON)
+ End If
+ EgtSetName(nNewFilledSolidId, RIB_CURVE)
+ ' elimino colore entita'
+ EgtResetColor(nNewEntityId)
+ ' lo aggiungo alla lista
+ Dim NewEntity As FilledSolidEntity = New FilledSolidEntity(FilledSolidEntity.FilledSolidTypes.FROMIMPORT, nNewFilledSolidId)
+ Map.refFilledSolidPanelVM.FilledSolidList.Add(NewEntity)
+ Case GDB_TY.SRF_MESH, GDB_TY.SRF_FRGN, GDB_TY.SRF_BEZ
+ Dim nNewFilledSolidId = nNewEntityId
+ ' lo copio nel layer dei rib
+ nNewFilledSolidId = EgtCopy(nNewEntityId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON)
+ EgtSetName(nNewFilledSolidId, RIB_EXTRUSION)
+ ' elimino colore entita'
+ EgtResetColor(nNewEntityId)
+ ' lo aggiungo alla lista
+ Dim NewEntity As FilledSolidEntity = New FilledSolidEntity(FilledSolidEntity.FilledSolidTypes.FROMIMPORT, nNewFilledSolidId)
+ Map.refFilledSolidPanelVM.FilledSolidList.Add(NewEntity)
+ End Select
+ nNewEntityId = EgtGetNext(nNewEntityId)
+ End While
+ EgtErase(nNewPartId)
+ ' seleziono ultima rib
+ Map.refFilledSolidPanelVM.SelLastFilledSolid()
+ EgtDraw()
+ ' Imposto flag di ricalcolo slice
+ EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
+ End If
+ End Sub
+
Public Overrides Sub ImportProject()
Dim sDir As String = String.Empty
GetMainPrivateProfileString(S_MRUIMPORT, K_FILE & "1", "", sDir)
@@ -632,6 +701,8 @@ Public Class MySceneHostVM
Rib_OnMouseDownScene(sender, e)
Case ModifyModes.SHELLNUMBER
ShellNumber_OnMouseDownScene(sender, e)
+ Case ModifyModes.AUXSOLIDS
+ FilledSolid_OnMouseDownScene(sender, e)
End Select
ElseIf Map.refTopPanelVM.SelPage = Pages.IMPORT Then
Import_OnMouseDownScene(sender, e)
@@ -678,6 +749,8 @@ Public Class MySceneHostVM
Rib_OnMouseMoveScene(sender, e)
Case ModifyModes.SHELLNUMBER
ShellNumber_OnMouseMoveScene(sender, e)
+ Case ModifyModes.AUXSOLIDS
+ FilledSolid_OnMouseMoveScene(sender, e)
End Select
ElseIf Map.refTopPanelVM.SelPage = Pages.IMPORT Then
Import_OnMouseMoveScene(sender, e)
@@ -723,6 +796,8 @@ Public Class MySceneHostVM
Rib_OnMouseUpScene(sender, e)
Case ModifyModes.SHELLNUMBER
ShellNumber_OnMouseUpScene(sender, e)
+ Case ModifyModes.AUXSOLIDS
+ FilledSolid_OnMouseUpScene(sender, e)
End Select
ElseIf Map.refTopPanelVM.SelPage = Pages.IMPORT Then
Import_OnMouseUpScene(sender, e)
@@ -767,6 +842,7 @@ Public Class MySceneHostVM
Case ModifyModes.SHELLNUMBER
bOk = Map.refShellNumberPanelVM.OnMouseSelectingObj(nId)
Case ModifyModes.AUXSOLIDS
+ bOk = Map.refFilledSolidPanelVM.OnMouseSelectingObj(nId)
End Select
End If
End Sub
@@ -871,6 +947,7 @@ Public Class MySceneHostVM
Case ModifyModes.SHELLNUMBER
Map.refShellNumberPanelVM.OnKeyDown(e.KeyData)
Case ModifyModes.AUXSOLIDS
+ Map.refFilledSolidPanelVM.OnKeyDown(e.KeyData)
End Select
End If
'' Se in modalità edit L250
@@ -1140,6 +1217,7 @@ Public Class MySceneHostVM
Case ModifyModes.SHELLNUMBER
Map.refShellNumberPanelVM.UpdateUI()
Case ModifyModes.AUXSOLIDS
+ Map.refFilledSolidPanelVM.UpdateUI()
End Select
End If
' aggiorno titolo
@@ -1159,6 +1237,7 @@ Public Class MySceneHostVM
Case ModifyModes.SHELLNUMBER
Map.refShellNumberPanelVM.OnExecCmdEnd(command)
Case ModifyModes.AUXSOLIDS
+ Map.refFilledSolidPanelVM.OnExecCmdEnd(command)
End Select
End If
End Sub
@@ -1551,6 +1630,88 @@ Public Class MySceneHostVM
#End Region ' ShellNumber
+#Region "FilledSolid"
+
+ Friend Sub FilledSolid_OnMouseDownScene(sender As Object, e As Forms.MouseEventArgs)
+ m_nIdToSel = GDB_ID.NULL
+ ' Verifico se selezionato indicativo di pezzo
+ EgtSetObjFilterForSelWin(True, True, True, True, True)
+ Dim nSel As Integer
+ EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel)
+ Dim nId As Integer = EgtGetFirstObjInSelWin()
+ While nId <> GDB_ID.NULL
+ ' Se per Griglia da faccia di oggetto
+ If Map.refFilledSolidPanelVM.bCPlaneObj_IsActive Then
+ If EgtGetType(nId) = GDB_TY.SRF_MESH Then
+ m_nIdToSel = nId
+ Exit While
+ End If
+ Else
+ Dim nFilledSolidLayerId As Integer = EgtGetParent(nId)
+ If nFilledSolidLayerId = Map.refFilledSolidPanelVM.nFilledSolidLayerId Then
+ m_nIdToSel = nId
+ Exit While
+ End If
+ End If
+ nId = EgtGetNextObjInSelWin()
+ End While
+ If Map.refFilledSolidPanelVM.bCPlaneObj_IsActive And 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
+ m_bDragToStart = True
+ End Sub
+
+ Friend Sub FilledSolid_OnMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
+ ' Se drag non abilitato o già in esecuzione, esco
+ If Not m_bDragToStart Then Return
+ ' Se primo movimento di drag, verifico di aver superato la soglia di movimento in pixel
+ If m_bDragToStart Then
+ If Math.Abs(e.Location.X - m_locPrev.X) < m_nRestRadius And
+ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
+ Return
+ End If
+ m_bDragToStart = False
+ End If
+ End Sub
+
+ Friend Sub FilledSolid_OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
+ ' Se eseguito drag
+ If Not m_bDragToStart Then
+
+ ' Se selezione da eseguire
+ ElseIf m_nIdToSel <> GDB_ID.NULL Then
+ If Map.refFilledSolidPanelVM.bCPlaneObj_IsActive Then
+ ' eseguo comando
+ Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
+ Map.refFilledSolidPanelVM.ResetCPlaneObjIsActive()
+ ' ripristino selezioni precedenti
+ For Each Id In Map.refFilledSolidPanelVM.PrevSelObjs
+ EgtSelectObj(Id)
+ Next
+ Map.refControllerInputPanelVM.ResetInputBox()
+ Else
+ ' eseguo la selezione
+ Map.refFilledSolidPanelVM.SelStartFromId(m_nIdToSel)
+ End If
+ End If
+ ' Reset
+ m_bDrag = False
+ m_nIdToSel = GDB_ID.NULL
+ m_nIdToDesel = GDB_ID.NULL
+ EgtDraw()
+ End Sub
+
+#End Region ' FilledSolid
+
#End Region ' VIEW EVENTS
End Class
diff --git a/Icarus/ShellNumberPanel/ShellNumberPanelVM.vb b/Icarus/ShellNumberPanel/ShellNumberPanelVM.vb
index f9caf2f..97ba11d 100644
--- a/Icarus/ShellNumberPanel/ShellNumberPanelVM.vb
+++ b/Icarus/ShellNumberPanel/ShellNumberPanelVM.vb
@@ -535,10 +535,8 @@ Public Class ShellNumberPanelVM
Dim nNewEntityId As Integer = EgtCreateSurfTmByRegionExtrusion(m_nShellNumberLayerId, 1, {m_SelShellNumber.nCurveId}, Vector3d.Z_AX * dExtrusionLength, EPS_STM)
EgtSetName(nNewEntityId, RIB_EXTRUSION)
EgtSetInfo(nNewEntityId, KEY_EXTRUSION_LENGTH, dExtrusionLength)
- ' coloro l'entita' di verde
- Dim c3LightBlue As Color3d
- c3LightBlue.FromColor(System.Drawing.Color.Lime)
- EgtSetColor(nNewEntityId, c3LightBlue)
+ ' resetto colore entita'
+ EgtResetColor(nNewEntityId)
' aggiorno riferimento nella curva
m_SelShellNumber.SetExtrusionId(nNewEntityId)
' seleziono nuova estrusione
@@ -560,6 +558,12 @@ Public Class ShellNumberPanelVM
' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull()
End Select
+ Select Case command
+ Case Controller.CMD.LINE2P, Controller.CMD.DELETE, Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE, Controller.CMD.EXTRUDE,
+ Controller.CMD.MOVE, Controller.CMD.ROTATE
+ ' Imposto flag di ricalcolo slice
+ EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
+ End Select
If command <> Controller.CMD.LINE2P AndAlso command <> Controller.CMD.EXTRUDE Then Return
' se finita creazione estrusione
If m_bIsCreatingExtrusion Then
@@ -577,10 +581,8 @@ Public Class ShellNumberPanelVM
Dim dExtrusionLength As Double = 0
StringToLen(Map.refControllerInputPanelVM.Text, dExtrusionLength)
EgtSetInfo(nNewEntityId, KEY_EXTRUSION_LENGTH, dExtrusionLength)
- ' coloro l'entita' di verde
- Dim c3LightBlue As Color3d
- c3LightBlue.FromColor(System.Drawing.Color.Lime)
- EgtSetColor(nNewEntityId, c3LightBlue)
+ ' resetto colore entita'
+ EgtResetColor(nNewEntityId)
'' lo sposto nel layer dei rib
EgtRelocateGlob(nNewEntityId, m_nShellNumberLayerId, GDB_POS.LAST_SON)
' aggiungo riferimento a curva
@@ -606,10 +608,8 @@ Public Class ShellNumberPanelVM
EgtCloseCurveCompo(nNewEntityId)
End If
EgtSetName(nNewEntityId, RIB_CURVE)
- ' coloro l'entita' di verde
- Dim c3LightBlue As Color3d
- c3LightBlue.FromColor(System.Drawing.Color.Lime)
- EgtSetColor(nNewEntityId, c3LightBlue)
+ ' resetto colore entita'
+ EgtResetColor(nNewEntityId)
' lo sposto nel layer dei rib
EgtRelocateGlob(nNewEntityId, m_nShellNumberLayerId, GDB_POS.LAST_SON)
' lo aggiungo alla lista
@@ -636,12 +636,6 @@ Public Class ShellNumberPanelVM
' cancello layer di disegno
EgtErase(nNewRibLayerId)
End If
- Select Case command
- Case Controller.CMD.LINE2P, Controller.CMD.DELETE, Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE, Controller.CMD.EXTRUDE,
- Controller.CMD.MOVE, Controller.CMD.ROTATE
- ' Imposto flag di ricalcolo slice
- EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
- End Select
End Sub
Friend Sub OnKeyDown(Key As Forms.Keys)
@@ -679,6 +673,20 @@ Public Class ShellNumberPanelVM
NotifyPropertyChanged(NameOf(SelShellNumber))
End Sub
+ Friend Shared Function GetNextShellNumberIndex()
+ Dim nShellNumberIndex As Integer = 0
+ Dim nShellNumberId As Integer = EgtGetFirstInGroup(Map.refTopPanelVM.SelPart.nShellNumberLayerId)
+ While nShellNumberId <> GDB_ID.NULL
+ Dim nCurrIndex As Integer = GDB_ID.NULL
+ EgtGetInfo(nShellNumberId, SHELLNUMBER_ID, nCurrIndex)
+ If nCurrIndex > nShellNumberIndex Then
+ nShellNumberIndex = nCurrIndex
+ End If
+ nShellNumberId = EgtGetNext(nShellNumberId)
+ End While
+ Return nShellNumberIndex + 1
+ End Function
+
#End Region ' METHODS
#Region "COMMANDS"
@@ -1338,7 +1346,10 @@ Public Class ShellNumberEntity
End Property
Sub New(Type As ShellNumberTypes, nId As Integer)
- m_nIndex = nSharedIndex
+ If Not EgtGetInfo(nId, SHELLNUMBER_ID, m_nIndex) Then
+ m_nIndex = ShellNumberPanelVM.GetNextShellNumberIndex()
+ EgtSetInfo(nId, SHELLNUMBER_ID, m_nIndex)
+ End If
m_Type = Type
EgtSetInfo(nId, KEY_SHELLNBR_TYPE, Type)
Select Case Type
diff --git a/Icarus/StatusBar/MessagePanelV.xaml b/Icarus/StatusBar/MessagePanelV.xaml
new file mode 100644
index 0000000..3f73472
--- /dev/null
+++ b/Icarus/StatusBar/MessagePanelV.xaml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
diff --git a/Icarus/StatusBar/MessagePanelV.xaml.vb b/Icarus/StatusBar/MessagePanelV.xaml.vb
new file mode 100644
index 0000000..6cfd9d2
--- /dev/null
+++ b/Icarus/StatusBar/MessagePanelV.xaml.vb
@@ -0,0 +1,3 @@
+Public Class MessagePanelV
+
+End Class
diff --git a/Icarus/StatusBar/MyStatusBarVM.vb b/Icarus/StatusBar/MyStatusBarVM.vb
index b88ad8d..b5d9bd8 100644
--- a/Icarus/StatusBar/MyStatusBarVM.vb
+++ b/Icarus/StatusBar/MyStatusBarVM.vb
@@ -1,4 +1,5 @@
-Imports System.Runtime.InteropServices
+Imports System.Globalization
+Imports System.Runtime.InteropServices
Imports System.Threading
Imports EgtUILib
Imports EgtWPFLib5
@@ -224,3 +225,20 @@ Public Class MyStatusBarVM
#End Region ' COMMANDS
End Class
+
+Public Class StringToVisibilityConverter
+ Implements IValueConverter
+
+ Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
+ If TypeOf value Is String Then
+ Dim sValue As String = CStr(value)
+ Return If(String.IsNullOrWhiteSpace(sValue), Visibility.Collapsed, Visibility.Visible)
+ End If
+ Return Visibility.Collapsed
+ End Function
+
+ Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
+ Throw New NotImplementedException()
+ End Function
+
+End Class
\ No newline at end of file
diff --git a/Icarus/TopPanel/TopPanelV.xaml b/Icarus/TopPanel/TopPanelV.xaml
index ea28475..881c61d 100644
--- a/Icarus/TopPanel/TopPanelV.xaml
+++ b/Icarus/TopPanel/TopPanelV.xaml
@@ -126,10 +126,8 @@
Style="{StaticResource TopPanel_ComboBox}" Grid.RowSpan="2"/>
@@ -176,76 +174,52 @@
-
+
-
-
-
-
-
diff --git a/Icarus/Utility/Dictionary.xaml b/Icarus/Utility/Dictionary.xaml
index f86dd7f..55518c5 100644
--- a/Icarus/Utility/Dictionary.xaml
+++ b/Icarus/Utility/Dictionary.xaml
@@ -43,6 +43,8 @@
+
+
@@ -117,6 +119,9 @@
None
+
+
+
diff --git a/Icarus/Utility/Map.vb b/Icarus/Utility/Map.vb
index 7698fe0..837d91b 100644
--- a/Icarus/Utility/Map.vb
+++ b/Icarus/Utility/Map.vb
@@ -5,49 +5,18 @@ Module Map
Private m_refMainWindowVM As MainWindowVM
Private m_refMyStatusBarVM As MyStatusBarVM
Private m_refProjManagerVM As ProjManagerVM
- 'Private m_refProdManagerVM As ProdManagerVM
Private m_refProjectVM As ProjectVM
Private m_refSecondaryWindowVM As SecondaryWindowVM
Private m_refSecondaryWindowV As SecondaryWindowV
- 'Private m_refMainMenuVM As MainMenuVM
Private m_refMachinePanelVM As MachinePanelVM
- ''Private m_refMyMachGroupPanelVM As MyMachGroupPanelVM
Private m_refLeftPanelVM As LeftPanelVM
Private m_refRightPanelVM As RightPanelVM
Private m_refDispositionPanelVM As DispositionPanelVM
Private m_refStartMachPanelVM As StartMachPanelVM
Private m_refRibPanelVM As RibPanelVM
Private m_refControllerInputPanelVM As ControllerInputPanelVM
- 'Private m_refBottomPanelVM As BottomPanelVM
- 'Private m_refShowBeamPanelVM As ShowBeamPanelVM
- 'Private m_refConfigurationPageVM As ConfigurationPageVM
- 'Private m_refRawPartListVM As RawPartListVM
- 'Private m_refPartInRawPartListVM As PartInRawPartListVM
- 'Private m_refWarehouseWndVM As WarehouseWndVM
- 'Private m_refFeatureListVM As FeatureListVM
- 'Private m_refFreeContourManagerVM As FreeContourManagerVM
- 'Private m_refFreeContourInputVM As FreeContourInputVM
- 'Private m_refPartManagerVM As PartManagerVM
Private m_refInstrumentPanelVM As InstrumentPanelVM
Private m_refTopPanelVM As TopPanelVM
- 'Private m_refOptimizePanelVM As OptimizePanelVM
- 'Private m_refCALCPanelVM As CALCPanelVM
- 'Private m_refPartListVM As BTLPartListVM
- 'Private m_refFeatureInPartInRawPartListVM As FeatureInPartInRawPartListVM
- 'Private m_refStatisticsVM As StatisticsVM
- 'Private m_refPParameterListVM As PParameterListVM
- 'Private m_refQParameterListVM As QParameterListVM
- 'Private m_refFeatureManagerVM As FeatureManagerVM
- 'Private m_refAddSectionXMaterialWndVM As AddSectionXMaterialWndVM
- 'Private m_refStatisticsTimePanelVM As StatisticsTimePanelVM
- 'Private m_refOpenProjectFileDialogVM As OpenProjectFileDialogVM
- 'Private m_refRawPartTabVM As RawPartTabVM
- 'Private m_refNestingTabVM As NestingTabVM
- 'Private m_refMachiningTabVM As MachiningTabVM
- 'Private m_refSplitModeVM As SplitModeVM
- 'Private m_refMoveRawModeVM As MoveRawModeVM
- 'Private m_refSimulTabVM As SimulTabVM
- ''Private m_refImportPanelVM As ImportPanelVM
Private m_refSliceManagerVM As SliceManagerVM
Private m_refTFSEditorVM As TFSEditorVM
Private m_refCurrMachiningPanelVM As CurrMachiningPanelVM
@@ -60,8 +29,9 @@ Module Map
Private m_refViewLayerManagerVM As ViewLayerManagerVM
Private m_refShellNumberPanelVM As ShellNumberPanelVM
Private m_refShellNumberParamPanelVM As ShellNumberParamPanelVM
+ Private m_refFilledSolidPanelVM As FilledSolidPanelVM
+ Private m_refFilledSolidParamPanelVM As FilledSolidParamPanelVM
Private m_refSplashScreen As SplashScreen
- ''Private m_refModifyPartPanelVM As ModifyPartPanelVM
Private m_refManagePartPanelVM As ManagePartPanelVM
#Region "Get"
@@ -113,12 +83,6 @@ Module Map
End Get
End Property
- 'Public ReadOnly Property refMainMenuVM As MainMenuVM
- ' Get
- ' Return m_refMainMenuVM
- ' End Get
- 'End Property
-
Public ReadOnly Property refMachinePanelVM As MachinePanelVM
Get
Return m_refMachinePanelVM
@@ -161,72 +125,6 @@ Module Map
End Get
End Property
- 'Public ReadOnly Property refMachGroupPanelVM As MyMachGroupPanelVM
- ' Get
- ' Return CoreMap.refMachGroupPanelVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refBottomPanelVM As BottomPanelVM
- ' Get
- ' Return m_refBottomPanelVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refShowBeamPanelVM As ShowBeamPanelVM
- ' Get
- ' Return m_refShowBeamPanelVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refConfigurationPageVM As ConfigurationPageVM
- ' Get
- ' Return m_refConfigurationPageVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refRawPartListVM As RawPartListVM
- ' Get
- ' Return m_refRawPartListVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refPartInRawPartListVM As PartInRawPartListVM
- ' Get
- ' Return m_refPartInRawPartListVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refWarehouseWndVM As WarehouseWndVM
- ' Get
- ' Return m_refWarehouseWndVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refFeatureListVM As FeatureListVM
- ' Get
- ' Return m_refFeatureListVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refFreeContourManagerVM As FreeContourManagerVM
- ' Get
- ' Return m_refFreeContourManagerVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refFreeContourInputVM As FreeContourInputVM
- ' Get
- ' Return m_refFreeContourInputVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refPartManagerVM As PartManagerVM
- ' Get
- ' Return m_refPartManagerVM
- ' End Get
- 'End Property
-
Public ReadOnly Property refInstrumentPanelVM As MyInstrumentPanelVM
Get
Return m_refInstrumentPanelVM
@@ -239,120 +137,6 @@ Module Map
End Get
End Property
- 'Public ReadOnly Property refOptimizePanelVM As OptimizePanelVM
- ' Get
- ' Return m_refOptimizePanelVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refCALCPanelVM As CALCPanelVM
- ' Get
- ' Return m_refCALCPanelVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refPartListVM As BTLPartListVM
- ' Get
- ' Return m_refPartListVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refFeatureInPartInRawPartListVM As FeatureInPartInRawPartListVM
- ' Get
- ' Return m_refFeatureInPartInRawPartListVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refStatisticsVM As StatisticsVM
- ' Get
- ' Return m_refStatisticsVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refPParameterListVM As PParameterListVM
- ' Get
- ' Return m_refPParameterListVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refQParameterListVM As QParameterListVM
- ' Get
- ' Return m_refQParameterListVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refFeatureManagerVM As FeatureManagerVM
- ' Get
- ' Return m_refFeatureManagerVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refAddSectionXMaterialWndVM As AddSectionXMaterialWndVM
- ' Get
- ' Return m_refAddSectionXMaterialWndVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refStatisticsTimePanelVM As StatisticsTimePanelVM
- ' Get
- ' Return m_refStatisticsTimePanelVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refOpenProjectFileDialogVM As OpenProjectFileDialogVM
- ' Get
- ' Return m_refOpenProjectFileDialogVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refOptionPanelVM As OptionPanelVM
- ' Get
- ' Return m_refOptionPanelVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refRawPartTabVM As RawPartTabVM
- ' Get
- ' Return m_refRawPartTabVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refNestingTabVM As NestingTabVM
- ' Get
- ' Return m_refNestingTabVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refMachiningTabVM As MachiningTabVM
- ' Get
- ' Return m_refMachiningTabVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refSplitModeVM As SplitModeVM
- ' Get
- ' Return m_refSplitModeVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refMoveRawModeVM As MoveRawModeVM
- ' Get
- ' Return m_refMoveRawModeVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refSimulTabVM As SimulTabVM
- ' Get
- ' Return m_refSimulTabVM
- ' End Get
- 'End Property
-
- 'Public ReadOnly Property refImportPanelVM As ImportPanelVM
- ' Get
- ' Return m_refImportPanelVM
- ' End Get
- 'End Property
-
Public ReadOnly Property refSliceManagerVM As SliceManagerVM
Get
Return m_refSliceManagerVM
@@ -425,18 +209,24 @@ Module Map
End Get
End Property
+ Public ReadOnly Property refFilledSolidPanelVM As FilledSolidPanelVM
+ Get
+ Return m_refFilledSolidPanelVM
+ End Get
+ End Property
+
+ Public ReadOnly Property refFilledSolidParamPanelVM As FilledSolidParamPanelVM
+ Get
+ Return m_refFilledSolidParamPanelVM
+ End Get
+ End Property
+
Public ReadOnly Property refSplashScreen As SplashScreen
Get
Return m_refSplashScreen
End Get
End Property
- ''Public ReadOnly Property refModifyPartPanelVM As ModifyPartPanelVM
- '' Get
- '' Return m_refModifyPartPanelVM
- '' End Get
- ''End Property
-
Public ReadOnly Property refManagePartPanelVM As ManagePartPanelVM
Get
Return m_refManagePartPanelVM
@@ -457,21 +247,11 @@ Module Map
Return Not IsNothing(m_refProjManagerVM)
End Function
- 'Friend Function SetRefProdManagerVM(ProdManagerVM As ProdManagerVM) As Boolean
- ' m_refProdManagerVM = ProdManagerVM
- ' Return Not IsNothing(m_refProdManagerVM)
- 'End Function
-
Friend Function SetRefProjectVM(ProjectVM As ProjectVM) As Boolean
m_refProjectVM = ProjectVM
Return Not IsNothing(m_refProjectVM)
End Function
- 'Friend Function SetRefMainMenuVM(MainMenuVM As MainMenuVM) As Boolean
- ' m_refMainMenuVM = MainMenuVM
- ' Return Not IsNothing(m_refMainMenuVM)
- 'End Function
-
Friend Function SetRefSceneHostVM(SceneHostVM As SceneHostVM) As Boolean
LibMap.SetRefSceneHostVM(SceneHostVM)
Return Not IsNothing(LibMap.refSceneHostVM)
@@ -486,11 +266,6 @@ Module Map
Return Not IsNothing(m_refSecondaryWindowV)
End Function
- 'Friend Function SetRefShowPanelVM(ShowPanelVM As ShowPanelVM) As Boolean
- ' LibMap.SetRefShowPanelVM(ShowPanelVM)
- ' Return Not IsNothing(LibMap.refShowPanelVM)
- 'End Function
-
Friend Function SetRefMachinePanelVM(MachinePanelVM As MachinePanelVM) As Boolean
m_refMachinePanelVM = MachinePanelVM
Return Not IsNothing(m_refMachinePanelVM)
@@ -526,61 +301,6 @@ Module Map
Return Not IsNothing(m_refControllerInputPanelVM)
End Function
- 'Friend Function SetRefMachGroupPanelVM(MachGroupPanelVM As MyMachGroupPanelVM) As Boolean
- ' CoreMap.SetRefMachGroupPanelVM(MachGroupPanelVM)
- ' Return Not IsNothing(CoreMap.refMachGroupPanelVM)
- 'End Function
-
- 'Friend Function SetRefBottomPanelVM(BottomPanelVM As BottomPanelVM) As Boolean
- ' m_refBottomPanelVM = BottomPanelVM
- ' Return Not IsNothing(m_refBottomPanelVM)
- 'End Function
-
- 'Friend Function SetRefShowBeamPanelVM(ShowBeamPanelVM As ShowBeamPanelVM) As Boolean
- ' m_refShowBeamPanelVM = ShowBeamPanelVM
- ' Return Not IsNothing(m_refShowBeamPanelVM)
- 'End Function
-
- 'Friend Function SetRefConfigurationPageVM(ConfigurationPageVM As ConfigurationPageVM) As Boolean
- ' m_refConfigurationPageVM = ConfigurationPageVM
- ' Return Not IsNothing(m_refConfigurationPageVM)
- 'End Function
-
- 'Friend Function SetRefRawPartListVM(RawPartListVM As RawPartListVM) As Boolean
- ' m_refRawPartListVM = RawPartListVM
- ' Return Not IsNothing(m_refRawPartListVM)
- 'End Function
-
- 'Friend Function SetRefPartInRawPartListVM(PartInRawPartListVM As PartInRawPartListVM) As Boolean
- ' m_refPartInRawPartListVM = PartInRawPartListVM
- ' Return Not IsNothing(m_refPartInRawPartListVM)
- 'End Function
-
- 'Friend Function SetRefWarehouseWndVM(WarehouseWndVM As WarehouseWndVM) As Boolean
- ' m_refWarehouseWndVM = WarehouseWndVM
- ' Return Not IsNothing(m_refWarehouseWndVM)
- 'End Function
-
- 'Friend Function SetRefFeatureListVM(FeatureListVM As FeatureListVM) As Boolean
- ' m_refFeatureListVM = FeatureListVM
- ' Return Not IsNothing(m_refFeatureListVM)
- 'End Function
-
- 'Friend Function SetRefFreeContourManagerVM(FreeContourManagerVM As FreeContourManagerVM) As Boolean
- ' m_refFreeContourManagerVM = FreeContourManagerVM
- ' Return Not IsNothing(m_refFreeContourManagerVM)
- 'End Function
-
- 'Friend Function SetRefFreeContourInputVM(FreeContourInputVM As FreeContourInputVM) As Boolean
- ' m_refFreeContourInputVM = FreeContourInputVM
- ' Return Not IsNothing(m_refFreeContourInputVM)
- 'End Function
-
- 'Friend Function SetRefPartManagerVM(PartManagerVM As PartManagerVM) As Boolean
- ' m_refPartManagerVM = PartManagerVM
- ' Return Not IsNothing(m_refPartManagerVM)
- 'End Function
-
Friend Function SetRefInstrumentPanelVM(InstrumentPanelVM As InstrumentPanelVM) As Boolean
m_refInstrumentPanelVM = InstrumentPanelVM
Return Not IsNothing(m_refInstrumentPanelVM)
@@ -591,101 +311,6 @@ Module Map
Return Not IsNothing(m_refTopPanelVM)
End Function
- 'Friend Function SetRefOptimizePanelVM(OptimizePanelVM As OptimizePanelVM) As Boolean
- ' m_refOptimizePanelVM = OptimizePanelVM
- ' Return Not IsNothing(m_refOptimizePanelVM)
- 'End Function
-
- 'Friend Function SetRefCALCPanelVM(CALCPanelVM As CALCPanelVM) As Boolean
- ' m_refCALCPanelVM = CALCPanelVM
- ' Return Not IsNothing(m_refCALCPanelVM)
- 'End Function
-
- 'Friend Function SetRefPartListVM(PartListVM As BTLPartListVM) As Boolean
- ' m_refPartListVM = PartListVM
- ' Return Not IsNothing(m_refPartListVM)
- 'End Function
-
- 'Friend Function SetRefFeatureInPartInRawPartListVM(FeatureInPartInRawPartListVM As FeatureInPartInRawPartListVM) As Boolean
- ' m_refFeatureInPartInRawPartListVM = FeatureInPartInRawPartListVM
- ' Return Not IsNothing(m_refFeatureInPartInRawPartListVM)
- 'End Function
-
- 'Friend Function SetRefStatisticsVM(StatisticsVM As StatisticsVM) As Boolean
- ' m_refStatisticsVM = StatisticsVM
- ' Return Not IsNothing(m_refStatisticsVM)
- 'End Function
-
- 'Friend Function SetRefPParameterListVM(PParameterListVM As PParameterListVM) As Boolean
- ' m_refPParameterListVM = PParameterListVM
- ' Return Not IsNothing(m_refPParameterListVM)
- 'End Function
-
- 'Friend Function SetRefQParameterListVM(QParameterListVM As QParameterListVM) As Boolean
- ' m_refQParameterListVM = QParameterListVM
- ' Return Not IsNothing(m_refQParameterListVM)
- 'End Function
-
- 'Friend Function SetRefFeatureManagerVM(FeatureManagerVM As FeatureManagerVM) As Boolean
- ' m_refFeatureManagerVM = FeatureManagerVM
- ' Return Not IsNothing(m_refFeatureManagerVM)
- 'End Function
-
- 'Friend Function SetRefAddSectionXMaterialWndVM(AddSectionXMaterialWndVM As AddSectionXMaterialWndVM) As Boolean
- ' m_refAddSectionXMaterialWndVM = AddSectionXMaterialWndVM
- ' Return Not IsNothing(m_refAddSectionXMaterialWndVM)
- 'End Function
-
- 'Friend Function SetRefStatisticsTimePanelVM(StatisticsTimePanelVM As StatisticsTimePanelVM) As Boolean
- ' m_refStatisticsTimePanelVM = StatisticsTimePanelVM
- ' Return Not IsNothing(m_refStatisticsTimePanelVM)
- 'End Function
-
- 'Friend Function SetRefOpenProjectFileDialogVM(OpenProjectFileDialogVM As OpenProjectFileDialogVM) As Boolean
- ' m_refOpenProjectFileDialogVM = OpenProjectFileDialogVM
- ' Return Not IsNothing(m_refOpenProjectFileDialogVM)
- 'End Function
-
- 'Friend Function SetRefOptionPanelVM(OptionPanelVM As OptionPanelVM) As Boolean
- ' m_refOptionPanelVM = OptionPanelVM
- ' Return Not IsNothing(m_refOptionPanelVM)
- 'End Function
-
- 'Friend Function SetRefRawPartTabVM(RawPartTabVM As RawPartTabVM) As Boolean
- ' m_refRawPartTabVM = RawPartTabVM
- ' Return Not IsNothing(m_refRawPartTabVM)
- 'End Function
-
- 'Friend Function SetRefNestingTabVM(NestingTabVM As NestingTabVM) As Boolean
- ' m_refNestingTabVM = NestingTabVM
- ' Return Not IsNothing(m_refNestingTabVM)
- 'End Function
-
- 'Friend Function SetRefMachiningTabVM(MachiningTabVM As MachiningTabVM) As Boolean
- ' m_refMachiningTabVM = MachiningTabVM
- ' Return Not IsNothing(m_refMachiningTabVM)
- 'End Function
-
- 'Friend Function SetRefSplitModeVM(SplitModeVM As SplitModeVM) As Boolean
- ' m_refSplitModeVM = SplitModeVM
- ' Return Not IsNothing(m_refSplitModeVM)
- 'End Function
-
- 'Friend Function SetRefMoveRawModeVM(MoveRawModeVM As MoveRawModeVM) As Boolean
- ' m_refMoveRawModeVM = MoveRawModeVM
- ' Return Not IsNothing(m_refMoveRawModeVM)
- 'End Function
-
- 'Friend Function SetRefSimulTabVM(SimulTabVM As SimulTabVM) As Boolean
- ' m_refSimulTabVM = SimulTabVM
- ' Return Not IsNothing(m_refSimulTabVM)
- 'End Function
-
- ''Friend Function SetRefImportPanelVM(ImportPanelVM As ImportPanelVM) As Boolean
- '' m_refImportPanelVM = ImportPanelVM
- '' Return Not IsNothing(m_refImportPanelVM)
- ''End Function
-
Friend Function SetRefSliceManagerVM(SliceManagerVM As SliceManagerVM) As Boolean
m_refSliceManagerVM = SliceManagerVM
Return Not IsNothing(m_refSliceManagerVM)
@@ -746,16 +371,21 @@ Module Map
Return Not IsNothing(m_refShellNumberParamPanelVM)
End Function
+ Friend Function SetRefFilledSolidPanelVM(FilledSolidPanelVM As FilledSolidPanelVM) As Boolean
+ m_refFilledSolidPanelVM = FilledSolidPanelVM
+ Return Not IsNothing(m_refFilledSolidPanelVM)
+ End Function
+
+ Friend Function SetRefFilledSolidParamPanelVM(FilledSolidParamPanelVM As FilledSolidParamPanelVM) As Boolean
+ m_refFilledSolidParamPanelVM = FilledSolidParamPanelVM
+ Return Not IsNothing(m_refFilledSolidParamPanelVM)
+ End Function
+
Friend Function SetRefSplashScreen(SplashScreen As SplashScreen) As Boolean
m_refSplashScreen = SplashScreen
Return Not IsNothing(m_refSplashScreen)
End Function
- ''Friend Function SetRefModifyPartPanelVM(ModifyPartPanelVM As ModifyPartPanelVM) As Boolean
- '' m_refModifyPartPanelVM = ModifyPartPanelVM
- '' Return Not IsNothing(m_refModifyPartPanelVM)
- ''End Function
-
Friend Function SetRefManagePartPanelVM(ManagePartPanelVM As ManagePartPanelVM) As Boolean
m_refManagePartPanelVM = ManagePartPanelVM
Return Not IsNothing(m_refManagePartPanelVM)