- aggiunto messaggio input su griglia da oggetto

- migliorata gestione griglia da oggetto
This commit is contained in:
Emmanuele Sassi
2023-04-01 12:36:00 +02:00
parent 2850e07360
commit d43acd1678
6 changed files with 151 additions and 223 deletions
@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Height="38"
Visibility="{Binding DoneBtn_Visibility}"
Visibility="{Binding Message_Visibility}"
HorizontalAlignment="Left"
Margin="45,0,0,0"
Padding="0"
+37 -60
View File
@@ -213,7 +213,7 @@ Public Class FilledSolidPanelVM
Return m_bAdd_IsChecked
End Get
Set(value As Boolean)
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bAdd_IsChecked = value
If value Then
m_bEdit_IsChecked = False
@@ -235,7 +235,7 @@ Public Class FilledSolidPanelVM
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
If Not IsNothing(m_SelFilledSolid) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bEdit_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -259,7 +259,7 @@ Public Class FilledSolidPanelVM
Return m_bGrid_IsChecked
End Get
Set(value As Boolean)
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bGrid_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -287,7 +287,7 @@ Public Class FilledSolidPanelVM
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
If Not IsNothing(m_SelFilledSolid) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bMove_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -311,7 +311,7 @@ Public Class FilledSolidPanelVM
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
If Not IsNothing(m_SelFilledSolid) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bRotate_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -335,7 +335,7 @@ Public Class FilledSolidPanelVM
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
If Not IsNothing(m_SelFilledSolid) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive AndAlso Not IsNothing(Map.refTopPanelVM.SelMachining) AndAlso value Then
m_bMachParam_IsChecked = True
m_bAdd_IsChecked = False
m_bEdit_IsChecked = False
@@ -517,7 +517,6 @@ Public Class FilledSolidPanelVM
Private m_cmdCPlaneObj As ICommand
Private m_cmdDragMove As ICommand
Private m_cmdDragRotate As ICommand
Private m_cmdMachParam As ICommand
#End Region ' FIELDS & PROPERTIES
@@ -718,9 +717,15 @@ Public Class FilledSolidPanelVM
' lo seleziono
SelFilledSolid = NewEntity
NotifyPropertyChanged(NameOf(SelFilledSolid))
' creo layer per estrusione
Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
' verifico se esiste gia' layer estrusione e lo svuoto
Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION)
If nNewExtrusionLayerId <> GDB_ID.NULL Then
EgtEmptyGroup(nNewExtrusionLayerId)
Else
' altrimenti lo creo
nNewExtrusionLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
End If
EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId)
' seleziono percorso da estrudere
EgtDeselectAll()
@@ -809,7 +814,7 @@ Public Class FilledSolidPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.InsertFilledSolid()
End Sub
@@ -833,7 +838,7 @@ Public Class FilledSolidPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive 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)
@@ -858,7 +863,7 @@ Public Class FilledSolidPanelVM
End Property
Public Sub Delete()
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
If IsNothing(SelFilledSolid) Then Return
Dim bOk As Boolean = False
Select Case m_SelFilledSolid.Type
@@ -904,7 +909,7 @@ Public Class FilledSolidPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(FilledSolidSelectionTypes.CURVE)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MODIFYCURVE)
End Sub
@@ -929,7 +934,7 @@ Public Class FilledSolidPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(FilledSolidSelectionTypes.CURVE)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOARC)
@@ -958,7 +963,7 @@ Public Class FilledSolidPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(FilledSolidSelectionTypes.CURVE)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOLINE)
@@ -987,7 +992,7 @@ Public Class FilledSolidPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(FilledSolidSelectionTypes.EXTRUSION)
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
m_bIsCreatingExtrusion = True
@@ -1015,7 +1020,7 @@ Public Class FilledSolidPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1040,7 +1045,7 @@ Public Class FilledSolidPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1065,7 +1070,7 @@ Public Class FilledSolidPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1090,7 +1095,7 @@ Public Class FilledSolidPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1115,7 +1120,7 @@ Public Class FilledSolidPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1140,7 +1145,7 @@ Public Class FilledSolidPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1165,7 +1170,7 @@ Public Class FilledSolidPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub
@@ -1189,7 +1194,7 @@ Public Class FilledSolidPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub
@@ -1213,7 +1218,7 @@ Public Class FilledSolidPanelVM
''' 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 Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE)
Else
@@ -1241,7 +1246,7 @@ Public Class FilledSolidPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_3P)
End Sub
@@ -1265,7 +1270,7 @@ Public Class FilledSolidPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_PERPCURVE)
End Sub
@@ -1305,7 +1310,7 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneObj. This method is invoked by the CPlaneObjCommand.
''' </summary>
Public Sub CPlaneObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
' salvo selezione precedente e deseleziono altri oggetti
m_PrevSelObjs.Clear()
Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
@@ -1315,7 +1320,7 @@ Public Class FilledSolidPanelVM
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)
Map.refControllerInputPanelVM.ShowMessage("Grid from Selection", "Select the face of the object where to place the grid")
End Sub
#End Region ' CPlaneObj
@@ -1332,7 +1337,7 @@ Public Class FilledSolidPanelVM
End Property
Public Sub DragMove()
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(FilledSolidSelectionTypes.BOTH)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MOVE)
End Sub
@@ -1351,41 +1356,13 @@ Public Class FilledSolidPanelVM
End Property
Public Sub DragRotate()
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive 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
+37 -58
View File
@@ -238,7 +238,7 @@ Public Class RibPanelVM
Return m_bAdd_IsChecked
End Get
Set(value As Boolean)
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bAdd_IsChecked = value
If value Then
m_bEdit_IsChecked = False
@@ -260,7 +260,7 @@ Public Class RibPanelVM
Return m_bEdit_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelRib) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelRib) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bEdit_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -284,7 +284,7 @@ Public Class RibPanelVM
Return m_bGrid_IsChecked
End Get
Set(value As Boolean)
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bGrid_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -312,7 +312,7 @@ Public Class RibPanelVM
Return m_bMove_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelRib) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelRib) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bMove_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -336,7 +336,7 @@ Public Class RibPanelVM
Return m_bRotate_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelRib) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelRib) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bRotate_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -360,7 +360,7 @@ Public Class RibPanelVM
Return m_bMachParam_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelRib) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not IsNothing(Map.refTopPanelVM.SelMachining) AndAlso value Then
If Not IsNothing(m_SelRib) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive AndAlso Not IsNothing(Map.refTopPanelVM.SelMachining) AndAlso value Then
m_bMachParam_IsChecked = True
m_bAdd_IsChecked = False
m_bEdit_IsChecked = False
@@ -542,7 +542,6 @@ Public Class RibPanelVM
Private m_cmdCPlaneObj As ICommand
Private m_cmdDragMove As ICommand
Private m_cmdDragRotate As ICommand
Private m_cmdMachParam As ICommand
#End Region ' FIELDS & PROPERTIES
@@ -740,9 +739,15 @@ Public Class RibPanelVM
' lo seleziono
SelRib = NewEntity
NotifyPropertyChanged(NameOf(SelRib))
' creo layer per estrusione
Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
' verifico se esiste gia' layer estrusione e lo svuoto
Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION)
If nNewExtrusionLayerId <> GDB_ID.NULL Then
EgtEmptyGroup(nNewExtrusionLayerId)
Else
' altrimenti lo creo
nNewExtrusionLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
End If
EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId)
' seleziono percorso da estrudere
EgtDeselectAll()
@@ -831,7 +836,7 @@ Public Class RibPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.InsertRib()
End Sub
@@ -855,7 +860,7 @@ Public Class RibPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Dim nNewRibLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWRIB)
If nNewRibLayerId = GDB_ID.NULL Then nNewRibLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewRibLayerId, LAY_NEWRIB)
@@ -880,7 +885,7 @@ Public Class RibPanelVM
End Property
Public Sub Delete()
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
If IsNothing(SelRib) Then Return
Dim bOk As Boolean = False
Select Case m_SelRib.Type
@@ -926,7 +931,7 @@ Public Class RibPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(RibSelectionTypes.CURVE)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MODIFYCURVE)
End Sub
@@ -951,7 +956,7 @@ Public Class RibPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(RibSelectionTypes.CURVE)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOARC)
@@ -980,7 +985,7 @@ Public Class RibPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(RibSelectionTypes.CURVE)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOLINE)
@@ -1009,7 +1014,7 @@ Public Class RibPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(RibSelectionTypes.EXTRUSION)
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
m_bIsCreatingExtrusion = True
@@ -1036,7 +1041,7 @@ Public Class RibPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1061,7 +1066,7 @@ Public Class RibPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1086,7 +1091,7 @@ Public Class RibPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1111,7 +1116,7 @@ Public Class RibPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1136,7 +1141,7 @@ Public Class RibPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1161,7 +1166,7 @@ Public Class RibPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1186,7 +1191,7 @@ Public Class RibPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub
@@ -1210,7 +1215,7 @@ Public Class RibPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub
@@ -1234,7 +1239,7 @@ Public Class RibPanelVM
''' 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 Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE)
Else
@@ -1262,7 +1267,7 @@ Public Class RibPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_3P)
End Sub
@@ -1286,7 +1291,7 @@ Public Class RibPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_PERPCURVE)
End Sub
@@ -1326,7 +1331,7 @@ Public Class RibPanelVM
''' Execute the CPlaneObj. This method is invoked by the CPlaneObjCommand.
''' </summary>
Public Sub CPlaneObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
' salvo selezione precedente e deseleziono altri oggetti
m_PrevSelObjs.Clear()
Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
@@ -1336,7 +1341,7 @@ Public Class RibPanelVM
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)
Map.refControllerInputPanelVM.ShowMessage("Grid from Selection", "Select the face of the object where to place the grid")
End Sub
#End Region ' CPlaneObj
@@ -1353,6 +1358,7 @@ Public Class RibPanelVM
End Property
Public Sub DragMove()
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(RibSelectionTypes.BOTH)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MOVE)
End Sub
@@ -1371,40 +1377,13 @@ Public Class RibPanelVM
End Property
Public Sub DragRotate()
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(RibSelectionTypes.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.RIBPARAM)
End Sub
#End Region ' MachParam
#End Region ' COMMANDS
End Class
+18 -24
View File
@@ -976,33 +976,15 @@ Public Class MySceneHostVM
Map.refDispositionPanelVM.OnKeyDown(e.KeyData)
Case ModifyModes.REFERENCE
Case ModifyModes.STARTMACH
Map.refStartMachPanelVM.OnKeyDown(e.KeyData)
Case ModifyModes.RIBS
Map.refRibPanelVM.OnKeyDown(e.KeyData)
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
'If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refFreeContourManagerVM.bIsActive Then
' ' Con DEL eseguo cancellazione delle entità selezionate
' If e.KeyData = System.Windows.Forms.Keys.Delete Then
' MainController.SetLastInteger(GDB_ID.SEL)
' MainController.ExecuteCommand(Controller.CMD.DELETE)
' ' Con SPAZIO ripeto l'ultimo comando
' ElseIf e.KeyData = System.Windows.Forms.Keys.Space Then
' MainController.RepeatLastCommand()
' ' Con 'A' e in modalità continuazione, forzo il passaggio ad arco
' ElseIf e.KeyData = System.Windows.Forms.Keys.A And MainController.GetContinue() Then
' MainController.ContinueArcPDP()
' ' Con 'L' e in modalità continuazione, forzo il passaggio a retta
' ElseIf e.KeyData = System.Windows.Forms.Keys.L And MainController.GetContinue() Then
' MainController.ContinueLine2P()
' ' Con 'V' cambio lo stato del check
' ElseIf e.KeyData = System.Windows.Forms.Keys.V Then
' Map.refFreeContourInputVM.ChangeInputBoxCheck()
' End If
'End If
End Sub
Private Sub OnCloseGetDist(sender As System.Object)
@@ -1477,7 +1459,10 @@ Public Class MySceneHostVM
Friend Sub StartMach_OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
' Se eseguito drag
If Not m_bDragToStart Then
' se in scelta piano da oggetto resetto eventuale selezione
If Map.refRibPanelVM.bCPlaneObj_IsActive Then
EgtDeselectAll()
End If
' Se selezione da eseguire
ElseIf m_nIdToSel <> GDB_ID.NULL Then
If Map.refStartMachPanelVM.bCPlaneObj_IsActive Then
@@ -1558,7 +1543,10 @@ Public Class MySceneHostVM
Friend Sub Rib_OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
' Se eseguito drag
If Not m_bDragToStart Then
' se in scelta piano da oggetto resetto eventuale selezione
If Map.refRibPanelVM.bCPlaneObj_IsActive Then
EgtDeselectAll()
End If
' Se selezione da eseguire
ElseIf m_nIdToSel <> GDB_ID.NULL Then
If Map.refRibPanelVM.bCPlaneObj_IsActive Then
@@ -1640,7 +1628,10 @@ Public Class MySceneHostVM
Friend Sub ShellNumber_OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
' Se eseguito drag
If Not m_bDragToStart Then
' se in scelta piano da oggetto resetto eventuale selezione
If Map.refRibPanelVM.bCPlaneObj_IsActive Then
EgtDeselectAll()
End If
' Se selezione da eseguire
ElseIf m_nIdToSel <> GDB_ID.NULL Then
If Map.refShellNumberPanelVM.bCPlaneObj_IsActive Then
@@ -1722,7 +1713,10 @@ Public Class MySceneHostVM
Friend Sub FilledSolid_OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
' Se eseguito drag
If Not m_bDragToStart Then
' se in scelta piano da oggetto resetto eventuale selezione
If Map.refRibPanelVM.bCPlaneObj_IsActive Then
EgtDeselectAll()
End If
' Se selezione da eseguire
ElseIf m_nIdToSel <> GDB_ID.NULL Then
If Map.refFilledSolidPanelVM.bCPlaneObj_IsActive Then
+37 -60
View File
@@ -218,7 +218,7 @@ Public Class ShellNumberPanelVM
Return m_bAdd_IsChecked
End Get
Set(value As Boolean)
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bAdd_IsChecked = value
If value Then
m_bEdit_IsChecked = False
@@ -240,7 +240,7 @@ Public Class ShellNumberPanelVM
Return m_bEdit_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bEdit_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -264,7 +264,7 @@ Public Class ShellNumberPanelVM
Return m_bGrid_IsChecked
End Get
Set(value As Boolean)
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bGrid_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -292,7 +292,7 @@ Public Class ShellNumberPanelVM
Return m_bMove_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bMove_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -316,7 +316,7 @@ Public Class ShellNumberPanelVM
Return m_bRotate_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bRotate_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -340,7 +340,7 @@ Public Class ShellNumberPanelVM
Return m_bMachParam_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelShellNumber) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not IsNothing(Map.refTopPanelVM.SelMachining) AndAlso value Then
If Not IsNothing(m_SelShellNumber) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive AndAlso Not IsNothing(Map.refTopPanelVM.SelMachining) AndAlso value Then
m_bMachParam_IsChecked = True
m_bAdd_IsChecked = False
m_bEdit_IsChecked = False
@@ -522,7 +522,6 @@ Public Class ShellNumberPanelVM
Private m_cmdCPlaneObj As ICommand
Private m_cmdDragMove As ICommand
Private m_cmdDragRotate As ICommand
Private m_cmdMachParam As ICommand
#End Region ' FIELDS & PROPERTIES
@@ -723,9 +722,15 @@ Public Class ShellNumberPanelVM
' lo seleziono
SelShellNumber = NewEntity
NotifyPropertyChanged(NameOf(SelShellNumber))
' creo layer per estrusione
Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
' verifico se esiste gia' layer estrusione e lo svuoto
Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION)
If nNewExtrusionLayerId <> GDB_ID.NULL Then
EgtEmptyGroup(nNewExtrusionLayerId)
Else
' altrimenti lo creo
nNewExtrusionLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
End If
EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId)
' seleziono percorso da estrudere
EgtDeselectAll()
@@ -814,7 +819,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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.InsertShellNumber()
End Sub
@@ -838,7 +843,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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive 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)
@@ -863,7 +868,7 @@ Public Class ShellNumberPanelVM
End Property
Public Sub Delete()
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
If IsNothing(SelShellNumber) Then Return
Dim bOk As Boolean = False
Select Case m_SelShellNumber.Type
@@ -909,7 +914,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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(ShellNumberSelectionTypes.CURVE)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MODIFYCURVE)
End Sub
@@ -934,7 +939,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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(ShellNumberSelectionTypes.CURVE)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOARC)
@@ -963,7 +968,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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(ShellNumberSelectionTypes.CURVE)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOLINE)
@@ -992,7 +997,7 @@ 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(ShellNumberSelectionTypes.EXTRUSION)
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
m_bIsCreatingExtrusion = True
@@ -1020,7 +1025,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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1045,7 +1050,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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1070,7 +1075,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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1095,7 +1100,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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1120,7 +1125,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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1145,7 +1150,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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1170,7 +1175,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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub
@@ -1194,7 +1199,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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub
@@ -1218,7 +1223,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 Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE)
Else
@@ -1246,7 +1251,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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_3P)
End Sub
@@ -1270,7 +1275,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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_PERPCURVE)
End Sub
@@ -1310,7 +1315,7 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneObj. This method is invoked by the CPlaneObjCommand.
''' </summary>
Public Sub CPlaneObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
' salvo selezione precedente e deseleziono altri oggetti
m_PrevSelObjs.Clear()
Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
@@ -1320,7 +1325,7 @@ Public Class ShellNumberPanelVM
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)
Map.refControllerInputPanelVM.ShowMessage("Grid from Selection", "Select the face of the object where to place the grid")
End Sub
#End Region ' CPlaneObj
@@ -1337,7 +1342,7 @@ Public Class ShellNumberPanelVM
End Property
Public Sub DragMove()
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(ShellNumberSelectionTypes.BOTH)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MOVE)
End Sub
@@ -1356,41 +1361,13 @@ Public Class ShellNumberPanelVM
End Property
Public Sub DragRotate()
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(ShellNumberSelectionTypes.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.SHELLNUMBERPARAM)
End Sub
#End Region ' MachParam
#End Region ' COMMANDS
End Class
+21 -20
View File
@@ -199,7 +199,7 @@ Public Class StartMachPanelVM
Return m_bAdd_IsChecked
End Get
Set(value As Boolean)
If Map.refSceneHostVM.MainController.GetStep = 0 Then
If Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bAdd_IsChecked = value
If value Then
m_bEdit_IsChecked = False
@@ -221,7 +221,7 @@ Public Class StartMachPanelVM
Return m_bEdit_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelStart) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelStart) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bEdit_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -243,7 +243,7 @@ Public Class StartMachPanelVM
Return m_bGrid_IsChecked
End Get
Set(value As Boolean)
If Map.refSceneHostVM.MainController.GetStep = 0 Then
If Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bGrid_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -271,7 +271,7 @@ Public Class StartMachPanelVM
Return m_bMove_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelStart) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelStart) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bMove_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -587,7 +587,7 @@ Public Class StartMachPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub Point(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup( m_nPartId, LAY_NEWSTART)
If nNewStartLayerId = GDB_ID.NULL Then
nNewStartLayerId = EgtCreateGroup(m_nPartId)
@@ -620,7 +620,7 @@ Public Class StartMachPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup( m_nPartId, LAY_NEWSTART)
If nNewStartLayerId = GDB_ID.NULL Then
nNewStartLayerId = EgtCreateGroup(m_nPartId)
@@ -653,7 +653,7 @@ Public Class StartMachPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand()
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MODIFYCURVE)
End Sub
@@ -678,7 +678,7 @@ Public Class StartMachPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand()
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOARC)
@@ -707,7 +707,7 @@ Public Class StartMachPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
InitCommand()
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOLINE)
@@ -737,7 +737,7 @@ Public Class StartMachPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -762,7 +762,7 @@ Public Class StartMachPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -787,7 +787,7 @@ Public Class StartMachPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -812,7 +812,7 @@ Public Class StartMachPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -837,7 +837,7 @@ Public Class StartMachPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -862,7 +862,7 @@ Public Class StartMachPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -887,7 +887,7 @@ Public Class StartMachPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub
@@ -911,7 +911,7 @@ Public Class StartMachPanelVM
''' 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
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub
@@ -951,7 +951,7 @@ Public Class StartMachPanelVM
''' Execute the CPlaneObj. This method is invoked by the CPlaneObjCommand.
''' </summary>
Public Sub CPlaneObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
' salvo selezione precedente e deseleziono altri oggetti
m_PrevSelObjs.Clear()
Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
@@ -961,7 +961,7 @@ Public Class StartMachPanelVM
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)
Map.refControllerInputPanelVM.ShowMessage("Grid from Selection", "Select the face of the object where to place the grid")
End Sub
#End Region ' CPlaneObj
@@ -978,6 +978,7 @@ Public Class StartMachPanelVM
End Property
Public Sub DragMove()
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand()
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MOVE)
End Sub
@@ -996,7 +997,7 @@ Public Class StartMachPanelVM
End Property
Public Sub Delete()
If IsNothing(SelStart) Then Return
If IsNothing(SelStart) OrElse Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
If EgtErase(m_SelStart.nId) Then
Dim nSelStartIndex As Integer = m_StartList.IndexOf(SelStart)
m_StartList.Remove(SelStart)