Icarus :
- sistemata Grid da oggetto anche per Ribs.
This commit is contained in:
@@ -270,29 +270,17 @@
|
||||
<Image Source="/Resources/GridViewPanel/CplaneELEVATION.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="7"
|
||||
Command="{Binding CPlaneRotate_Command}"
|
||||
ToolTip="{Binding CPlaneRotateToolTip}"
|
||||
Command="{Binding CPlaneOrigin_Command}"
|
||||
ToolTip="{Binding CPlaneOriginToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/GridViewPanel/CplaneROTATE.png" Stretch="Uniform"/>
|
||||
<Image Source="/Resources/GridViewPanel/CplaneORIGIN.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="8"
|
||||
Command="{Binding CPlane3P_Command}"
|
||||
ToolTip="{Binding CPlane3PToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/GridViewPanel/CPlane3POINTS.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="9"
|
||||
Command="{Binding CPlanePerpObj_Command}"
|
||||
ToolTip="{Binding CPlanePerpObjToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/GridViewPanel/CPlanePERPCURVE.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<!--<Button Grid.Column="10"
|
||||
Command="{Binding CPlaneObj_Command}"
|
||||
ToolTip="{Binding CPlaneObjToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/GridViewPanel/CplaneOBJECT.png" Stretch="Uniform"/>
|
||||
</Button>-->
|
||||
</Button>
|
||||
</Grid>
|
||||
</Border>
|
||||
<!--<Popup IsOpen="{Binding IsChecked, ElementName=GridBtn}"
|
||||
|
||||
@@ -612,7 +612,18 @@ Public Class RibPanelVM
|
||||
|
||||
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
|
||||
|
||||
@@ -1117,6 +1128,22 @@ Public Class RibPanelVM
|
||||
|
||||
#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>
|
||||
@@ -1134,7 +1161,15 @@ Public Class RibPanelVM
|
||||
''' </summary>
|
||||
Public Sub CPlaneObj(ByVal param As Object)
|
||||
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
|
||||
' 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
|
||||
|
||||
@@ -1291,19 +1291,35 @@ Public Class MySceneHostVM
|
||||
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel)
|
||||
Dim nId As Integer = EgtGetFirstObjInSelWin()
|
||||
While nId <> GDB_ID.NULL
|
||||
' Recupero l'identificativo del pezzo cui appartiene
|
||||
Dim nPartId As Integer = EgtGetParent(nId)
|
||||
Dim bFound As Boolean = False
|
||||
If nPartId = Map.refRibPanelVM.nRibLayerId Then bFound = True
|
||||
If Not bFound Then
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
Continue While
|
||||
' Se per Griglia da faccia di oggetto
|
||||
If Map.refRibPanelVM.bCPlaneObj_IsActive Then
|
||||
If EgtGetType( nId) = GDB_TY.SRF_MESH Then
|
||||
m_nIdToSel = nId
|
||||
Exit While
|
||||
End If
|
||||
Else
|
||||
' Recupero l'identificativo del pezzo cui appartiene
|
||||
Dim nPartId As Integer = EgtGetParent(nId)
|
||||
Dim bFound As Boolean = False
|
||||
If nPartId = Map.refRibPanelVM.nRibLayerId Then bFound = True
|
||||
If bFound Then
|
||||
m_nIdToSel = nId
|
||||
Exit While
|
||||
End If
|
||||
End If
|
||||
' Memorizzo Id da selezionare
|
||||
m_nIdToSel = nId
|
||||
Exit While
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
If 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
|
||||
@@ -1324,10 +1340,22 @@ 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 selezione da eseguire
|
||||
|
||||
' Se selezione da eseguire
|
||||
ElseIf m_nIdToSel <> GDB_ID.NULL Then
|
||||
' Eseguo la selezione
|
||||
Map.refRibPanelVM.SelStartFromId(m_nIdToSel)
|
||||
If Map.refRibPanelVM.bCPlaneObj_IsActive Then
|
||||
' eseguo comando
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
|
||||
Map.refRibPanelVM.ResetCPlaneObjIsActive()
|
||||
' ripristino selezioni precedenti
|
||||
For Each Id In Map.refRibPanelVM.PrevSelObjs
|
||||
EgtSelectObj(Id)
|
||||
Next
|
||||
Map.refControllerInputPanelVM.ResetInputBox()
|
||||
Else
|
||||
' Eseguo la selezione
|
||||
Map.refRibPanelVM.SelStartFromId(m_nIdToSel)
|
||||
End If
|
||||
End If
|
||||
' Reset
|
||||
m_bDrag = False
|
||||
@@ -1352,13 +1380,10 @@ Public Class MySceneHostVM
|
||||
Dim nPartId As Integer = EgtGetParent(nId)
|
||||
Dim bFound As Boolean = False
|
||||
If nPartId = Map.refShellNumberPanelVM.nShellNumberLayerId Then bFound = True
|
||||
If Not bFound Then
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
Continue While
|
||||
If bFound Then
|
||||
m_nIdToSel = nId
|
||||
Exit While
|
||||
End If
|
||||
' Memorizzo Id da selezionare
|
||||
m_nIdToSel = nId
|
||||
Exit While
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
If m_nIdToSel <> GDB_ID.NULL Then
|
||||
@@ -1392,7 +1417,8 @@ 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 selezione da eseguire
|
||||
|
||||
' Se selezione da eseguire
|
||||
ElseIf m_nIdToSel <> GDB_ID.NULL Then
|
||||
If Map.refShellNumberPanelVM.bCPlaneObj_IsActive Then
|
||||
' eseguo comando
|
||||
|
||||
@@ -269,13 +269,13 @@
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/GridViewPanel/CplaneELEVATION.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="9"
|
||||
<Button Grid.Column="7"
|
||||
Command="{Binding CPlaneOrigin_Command}"
|
||||
ToolTip="{Binding CPlaneOriginToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/GridViewPanel/CPlaneORIGIN.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="10"
|
||||
<Button Grid.Column="8"
|
||||
Command="{Binding CPlaneObj_Command}"
|
||||
ToolTip="{Binding CPlaneObjToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
|
||||
Reference in New Issue
Block a user