- miglioramenti ribs
- aggiunta estrusione diretta su ribs - aggiunte ExtLibs
This commit is contained in:
@@ -47,11 +47,13 @@
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EgtUILib">
|
||||
<HintPath>..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
|
||||
<Reference Include="EgtUILib, Version=2.4.7.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\ExtLibs\EgtUILib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtWPFLib5">
|
||||
<HintPath>..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath>
|
||||
<Reference Include="EgtWPFLib5, Version=2.4.5.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\ExtLibs\EgtWPFLib5.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Ionic.Zip.1.9.1.8\lib\Ionic.Zip.dll</HintPath>
|
||||
@@ -147,6 +149,10 @@
|
||||
<DependentUpon>ProjManagerV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProjManager\ProjManagerVM.vb" />
|
||||
<Compile Include="RibPanel\RibPanelV.xaml.vb">
|
||||
<DependentUpon>RibPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RibPanel\RibPanelVM.vb" />
|
||||
<Compile Include="RightPanel\RightPanelV.xaml.vb">
|
||||
<DependentUpon>RightPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -277,6 +283,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="RibPanel\RibPanelV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="RightPanel\RightPanelV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
Public Const LAY_AUXSOLIDS = "AuxSolids"
|
||||
Public Const FRAME_PART = "FramePart"
|
||||
Public Const START_GEOM = "Start"
|
||||
Public Const RIB_EXTRUSION = "RibExtrusion"
|
||||
Public Const RIB_CURVE = "RibCurve"
|
||||
Public Const VIEWPARAMS = "ViewParams"
|
||||
Public Const IMPORTED_SOLID = "ImportedSolid"
|
||||
Public Const RESULT_READ_PROG = "ResultReadProg"
|
||||
@@ -98,6 +100,8 @@
|
||||
|
||||
' parametri StartMach
|
||||
Public Const LAY_NEWSTART = "NewStart"
|
||||
Public Const LAY_NEWRIB = "NewRib"
|
||||
Public Const LAY_NEWEXTRUSION = "NewExtrusion"
|
||||
|
||||
Public Const FILE_PATH = "FilePath"
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</Style>
|
||||
</StackPanel.Style>
|
||||
<TextBlock Text="{Binding Message}"
|
||||
Visibility="{Binding Message_Visibility}"
|
||||
Visibility="{Binding Message_Visibility}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<TextBox Text="{Binding Text, UpdateSourceTrigger=PropertyChanged}"
|
||||
Width="200"
|
||||
@@ -37,10 +37,10 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Command="{Binding Show_Command}" Visibility="{Binding ShowBtn_Visibility}"
|
||||
Content="{Binding ShowMsg}" Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
Content="{Binding ShowMsg}" Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
<Button Command="{Binding Done_Command}" Visibility="{Binding DoneBtn_Visibility}"
|
||||
Grid.Column="1"
|
||||
Content="{Binding OkMsg}" Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
Content="{Binding OkMsg}" Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<PrintApp:StartMachPanelV DataContext="{StaticResource StartMachPanelVM}"/>
|
||||
</TabItem>
|
||||
<TabItem Header="RIBS">
|
||||
<Button Height="100"/>
|
||||
<PrintApp:RibPanelV DataContext="{StaticResource RibPanelVM}"/>
|
||||
</TabItem>
|
||||
<TabItem Header="SHELLNUMBER">
|
||||
<Button Height="100"/>
|
||||
|
||||
@@ -34,6 +34,8 @@ Public Class LeftPanelVM
|
||||
|
||||
Case Panels.STARTMACH
|
||||
Map.refStartMachPanelVM.Dispose()
|
||||
Case Panels.RIBS
|
||||
Map.refRibPanelVM.Dispose()
|
||||
End Select
|
||||
m_SelPanel = Panel
|
||||
Select Case Panel
|
||||
@@ -43,6 +45,8 @@ Public Class LeftPanelVM
|
||||
Map.refDispositionPanelVM.Init()
|
||||
Case Panels.STARTMACH
|
||||
Map.refStartMachPanelVM.Init()
|
||||
Case Panels.RIBS
|
||||
Map.refRibPanelVM.Init()
|
||||
End Select
|
||||
NotifyPropertyChanged(NameOf(SelPanel))
|
||||
End Sub
|
||||
|
||||
@@ -180,7 +180,11 @@ Public Class MainWindowVM
|
||||
If PressedKey = Key.Escape Then
|
||||
' reset Azione corrente
|
||||
Map.refSceneHostVM.MainController.ResetStatus()
|
||||
Map.refControllerInputPanelVM.ResetInputBox()
|
||||
If Not (Not IsNothing(Map.refTopPanelVM.SelPage) AndAlso Map.refTopPanelVM.SelPage AndAlso
|
||||
Not IsNothing(Map.refTopPanelVM.SelModifyMode) AndAlso Map.refTopPanelVM.SelModifyMode.ModifyMode = ModifyModes.RIBS) AndAlso
|
||||
Map.refRibPanelVM.bIsCreatingPath Then
|
||||
Map.refControllerInputPanelVM.ResetInputBox()
|
||||
End If
|
||||
' se misura attiva, la disattivo
|
||||
If Map.refInstrumentPanelVM.GetDistIsChecked Then
|
||||
Map.refInstrumentPanelVM.SetGetDistance_IsChecked(False)
|
||||
|
||||
@@ -0,0 +1,296 @@
|
||||
<StackPanel x:Class="RibPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:PrintApp="clr-namespace:_3dPrintApp"
|
||||
Margin="5">
|
||||
<StackPanel.Resources>
|
||||
<PrintApp:CenterToolTipConverter x:Key="CenterToolTipConverter"/>
|
||||
</StackPanel.Resources>
|
||||
<ComboBox ItemsSource="{Binding RibList}"
|
||||
SelectedItem="{Binding SelRib}"
|
||||
DisplayMemberPath="ghName"/>
|
||||
<!--Add Button-->
|
||||
<ToggleButton x:Name="AddBtn"
|
||||
Content="Add"
|
||||
IsChecked="{Binding bAdd_IsChecked}"
|
||||
Style="{StaticResource ToolBar_TextToggleButton}"/>
|
||||
<Popup IsOpen="{Binding IsChecked, ElementName=AddBtn}"
|
||||
PlacementTarget="{Binding ElementName=AddBtn}"
|
||||
Style="{StaticResource LeftPanel_Popup}">
|
||||
<Border Style="{StaticResource LeftPanelPopup_Border}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="0"
|
||||
Command="{Binding Import_Command}"
|
||||
ToolTip="{Binding Import_ToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/ProjectManager/Import.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="1"
|
||||
Command="{Binding Line2P_Command}"
|
||||
ToolTip="{Binding Line2P_ToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/DrawPanel/Line2P.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Popup>
|
||||
<!--Edit Button-->
|
||||
<ToggleButton x:Name="EditBtn"
|
||||
Content="Edit"
|
||||
IsChecked="{Binding bEdit_IsChecked}"
|
||||
Style="{StaticResource ToolBar_TextToggleButton}"/>
|
||||
<Popup IsOpen="{Binding IsChecked, ElementName=EditBtn}"
|
||||
PlacementTarget="{Binding ElementName=EditBtn}"
|
||||
Style="{StaticResource LeftPanel_Popup}">
|
||||
<Border Style="{StaticResource LeftPanelPopup_Border}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="0"
|
||||
Command="{Binding Delete_Command}"
|
||||
ToolTip="{Binding Delete_ToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/DrawPanel/Delete.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="1"
|
||||
Command="{Binding ModifyCurve_Command}"
|
||||
ToolTip="{Binding ModifyCurve_ToolTip}"
|
||||
Visibility="{Binding Compo_Visibility}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/DrawPanel/ModifyCurve.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="2"
|
||||
Command="{Binding AddPointCurve_Command}"
|
||||
ToolTip="{Binding AddPointCurve_ToolTip}"
|
||||
Visibility="{Binding Compo_Visibility}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/DrawPanel/AddPointCurve.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="3"
|
||||
Command="{Binding RemovePointCurve_Command}"
|
||||
ToolTip="{Binding RemovePointCurve_ToolTip}"
|
||||
Visibility="{Binding Compo_Visibility}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/DrawPanel/RemovePointCurve.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<!--<Button Grid.Column="4"
|
||||
Command="{Binding Extrude_Command}"
|
||||
ToolTip="{Binding Extrude_ToolTip}"
|
||||
Visibility="{Binding Compo_Visibility}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/DrawPanel/Extrude.png" Stretch="Uniform"/>
|
||||
</Button>-->
|
||||
</Grid>
|
||||
</Border>
|
||||
</Popup>
|
||||
<!--Grid Button-->
|
||||
<ToggleButton x:Name="GridBtn"
|
||||
Content="Grid"
|
||||
IsChecked="{Binding bGrid_IsChecked}"
|
||||
Style="{StaticResource ToolBar_TextToggleButton}"/>
|
||||
<Popup IsOpen="{Binding IsChecked, ElementName=GridBtn}"
|
||||
PlacementTarget="{Binding ElementName=GridBtn}"
|
||||
Style="{StaticResource LeftPanel_Popup}">
|
||||
<Border Style="{StaticResource LeftPanelPopup_Border}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Command="{Binding CPlaneTop_Command}"
|
||||
ToolTip="{Binding CPlaneTopToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/GridViewPanel/CplaneTOP.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="1"
|
||||
Command="{Binding CPlaneFront_Command}"
|
||||
ToolTip="{Binding CPlaneFrontToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/GridViewPanel/CplaneFRONT.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="2"
|
||||
Command="{Binding CPlaneRight_Command}"
|
||||
ToolTip="{Binding CPlaneRightToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/GridViewPanel/CplaneRIGHT.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="3"
|
||||
Command="{Binding CPlaneBack_Command}"
|
||||
ToolTip="{Binding CPlaneBackToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/GridViewPanel/CplaneBACK.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="4"
|
||||
Command="{Binding CPlaneLeft_Command}"
|
||||
ToolTip="{Binding CPlaneLeftToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/GridViewPanel/CplaneLEFT.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="5"
|
||||
Command="{Binding CPlaneBottom_Command}"
|
||||
ToolTip="{Binding CPlaneBottomToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/GridViewPanel/CplaneBOTTOM.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="6"
|
||||
Command="{Binding CPlaneElevation_Command}"
|
||||
ToolTip="{Binding CPlaneElevationToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/GridViewPanel/CplaneELEVATION.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Grid.Column="7"
|
||||
Command="{Binding CPlaneRotate_Command}"
|
||||
ToolTip="{Binding CPlaneRotateToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}">
|
||||
<Image Source="/Resources/GridViewPanel/CplaneROTATE.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>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Popup>
|
||||
<!--Move Button-->
|
||||
<ToggleButton x:Name="MoveBtn"
|
||||
Content="Move"
|
||||
IsChecked="{Binding bMove_IsChecked}"
|
||||
Style="{StaticResource ToolBar_TextToggleButton}"/>
|
||||
<Popup IsOpen="{Binding IsChecked, ElementName=MoveBtn}"
|
||||
PlacementTarget="{Binding ElementName=MoveBtn}"
|
||||
Style="{StaticResource LeftPanel_Popup}">
|
||||
<Border Style="{StaticResource LeftPanelPopup_Border}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="0,0,0,2.5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="X"
|
||||
VerticalAlignment="Center"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding sXPos, UpdateSourceTrigger=Explicit}"
|
||||
Grid.Column="1"
|
||||
Margin="5,0,0,0"
|
||||
Style="{StaticResource LeftPanel_TextBox}"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1"
|
||||
Margin="0,2.5,0,2.5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Y"
|
||||
VerticalAlignment="Center"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding sYPos, UpdateSourceTrigger=Explicit}"
|
||||
Grid.Column="1"
|
||||
Margin="5,0,0,0"
|
||||
Style="{StaticResource LeftPanel_TextBox}"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2"
|
||||
Margin="0,2.5,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Z"
|
||||
VerticalAlignment="Center"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding sZPos, UpdateSourceTrigger=Explicit}"
|
||||
Grid.Column="1"
|
||||
Margin="5,0,0,0"
|
||||
Style="{StaticResource LeftPanel_TextBox}"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="3"
|
||||
Margin="0,2.5,0,0">
|
||||
<Button Content="Drag"
|
||||
Command="{Binding DragMove_Command}"
|
||||
Style="{StaticResource LeftPanel_TextButton}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Popup>
|
||||
<ToggleButton x:Name="RotateBtn"
|
||||
Content="Rotate"
|
||||
IsChecked="{Binding bRotate_IsChecked}"
|
||||
Style="{StaticResource ToolBar_TextToggleButton}"/>
|
||||
<Popup IsOpen="{Binding IsChecked, ElementName=RotateBtn}"
|
||||
Grid.Column="1"
|
||||
PlacementTarget="{Binding ElementName=RotateBtn}"
|
||||
Style="{StaticResource LeftPanel_Popup}">
|
||||
<Border Style="{StaticResource LeftPanelPopup_Border}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<UniformGrid Columns="3">
|
||||
<RadioButton Content="X"
|
||||
GroupName="Axes"
|
||||
IsChecked="{Binding RotAxes[0]}"
|
||||
Style="{StaticResource ToolBar_ToggleButton}"/>
|
||||
<RadioButton Content="Y"
|
||||
GroupName="Axes"
|
||||
IsChecked="{Binding RotAxes[1]}"
|
||||
Style="{StaticResource ToolBar_ToggleButton}"/>
|
||||
<RadioButton Content="Z"
|
||||
GroupName="Axes"
|
||||
IsChecked="{Binding RotAxes[2]}"
|
||||
Style="{StaticResource ToolBar_ToggleButton}"/>
|
||||
</UniformGrid>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Row="1"
|
||||
Text="{Binding sRotAngle, UpdateSourceTrigger=Explicit}"
|
||||
Margin="0,5,0,0"/>
|
||||
<Grid Grid.Row="2"
|
||||
Margin="0,2.5,0,0">
|
||||
<Button Content="Drag"
|
||||
Command="{Binding DragRotate_Command}"
|
||||
Style="{StaticResource LeftPanel_TextButton}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Popup>
|
||||
|
||||
</StackPanel>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class RibPanelV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,978 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Collections.Specialized
|
||||
Imports System.Globalization
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class RibPanelVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public Enum StartMachTypes As Integer
|
||||
NULL = 0
|
||||
POINT = 1
|
||||
COMPO = 2
|
||||
End Enum
|
||||
|
||||
Private m_nPartId As Integer = GDB_ID.NULL
|
||||
Private m_nRibLayerId As Integer = GDB_ID.NULL
|
||||
Friend ReadOnly Property nRibLayerId As Integer
|
||||
Get
|
||||
Return m_nRibLayerId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_RibList As New ObservableCollection(Of RibEntity)
|
||||
Public ReadOnly Property RibList As ObservableCollection(Of RibEntity)
|
||||
Get
|
||||
Return m_RibList
|
||||
End Get
|
||||
End Property
|
||||
Private m_SelRib As RibEntity
|
||||
Public Property SelRib As RibEntity
|
||||
Get
|
||||
Return m_SelRib
|
||||
End Get
|
||||
Set(value As RibEntity)
|
||||
m_SelRib = value
|
||||
EgtDeselectLayerObjs(m_nRibLayerId)
|
||||
If Not IsNothing(value) Then
|
||||
EgtSelectObj(value.nId)
|
||||
' 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_SelRib) Then
|
||||
Dim b3Reference As New BBox3d
|
||||
EgtGetBBoxGlob(m_SelRib.nId, GDB_BB.STANDARD, b3Reference)
|
||||
Return LenToString(b3Reference.Min.x, 1)
|
||||
Else
|
||||
Return ""
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim b3Reference As New BBox3d
|
||||
EgtGetBBoxGlob(m_SelRib.nId, GDB_BB.STANDARD, b3Reference)
|
||||
Dim dNewXPos As Double = b3Reference.Min.x
|
||||
StringToLen(value, dNewXPos)
|
||||
If dNewXPos >= 0 AndAlso dNewXPos <= CurrentMachine.b3Tab.DimX Then
|
||||
EgtMove(m_SelRib.nId, New Point3d(dNewXPos, b3Reference.Min.y, b3Reference.Min.z) - b3Reference.Min)
|
||||
EgtDraw()
|
||||
Else
|
||||
NotifyPropertyChanged(NameOf(sXPos))
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property sYPos As String
|
||||
Get
|
||||
If Not IsNothing(m_SelRib) Then
|
||||
Dim b3Reference As New BBox3d
|
||||
EgtGetBBoxGlob(m_SelRib.nId, GDB_BB.STANDARD, b3Reference)
|
||||
Return LenToString(b3Reference.Min.y, 1)
|
||||
Else
|
||||
Return ""
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim b3Reference As New BBox3d
|
||||
EgtGetBBoxGlob(m_SelRib.nId, GDB_BB.STANDARD, b3Reference)
|
||||
Dim dNewYPos As Double = b3Reference.Min.y
|
||||
StringToLen(value, dNewYPos)
|
||||
If dNewYPos >= 0 AndAlso dNewYPos <= CurrentMachine.b3Tab.DimY Then
|
||||
EgtMove(m_SelRib.nId, New Point3d(b3Reference.Min.x, dNewyPos, b3Reference.Min.z) - b3Reference.Min)
|
||||
EgtDraw()
|
||||
Else
|
||||
NotifyPropertyChanged(NameOf(sYPos))
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property sZPos As String
|
||||
Get
|
||||
If Not IsNothing(m_SelRib) Then
|
||||
Dim b3Reference As New BBox3d
|
||||
EgtGetBBoxGlob(m_SelRib.nId, GDB_BB.STANDARD, b3Reference)
|
||||
Return LenToString(b3Reference.Min.z, 1)
|
||||
Else
|
||||
Return ""
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim b3Reference As New BBox3d
|
||||
EgtGetBBoxGlob(m_SelRib.nId, GDB_BB.STANDARD, b3Reference)
|
||||
Dim dNewZPos As Double = b3Reference.Min.y
|
||||
StringToLen(value, dNewZPos)
|
||||
If dNewZPos >= 0 Then
|
||||
EgtMove(m_SelRib.nId, New Point3d(b3Reference.Min.x, b3Reference.Min.y, dNewZPos) - b3Reference.Min)
|
||||
EgtDraw()
|
||||
Else
|
||||
NotifyPropertyChanged(NameOf(sZPos))
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_RotAxes() As Boolean = {False, False, True}
|
||||
Public Property RotAxes As Boolean()
|
||||
Get
|
||||
Return m_RotAxes
|
||||
End Get
|
||||
Set(value As Boolean())
|
||||
m_RotAxes = 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
|
||||
ElseIf m_RotAxes(2) Then
|
||||
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 b3Rib As New BBox3d
|
||||
EgtGetBBoxGlob(m_SelRib.nId, GDB_BB.STANDARD, b3Rib)
|
||||
If EgtRotate(m_SelRib.nId, b3Rib.Center, vtSelRotAxes, dNewAngle) Then
|
||||
EgtDraw()
|
||||
RefreshPos()
|
||||
m_sRotAngle = 0
|
||||
NotifyPropertyChanged(NameOf(sRotAngle))
|
||||
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)
|
||||
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 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_SelRib) 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)
|
||||
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 Set
|
||||
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_SelRib) 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_SelRib) 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
|
||||
|
||||
' 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_cmdPoint As ICommand
|
||||
Private m_cmdLine2P As ICommand
|
||||
Private m_cmdModifyCurve As ICommand
|
||||
Private m_cmdAddPointCurve As ICommand
|
||||
Private m_cmdRemovePointCurve 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_cmdDelete As ICommand
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTORS"
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in EgtCAM5Map
|
||||
Map.SetRefRibPanelVM(Me)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTORS
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Sub Init()
|
||||
' azzero indice
|
||||
StartEntity.ResetSharedIndex()
|
||||
' fisso frame originale
|
||||
m_OriginalGridFrame = EgtGetGridFrame()
|
||||
' recupero dati pezzo selezionato layer ed entita'
|
||||
m_nPartId = Map.refTopPanelVM.SelPart.nPartId
|
||||
m_nRibLayerId = Map.refTopPanelVM.SelPart.nRibsLayerId
|
||||
'recupero tutte le entita' di partenza
|
||||
m_RibList.Clear()
|
||||
Dim nRibId As Integer = EgtGetFirstInGroup(m_nRibLayerId)
|
||||
While nRibId <> GDB_ID.NULL
|
||||
m_RibList.Add(New RibEntity(nRibId))
|
||||
nRibId = EgtGetNext(nRibId)
|
||||
End While
|
||||
If m_RibList.Count > 0 Then
|
||||
SelRib = m_RibList(0)
|
||||
NotifyPropertyChanged(NameOf(SelRib))
|
||||
End If
|
||||
Map.refSceneHostVM.MainScene.SetStatusNull()
|
||||
End Sub
|
||||
|
||||
Friend Sub Dispose()
|
||||
' ripristino frame originale
|
||||
EgtSetGridFrame(m_OriginalGridFrame)
|
||||
EgtDraw()
|
||||
Map.refSceneHostVM.MainScene.SetStatusNull()
|
||||
End Sub
|
||||
|
||||
Friend Sub RefreshPos()
|
||||
NotifyPropertyChanged(NameOf(sXPos))
|
||||
NotifyPropertyChanged(NameOf(sYPos))
|
||||
NotifyPropertyChanged(NameOf(sZPos))
|
||||
End Sub
|
||||
|
||||
Private Function InitCommand() As Boolean
|
||||
' attivo modifiche su scena
|
||||
Map.refSceneHostVM.MainScene.ResetStatus()
|
||||
' seleziono percorso corrente
|
||||
EgtDeselectAll()
|
||||
EgtSelectObj(m_SelRib.nId)
|
||||
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)
|
||||
If command <> Controller.CMD.LINE2P AndAlso command <> Controller.CMD.EXTRUDE Then Return
|
||||
' se finita creazione estrusione
|
||||
If m_bIsCreatingExtrusion Then
|
||||
Dim NewEntity As RibEntity = Nothing
|
||||
m_bIsCreatingExtrusion = False
|
||||
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)
|
||||
' coloro l'entita' di blu
|
||||
Dim c3LightBlue As Color3d
|
||||
c3LightBlue.FromColor(System.Drawing.Color.MediumOrchid)
|
||||
EgtSetColor(nNewEntityId, c3LightBlue)
|
||||
'' lo sposto nel layer dei rib
|
||||
EgtRelocateGlob(nNewEntityId, m_nRibLayerId, GDB_POS.LAST_SON)
|
||||
'' lo aggiungo alla lista
|
||||
NewEntity = New RibEntity(nNewEntityId)
|
||||
m_RibList.Add(NewEntity)
|
||||
' cancello layer
|
||||
Dim nNewRibLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWRIB)
|
||||
EgtErase(nNewRibLayerId)
|
||||
EgtErase(nNewExtrusionLayerId)
|
||||
End If
|
||||
' aggiorno posizione
|
||||
RefreshPos()
|
||||
' se aggiunta entita'
|
||||
If Not IsNothing(NewEntity) Then
|
||||
SelRib = NewEntity
|
||||
NotifyPropertyChanged(NameOf(SelRib))
|
||||
End If
|
||||
' rimetto la selezione scena a null
|
||||
Map.refSceneHostVM.MainScene.SetStatusNull()
|
||||
End If
|
||||
' se finita creazione curva
|
||||
If bIsCreatingPath Then
|
||||
Dim NewEntity As RibEntity = Nothing
|
||||
m_bIsCreatingPath = False
|
||||
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
|
||||
EgtSetName(nNewEntityId, RIB_EXTRUSION)
|
||||
' coloro l'entita' di blu
|
||||
Dim c3LightBlue As Color3d
|
||||
c3LightBlue.FromColor(System.Drawing.Color.MediumOrchid)
|
||||
EgtSetColor(nNewEntityId, c3LightBlue)
|
||||
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
|
||||
Else
|
||||
' cancello layer
|
||||
EgtErase(nNewRibLayerId)
|
||||
EgtErase(nNewExtrusionLayerId)
|
||||
End If
|
||||
|
||||
'' lo sposto nel layer degli start
|
||||
'EgtRelocateGlob(nNewEntityId, m_nRibLayerId, GDB_POS.LAST_SON)
|
||||
'' lo aggiungo alla lista
|
||||
'NewEntity = New RibEntity(nNewEntityId)
|
||||
'm_RibList.Add(NewEntity)
|
||||
'' cancello layer di disegno
|
||||
'EgtErase(nNewRibLayerId)
|
||||
End If
|
||||
'If NewGeomType = GDB_TY.CRV_COMPO Then
|
||||
' EgtSetName(nNewEntityId, RIB_GEOM)
|
||||
' ' coloro l'entita' di blu
|
||||
' Dim c3LightBlue As Color3d
|
||||
' c3LightBlue.FromColor(System.Drawing.Color.MediumOrchid)
|
||||
' EgtSetColor(nNewEntityId, c3LightBlue)
|
||||
' ' lo sposto nel layer degli start
|
||||
' EgtRelocateGlob(nNewEntityId, m_nRibLayerId, GDB_POS.LAST_SON)
|
||||
' ' lo aggiungo alla lista
|
||||
' NewEntity = New RibEntity(nNewEntityId)
|
||||
' m_RibList.Add(NewEntity)
|
||||
' ' cancello layer di disegno
|
||||
' EgtErase(nNewRibLayerId)
|
||||
'End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub OnKeyDown(Key As Forms.Keys)
|
||||
If Key = Forms.Keys.Escape Then
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Function OnMouseSelectingObj(nId As Integer) As Boolean
|
||||
Return EgtGetParent(nId) = m_nRibLayerId
|
||||
End Function
|
||||
|
||||
Friend Sub SelStartFromId(nId)
|
||||
Dim SelRibEntity As RibEntity = m_RibList.FirstOrDefault(Function(x) x.nId = nId)
|
||||
If Not IsNothing(SelRibEntity) Then
|
||||
SelRib = SelRibEntity
|
||||
NotifyPropertyChanged(NameOf(SelRib))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "Line2P"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlaneTop.
|
||||
''' </summary>
|
||||
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
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
|
||||
''' </summary>
|
||||
Public Sub Line2P(ByVal param As Object)
|
||||
Dim nNewRibLayerId As Integer = EgtCreateGroup(m_nPartId)
|
||||
EgtSetName(nNewRibLayerId, LAY_NEWRIB)
|
||||
EgtSetCurrPartLayer(m_nPartId, nNewRibLayerId)
|
||||
Map.refSceneHostVM.MainController.SetContinue()
|
||||
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.LINE2P) Then
|
||||
m_bIsCreatingPath = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Line2P
|
||||
|
||||
#Region "ModifyCurve"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Linear Dimension.
|
||||
''' </summary>
|
||||
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
|
||||
|
||||
''' <summary>
|
||||
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
|
||||
''' </summary>
|
||||
Public Sub ModifyCurve(ByVal param As Object)
|
||||
InitCommand()
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MODIFYCURVE)
|
||||
End Sub
|
||||
|
||||
#End Region ' ModifyCurve
|
||||
|
||||
#Region "AddPointCurve"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Linear Dimension.
|
||||
''' </summary>
|
||||
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
|
||||
|
||||
''' <summary>
|
||||
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
|
||||
''' </summary>
|
||||
Public Sub AddPointCurve(ByVal param As Object)
|
||||
InitCommand()
|
||||
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"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Linear Dimension.
|
||||
''' </summary>
|
||||
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
|
||||
|
||||
''' <summary>
|
||||
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
|
||||
''' </summary>
|
||||
Public Sub RemovePointCurve(ByVal param As Object)
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||
InitCommand()
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOLINE)
|
||||
Else
|
||||
InitCommand()
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.REMOVEPOINTCURVE)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' RemovePointCurve
|
||||
|
||||
#Region "CPlaneTop"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlaneTop.
|
||||
''' </summary>
|
||||
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
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlaneTop(ByVal param As Object)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlaneTop
|
||||
|
||||
#Region "CPlaneFront"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlaneFront.
|
||||
''' </summary>
|
||||
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
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlaneFront. This method is invoked by the CPlaneFrontCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlaneFront(ByVal param As Object)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlaneFront
|
||||
|
||||
#Region "CPlaneRight"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlaneRight.
|
||||
''' </summary>
|
||||
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
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlaneRight. This method is invoked by the CPlaneRightCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlaneRight(ByVal param As Object)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlaneRight
|
||||
|
||||
#Region "CPlaneBack"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlaneBack.
|
||||
''' </summary>
|
||||
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
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlaneBack. This method is invoked by the CPlaneBackCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlaneBack(ByVal param As Object)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlaneBack
|
||||
|
||||
#Region "CPlaneLeft"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlaneLeft.
|
||||
''' </summary>
|
||||
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
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlaneLeft. This method is invoked by the CPlaneLeftCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlaneLeft(ByVal param As Object)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlaneLeft
|
||||
|
||||
#Region "CPlaneBottom"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlaneBottom.
|
||||
''' </summary>
|
||||
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
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlaneBottom. This method is invoked by the CPlaneBottomCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlaneBottom(ByVal param As Object)
|
||||
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlaneBottom
|
||||
|
||||
#Region "CPlaneElevation"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlaneElevation.
|
||||
''' </summary>
|
||||
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
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlaneElevation. This method is invoked by the CPlaneElevationCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlaneElevation(ByVal param As Object)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlaneElevation
|
||||
|
||||
#Region "CPlaneOrigin"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlaneOrigin.
|
||||
''' </summary>
|
||||
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
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlaneOrigin. This method is invoked by the CPlaneOriginCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlaneOrigin(ByVal param As Object)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlaneOrigin
|
||||
|
||||
#Region "CPlaneRotate"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlaneRotate.
|
||||
''' </summary>
|
||||
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
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlaneRotate(ByVal param As Object)
|
||||
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"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlane3P.
|
||||
''' </summary>
|
||||
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
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlane3P(ByVal param As Object)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_3P)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlane3P
|
||||
|
||||
#Region "CPlanePerpObj"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlanePerpObj.
|
||||
''' </summary>
|
||||
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
|
||||
|
||||
''' <summary>
|
||||
''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand.
|
||||
''' </summary>
|
||||
Public Sub CPlanePerpObj(ByVal param As Object)
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_PERPCURVE)
|
||||
End Sub
|
||||
|
||||
#End Region ' CPlanePerpObj
|
||||
|
||||
#Region "CPlaneObj"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do CPlanepObj.
|
||||
''' </summary>
|
||||
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
|
||||
|
||||
''' <summary>
|
||||
''' 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)
|
||||
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()
|
||||
InitCommand()
|
||||
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MOVE)
|
||||
End Sub
|
||||
|
||||
#End Region ' DragMove
|
||||
|
||||
#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 IsNothing(SelRib) Then Return
|
||||
If EgtErase(m_SelRib.nId) Then
|
||||
Dim nSelStartIndex As Integer = m_RibList.IndexOf(SelRib)
|
||||
m_RibList.Remove(SelRib)
|
||||
If nSelStartIndex < m_RibList.Count Then
|
||||
SelRib = m_RibList(nSelStartIndex)
|
||||
ElseIf m_RibList.Count > 0 Then
|
||||
SelRib = m_RibList(m_RibList.Count - 1)
|
||||
Else
|
||||
SelRib = Nothing
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(SelRib))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Delete
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
|
||||
Public Class RibEntity
|
||||
Inherits VMBase
|
||||
|
||||
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_nId As Integer
|
||||
Public ReadOnly Property nId As Integer
|
||||
Get
|
||||
Return m_nId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
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, "Rib"})
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(nId As Integer)
|
||||
m_nId = nId
|
||||
m_nIndex = nSharedIndex
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -55,6 +55,7 @@ Public Class MySceneHostVM
|
||||
AddHandler MainController.SetInputBoxCheck, AddressOf SetInputBoxCheck
|
||||
AddHandler MainController.AddInputBoxCombo, AddressOf AddInputBoxCombo
|
||||
AddHandler MainController.UpdateUI, AddressOf UpdateUI
|
||||
AddHandler MainController.OnExecCmdEnd, AddressOf OnExecCmdEnd
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
@@ -368,6 +369,8 @@ Public Class MySceneHostVM
|
||||
Part_OnMouseDownScene(sender, e)
|
||||
Case ModifyModes.STARTMACH
|
||||
StartMach_OnMouseDownScene(sender, e)
|
||||
Case ModifyModes.RIBS
|
||||
Rib_OnMouseDownScene(sender, e)
|
||||
End Select
|
||||
End If
|
||||
|
||||
@@ -405,6 +408,8 @@ Public Class MySceneHostVM
|
||||
Part_OnMouseMoveScene(sender, e)
|
||||
Case ModifyModes.STARTMACH
|
||||
StartMach_OnMouseMoveScene(sender, e)
|
||||
Case ModifyModes.RIBS
|
||||
Rib_OnMouseMoveScene(sender, e)
|
||||
End Select
|
||||
End If
|
||||
'Select Case Map.refMainMenuVM.SelPage
|
||||
@@ -441,6 +446,8 @@ Public Class MySceneHostVM
|
||||
Part_OnMouseUpScene(sender, e)
|
||||
Case ModifyModes.STARTMACH
|
||||
StartMach_OnMouseUpScene(sender, e)
|
||||
Case ModifyModes.RIBS
|
||||
Rib_OnMouseUpScene(sender, e)
|
||||
End Select
|
||||
End If
|
||||
'Select Case Map.refMainMenuVM.SelPage
|
||||
@@ -478,6 +485,7 @@ Public Class MySceneHostVM
|
||||
Case ModifyModes.STARTMACH
|
||||
bOk = Map.refStartMachPanelVM.OnMouseSelectingObj(nId)
|
||||
Case ModifyModes.RIBS
|
||||
bOk = Map.refRibPanelVM.OnMouseSelectingObj(nId)
|
||||
Case ModifyModes.SHELLNUMBER
|
||||
Case ModifyModes.AUXSOLIDS
|
||||
End Select
|
||||
@@ -771,6 +779,22 @@ Public Class MySceneHostVM
|
||||
Case ModifyModes.STARTMACH
|
||||
Map.refStartMachPanelVM.UpdateUi()
|
||||
Case ModifyModes.RIBS
|
||||
Map.refRibPanelVM.UpdateUi()
|
||||
Case ModifyModes.SHELLNUMBER
|
||||
Case ModifyModes.AUXSOLIDS
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OnExecCmdEnd(command As Controller.CMD)
|
||||
If Not IsNothing(Map.refTopPanelVM.SelPage) AndAlso Map.refTopPanelVM.SelPage = Pages.MODIFY AndAlso Not IsNothing(Map.refTopPanelVM.SelModifyMode) Then
|
||||
Select Case Map.refTopPanelVM.SelModifyMode.ModifyMode
|
||||
'Case ModifyModes.SELECT_
|
||||
Case ModifyModes.DISPOSITION
|
||||
Case ModifyModes.REFERENCE
|
||||
Case ModifyModes.STARTMACH
|
||||
Case ModifyModes.RIBS
|
||||
Map.refRibPanelVM.OnExecCmdEnd(command)
|
||||
Case ModifyModes.SHELLNUMBER
|
||||
Case ModifyModes.AUXSOLIDS
|
||||
End Select
|
||||
@@ -881,16 +905,8 @@ Public Class MySceneHostVM
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
Continue While
|
||||
End If
|
||||
'Dim nStat As Integer = GDB_ST.ON_
|
||||
'EgtGetStatus(nId, nStat)
|
||||
'' Se già selezionato
|
||||
'If nStat = GDB_ST.SEL Then
|
||||
' ' Memorizzo Id da deselezionare
|
||||
' m_nIdToDesel = nId
|
||||
'Else
|
||||
' Memorizzo Id da selezionare
|
||||
m_nIdToSel = nId
|
||||
'End If
|
||||
Exit While
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
@@ -916,25 +932,8 @@ Public Class MySceneHostVM
|
||||
If Not m_bDragToStart Then
|
||||
' Se selezione da eseguire
|
||||
ElseIf m_nIdToSel <> GDB_ID.NULL Then
|
||||
' Se pezzo da selezionare non è già selezionato
|
||||
'If EgtIsSelectedObj(m_nIdToSel) Then
|
||||
' Eseguo la selezione
|
||||
Map.refStartMachPanelVM.SelStartFromId(m_nIdToSel)
|
||||
'EgtDeselectAll()
|
||||
'EgtSelectPartObjs(m_nIdToSel)
|
||||
'EgtSelectObj(m_nIdToSel)
|
||||
'EgtSetMark(m_nIdToSel)
|
||||
'End If
|
||||
'If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) OrElse Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId <> m_nIdToSel Then
|
||||
' ' Eseguo la selezione
|
||||
' For Each BTLPart In Map.refProjectVM.BTLStructureVM.BTLPartVMList
|
||||
' If BTLPart.nPartId = m_nIdToSel Then
|
||||
' BTLPart.SetIsSelected(True)
|
||||
' ElseIf BTLPart.IsSelected Then
|
||||
' BTLPart.SetIsSelected(False)
|
||||
' End If
|
||||
' Next
|
||||
' End If
|
||||
End If
|
||||
' Reset
|
||||
m_bDrag = False
|
||||
@@ -945,6 +944,62 @@ Public Class MySceneHostVM
|
||||
|
||||
#End Region ' StartMach
|
||||
|
||||
#Region "Rib"
|
||||
|
||||
Friend Sub Rib_OnMouseDownScene(sender As Object, e As Forms.MouseEventArgs)
|
||||
' 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
|
||||
' 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
|
||||
End If
|
||||
' Memorizzo Id da selezionare
|
||||
m_nIdToSel = nId
|
||||
Exit While
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
' Dati per drag
|
||||
m_bDragToStart = True
|
||||
End Sub
|
||||
|
||||
Friend Sub Rib_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 Rib_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
|
||||
' Eseguo la selezione
|
||||
Map.refRibPanelVM.SelStartFromId(m_nIdToSel)
|
||||
End If
|
||||
' Reset
|
||||
m_bDrag = False
|
||||
m_nIdToSel = GDB_ID.NULL
|
||||
m_nIdToDesel = GDB_ID.NULL
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region ' Rib
|
||||
|
||||
#End Region ' VIEW EVENTS
|
||||
|
||||
End Class
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<ComboBox ItemsSource="{Binding StartList}"
|
||||
SelectedItem="{Binding SelStart}"
|
||||
DisplayMemberPath="ghName"/>
|
||||
<!-- Type Button -->
|
||||
<!-- Add Button -->
|
||||
<ToggleButton x:Name="AddBtn"
|
||||
Content="Add"
|
||||
IsChecked="{Binding bAdd_IsChecked}"
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
<PrintApp:RightPanelVM x:Key="RightPanelVM"/>
|
||||
<PrintApp:DispositionPanelVM x:Key="DispositionPanelVM"/>
|
||||
<PrintApp:StartMachPanelVM x:Key="StartMachPanelVM"/>
|
||||
<PrintApp:RibPanelVM x:Key="RibPanelVM"/>
|
||||
<PrintApp:ImportPanelVM x:Key="ImportPanelVM"/>
|
||||
<PrintApp:TopPanelVM x:Key="TopPanelVM"/>
|
||||
<PrintApp:ControllerInputPanelVM x:Key="ControllerInputPanelVM"/>
|
||||
|
||||
@@ -16,6 +16,7 @@ Module Map
|
||||
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
|
||||
@@ -139,6 +140,12 @@ Module Map
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property refRibPanelVM As RibPanelVM
|
||||
Get
|
||||
Return m_refRibPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property refControllerInputPanelVM As ControllerInputPanelVM
|
||||
Get
|
||||
Return m_refControllerInputPanelVM
|
||||
@@ -446,6 +453,11 @@ Module Map
|
||||
Return Not IsNothing(m_refStartMachPanelVM)
|
||||
End Function
|
||||
|
||||
Friend Function SetRefRibPanelVM(RibPanelVM As RibPanelVM) As Boolean
|
||||
m_refRibPanelVM = RibPanelVM
|
||||
Return Not IsNothing(m_refRibPanelVM)
|
||||
End Function
|
||||
|
||||
Friend Function SetRefControllerInputPanelVM(ControllerInputPanelVM As ControllerInputPanelVM) As Boolean
|
||||
m_refControllerInputPanelVM = ControllerInputPanelVM
|
||||
Return Not IsNothing(m_refControllerInputPanelVM)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user