- Introdotto calcolo separato dei solidi
- Spostati file CurrMachining - Introdotto slider custom - Introdotti flag di modifica separati per slice ed operazioni successive - Gestito calcolo dei solidi separato dal resto - Gestito bottone from import su reference - Aggiornato logo - Migliorata gestione dell'interazione con la scena nelle modifiche grafiche( rib, start mach, ...) - Introdotta gestione grid da oggetto - Gestiti percorsi chiusi e con cap end in ShellNumber
This commit is contained in:
@@ -80,6 +80,8 @@ Public Class ShellNumberPanelVM
|
||||
Else
|
||||
NotifyPropertyChanged(NameOf(sXPos))
|
||||
End If
|
||||
' Imposto flag di ricalcolo slice
|
||||
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -107,6 +109,8 @@ Public Class ShellNumberPanelVM
|
||||
Else
|
||||
NotifyPropertyChanged(NameOf(sYPos))
|
||||
End If
|
||||
' Imposto flag di ricalcolo slice
|
||||
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -134,6 +138,8 @@ Public Class ShellNumberPanelVM
|
||||
Else
|
||||
NotifyPropertyChanged(NameOf(sZPos))
|
||||
End If
|
||||
' Imposto flag di ricalcolo slice
|
||||
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -185,6 +191,8 @@ Public Class ShellNumberPanelVM
|
||||
Else
|
||||
m_sRotAngle = value
|
||||
End If
|
||||
' Imposto flag di ricalcolo slice
|
||||
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -194,7 +202,7 @@ Public Class ShellNumberPanelVM
|
||||
Return m_bAdd_IsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If Not m_bMachParam_IsChecked Then
|
||||
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
|
||||
m_bAdd_IsChecked = value
|
||||
If value Then
|
||||
m_bEdit_IsChecked = False
|
||||
@@ -216,7 +224,7 @@ Public Class ShellNumberPanelVM
|
||||
Return m_bEdit_IsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked Then
|
||||
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
|
||||
m_bEdit_IsChecked = value
|
||||
If value Then
|
||||
m_bAdd_IsChecked = False
|
||||
@@ -240,7 +248,7 @@ Public Class ShellNumberPanelVM
|
||||
Return m_bGrid_IsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If Not m_bMachParam_IsChecked Then
|
||||
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
|
||||
m_bGrid_IsChecked = value
|
||||
If value Then
|
||||
m_bAdd_IsChecked = False
|
||||
@@ -262,7 +270,7 @@ Public Class ShellNumberPanelVM
|
||||
Return m_bMove_IsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked Then
|
||||
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
|
||||
m_bMove_IsChecked = value
|
||||
If value Then
|
||||
m_bAdd_IsChecked = False
|
||||
@@ -286,7 +294,7 @@ Public Class ShellNumberPanelVM
|
||||
Return m_bRotate_IsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked Then
|
||||
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
|
||||
m_bRotate_IsChecked = value
|
||||
If value Then
|
||||
m_bAdd_IsChecked = False
|
||||
@@ -310,7 +318,7 @@ Public Class ShellNumberPanelVM
|
||||
Return m_bMachParam_IsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If Not IsNothing(m_SelShellNumber) AndAlso Not IsNothing(Map.refTopPanelVM.SelMachining) AndAlso value Then
|
||||
If Not IsNothing(m_SelShellNumber) 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
|
||||
@@ -517,7 +525,7 @@ Public Class ShellNumberPanelVM
|
||||
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
|
||||
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
|
||||
@@ -563,6 +571,9 @@ Public Class ShellNumberPanelVM
|
||||
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)
|
||||
' coloro l'entita' di verde
|
||||
Dim c3LightBlue As Color3d
|
||||
@@ -585,20 +596,37 @@ Public Class ShellNumberPanelVM
|
||||
EgtSelectObj(nNewEntityId)
|
||||
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
|
||||
m_bIsCreatingExtrusion = True
|
||||
Map.refControllerInputPanelVM.IsChecked = True
|
||||
Else
|
||||
' cancello layer
|
||||
'EgtErase(nNewRibLayerId)
|
||||
EgtErase(nNewExtrusionLayerId)
|
||||
End If
|
||||
End If
|
||||
' 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)
|
||||
If Key = Forms.Keys.Escape Then
|
||||
|
||||
' se attiva, disattivo griglia su oggetto
|
||||
If m_bCPlaneObj_IsActive Then
|
||||
m_bCPlaneObj_IsActive = False
|
||||
ResetCPlaneObjIsActive()
|
||||
' ripristino selezioni precedenti
|
||||
For Each Id In Map.refShellNumberPanelVM.PrevSelObjs
|
||||
EgtSelectObj(Id)
|
||||
Next
|
||||
EgtDraw()
|
||||
' rimetto la selezione scena a null
|
||||
Map.refSceneHostVM.MainScene.SetStatusNull()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -642,6 +670,7 @@ Public Class ShellNumberPanelVM
|
||||
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
|
||||
''' </summary>
|
||||
Public Sub Import(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
|
||||
Map.refSceneHostVM.InsertShellNumber()
|
||||
End Sub
|
||||
|
||||
@@ -665,6 +694,7 @@ Public Class ShellNumberPanelVM
|
||||
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
|
||||
''' </summary>
|
||||
Public Sub Line2P(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
|
||||
Dim nNewShellNumberLayerId As Integer = EgtCreateGroup(m_nPartId)
|
||||
EgtSetName(nNewShellNumberLayerId, LAY_NEWRIB)
|
||||
EgtSetCurrPartLayer(m_nPartId, nNewShellNumberLayerId)
|
||||
@@ -688,6 +718,7 @@ Public Class ShellNumberPanelVM
|
||||
End Property
|
||||
|
||||
Public Sub Delete()
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
|
||||
If IsNothing(SelShellNumber) Then Return
|
||||
Dim bOk As Boolean = False
|
||||
Select Case m_SelShellNumber.Type
|
||||
@@ -731,6 +762,7 @@ Public Class ShellNumberPanelVM
|
||||
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
|
||||
''' </summary>
|
||||
Public Sub ModifyCurve(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
|
||||
InitCommand(ShellNumberSelectionTypes.CURVE)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MODIFYCURVE)
|
||||
End Sub
|
||||
@@ -755,6 +787,7 @@ Public Class ShellNumberPanelVM
|
||||
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
|
||||
''' </summary>
|
||||
Public Sub AddPointCurve(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
|
||||
InitCommand(ShellNumberSelectionTypes.CURVE)
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOARC)
|
||||
@@ -783,6 +816,7 @@ Public Class ShellNumberPanelVM
|
||||
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
|
||||
''' </summary>
|
||||
Public Sub RemovePointCurve(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
|
||||
InitCommand(ShellNumberSelectionTypes.CURVE)
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOLINE)
|
||||
@@ -811,9 +845,11 @@ Public Class ShellNumberPanelVM
|
||||
''' Execute the Extrude. This method is invoked by the ExtrudeCommand.
|
||||
''' </summary>
|
||||
Public Sub Extrude(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
|
||||
InitCommand(ShellNumberSelectionTypes.EXTRUSION)
|
||||
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
|
||||
m_bIsCreatingExtrusion = True
|
||||
Map.refControllerInputPanelVM.IsChecked = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -837,6 +873,7 @@ Public Class ShellNumberPanelVM
|
||||
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
|
||||
''' </summary>
|
||||
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
|
||||
@@ -861,6 +898,7 @@ Public Class ShellNumberPanelVM
|
||||
''' Execute the CPlaneFront. This method is invoked by the CPlaneFrontCommand.
|
||||
''' </summary>
|
||||
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
|
||||
@@ -885,6 +923,7 @@ Public Class ShellNumberPanelVM
|
||||
''' Execute the CPlaneRight. This method is invoked by the CPlaneRightCommand.
|
||||
''' </summary>
|
||||
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
|
||||
@@ -909,6 +948,7 @@ Public Class ShellNumberPanelVM
|
||||
''' Execute the CPlaneBack. This method is invoked by the CPlaneBackCommand.
|
||||
''' </summary>
|
||||
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
|
||||
@@ -933,6 +973,7 @@ Public Class ShellNumberPanelVM
|
||||
''' Execute the CPlaneLeft. This method is invoked by the CPlaneLeftCommand.
|
||||
''' </summary>
|
||||
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
|
||||
@@ -957,6 +998,7 @@ Public Class ShellNumberPanelVM
|
||||
''' Execute the CPlaneBottom. This method is invoked by the CPlaneBottomCommand.
|
||||
''' </summary>
|
||||
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
|
||||
@@ -981,6 +1023,7 @@ Public Class ShellNumberPanelVM
|
||||
''' Execute the CPlaneElevation. This method is invoked by the CPlaneElevationCommand.
|
||||
''' </summary>
|
||||
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
|
||||
|
||||
@@ -1004,6 +1047,7 @@ Public Class ShellNumberPanelVM
|
||||
''' Execute the CPlaneOrigin. This method is invoked by the CPlaneOriginCommand.
|
||||
''' </summary>
|
||||
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
|
||||
|
||||
@@ -1027,6 +1071,7 @@ Public Class ShellNumberPanelVM
|
||||
''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand.
|
||||
''' </summary>
|
||||
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
|
||||
@@ -1054,6 +1099,7 @@ Public Class ShellNumberPanelVM
|
||||
''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand.
|
||||
''' </summary>
|
||||
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
|
||||
|
||||
@@ -1077,6 +1123,7 @@ Public Class ShellNumberPanelVM
|
||||
''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand.
|
||||
''' </summary>
|
||||
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
|
||||
|
||||
@@ -1084,6 +1131,22 @@ Public Class ShellNumberPanelVM
|
||||
|
||||
#Region "CPlaneObj"
|
||||
|
||||
Private m_bCPlaneObj_IsActive As Boolean = False
|
||||
Friend ReadOnly Property bCPlaneObj_IsActive As Boolean
|
||||
Get
|
||||
Return m_bCPlaneObj_IsActive
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub ResetCPlaneObjIsActive()
|
||||
m_bCPlaneObj_IsActive = False
|
||||
End Sub
|
||||
Private m_PrevSelObjs As New List(Of Integer)
|
||||
Friend ReadOnly Property PrevSelObjs As List(Of Integer)
|
||||
Get
|
||||
Return m_PrevSelObjs
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlanepObj.
|
||||
''' </summary>
|
||||
@@ -1100,7 +1163,16 @@ Public Class ShellNumberPanelVM
|
||||
''' Execute the CPlaneObj. This method is invoked by the CPlaneObjCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlaneObj(ByVal param As Object)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
|
||||
' salvo selezione precedente e deseleziono altri oggetti
|
||||
Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
|
||||
While nSelObjId <> GDB_ID.NULL
|
||||
m_PrevSelObjs.Add(nSelObjId)
|
||||
nSelObjId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
EgtDeselectAll()
|
||||
m_bCPlaneObj_IsActive = True
|
||||
Map.refControllerInputPanelVM.PrepareInputBox("Grid from Selection", "Select the face of the object where to place the grid", "", False, False)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlaneObj
|
||||
@@ -1117,6 +1189,7 @@ Public Class ShellNumberPanelVM
|
||||
End Property
|
||||
|
||||
Public Sub DragMove()
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
|
||||
InitCommand(ShellNumberSelectionTypes.BOTH)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MOVE)
|
||||
End Sub
|
||||
@@ -1135,6 +1208,7 @@ Public Class ShellNumberPanelVM
|
||||
End Property
|
||||
|
||||
Public Sub DragRotate()
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
|
||||
InitCommand(ShellNumberSelectionTypes.BOTH)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.ROTATE)
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user