Compare commits
61 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 601471482a | |||
| 8e112dc210 | |||
| 007ad8439c | |||
| 1ffca8b52c | |||
| c96251ba99 | |||
| 19e347412c | |||
| 8ff06da714 | |||
| a18408724c | |||
| 701f1f2b87 | |||
| 2bb53b0b06 | |||
| f456c16827 | |||
| 334bfa68f7 | |||
| 51bbaf0bfe | |||
| 57cf143306 | |||
| a804043d2e | |||
| 59865b140e | |||
| 959cbfb28b | |||
| 6023318ff4 | |||
| d39c5bec47 | |||
| 54522e0733 | |||
| 11e3cfc7bc | |||
| 114fc2dfa5 | |||
| 885495b13d | |||
| c6c8d62e84 | |||
| a72259b326 | |||
| 08cd099947 | |||
| 7dfb843b36 | |||
| 108b075e4f | |||
| ba0f00413d | |||
| 2d39dcacc3 | |||
| f4887ab587 | |||
| 6cb04a1216 | |||
| 8dcebea39c | |||
| 5b84a0cefe | |||
| f0d08c562e | |||
| 0e77455500 | |||
| d1247d5c7e | |||
| bc06203edd | |||
| c768b80802 | |||
| ae204b7ee2 | |||
| d21067988c | |||
| 9c503cdb5c | |||
| d20e2bf2ec | |||
| 7ec1ffa529 | |||
| 4128fd8713 | |||
| 87d09b3f19 | |||
| 216b0a37b6 | |||
| 0f484d2c46 | |||
| faf9b070da | |||
| 7cee0c9626 | |||
| 66e699fbab | |||
| cb30c9ee67 | |||
| 7290038ce9 | |||
| 7e41a79e29 | |||
| 03654fc0f8 | |||
| 459073b910 | |||
| a5c46228a7 | |||
| e0c14f7d7d | |||
| da6807881c | |||
| f38cb79b3e | |||
| 7744166a31 |
@@ -0,0 +1,20 @@
|
|||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
|
Public Class AlzAndFrontVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' CONSTRUCTOR
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,137 @@
|
|||||||
|
<UserControl x:Class="AlzAndFrontV"
|
||||||
|
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">
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Grid Visibility="{Binding Legenda_Visibility}"
|
||||||
|
Grid.Row="0"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1.8*"/>
|
||||||
|
<ColumnDefinition Width="0.6*"/>
|
||||||
|
<ColumnDefinition Width="0.6*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Text="{Binding FirstColumnMsg}" Grid.Column="1" HorizontalAlignment="Center"/>
|
||||||
|
<TextBlock Text="{Binding SecondColumnMsg}" Grid.Column="2" HorizontalAlignment="Center"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<EgtWPFLib5:EgtScrollViewer VerticalScrollBarVisibility="Auto"
|
||||||
|
Focusable="false"
|
||||||
|
Padding="3"
|
||||||
|
Grid.Row="1">
|
||||||
|
<ItemsControl ItemsSource="{Binding SideEntityList}">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid Margin="0,0,0,2">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Text="{Binding sEntityName}"
|
||||||
|
VerticalAlignment="Center"/>
|
||||||
|
<!--Drip e Engrave-->
|
||||||
|
<UniformGrid Grid.Column="1" Columns="3" Rows="1">
|
||||||
|
<CheckBox IsChecked="{Binding bIsChecked}"
|
||||||
|
Grid.Column="1"
|
||||||
|
Visibility="{Binding Check_Visibility}"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding GrphShortStart}"
|
||||||
|
Visibility="{Binding Value_Visibility_DE}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Margin="0,0,2.5,0"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding GrphShortEnd}"
|
||||||
|
Visibility="{Binding Value_Visibility_DE}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Margin="2.5,0,0,0"/>
|
||||||
|
</UniformGrid>
|
||||||
|
<!--SideAngle-->
|
||||||
|
<UniformGrid Grid.Column="1" Columns="2" Rows="1">
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding GrphSideAngle}"
|
||||||
|
Visibility="{Binding Value_Visibility}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Margin="0,0,2.5,0"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding GrphSideHeel}"
|
||||||
|
Visibility="{Binding Value_Visibility}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Margin="2.5,0,0,0"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</EgtWPFLib5:EgtScrollViewer>
|
||||||
|
|
||||||
|
<Grid Visibility="{Binding Parameter1_Visibility}"
|
||||||
|
Grid.Row="2"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1.8*"/>
|
||||||
|
<ColumnDefinition Width="1.2*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Text="{Binding Parameter1Msg}" Grid.Row="0"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding Parameter1}"
|
||||||
|
Grid.Column="1"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Grid Visibility="{Binding Parameter1_Visibility}"
|
||||||
|
Grid.Row="3"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1.8*"/>
|
||||||
|
<ColumnDefinition Width="1.2*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Text="{Binding Parameter2Msg}" Grid.Row="1"/>
|
||||||
|
|
||||||
|
<EgtWPFLib5:EgtTextBox Visibility="{Binding Parameter2_Visibility}"
|
||||||
|
Text="{Binding Parameter2}"
|
||||||
|
Grid.Column="1"/>
|
||||||
|
<UniformGrid Grid.Column="1" Columns="2"
|
||||||
|
Visibility="{Binding Parameter2ab_Visibility}">
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding Parameter2a}"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding Parameter2b}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Grid Visibility="{Binding Parameter23_Visibility}"
|
||||||
|
Grid.Row="4"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1.8*"/>
|
||||||
|
<ColumnDefinition Width="1.2*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Text="{Binding Parameter3Msg}" Grid.Row="2"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding Parameter3}"
|
||||||
|
Grid.Column="1"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Grid Visibility="{Binding Parameter4_Visibility}"
|
||||||
|
Grid.Row="5"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1.8*"/>
|
||||||
|
<ColumnDefinition Width="1.2*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Text="{Binding Parameter4Msg}" Grid.Row="2"/>
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding Parameter4}"
|
||||||
|
Grid.Column="1"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
Public Class AlzAndFrontV
|
||||||
|
|
||||||
|
Private WithEvents m_AlzAndFrontVM As AlzAndFrontVM
|
||||||
|
|
||||||
|
Sub New(AlzAndFrontVM As AlzAndFrontVM)
|
||||||
|
' This call is required by the designer.
|
||||||
|
InitializeComponent()
|
||||||
|
Me.DataContext = AlzAndFrontVM
|
||||||
|
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||||
|
m_AlzAndFrontVM = AlzAndFrontVM
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -300,9 +300,16 @@ Public Class CompoListPageVM
|
|||||||
m_BackVisibility = Visibility.Visible
|
m_BackVisibility = Visibility.Visible
|
||||||
m_SideEntity_Visibility = Visibility.Collapsed
|
m_SideEntity_Visibility = Visibility.Collapsed
|
||||||
Else
|
Else
|
||||||
LoadInternalCompoList()
|
' differenzio il caso di AlzAndFront
|
||||||
m_BackVisibility = Visibility.Visible
|
If CompoWindowMap.refCompoWindowVM.m_bSelAlzAndFront Then
|
||||||
m_SideEntity_Visibility = Visibility.Visible
|
' carico la pagina per la definizione delle componenti Alette
|
||||||
|
m_BackVisibility = Visibility.Visible
|
||||||
|
m_SideEntity_Visibility = Visibility.Hidden
|
||||||
|
Else
|
||||||
|
LoadInternalCompoList()
|
||||||
|
m_BackVisibility = Visibility.Visible
|
||||||
|
m_SideEntity_Visibility = Visibility.Visible
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
NotifyPropertyChanged("BackVisibility")
|
NotifyPropertyChanged("BackVisibility")
|
||||||
NotifyPropertyChanged("SideEntity_Visibility")
|
NotifyPropertyChanged("SideEntity_Visibility")
|
||||||
@@ -449,8 +456,32 @@ Public Class CompoListPageVM
|
|||||||
If IsNothing(CompoWindowMap.refCompoWindowVM.m_SelCompo) Then
|
If IsNothing(CompoWindowMap.refCompoWindowVM.m_SelCompo) Then
|
||||||
CompoWindowMap.refCompoWindowVM.m_SelCompoFamily = Nothing
|
CompoWindowMap.refCompoWindowVM.m_SelCompoFamily = Nothing
|
||||||
InitCompoListPage()
|
InitCompoListPage()
|
||||||
|
ElseIf CompoWindowMap.refCompoWindowVM.m_bSelInternalCompo Then
|
||||||
|
'CompoWindowMap.refCompoWindowVM.CompoPage = CompoWindowVM.CompoPageOpt.PARAM
|
||||||
|
CompoWindowMap.refCompoWindowVM.SetCompoPage(CompoWindowVM.CompoPageOpt.PARAM)
|
||||||
|
CompoWindowMap.refCompoParamPageVM.MyInitCompoParamPage()
|
||||||
|
Dim PartId As Integer = EgtGetFirstPart()
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, CompoParamPageVM.COMPO_LAYER_AUX), GDB_ST.OFF)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, CompoParamPageVM.COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, CompoParamPageVM.COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
|
||||||
|
EgtZoom(ZM.ALL)
|
||||||
|
CompoWindowMap.refCompoWindowVM.m_bSelInternalCompo = False
|
||||||
|
' aggiorno la lista dei parametri da visualizzare a schermo
|
||||||
|
CompoWindowMap.refCompoParamPageVM.SetCompoParamList(CompoWindowMap.refCompoParamPageVM.CompoParamOutLoopList)
|
||||||
|
' disbilito la modifica del componente piano cucicna/bagno corrente
|
||||||
|
For Each Item In CompoWindowMap.refCompoParamPageVM.CompoParamList
|
||||||
|
If TypeOf (Item) Is TextParamItem Then
|
||||||
|
Dim TxtParam As TextParamItem = DirectCast(Item, TextParamItem)
|
||||||
|
TxtParam.IsEnable = False
|
||||||
|
ElseIf TypeOf (Item) Is CheckParamItem Then
|
||||||
|
Dim ChkParam As CheckParamItem = DirectCast(Item, CheckParamItem)
|
||||||
|
ChkParam.IsEnable = False
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
CompoWindowMap.refCompoParamPageVM.ListParamIsEnable = False
|
||||||
Else
|
Else
|
||||||
CompoWindowMap.refCompoWindowVM.m_SelCompo = Nothing
|
CompoWindowMap.refCompoWindowVM.m_SelCompo = Nothing
|
||||||
|
CompoWindowMap.refCompoParamPageVM.ListParamIsEnable = True
|
||||||
InitCompoListPage()
|
InitCompoListPage()
|
||||||
EgtNewFile()
|
EgtNewFile()
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
|
|||||||
@@ -307,7 +307,8 @@ Public Class CompoManagerVM
|
|||||||
' Passo al contesto principale
|
' Passo al contesto principale
|
||||||
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||||
' Inserisco il componente nel DB geometrico principale
|
' Inserisco il componente nel DB geometrico principale
|
||||||
CompoWindowMap.refCompoWindowVM.MakeInsert(InsNbr, m_PartName)
|
'CompoWindowMap.refCompoWindowVM.MakeInsert(InsNbr, m_PartName)
|
||||||
|
CompoWindowMap.refCompoWindowVM.MakeMultipleInsert(InsNbr, m_PartName)
|
||||||
' Aggiorno ambiente principale
|
' Aggiorno ambiente principale
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
' Elimino riferimento con delegato
|
' Elimino riferimento con delegato
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="{Binding Name}" VerticalAlignment="Center"/>
|
<TextBlock Text="{Binding Name}" VerticalAlignment="Center"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding Value}"/>
|
Text="{Binding Value}" IsEnabled="{Binding IsEnable}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type OmagOFFICE:CheckParamItem}">
|
<DataTemplate DataType="{x:Type OmagOFFICE:CheckParamItem}">
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="{Binding Name}"/>
|
<TextBlock Text="{Binding Name}"/>
|
||||||
<CheckBox Grid.Column="1"
|
<CheckBox Grid.Column="1"
|
||||||
IsChecked="{Binding Value}"
|
IsChecked="{Binding Value}" IsEnabled="{Binding IsEnable}"
|
||||||
HorizontalAlignment="Center"/>
|
HorizontalAlignment="Center"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
@@ -123,6 +123,11 @@
|
|||||||
Command="{Binding InternalCommand}"
|
Command="{Binding InternalCommand}"
|
||||||
Visibility="{Binding Internal_Visibility}"
|
Visibility="{Binding Internal_Visibility}"
|
||||||
Style="{StaticResource CompoWindow_Button}"/>
|
Style="{StaticResource CompoWindow_Button}"/>
|
||||||
|
|
||||||
|
<Button Content="{Binding AlzAndFrontMsg}"
|
||||||
|
Command="{Binding AlzAndFrontCommand}"
|
||||||
|
Visibility="{Binding AlzAndFront_Visibility}"
|
||||||
|
Style="{StaticResource CompoWindow_Button}"/>
|
||||||
|
|
||||||
<UniformGrid Columns="2"
|
<UniformGrid Columns="2"
|
||||||
Margin="0,0,0,5"
|
Margin="0,0,0,5"
|
||||||
|
|||||||
@@ -23,12 +23,35 @@ Public Class CompoParamPageVM
|
|||||||
Friend Const COMPO_LAYER_QUOTATURE As String = "Quotature"
|
Friend Const COMPO_LAYER_QUOTATURE As String = "Quotature"
|
||||||
Friend Const COMPO_LAYER_ETICHETTE As String = "Etichette"
|
Friend Const COMPO_LAYER_ETICHETTE As String = "Etichette"
|
||||||
|
|
||||||
|
' questo parametro diventa False in uscita dalla pagine Alzatine o CompoInterni
|
||||||
|
Public ListParamIsEnable As Boolean = True
|
||||||
|
|
||||||
|
Private m_SideEntityControlVM As SideEntityControlVM
|
||||||
|
|
||||||
Private m_CompoParamList As New ObservableCollection(Of CompoParamItem)
|
Private m_CompoParamList As New ObservableCollection(Of CompoParamItem)
|
||||||
Public ReadOnly Property CompoParamList As ObservableCollection(Of CompoParamItem)
|
Public ReadOnly Property CompoParamList As ObservableCollection(Of CompoParamItem)
|
||||||
Get
|
Get
|
||||||
Return m_CompoParamList
|
Return m_CompoParamList
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
Public Sub SetCompoParamList(CurrList As ObservableCollection(Of CompoParamItem))
|
||||||
|
m_CompoParamList.Clear()
|
||||||
|
' eseguo una copia dei parametri da una lista all'altra
|
||||||
|
For Each Item In CurrList
|
||||||
|
Dim NewCompoItem As CompoParamItem = Item
|
||||||
|
m_CompoParamList.Add(NewCompoItem)
|
||||||
|
Next
|
||||||
|
NotifyPropertyChanged("CompoParamList")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
' lista dei parametri del piano cucina (da mostrare quando eseguo la funzione Back)
|
||||||
|
Private m_CompoParamOutLoopList As New ObservableCollection(Of CompoParamItem)
|
||||||
|
Public ReadOnly Property CompoParamOutLoopList As ObservableCollection(Of CompoParamItem)
|
||||||
|
Get
|
||||||
|
Return m_CompoParamOutLoopList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_Internal_Visibility As Visibility
|
Private m_Internal_Visibility As Visibility
|
||||||
Public Property Internal_Visibility As Visibility
|
Public Property Internal_Visibility As Visibility
|
||||||
@@ -41,6 +64,19 @@ Public Class CompoParamPageVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_AlzAndFront_Visibility As Visibility
|
||||||
|
Public Property AlzAndFront_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
'' !!!! Temporaneamente in attesa di completamento Frontalini e alzatine !!!!
|
||||||
|
'Return Visibility.Collapsed
|
||||||
|
Return m_AlzAndFront_Visibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_AlzAndFront_Visibility = value
|
||||||
|
NotifyPropertyChanged("AlzAndFront_Visibility")
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_AddRemove_Visibility As Visibility
|
Private m_AddRemove_Visibility As Visibility
|
||||||
Public Property AddRemove_Visibility As Visibility
|
Public Property AddRemove_Visibility As Visibility
|
||||||
Get
|
Get
|
||||||
@@ -129,7 +165,7 @@ Public Class CompoParamPageVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private m_SideEntityControlVM As SideEntityControlVM
|
#Region "SideAngle"
|
||||||
|
|
||||||
Private m_SideAngle_IsChecked As Boolean
|
Private m_SideAngle_IsChecked As Boolean
|
||||||
Public Property SideAngle_IsChecked As Boolean
|
Public Property SideAngle_IsChecked As Boolean
|
||||||
@@ -172,9 +208,17 @@ Public Class CompoParamPageVM
|
|||||||
CompoWindowMap.refCompoSceneHostV.SelectedLayer = GDB_ID.NULL
|
CompoWindowMap.refCompoSceneHostV.SelectedLayer = GDB_ID.NULL
|
||||||
' Attivo layer delle misure
|
' Attivo layer delle misure
|
||||||
Dim PartId As Integer = EgtGetFirstPart()
|
Dim PartId As Integer = EgtGetFirstPart()
|
||||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.ON_)
|
|
||||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.ON_)
|
If Not ListParamIsEnable Then
|
||||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.ON_)
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.OFF)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
|
||||||
|
Else
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.ON_)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.ON_)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.ON_)
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
NotifyPropertyChanged("SideAngle_IsChecked")
|
NotifyPropertyChanged("SideAngle_IsChecked")
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
@@ -192,6 +236,10 @@ Public Class CompoParamPageVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
#End Region ' SideAngle
|
||||||
|
|
||||||
|
#Region "FiloTop"
|
||||||
|
|
||||||
Private m_FiloTop_IsChecked As Boolean
|
Private m_FiloTop_IsChecked As Boolean
|
||||||
Public Property FiloTop_IsChecked As Boolean
|
Public Property FiloTop_IsChecked As Boolean
|
||||||
Get
|
Get
|
||||||
@@ -233,9 +281,17 @@ Public Class CompoParamPageVM
|
|||||||
CompoWindowMap.refCompoSceneHostV.SelectedLayer = GDB_ID.NULL
|
CompoWindowMap.refCompoSceneHostV.SelectedLayer = GDB_ID.NULL
|
||||||
' Attivo layer delle misure
|
' Attivo layer delle misure
|
||||||
Dim PartId As Integer = EgtGetFirstPart()
|
Dim PartId As Integer = EgtGetFirstPart()
|
||||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.ON_)
|
|
||||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.ON_)
|
If Not ListParamIsEnable Then
|
||||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.ON_)
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.OFF)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
|
||||||
|
Else
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.ON_)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.ON_)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.ON_)
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
NotifyPropertyChanged("FiloTop_IsChecked")
|
NotifyPropertyChanged("FiloTop_IsChecked")
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
@@ -253,6 +309,10 @@ Public Class CompoParamPageVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
#End Region ' FiloTop
|
||||||
|
|
||||||
|
#Region "Drip"
|
||||||
|
|
||||||
Private m_Drip_IsChecked As Boolean
|
Private m_Drip_IsChecked As Boolean
|
||||||
Public Property Drip_IsChecked As Boolean
|
Public Property Drip_IsChecked As Boolean
|
||||||
Get
|
Get
|
||||||
@@ -293,9 +353,17 @@ Public Class CompoParamPageVM
|
|||||||
CompoWindowMap.refCompoSceneHostV.SelectedLayer = GDB_ID.NULL
|
CompoWindowMap.refCompoSceneHostV.SelectedLayer = GDB_ID.NULL
|
||||||
' Attivo layer delle misure
|
' Attivo layer delle misure
|
||||||
Dim PartId As Integer = EgtGetFirstPart()
|
Dim PartId As Integer = EgtGetFirstPart()
|
||||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.ON_)
|
|
||||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.ON_)
|
If Not ListParamIsEnable Then
|
||||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.ON_)
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.OFF)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
|
||||||
|
Else
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.ON_)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.ON_)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.ON_)
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
NotifyPropertyChanged("Drip_IsChecked")
|
NotifyPropertyChanged("Drip_IsChecked")
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
@@ -313,6 +381,10 @@ Public Class CompoParamPageVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Drip
|
||||||
|
|
||||||
|
#Region "Engrave"
|
||||||
|
|
||||||
Private m_Engrave_IsChecked As Boolean
|
Private m_Engrave_IsChecked As Boolean
|
||||||
Public Property Engrave_IsChecked As Boolean
|
Public Property Engrave_IsChecked As Boolean
|
||||||
Get
|
Get
|
||||||
@@ -339,8 +411,13 @@ Public Class CompoParamPageVM
|
|||||||
CompoWindowMap.refCompoSceneHostV.CompoScene,
|
CompoWindowMap.refCompoSceneHostV.CompoScene,
|
||||||
SideEntityControlVM.ModeOpt.ENGRAVE)
|
SideEntityControlVM.ModeOpt.ENGRAVE)
|
||||||
SideEntityControl = New SideEntityControlV(m_SideEntityControlVM)
|
SideEntityControl = New SideEntityControlV(m_SideEntityControlVM)
|
||||||
|
If m_SideEntityControlVM.SideEntityList.Count < 1 Then
|
||||||
|
' eventulmente stamnpare messaggio!
|
||||||
|
' OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||||
|
' OmagOFFICEMap.refStatusBarVM.SetOutputMessage("Lavorazioni non disponibile", MSG_TYPE.WARNING)
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
SideAngle_IsEnabled = True
|
SideAngle_IsEnabled = True
|
||||||
Drip_IsEnabled = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.UNDER_CUT) And
|
Drip_IsEnabled = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(CurrentMachine.sCurrDripSaw)
|
Not String.IsNullOrWhiteSpace(CurrentMachine.sCurrDripSaw)
|
||||||
FiloTop_IsEnabled = True
|
FiloTop_IsEnabled = True
|
||||||
@@ -354,9 +431,17 @@ Public Class CompoParamPageVM
|
|||||||
CompoWindowMap.refCompoSceneHostV.SelectedLayer = GDB_ID.NULL
|
CompoWindowMap.refCompoSceneHostV.SelectedLayer = GDB_ID.NULL
|
||||||
' Attivo layer delle misure
|
' Attivo layer delle misure
|
||||||
Dim PartId As Integer = EgtGetFirstPart()
|
Dim PartId As Integer = EgtGetFirstPart()
|
||||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.ON_)
|
|
||||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.ON_)
|
If Not ListParamIsEnable Then
|
||||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.ON_)
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.OFF)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
|
||||||
|
Else
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.ON_)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.ON_)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.ON_)
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
NotifyPropertyChanged("Engrave_IsChecked")
|
NotifyPropertyChanged("Engrave_IsChecked")
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
@@ -374,6 +459,8 @@ Public Class CompoParamPageVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Engrave
|
||||||
|
|
||||||
Private m_SideEntityControl As SideEntityControlV
|
Private m_SideEntityControl As SideEntityControlV
|
||||||
Public Property SideEntityControl As SideEntityControlV
|
Public Property SideEntityControl As SideEntityControlV
|
||||||
Get
|
Get
|
||||||
@@ -385,6 +472,8 @@ Public Class CompoParamPageVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Region "Messages"
|
#Region "Messages"
|
||||||
|
|
||||||
Public ReadOnly Property InternalMsg As String
|
Public ReadOnly Property InternalMsg As String
|
||||||
@@ -392,6 +481,12 @@ Public Class CompoParamPageVM
|
|||||||
Return EgtMsg(MSG_COMPONENTPAGEUC + 47)
|
Return EgtMsg(MSG_COMPONENTPAGEUC + 47)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
Public ReadOnly Property AlzAndFrontMsg As String
|
||||||
|
Get
|
||||||
|
Return "Alzatine e frontalini"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_AddMsg As String
|
Private m_AddMsg As String
|
||||||
Public Property AddMsg As String
|
Public Property AddMsg As String
|
||||||
Get
|
Get
|
||||||
@@ -432,6 +527,7 @@ Public Class CompoParamPageVM
|
|||||||
|
|
||||||
' definizione comandi
|
' definizione comandi
|
||||||
Private m_cmdInternal As ICommand
|
Private m_cmdInternal As ICommand
|
||||||
|
Private m_cmdAlzAndFront As ICommand
|
||||||
Private m_cmdAdd As ICommand
|
Private m_cmdAdd As ICommand
|
||||||
Private m_cmdCancel As ICommand
|
Private m_cmdCancel As ICommand
|
||||||
Private m_cmdBack As ICommand
|
Private m_cmdBack As ICommand
|
||||||
@@ -471,7 +567,7 @@ Public Class CompoParamPageVM
|
|||||||
CompoWindowMap.refCompoSceneHostV.CompoScene.ZoomAll()
|
CompoWindowMap.refCompoSceneHostV.CompoScene.ZoomAll()
|
||||||
' Imposto messaggio aggiungi
|
' Imposto messaggio aggiungi
|
||||||
AddMsg = EgtMsg(MSG_COMPONENTPAGEUC + 48)
|
AddMsg = EgtMsg(MSG_COMPONENTPAGEUC + 48)
|
||||||
' altrimenti se è un compo interno
|
' altrimenti se è un compo interno
|
||||||
Else
|
Else
|
||||||
If Not bOk Then
|
If Not bOk Then
|
||||||
EgtOutLog("Error in Component " & CompoWindowMap.refCompoWindowVM.m_SelInternalCompo.LuaPath)
|
EgtOutLog("Error in Component " & CompoWindowMap.refCompoWindowVM.m_SelInternalCompo.LuaPath)
|
||||||
@@ -480,7 +576,7 @@ Public Class CompoParamPageVM
|
|||||||
' Imposto messaggio conferma
|
' Imposto messaggio conferma
|
||||||
AddMsg = EgtMsg(MSG_COMPONENTPAGEUC + 50)
|
AddMsg = EgtMsg(MSG_COMPONENTPAGEUC + 50)
|
||||||
End If
|
End If
|
||||||
' leggo variabili e aggiorno griglia
|
' leggo variabili e aggiorno griglia
|
||||||
ReadAndShowVariables()
|
ReadAndShowVariables()
|
||||||
' visualizzo/nascondo bottoni
|
' visualizzo/nascondo bottoni
|
||||||
If IsNothing(CompoWindowMap.refCompoWindowVM.m_SelInternalCompo) Then
|
If IsNothing(CompoWindowMap.refCompoWindowVM.m_SelInternalCompo) Then
|
||||||
@@ -491,8 +587,60 @@ Public Class CompoParamPageVM
|
|||||||
EgtLuaGetGlobBoolVar(LUA_CMP_WITHINT, bHasInternalCompo)
|
EgtLuaGetGlobBoolVar(LUA_CMP_WITHINT, bHasInternalCompo)
|
||||||
Internal_Visibility = If(bHasInternalCompo, Visibility.Visible, Visibility.Collapsed)
|
Internal_Visibility = If(bHasInternalCompo, Visibility.Visible, Visibility.Collapsed)
|
||||||
SideEntity_Visibility = Visibility.Visible
|
SideEntity_Visibility = Visibility.Visible
|
||||||
|
' verifico che esista la configurazione per le alzatine e i frontalini
|
||||||
|
Dim sVariable As String = String.Empty
|
||||||
|
Dim bEnableAlzAndFront As Boolean = GetMainPrivateProfileString("Alz&Front", "Alz&Front", "", sVariable) <> 0
|
||||||
|
' verifio se abilitare il bottone per inserire le Alz&Front
|
||||||
|
Dim sCMPName As String = String.Empty
|
||||||
|
If EgtLuaGetGlobStringVar("CMP.Nome", sCMPName) Then
|
||||||
|
If bEnableAlzAndFront And sCMPName.StartsWith("PCucina") Or sCMPName.StartsWith("PBagno") Then
|
||||||
|
AlzAndFront_Visibility = Visibility.Visible
|
||||||
|
Else
|
||||||
|
AlzAndFront_Visibility = Visibility.Collapsed
|
||||||
|
End If
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
Internal_Visibility = Visibility.Collapsed
|
Internal_Visibility = Visibility.Collapsed
|
||||||
|
AlzAndFront_Visibility = Visibility.Collapsed
|
||||||
|
AddRemove_Visibility = Visibility.Visible
|
||||||
|
Back_Visibility = Visibility.Collapsed
|
||||||
|
SideEntity_Visibility = Visibility.Collapsed
|
||||||
|
End If
|
||||||
|
' porto in CompoParam il CompoManager
|
||||||
|
CompoWindowMap.refCompoListPageVM.CompoManagerControl = Nothing
|
||||||
|
CompoManagerControl = CompoWindowMap.refCompoWindowVM.CompoManagerV
|
||||||
|
' lancio inizializzazione CompoManager
|
||||||
|
CompoWindowMap.refCompoManagerVM.InitCompoManager()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' gestione speciale per componenti piani cucina e piani bagno
|
||||||
|
Friend Sub MyInitCompoParamPage()
|
||||||
|
' Pulisco l'ambiente lua
|
||||||
|
ResetLuaVariables()
|
||||||
|
' leggo variabili e aggiorno griglia
|
||||||
|
ReadAndShowVariables()
|
||||||
|
' visualizzo/nascondo bottoni
|
||||||
|
If IsNothing(CompoWindowMap.refCompoWindowVM.m_SelInternalCompo) Then
|
||||||
|
AddRemove_Visibility = Visibility.Collapsed
|
||||||
|
Back_Visibility = Visibility.Visible
|
||||||
|
Internal_Visibility = Visibility.Visible
|
||||||
|
' verifico che esista la configurazione per le alzatine e i frontalini
|
||||||
|
Dim sVariable As String = String.Empty
|
||||||
|
Dim bEnableAlzAndFront As Boolean = GetMainPrivateProfileString("Alz&Front", "Alz&Front", "", sVariable) <> 0
|
||||||
|
AlzAndFront_Visibility = If(bEnableAlzAndFront, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
SideEntity_Visibility = Visibility.Visible
|
||||||
|
' verifio se abilitare il bottone per inserire le Alz&Front
|
||||||
|
Dim sCMPName As String = String.Empty
|
||||||
|
If EgtLuaGetGlobStringVar("CMP.Nome", sCMPName) Then
|
||||||
|
If bEnableAlzAndFront And sCMPName.StartsWith("PCucina") Or sCMPName.StartsWith("PBagno") Then
|
||||||
|
AlzAndFront_Visibility = Visibility.Visible
|
||||||
|
Else
|
||||||
|
AlzAndFront_Visibility = Visibility.Collapsed
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Internal_Visibility = Visibility.Collapsed
|
||||||
|
AlzAndFront_Visibility = Visibility.Collapsed
|
||||||
AddRemove_Visibility = Visibility.Visible
|
AddRemove_Visibility = Visibility.Visible
|
||||||
Back_Visibility = Visibility.Collapsed
|
Back_Visibility = Visibility.Collapsed
|
||||||
SideEntity_Visibility = Visibility.Collapsed
|
SideEntity_Visibility = Visibility.Collapsed
|
||||||
@@ -620,7 +768,14 @@ Public Class CompoParamPageVM
|
|||||||
|
|
||||||
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||||
Public Sub Internal(ByVal param As Object)
|
Public Sub Internal(ByVal param As Object)
|
||||||
|
' creo una copia della lista dei parametri del piano cucina
|
||||||
|
m_CompoParamOutLoopList.Clear()
|
||||||
|
For i As Integer = 0 To m_CompoParamList.Count - 1
|
||||||
|
m_CompoParamOutLoopList.Add(m_CompoParamList(i))
|
||||||
|
Next
|
||||||
CompoWindowMap.refCompoWindowVM.m_SelInternalCompo = Nothing
|
CompoWindowMap.refCompoWindowVM.m_SelInternalCompo = Nothing
|
||||||
|
CompoWindowMap.refCompoWindowVM.m_bSelInternalCompo = True
|
||||||
|
CompoWindowMap.refCompoWindowVM.m_bSelAlzAndFront = False
|
||||||
CompoWindowMap.refCompoWindowVM.CompoPage = CompoWindowVM.CompoPageOpt.LIST
|
CompoWindowMap.refCompoWindowVM.CompoPage = CompoWindowVM.CompoPageOpt.LIST
|
||||||
' Nascondo layer etichette e quotature
|
' Nascondo layer etichette e quotature
|
||||||
Dim Pz As Integer = EgtGetFirstGroupInGroup(GDB_ID.ROOT)
|
Dim Pz As Integer = EgtGetFirstGroupInGroup(GDB_ID.ROOT)
|
||||||
@@ -632,6 +787,61 @@ Public Class CompoParamPageVM
|
|||||||
|
|
||||||
#End Region ' InternalCommand
|
#End Region ' InternalCommand
|
||||||
|
|
||||||
|
#Region "AlzAndFrontCommand"
|
||||||
|
|
||||||
|
' Returns a command that manage the MainWindow_Unloaded command
|
||||||
|
Public ReadOnly Property AlzAndFrontCommand() As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdAlzAndFront Is Nothing Then
|
||||||
|
m_cmdAlzAndFront = New Command(AddressOf AlzAndFront)
|
||||||
|
End If
|
||||||
|
Return m_cmdAlzAndFront
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||||
|
Public Sub AlzAndFront(ByVal param As Object)
|
||||||
|
' creo una copia della lista dei parametri del piano cucina
|
||||||
|
m_CompoParamOutLoopList.Clear()
|
||||||
|
For i As Integer = 0 To m_CompoParamList.Count - 1
|
||||||
|
m_CompoParamOutLoopList.Add(m_CompoParamList(i))
|
||||||
|
Next
|
||||||
|
|
||||||
|
CompoWindowMap.refCompoWindowVM.m_SelInternalCompo = Nothing
|
||||||
|
CompoWindowMap.refCompoWindowVM.m_bSelInternalCompo = False
|
||||||
|
CompoWindowMap.refCompoWindowVM.m_bSelAlzAndFront = True
|
||||||
|
|
||||||
|
' disabilito i comandi seguenti
|
||||||
|
m_SideAngle_IsEnabled = False
|
||||||
|
NotifyPropertyChanged("SideAngle_IsEnabled")
|
||||||
|
m_Drip_IsEnabled = False
|
||||||
|
NotifyPropertyChanged("Drip_IsEnabled")
|
||||||
|
m_Engrave_IsEnabled = False
|
||||||
|
NotifyPropertyChanged("Engrave_IsEnabled")
|
||||||
|
m_FiloTop_IsEnabled = False
|
||||||
|
NotifyPropertyChanged("FiloTop_IsEnabled")
|
||||||
|
Measure_Visibility = Visibility.Collapsed
|
||||||
|
CompoManagerControl_Visibility = Visibility.Collapsed
|
||||||
|
Back_Visibility = Visibility.Visible
|
||||||
|
|
||||||
|
' Nascondo layer etichette e quotature del disegno corrente
|
||||||
|
Dim Pz As Integer = EgtGetFirstGroupInGroup(GDB_ID.ROOT)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(Pz, "LayAux"), GDB_ST.OFF)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(Pz, "Etichette"), GDB_ST.OFF)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(Pz, "Quotature"), GDB_ST.OFF)
|
||||||
|
|
||||||
|
' Imposto il loop interno
|
||||||
|
CompoWindowMap.refCompoSceneHostV.SelectedLayer = EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_OUTLOOP)
|
||||||
|
|
||||||
|
m_SideEntityControlVM = New SideEntityControlVM(SideEntityControlVM.CallingWindowOpt.COMPO,
|
||||||
|
CompoWindowMap.refCompoSceneHostV.CompoScene,
|
||||||
|
SideEntityControlVM.ModeOpt.ALZANDFRONT)
|
||||||
|
SideEntityControl = New SideEntityControlV(m_SideEntityControlVM)
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' AlzAndFrontCommand
|
||||||
|
|
||||||
#Region "AddCommand"
|
#Region "AddCommand"
|
||||||
|
|
||||||
' Returns a command that manage the MainWindow_Unloaded command
|
' Returns a command that manage the MainWindow_Unloaded command
|
||||||
@@ -726,13 +936,54 @@ Public Class CompoParamPageVM
|
|||||||
|
|
||||||
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||||
Public Sub Back(ByVal param As Object)
|
Public Sub Back(ByVal param As Object)
|
||||||
|
' se sto uscendo dalla pagina delle alzatine (rimanendo nel componente del piano cucina/bagno)
|
||||||
|
If CompoWindowMap.refCompoWindowVM.m_bSelAlzAndFront Then
|
||||||
|
SideAngle_IsEnabled = True
|
||||||
|
Engrave_IsEnabled = True
|
||||||
|
Drip_IsEnabled = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.UNDER_CUT) And
|
||||||
|
Not String.IsNullOrWhiteSpace(CurrentMachine.sCurrDripSaw)
|
||||||
|
If Not IsNothing(m_SideEntityControlVM) Then
|
||||||
|
m_SideEntityControlVM.Close()
|
||||||
|
m_SideEntityControlVM = Nothing
|
||||||
|
SideEntityControl = Nothing
|
||||||
|
End If
|
||||||
|
Measure_Visibility = Visibility.Visible
|
||||||
|
CompoManagerControl_Visibility = Visibility.Visible
|
||||||
|
Back_Visibility = Visibility.Visible
|
||||||
|
' Deseleziono tutto
|
||||||
|
CompoWindowMap.refCompoSceneHostV.SelectedLayer = GDB_ID.NULL
|
||||||
|
' Attivo layer delle misure
|
||||||
|
Dim PartId As Integer = EgtGetFirstPart()
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.OFF)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
|
||||||
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
|
||||||
|
EgtZoom(ZM.ALL)
|
||||||
|
CompoWindowMap.refCompoWindowVM.m_bSelAlzAndFront = False
|
||||||
|
' aggiorno la lista dei parametri da visualizzare a schermo
|
||||||
|
SetCompoParamList(CompoParamOutLoopList)
|
||||||
|
' disbilito la modifica del componente piano cucicna/bagno corrente
|
||||||
|
For Each Item In CompoParamList
|
||||||
|
If TypeOf (Item) Is TextParamItem Then
|
||||||
|
Dim TxtParam As TextParamItem = DirectCast(Item, TextParamItem)
|
||||||
|
TxtParam.IsEnable = False
|
||||||
|
ElseIf TypeOf (Item) Is CheckParamItem Then
|
||||||
|
Dim ChkParam As CheckParamItem = DirectCast(Item, CheckParamItem)
|
||||||
|
ChkParam.IsEnable = False
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
ListParamIsEnable = False
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' se sto uscendo dalla pagina dei componenti
|
||||||
If CompoWindowMap.refCompoWindowVM.m_SelCompoFamily Is CompoWindowMap.refCompoWindowVM.m_SelCompo Then
|
If CompoWindowMap.refCompoWindowVM.m_SelCompoFamily Is CompoWindowMap.refCompoWindowVM.m_SelCompo Then
|
||||||
CompoWindowMap.refCompoWindowVM.m_SelCompoFamily = Nothing
|
CompoWindowMap.refCompoWindowVM.m_SelCompoFamily = Nothing
|
||||||
End If
|
End If
|
||||||
|
ListParamIsEnable = True
|
||||||
CompoWindowMap.refCompoWindowVM.m_SelCompo = Nothing
|
CompoWindowMap.refCompoWindowVM.m_SelCompo = Nothing
|
||||||
CompoWindowMap.refCompoWindowVM.CompoPage = CompoWindowVM.CompoPageOpt.LIST
|
CompoWindowMap.refCompoWindowVM.CompoPage = CompoWindowVM.CompoPageOpt.LIST
|
||||||
EgtNewFile()
|
EgtNewFile()
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' BackCommand
|
#End Region ' BackCommand
|
||||||
@@ -742,6 +993,7 @@ Public Class CompoParamPageVM
|
|||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Class CompoParamItem
|
Public Class CompoParamItem
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
Public Enum ParamType As Integer
|
Public Enum ParamType As Integer
|
||||||
BOOL = 1
|
BOOL = 1
|
||||||
@@ -774,6 +1026,18 @@ Public Class CompoParamItem
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public m_IsEnable As Boolean = True
|
||||||
|
Public Property IsEnable As Boolean
|
||||||
|
Get
|
||||||
|
Return m_IsEnable
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_IsEnable = value
|
||||||
|
NotifyPropertyChanged("IsEnable")
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
Sub New(nInd As Integer, sName As String, nType As ParamType)
|
Sub New(nInd As Integer, sName As String, nType As ParamType)
|
||||||
m_nInd = nInd
|
m_nInd = nInd
|
||||||
m_sName = sName
|
m_sName = sName
|
||||||
|
|||||||
@@ -28,6 +28,9 @@ Public Class CompoWindowVM
|
|||||||
Friend m_SelCompo As CompoItem = Nothing
|
Friend m_SelCompo As CompoItem = Nothing
|
||||||
Friend m_SelInternalCompo As CompoItem = Nothing
|
Friend m_SelInternalCompo As CompoItem = Nothing
|
||||||
|
|
||||||
|
Friend m_bSelAlzAndFront As Boolean = False
|
||||||
|
Friend m_bSelInternalCompo As Boolean = False
|
||||||
|
|
||||||
Private m_sCompoDir As String = String.Empty
|
Private m_sCompoDir As String = String.Empty
|
||||||
Friend m_bDrawOk As Boolean = False
|
Friend m_bDrawOk As Boolean = False
|
||||||
|
|
||||||
@@ -62,6 +65,15 @@ Public Class CompoWindowVM
|
|||||||
NotifyPropertyChanged("CompoPageControl")
|
NotifyPropertyChanged("CompoPageControl")
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
' utilizzato per forzare il cambio pagina senza passare dall'inizializzazione della componente
|
||||||
|
Public Sub SetCompoPage(PageOpt As CompoPageOpt)
|
||||||
|
If PageOpt = CompoPageOpt.LIST Then
|
||||||
|
m_CompoPage = CompoPageOpt.LIST
|
||||||
|
Else
|
||||||
|
m_CompoPage = CompoPageOpt.PARAM
|
||||||
|
End If
|
||||||
|
NotifyPropertyChanged("CompoPageControl")
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private m_CompoListPageV As CompoListPageV
|
Private m_CompoListPageV As CompoListPageV
|
||||||
Private m_CompoParamPageV As CompoParamPageV
|
Private m_CompoParamPageV As CompoParamPageV
|
||||||
@@ -340,6 +352,224 @@ Public Class CompoWindowVM
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Friend Function MakeMultipleInsert(ByVal nNbr As Integer, sName As String) As Boolean
|
||||||
|
|
||||||
|
Dim InsertColor As Color3d = CompoColor(IniFile.m_sIniFile)
|
||||||
|
|
||||||
|
' Imposto il contesto corrente
|
||||||
|
EgtSetCurrentContext(CompoWindowMap.refCompoSceneHostV.CompoScene.GetCtx())
|
||||||
|
Dim Pz As Integer = -1
|
||||||
|
Dim NxtPz As Integer = -1
|
||||||
|
|
||||||
|
' Cancello layer regioni per selezione buchi
|
||||||
|
Pz = EgtGetFirstGroupInGroup(GDB_ID.ROOT)
|
||||||
|
|
||||||
|
While Pz <> -1
|
||||||
|
' imposto il contesto corrente
|
||||||
|
EgtSetCurrentContext(CompoWindowMap.refCompoSceneHostV.CompoScene.GetCtx())
|
||||||
|
' cerco un altro pezzo nell'elenco
|
||||||
|
NxtPz = EgtGetNextPart(Pz)
|
||||||
|
|
||||||
|
Dim SelectRegion As Integer = EgtGetFirstNameInGroup(Pz, "SelectRegion")
|
||||||
|
EgtErase(SelectRegion)
|
||||||
|
' Cancello layer etichette, quotatura,ausiliario e box
|
||||||
|
EgtErase(EgtGetFirstNameInGroup(Pz, "LayAux"))
|
||||||
|
EgtErase(EgtGetFirstNameInGroup(Pz, "Etichette"))
|
||||||
|
EgtErase(EgtGetFirstNameInGroup(Pz, "Quotature"))
|
||||||
|
EgtErase(EgtGetFirstNameInGroup(Pz, "Box"))
|
||||||
|
|
||||||
|
' Cancello layer etichette dei componenti interni (buchi)
|
||||||
|
Dim nHLId As Integer = EgtGetFirstNameInGroup(Pz, "HoleLabels")
|
||||||
|
While nHLId <> GDB_ID.NULL
|
||||||
|
EgtErase(nHLId)
|
||||||
|
nHLId = EgtGetFirstNameInGroup(Pz, "HoleLabels")
|
||||||
|
End While
|
||||||
|
|
||||||
|
' Attivo visualizzazione misura
|
||||||
|
Dim nRegLayId As Integer = EgtGetFirstNameInGroup(Pz, NAME_REGION)
|
||||||
|
Dim nId As Integer = EgtGetFirstInGroup(nRegLayId)
|
||||||
|
While nId <> GDB_ID.NULL
|
||||||
|
If EgtGetType(nId) = GDB_TY.EXT_TEXT Then
|
||||||
|
EgtSetStatus(nId, GDB_ST.ON_)
|
||||||
|
End If
|
||||||
|
nId = EgtGetNext(nId)
|
||||||
|
End While
|
||||||
|
|
||||||
|
' Calcolo dimensione ingombro Pezzo tramite OutLoop
|
||||||
|
Dim nOutLoopLayer = EgtGetFirstNameInGroup(Pz, NAME_OUTLOOP)
|
||||||
|
Dim b3Part As New BBox3d
|
||||||
|
EgtGetBBoxGlob(nOutLoopLayer, GDB_BB.STANDARD, b3Part)
|
||||||
|
' Muovo la regione in Z per evitare problemi in visualizzazione
|
||||||
|
EgtMove(nRegLayId, New Vector3d(0, 0, DELTAZ_REG), GDB_RT.GLOB)
|
||||||
|
|
||||||
|
' Se pezzo con dati TRF
|
||||||
|
If m_bTrfData Then
|
||||||
|
' Nome da dati Trf
|
||||||
|
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
|
||||||
|
While nTextId <> GDB_ID.NULL
|
||||||
|
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
|
||||||
|
Dim sText As String = CompoWindowMap.refCompoManagerVM.sTrfOrderCode & "-" & CompoWindowMap.refCompoManagerVM.sTrfOrderDesc
|
||||||
|
Dim sText2 As String = CompoWindowMap.refCompoManagerVM.sTrfMatCode & "-" & CompoWindowMap.refCompoManagerVM.sTrfSurfCode
|
||||||
|
Dim sText3 As String = LenToString(b3Part.DimX(), 0) & " x " & LenToString(b3Part.DimY(), 0) & " x " & LenToString(CompoWindowMap.refCompoManagerVM.dTrfThickness, 0)
|
||||||
|
Dim dRatio As Double = Math.Max(b3Part.DimX(), b3Part.DimY()) / Math.Min(b3Part.DimX(), b3Part.DimY())
|
||||||
|
If dRatio < 5 Then
|
||||||
|
sText = sText & "<br/>" & sText2 & "<br/>" & sText3
|
||||||
|
Else
|
||||||
|
sText = sText & " " & sText2 & " " & sText3
|
||||||
|
End If
|
||||||
|
EgtModifyText(nTextId, sText)
|
||||||
|
Dim ptCen As Point3d
|
||||||
|
EgtCenterPoint(nTextId, ptCen)
|
||||||
|
Dim b3Text As New BBox3d
|
||||||
|
EgtGetBBoxGlob(nTextId, GDB_BB.STANDARD, b3Text)
|
||||||
|
Dim dCoeff As Double = Math.Min(b3Part.DimX() / b3Text.DimX(), b3Part.DimY() / b3Text.DimY()) / 1.25
|
||||||
|
If dCoeff < 1 Then EgtScale(nTextId, New Frame3d(ptCen), dCoeff, dCoeff, dCoeff)
|
||||||
|
Exit While
|
||||||
|
End If
|
||||||
|
nTextId = EgtGetNext(nTextId)
|
||||||
|
End While
|
||||||
|
' Info di pezzo da dati Trf
|
||||||
|
EgtSetInfo(Pz, "OC", CompoWindowMap.refCompoManagerVM.sTrfOrderCode)
|
||||||
|
EgtSetInfo(Pz, "OD", CompoWindowMap.refCompoManagerVM.sTrfOrderDesc)
|
||||||
|
EgtSetInfo(Pz, "PC", CompoWindowMap.refCompoManagerVM.sTrfPartCode)
|
||||||
|
EgtSetInfo(Pz, "MT", CompoWindowMap.refCompoManagerVM.sTrfMatCode)
|
||||||
|
EgtSetInfo(Pz, "SRF", CompoWindowMap.refCompoManagerVM.sTrfSurfCode)
|
||||||
|
EgtSetInfo(Pz, "L", DoubleToString(b3Part.DimX(), 1))
|
||||||
|
EgtSetInfo(Pz, "W", DoubleToString(b3Part.DimY(), 1))
|
||||||
|
EgtSetInfo(Pz, "T", CompoWindowMap.refCompoManagerVM.dTrfThickness)
|
||||||
|
EgtSetInfo(Pz, "V1", DoubleToString(b3Part.DimX(), 1))
|
||||||
|
EgtSetInfo(Pz, "V2", DoubleToString(b3Part.DimY(), 1))
|
||||||
|
' Se altrimenti pezzo con dati Csv
|
||||||
|
ElseIf m_bCsvData Then
|
||||||
|
' Nome del pezzo
|
||||||
|
EgtSetName(Pz, CompoWindowMap.refCompoManagerVM.sCsvName)
|
||||||
|
' Dati Csv
|
||||||
|
EgtSetInfo(Pz, INFO_CSV_PART, CompoWindowMap.refCompoManagerVM.sCsvName)
|
||||||
|
EgtSetInfo(Pz, INFO_CSV_ORD, CompoWindowMap.refCompoManagerVM.sCsvOrder)
|
||||||
|
EgtSetInfo(Pz, INFO_CSV_DIST, CompoWindowMap.refCompoManagerVM.sCsvList)
|
||||||
|
EgtSetInfo(Pz, INFO_CSV_MAT, CurrentMachine.CurrMat.sName)
|
||||||
|
EgtSetInfo(Pz, INFO_CSV_V1, DoubleToString(b3Part.DimX(), 1))
|
||||||
|
EgtSetInfo(Pz, INFO_CSV_V2, DoubleToString(b3Part.DimY(), 1))
|
||||||
|
' Se definito nome lo inserisco nel testo
|
||||||
|
If Not String.IsNullOrWhiteSpace(CompoWindowMap.refCompoManagerVM.sCsvName) Then
|
||||||
|
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
|
||||||
|
While nTextId <> GDB_ID.NULL
|
||||||
|
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
|
||||||
|
Dim sText As String = String.Empty
|
||||||
|
EgtTextGetContent(nTextId, sText)
|
||||||
|
Dim sNewText = CompoWindowMap.refCompoManagerVM.sCsvName & "<br/>" & sText
|
||||||
|
EgtModifyText(nTextId, sNewText)
|
||||||
|
Exit While
|
||||||
|
End If
|
||||||
|
nTextId = EgtGetNext(nTextId)
|
||||||
|
End While
|
||||||
|
End If
|
||||||
|
' Altrimenti pezzo con dati normali
|
||||||
|
Else
|
||||||
|
' Se definito nome lo inserisco nel testo
|
||||||
|
If Not String.IsNullOrWhiteSpace(sName) Then
|
||||||
|
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
|
||||||
|
While nTextId <> GDB_ID.NULL
|
||||||
|
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
|
||||||
|
Dim sText As String = String.Empty
|
||||||
|
EgtTextGetContent(nTextId, sText)
|
||||||
|
Dim sNewText = sName & "<br/>" & sText
|
||||||
|
EgtModifyText(nTextId, sNewText)
|
||||||
|
Exit While
|
||||||
|
End If
|
||||||
|
nTextId = EgtGetNext(nTextId)
|
||||||
|
End While
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
' Eventuale testo per indicare il sopra (solo nel caso di rettangolo)
|
||||||
|
If CompoWindowMap.refCompoManagerVM.Top_Visibility = Visibility.Visible And
|
||||||
|
CompoWindowMap.refCompoManagerVM.TopIsChecked Then
|
||||||
|
AddTopToPartRegion(nRegLayId)
|
||||||
|
End If
|
||||||
|
' Scrivo testi per nesting
|
||||||
|
SideEntityControlVM.WriteSideAngleForNest(CompoWindowMap.refCompoSceneHostV.CompoScene.GetCtx())
|
||||||
|
' Imposto colore testi
|
||||||
|
EstCalc.SetTextColor(nRegLayId)
|
||||||
|
|
||||||
|
' Imposto il colore del pezzo inserito nel progetto
|
||||||
|
EgtSetColor(nRegLayId, InsertColor)
|
||||||
|
Dim EntId As Integer = EgtGetFirstInGroup(nRegLayId)
|
||||||
|
While EntId <> GDB_ID.NULL
|
||||||
|
If EgtGetType(EntId) = GDB_TY.SRF_FRGN Then EgtSetColor(EntId, InsertColor)
|
||||||
|
EntId = EgtGetNext(EntId)
|
||||||
|
End While
|
||||||
|
|
||||||
|
' Esporto il pezzo in un file temporaneo
|
||||||
|
Dim sTmpFile As String = OmagOFFICEMap.refMainWindowVM.MainWindowM.sTempDir & "\FlatPartCompo.Nge"
|
||||||
|
If Not EgtSaveObjToFile(Pz, sTmpFile, NGE.BIN) Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Passo al contesto principale
|
||||||
|
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||||
|
' Recupero flag per inserimento diretto in grezzo (altrimenti in parcheggio)
|
||||||
|
Dim bDirect As Boolean = (GetMainPrivateProfileInt(S_NEST, K_DIRECT, 0) <> 0)
|
||||||
|
' Elimino eventuali precedenti pezzi vuoti
|
||||||
|
EgtEraseEmptyParts()
|
||||||
|
' Area dei nuovi pezzi
|
||||||
|
Dim dNewArea As Double = 0
|
||||||
|
' Se esiste il file del pezzo
|
||||||
|
If My.Computer.FileSystem.FileExists(sTmpFile) Then
|
||||||
|
' eseguo inserimento
|
||||||
|
For i As Integer = 1 To nNbr
|
||||||
|
' Inserisco il pezzo
|
||||||
|
EgtInsertFile(sTmpFile)
|
||||||
|
' Ne recupero l'Id
|
||||||
|
Dim nId2 As Integer = EgtGetLastPart()
|
||||||
|
' Aggiusto per lavorazioni
|
||||||
|
EgtAdjustFlatPart(nId2)
|
||||||
|
' Se dati Trf assegno nome univoco
|
||||||
|
If m_bTrfData Then EgtSetInfo(nId2, "CsvPart", CompoWindowMap.refCompoManagerVM.sTrfOrderCode & "-" & nId2.ToString())
|
||||||
|
' Aggiorno l'area dei nuovi pezzi
|
||||||
|
dNewArea += GeomCalc.GetPartArea(nId2)
|
||||||
|
' Inserisco in parcheggio
|
||||||
|
EstCalc.StoreOnePart(nId2, True)
|
||||||
|
' Aggiungo riferimento e lo inserisco in VeinMatching
|
||||||
|
VeinMatching.SetRefOnPart(nId2)
|
||||||
|
VeinMatching.AddPart(nId2, True)
|
||||||
|
' Se richiesto posizionamento diretto, lo eseguo
|
||||||
|
If bDirect Then
|
||||||
|
If EstCalc.InsertOnePart(nId2, CurrentMachine.bAligned, CurrentMachine.bReducedCut) Then
|
||||||
|
' Eventuale notifica al VeinMatching
|
||||||
|
VeinMatching.OnInsertPartInRaw(nId2)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'' ------------------------ AGGIUNGO PEZZO NEL VEINMATCH ----------------------------------
|
||||||
|
'' verifico che il pezzo sia un Piano Cucina o un Piano Bagno o un'Aletta
|
||||||
|
'Dim sCMP As String = String.Empty
|
||||||
|
'EgtGetInfo(nId2, "CMP", sCMP)
|
||||||
|
'If sCMP.StartsWith("PCucina") Or sCMP.StartsWith("PBagno") Or sCMP.StartsWith("AlzFront") Then
|
||||||
|
' ' Aggiungo riferimento e lo inserisco in VeinMatching
|
||||||
|
' VeinMatching.SetRefOnPart(nId2)
|
||||||
|
' VeinMatching.AddPart(nId2, True)
|
||||||
|
' ' Se richiesto posizionamento diretto, lo eseguo
|
||||||
|
' If bDirect Then
|
||||||
|
' If EstCalc.InsertOnePart(nId2, CurrentMachine.bAligned, CurrentMachine.bReducedCut) Then
|
||||||
|
' ' Eventuale notifica al VeinMatching
|
||||||
|
' VeinMatching.OnInsertPartInRaw(nId2)
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
'' ------------------------ AGGIUNGO PEZZO NEL VEINMATCH ----------------------------------
|
||||||
|
|
||||||
|
Next
|
||||||
|
' Cancello il file
|
||||||
|
My.Computer.FileSystem.DeleteFile(sTmpFile)
|
||||||
|
End If
|
||||||
|
' passo al pezzo successivo
|
||||||
|
Pz = NxtPz
|
||||||
|
End While
|
||||||
|
' Aggiorno ambiente principale
|
||||||
|
EgtZoom(ZM.ALL)
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
Friend Sub Close(bDialogResult As Boolean)
|
Friend Sub Close(bDialogResult As Boolean)
|
||||||
RaiseEvent m_CloseWindow(bDialogResult)
|
RaiseEvent m_CloseWindow(bDialogResult)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ Module ConstIni
|
|||||||
Public Const K_AUTOLOADLASTPROJ As String = "AutoLoadLastProj"
|
Public Const K_AUTOLOADLASTPROJ As String = "AutoLoadLastProj"
|
||||||
Public Const K_IMAGEDIR As String = "ImageDir"
|
Public Const K_IMAGEDIR As String = "ImageDir"
|
||||||
Public Const K_EXPORTDIR As String = "ExportDir"
|
Public Const K_EXPORTDIR As String = "ExportDir"
|
||||||
|
Public Const K_TYPE_EXPORT_NAME As String = "TypeExportName"
|
||||||
Public Const K_DXFOUTDIR As String = "DxfOutDir"
|
Public Const K_DXFOUTDIR As String = "DxfOutDir"
|
||||||
Public Const K_CONTOURFROMCAMERA As String = "ContourFromCamera"
|
Public Const K_CONTOURFROMCAMERA As String = "ContourFromCamera"
|
||||||
Public Const K_SUPPORT As String = "Support"
|
Public Const K_SUPPORT As String = "Support"
|
||||||
@@ -85,6 +86,8 @@ Module ConstIni
|
|||||||
Public Const K_SIDEMODE As String = "SideMode"
|
Public Const K_SIDEMODE As String = "SideMode"
|
||||||
Public Const K_TRFDATA As String = "TrfData"
|
Public Const K_TRFDATA As String = "TrfData"
|
||||||
Public Const K_CSVDATA As String = "CsvData"
|
Public Const K_CSVDATA As String = "CsvData"
|
||||||
|
Public Const K_LASTCOLOR As String = "LastColor"
|
||||||
|
Public Const K_COLOR As String = "Color"
|
||||||
|
|
||||||
Public Const S_FLATPARTS As String = "FlatParts"
|
Public Const S_FLATPARTS As String = "FlatParts"
|
||||||
Public Const K_FLPCURRDIR As String = "CurrDir"
|
Public Const K_FLPCURRDIR As String = "CurrDir"
|
||||||
@@ -118,6 +121,10 @@ Module ConstIni
|
|||||||
Public Const K_TEXTCOLOR As String = "TextColor"
|
Public Const K_TEXTCOLOR As String = "TextColor"
|
||||||
Public Const K_AUTOMATICOPTIMIZE As String = "AutomaticOptimize"
|
Public Const K_AUTOMATICOPTIMIZE As String = "AutomaticOptimize"
|
||||||
Public Const K_AUTOMATICMAXTIME As String = "AutomaticMaxTime"
|
Public Const K_AUTOMATICMAXTIME As String = "AutomaticMaxTime"
|
||||||
|
Public Const K_DRAGRETTANGLE As String = "DragRettangle"
|
||||||
|
|
||||||
|
Public Const S_SPLIT As String = "Split"
|
||||||
|
Public Const K_MOVE_LEV As String = "MoveLevel"
|
||||||
|
|
||||||
Public Const S_CSV As String = "Csv"
|
Public Const S_CSV As String = "Csv"
|
||||||
Public Const K_CSVDIRECT As String = "Direct"
|
Public Const K_CSVDIRECT As String = "Direct"
|
||||||
|
|||||||
@@ -12,22 +12,25 @@
|
|||||||
Width="270" ResizeMode="NoResize" SizeToContent="Height">
|
Width="270" ResizeMode="NoResize" SizeToContent="Height">
|
||||||
|
|
||||||
<StackPanel Margin="5,5,5,0">
|
<StackPanel Margin="5,5,5,0">
|
||||||
|
<!--TAGLIO-->
|
||||||
<TextBlock Text="{Binding CurrSawingMsg}"
|
<TextBlock Text="{Binding CurrSawingMsg}"
|
||||||
|
Visibility="{Binding CurrSawing_Visibility}"
|
||||||
Margin="0,0,0,5"/>
|
Margin="0,0,0,5"/>
|
||||||
<ComboBox ItemsSource="{Binding CurrSawingList}"
|
<ComboBox ItemsSource="{Binding CurrSawingList}"
|
||||||
SelectedItem="{Binding SelCurrSawing}"
|
SelectedItem="{Binding SelCurrSawing}"
|
||||||
|
Visibility="{Binding CurrSawing_Visibility}"
|
||||||
Margin="0,0,0,5"/>
|
Margin="0,0,0,5"/>
|
||||||
|
|
||||||
<TextBlock Text="{Binding AuxMachTypeMsg}"
|
<!--<TextBlock Text="{Binding AuxMachTypeMsg}"
|
||||||
Visibility="{Binding AuxMachType_Visibility}"
|
Visibility="{Binding AuxMachType_Visibility}"
|
||||||
Margin="0,0,0,5"/>
|
Margin="0,0,0,5"/>
|
||||||
<ComboBox ItemsSource="{Binding AuxMachTypeList}"
|
<ComboBox ItemsSource="{Binding AuxMachTypeList}"
|
||||||
SelectedItem="{Binding SelAuxMachType}"
|
SelectedItem="{Binding SelAuxMachType}"
|
||||||
DisplayMemberPath="sName"
|
DisplayMemberPath="sName"
|
||||||
Visibility="{Binding AuxMachType_Visibility}"
|
Visibility="{Binding AuxMachType_Visibility}"
|
||||||
Margin="0,0,0,5"/>
|
Margin="0,0,0,5"/>-->
|
||||||
|
|
||||||
|
<!--FORATURA-->
|
||||||
<TextBlock Text="{Binding CurrDrillingMsg}"
|
<TextBlock Text="{Binding CurrDrillingMsg}"
|
||||||
Visibility="{Binding CurrDrilling_Visibility}"
|
Visibility="{Binding CurrDrilling_Visibility}"
|
||||||
Margin="0,0,0,5"/>
|
Margin="0,0,0,5"/>
|
||||||
@@ -35,7 +38,7 @@
|
|||||||
SelectedItem="{Binding SelCurrDrilling}"
|
SelectedItem="{Binding SelCurrDrilling}"
|
||||||
Visibility="{Binding CurrDrilling_Visibility}"
|
Visibility="{Binding CurrDrilling_Visibility}"
|
||||||
Margin="0,0,0,5"/>
|
Margin="0,0,0,5"/>
|
||||||
|
<!--FRESATURA-->
|
||||||
<TextBlock Text="{Binding CurrMillingMsg}"
|
<TextBlock Text="{Binding CurrMillingMsg}"
|
||||||
Visibility="{Binding CurrMilling_Visibility}"
|
Visibility="{Binding CurrMilling_Visibility}"
|
||||||
Margin="0,0,0,5"/>
|
Margin="0,0,0,5"/>
|
||||||
@@ -43,14 +46,36 @@
|
|||||||
SelectedItem="{Binding SelCurrMilling}"
|
SelectedItem="{Binding SelCurrMilling}"
|
||||||
Visibility="{Binding CurrMilling_Visibility}"
|
Visibility="{Binding CurrMilling_Visibility}"
|
||||||
Margin="0,0,0,5"/>
|
Margin="0,0,0,5"/>
|
||||||
|
<!--SVUOTATURA-->
|
||||||
|
<TextBlock Text="{Binding CurrPocketingMsg}"
|
||||||
|
Visibility="{Binding CurrPocketing_Visibility}"
|
||||||
|
Margin="0,0,0,5"/>
|
||||||
|
<ComboBox ItemsSource="{Binding CurrPocketingList}"
|
||||||
|
SelectedItem="{Binding SelCurrPocketing}"
|
||||||
|
Visibility="{Binding CurrPocketing_Visibility}"
|
||||||
|
Margin="0,0,0,5"/>
|
||||||
|
<!--WATERJET-->
|
||||||
|
<TextBlock Text="{Binding CurrWaterjettingMsg}"
|
||||||
|
Visibility="{Binding CurrWaterjetting_Visibility}"
|
||||||
|
Margin="0,0,0,5"/>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<ComboBox ItemsSource="{Binding CurrWaterjettingList}"
|
||||||
|
SelectedItem="{Binding SelCurrWaterjetting}"
|
||||||
|
Visibility="{Binding CurrWaterjetting_Visibility}"
|
||||||
|
Margin="0,0,5,5"/>
|
||||||
|
|
||||||
<TextBlock Text="{Binding CurrWaterjettingMsg}"
|
<!--Quality-->
|
||||||
Visibility="{Binding CurrWaterjetting_Visibility}"
|
<ComboBox ItemsSource="{Binding CurrWaterjettingQualityList}"
|
||||||
Margin="0,0,0,5"/>
|
SelectedItem="{Binding SelCurrWaterjettingQuality}"
|
||||||
<ComboBox ItemsSource="{Binding CurrWaterjettingList}"
|
Visibility="{Binding CurrWaterjettingQuality_Visibility}"
|
||||||
SelectedItem="{Binding SelCurrWaterjetting}"
|
Margin="5,0,0,5"
|
||||||
Visibility="{Binding CurrWaterjetting_Visibility}"
|
Grid.Column="1">
|
||||||
Margin="0,0,0,5"/>
|
</ComboBox>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
<UniformGrid Columns="2"
|
<UniformGrid Columns="2"
|
||||||
Margin="0,0,0,5">
|
Margin="0,0,0,5">
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ Public Class CurrMachWindowVM
|
|||||||
|
|
||||||
#Region "FIELDS & PROPERTIES"
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
#Region " SAW "
|
||||||
|
|
||||||
Private m_CurrSawingList As New List(Of String)
|
Private m_CurrSawingList As New List(Of String)
|
||||||
Public Property CurrSawingList As List(Of String)
|
Public Property CurrSawingList As List(Of String)
|
||||||
Get
|
Get
|
||||||
@@ -30,6 +32,20 @@ Public Class CurrMachWindowVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CurrSawing_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
If EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||||
|
Return Visibility.Collapsed
|
||||||
|
Else
|
||||||
|
Return Visibility.Visible
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Saw
|
||||||
|
|
||||||
|
#Region " AUX MACHINING "
|
||||||
|
|
||||||
Private m_AuxMachTypeList As New List(Of StringIdCmBx)
|
Private m_AuxMachTypeList As New List(Of StringIdCmBx)
|
||||||
Public Property AuxMachTypeList As List(Of StringIdCmBx)
|
Public Property AuxMachTypeList As List(Of StringIdCmBx)
|
||||||
Get
|
Get
|
||||||
@@ -110,6 +126,10 @@ Public Class CurrMachWindowVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Aux Machining
|
||||||
|
|
||||||
|
#Region " DRILLING "
|
||||||
|
|
||||||
Private m_CurrDrillingList As New List(Of String)
|
Private m_CurrDrillingList As New List(Of String)
|
||||||
Public Property CurrDrillingList As List(Of String)
|
Public Property CurrDrillingList As List(Of String)
|
||||||
Get
|
Get
|
||||||
@@ -144,6 +164,10 @@ Public Class CurrMachWindowVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Drilling
|
||||||
|
|
||||||
|
#Region " MILLING "
|
||||||
|
|
||||||
Private m_CurrMillingList As New List(Of String)
|
Private m_CurrMillingList As New List(Of String)
|
||||||
Public Property CurrMillingList As List(Of String)
|
Public Property CurrMillingList As List(Of String)
|
||||||
Get
|
Get
|
||||||
@@ -178,6 +202,48 @@ Public Class CurrMachWindowVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
#End Region ' MILLING
|
||||||
|
|
||||||
|
#Region " SCASSO "
|
||||||
|
|
||||||
|
Private m_CurrPocketingList As New List(Of String)
|
||||||
|
Public Property CurrPocketingList As List(Of String)
|
||||||
|
Get
|
||||||
|
Return m_CurrPocketingList
|
||||||
|
End Get
|
||||||
|
Set(value As List(Of String))
|
||||||
|
m_CurrPocketingList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelCurrPocketing As String
|
||||||
|
Public Property SelCurrPocketing As String
|
||||||
|
Get
|
||||||
|
Return m_SelCurrPocketing
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
If value <> m_SelCurrPocketing Then
|
||||||
|
m_SelCurrPocketing = value
|
||||||
|
CurrentMachine.sCurrPocketing = m_SelCurrPocketing
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_CurrPocketing_Visibility As Visibility
|
||||||
|
Public Property CurrPocketing_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_CurrPocketing_Visibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_CurrPocketing_Visibility = value
|
||||||
|
NotifyPropertyChanged("CurrPocketing_Visibility")
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Scasso
|
||||||
|
|
||||||
|
#Region " WATERJETTING "
|
||||||
|
|
||||||
Private m_CurrWaterjettingList As New List(Of String)
|
Private m_CurrWaterjettingList As New List(Of String)
|
||||||
Public Property CurrWaterjettingList As List(Of String)
|
Public Property CurrWaterjettingList As List(Of String)
|
||||||
Get
|
Get
|
||||||
@@ -201,6 +267,29 @@ Public Class CurrMachWindowVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_CurrWaterjettingQualityList As New List(Of String)
|
||||||
|
Public Property CurrWaterjettingQualityList As List(Of String)
|
||||||
|
Get
|
||||||
|
Return m_CurrWaterjettingQualityList
|
||||||
|
End Get
|
||||||
|
Set(value As List(Of String))
|
||||||
|
m_CurrWaterjettingQualityList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelCurrWaterjettingQuality As String
|
||||||
|
Public Property SelCurrWaterjettingQuality As String
|
||||||
|
Get
|
||||||
|
Return m_SelCurrWaterjettingQuality
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
If value <> m_SelCurrWaterjettingQuality Then
|
||||||
|
m_SelCurrWaterjettingQuality = value
|
||||||
|
CurrentMachine.sCurrWaterJettingQuality = m_SelCurrWaterjettingQuality
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_CurrWaterjetting_Visibility As Visibility
|
Private m_CurrWaterjetting_Visibility As Visibility
|
||||||
Public Property CurrWaterjetting_Visibility As Visibility
|
Public Property CurrWaterjetting_Visibility As Visibility
|
||||||
Get
|
Get
|
||||||
@@ -208,10 +297,23 @@ Public Class CurrMachWindowVM
|
|||||||
End Get
|
End Get
|
||||||
Set(value As Visibility)
|
Set(value As Visibility)
|
||||||
m_CurrWaterjetting_Visibility = value
|
m_CurrWaterjetting_Visibility = value
|
||||||
NotifyPropertyChanged("CurrWaterjetting_Visibility")
|
NotifyPropertyChanged(NameOf(CurrWaterjetting_Visibility))
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_CurrWaterjettingQuality_Visibility As Visibility
|
||||||
|
Public Property CurrWaterjettingQuality_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_CurrWaterjettingQuality_Visibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_CurrWaterjettingQuality_Visibility = value
|
||||||
|
NotifyPropertyChanged(NameOf(CurrWaterjettingQuality_Visibility))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' WaterJetting
|
||||||
|
|
||||||
Private m_AvailableSawList As New List(Of String)
|
Private m_AvailableSawList As New List(Of String)
|
||||||
Private m_AvailableMillList As New List(Of String)
|
Private m_AvailableMillList As New List(Of String)
|
||||||
Private m_AvailableDrillList As New List(Of String)
|
Private m_AvailableDrillList As New List(Of String)
|
||||||
@@ -245,11 +347,23 @@ Public Class CurrMachWindowVM
|
|||||||
Return EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 4)
|
Return EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 4)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
Public ReadOnly Property CurrPocketingMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(90550)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
Public ReadOnly Property CurrWaterjettingMsg As String
|
Public ReadOnly Property CurrWaterjettingMsg As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 10)
|
Return EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 10)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CurrWaterjettingQualityMsg As String
|
||||||
|
Get
|
||||||
|
Return "Quality"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property OkMsg As String
|
Public ReadOnly Property OkMsg As String
|
||||||
Get
|
Get
|
||||||
Return "Ok"
|
Return "Ok"
|
||||||
@@ -286,45 +400,76 @@ Public Class CurrMachWindowVM
|
|||||||
Select Case CurrentMachine.MountedToolConfig
|
Select Case CurrentMachine.MountedToolConfig
|
||||||
Case CurrentMachine.MountedToolConfigs.SAW
|
Case CurrentMachine.MountedToolConfigs.SAW
|
||||||
AuxMachType_Visibility = Visibility.Collapsed
|
AuxMachType_Visibility = Visibility.Collapsed
|
||||||
|
|
||||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL, CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL, CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
||||||
' Creo lista lavorazioni foretto e fresa
|
' Creo lista lavorazioni foretto e fresa
|
||||||
If CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Then
|
If CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Then
|
||||||
|
|
||||||
|
' --- DRILL ---
|
||||||
CreateMachiningList(MCH_MY.DRILLING, m_AvailableDrillList, m_CurrDrillingList)
|
CreateMachiningList(MCH_MY.DRILLING, m_AvailableDrillList, m_CurrDrillingList)
|
||||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||||
If m_CurrDrillingList.Count = 0 Then
|
If m_CurrDrillingList.Count = 0 Then
|
||||||
CurrentMachine.sCurrDrilling = String.Empty
|
CurrentMachine.sCurrDrilling = String.Empty
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' --- MILL ---
|
||||||
CreateMachiningList(MCH_MY.MILLING, m_AvailableMillList, m_CurrMillingList)
|
CreateMachiningList(MCH_MY.MILLING, m_AvailableMillList, m_CurrMillingList)
|
||||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||||
If m_CurrMillingList.Count = 0 Then
|
If m_CurrMillingList.Count = 0 Then
|
||||||
CurrentMachine.sCurrMilling = String.Empty
|
CurrentMachine.sCurrMilling = String.Empty
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' --- SCASSO ---
|
||||||
|
CreateMachiningList(MCH_MY.POCKETING, m_AvailableMillList, m_CurrPocketingList)
|
||||||
|
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||||
|
If m_CurrPocketingList.Count = 0 Then
|
||||||
|
CurrentMachine.sCurrPocketing = String.Empty
|
||||||
|
End If
|
||||||
|
|
||||||
|
' --- WATERJET ---
|
||||||
CreateMachiningList(MCH_MY.WATERJETTING, m_AvailableWaterjetList, m_CurrWaterjettingList)
|
CreateMachiningList(MCH_MY.WATERJETTING, m_AvailableWaterjetList, m_CurrWaterjettingList)
|
||||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||||
If m_CurrWaterjettingList.Count = 0 Then
|
If m_CurrWaterjettingList.Count = 0 Then
|
||||||
CurrentMachine.sCurrWaterJetting = String.Empty
|
CurrentMachine.sCurrWaterJetting = String.Empty
|
||||||
End If
|
End If
|
||||||
|
m_CurrWaterjettingQualityList = New List(Of String)(CurrentMachine.Qualities)
|
||||||
|
|
||||||
ElseIf CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER Or
|
ElseIf CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER Or
|
||||||
CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGER Then
|
CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGER Then
|
||||||
|
' --- DRILL ---
|
||||||
CreateMachiningList(MCH_MY.DRILLING, m_AvailableDrillList, m_CurrDrillingList)
|
CreateMachiningList(MCH_MY.DRILLING, m_AvailableDrillList, m_CurrDrillingList)
|
||||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||||
If m_CurrDrillingList.Count = 0 Then
|
If m_CurrDrillingList.Count = 0 Then
|
||||||
CurrentMachine.sCurrDrilling = String.Empty
|
CurrentMachine.sCurrDrilling = String.Empty
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' --- MILL ---
|
||||||
CreateMachiningList(MCH_MY.MILLING, m_AvailableMillList, m_CurrMillingList)
|
CreateMachiningList(MCH_MY.MILLING, m_AvailableMillList, m_CurrMillingList)
|
||||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||||
If m_CurrMillingList.Count = 0 Then
|
If m_CurrMillingList.Count = 0 Then
|
||||||
CurrentMachine.sCurrMilling = String.Empty
|
CurrentMachine.sCurrMilling = String.Empty
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' --- SCASSO ---
|
||||||
|
CreateMachiningList(MCH_MY.POCKETING, m_AvailableMillList, m_CurrPocketingList)
|
||||||
|
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||||
|
If m_CurrPocketingList.Count = 0 Then
|
||||||
|
CurrentMachine.sCurrPocketing = String.Empty
|
||||||
|
End If
|
||||||
|
|
||||||
|
' --- WATERJET ---
|
||||||
CreateMachiningList(MCH_MY.WATERJETTING, m_AvailableWaterjetList, m_CurrWaterjettingList)
|
CreateMachiningList(MCH_MY.WATERJETTING, m_AvailableWaterjetList, m_CurrWaterjettingList)
|
||||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||||
If m_CurrWaterjettingList.Count = 0 Then
|
If m_CurrWaterjettingList.Count = 0 Then
|
||||||
CurrentMachine.sCurrWaterJetting = String.Empty
|
CurrentMachine.sCurrWaterJetting = String.Empty
|
||||||
End If
|
End If
|
||||||
|
m_CurrWaterjettingQualityList = New List(Of String)(CurrentMachine.Qualities)
|
||||||
End If
|
End If
|
||||||
' Definizione di due righe della tabella con la giusta altezza
|
|
||||||
AuxMachType_Visibility = Visibility.Visible
|
' Nascondo la selezione dell'utensile ausiliario -- DA ELIMINARE? --
|
||||||
|
AuxMachType_Visibility = Visibility.Hidden
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
If m_CurrSawingList.Count > 0 Then
|
If m_CurrSawingList.Count > 0 Then
|
||||||
If CurrentMachine.sCurrSawing <> String.Empty Then
|
If CurrentMachine.sCurrSawing <> String.Empty Then
|
||||||
SelCurrSawing = CurrentMachine.sCurrSawing
|
SelCurrSawing = CurrentMachine.sCurrSawing
|
||||||
@@ -337,7 +482,55 @@ Public Class CurrMachWindowVM
|
|||||||
CurrentMachine.sCurrSawing = String.Empty
|
CurrentMachine.sCurrSawing = String.Empty
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAW Then
|
' rendo visibili le lavorazioni secondarie
|
||||||
|
If CurrentMachine.bDrilling And m_CurrDrillingList.Count > 1 Then
|
||||||
|
CurrDrilling_Visibility = Visibility.Visible
|
||||||
|
If CurrentMachine.sCurrDrilling <> String.Empty Then
|
||||||
|
SelCurrDrilling = CurrentMachine.sCurrDrilling
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
CurrDrilling_Visibility = Visibility.Collapsed
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CurrentMachine.bMilling And m_CurrMillingList.Count > 1 Then
|
||||||
|
CurrMilling_Visibility = Visibility.Visible
|
||||||
|
If CurrentMachine.sCurrMilling <> String.Empty Then
|
||||||
|
SelCurrMilling = CurrentMachine.sCurrMilling
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
CurrMilling_Visibility = Visibility.Collapsed
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CurrentMachine.bPocketing And CurrPocketingList.Count > 1 Then
|
||||||
|
CurrPocketing_Visibility = Visibility.Visible
|
||||||
|
If CurrentMachine.sCurrPocketing <> String.Empty Then
|
||||||
|
SelCurrPocketing = CurrentMachine.sCurrPocketing
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
CurrPocketing_Visibility = Visibility.Collapsed
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CurrentMachine.bWaterJetting And CurrWaterjettingList.Count > 1 Then
|
||||||
|
CurrWaterjetting_Visibility = Visibility.Visible
|
||||||
|
' se DB WaterJet abilitato avrò anche la CmBx della Quality solo la CmBx del Waterjetting corrente
|
||||||
|
If CurrentMachine.bFromDBWaterJet Then
|
||||||
|
If CurrentMachine.sCurrWaterJetting <> String.Empty Then
|
||||||
|
SelCurrWaterjetting = CurrentMachine.sCurrWaterJetting
|
||||||
|
End If
|
||||||
|
If CurrentMachine.sCurrWaterJettingQuality <> String.Empty Then
|
||||||
|
SelCurrWaterjettingQuality = CurrentMachine.sCurrWaterJettingQuality
|
||||||
|
End If
|
||||||
|
CurrWaterjettingQuality_Visibility = Visibility.Visible
|
||||||
|
Else
|
||||||
|
CurrWaterjettingQuality_Visibility = Visibility.Collapsed
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
CurrWaterjettingQuality_Visibility = Visibility.Collapsed
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Con le nuove modifiche questa selezione dovrebbe scompaire definitivamente -- DA ELIMINARE? --
|
||||||
|
Dim ShowAuxMAchineCmBx As Boolean = False
|
||||||
|
If Not CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAW And ShowAuxMAchineCmBx Then
|
||||||
If CurrentMachine.bDrilling Then
|
If CurrentMachine.bDrilling Then
|
||||||
m_AuxMachTypeList.Add(New StringIdCmBx(1, EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 6)))
|
m_AuxMachTypeList.Add(New StringIdCmBx(1, EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 6)))
|
||||||
If CurrentMachine.bMilling Then
|
If CurrentMachine.bMilling Then
|
||||||
@@ -375,6 +568,7 @@ Public Class CurrMachWindowVM
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CreateAvailableToolList()
|
Private Sub CreateAvailableToolList()
|
||||||
@@ -463,26 +657,57 @@ Public Class CurrMachWindowVM
|
|||||||
EgtMdbGetCurrMachiningParam(MCH_MP.SYSNOTES, SysNotes)
|
EgtMdbGetCurrMachiningParam(MCH_MP.SYSNOTES, SysNotes)
|
||||||
If SysNotes <> String.Empty Then
|
If SysNotes <> String.Empty Then
|
||||||
Dim MachiningMaterials() = SysNotes.Split(";".ToCharArray)
|
Dim MachiningMaterials() = SysNotes.Split(";".ToCharArray)
|
||||||
For Each Material In MachiningMaterials
|
|
||||||
Dim Param() As String = Material.Split(",".ToCharArray)
|
If CurrentMachine.bWaterJet And CurrentMachine.bFromDBWaterJet Then
|
||||||
If Param.Count() < 2 Then Continue For
|
For Each Material As String In MachiningMaterials
|
||||||
Dim CurrMatId As String = String.Empty
|
Dim Param() As String = Material.Split(",".ToCharArray)
|
||||||
For Each Mat In CurrentMachine.Materials
|
If Param.Count() < 2 Then Continue For
|
||||||
If Mat.sName = EstCalc.GetMaterialName Then
|
Dim CurrMatId As String = String.Empty
|
||||||
CurrMatId = Mat.nId.ToString()
|
Dim CurrMatSubId As String = String.Empty
|
||||||
Exit For
|
For Each Mat In CurrentMachine.Materials
|
||||||
|
If Mat.sName = EstCalc.GetMaterialName Then
|
||||||
|
CurrMatId = Mat.nId.ToString()
|
||||||
|
CurrMatSubId = Mat.SubId.ToString()
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim SubParam() As String = Param(0).Split(".".ToCharArray)
|
||||||
|
If Not IsNothing( CurrentMachine.CurrMat) AndAlso SubParam(0) = CurrentMachine.CurrMat.nId.ToString() AndAlso
|
||||||
|
SubParam.Count > 1 AndAlso SubParam(1) = CurrentMachine.CurrMat.SubId.ToString() Then
|
||||||
|
Dim MatMinH As Double = 0
|
||||||
|
StringToDouble(Param(1), MatMinH)
|
||||||
|
Dim MatMaxH As Double = 0
|
||||||
|
StringToDouble(Param(2), MatMaxH)
|
||||||
|
If EstCalc.GetRawHeight > MatMinH - EPS_SMALL And EstCalc.GetRawHeight < MatMaxH + EPS_SMALL Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
If Param(0) = CurrMatId Then
|
Else
|
||||||
Dim MatMinH As Double = 0
|
|
||||||
StringToDouble(Param(1), MatMinH)
|
For Each Material In MachiningMaterials
|
||||||
Dim MatMaxH As Double = 0
|
Dim Param() As String = Material.Split(",".ToCharArray)
|
||||||
StringToDouble(Param(2), MatMaxH)
|
If Param.Count() < 2 Then Continue For
|
||||||
If EstCalc.GetRawHeight > MatMinH - EPS_SMALL And EstCalc.GetRawHeight < MatMaxH + EPS_SMALL Then
|
Dim CurrMatId As String = String.Empty
|
||||||
Return True
|
For Each Mat In CurrentMachine.Materials
|
||||||
|
If Mat.sName = EstCalc.GetMaterialName Then
|
||||||
|
CurrMatId = Mat.nId.ToString()
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If Param(0) = CurrMatId Then
|
||||||
|
Dim MatMinH As Double = 0
|
||||||
|
StringToDouble(Param(1), MatMinH)
|
||||||
|
Dim MatMaxH As Double = 0
|
||||||
|
StringToDouble(Param(2), MatMaxH)
|
||||||
|
If EstCalc.GetRawHeight > MatMinH - EPS_SMALL And EstCalc.GetRawHeight < MatMaxH + EPS_SMALL Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
Next
|
||||||
Next
|
|
||||||
|
End If
|
||||||
|
|
||||||
Return False
|
Return False
|
||||||
Else
|
Else
|
||||||
Return True
|
Return True
|
||||||
@@ -492,6 +717,53 @@ Public Class CurrMachWindowVM
|
|||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
'Private Function VerifyMatThickCompatibility() As Boolean
|
||||||
|
' If Not IsNothing(m_CurrentMachine.CurrMat) Then
|
||||||
|
' Dim SysNotes As String = String.Empty
|
||||||
|
' EgtMdbGetCurrMachiningParam(MCH_MP.SYSNOTES, SysNotes)
|
||||||
|
' If SysNotes <> String.Empty Then
|
||||||
|
' Dim MachiningMaterials() = SysNotes.Split(";".ToCharArray)
|
||||||
|
' SysNotes = String.Empty
|
||||||
|
' If m_CurrentMachine.bWaterJet Then
|
||||||
|
' For Each Material As Object In MachiningMaterials
|
||||||
|
' Dim Param() As String = Material.Split(",".ToCharArray)
|
||||||
|
' Dim SubParam() As String = Param(0).Split(".".ToCharArray)
|
||||||
|
' If SubParam(0) = m_CurrentMachine.CurrMat.nId.ToString() AndAlso SubParam.Count > 1 AndAlso SubParam(1) = m_CurrentMachine.CurrMat.SubId.ToString() Then
|
||||||
|
' Dim dRawHeight = GetRawHeight()
|
||||||
|
' Dim MatMinH As Double = 0
|
||||||
|
' StringToDouble(Param(1), MatMinH)
|
||||||
|
' Dim MatMaxH As Double = 0
|
||||||
|
' StringToDouble(Param(2), MatMaxH)
|
||||||
|
' If dRawHeight > MatMinH - EPS_SMALL And dRawHeight < MatMaxH + EPS_SMALL Then
|
||||||
|
' Return True
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' Next
|
||||||
|
' Else
|
||||||
|
' For Each Material As Object In MachiningMaterials
|
||||||
|
' Dim Param() As String = Material.Split(",".ToCharArray)
|
||||||
|
' If Param(0) = m_CurrentMachine.CurrMat.nId.ToString() Then
|
||||||
|
' Dim dRawHeight = GetRawHeight()
|
||||||
|
' Dim MatMinH As Double = 0
|
||||||
|
' StringToDouble(Param(1), MatMinH)
|
||||||
|
' Dim MatMaxH As Double = 0
|
||||||
|
' StringToDouble(Param(2), MatMaxH)
|
||||||
|
' If dRawHeight > MatMinH - EPS_SMALL And dRawHeight < MatMaxH + EPS_SMALL Then
|
||||||
|
' Return True
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' Next
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' Return False
|
||||||
|
' Else
|
||||||
|
' Return False
|
||||||
|
' End If
|
||||||
|
' Else
|
||||||
|
' Return True
|
||||||
|
' End If
|
||||||
|
'End Function
|
||||||
|
|
||||||
#End Region ' METHODS
|
#End Region ' METHODS
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -909,6 +909,36 @@ Public Class DxfImportWindowVM
|
|||||||
NotifyPropertyChanged("MsgColor")
|
NotifyPropertyChanged("MsgColor")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' metodo utilizzato per definire il colore dei pezzi DXF importati
|
||||||
|
Private Sub ColorRegion(nCtx As Integer)
|
||||||
|
|
||||||
|
' Leggo dati corrispondenza colore
|
||||||
|
Dim InsertColor As Color3d = CompoColor(IniFile.m_sIniFile)
|
||||||
|
|
||||||
|
' Imposto contesto corrente
|
||||||
|
EgtSetCurrentContext(nCtx)
|
||||||
|
' Ciclo sui pezzi
|
||||||
|
Dim PartId As Integer = EgtGetFirstPart()
|
||||||
|
While PartId <> GDB_ID.NULL
|
||||||
|
' Ciclo sui layer delle regioni
|
||||||
|
Dim RegionId As Integer = EgtGetFirstNameInGroup(PartId, NAME_REGION)
|
||||||
|
While RegionId <> GDB_ID.NULL
|
||||||
|
EgtSetColor(RegionId, InsertColor)
|
||||||
|
' Ciclo sulle regioni
|
||||||
|
Dim EntId As Integer = EgtGetFirstInGroup(RegionId)
|
||||||
|
While EntId <> GDB_ID.NULL
|
||||||
|
If EgtGetType(EntId) = GDB_TY.SRF_FRGN Then EgtSetColor(EntId, InsertColor)
|
||||||
|
EntId = EgtGetNext(EntId)
|
||||||
|
End While
|
||||||
|
RegionId = EgtGetNextName(PartId, NAME_REGION)
|
||||||
|
End While
|
||||||
|
' passo al pezzo successico
|
||||||
|
PartId = EgtGetNextPart(PartId)
|
||||||
|
End While
|
||||||
|
' Aggiorno scritte per angoli sui lati
|
||||||
|
'WriteSideAngleForNest(nCtx)
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region ' METHODS
|
#End Region ' METHODS
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
@@ -973,6 +1003,7 @@ Public Class DxfImportWindowVM
|
|||||||
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, IniFile.m_sIniFile) <> 0 Then
|
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, IniFile.m_sIniFile) <> 0 Then
|
||||||
SideEntityControlVM.ColorToEngrave(DxfImportWindowMap.refDxfImportSceneHostV.ImportDxfScene.GetCtx())
|
SideEntityControlVM.ColorToEngrave(DxfImportWindowMap.refDxfImportSceneHostV.ImportDxfScene.GetCtx())
|
||||||
End If
|
End If
|
||||||
|
ColorRegion(DxfImportWindowMap.refDxfImportSceneHostV.ImportDxfScene.GetCtx())
|
||||||
' Eseguo zoom
|
' Eseguo zoom
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert
|
' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert
|
||||||
@@ -1013,6 +1044,7 @@ Public Class DxfImportWindowVM
|
|||||||
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, IniFile.m_sIniFile) <> 0 Then
|
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, IniFile.m_sIniFile) <> 0 Then
|
||||||
SideEntityControlVM.ColorToEngrave(DxfImportWindowMap.refDxfImportSceneHostV.ImportDxfScene.GetCtx())
|
SideEntityControlVM.ColorToEngrave(DxfImportWindowMap.refDxfImportSceneHostV.ImportDxfScene.GetCtx())
|
||||||
End If
|
End If
|
||||||
|
ColorRegion(DxfImportWindowMap.refDxfImportSceneHostV.ImportDxfScene.GetCtx())
|
||||||
' Eseguo zoom
|
' Eseguo zoom
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
' disabilito bottoni UseLayer. UseRegion e UseClosedCurve, abilito bottoni Reset e Insert
|
' disabilito bottoni UseLayer. UseRegion e UseClosedCurve, abilito bottoni Reset e Insert
|
||||||
@@ -1053,6 +1085,7 @@ Public Class DxfImportWindowVM
|
|||||||
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, IniFile.m_sIniFile) <> 0 Then
|
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, IniFile.m_sIniFile) <> 0 Then
|
||||||
SideEntityControlVM.ColorToEngrave(DxfImportWindowMap.refDxfImportSceneHostV.ImportDxfScene.GetCtx())
|
SideEntityControlVM.ColorToEngrave(DxfImportWindowMap.refDxfImportSceneHostV.ImportDxfScene.GetCtx())
|
||||||
End If
|
End If
|
||||||
|
ColorRegion(DxfImportWindowMap.refDxfImportSceneHostV.ImportDxfScene.GetCtx())
|
||||||
' Eseguo zoom
|
' Eseguo zoom
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert
|
' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert
|
||||||
|
|||||||
@@ -668,6 +668,9 @@ Friend Module CamAuto
|
|||||||
End If
|
End If
|
||||||
' Lo sposto dalla lavorazione al pezzo
|
' Lo sposto dalla lavorazione al pezzo
|
||||||
Dim nId As Integer = EgtGetFirstInGroup(nMchPvId)
|
Dim nId As Integer = EgtGetFirstInGroup(nMchPvId)
|
||||||
|
|
||||||
|
If nId = GDB_ID.NULL Then Return False
|
||||||
|
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
EgtRelocateGlob(nId, nPartPvId)
|
EgtRelocateGlob(nId, nPartPvId)
|
||||||
nId = EgtGetFirstInGroup(nMchPvId)
|
nId = EgtGetFirstInGroup(nMchPvId)
|
||||||
@@ -693,11 +696,33 @@ Friend Module CamAuto
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Friend Function IsExitPreCut(nOperId As Integer) As Boolean
|
||||||
|
' Deve essere una lavorazione
|
||||||
|
If Not EgtSetCurrMachining(nOperId) Then Return False
|
||||||
|
' Verifico presenza Info di PreCut
|
||||||
|
Return EgtExistsInfo(nOperId, INFO_MCH_EPC)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function RemoveAllExitPreCuts() As Boolean
|
||||||
|
Dim nOperId As Integer = EgtGetFirstOperation()
|
||||||
|
While nOperId <> GDB_ID.NULL
|
||||||
|
Dim nNextOperId As Integer = EgtGetNextOperation(nOperId)
|
||||||
|
If EgtGetType(nOperId) <> MCH_OY.DISP AndAlso EgtExistsInfo(nOperId, INFO_MCH_EPC) Then
|
||||||
|
EgtRemoveOperation(nOperId)
|
||||||
|
End If
|
||||||
|
nOperId = nNextOperId
|
||||||
|
End While
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Private Function SetLuaStandardCamParams(Optional bDripOk As Boolean = True) As Boolean
|
Private Function SetLuaStandardCamParams(Optional bDripOk As Boolean = True) As Boolean
|
||||||
|
Dim sMaterial As String = CurrentMachine.CurrMat.sName
|
||||||
Dim sSawMch As String = CurrentMachine.sCurrSawing
|
Dim sSawMch As String = CurrentMachine.sCurrSawing
|
||||||
Dim sMillMch As String = CurrentMachine.sCurrMilling
|
Dim sMillMch As String = CurrentMachine.sCurrMilling
|
||||||
Dim sDrillMch As String = CurrentMachine.sCurrDrilling
|
Dim sDrillMch As String = CurrentMachine.sCurrDrilling
|
||||||
Dim sWaterJetMch As String = CurrentMachine.sCurrWaterJetting
|
Dim sWaterJetMch As String = CurrentMachine.sCurrWaterJetting
|
||||||
|
Dim sWaterJetQual As String = CurrentMachine.sCurrWaterJettingQuality
|
||||||
Dim sDripSawMch As String = If(bDripOk, CurrentMachine.sCurrDripSawing, "")
|
Dim sDripSawMch As String = If(bDripOk, CurrentMachine.sCurrDripSawing, "")
|
||||||
Dim sDripDrillMch As String = If(bDripOk, CurrentMachine.sCurrDripDrilling, "")
|
Dim sDripDrillMch As String = If(bDripOk, CurrentMachine.sCurrDripDrilling, "")
|
||||||
Dim dReducedDepth As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_REDUCEDDEPTH, 1, CurrentMachine.sMachIniFile)
|
Dim dReducedDepth As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_REDUCEDDEPTH, 1, CurrentMachine.sMachIniFile)
|
||||||
@@ -709,10 +734,12 @@ Friend Module CamAuto
|
|||||||
Dim bMillingOnCorners As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, CurrentMachine.sMachIniFile) <> 0)
|
Dim bMillingOnCorners As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, CurrentMachine.sMachIniFile) <> 0)
|
||||||
Dim bMillingOnSinks As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, CurrentMachine.sMachIniFile) <> 0)
|
Dim bMillingOnSinks As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, CurrentMachine.sMachIniFile) <> 0)
|
||||||
Dim dMillingShort As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, CurrentMachine.sMachIniFile)
|
Dim dMillingShort As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, CurrentMachine.sMachIniFile)
|
||||||
|
EgtLuaSetGlobStringVar("CAM.MATERIAL", sMaterial)
|
||||||
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
|
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
|
||||||
EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch)
|
EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch)
|
||||||
EgtLuaSetGlobStringVar("CAM.DRILLMCH", sDrillMch)
|
EgtLuaSetGlobStringVar("CAM.DRILLMCH", sDrillMch)
|
||||||
EgtLuaSetGlobStringVar("CAM.WATERJETMCH", sWaterJetMch)
|
EgtLuaSetGlobStringVar("CAM.WATERJETMCH", sWaterJetMch)
|
||||||
|
EgtLuaSetGlobStringVar("CAM.WATERJETQLTY", sWaterJetQual)
|
||||||
EgtLuaSetGlobStringVar("CAM.DRIPSAWMCH", sDripSawMch)
|
EgtLuaSetGlobStringVar("CAM.DRIPSAWMCH", sDripSawMch)
|
||||||
EgtLuaSetGlobStringVar("CAM.DRIPDRILLMCH", sDripDrillMch)
|
EgtLuaSetGlobStringVar("CAM.DRIPDRILLMCH", sDripDrillMch)
|
||||||
EgtLuaSetGlobNumVar("CAM.REDUCEDDEPTH", dReducedDepth)
|
EgtLuaSetGlobNumVar("CAM.REDUCEDDEPTH", dReducedDepth)
|
||||||
|
|||||||
@@ -198,6 +198,8 @@ Module ConstMach
|
|||||||
Public Const INFO_MCH_USER_SAL As String = "Usal"
|
Public Const INFO_MCH_USER_SAL As String = "Usal"
|
||||||
' Info allungamento finale lavorazione imposto dall'utente
|
' Info allungamento finale lavorazione imposto dall'utente
|
||||||
Public Const INFO_MCH_USER_EAL As String = "Ueal"
|
Public Const INFO_MCH_USER_EAL As String = "Ueal"
|
||||||
|
' Info lavorazione di tipo pretaglio sull'uscita
|
||||||
|
Public Const INFO_MCH_EPC As String = "EPC"
|
||||||
' Nome contorno taglio
|
' Nome contorno taglio
|
||||||
Public Const NAME_PV_CUT As String = "CUT"
|
Public Const NAME_PV_CUT As String = "CUT"
|
||||||
' Nome contorno pre-taglio
|
' Nome contorno pre-taglio
|
||||||
@@ -278,6 +280,8 @@ Module ConstMach
|
|||||||
' Nome di pezzo temporaneo che serve per copia dime
|
' Nome di pezzo temporaneo che serve per copia dime
|
||||||
Public Const NAME_COPYTEMPLATE As String = "CopyTemplate"
|
Public Const NAME_COPYTEMPLATE As String = "CopyTemplate"
|
||||||
|
|
||||||
|
' Nome layer solidi per VM
|
||||||
|
Public Const NAME_VM_SOLID As String = "Solid"
|
||||||
' Chiave per Id originale del pezzo per VeinMatch
|
' Chiave per Id originale del pezzo per VeinMatch
|
||||||
Public Const KEY_ORI_ID As String = "OriId"
|
Public Const KEY_ORI_ID As String = "OriId"
|
||||||
|
|
||||||
|
|||||||
@@ -172,6 +172,7 @@
|
|||||||
Public Const K_MACH_REDUCEDDEPTH As String = "ReducedDepth"
|
Public Const K_MACH_REDUCEDDEPTH As String = "ReducedDepth"
|
||||||
Public Const K_MACH_EXTARCMINRAD As String = "ExtArcMinRad"
|
Public Const K_MACH_EXTARCMINRAD As String = "ExtArcMinRad"
|
||||||
Public Const K_MACH_INTARCMAXSIDEANG As String = "IntArcMaxSideAng"
|
Public Const K_MACH_INTARCMAXSIDEANG As String = "IntArcMaxSideAng"
|
||||||
|
Public Const K_MACH_PRECUTEXIT As String = "PreCutExit"
|
||||||
Public Const K_MACH_MILLING_ON_CORNERS As String = "MillingOnCorners"
|
Public Const K_MACH_MILLING_ON_CORNERS As String = "MillingOnCorners"
|
||||||
Public Const K_MACH_MILLING_ON_SINKS As String = "MillingOnSinks"
|
Public Const K_MACH_MILLING_ON_SINKS As String = "MillingOnSinks"
|
||||||
Public Const K_MACH_MILLING_SHORTENING As String = "MillingShortening"
|
Public Const K_MACH_MILLING_SHORTENING As String = "MillingShortening"
|
||||||
@@ -179,6 +180,7 @@
|
|||||||
Public Const K_MACH_ENGRAVING_DEPTH As String = "EngravingDepth"
|
Public Const K_MACH_ENGRAVING_DEPTH As String = "EngravingDepth"
|
||||||
Public Const K_MACH_ENGRAVING_WIDTH As String = "EngravingWidth"
|
Public Const K_MACH_ENGRAVING_WIDTH As String = "EngravingWidth"
|
||||||
Public Const K_MACH_NEST_ALIGNED As String = "Aligned"
|
Public Const K_MACH_NEST_ALIGNED As String = "Aligned"
|
||||||
|
Public Const K_MACH_NEST_GUILLOTINE As String = "Guillotine"
|
||||||
Public Const K_MACH_NEST_AUTOMATIC As String = "Automatic"
|
Public Const K_MACH_NEST_AUTOMATIC As String = "Automatic"
|
||||||
Public Const K_MACH_WASHING As String = "Washing"
|
Public Const K_MACH_WASHING As String = "Washing"
|
||||||
Public Const K_MACH_SACPROBE As String = "SacProbe"
|
Public Const K_MACH_SACPROBE As String = "SacProbe"
|
||||||
@@ -251,11 +253,13 @@
|
|||||||
Public Const K_CURRDRIPSAWING As String = "CurrDripSawing"
|
Public Const K_CURRDRIPSAWING As String = "CurrDripSawing"
|
||||||
Public Const K_CURRDRIPDRILLING As String = "CurrDripDrilling"
|
Public Const K_CURRDRIPDRILLING As String = "CurrDripDrilling"
|
||||||
Public Const K_CURRWATERJETTING As String = "CurrWaterJetting"
|
Public Const K_CURRWATERJETTING As String = "CurrWaterJetting"
|
||||||
|
Public Const K_CURRWATERJETTINGQUALITY As String = "CurrWaterJettingQuality"
|
||||||
|
|
||||||
Public Const S_MATERIALS As String = "Materials"
|
Public Const S_MATERIALS As String = "Materials"
|
||||||
Public Const K_CURRMATERIAL As String = "CurrMaterial"
|
Public Const K_CURRMATERIAL As String = "CurrMaterial"
|
||||||
Public Const K_CURROFFICEMATERIAL As String = "CurrOfficeMaterial"
|
Public Const K_CURROFFICEMATERIAL As String = "CurrOfficeMaterial"
|
||||||
Public Const K_MATERIAL As String = "Material"
|
Public Const K_MATERIAL As String = "Material"
|
||||||
|
Public Const K_FROMDBWATERJET As String = "FromDBWaterJet"
|
||||||
|
|
||||||
Public Const S_SETUP As String = "SetUp"
|
Public Const S_SETUP As String = "SetUp"
|
||||||
Public Const K_DEFAULT As String = "Default"
|
Public Const K_DEFAULT As String = "Default"
|
||||||
|
|||||||
+204
-48
@@ -1,5 +1,6 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.Collections.ObjectModel
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public Module CurrentMachine
|
Public Module CurrentMachine
|
||||||
|
|
||||||
@@ -40,6 +41,7 @@ Public Module CurrentMachine
|
|||||||
' Dati per nesting
|
' Dati per nesting
|
||||||
Private m_bReducedCut As Boolean = True
|
Private m_bReducedCut As Boolean = True
|
||||||
Private m_bAligned As Boolean = True
|
Private m_bAligned As Boolean = True
|
||||||
|
Private m_bGuillotine As Boolean = True
|
||||||
Private m_bAutomatic As Boolean = False
|
Private m_bAutomatic As Boolean = False
|
||||||
|
|
||||||
' Dati per forature
|
' Dati per forature
|
||||||
@@ -53,6 +55,7 @@ Public Module CurrentMachine
|
|||||||
Private m_dAngleCutExtraLen As Double = 0
|
Private m_dAngleCutExtraLen As Double = 0
|
||||||
Private m_dExtArcMinRad As Double = 0
|
Private m_dExtArcMinRad As Double = 0
|
||||||
Private m_dIntArcMaxSideAng As Double = 0
|
Private m_dIntArcMaxSideAng As Double = 0
|
||||||
|
Private m_bPreCutExit As Boolean = False
|
||||||
|
|
||||||
' Dati per fresatura
|
' Dati per fresatura
|
||||||
Private m_bCornerCuts As Boolean = False
|
Private m_bCornerCuts As Boolean = False
|
||||||
@@ -83,6 +86,9 @@ Public Module CurrentMachine
|
|||||||
Private m_bPolishingWheel As Boolean = False
|
Private m_bPolishingWheel As Boolean = False
|
||||||
Private m_bWaterJet As Boolean = False
|
Private m_bWaterJet As Boolean = False
|
||||||
|
|
||||||
|
' Abilitazione DB WaterJet
|
||||||
|
Private m_bFromDBWaterJet As Boolean = False
|
||||||
|
|
||||||
' Flag per visualizzazione TcPos, Testa/uscita e Note utente
|
' Flag per visualizzazione TcPos, Testa/uscita e Note utente
|
||||||
Private m_nShowToolChanger As Integer = 0 ' 0=no, 1=tutti utensili, 2=solo lame
|
Private m_nShowToolChanger As Integer = 0 ' 0=no, 1=tutti utensili, 2=solo lame
|
||||||
Private m_bShowHeadExit As Boolean = False
|
Private m_bShowHeadExit As Boolean = False
|
||||||
@@ -120,6 +126,7 @@ Public Module CurrentMachine
|
|||||||
Private m_sCurrDripSawing As String = String.Empty
|
Private m_sCurrDripSawing As String = String.Empty
|
||||||
Private m_sCurrDripDrilling As String = String.Empty
|
Private m_sCurrDripDrilling As String = String.Empty
|
||||||
Private m_sCurrWaterJetting As String = String.Empty
|
Private m_sCurrWaterJetting As String = String.Empty
|
||||||
|
Private m_sCurrWaterJettingQuality As String = String.Empty
|
||||||
|
|
||||||
' Spessore sottopezzo
|
' Spessore sottopezzo
|
||||||
Private m_dAdditionalTable As Double = 0
|
Private m_dAdditionalTable As Double = 0
|
||||||
@@ -159,6 +166,9 @@ Public Module CurrentMachine
|
|||||||
' Lista dei materiali
|
' Lista dei materiali
|
||||||
Private m_Materials As New ObservableCollection(Of Material)
|
Private m_Materials As New ObservableCollection(Of Material)
|
||||||
|
|
||||||
|
' Lista delle qualità di lavorazioni disponibili nel WaterJet
|
||||||
|
Private m_Qualities As New ObservableCollection(Of String)
|
||||||
|
|
||||||
' Massimo id della lista materiali nel file ini
|
' Massimo id della lista materiali nel file ini
|
||||||
Private m_MaxIdMat As Integer = 0
|
Private m_MaxIdMat As Integer = 0
|
||||||
|
|
||||||
@@ -417,6 +427,24 @@ Public Module CurrentMachine
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property vPreCutExitVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Dim x As Integer = GetPrivateProfileInt(S_MACH_NEST, K_MACH_PRECUTEXIT, -1, sMachIniFile)
|
||||||
|
Return If(GetPrivateProfileInt(S_MACH_NEST, K_MACH_PRECUTEXIT, -1, sMachIniFile) = -1, Visibility.Collapsed, Visibility.Visible)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property bPreCutExit As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bPreCutExit
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
If WritePrivateProfileString(S_MACH_NEST, K_MACH_PRECUTEXIT, If(value, "1", "0"), sMachIniFile) Then
|
||||||
|
m_bPreCutExit = value
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Public Property bCornerCuts As Boolean
|
Public Property bCornerCuts As Boolean
|
||||||
Get
|
Get
|
||||||
Return m_bCornerCuts
|
Return m_bCornerCuts
|
||||||
@@ -458,12 +486,23 @@ Public Module CurrentMachine
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Property bGuillotine As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bGuillotine
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
If WritePrivateProfileString(S_MACH_NEST, K_MACH_NEST_GUILLOTINE, If(value, "1", "0"), sMachIniFile) Then
|
||||||
|
m_bGuillotine = value
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Public Property bAutomatic As Boolean
|
Public Property bAutomatic As Boolean
|
||||||
Get
|
Get
|
||||||
Return m_bAutomatic
|
Return m_bAutomatic
|
||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
If WritePrivateProfileString(S_MACH_NEST, K_MACH_NEST_AUTOMATIC, If(value, "1", "0"), sMachIniFile) Then
|
If WritePrivateProfileString(S_MACH_NEST, K_MACH_NEST_AUTOMATIC, If(value, "1", "0"), IniFile.m_sIniFile) Then
|
||||||
m_bAutomatic = value
|
m_bAutomatic = value
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -527,6 +566,12 @@ Public Module CurrentMachine
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Friend ReadOnly Property bFromDBWaterJet As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bFromDBWaterJet
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Friend ReadOnly Property ShowToolChanger As Integer
|
Friend ReadOnly Property ShowToolChanger As Integer
|
||||||
Get
|
Get
|
||||||
Return m_nShowToolChanger
|
Return m_nShowToolChanger
|
||||||
@@ -632,6 +677,16 @@ Public Module CurrentMachine
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Friend Property sCurrMillNoTip As String
|
||||||
|
Get
|
||||||
|
Return m_sCurrMillNoTip
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
If WritePrivateProfileString(S_MACH_MACH, K_CURRMILLNOTIP, value, sMachIniFile) Then
|
||||||
|
m_sCurrMillNoTip = value
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
Friend Property sCurrDripSaw As String
|
Friend Property sCurrDripSaw As String
|
||||||
Get
|
Get
|
||||||
Return m_sCurrDripSaw
|
Return m_sCurrDripSaw
|
||||||
@@ -703,7 +758,7 @@ Public Module CurrentMachine
|
|||||||
Return m_sCurrPocketing
|
Return m_sCurrPocketing
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If EstCalc.SetCurrPocketing( value) Then
|
If EstCalc.SetCurrPocketing(value) Then
|
||||||
m_sCurrPocketing = value
|
m_sCurrPocketing = value
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -786,49 +841,60 @@ Public Module CurrentMachine
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Friend Property sCurrWaterJettingQuality As String
|
||||||
|
Get
|
||||||
|
Return m_sCurrWaterJettingQuality
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
If WritePrivateProfileString(S_MACH_MACH, K_CURRWATERJETTINGQUALITY, value, sMachIniFile) Then
|
||||||
|
m_sCurrWaterJettingQuality = value
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Friend ReadOnly Property WaterJettingActive As Boolean
|
Friend ReadOnly Property WaterJettingActive As Boolean
|
||||||
Get
|
Get
|
||||||
Return m_bWaterJetting AndAlso Not String.IsNullOrWhiteSpace( m_sCurrWaterJetting)
|
Return m_bWaterJetting AndAlso Not String.IsNullOrWhiteSpace(m_sCurrWaterJetting)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Friend Property dAdditionalTable As Double
|
Friend Property dAdditionalTable As Double
|
||||||
Get
|
Get
|
||||||
Select Case GetCurrentTable()
|
Select Case GetCurrentTable()
|
||||||
Case 3
|
Case 3
|
||||||
Return m_dTab3AdditionalTable
|
Return m_dTab3AdditionalTable
|
||||||
Case 2
|
Case 2
|
||||||
Return m_dTab2AdditionalTable
|
Return m_dTab2AdditionalTable
|
||||||
Case Else
|
Case Else
|
||||||
Return m_dAdditionalTable
|
Return m_dAdditionalTable
|
||||||
End Select
|
End Select
|
||||||
End Get
|
End Get
|
||||||
Set(value As Double)
|
Set(value As Double)
|
||||||
Select Case GetCurrentTable()
|
Select Case GetCurrentTable()
|
||||||
Case 3
|
Case 3
|
||||||
If Math.Abs(value - m_dTab3AdditionalTable) > EPS_SMALL And
|
If Math.Abs(value - m_dTab3AdditionalTable) > EPS_SMALL And
|
||||||
WritePrivateProfileString(S_TABLE, K_TAB3_ADDITIONALTABLE, DoubleToString(value, 3), sMachIniFile) Then
|
WritePrivateProfileString(S_TABLE, K_TAB3_ADDITIONALTABLE, DoubleToString(value, 3), sMachIniFile) Then
|
||||||
' Aggiorno il valore corrente
|
' Aggiorno il valore corrente
|
||||||
m_dTab3AdditionalTable = value
|
m_dTab3AdditionalTable = value
|
||||||
' Aggiorno il progetto corrente
|
' Aggiorno il progetto corrente
|
||||||
AdjustAdditionalTable()
|
AdjustAdditionalTable()
|
||||||
End If
|
End If
|
||||||
Case 2
|
Case 2
|
||||||
If Math.Abs(value - m_dTab2AdditionalTable) > EPS_SMALL And
|
If Math.Abs(value - m_dTab2AdditionalTable) > EPS_SMALL And
|
||||||
WritePrivateProfileString(S_TABLE, K_TAB2_ADDITIONALTABLE, DoubleToString(value, 3), sMachIniFile) Then
|
WritePrivateProfileString(S_TABLE, K_TAB2_ADDITIONALTABLE, DoubleToString(value, 3), sMachIniFile) Then
|
||||||
' Aggiorno il valore corrente
|
' Aggiorno il valore corrente
|
||||||
m_dTab2AdditionalTable = value
|
m_dTab2AdditionalTable = value
|
||||||
' Aggiorno il progetto corrente
|
' Aggiorno il progetto corrente
|
||||||
AdjustAdditionalTable()
|
AdjustAdditionalTable()
|
||||||
End If
|
End If
|
||||||
Case Else
|
Case Else
|
||||||
If Math.Abs(value - m_dAdditionalTable) > EPS_SMALL And
|
If Math.Abs(value - m_dAdditionalTable) > EPS_SMALL And
|
||||||
WritePrivateProfileString(S_TABLE, K_ADDITIONALTABLE, DoubleToString(value, 3), sMachIniFile) Then
|
WritePrivateProfileString(S_TABLE, K_ADDITIONALTABLE, DoubleToString(value, 3), sMachIniFile) Then
|
||||||
' Aggiorno il valore corrente
|
' Aggiorno il valore corrente
|
||||||
m_dAdditionalTable = value
|
m_dAdditionalTable = value
|
||||||
' Aggiorno il progetto corrente
|
' Aggiorno il progetto corrente
|
||||||
AdjustAdditionalTable()
|
AdjustAdditionalTable()
|
||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -842,10 +908,10 @@ Public Module CurrentMachine
|
|||||||
Friend ReadOnly Property PhotoOffset As Vector3d
|
Friend ReadOnly Property PhotoOffset As Vector3d
|
||||||
Get
|
Get
|
||||||
Select Case GetCurrentTable()
|
Select Case GetCurrentTable()
|
||||||
Case 2
|
Case 2
|
||||||
Return New Vector3d(m_dTab2PhotoOffsetX, m_dTab2PhotoOffsetY, 0)
|
Return New Vector3d(m_dTab2PhotoOffsetX, m_dTab2PhotoOffsetY, 0)
|
||||||
Case Else
|
Case Else
|
||||||
Return New Vector3d(m_dPhotoOffsetX, m_dPhotoOffsetY, 0)
|
Return New Vector3d(m_dPhotoOffsetX, m_dPhotoOffsetY, 0)
|
||||||
End Select
|
End Select
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
@@ -964,6 +1030,12 @@ Public Module CurrentMachine
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Friend ReadOnly Property Qualities As ObservableCollection(Of String)
|
||||||
|
Get
|
||||||
|
Return m_Qualities
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Friend Sub AddMaterial(value As Material)
|
Friend Sub AddMaterial(value As Material)
|
||||||
For Each Material In Materials
|
For Each Material In Materials
|
||||||
If Material.nId = value.nId Then
|
If Material.nId = value.nId Then
|
||||||
@@ -1047,9 +1119,13 @@ Public Module CurrentMachine
|
|||||||
If Not IsNothing(value) Then
|
If Not IsNothing(value) Then
|
||||||
Dim CurrMatId As String = value.nId.ToString
|
Dim CurrMatId As String = value.nId.ToString
|
||||||
Dim sKey As String = If(m_bOffice, K_CURROFFICEMATERIAL, K_CURRMATERIAL)
|
Dim sKey As String = If(m_bOffice, K_CURROFFICEMATERIAL, K_CURRMATERIAL)
|
||||||
WritePrivateProfileString(S_MATERIALS, sKey, CurrMatId, sMachIniFile)
|
If bWaterJet And bFromDBWaterJet Then
|
||||||
|
WritePrivateProfileString(S_MATERIALS, sKey, CurrMatId & "." & value.SubId, sMachIniFile)
|
||||||
|
Else
|
||||||
|
WritePrivateProfileString(S_MATERIALS, sKey, CurrMatId, sMachIniFile)
|
||||||
|
End If
|
||||||
|
m_CurrMat = value
|
||||||
End If
|
End If
|
||||||
m_CurrMat = value
|
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -1108,7 +1184,8 @@ Public Module CurrentMachine
|
|||||||
' Parametri per nesting dalla macchina
|
' Parametri per nesting dalla macchina
|
||||||
m_bReducedCut = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_REDUCEDCUT, 0, sMachIniFile) <> 0)
|
m_bReducedCut = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_REDUCEDCUT, 0, sMachIniFile) <> 0)
|
||||||
m_bAligned = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_NEST_ALIGNED, 0, sMachIniFile) <> 0)
|
m_bAligned = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_NEST_ALIGNED, 0, sMachIniFile) <> 0)
|
||||||
m_bAutomatic = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_NEST_AUTOMATIC, 0, sMachIniFile) <> 0)
|
m_bGuillotine = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_NEST_GUILLOTINE, 0, sMachIniFile) <> 0)
|
||||||
|
m_bAutomatic = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_NEST_AUTOMATIC, 0, IniFile.m_sIniFile) <> 0)
|
||||||
' Leggo offset fori
|
' Leggo offset fori
|
||||||
m_dHolesOffset = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_HOLES_OFFSET, 0, sMachIniFile)
|
m_dHolesOffset = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_HOLES_OFFSET, 0, sMachIniFile)
|
||||||
EgtMdbSetGeneralParam(MCH_GP.EXTRARONDRIREG, m_dHolesOffset)
|
EgtMdbSetGeneralParam(MCH_GP.EXTRARONDRIREG, m_dHolesOffset)
|
||||||
@@ -1130,6 +1207,8 @@ Public Module CurrentMachine
|
|||||||
' Leggo angolo di fianco massimo arco interno
|
' Leggo angolo di fianco massimo arco interno
|
||||||
m_dIntArcMaxSideAng = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_INTARCMAXSIDEANG, 45, sMachIniFile)
|
m_dIntArcMaxSideAng = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_INTARCMAXSIDEANG, 45, sMachIniFile)
|
||||||
EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, m_dIntArcMaxSideAng)
|
EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, m_dIntArcMaxSideAng)
|
||||||
|
' CurrentMachine.bPreCutExit
|
||||||
|
m_bPreCutExit = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_PRECUTEXIT, 0, sMachIniFile) <> 0)
|
||||||
' Leggo lavorazione angoli con fresa
|
' Leggo lavorazione angoli con fresa
|
||||||
m_bCornerCuts = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, sMachIniFile) <> 0)
|
m_bCornerCuts = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, sMachIniFile) <> 0)
|
||||||
' Leggo lavorazione interni con fresa
|
' Leggo lavorazione interni con fresa
|
||||||
@@ -1155,6 +1234,8 @@ Public Module CurrentMachine
|
|||||||
m_bPolishingWheel = (GetPrivateProfileInt(S_TOOLS, K_POLISHINGWHEEL, 0, sMachIniFile) > 0) And bKeyPolish
|
m_bPolishingWheel = (GetPrivateProfileInt(S_TOOLS, K_POLISHINGWHEEL, 0, sMachIniFile) > 0) And bKeyPolish
|
||||||
' waterjet
|
' waterjet
|
||||||
m_bWaterJet = (GetPrivateProfileInt(S_TOOLS, K_WATERJET, 0, sMachIniFile) > 0) And bKeyWJ
|
m_bWaterJet = (GetPrivateProfileInt(S_TOOLS, K_WATERJET, 0, sMachIniFile) > 0) And bKeyWJ
|
||||||
|
' Leggo abilitazione DB WaterJet
|
||||||
|
m_bFromDBWaterJet = (GetPrivateProfileInt(S_MATERIALS, K_FROMDBWATERJET, 0, sMachIniFile) > 0)
|
||||||
' Leggo abilitazione visualizzazione TcPos e Head/exit
|
' Leggo abilitazione visualizzazione TcPos e Head/exit
|
||||||
m_nShowToolChanger = GetPrivateProfileInt(S_TOOLS, K_SHOWTOOLCHANGER, 0, sMachIniFile)
|
m_nShowToolChanger = GetPrivateProfileInt(S_TOOLS, K_SHOWTOOLCHANGER, 0, sMachIniFile)
|
||||||
m_bShowHeadExit = (GetPrivateProfileInt(S_TOOLS, K_SHOWHEADEXIT, 0, sMachIniFile) > 0)
|
m_bShowHeadExit = (GetPrivateProfileInt(S_TOOLS, K_SHOWHEADEXIT, 0, sMachIniFile) > 0)
|
||||||
@@ -1210,7 +1291,9 @@ Public Module CurrentMachine
|
|||||||
' fresa
|
' fresa
|
||||||
m_sCurrMilling = EstCalc.GetCurrMilling()
|
m_sCurrMilling = EstCalc.GetCurrMilling()
|
||||||
' svuotatura
|
' svuotatura
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRPOCKETING, Nothing, m_sCurrPocketing, sMachIniFile)
|
m_sCurrPocketing = EstCalc.GetCurrPocketing()
|
||||||
|
'GetPrivateProfileString(S_MACH_MACH, K_CURRPOCKETING, Nothing, m_sCurrPocketing, sMachIniFile)
|
||||||
|
|
||||||
' sgrossatura con lama
|
' sgrossatura con lama
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAWROUGHING, Nothing, m_sCurrSawRoughing, sMachIniFile)
|
GetPrivateProfileString(S_MACH_MACH, K_CURRSAWROUGHING, Nothing, m_sCurrSawRoughing, sMachIniFile)
|
||||||
' finitura con lama
|
' finitura con lama
|
||||||
@@ -1225,6 +1308,8 @@ Public Module CurrentMachine
|
|||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRIPDRILLING, Nothing, m_sCurrDripDrilling, sMachIniFile)
|
GetPrivateProfileString(S_MACH_MACH, K_CURRDRIPDRILLING, Nothing, m_sCurrDripDrilling, sMachIniFile)
|
||||||
' waterjetting
|
' waterjetting
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJETTING, Nothing, m_sCurrWaterJetting, sMachIniFile)
|
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJETTING, Nothing, m_sCurrWaterJetting, sMachIniFile)
|
||||||
|
' waterjettingquality
|
||||||
|
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJETTINGQUALITY, Nothing, m_sCurrWaterJettingQuality, sMachIniFile)
|
||||||
|
|
||||||
' Leggo numero di portautensili
|
' Leggo numero di portautensili
|
||||||
m_ToolChangerNbr = GetPrivateProfileInt(S_TOOLCHANGER, K_NUMBER, 0, sMachIniFile)
|
m_ToolChangerNbr = GetPrivateProfileInt(S_TOOLCHANGER, K_NUMBER, 0, sMachIniFile)
|
||||||
@@ -1283,24 +1368,79 @@ Public Module CurrentMachine
|
|||||||
' Leggo la lista dei materiali
|
' Leggo la lista dei materiali
|
||||||
Dim Material As Material = Nothing
|
Dim Material As Material = Nothing
|
||||||
Dim nIndex As Integer = 1
|
Dim nIndex As Integer = 1
|
||||||
While (GetPrivateProfileMaterial(S_MATERIALS, K_MATERIAL & nIndex, Material, sMachIniFile))
|
If m_bWaterJet And m_bFromDBWaterJet Then
|
||||||
m_Materials.Add(Material)
|
LoadWJMaterial(True)
|
||||||
nIndex += 1
|
Else
|
||||||
End While
|
While (GetPrivateProfileMaterial(S_MATERIALS, K_MATERIAL & nIndex, Material, sMachIniFile))
|
||||||
|
m_Materials.Add(Material)
|
||||||
|
nIndex += 1
|
||||||
|
End While
|
||||||
|
End If
|
||||||
' Salvo massimo indice a cui sono arrivato per usarlo quando devo aggiungere nuovi elementi alla lista
|
' Salvo massimo indice a cui sono arrivato per usarlo quando devo aggiungere nuovi elementi alla lista
|
||||||
m_MaxIdMat = nIndex - 1
|
m_MaxIdMat = nIndex - 1
|
||||||
|
|
||||||
' Leggo materiale correntemente attivo
|
' Leggo materiale correntemente attivo
|
||||||
|
Dim sCurrMatId As String = String.Empty
|
||||||
Dim sKey As String = If(m_bOffice, K_CURROFFICEMATERIAL, K_CURRMATERIAL)
|
Dim sKey As String = If(m_bOffice, K_CURROFFICEMATERIAL, K_CURRMATERIAL)
|
||||||
Dim CurrMatId As Integer = GetPrivateProfileInt(S_MATERIALS, sKey, 0, sMachIniFile)
|
EgtUILib.GetPrivateProfileString(S_MATERIALS, sKey, "0", sCurrMatId, sMachIniFile)
|
||||||
For Each Material In Materials
|
If bWaterJet And bFromDBWaterJet Then
|
||||||
If Material.nId = CurrMatId Then
|
Dim sCurrMatIds As String()
|
||||||
m_CurrMat = Material
|
sCurrMatIds = sCurrMatId.Split("."c)
|
||||||
Exit For
|
If sCurrMatIds.Length > 1 Then
|
||||||
|
Dim nCurrMatId As Integer
|
||||||
|
Dim nCurrSubMatId As Integer
|
||||||
|
If Not Integer.TryParse(sCurrMatIds(0), nCurrMatId) Then nCurrMatId = 0
|
||||||
|
If Not Integer.TryParse(sCurrMatIds(1), nCurrSubMatId) Then nCurrSubMatId = 0
|
||||||
|
For Each Material In Materials
|
||||||
|
If Material.nId = nCurrMatId AndAlso Material.SubId = nCurrSubMatId Then
|
||||||
|
m_CurrMat = Material
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
End If
|
End If
|
||||||
Next
|
Else
|
||||||
|
Dim nCurrMatId As Integer
|
||||||
|
If Not Integer.TryParse(sCurrMatId, nCurrMatId) Then nCurrMatId = 0
|
||||||
|
For Each Material In Materials
|
||||||
|
If Material.nId = nCurrMatId Then
|
||||||
|
m_CurrMat = Material
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
' Leggo se la macchina ha il tastatore dello spessore lastra
|
' Leggo se la macchina ha il tastatore dello spessore lastra
|
||||||
m_HasRawProbe = (GetPrivateProfileInt(S_MACH_PROBING, K_ENABLERAWPROBE, 1, sMachIniFile) <> 0)
|
m_HasRawProbe = (GetPrivateProfileInt(S_MACH_PROBING, K_ENABLERAWPROBE, 1, sMachIniFile) <> 0)
|
||||||
|
|
||||||
|
' Se macchina ha Waterjet mostro il bottone per DB Waterjet
|
||||||
|
OmagOFFICEMap.refMachinePanelVM.NotifyPropertyChanged(NameOf(OmagOFFICEMap.refMachinePanelVM.WjDb_Visibility))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub LoadWJMaterial(Optional bIsStart As Boolean = False)
|
||||||
|
Dim TempCurrMat As Material = CurrMat
|
||||||
|
' Svuoto l'attuale lista di materiali e delle qualità
|
||||||
|
m_Materials.Clear()
|
||||||
|
m_Qualities.Clear()
|
||||||
|
' Leggo valori da file .data e li carico nelle proprietà
|
||||||
|
Dim sFilePath As String = sMachDir & EgtWPFLib5.WaterjetDbWindowVM.WATERJETDB_PATH
|
||||||
|
WjMaterialList = EgtWPFLib5.WaterjetDbWindowVM.LoadWjMaterials(sFilePath)
|
||||||
|
' definisco la lista delle qualità
|
||||||
|
m_Qualities.Add("Q1")
|
||||||
|
m_Qualities.Add("Q2")
|
||||||
|
m_Qualities.Add("Q3")
|
||||||
|
m_Qualities.Add("Q4")
|
||||||
|
m_Qualities.Add("Q5")
|
||||||
|
m_Qualities.Add("QExtra")
|
||||||
|
' costruisco la lista
|
||||||
|
Dim i As Integer = 0
|
||||||
|
Dim sName As String = String.Empty
|
||||||
|
For i = 0 To WjMaterialList.Count - 1
|
||||||
|
sName = WjMaterialList(i).Name
|
||||||
|
Dim j As Integer = 0
|
||||||
|
For j = 0 To WjMaterialList(i).SubMaterialList.Count - 1
|
||||||
|
m_Materials.Add(New Material(i + 1, sName & "." & WjMaterialList(i).SubMaterialList(j).Name, j + 1))
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
If Not bIsStart Then CurrMat = TempCurrMat
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Function IsVacuumMovePossible() As Boolean
|
Friend Function IsVacuumMovePossible() As Boolean
|
||||||
@@ -1409,6 +1549,7 @@ Public Class Material
|
|||||||
|
|
||||||
Private m_nId As Integer
|
Private m_nId As Integer
|
||||||
Private m_sName As String
|
Private m_sName As String
|
||||||
|
Private m_SubId As Integer = 0
|
||||||
|
|
||||||
Public ReadOnly Property nId As Integer
|
Public ReadOnly Property nId As Integer
|
||||||
Get
|
Get
|
||||||
@@ -1425,6 +1566,15 @@ Public Class Material
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Property SubId As Integer
|
||||||
|
Get
|
||||||
|
Return m_SubId
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_SubId = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Sub New(sName As String, MaterialList As ObservableCollection(Of Material))
|
Sub New(sName As String, MaterialList As ObservableCollection(Of Material))
|
||||||
Dim nMaxId As Integer = 0
|
Dim nMaxId As Integer = 0
|
||||||
For Each Material In MaterialList
|
For Each Material In MaterialList
|
||||||
@@ -1441,4 +1591,10 @@ Public Class Material
|
|||||||
m_sName = sName
|
m_sName = sName
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Sub New(nId As Integer, sName As String, nSubId As Integer)
|
||||||
|
m_nId = nId
|
||||||
|
m_sName = sName
|
||||||
|
m_SubId = nSubId
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
+30
-6
@@ -3,6 +3,16 @@ Imports EgtUILib
|
|||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Module EstCalc
|
Module EstCalc
|
||||||
|
Friend Function CompoColor(sIniFile As String) As Color3d
|
||||||
|
Dim InsertColor As New Color3d(89, 210, 210, 25)
|
||||||
|
Dim IndexColor As Integer = GetPrivateProfileInt(S_COMPO, K_LASTCOLOR, 1, sIniFile)
|
||||||
|
If Not GetPrivateProfileColor(S_COMPO, K_COLOR & IndexColor.ToString, InsertColor, sIniFile) Then
|
||||||
|
IndexColor = 1
|
||||||
|
GetPrivateProfileColor(S_COMPO, K_COLOR & IndexColor.ToString, InsertColor, sIniFile)
|
||||||
|
End If
|
||||||
|
WritePrivateProfileString(S_COMPO, K_LASTCOLOR, (IndexColor + 1).ToString, sIniFile)
|
||||||
|
Return InsertColor
|
||||||
|
End Function
|
||||||
|
|
||||||
'--------------------------------------------------------------------------------------------------
|
'--------------------------------------------------------------------------------------------------
|
||||||
Friend Function DoubleToString(ByVal dVal As Double, ByVal nNumDec As Integer) As String
|
Friend Function DoubleToString(ByVal dVal As Double, ByVal nNumDec As Integer) As String
|
||||||
@@ -67,6 +77,8 @@ Module EstCalc
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdateRawPart() As Boolean
|
Public Function UpdateRawPart() As Boolean
|
||||||
|
' Passo al contesto principale
|
||||||
|
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||||
' determino il grezzo (è il primo con fase 1)
|
' determino il grezzo (è il primo con fase 1)
|
||||||
m_nRawId = CamAuto.GetCurrentRaw()
|
m_nRawId = CamAuto.GetCurrentRaw()
|
||||||
If Not EgtGetRawPartBBox(m_nRawId, m_b3Raw) Then
|
If Not EgtGetRawPartBBox(m_nRawId, m_b3Raw) Then
|
||||||
@@ -292,16 +304,28 @@ Module EstCalc
|
|||||||
EgtErase(EgtGetFirstNameInGroup(nFixtId, MACH_ADD_TABLE))
|
EgtErase(EgtGetFirstNameInGroup(nFixtId, MACH_ADD_TABLE))
|
||||||
' Altezza eventuale tavola aggiuntiva
|
' Altezza eventuale tavola aggiuntiva
|
||||||
Dim dAddTable As Double = dAdditionalTable
|
Dim dAddTable As Double = dAdditionalTable
|
||||||
' Se non esiste sovratavola, esco subito
|
' Se non richiesta sovratavola, non c'è altro da fare ed esco
|
||||||
If dAddTable < 10 * EPS_SMALL Then Return True
|
If dAddTable < 10 * EPS_SMALL Then Return True
|
||||||
' Recupero box tavola
|
' Recupero box tavola
|
||||||
Dim ptMin, ptMax As Point3d
|
Dim ptMin, ptMax As Point3d
|
||||||
EgtGetTableArea(1, ptMin, ptMax)
|
EgtGetTableArea(1, ptMin, ptMax)
|
||||||
' Aggiungo sovratavola nel gruppo dei bloccaggi
|
' Nuova geometria
|
||||||
ptMax.z -= DELTAZ_ADDTAB
|
Dim nAddTabId As Integer = GDB_ID.NULL
|
||||||
ptMin.z = ptMax.z
|
' Se esiste geometria di riferimento
|
||||||
ptMax.z += dAddTable
|
Dim nRefAddTabId = EgtGetFirstNameInGroup(EgtGetFirstNameInGroup(EgtGetTableId(MAIN_TAB), "SOLID"), MACH_ADD_TABLE)
|
||||||
Dim nAddTabId As Integer = EgtCreateSurfTmBBox(nFixtId, ptMin, ptMax, GDB_RT.GLOB)
|
If nRefAddTabId <> GDB_ID.NULL Then
|
||||||
|
nAddTabId = EgtCopyGlob(nRefAddTabId, nFixtId)
|
||||||
|
EgtSetStatus(nAddTabId, GDB_ST.ON_)
|
||||||
|
EgtScale(nAddTabId, New Frame3d(ptMin), 1, 1, dAddTable / 10)
|
||||||
|
' altrimenti la creo
|
||||||
|
Else
|
||||||
|
' Aggiungo sovratavola nel gruppo dei bloccaggi
|
||||||
|
ptMax.z -= DELTAZ_ADDTAB
|
||||||
|
ptMin.z = ptMax.z
|
||||||
|
ptMax.z += dAddTable
|
||||||
|
nAddTabId = EgtCreateSurfTmBBox(nFixtId, ptMin, ptMax, GDB_RT.GLOB)
|
||||||
|
End If
|
||||||
|
' Sistemazioni finali
|
||||||
If nAddTabId = GDB_ID.NULL Then Return False
|
If nAddTabId = GDB_ID.NULL Then Return False
|
||||||
EgtSetName(nAddTabId, MACH_ADD_TABLE)
|
EgtSetName(nAddTabId, MACH_ADD_TABLE)
|
||||||
EgtSetColor(nAddTabId, New Color3d(150, 75, 0, 100), True)
|
EgtSetColor(nAddTabId, New Color3d(150, 75, 0, 100), True)
|
||||||
|
|||||||
+27
-15
@@ -1,13 +1,13 @@
|
|||||||
'----------------------------------------------------------------------------
|
'----------------------------------------------------------------------------
|
||||||
' EgalTech 2015-2017
|
' EgalTech 2015-2021
|
||||||
'----------------------------------------------------------------------------
|
'----------------------------------------------------------------------------
|
||||||
' File : GenPhoto.vb Data : 12.04.17 Versione : 1.8d1
|
' File : GenPhoto.vb Data : 15.11.21 Versione : 2.3k1
|
||||||
' Contenuto : Modulo gestione fotografie.
|
' Contenuto : Modulo gestione fotografie.
|
||||||
' Ogni gruppo di lavoro può avere una sua foto della lastra.
|
' Ogni gruppo di lavoro può avere una sua foto della lastra.
|
||||||
'
|
'
|
||||||
'
|
'
|
||||||
' Modifiche : 12.04.17 DS Creazione modulo.
|
' Modifiche : 12.04.17 DS Creazione modulo.
|
||||||
'
|
' 15.11.21 PS Correzioni per scalatura foto da CameraMng senza sovratavola.
|
||||||
'
|
'
|
||||||
'----------------------------------------------------------------------------
|
'----------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -35,12 +35,12 @@ Module EstPhoto
|
|||||||
If dThick > EPS_SMALL Then
|
If dThick > EPS_SMALL Then
|
||||||
OmagOFFICEMap.refRawPartTabVM.Height = DoubleToString( dThick, 3)
|
OmagOFFICEMap.refRawPartTabVM.Height = DoubleToString( dThick, 3)
|
||||||
End If
|
End If
|
||||||
' Altezza eventuale tavola aggiuntiva
|
' Altezza della eventuale tavola aggiuntiva per solo posizionamento in Z
|
||||||
Dim dAddTable As Double = CurrentMachine.dAdditionalTable
|
Dim dAddTable As Double = CurrentMachine.dAdditionalTable
|
||||||
' Aggiusto dati per spessore grezzo
|
' Aggiusto dati per spessore grezzo
|
||||||
If Math.Abs(EstCalc.GetRawHeight() + dAddTable) > EPS_SMALL Then
|
If Math.Abs(EstCalc.GetRawHeight() + dAddTable) > EPS_SMALL Then
|
||||||
' Coefficiente di scalatura
|
' Coefficiente di scalatura (non va considerata la sovratavola)
|
||||||
Dim dFsca As Double = (ptCen.z - EstCalc.GetRawHeight() - dAddTable) / (ptCen.z - ptOri.z)
|
Dim dFsca As Double = (ptCen.z - EstCalc.GetRawHeight()) / (ptCen.z - ptOri.z)
|
||||||
dMMxPixel *= dFsca
|
dMMxPixel *= dFsca
|
||||||
ptOri.x = ptCen.x + (ptOri.x - ptCen.x) * dFsca
|
ptOri.x = ptCen.x + (ptOri.x - ptCen.x) * dFsca
|
||||||
ptOri.y = ptCen.y + (ptOri.y - ptCen.y) * dFsca
|
ptOri.y = ptCen.y + (ptOri.y - ptCen.y) * dFsca
|
||||||
@@ -67,7 +67,11 @@ Module EstPhoto
|
|||||||
End If
|
End If
|
||||||
EgtSetLevel(nPhGrpId, GDB_LV.SYSTEM)
|
EgtSetLevel(nPhGrpId, GDB_LV.SYSTEM)
|
||||||
' Carico la fotografia
|
' Carico la fotografia
|
||||||
Return EgtAddPhoto(GetPhotoName(), sPath, ptOri, ptCen, dMMxPixel, nPhGrpId, b3Tab.Min(), b3Tab.Max()) <> GDB_ID.NULL
|
Dim nPhotoId As Integer = EgtAddPhoto(GetPhotoName(), sPath, ptOri, ptCen, dMMxPixel, nPhGrpId, b3Tab.Min(), b3Tab.Max())
|
||||||
|
If nPhotoId = GDB_ID.NULL Then Return False
|
||||||
|
' Salvo spessore sovratavola usato per posizionamento in Z
|
||||||
|
EgtSetInfo( nPhotoId, "OvTab", dAddTable)
|
||||||
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function LoadContour(sPath As String) As Boolean
|
Friend Function LoadContour(sPath As String) As Boolean
|
||||||
@@ -92,12 +96,12 @@ Module EstPhoto
|
|||||||
Dim nPixelX As Integer = 0
|
Dim nPixelX As Integer = 0
|
||||||
Dim nPixelY As Integer = 0
|
Dim nPixelY As Integer = 0
|
||||||
If Not EgtGetPhotoImagePixels(GetPhoto(), nPixelX, nPixelY) Then Return False
|
If Not EgtGetPhotoImagePixels(GetPhoto(), nPixelX, nPixelY) Then Return False
|
||||||
' Altezza eventuale tavola aggiuntiva
|
' Altezza della eventuale tavola aggiuntiva per solo posizionamento in Z
|
||||||
Dim dAddTable As Double = CurrentMachine.dAdditionalTable
|
Dim dAddTable As Double = CurrentMachine.dAdditionalTable
|
||||||
' Aggiusto dati per spessore grezzo
|
' Aggiusto dati per spessore grezzo
|
||||||
If Math.Abs(EstCalc.GetRawHeight() + dAddTable) > EPS_SMALL Then
|
If Math.Abs(EstCalc.GetRawHeight() + dAddTable) > EPS_SMALL Then
|
||||||
' Coefficiente di scalatura
|
' Coefficiente di scalatura (non va considerata la sovratavola)
|
||||||
Dim dFsca As Double = (ptCen.z - EstCalc.GetRawHeight() - dAddTable) / (ptCen.z - ptOri.z)
|
Dim dFsca As Double = (ptCen.z - EstCalc.GetRawHeight()) / (ptCen.z - ptOri.z)
|
||||||
dMMxPixel *= dFsca
|
dMMxPixel *= dFsca
|
||||||
ptOri.x = ptCen.x + (ptOri.x - ptCen.x) * dFsca
|
ptOri.x = ptCen.x + (ptOri.x - ptCen.x) * dFsca
|
||||||
ptOri.y = ptCen.y + (ptOri.y - ptCen.y) * dFsca
|
ptOri.y = ptCen.y + (ptOri.y - ptCen.y) * dFsca
|
||||||
@@ -385,10 +389,13 @@ Module EstPhoto
|
|||||||
' Porto i punti in locale
|
' Porto i punti in locale
|
||||||
ptOri.ToLoc(New Frame3d(ptTab))
|
ptOri.ToLoc(New Frame3d(ptTab))
|
||||||
ptCen.ToLoc(New Frame3d(ptTab))
|
ptCen.ToLoc(New Frame3d(ptTab))
|
||||||
' Altezza eventuale tavola aggiuntiva
|
' Altezza della eventuale tavola aggiuntiva originaria
|
||||||
|
Dim dOrigAddTable As Double = 0
|
||||||
|
EgtGetInfo( nPhotoId, "OvTab", dOrigAddTable)
|
||||||
|
' Altezza della eventuale tavola aggiuntiva per solo posizionamento in Z
|
||||||
Dim dAddTable As Double = CurrentMachine.dAdditionalTable
|
Dim dAddTable As Double = CurrentMachine.dAdditionalTable
|
||||||
' Aggiusto dati per spessore grezzo (Coefficiente di scalatura)
|
' Aggiusto dati per spessore grezzo (Coefficiente di scalatura)
|
||||||
Dim dFsca As Double = (ptCen.z - EstCalc.GetRawHeight() - dAddTable) / (ptCen.z - ptOri.z)
|
Dim dFsca As Double = (ptCen.z - EstCalc.GetRawHeight()) / (ptCen.z - ptOri.z + dOrigAddTable)
|
||||||
dDimX *= dFsca
|
dDimX *= dFsca
|
||||||
dDimY *= dFsca
|
dDimY *= dFsca
|
||||||
ptOri.x = ptCen.x + (ptOri.x - ptCen.x) * dFsca
|
ptOri.x = ptCen.x + (ptOri.x - ptCen.x) * dFsca
|
||||||
@@ -426,6 +433,8 @@ Module EstPhoto
|
|||||||
EgtSetInfo(nNewPhotoId, "OffsX", dOffsetX)
|
EgtSetInfo(nNewPhotoId, "OffsX", dOffsetX)
|
||||||
EgtSetInfo(nNewPhotoId, "OffsY", dOffsetY)
|
EgtSetInfo(nNewPhotoId, "OffsY", dOffsetY)
|
||||||
EgtSetInfo(nNewPhotoId, "Rot", dRot)
|
EgtSetInfo(nNewPhotoId, "Rot", dRot)
|
||||||
|
' Salvo sovratavola attuale
|
||||||
|
EgtSetInfo( nNewPhotoId, "OvTab", dAddTable)
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -482,17 +491,20 @@ Module EstPhoto
|
|||||||
' Recupero origine della tavola
|
' Recupero origine della tavola
|
||||||
Dim ptTab As Point3d
|
Dim ptTab As Point3d
|
||||||
If Not EgtGetTableRef(1, ptTab) Then Return False
|
If Not EgtGetTableRef(1, ptTab) Then Return False
|
||||||
' Altezza eventuale tavola aggiuntiva
|
' Altezza della eventuale tavola aggiuntiva originaria
|
||||||
|
Dim dOrigAddTable As Double = 0
|
||||||
|
EgtGetInfo( nPhotoId, "OvTab", dOrigAddTable)
|
||||||
|
' Altezza della eventuale tavola aggiuntiva per solo posizionamento in Z
|
||||||
Dim dAddTable As Double = CurrentMachine.dAdditionalTable
|
Dim dAddTable As Double = CurrentMachine.dAdditionalTable
|
||||||
' Recupero inizio contorno
|
' Recupero inizio contorno
|
||||||
Dim ptStart As Point3d
|
Dim ptStart As Point3d
|
||||||
EgtStartPoint(nCrvId, GDB_ID.ROOT, ptStart)
|
EgtStartPoint(nCrvId, GDB_ID.ROOT, ptStart)
|
||||||
' Calcolo coefficiente di scalatura
|
' Calcolo coefficiente di scalatura
|
||||||
Dim dFsca As Double = (ptCen.z - ptTab.z - EstCalc.GetRawHeight() - dAddTable) / (ptCen.z - ptStart.z)
|
Dim dFsca As Double = (ptCen.z - ptTab.z - EstCalc.GetRawHeight()) / (ptCen.z - ptStart.z + dOrigAddTable)
|
||||||
' Scalo opportunamente
|
' Scalo opportunamente
|
||||||
EgtScale(nCrvId, New Frame3d(ptCen), dFsca, dFsca, 1, GDB_RT.GLOB)
|
EgtScale(nCrvId, New Frame3d(ptCen), dFsca, dFsca, 1, GDB_RT.GLOB)
|
||||||
' Sposto in Z
|
' Sposto in Z
|
||||||
Dim vtMove As New Vector3d(0, 0, ptTab.z + EstCalc.GetRawHeight() + dAddTable - ptStart.z)
|
Dim vtMove As New Vector3d(0, 0, ptTab.z + EstCalc.GetRawHeight() + CurrentMachine.dAdditionalTable - ptStart.z)
|
||||||
EgtMove(nCrvId, vtMove, GDB_RT.GLOB)
|
EgtMove(nCrvId, vtMove, GDB_RT.GLOB)
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
+43
-12
@@ -160,6 +160,17 @@ Public Module SplitAuto
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
'-----------------------------------------------------------------------------------------------
|
'-----------------------------------------------------------------------------------------------
|
||||||
|
' calcolo il numero di tipi di lavorazioni
|
||||||
|
Friend Sub CountMachiningType(MachSplit As SplitMach, ByRef nCountSawing As Integer, ByRef nCountWaterjetting As Integer, ByRef nCountOtherMachining As Integer)
|
||||||
|
If MachSplit.m_nType = MCH_OY.SAWING Then
|
||||||
|
nCountSawing += 1
|
||||||
|
ElseIf MachSplit.m_nType = MCH_OY.WATERJETTING Then
|
||||||
|
nCountWaterjetting += 1
|
||||||
|
Else
|
||||||
|
nCountOtherMachining += 1
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Friend Sub ColorMachining(MachSplit As SplitMach, Optional bReset As Boolean = False)
|
Friend Sub ColorMachining(MachSplit As SplitMach, Optional bReset As Boolean = False)
|
||||||
EgtDisableModified()
|
EgtDisableModified()
|
||||||
' Assegno stato
|
' Assegno stato
|
||||||
@@ -736,35 +747,55 @@ Public Module SplitAuto
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function SafeMoveRawPart(nRawId As Integer, ByRef vtMove As Vector3d, dMindist As Double) As Boolean
|
Private Function SafeMoveRawPart(nRawId As Integer, ByRef vtMove As Vector3d, dMindist As Double) As Boolean
|
||||||
|
' Spostamento originale
|
||||||
|
Dim vtOriMove As New Vector3d(vtMove)
|
||||||
|
' Livello di movimento
|
||||||
|
Dim nMoveLevel As Integer = GetPrivateProfileInt(S_SPLIT, K_MOVE_LEV, 5, IniFile.m_sIniFile)
|
||||||
|
Dim nMove As Integer = 1
|
||||||
' Se esce dalla tavola, movimento già annullato ed esco con errore
|
' Se esce dalla tavola, movimento già annullato ed esco con errore
|
||||||
If Not EgtMoveRawPart(nRawId, vtMove) Then Return False
|
If Not EgtMoveRawPart(nRawId, vtOriMove) Then Return False
|
||||||
' Se interferisce con altri grezzi, annullo movimento ed esco con errore
|
' Se interferisce con altri grezzi, annullo movimento ed esco con errore
|
||||||
If Not VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
If Not VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
||||||
EgtMoveRawPart(nRawId, -vtMove)
|
EgtMoveRawPart(nRawId, -vtOriMove)
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
If nMoveLevel < 2 Then Return True
|
||||||
' Provo ad aggiungere un altro movimento
|
' Provo ad aggiungere un altro movimento
|
||||||
If EgtMoveRawPart(nRawId, vtMove) Then
|
If EgtMoveRawPart(nRawId, vtOriMove) Then
|
||||||
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
||||||
vtMove += vtMove
|
vtMove += vtOriMove
|
||||||
|
nMove += 1
|
||||||
|
If nMoveLevel = nMove Then Return True
|
||||||
Else
|
Else
|
||||||
EgtMoveRawPart(nRawId, -vtMove)
|
EgtMoveRawPart(nRawId, -vtOriMove)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
' Provo ad aggiungere un altro movimento
|
||||||
|
If EgtMoveRawPart(nRawId, vtOriMove) Then
|
||||||
|
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
||||||
|
vtMove += vtOriMove
|
||||||
|
nMove += 1
|
||||||
|
If nMoveLevel = nMove Then Return True
|
||||||
|
Else
|
||||||
|
EgtMoveRawPart(nRawId, -vtOriMove)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' Provo ad aggiungere un movimento dimezzato
|
' Provo ad aggiungere un movimento dimezzato
|
||||||
If EgtMoveRawPart(nRawId, 0.5 * vtMove) Then
|
If EgtMoveRawPart(nRawId, 0.5 * vtOriMove) Then
|
||||||
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
||||||
vtMove += 0.5 * vtMove
|
vtMove += 0.5 * vtOriMove
|
||||||
|
nMove += 1
|
||||||
|
If nMoveLevel = nMove Then Return True
|
||||||
Else
|
Else
|
||||||
EgtMoveRawPart(nRawId, -0.5 * vtMove)
|
EgtMoveRawPart(nRawId, -0.5 * vtOriMove)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' Provo ad aggiunger un movimento 1/4
|
' Provo ad aggiungere un movimento 1/4
|
||||||
If EgtMoveRawPart(nRawId, 0.25 * vtMove) Then
|
If EgtMoveRawPart(nRawId, 0.25 * vtOriMove) Then
|
||||||
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
||||||
vtMove += 0.25 * vtMove
|
vtMove += 0.25 * vtOriMove
|
||||||
Else
|
Else
|
||||||
EgtMoveRawPart(nRawId, -0.25 * vtMove)
|
EgtMoveRawPart(nRawId, -0.25 * vtOriMove)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Return True
|
Return True
|
||||||
|
|||||||
@@ -25,7 +25,10 @@
|
|||||||
<Button Name="ExportBtn" Height="40" Width="80"
|
<Button Name="ExportBtn" Height="40" Width="80"
|
||||||
Margin="0,5,0,0"
|
Margin="0,5,0,0"
|
||||||
Content="Export"/>
|
Content="Export"/>
|
||||||
</StackPanel>
|
<Button Name="AssemblyBtn" Height="40" Width="80"
|
||||||
|
Margin="0,5,0,0"
|
||||||
|
Content="3D"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Windows.Interop
|
Imports System.Windows.Interop
|
||||||
|
Imports System.Collections.ObjectModel
|
||||||
Imports System.Runtime.InteropServices
|
Imports System.Runtime.InteropServices
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
@@ -316,6 +317,7 @@ Public Class VeinMatchingWindow
|
|||||||
MessageBox.Show(Me, EgtMsg(91607) & " " & sMachGrpName, EgtMsg(91122), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
MessageBox.Show(Me, EgtMsg(91607) & " " & sMachGrpName, EgtMsg(91122), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
EgtSetCurrentContext(VeinMatchingScene.GetCtx())
|
EgtSetCurrentContext(VeinMatchingScene.GetCtx())
|
||||||
' Se selezione riuscita, la eseguo anche in VME
|
' Se selezione riuscita, la eseguo anche in VME
|
||||||
@@ -378,6 +380,13 @@ Public Class VeinMatchingWindow
|
|||||||
VeinMatching.Export(SaveFileDialog.FileName)
|
VeinMatching.Export(SaveFileDialog.FileName)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub AssemblyBtn_Click(sender As Object, e As RoutedEventArgs) Handles AssemblyBtn.Click
|
||||||
|
EstCalc.UpdateRawPart()
|
||||||
|
' lo spessore deve essere aggiornato per ogni lastra! (devo cicolare sull'elenco delle "macchinate"
|
||||||
|
Dim ThicknessRaw As Double = EstCalc.GetRawHeight
|
||||||
|
VeinMatching.AssemblyParts(ThicknessRaw)
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub Scene_KeyDown(sender As System.Object, e As System.Windows.Forms.KeyEventArgs) Handles VeinMatchingScene.KeyDown
|
Private Sub Scene_KeyDown(sender As System.Object, e As System.Windows.Forms.KeyEventArgs) Handles VeinMatchingScene.KeyDown
|
||||||
' Con DEL eseguo cancellazione dei pezzi selezionati
|
' Con DEL eseguo cancellazione dei pezzi selezionati
|
||||||
If e.KeyData = System.Windows.Forms.Keys.Delete Then
|
If e.KeyData = System.Windows.Forms.Keys.Delete Then
|
||||||
@@ -401,6 +410,8 @@ Friend Module VeinMatching
|
|||||||
' Dimensioni immagine da esportare
|
' Dimensioni immagine da esportare
|
||||||
Private m_nImgWidth As Integer = 1600
|
Private m_nImgWidth As Integer = 1600
|
||||||
Private m_nImgHeight As Integer = 1200
|
Private m_nImgHeight As Integer = 1200
|
||||||
|
' Lista delle alzatine
|
||||||
|
Private m_ListAlzFront As New ObservableCollection(Of Aletta)
|
||||||
' Flag visualizzazione testi
|
' Flag visualizzazione testi
|
||||||
Private m_bShowText As Boolean = True
|
Private m_bShowText As Boolean = True
|
||||||
Friend ReadOnly Property bShowText As Boolean
|
Friend ReadOnly Property bShowText As Boolean
|
||||||
@@ -672,6 +683,15 @@ Friend Module VeinMatching
|
|||||||
' Sistemo il colore
|
' Sistemo il colore
|
||||||
Dim colWhite As New Color3d(255, 255, 255, 100)
|
Dim colWhite As New Color3d(255, 255, 255, 100)
|
||||||
EgtSetColor(nRegId, colWhite)
|
EgtSetColor(nRegId, colWhite)
|
||||||
|
|
||||||
|
' Ripeto le stesse operazioni con il solido del pezzo, se esiste
|
||||||
|
Dim nSolidId As Integer = GetVeinPartSolidId(nId)
|
||||||
|
If nSolidId <> GDB_ID.NULL Then
|
||||||
|
EgtSetTextureName(nSolidId, GetVeinPhotoName(nInd))
|
||||||
|
EgtSetTextureFrame(nSolidId, refTxr, GDB_RT.GLOB)
|
||||||
|
EgtSetColor(nSolidId, colWhite)
|
||||||
|
End If
|
||||||
|
|
||||||
' Se richiesto, eseguo deselezione
|
' Se richiesto, eseguo deselezione
|
||||||
If bDeselect Then EgtDeselectObj(nId)
|
If bDeselect Then EgtDeselectObj(nId)
|
||||||
End If
|
End If
|
||||||
@@ -698,10 +718,14 @@ Friend Module VeinMatching
|
|||||||
If nId <> GDB_ID.NULL Then
|
If nId <> GDB_ID.NULL Then
|
||||||
' Recupero la regione del pezzo
|
' Recupero la regione del pezzo
|
||||||
Dim nRegId As Integer = GetVeinPartRegionId(nId)
|
Dim nRegId As Integer = GetVeinPartRegionId(nId)
|
||||||
|
Dim nSolidId As Integer = GetVeinPartSolidId(nId)
|
||||||
' Sistemo il riferimento della texture
|
' Sistemo il riferimento della texture
|
||||||
Dim refTxr As New Frame3d
|
Dim refTxr As New Frame3d
|
||||||
GetVeinRefPhoto(nMainCtx, nPartId, nId, refTxr)
|
GetVeinRefPhoto(nMainCtx, nPartId, nId, refTxr)
|
||||||
EgtSetTextureFrame(nRegId, refTxr, GDB_RT.GLOB)
|
EgtSetTextureFrame(nRegId, refTxr, GDB_RT.GLOB)
|
||||||
|
If nSolidId <> GDB_ID.NULL Then
|
||||||
|
EgtSetTextureFrame(nSolidId, refTxr, GDB_RT.GLOB)
|
||||||
|
End If
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
End If
|
End If
|
||||||
EgtSetCurrentContext(nMainCtx)
|
EgtSetCurrentContext(nMainCtx)
|
||||||
@@ -728,8 +752,15 @@ Friend Module VeinMatching
|
|||||||
' Gli tolgo la texture
|
' Gli tolgo la texture
|
||||||
EgtRemoveTextureData(nRegId)
|
EgtRemoveTextureData(nRegId)
|
||||||
' Sistemo il colore
|
' Sistemo il colore
|
||||||
Dim colAqua As New Color3d(0, 255, 255, 25)
|
Dim colRegion As Color3d
|
||||||
EgtSetColor(nRegId, colAqua)
|
EgtGetColor(EgtGetParent(nRegId), colRegion)
|
||||||
|
EgtSetColor(nRegId, colRegion)
|
||||||
|
' ripeto per il solido
|
||||||
|
Dim nSolidId As Integer = GetVeinPartSolidId(nId)
|
||||||
|
If nSolidId <> GDB_ID.NULL Then
|
||||||
|
EgtRemoveTextureData(nSolidId)
|
||||||
|
EgtSetColor(nSolidId, colRegion)
|
||||||
|
End If
|
||||||
' Se richiesto, eseguo deselezione
|
' Se richiesto, eseguo deselezione
|
||||||
If bDeselect Then EgtDeselectObj(nId)
|
If bDeselect Then EgtDeselectObj(nId)
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
@@ -1240,4 +1271,538 @@ Friend Module VeinMatching
|
|||||||
Return nRegId
|
Return nRegId
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Function GetVeinPartSolidId(nVeinPartId As Integer) As Integer
|
||||||
|
' Imposto VeinMatching context
|
||||||
|
Dim nCurrCtx = SetVeinContext()
|
||||||
|
If nCurrCtx = 0 Then Return GDB_ID.NULL
|
||||||
|
' Gruppo regione
|
||||||
|
Dim nRegLayId As Integer = EgtGetFirstNameInGroup(nVeinPartId, NAME_VM_SOLID)
|
||||||
|
' Entità superficie regione piatta
|
||||||
|
Dim nRegId As Integer = EgtGetFirstInGroup(nRegLayId)
|
||||||
|
While nRegId <> GDB_ID.NULL
|
||||||
|
If EgtGetType(nRegId) = GDB_TY.SRF_MESH Then
|
||||||
|
Exit While
|
||||||
|
End If
|
||||||
|
nRegId = EgtGetNext(nRegId)
|
||||||
|
End While
|
||||||
|
' Se necessario, ripristino il contesto originale
|
||||||
|
If nCurrCtx > 0 Then EgtSetCurrentContext(nCurrCtx)
|
||||||
|
Return nRegId
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' ------------------- FUNZIONI PER GESTIONE ALZATINE E FRONTALINI -------------------
|
||||||
|
Friend Function CreateListAlzAndFront() As Boolean
|
||||||
|
m_ListAlzFront.Clear()
|
||||||
|
EgtSetCurrentContext(m_nVeinCtx)
|
||||||
|
Dim nId As Integer = EgtGetFirstPart()
|
||||||
|
While nId <> GDB_ID.NULL
|
||||||
|
' verifico che il pezzo sia una alzatina
|
||||||
|
Dim sInfoName As String = String.Empty
|
||||||
|
EgtGetInfo(nId, "CMP", sInfoName)
|
||||||
|
If sInfoName = "AlzFront" Then
|
||||||
|
Dim AlzFront As New Aletta(nId)
|
||||||
|
m_ListAlzFront.Add(AlzFront)
|
||||||
|
End If
|
||||||
|
' Passo al pezzo successivo
|
||||||
|
nId = EgtGetNextPart(nId)
|
||||||
|
End While
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function LinkReferencesOnAlette() As Boolean
|
||||||
|
Dim x As Integer = EgtGetCurrentContext()
|
||||||
|
' forzo il DB geometrico corrente
|
||||||
|
EgtSetCurrentContext(m_nVeinCtx)
|
||||||
|
Dim nId As Integer = EgtGetFirstPart()
|
||||||
|
While nId <> GDB_ID.NULL
|
||||||
|
' escludo dalla ricerca le alette
|
||||||
|
Dim sCMP As String = String.Empty
|
||||||
|
EgtGetInfo(nId, "CMP", sCMP)
|
||||||
|
If sCMP = "AlzFront" Then
|
||||||
|
' Passo al pezzo successivo
|
||||||
|
nId = EgtGetNextPart(nId)
|
||||||
|
Continue While
|
||||||
|
End If
|
||||||
|
' Recupero gruppo regione
|
||||||
|
Dim nOutLoopLayId As Integer = EgtGetFirstNameInGroup(nId, NAME_OUTLOOP)
|
||||||
|
' Entità lato
|
||||||
|
Dim nSideId As Integer = EgtGetFirstInGroup(nOutLoopLayId)
|
||||||
|
While nSideId <> GDB_ID.NULL
|
||||||
|
Dim sInfoGUID As String = String.Empty
|
||||||
|
EgtGetInfo(nSideId, "RefAF", sInfoGUID)
|
||||||
|
If Not String.IsNullOrEmpty(sInfoGUID) Then
|
||||||
|
Dim Item As Aletta
|
||||||
|
For Each Item In m_ListAlzFront
|
||||||
|
If Item.RefGUID = sInfoGUID Then
|
||||||
|
Item.IdSideRef = nSideId
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' ricerco nella lista delle alette il suo
|
||||||
|
End If
|
||||||
|
nSideId = EgtGetNext(nSideId)
|
||||||
|
End While
|
||||||
|
' Passo al pezzo successivo
|
||||||
|
nId = EgtGetNextPart(nId)
|
||||||
|
End While
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function AssemblyParts(ByVal ThicknessRaw As Double) As Boolean
|
||||||
|
Dim CurrContext As Integer = EgtGetCurrentContext()
|
||||||
|
' per definizione un piano cucicina deve avere lo stesso spessore delle alette
|
||||||
|
'(abbiamo dato per scontato che le alette siano realizate sullo stesso grezzo del pinao cucina...)
|
||||||
|
CreateListAlzAndFront()
|
||||||
|
LinkReferencesOnAlette()
|
||||||
|
|
||||||
|
EgtSetCurrentContext(m_nVeinCtx)
|
||||||
|
|
||||||
|
' costruisco tutti i piani cucina (recupero l'Id geometrico del VeinMatch)
|
||||||
|
Dim nId As Integer = EgtGetFirstPart()
|
||||||
|
While nId <> GDB_ID.NULL
|
||||||
|
Dim sInfoName As String = String.Empty
|
||||||
|
EgtGetInfo(nId, "CMP", sInfoName)
|
||||||
|
' recuoer
|
||||||
|
Dim sNominalThickness As String = String.Empty
|
||||||
|
EgtGetInfo(nId, "RawTN", sNominalThickness)
|
||||||
|
' verifico che il pezzo sia una piano cucina
|
||||||
|
If sInfoName.Contains("PCucina") Or sInfoName.Contains("PBagno") Then
|
||||||
|
If Not CreateKitchenTop(nId, ThicknessRaw) Then Return False
|
||||||
|
End If
|
||||||
|
' altrimenti passo al pezzo successivo
|
||||||
|
nId = EgtGetNextPart(nId)
|
||||||
|
End While
|
||||||
|
|
||||||
|
' costruisco alzatine e frontalini
|
||||||
|
Dim Item As Aletta
|
||||||
|
For Each Item In m_ListAlzFront
|
||||||
|
' verifico che il disegno 3D non sia già stato fatto
|
||||||
|
Dim nInfo3D As Integer = 0
|
||||||
|
EgtGetInfo(Item.SideId, "Info3D", nInfo3D)
|
||||||
|
If nInfo3D <> 1 Then
|
||||||
|
' EgtSetInfo(Item.SideId, "Info3D", 1)
|
||||||
|
' creo il solido
|
||||||
|
If Not CreateAlettaSolid(Item, ThicknessRaw) Then Return False
|
||||||
|
'' posiziono il solido
|
||||||
|
'If Not MoveAlettaSolid(Item, ThicknessRaw) Then Return False
|
||||||
|
End If
|
||||||
|
' posiziono il solido
|
||||||
|
If Not MoveAlettaSolid(Item, ThicknessRaw) Then Return False
|
||||||
|
' solo se arrivo fino a qui allora imposto l'info
|
||||||
|
EgtSetInfo(Item.SideId, "Info3D", 1)
|
||||||
|
Next
|
||||||
|
Draw()
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function CreateKitchenTop(ByRef nId As Integer, ByRef ThicknessRaw As Double) As Boolean
|
||||||
|
|
||||||
|
' creo o svuoto layer per facce del solido
|
||||||
|
Dim nSolidGrp As Integer = EgtGetFirstNameInGroup(nId, NAME_VM_SOLID)
|
||||||
|
If nSolidGrp <> GDB_ID.NULL Then
|
||||||
|
EgtEmptyGroup(nSolidGrp)
|
||||||
|
Else
|
||||||
|
nSolidGrp = EgtCreateGroup(nId)
|
||||||
|
EgtSetName(nSolidGrp, NAME_VM_SOLID)
|
||||||
|
End If
|
||||||
|
|
||||||
|
' recupero faccia top
|
||||||
|
Dim nRegGrp As Integer = EgtGetFirstNameInGroup(nId, NAME_REGION)
|
||||||
|
Dim nTopFr As Integer = EgtGetFirstInGroup(nRegGrp)
|
||||||
|
While nTopFr <> GDB_ID.NULL
|
||||||
|
If EgtGetType(nTopFr) = GDB_TY.SRF_FRGN Then Exit While
|
||||||
|
nTopFr = EgtGetNext(nTopFr)
|
||||||
|
End While
|
||||||
|
If nTopFr = GDB_ID.NULL Then Return False
|
||||||
|
EgtSetStatus(nTopFr, 0)
|
||||||
|
|
||||||
|
' setto colore per il solido
|
||||||
|
Dim cCol As New Color3d
|
||||||
|
EgtGetColor(nTopFr, cCol)
|
||||||
|
EgtSetColor(nSolidGrp, cCol)
|
||||||
|
|
||||||
|
' creo il solido
|
||||||
|
Dim bSameLoopsNbr As Boolean
|
||||||
|
Dim nSolidId As Integer
|
||||||
|
If Not CreateKitchenBaseSolid(nTopFr, nSolidGrp, ThicknessRaw, nSolidId, bSameLoopsNbr) Then Return False
|
||||||
|
|
||||||
|
' aggiungo componenti interni
|
||||||
|
If Not AddInternalComponents(nSolidId, nTopFr, bSameLoopsNbr, ThicknessRaw) Then Return False
|
||||||
|
|
||||||
|
' setto eventuale texture
|
||||||
|
Dim sTextName As String = String.Empty
|
||||||
|
EgtGetTextureName(nTopFr, sTextName)
|
||||||
|
If sTextName <> String.Empty Then
|
||||||
|
Dim frText As New Frame3d
|
||||||
|
EgtGetTextureFrame(nTopFr, nRegGrp, frText)
|
||||||
|
EgtSetTextureName(nSolidId, sTextName)
|
||||||
|
EgtSetTextureFrame(nSolidId, frText)
|
||||||
|
End If
|
||||||
|
|
||||||
|
' elimino curve ausiliarie
|
||||||
|
Dim nIdx As Integer = EgtGetFirstInGroup(nSolidGrp)
|
||||||
|
While nIdx <> GDB_ID.NULL
|
||||||
|
Dim newId As Integer = EgtGetNext(nIdx)
|
||||||
|
If EgtGetType(nIdx) <> GDB_TY.SRF_MESH Then
|
||||||
|
EgtErase(nIdx)
|
||||||
|
End If
|
||||||
|
nIdx = newId
|
||||||
|
End While
|
||||||
|
|
||||||
|
'Dim nOutloopGrpOrig As Integer = EgtGetFirstNameInGroup(nId, NAME_OUTLOOP & ".orig")
|
||||||
|
'If nOutloopGrpOrig <> GDB_ID.NULL Then
|
||||||
|
' EgtSetStatus(nOutloopGrpOrig, 1)
|
||||||
|
' Dim nOutloopGrp As Integer = EgtGetFirstNameInGroup(nId, NAME_OUTLOOP)
|
||||||
|
' EgtSetStatus(nOutloopGrp, 0)
|
||||||
|
'End If
|
||||||
|
|
||||||
|
Return True
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function CreateKitchenBaseSolid(ByRef nTopFr As Integer, ByRef nSolidGrp As Integer, ByRef ThicknessRaw As Double,
|
||||||
|
ByRef nSolidStm As Integer, ByRef bSameLoopsNbr As Boolean) As Boolean
|
||||||
|
|
||||||
|
' creo la faccia bottom
|
||||||
|
Dim nBottomFr As Integer
|
||||||
|
Dim nPartId As Integer = EgtGetParent(EgtGetParent(nTopFr))
|
||||||
|
If Not EgtCalcFlatPartDownRegion(nPartId, ThicknessRaw) Then Return False
|
||||||
|
Dim nDwnRegGrp As Integer = EgtGetFirstNameInGroup(nPartId, "DwnReg")
|
||||||
|
If nDwnRegGrp <> GDB_ID.NULL Then
|
||||||
|
EgtSetStatus(nDwnRegGrp, 0)
|
||||||
|
nBottomFr = EgtGetFirstInGroup(nDwnRegGrp)
|
||||||
|
If nBottomFr = GDB_ID.NULL Then Return False
|
||||||
|
Else
|
||||||
|
nBottomFr = EgtCopy(nTopFr, nSolidGrp)
|
||||||
|
End If
|
||||||
|
Dim vtMove As Vector3d = -ThicknessRaw * Vector3d.Z_AX()
|
||||||
|
EgtMove(nBottomFr, vtMove)
|
||||||
|
EgtSetStatus(nBottomFr, 0)
|
||||||
|
|
||||||
|
' superficie laterale
|
||||||
|
Dim nTopCrvCount, nBottomCrvCount As Integer
|
||||||
|
Dim nTopCrv, nBottomCrv As Integer
|
||||||
|
nTopCrv = EgtExtractSurfFrChunkLoops(nTopFr, 0, nSolidGrp, nTopCrvCount)
|
||||||
|
nBottomCrv = EgtExtractSurfFrChunkLoops(nBottomFr, 0, nSolidGrp, nBottomCrvCount)
|
||||||
|
' modifico il punto iniziale della curva bottom per ottenere una buona superficie rigata
|
||||||
|
Dim ptStartTop As Point3d
|
||||||
|
EgtStartPoint(nTopCrv, ptStartTop)
|
||||||
|
EgtChangeClosedCurveStartPoint(nBottomCrv, ptStartTop - vtMove)
|
||||||
|
Dim nLateralStm As Integer = EgtCreateSurfTmRuled(nSolidGrp, nBottomCrv, nTopCrv, 0, EPS_STM)
|
||||||
|
|
||||||
|
' superfici trimesh per faccia top e bottom
|
||||||
|
Dim nTopStm, nBottomStm As Integer
|
||||||
|
bSameLoopsNbr = (nTopCrvCount = nBottomCrvCount)
|
||||||
|
If bSameLoopsNbr Then
|
||||||
|
If Not GetSrfTmFromFlatRegion(nTopFr, nSolidGrp, nTopStm) Then Return False
|
||||||
|
If Not GetSrfTmFromFlatRegion(nBottomFr, nSolidGrp, nBottomStm) Then Return False
|
||||||
|
Else
|
||||||
|
' creo le facce top e bottom dimenticando eventuali aperture
|
||||||
|
nTopStm = EgtCreateSurfTmByFlatContour(nSolidGrp, nTopCrv, EPS_STM)
|
||||||
|
nBottomStm = EgtCreateSurfTmByFlatContour(nSolidGrp, nBottomCrv, EPS_STM)
|
||||||
|
End If
|
||||||
|
EgtInvertSurface(nBottomStm)
|
||||||
|
|
||||||
|
nSolidStm = EgtCreateSurfTmBySewing(nSolidGrp, 3, {nTopStm, nBottomStm, nLateralStm}, True)
|
||||||
|
|
||||||
|
' elimino il layer generato dalla funzione "EgtCalcFlatPartDownRegion" e rinomino quello acceso
|
||||||
|
Dim nOutLoopOrig As Integer = EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP & ".orig")
|
||||||
|
If nOutLoopOrig <> GDB_ID.NULL Then
|
||||||
|
Dim nCurrOutLoop As Integer = EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP)
|
||||||
|
EgtErase(nCurrOutLoop)
|
||||||
|
EgtSetName(nOutLoopOrig, NAME_OUTLOOP)
|
||||||
|
EgtSetStatus(nOutLoopOrig, GDB_ST.ON_)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return nSolidStm <> GDB_ID.NULL
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function AddInternalComponents(ByRef nSolidStm As Integer, ByRef nTopFr As Integer, ByRef bSameLoopsNbr As Boolean,
|
||||||
|
ByRef ThicknessRaw As Double) As Boolean
|
||||||
|
|
||||||
|
Dim nSolidGrp = EgtGetParent(nSolidStm)
|
||||||
|
|
||||||
|
' aperture interne
|
||||||
|
Dim nTopCrvCount As Integer
|
||||||
|
Dim nTopCrv As Integer = EgtExtractSurfFrChunkLoops(nTopFr, 0, nSolidGrp, nTopCrvCount)
|
||||||
|
If bSameLoopsNbr Then
|
||||||
|
Dim FacesStm(nTopCrvCount - 1) As Integer
|
||||||
|
FacesStm(0) = nSolidStm
|
||||||
|
' creo le superfici laterali definite dalle aperture
|
||||||
|
For i As Integer = 1 To nTopCrvCount - 1
|
||||||
|
FacesStm(i) = EgtCreateSurfTmByExtrusion(nSolidGrp, 1, {nTopCrv + i}, -ThicknessRaw * Vector3d.Z_AX(), EPS_STM)
|
||||||
|
EgtInvertSurface(FacesStm(i))
|
||||||
|
Next
|
||||||
|
nSolidStm = EgtCreateSurfTmBySewing(nSolidGrp, nTopCrvCount, FacesStm, True)
|
||||||
|
Else
|
||||||
|
' creo le aperture per sottrazione di solidi
|
||||||
|
For i As Integer = 1 To nTopCrvCount - 1
|
||||||
|
Dim nComponentSrf As Integer = EgtCreateSurfTmByRegionExtrusion(nSolidGrp, 1, {nTopCrv + i}, -(ThicknessRaw + 10) * Vector3d.Z_AX(), EPS_STM)
|
||||||
|
EgtSurfTmSubtract(nSolidStm, nComponentSrf)
|
||||||
|
EgtErase(nComponentSrf)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
' ribassi
|
||||||
|
Dim nId As Integer = EgtGetFirstGroupInGroup(EgtGetParent(nSolidGrp))
|
||||||
|
While nId <> GDB_ID.NULL
|
||||||
|
Dim sName As String = ""
|
||||||
|
EgtGetName(nId, sName)
|
||||||
|
If sName <> "Pocket" Then
|
||||||
|
nId = EgtGetNextGroup(nId)
|
||||||
|
Continue While
|
||||||
|
End If
|
||||||
|
' cerco curva composita che definisce il ribasso
|
||||||
|
Dim nCrvCompoId As Integer = EgtGetFirstInGroup(nId)
|
||||||
|
While nCrvCompoId <> GDB_ID.NULL
|
||||||
|
If EgtGetType(nCrvCompoId) = GDB_TY.CRV_COMPO Then Exit While
|
||||||
|
nCrvCompoId = EgtGetNext(nCrvCompoId)
|
||||||
|
End While
|
||||||
|
|
||||||
|
Dim dThick As Double
|
||||||
|
EgtCurveThickness(nCrvCompoId, dThick)
|
||||||
|
Dim vtExtr As Vector3d
|
||||||
|
EgtCurveExtrusion(nCrvCompoId, vtExtr)
|
||||||
|
Dim nRecessSrf As Integer = EgtCreateSurfTmByRegionExtrusion(nId, 1, {nCrvCompoId}, (dThick + 100) * vtExtr, EPS_STM)
|
||||||
|
EgtSurfTmSubtract(nSolidStm, nRecessSrf)
|
||||||
|
EgtErase(nRecessSrf)
|
||||||
|
|
||||||
|
' Passo al pezzo successivo
|
||||||
|
nId = EgtGetNextGroup(nId)
|
||||||
|
End While
|
||||||
|
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
Friend Function GetSrfTmFromFlatRegion(ByRef nFlatRegion As Integer, ByRef nSolidGrp As Integer, ByRef nSrfTmId As Integer) As Boolean
|
||||||
|
|
||||||
|
If nFlatRegion = GDB_ID.NULL Then Return False
|
||||||
|
' curve che delimitano la superficie
|
||||||
|
Dim nCrvCount As Integer
|
||||||
|
Dim nCrv As Integer = EgtExtractSurfFrChunkLoops(nFlatRegion, 0, nSolidGrp, nCrvCount)
|
||||||
|
If nCrv = GDB_ID.NULL Then Return False
|
||||||
|
' creo array con gli indici delle curve
|
||||||
|
Dim CrvList(nCrvCount - 1) As Integer
|
||||||
|
For i As Integer = 0 To nCrvCount - 1
|
||||||
|
CrvList(i) = nCrv + i
|
||||||
|
Next
|
||||||
|
nSrfTmId = EgtCreateSurfTmByRegion(nSolidGrp, CrvList, EPS_STM)
|
||||||
|
' cancello le curve create
|
||||||
|
For i As Integer = 0 To nCrvCount - 1
|
||||||
|
EgtErase(CrvList(i))
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return nSrfTmId <> GDB_ID.NULL
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function CreateAlettaSolid(ByRef Item As Aletta, ByRef ThicknessRaw As Double) As Boolean
|
||||||
|
|
||||||
|
' angoli per i tagli
|
||||||
|
Dim dAngL, dAngR, dAng As Double
|
||||||
|
EgtGetInfo(Item.SideId + 1, INFO_SIDE_ANGLE, dAngR)
|
||||||
|
EgtGetInfo(Item.SideId + 3, INFO_SIDE_ANGLE, dAngL)
|
||||||
|
EgtGetInfo(Item.SideId, INFO_SIDE_ANGLE, dAng)
|
||||||
|
|
||||||
|
If Math.Abs(dAngL - 90) < EPS_SMALL Or Math.Abs(dAngL + 90) < EPS_SMALL Then dAngL = 0
|
||||||
|
If Math.Abs(dAngR - 90) < EPS_SMALL Or Math.Abs(dAngR + 90) < EPS_SMALL Then dAngR = 0
|
||||||
|
If Math.Abs(dAng - 90) < EPS_SMALL Or Math.Abs(dAng + 90) < EPS_SMALL Then dAng = 0
|
||||||
|
|
||||||
|
' punti che delimitano la front face (faccia adiacente a top lungo il lato di riferimento)
|
||||||
|
Dim pt1, pt2, pt3, pt4 As Point3d
|
||||||
|
EgtStartPoint(Item.SideId, pt4)
|
||||||
|
EgtEndPoint(Item.SideId, pt3)
|
||||||
|
pt2 = pt3 - ThicknessRaw * Vector3d.Z_AX()
|
||||||
|
pt1 = pt4 - ThicknessRaw * Vector3d.Z_AX()
|
||||||
|
|
||||||
|
' aggiungo tagli inclinati
|
||||||
|
pt2 = pt2 + ThicknessRaw * Math.Tan(dAngR * Math.PI / 180) * Vector3d.X_AX()
|
||||||
|
pt1 = pt1 - ThicknessRaw * Math.Tan(dAngL * Math.PI / 180) * Vector3d.X_AX()
|
||||||
|
|
||||||
|
' aggiungo eventuale taglio sul lato superiore
|
||||||
|
pt2 = pt2 - ThicknessRaw * Math.Tan(dAng * Math.PI / 180) * Vector3d.Y_AX()
|
||||||
|
pt1 = pt1 - ThicknessRaw * Math.Tan(dAng * Math.PI / 180) * Vector3d.Y_AX()
|
||||||
|
|
||||||
|
' punti che delimitano back face
|
||||||
|
Dim HeightTop As Double
|
||||||
|
EgtCurveLength(Item.SideId + 1, HeightTop)
|
||||||
|
Dim HeightBottom As Double = HeightTop + ThicknessRaw * Math.Tan(dAng * Math.PI / 180)
|
||||||
|
Dim ptB1 As Point3d = pt1 + HeightBottom * Vector3d.Y_AX()
|
||||||
|
Dim ptB2 As Point3d = pt2 + HeightBottom * Vector3d.Y_AX()
|
||||||
|
Dim ptB3 As Point3d = pt3 + HeightTop * Vector3d.Y_AX()
|
||||||
|
Dim ptB4 As Point3d = pt4 + HeightTop * Vector3d.Y_AX()
|
||||||
|
|
||||||
|
' Creo o svuoto layer per facce del solido
|
||||||
|
Dim nSolidGrp As Integer = EgtGetFirstNameInGroup(Item.PartId, NAME_VM_SOLID)
|
||||||
|
If nSolidGrp <> GDB_ID.NULL Then
|
||||||
|
EgtEmptyGroup(nSolidGrp)
|
||||||
|
Else
|
||||||
|
nSolidGrp = EgtCreateGroup(Item.PartId)
|
||||||
|
EgtSetName(nSolidGrp, NAME_VM_SOLID)
|
||||||
|
End If
|
||||||
|
Dim nRegionGrp As Integer = EgtGetFirstNameInGroup(Item.PartId, NAME_REGION)
|
||||||
|
Dim cCol As New Color3d
|
||||||
|
EgtGetColor(EgtGetFirstInGroup(nRegionGrp), cCol)
|
||||||
|
EgtSetColor(nSolidGrp, cCol)
|
||||||
|
|
||||||
|
' Top Face
|
||||||
|
Dim nTopSrfFR As Integer = EgtGetFirstInGroup(nRegionGrp)
|
||||||
|
Dim tmp As Integer
|
||||||
|
Dim nTopCrv As Integer = EgtExtractSurfFrChunkLoops(nTopSrfFR, 0, nRegionGrp, tmp)
|
||||||
|
If nTopCrv = GDB_ID.NULL Then Return False
|
||||||
|
Dim nTopSrf As Integer = EgtCreateSurfTmByRegion(nSolidGrp, {nTopCrv}, EPS_SMALL)
|
||||||
|
EgtErase(nTopCrv)
|
||||||
|
EgtSetStatus(nTopSrfFR, 0)
|
||||||
|
|
||||||
|
Dim nFrontSrf, nBackSrf, nBottomSrf, nRightSrf, nLeftSrf As Integer
|
||||||
|
' Front Face
|
||||||
|
If Not CreateSolidFace(nSolidGrp, {pt1, pt2, pt3, pt4}, nFrontSrf, False) Then Return False
|
||||||
|
' Back Face
|
||||||
|
If Not CreateSolidFace(nSolidGrp, {ptB1, ptB4, ptB3, ptB2}, nBackSrf) Then Return False
|
||||||
|
' Bottom face
|
||||||
|
If Not CreateSolidFace(nSolidGrp, {pt2, pt1, ptB1, ptB2}, nBottomSrf) Then Return False
|
||||||
|
' Right face
|
||||||
|
If Not CreateSolidFace(nSolidGrp, {ptB1, pt1, pt4, ptB4}, nRightSrf) Then Return False
|
||||||
|
' Left face
|
||||||
|
If Not CreateSolidFace(nSolidGrp, {ptB2, ptB3, pt3, pt2}, nLeftSrf) Then Return False
|
||||||
|
|
||||||
|
' creo il solido
|
||||||
|
Dim nSolidSrf As Integer = EgtCreateSurfTmBySewing(nSolidGrp, 6, {nTopSrf, nFrontSrf, nBackSrf, nBottomSrf, nRightSrf, nLeftSrf}, True)
|
||||||
|
|
||||||
|
' setto eventuale texture
|
||||||
|
Dim sTextName As String = String.Empty
|
||||||
|
EgtGetTextureName(nTopSrfFR, sTextName)
|
||||||
|
If sTextName <> String.Empty Then
|
||||||
|
Dim frText As New Frame3d
|
||||||
|
EgtGetTextureFrame(nTopSrfFR, nRegionGrp, frText)
|
||||||
|
EgtSetTextureName(nSolidSrf, sTextName)
|
||||||
|
EgtSetTextureFrame(nSolidSrf, frText)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim nOutloopGrp As Integer = EgtGetParent(Item.SideId)
|
||||||
|
EgtSetStatus(nOutloopGrp, 0)
|
||||||
|
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function CreateSolidFace(ByRef nSrfGrp As Integer, ByRef Points As Point3d(), ByRef nSrfId As Integer,
|
||||||
|
Optional ByRef bDeleteCrv As Boolean = True) As Boolean
|
||||||
|
|
||||||
|
If Points.Count() <> 4 Then Return False
|
||||||
|
|
||||||
|
Dim nCrvId As Integer = EgtCreateCurveCompo(nSrfGrp, {EgtCreateLine(nSrfGrp, Points(0), Points(1)),
|
||||||
|
EgtCreateLine(nSrfGrp, Points(1), Points(2)),
|
||||||
|
EgtCreateLine(nSrfGrp, Points(2), Points(3)),
|
||||||
|
EgtCreateLine(nSrfGrp, Points(3), Points(0))}, True)
|
||||||
|
|
||||||
|
If nCrvId = GDB_ID.NULL Then Return False
|
||||||
|
nSrfId = EgtCreateSurfTmByRegion(nSrfGrp, {nCrvId}, EPS_SMALL)
|
||||||
|
If bDeleteCrv Then
|
||||||
|
EgtErase(nCrvId)
|
||||||
|
Else
|
||||||
|
EgtSetStatus(nCrvId, GDB_ST.OFF)
|
||||||
|
End If
|
||||||
|
Return nSrfId <> GDB_ID.NULL
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function MoveAlettaSolid(ByRef Item As Aletta, ByRef ThicknessRaw As Double) As Boolean
|
||||||
|
|
||||||
|
Dim nType As Integer
|
||||||
|
If Not EgtGetInfo(Item.IdSideRef, "AF", nType) Then Return False
|
||||||
|
|
||||||
|
Dim ptSRef, ptERef, ptE As Point3d
|
||||||
|
If Not EgtStartPoint(Item.IdSideRef, GDB_ID.ROOT, ptSRef) Then Return False
|
||||||
|
If Not EgtEndPoint(Item.IdSideRef, GDB_ID.ROOT, ptERef) Then Return False
|
||||||
|
If Not EgtEndPoint(Item.SideId, GDB_ID.ROOT, ptE) Then Return False
|
||||||
|
|
||||||
|
' verifco che sia già stato ruotato
|
||||||
|
Dim nInfo3D As Integer = 0
|
||||||
|
EgtGetInfo(Item.SideId, "Info3D", nInfo3D)
|
||||||
|
|
||||||
|
If nInfo3D <> 1 Then
|
||||||
|
' ruoto il solido intorno al lato di riferimento
|
||||||
|
Dim vtRot As Vector3d = ptERef - ptSRef
|
||||||
|
If nType = 1 Then
|
||||||
|
EgtRotate(Item.PartId, ptE, vtRot, -90, GDB_RT.GLOB)
|
||||||
|
ElseIf nType = 2 Then
|
||||||
|
EgtRotate(Item.PartId, ptE, vtRot, 90, GDB_RT.GLOB)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' punto di riferimento per la traslazione sul solido
|
||||||
|
Dim ptSolid As Point3d
|
||||||
|
If nType = 1 Then
|
||||||
|
' cerco id della curva che definisce la front face
|
||||||
|
Dim nSolidGrp As Integer = EgtGetFirstNameInGroup(Item.PartId, NAME_VM_SOLID)
|
||||||
|
Dim nFrontCrvId As Integer = EgtGetFirstInGroup(nSolidGrp)
|
||||||
|
EgtStartPoint(nFrontCrvId, ptSolid)
|
||||||
|
ElseIf nType = 2 Then
|
||||||
|
EgtStartPoint(Item.SideId, ptSolid)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim ItemFrame As New Frame3d
|
||||||
|
If Not EgtGetGroupGlobFrame(Item.PartId, ItemFrame) Then Return False
|
||||||
|
ptSolid.ToGlob(ItemFrame)
|
||||||
|
|
||||||
|
'punto di riferimento per la traslazione sul piano cucina
|
||||||
|
Dim ptKitchen As Point3d = ptERef
|
||||||
|
' traslazione
|
||||||
|
Dim vtMove As Vector3d = ptKitchen - ptSolid
|
||||||
|
EgtMove(Item.PartId, vtMove, GDB_RT.GLOB)
|
||||||
|
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
End Module
|
End Module
|
||||||
|
|
||||||
|
Public Class Aletta
|
||||||
|
|
||||||
|
Private m_PartId As Integer = -1
|
||||||
|
Public ReadOnly Property PartId As Integer
|
||||||
|
Get
|
||||||
|
Return m_PartId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SideId As Integer = -1
|
||||||
|
Public ReadOnly Property SideId As Integer
|
||||||
|
Get
|
||||||
|
Return m_SideId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_RefGUID As String = String.Empty
|
||||||
|
Public ReadOnly Property RefGUID As String
|
||||||
|
Get
|
||||||
|
Return m_RefGUID
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_IdSideRef As Integer = -1
|
||||||
|
Public Property IdSideRef As Integer
|
||||||
|
Get
|
||||||
|
Return m_IdSideRef
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_IdSideRef = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(nId As Integer)
|
||||||
|
m_PartId = nId
|
||||||
|
|
||||||
|
' Recupero l'info legata al lato che contiene iil riferiemnto
|
||||||
|
Dim nOutLoopLayId As Integer = EgtGetFirstNameInGroup(nId, NAME_OUTLOOP)
|
||||||
|
' Entità lato
|
||||||
|
Dim nSideId As Integer = EgtGetFirstInGroup(nOutLoopLayId)
|
||||||
|
While nSideId <> GDB_ID.NULL
|
||||||
|
Dim sInfoGUID As String = String.Empty
|
||||||
|
EgtGetInfo(nSideId, "RefAF", sInfoGUID)
|
||||||
|
If Not String.IsNullOrEmpty(sInfoGUID) Then
|
||||||
|
m_RefGUID = sInfoGUID
|
||||||
|
m_SideId = nSideId
|
||||||
|
Exit While
|
||||||
|
End If
|
||||||
|
nSideId = EgtGetNext(nSideId)
|
||||||
|
End While
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
ShowInTaskbar="False"
|
ShowInTaskbar="False"
|
||||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||||
WindowStartupLocation="CenterOwner"
|
WindowStartupLocation="CenterOwner"
|
||||||
MinWidth="270" MinHeight="275"
|
MinWidth="280" MinHeight="315"
|
||||||
ResizeMode="NoResize">
|
ResizeMode="NoResize">
|
||||||
|
|
||||||
<Grid Margin="5,0,5,5">
|
<Grid Margin="5,0,5,5">
|
||||||
@@ -17,27 +17,26 @@
|
|||||||
<ColumnDefinition Width="4*"/>
|
<ColumnDefinition Width="4*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="3*"/>
|
<RowDefinition Height="3.5*"/>
|
||||||
<RowDefinition Height="2*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="2*"/>
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1.2*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!--Seconda Colonna Terza riga-->
|
||||||
<GroupBox Header="{Binding SetUpMsg}" Grid.Column="1" Grid.Row="2">
|
<GroupBox Header="{Binding SetUpMsg}" Grid.Column="1" Grid.Row="2">
|
||||||
|
<Grid>
|
||||||
<Grid>
|
<ComboBox ItemsSource="{Binding ArchivedSetUpList}"
|
||||||
<ComboBox ItemsSource="{Binding ArchivedSetUpList}"
|
SelectedItem="{Binding SelectedDefaultSetUp}"
|
||||||
SelectedItem="{Binding SelectedDefaultSetUp}"
|
VerticalAlignment="Center"/>
|
||||||
VerticalAlignment="Center"/>
|
</Grid>
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
|
<!--Seconda colonna Prima Riga-->
|
||||||
<GroupBox Header="{Binding HolesMsg}" Grid.Column="1" Grid.Row="0">
|
<GroupBox Header="{Binding HolesMsg}" Grid.Column="1" Grid.Row="0">
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
@@ -74,8 +73,9 @@
|
|||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
|
<!--Prima Colonna quarta riga - Lista Materiali-->
|
||||||
<GroupBox Header="{Binding MaterialsMsg}" Grid.Column="0"
|
<GroupBox Header="{Binding MaterialsMsg}" Grid.Column="0"
|
||||||
Grid.Row="2" Grid.RowSpan="5">
|
Grid.Row="3" Grid.RowSpan="5" Visibility="{Binding Materials_Visibility}">
|
||||||
|
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
|
|
||||||
@@ -91,12 +91,31 @@
|
|||||||
Margin="2.5,0,0,0"/>
|
Margin="2.5,0,0,0"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
<EgtWPFLib5:EgtTextBox Text="{Binding NewMatName}"
|
<!--<EgtWPFLib5:EgtTextBox Text="{Binding NewMatName}"
|
||||||
DockPanel.Dock="Bottom" Width="240"
|
DockPanel.Dock="Bottom" Width="240"
|
||||||
Visibility="{Binding NewMatName_Visibility}"
|
Visibility="{Binding NewMatName_Visibility}"
|
||||||
Margin="0,0,0,5"/>
|
Margin="0,0,0,5"/>-->
|
||||||
|
<Grid DockPanel.Dock="Bottom" Visibility="{Binding NewMatName_Visibility}">
|
||||||
<ListBox ItemsSource="{Binding MaterialList}"
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="4*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<EgtWPFLib5:EgtTextBox Text="{Binding NewMatName}"
|
||||||
|
DockPanel.Dock="Bottom"
|
||||||
|
Margin="0,0,0,5"/>
|
||||||
|
<Button Content="{Binding OkMsg}" Grid.Column="1"
|
||||||
|
Command="{Binding OkCommand}"
|
||||||
|
IsEnabled="{Binding EnableOkNewMat}"
|
||||||
|
Style="{StaticResource OptionPanel_TextButton}"
|
||||||
|
Margin="2.5,0,0,2.5"/>
|
||||||
|
<Button Content="{Binding CancelMsg}" Grid.Column="2"
|
||||||
|
Command="{Binding CamcelCommand}"
|
||||||
|
Style="{StaticResource OptionPanel_TextButton}"
|
||||||
|
Margin="2.5,0,0,2.5"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<ListBox ItemsSource="{Binding MaterialList}"
|
||||||
SelectedItem="{Binding SelMaterial}"
|
SelectedItem="{Binding SelMaterial}"
|
||||||
DisplayMemberPath="sName"
|
DisplayMemberPath="sName"
|
||||||
Grid.RowSpan="2"
|
Grid.RowSpan="2"
|
||||||
@@ -106,8 +125,9 @@
|
|||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<GroupBox Header="{Binding SawParamMsg}">
|
<!--Parametri taglio lama-->
|
||||||
<UniformGrid Columns="2" Rows="4">
|
<GroupBox Header="{Binding SawParamMsg}" Visibility="{Binding SawParam_Visibility}">
|
||||||
|
<UniformGrid Columns="2" >
|
||||||
|
|
||||||
<TextBlock Text="{Binding CutExtraLenMsg}"
|
<TextBlock Text="{Binding CutExtraLenMsg}"
|
||||||
Style="{StaticResource OptionTextBlock}"/>
|
Style="{StaticResource OptionTextBlock}"/>
|
||||||
@@ -125,10 +145,18 @@
|
|||||||
Style="{StaticResource OptionTextBlock}"/>
|
Style="{StaticResource OptionTextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Text="{Binding IntArcMaxSideAng}"/>
|
<EgtWPFLib5:EgtTextBox Text="{Binding IntArcMaxSideAng}"/>
|
||||||
|
|
||||||
</UniformGrid>
|
<TextBlock Text="{Binding PreCutExitMsg}"
|
||||||
|
Visibility="{Binding PreCutExitVisibility}"
|
||||||
|
Style="{StaticResource OptionTextBlock}"/>
|
||||||
|
<CheckBox IsChecked="{Binding PreCutExit}"
|
||||||
|
Visibility="{Binding PreCutExitVisibility}"
|
||||||
|
Style="{StaticResource OptionCheckBox}"/>
|
||||||
|
|
||||||
|
</UniformGrid>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
|
<!--Seconda colonna, seconda riga-->
|
||||||
<GroupBox Header="{Binding MachineParamMsg}" Grid.Column="1" Grid.Row="1">
|
<GroupBox Header="{Binding MachineParamMsg}" Grid.Column="1" Grid.Row="1">
|
||||||
<UniformGrid Columns="2">
|
<UniformGrid Columns="2">
|
||||||
|
|
||||||
@@ -140,10 +168,10 @@
|
|||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<GroupBox Header="{Binding MillingParamMsg}" Grid.Column="0" Grid.Row="1">
|
<GroupBox Header="{Binding MillingParamMsg}" Grid.Column="0" Grid.Row="1" Grid.RowSpan="2">
|
||||||
<UniformGrid Rows="3">
|
<UniformGrid Rows="3">
|
||||||
|
|
||||||
<Grid>
|
<Grid Visibility="{Binding MillingParam_Visibility}">
|
||||||
<TextBlock Text="{Binding CornerCutsMsg}"
|
<TextBlock Text="{Binding CornerCutsMsg}"
|
||||||
Style="{StaticResource OptionTextBlock}"/>
|
Style="{StaticResource OptionTextBlock}"/>
|
||||||
<CheckBox IsChecked="{Binding CornerCuts}"
|
<CheckBox IsChecked="{Binding CornerCuts}"
|
||||||
@@ -155,7 +183,7 @@
|
|||||||
<CheckBox IsChecked="{Binding InternalCuts}"
|
<CheckBox IsChecked="{Binding InternalCuts}"
|
||||||
Style="{StaticResource OptionCheckBox}"/>
|
Style="{StaticResource OptionCheckBox}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<UniformGrid Columns="2">
|
<UniformGrid Columns="2" Visibility="{Binding MillingParam_Visibility}">
|
||||||
<TextBlock Text="{Binding ShortMsg}"
|
<TextBlock Text="{Binding ShortMsg}"
|
||||||
Style="{StaticResource OptionTextBlock}"/>
|
Style="{StaticResource OptionTextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Text="{Binding ShortCut}"/>
|
<EgtWPFLib5:EgtTextBox Text="{Binding ShortCut}"/>
|
||||||
@@ -165,33 +193,41 @@
|
|||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<GroupBox Header="{Binding NestingParamMsg}" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1">
|
<!--Nesting-->
|
||||||
<UniformGrid Columns="1" Rows="3">
|
<GroupBox Header="{Binding NestingParamMsg}" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2">
|
||||||
|
<UniformGrid Columns="2" >
|
||||||
|
|
||||||
<Grid>
|
|
||||||
<TextBlock Text="{Binding CompleteCutsMsg}"
|
<TextBlock Text="{Binding CompleteCutsMsg}"
|
||||||
Style="{StaticResource OptionTextBlock}"/>
|
Style="{StaticResource OptionTextBlock}"/>
|
||||||
<CheckBox IsChecked="{Binding CompleteCuts}"
|
<CheckBox IsChecked="{Binding CompleteCuts}"
|
||||||
Style="{StaticResource OptionCheckBox}"/>
|
Style="{StaticResource OptionCheckBox}"/>
|
||||||
</Grid>
|
|
||||||
<Grid>
|
|
||||||
<TextBlock Text="{Binding AlignMsg}"
|
<TextBlock Text="{Binding AlignMsg}"
|
||||||
Style="{StaticResource OptionTextBlock}"/>
|
Style="{StaticResource OptionTextBlock}"/>
|
||||||
<CheckBox IsChecked="{Binding Aligned}"
|
<CheckBox IsChecked="{Binding Aligned}"
|
||||||
Style="{StaticResource OptionCheckBox}"/>
|
Style="{StaticResource OptionCheckBox}"/>
|
||||||
</Grid>
|
|
||||||
<Grid>
|
<TextBlock Text="{Binding GuillotineMsg}"
|
||||||
|
Visibility="{Binding GuillotineVisibility}"
|
||||||
|
Style="{StaticResource OptionTextBlock}"/>
|
||||||
|
<CheckBox IsChecked="{Binding Guillotine}"
|
||||||
|
Visibility="{Binding GuillotineVisibility}"
|
||||||
|
Style="{StaticResource OptionCheckBox}"/>
|
||||||
|
|
||||||
|
|
||||||
<TextBlock Text="{Binding AutomaticMsg}"
|
<TextBlock Text="{Binding AutomaticMsg}"
|
||||||
Style="{StaticResource OptionTextBlock}"/>
|
Style="{StaticResource OptionTextBlock}"/>
|
||||||
<CheckBox IsChecked="{Binding Automatic}"
|
<CheckBox IsChecked="{Binding Automatic}"
|
||||||
Style="{StaticResource OptionCheckBox}"/>
|
Style="{StaticResource OptionCheckBox}"/>
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<Border Grid.Column="1" Grid.Row="4"
|
<Border Grid.Column="1" Grid.Row="5"
|
||||||
Visibility="{Binding SacProbeVisibility}"
|
Visibility="{Binding SacProbeVisibility}"
|
||||||
Style="{StaticResource DefaultBorder}">
|
Style="{StaticResource DefaultBorder}">
|
||||||
<Grid >
|
<Grid >
|
||||||
@@ -204,7 +240,7 @@
|
|||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<Border Grid.Column="1" Grid.Row="5"
|
<Border Grid.Column="1" Grid.Row="6"
|
||||||
Visibility="{Binding WashingVisibility}"
|
Visibility="{Binding WashingVisibility}"
|
||||||
Style="{StaticResource DefaultBorder}">
|
Style="{StaticResource DefaultBorder}">
|
||||||
<Grid >
|
<Grid >
|
||||||
@@ -217,7 +253,7 @@
|
|||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<Border Grid.Column="1" Grid.Row="6" Style="{StaticResource DefaultBorder}">
|
<Border Grid.Column="1" Grid.Row="7" Style="{StaticResource DefaultBorder}">
|
||||||
<UniformGrid Columns="2">
|
<UniformGrid Columns="2">
|
||||||
|
|
||||||
<TextBlock Text="{Binding AdditionalTableMsg}"
|
<TextBlock Text="{Binding AdditionalTableMsg}"
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ Public Class MachOptionWindowVM
|
|||||||
|
|
||||||
Public Property HolesOffset As String
|
Public Property HolesOffset As String
|
||||||
Get
|
Get
|
||||||
Return LenToString(CurrentMachine.dHolesOffset, -2)
|
Return LenToString(CurrentMachine.dHolesOffset, 2)
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
Dim dHolesOffset As Double = 0
|
Dim dHolesOffset As Double = 0
|
||||||
@@ -45,7 +45,7 @@ Public Class MachOptionWindowVM
|
|||||||
|
|
||||||
Public Property HolesOverlap As String
|
Public Property HolesOverlap As String
|
||||||
Get
|
Get
|
||||||
Return LenToString(CurrentMachine.dHolesOverlap, -2)
|
Return LenToString(CurrentMachine.dHolesOverlap, 2)
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
Dim dHolesOverlap As Double = 0
|
Dim dHolesOverlap As Double = 0
|
||||||
@@ -57,7 +57,7 @@ Public Class MachOptionWindowVM
|
|||||||
|
|
||||||
Public Property HolesTolerance As String
|
Public Property HolesTolerance As String
|
||||||
Get
|
Get
|
||||||
Return LenToString(CurrentMachine.dHolesTolerance, -2)
|
Return LenToString(CurrentMachine.dHolesTolerance, 2)
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
Dim dHolesTolerance As Double = 0
|
Dim dHolesTolerance As Double = 0
|
||||||
@@ -82,7 +82,7 @@ Public Class MachOptionWindowVM
|
|||||||
|
|
||||||
Public Property CutExtraLen As String
|
Public Property CutExtraLen As String
|
||||||
Get
|
Get
|
||||||
Return LenToString(CurrentMachine.dCutExtraLen, -2)
|
Return LenToString(CurrentMachine.dCutExtraLen, 2)
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
Dim dCutExtraLen As Double = 0
|
Dim dCutExtraLen As Double = 0
|
||||||
@@ -94,7 +94,7 @@ Public Class MachOptionWindowVM
|
|||||||
|
|
||||||
Public Property AngleCutExtraLen As String
|
Public Property AngleCutExtraLen As String
|
||||||
Get
|
Get
|
||||||
Return LenToString(CurrentMachine.dAngleCutExtraLen, -2)
|
Return LenToString(CurrentMachine.dAngleCutExtraLen, 2)
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
Dim dAngleCutExtraLen As Double = 0
|
Dim dAngleCutExtraLen As Double = 0
|
||||||
@@ -106,7 +106,7 @@ Public Class MachOptionWindowVM
|
|||||||
|
|
||||||
Public Property ExtArcMinRad As String
|
Public Property ExtArcMinRad As String
|
||||||
Get
|
Get
|
||||||
Return LenToString(CurrentMachine.dExtArcMinRad, -2)
|
Return LenToString(CurrentMachine.dExtArcMinRad, 2)
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
Dim dExtArcMinRad As Double = 0
|
Dim dExtArcMinRad As Double = 0
|
||||||
@@ -118,7 +118,7 @@ Public Class MachOptionWindowVM
|
|||||||
|
|
||||||
Public Property IntArcMaxSideAng As String
|
Public Property IntArcMaxSideAng As String
|
||||||
Get
|
Get
|
||||||
Return DoubleToString(CurrentMachine.dIntArcMaxSideAng, -2)
|
Return DoubleToString(CurrentMachine.dIntArcMaxSideAng, 2)
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
Dim dIntArcMaxSideAng As Double = 0
|
Dim dIntArcMaxSideAng As Double = 0
|
||||||
@@ -128,13 +128,40 @@ Public Class MachOptionWindowVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property PreCutExitVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Return CurrentMachine.vPreCutExitVisibility
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property PreCutExit As Boolean
|
||||||
|
Get
|
||||||
|
Return CurrentMachine.bPreCutExit
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
CurrentMachine.bPreCutExit = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property SawParam_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
' in assenza dell'uscita H1 nascondo i parametri lama
|
||||||
|
If EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||||
|
Return Visibility.Hidden
|
||||||
|
Else
|
||||||
|
Return Visibility.Visible
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region ' Saw Param
|
#End Region ' Saw Param
|
||||||
|
|
||||||
#Region "Machine Param"
|
#Region "Machine Param"
|
||||||
|
|
||||||
Public Property SafeZ As String
|
Public Property SafeZ As String
|
||||||
Get
|
Get
|
||||||
Return LenToString(CurrentMachine.dSafeZ, -2)
|
Return LenToString(CurrentMachine.dSafeZ, 2)
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
Dim dSafeZ As Double = 0
|
Dim dSafeZ As Double = 0
|
||||||
@@ -168,7 +195,7 @@ Public Class MachOptionWindowVM
|
|||||||
|
|
||||||
Public Property ShortCut As String
|
Public Property ShortCut As String
|
||||||
Get
|
Get
|
||||||
Return LenToString(CurrentMachine.dShortCut, -2)
|
Return LenToString(CurrentMachine.dShortCut, 2)
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
Dim dShortCut As Double = 0
|
Dim dShortCut As Double = 0
|
||||||
@@ -178,6 +205,16 @@ Public Class MachOptionWindowVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property MillingParam_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
If bWaterJet Then
|
||||||
|
Return Visibility.Hidden
|
||||||
|
Else
|
||||||
|
Return Visibility.Visible
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region ' Milling Param
|
#End Region ' Milling Param
|
||||||
|
|
||||||
#Region "Nesting Param"
|
#Region "Nesting Param"
|
||||||
@@ -215,12 +252,32 @@ Public Class MachOptionWindowVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Property Guillotine As Boolean
|
||||||
|
Get
|
||||||
|
Return CurrentMachine.bGuillotine
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
CurrentMachine.bGuillotine = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property GuillotineVisibility As Visibility
|
||||||
|
Get
|
||||||
|
If CurrentMachine.bAutomatic Then
|
||||||
|
Return Visibility.Visible
|
||||||
|
Else
|
||||||
|
Return Visibility.Collapsed
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Public Property Automatic As Boolean
|
Public Property Automatic As Boolean
|
||||||
Get
|
Get
|
||||||
Return CurrentMachine.bAutomatic
|
Return CurrentMachine.bAutomatic
|
||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
CurrentMachine.bAutomatic = value
|
CurrentMachine.bAutomatic = value
|
||||||
|
NotifyPropertyChanged("GuillotineVisibility")
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -228,7 +285,7 @@ Public Class MachOptionWindowVM
|
|||||||
|
|
||||||
Public Property AdditionalTable As String
|
Public Property AdditionalTable As String
|
||||||
Get
|
Get
|
||||||
Return LenToString(CurrentMachine.dAdditionalTable, -2)
|
Return LenToString(CurrentMachine.dAdditionalTable, 2)
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
Dim dAdditionalTable As Double = 0
|
Dim dAdditionalTable As Double = 0
|
||||||
@@ -297,22 +354,41 @@ Public Class MachOptionWindowVM
|
|||||||
Set(value As String)
|
Set(value As String)
|
||||||
m_NewMatName = value
|
m_NewMatName = value
|
||||||
' Verifico che il nome non sia vuoto
|
' Verifico che il nome non sia vuoto
|
||||||
If Not String.IsNullOrWhiteSpace(m_NewMatName) Then
|
AddNewMaterial()
|
||||||
' Verifico che il nome non sia già utilizzato
|
NotifyPropertyChanged("EnableOkNewMat")
|
||||||
Dim bNameExist As Boolean = False
|
End Set
|
||||||
For Each Material In CurrentMachine.Materials
|
End Property
|
||||||
If Material.sName = m_NewMatName Then
|
|
||||||
bNameExist = True
|
Private Function AddNewMaterial() As Boolean
|
||||||
Exit For
|
If Not String.IsNullOrWhiteSpace(m_NewMatName) Then
|
||||||
End If
|
' Verifico che il nome non sia già utilizzato
|
||||||
Next
|
Dim bNameExist As Boolean = False
|
||||||
If Not bNameExist Then
|
For Each Material In MaterialList
|
||||||
CurrentMachine.AddMaterial(New Material(m_NewMatName, CurrentMachine.Materials))
|
If Material.sName = m_NewMatName Then
|
||||||
|
bNameExist = True
|
||||||
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
Next
|
||||||
|
If Not bNameExist Then
|
||||||
|
'm_MaterialList.Add(m_NewMatName)
|
||||||
|
m_EnableOkNewMat = True
|
||||||
|
Return True
|
||||||
End If
|
End If
|
||||||
' Nascondo textbox per il nome
|
End If
|
||||||
NewMatName_Visibility = Visibility.Collapsed
|
' ' Nascondo textbox per il nome
|
||||||
m_NewMatName = String.Empty
|
' NewMatName_Visibility = Visibility.Collapsed
|
||||||
|
' m_NewMatName = String.Empty
|
||||||
|
m_EnableOkNewMat = False
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private m_EnableOkNewMat As Boolean = False
|
||||||
|
Public Property EnableOkNewMat As Boolean
|
||||||
|
Get
|
||||||
|
Return m_EnableOkNewMat
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_EnableOkNewMat = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -327,11 +403,19 @@ Public Class MachOptionWindowVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Materials_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return If(CurrentMachine.bWaterJet, Visibility.Collapsed, Visibility.Visible)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region ' Material
|
#End Region ' Material
|
||||||
|
|
||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
Private m_cmdNewMat As ICommand
|
Private m_cmdNewMat As ICommand
|
||||||
Private m_cmdRemoveMat As ICommand
|
Private m_cmdRemoveMat As ICommand
|
||||||
|
Private m_cmdOk As ICommand
|
||||||
|
Private m_cmdCanel As ICommand
|
||||||
|
|
||||||
#Region "Messages"
|
#Region "Messages"
|
||||||
|
|
||||||
@@ -412,7 +496,11 @@ Public Class MachOptionWindowVM
|
|||||||
End Property
|
End Property
|
||||||
Public ReadOnly Property MillingParamMsg As String
|
Public ReadOnly Property MillingParamMsg As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg(MSG_ALARMSPAGEUC + 29)
|
If bWaterJet Then
|
||||||
|
Return EgtMsg(91058)
|
||||||
|
Else
|
||||||
|
Return EgtMsg(MSG_ALARMSPAGEUC + 29)
|
||||||
|
End If
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Public ReadOnly Property CornerCutsMsg As String
|
Public ReadOnly Property CornerCutsMsg As String
|
||||||
@@ -445,6 +533,11 @@ Public Class MachOptionWindowVM
|
|||||||
Return EgtMsg(MSG_ALARMSPAGEUC + 32)
|
Return EgtMsg(MSG_ALARMSPAGEUC + 32)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
Public ReadOnly Property GuillotineMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(91066)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
Public ReadOnly Property AutomaticMsg As String
|
Public ReadOnly Property AutomaticMsg As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg(91059)
|
Return EgtMsg(91059)
|
||||||
@@ -475,6 +568,23 @@ Public Class MachOptionWindowVM
|
|||||||
Return EgtMsg(MSG_ALARMSPAGEUC + 35)
|
Return EgtMsg(MSG_ALARMSPAGEUC + 35)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
Public ReadOnly Property PreCutExitMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(91065)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property OkMsg As String
|
||||||
|
Get
|
||||||
|
Return "Ok"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CancelMsg As String
|
||||||
|
Get
|
||||||
|
Return "Cancel"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region ' Messages
|
#End Region ' Messages
|
||||||
|
|
||||||
@@ -516,7 +626,7 @@ Public Class MachOptionWindowVM
|
|||||||
SelectedDefaultSetUp = Nothing
|
SelectedDefaultSetUp = Nothing
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
NotifyPropertyChanged("PreCutExitVisibility")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
#End Region ' CONSTRUCTOR
|
||||||
@@ -577,6 +687,64 @@ Public Class MachOptionWindowVM
|
|||||||
|
|
||||||
#End Region ' RemoveMatCommand
|
#End Region ' RemoveMatCommand
|
||||||
|
|
||||||
|
#Region "OkCommand"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns a command that do Exec.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property OkCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdOk Is Nothing Then
|
||||||
|
m_cmdOk = New Command(AddressOf OkMat)
|
||||||
|
End If
|
||||||
|
Return m_cmdOk
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub OkMat(ByVal param As Object)
|
||||||
|
' aggiungo il materiale alla lista
|
||||||
|
Dim objNewMat As New Material(m_NewMatName, CurrentMachine.Materials)
|
||||||
|
If Not IsNothing(objNewMat) Then
|
||||||
|
CurrentMachine.Materials.Add(objNewMat)
|
||||||
|
End If
|
||||||
|
' Nascondo textbox per il nome
|
||||||
|
NewMatName_Visibility = Visibility.Collapsed
|
||||||
|
m_NewMatName = String.Empty
|
||||||
|
NotifyPropertyChanged("NewMatName")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' OkCommand
|
||||||
|
|
||||||
|
#Region "CancelCommand"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns a command that do Exec.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property CamcelCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdCanel Is Nothing Then
|
||||||
|
m_cmdCanel = New Command(AddressOf CancelMat)
|
||||||
|
End If
|
||||||
|
Return m_cmdCanel
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub CancelMat(ByVal param As Object)
|
||||||
|
' Nascondo textbox per il nome
|
||||||
|
NewMatName_Visibility = Visibility.Collapsed
|
||||||
|
m_NewMatName = String.Empty
|
||||||
|
NotifyPropertyChanged("NewMatName")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' CancelCommand
|
||||||
|
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -13,14 +13,17 @@
|
|||||||
Height="20" Width="150"/>-->
|
Height="20" Width="150"/>-->
|
||||||
|
|
||||||
<Button Command="{Binding ToolDbCommand}" ToolTip="{Binding ToolDBToolTip}"
|
<Button Command="{Binding ToolDbCommand}" ToolTip="{Binding ToolDBToolTip}"
|
||||||
Style="{StaticResource ToolBar_TextButton}" Width="55" Content="{Binding ToolDBMsg}"/>
|
Style="{StaticResource ToolBar_TextButton}" Width="70" Content="{Binding ToolDBMsg}"/>
|
||||||
<Button Command="{Binding MachDbCommand}" ToolTip="{Binding MachiningDbToolTip}"
|
<Button Command="{Binding MachDbCommand}" ToolTip="{Binding MachiningDbToolTip}"
|
||||||
Style="{StaticResource ToolBar_TextButton}" Width="55" Content="{Binding MachiningDbMsg}"/>
|
Style="{StaticResource ToolBar_TextButton}" Width="70" Content="{Binding MachiningDbMsg}"/>
|
||||||
<Button Command="{Binding SetUpCommand}" ToolTip="{Binding SetUpToolTip}"
|
<Button Command="{Binding SetUpCommand}" ToolTip="{Binding SetUpToolTip}"
|
||||||
Style="{StaticResource ToolBar_TextButton}" Width="55" Content="{Binding SetUpMsg}"
|
Style="{StaticResource ToolBar_TextButton}" Width="70" Content="{Binding SetUpMsg}"
|
||||||
Background="{Binding SetUp_Background}"/>
|
Background="{Binding SetUp_Background}"/>
|
||||||
|
<Button Command="{Binding WaterjetDbCommand}" ToolTip="{Binding WaterjetDbToolTip}"
|
||||||
|
Style="{StaticResource ToolBar_Button}" Width="70" Content="{Binding WaterjetDbMsg}" Visibility="{Binding WjDb_Visibility}"/>
|
||||||
<Button Command="{Binding MachOptionsCommand}" ToolTip="{Binding OptionsToolTip}">
|
<Button Command="{Binding MachOptionsCommand}" ToolTip="{Binding OptionsToolTip}">
|
||||||
<Image Source="/Resources/TopCommandBar/Options.png" Height="22" />
|
<Image Source="/Resources/TopCommandBar/Options.png" Height="22" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
|
||||||
</EgtFloating:EgtFloatingPanel>
|
</EgtFloating:EgtFloatingPanel>
|
||||||
|
|||||||
@@ -22,6 +22,12 @@ Public Class MyMachinePanelVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property WjDb_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return If(CurrentMachine.bWaterJet And CurrentMachine.bFromDBWaterJet, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
#Region "Messages"
|
#Region "Messages"
|
||||||
|
|
||||||
Public ReadOnly Property ToolDBMsg As String
|
Public ReadOnly Property ToolDBMsg As String
|
||||||
@@ -39,6 +45,11 @@ Public Class MyMachinePanelVM
|
|||||||
Return EgtMsg(MSG_ALARMSPAGEUC + 33)
|
Return EgtMsg(MSG_ALARMSPAGEUC + 33)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
Public ReadOnly Property WaterjetDbMsg As String
|
||||||
|
Get
|
||||||
|
Return "DB WaterJet" 'EgtMsg(MSG_MACHINEPAGEUC + 7)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region ' Messages
|
#End Region ' Messages
|
||||||
|
|
||||||
@@ -59,6 +70,11 @@ Public Class MyMachinePanelVM
|
|||||||
Return "SetUp"
|
Return "SetUp"
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
Public ReadOnly Property WaterjetDbToolTip As String
|
||||||
|
Get
|
||||||
|
Return "Waterjet DB"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region ' ToolTip
|
#End Region ' ToolTip
|
||||||
|
|
||||||
@@ -67,6 +83,7 @@ Public Class MyMachinePanelVM
|
|||||||
Private m_cmdMachDb As ICommand
|
Private m_cmdMachDb As ICommand
|
||||||
Private m_cmdSetUp As ICommand
|
Private m_cmdSetUp As ICommand
|
||||||
Private m_cmdMachOptions As ICommand
|
Private m_cmdMachOptions As ICommand
|
||||||
|
Private m_cmdWaterjetDb As ICommand
|
||||||
|
|
||||||
#End Region 'FIELDS & PROPERTIES
|
#End Region 'FIELDS & PROPERTIES
|
||||||
|
|
||||||
@@ -158,6 +175,14 @@ Public Class MyMachinePanelVM
|
|||||||
bOkSetUp = bOkSetUp And SetUpUtility.IsToolInSetUp(sTUUID)
|
bOkSetUp = bOkSetUp And SetUpUtility.IsToolInSetUp(sTUUID)
|
||||||
bOkMatThick = bOkMatThick And CurrMachWindowVM.VerifyMatThickCompatibility()
|
bOkMatThick = bOkMatThick And CurrMachWindowVM.VerifyMatThickCompatibility()
|
||||||
End If
|
End If
|
||||||
|
' Scasso
|
||||||
|
If Not String.IsNullOrWhiteSpace(CurrentMachine.sCurrPocketing) Then
|
||||||
|
EgtMdbSetCurrMachining(CurrentMachine.sCurrPocketing)
|
||||||
|
sTUUID = String.Empty
|
||||||
|
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTUUID)
|
||||||
|
bOkSetUp = bOkSetUp And SetUpUtility.IsToolInSetUp(sTUUID)
|
||||||
|
bOkMatThick = bOkMatThick And CurrMachWindowVM.VerifyMatThickCompatibility()
|
||||||
|
End If
|
||||||
' Foretto
|
' Foretto
|
||||||
If Not String.IsNullOrWhiteSpace(CurrentMachine.sCurrDrilling) Then
|
If Not String.IsNullOrWhiteSpace(CurrentMachine.sCurrDrilling) Then
|
||||||
EgtMdbSetCurrMachining(CurrentMachine.sCurrDrilling)
|
EgtMdbSetCurrMachining(CurrentMachine.sCurrDrilling)
|
||||||
@@ -252,6 +277,13 @@ Public Class MyMachinePanelVM
|
|||||||
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTUUID)
|
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTUUID)
|
||||||
bOk = bOk And SetUpUtility.IsToolInSetUp(sTUUID)
|
bOk = bOk And SetUpUtility.IsToolInSetUp(sTUUID)
|
||||||
End If
|
End If
|
||||||
|
' Scasso
|
||||||
|
If Not String.IsNullOrWhiteSpace(CurrentMachine.sCurrPocketing) Then
|
||||||
|
EgtMdbSetCurrMachining(CurrentMachine.sCurrPocketing)
|
||||||
|
sTUUID = String.Empty
|
||||||
|
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTUUID)
|
||||||
|
bOk = bOk And SetUpUtility.IsToolInSetUp(sTUUID)
|
||||||
|
End If
|
||||||
' Foretto
|
' Foretto
|
||||||
If Not String.IsNullOrWhiteSpace(CurrentMachine.sCurrDrilling) Then
|
If Not String.IsNullOrWhiteSpace(CurrentMachine.sCurrDrilling) Then
|
||||||
EgtMdbSetCurrMachining(CurrentMachine.sCurrDrilling)
|
EgtMdbSetCurrMachining(CurrentMachine.sCurrDrilling)
|
||||||
@@ -285,6 +317,33 @@ Public Class MyMachinePanelVM
|
|||||||
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#Region "WaterjetDbCommand"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns a command that do Exec.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property WaterjetDbCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdWaterjetDb Is Nothing Then
|
||||||
|
m_cmdWaterjetDb = New Command(AddressOf WaterjetDb)
|
||||||
|
End If
|
||||||
|
Return m_cmdWaterjetDb
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub WaterjetDb(ByVal param As Object)
|
||||||
|
Dim WaterjetDbWindow As New WaterjetDbWindowV(Application.Current.MainWindow, New WaterjetDbWindowVM(CurrentMachine.sMachDir))
|
||||||
|
WaterjetDbWindow.Height = 546
|
||||||
|
WaterjetDbWindow.Width = 846
|
||||||
|
WaterjetDbWindow.ShowDialog()
|
||||||
|
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' SpeedDbCommand
|
||||||
|
|
||||||
#End Region ' METHODS
|
#End Region ' METHODS
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -195,8 +195,8 @@ Public Class MainWindowM
|
|||||||
' Verifico abilitazione nesting automatico
|
' Verifico abilitazione nesting automatico
|
||||||
m_bAutoNestOption = Not String.IsNullOrWhiteSpace( sNestKey)
|
m_bAutoNestOption = Not String.IsNullOrWhiteSpace( sNestKey)
|
||||||
' Recupero livello e opzioni della chiave
|
' Recupero livello e opzioni della chiave
|
||||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2304, 1, m_nKeyLevel) And
|
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2401, 1, m_nKeyLevel) And
|
||||||
EgtGetKeyOptions(9423, 2304, 1, m_nKeyOptions)
|
EgtGetKeyOptions(9423, 2401, 1, m_nKeyOptions)
|
||||||
' Verifico abilitazione prodotto
|
' Verifico abilitazione prodotto
|
||||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.OFFICE_BASE)
|
Dim bProd As Boolean = GetKeyOption(KEY_OPT.OFFICE_BASE)
|
||||||
' Inizializzazione generale di EgtInterface
|
' Inizializzazione generale di EgtInterface
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ Imports System.Windows
|
|||||||
<Assembly: AssemblyDescription("OmagOFFICE 32 bit")>
|
<Assembly: AssemblyDescription("OmagOFFICE 32 bit")>
|
||||||
#End If
|
#End If
|
||||||
#End If
|
#End If
|
||||||
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
|
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||||
<Assembly: AssemblyProduct("OmagOFFICE")>
|
<Assembly: AssemblyProduct("OmagOFFICE")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2017-2021 by EgalTech s.r.l.")>
|
<Assembly: AssemblyCopyright("Copyright © 2017-2022 by Egalware s.r.l.")>
|
||||||
<Assembly: AssemblyTrademark("")>
|
<Assembly: AssemblyTrademark("")>
|
||||||
<Assembly: ComVisible(false)>
|
<Assembly: ComVisible(false)>
|
||||||
'In order to begin building localizable applications, set
|
'In order to begin building localizable applications, set
|
||||||
@@ -69,6 +69,6 @@ Imports System.Windows
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.3.4.3")>
|
<Assembly: AssemblyVersion("2.4.1.3")>
|
||||||
<Assembly: AssemblyFileVersion("2.3.4.3")>
|
<Assembly: AssemblyFileVersion("2.4.1.3")>
|
||||||
|
|
||||||
|
|||||||
@@ -254,7 +254,13 @@ Public Class MySceneHostVM
|
|||||||
sSlabName = Regex.Replace(sSlabName, "[~`!@#$%^&*()-+=|{}':;.,<>/\\?]", "_")
|
sSlabName = Regex.Replace(sSlabName, "[~`!@#$%^&*()-+=|{}':;.,<>/\\?]", "_")
|
||||||
End If
|
End If
|
||||||
' Creo path del file di salvataggio
|
' Creo path del file di salvataggio
|
||||||
Dim sFileDest As String = sDirDest & "\" & Path.GetFileNameWithoutExtension(sFilePath) & "_" & If(String.IsNullOrEmpty(sSlabName), sMchGrp, sSlabName) & ".nge"
|
Dim nSelectTypeExport As Integer = GetMainPrivateProfileInt(S_GENERAL, "TypeExportName", 0)
|
||||||
|
Dim sFileDest As String = String.Empty
|
||||||
|
If nSelectTypeExport <> 0 Then
|
||||||
|
sFileDest = sDirDest & "\" & If(String.IsNullOrEmpty(sSlabName), sMchGrp, sSlabName) & ".nge"
|
||||||
|
Else
|
||||||
|
sFileDest = sDirDest & "\" & Path.GetFileNameWithoutExtension(sFilePath) & "_" & If(String.IsNullOrEmpty(sSlabName), sMchGrp, sSlabName) & ".nge"
|
||||||
|
End If
|
||||||
' Verifico se al gruppo è associata una foto
|
' Verifico se al gruppo è associata una foto
|
||||||
Dim nPhotoId As Integer = EgtGetFirstNameInGroup(EgtGetFirstNameInGroup(GDB_ID.ROOT, PHOTO_GRP), PHOTO_NAME & sMchGrp)
|
Dim nPhotoId As Integer = EgtGetFirstNameInGroup(EgtGetFirstNameInGroup(GDB_ID.ROOT, PHOTO_GRP), PHOTO_NAME & sMchGrp)
|
||||||
' Elimino le altre fotografie
|
' Elimino le altre fotografie
|
||||||
@@ -279,6 +285,7 @@ Public Class MySceneHostVM
|
|||||||
EgtOutLog( "Slab image not found :" & sOriPath)
|
EgtOutLog( "Slab image not found :" & sOriPath)
|
||||||
End Try
|
End Try
|
||||||
EgtSetName(nPhotoId, PHOTO_NAME)
|
EgtSetName(nPhotoId, PHOTO_NAME)
|
||||||
|
EgtChangePhotoCenterAsFlatScan( nPhotoId)
|
||||||
End If
|
End If
|
||||||
' Elimino gli altri gruppi di lavorazioni
|
' Elimino gli altri gruppi di lavorazioni
|
||||||
For Each nMGrpId As Integer In vMchGrps
|
For Each nMGrpId As Integer In vMchGrps
|
||||||
@@ -737,6 +744,7 @@ Public Class MySceneHostVM
|
|||||||
Case OptionPanelVM.Tabs.NESTING
|
Case OptionPanelVM.Tabs.NESTING
|
||||||
OmagOFFICEMap.refNestingTabVM.OnMouseMoveScene(sender, e)
|
OmagOFFICEMap.refNestingTabVM.OnMouseMoveScene(sender, e)
|
||||||
Case OptionPanelVM.Tabs.MACHINING
|
Case OptionPanelVM.Tabs.MACHINING
|
||||||
|
OmagOFFICEMap.refSplitModeVM.OnMyMouseMoveScene(sender, e)
|
||||||
Case OptionPanelVM.Tabs.SIMUL
|
Case OptionPanelVM.Tabs.SIMUL
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
@@ -749,6 +757,7 @@ Public Class MySceneHostVM
|
|||||||
Case OptionPanelVM.Tabs.NESTING
|
Case OptionPanelVM.Tabs.NESTING
|
||||||
OmagOFFICEMap.refNestingTabVM.OnMouseUpScene(sender, e)
|
OmagOFFICEMap.refNestingTabVM.OnMouseUpScene(sender, e)
|
||||||
Case OptionPanelVM.Tabs.MACHINING
|
Case OptionPanelVM.Tabs.MACHINING
|
||||||
|
OmagOFFICEMap.refSplitModeVM.OnMyMouseUpScene(sender, e)
|
||||||
Case OptionPanelVM.Tabs.SIMUL
|
Case OptionPanelVM.Tabs.SIMUL
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Public Class MySetUpWindowVM
|
|||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
Sub New(sMachineDir As String, sMachineName As String)
|
Sub New(sMachineDir As String, sMachineName As String)
|
||||||
MyBase.New(sMachineDir, sMachineName)
|
MyBase.New(sMachineDir, sMachineName, "Stone")
|
||||||
End Sub
|
End Sub
|
||||||
#End Region ' CONSTRUCTOR
|
#End Region ' CONSTRUCTOR
|
||||||
|
|
||||||
@@ -36,6 +36,13 @@ Public Class MySetUpWindowVM
|
|||||||
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTuuid)
|
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTuuid)
|
||||||
UsedToolList.Add(sTuuid)
|
UsedToolList.Add(sTuuid)
|
||||||
End If
|
End If
|
||||||
|
' Scasso
|
||||||
|
If Not String.IsNullOrWhiteSpace(CurrentMachine.sCurrPocketing) Then
|
||||||
|
EgtMdbSetCurrMachining(CurrentMachine.sCurrPocketing)
|
||||||
|
sTuuid = String.Empty
|
||||||
|
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTuuid)
|
||||||
|
UsedToolList.Add(sTuuid)
|
||||||
|
End If
|
||||||
' Waterjet
|
' Waterjet
|
||||||
If Not String.IsNullOrWhiteSpace(CurrentMachine.sCurrWaterJetting) Then
|
If Not String.IsNullOrWhiteSpace(CurrentMachine.sCurrWaterJetting) Then
|
||||||
EgtMdbSetCurrMachining(CurrentMachine.sCurrWaterJetting)
|
EgtMdbSetCurrMachining(CurrentMachine.sCurrWaterJetting)
|
||||||
|
|||||||
@@ -71,8 +71,9 @@
|
|||||||
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"/>
|
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
|
<!--Elenco degli utensili-->
|
||||||
<TreeView Name="ToolsTreeView" Grid.Row="1"
|
<TreeView Name="ToolsTreeView" Grid.Row="1"
|
||||||
ItemsSource="{Binding ToolsList}">
|
ItemsSource="{Binding ToolsList}">
|
||||||
|
|
||||||
<TreeView.ItemContainerStyle>
|
<TreeView.ItemContainerStyle>
|
||||||
<Style TargetType="{x:Type TreeViewItem}">
|
<Style TargetType="{x:Type TreeViewItem}">
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ Public Class MyToolDbWindowVM
|
|||||||
EgtTdbSetCurrToolParam(MCH_TP.THICK, 5.0)
|
EgtTdbSetCurrToolParam(MCH_TP.THICK, 5.0)
|
||||||
EgtTdbSetCurrToolParam(MCH_TP.MAXMAT, 40.0)
|
EgtTdbSetCurrToolParam(MCH_TP.MAXMAT, 40.0)
|
||||||
ElseIf (nType And MCH_TF.MILL) <> 0 Then
|
ElseIf (nType And MCH_TF.MILL) <> 0 Then
|
||||||
|
' devo distinguere i casi di MILL_STD e MILL_NO_TIP
|
||||||
EgtTdbSetCurrToolParam(MCH_TP.LEN, 80.0)
|
EgtTdbSetCurrToolParam(MCH_TP.LEN, 80.0)
|
||||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, 80.0)
|
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, 80.0)
|
||||||
EgtTdbSetCurrToolParam(MCH_TP.DIAM, 20.0)
|
EgtTdbSetCurrToolParam(MCH_TP.DIAM, 20.0)
|
||||||
|
|||||||
@@ -151,6 +151,10 @@
|
|||||||
<Compile Include="AboutBoxWindow\AboutBoxV.xaml.vb">
|
<Compile Include="AboutBoxWindow\AboutBoxV.xaml.vb">
|
||||||
<DependentUpon>AboutBoxV.xaml</DependentUpon>
|
<DependentUpon>AboutBoxV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="AlzAndFront\AlzAndFront.xaml.vb">
|
||||||
|
<DependentUpon>AlzAndFront.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="AlzAndFront\AlzAndFront.vb" />
|
||||||
<Compile Include="CompoCsvTrfDataWindow\CompoCsvDataWindowV.xaml.vb">
|
<Compile Include="CompoCsvTrfDataWindow\CompoCsvDataWindowV.xaml.vb">
|
||||||
<DependentUpon>CompoCsvDataWindowV.xaml</DependentUpon>
|
<DependentUpon>CompoCsvDataWindowV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -333,6 +337,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="AlzAndFront\AlzAndFront.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
<Page Include="CompoCsvTrfDataWindow\CompoCsvDataWindowV.xaml">
|
<Page Include="CompoCsvTrfDataWindow\CompoCsvDataWindowV.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
|
|||||||
@@ -322,6 +322,8 @@ Public Class MachiningTabVM
|
|||||||
Friend Sub OnMouseDownScene(sender As Object, e As Windows.Forms.MouseEventArgs)
|
Friend Sub OnMouseDownScene(sender As Object, e As Windows.Forms.MouseEventArgs)
|
||||||
If m_MachiningMode = MachiningModeOpt.MOVERAWPART Then
|
If m_MachiningMode = MachiningModeOpt.MOVERAWPART Then
|
||||||
OmagOFFICEMap.refMoveRawModeVM.OnMouseDownScene(sender, e)
|
OmagOFFICEMap.refMoveRawModeVM.OnMouseDownScene(sender, e)
|
||||||
|
ElseIf m_MachiningMode = MachiningModeOpt.SPLIT Then
|
||||||
|
OmagOFFICEMap.refSplitModeVM.OnMouseDownScene(sender, e)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -71,14 +71,17 @@
|
|||||||
<Button Content="{Binding CutMsg}"
|
<Button Content="{Binding CutMsg}"
|
||||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||||
Command="{Binding CutCommand}"
|
Command="{Binding CutCommand}"
|
||||||
|
Visibility="{Binding CutBtnVisibility}"
|
||||||
Margin="0,0,2.5,0"/>
|
Margin="0,0,2.5,0"/>
|
||||||
<Button Content="{Binding CutStartMsg}"
|
<Button Content="{Binding CutStartMsg}"
|
||||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||||
Command="{Binding CutStartCommand}"
|
Command="{Binding CutStartCommand}"
|
||||||
|
Visibility="{Binding CutStartBtnVisibility}"
|
||||||
Margin="2.5,0,2.5,0"/>
|
Margin="2.5,0,2.5,0"/>
|
||||||
<Button Content="{Binding CutEndMsg}"
|
<Button Content="{Binding CutEndMsg}"
|
||||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||||
Command="{Binding CutEndCommand}"
|
Command="{Binding CutEndCommand}"
|
||||||
|
Visibility="{Binding CutEndBtnVisibility}"
|
||||||
Margin="2.5,0,0,0"/>
|
Margin="2.5,0,0,0"/>
|
||||||
|
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
@@ -94,10 +97,12 @@
|
|||||||
<Button Content="{Binding AllExtendMsg}" Grid.Column="1"
|
<Button Content="{Binding AllExtendMsg}" Grid.Column="1"
|
||||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||||
Command="{Binding AllExtendCommand}"
|
Command="{Binding AllExtendCommand}"
|
||||||
|
Visibility="{Binding AllExtendBtnVisibility}"
|
||||||
Margin="0,0,2.5,0"/>
|
Margin="0,0,2.5,0"/>
|
||||||
<Button Content="{Binding AllReduceMsg}" Grid.Column="2"
|
<Button Content="{Binding AllReduceMsg}" Grid.Column="2"
|
||||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||||
Command="{Binding AllReduceCommand}"
|
Command="{Binding AllReduceCommand}"
|
||||||
|
Visibility="{Binding AllReduceBtnVisibility}"
|
||||||
Margin="2.5,0,0,0"/>
|
Margin="2.5,0,0,0"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -115,14 +120,17 @@
|
|||||||
<Button Content="{Binding OutCenStartMsg}"
|
<Button Content="{Binding OutCenStartMsg}"
|
||||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||||
Command="{Binding OutCenStartCommand}"
|
Command="{Binding OutCenStartCommand}"
|
||||||
|
Visibility="{Binding OutCenStartBtnVisibility}"
|
||||||
Margin="0,0,2.5,0" Padding="0"/>
|
Margin="0,0,2.5,0" Padding="0"/>
|
||||||
<Button Content="{Binding AllOutStartMsg}"
|
<Button Content="{Binding AllOutStartMsg}"
|
||||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||||
Command="{Binding AllOutStartCommand}"
|
Command="{Binding AllOutStartCommand}"
|
||||||
|
Visibility="{Binding AllOutStartBtnVisibility}"
|
||||||
Margin="2.5,0,2.5,0"/>
|
Margin="2.5,0,2.5,0"/>
|
||||||
<Button Content="{Binding AllCenStartMsg}"
|
<Button Content="{Binding AllCenStartMsg}"
|
||||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||||
Command="{Binding AllCenStartCommand}"
|
Command="{Binding AllCenStartCommand}"
|
||||||
|
Visibility="{Binding AllCenStartBtnVisibility}"
|
||||||
Margin="2.5,0,0,0"/>
|
Margin="2.5,0,0,0"/>
|
||||||
|
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
@@ -132,14 +140,17 @@
|
|||||||
<Button Content="{Binding OutCenEndMsg}"
|
<Button Content="{Binding OutCenEndMsg}"
|
||||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||||
Command="{Binding OutCenEndCommand}"
|
Command="{Binding OutCenEndCommand}"
|
||||||
|
Visibility="{Binding OutCenEndBtnVisibility}"
|
||||||
Margin="0,0,2.5,0" Padding="0"/>
|
Margin="0,0,2.5,0" Padding="0"/>
|
||||||
<Button Content="{Binding AllOutEndMsg}"
|
<Button Content="{Binding AllOutEndMsg}"
|
||||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||||
Command="{Binding AllOutEndCommand}"
|
Command="{Binding AllOutEndCommand}"
|
||||||
|
Visibility="{Binding AllOutEndBtnVisibility}"
|
||||||
Margin="2.5,0,2.5,0"/>
|
Margin="2.5,0,2.5,0"/>
|
||||||
<Button Content="{Binding AllCenEndMsg}"
|
<Button Content="{Binding AllCenEndMsg}"
|
||||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||||
Command="{Binding AllCenEndCommand}"
|
Command="{Binding AllCenEndCommand}"
|
||||||
|
Visibility="{Binding AllCenEndBtnVisibility}"
|
||||||
Margin="2.5,0,0,0"/>
|
Margin="2.5,0,0,0"/>
|
||||||
|
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
@@ -159,6 +170,7 @@
|
|||||||
<Button Content="{Binding PauseMsg}" Grid.Column="2"
|
<Button Content="{Binding PauseMsg}" Grid.Column="2"
|
||||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||||
Command="{Binding PauseCommand}"
|
Command="{Binding PauseCommand}"
|
||||||
|
Visibility="{Binding PauseBtnVisibility}"
|
||||||
Margin="2.5,0,2.5,0"/>
|
Margin="2.5,0,2.5,0"/>
|
||||||
|
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
@@ -174,6 +186,7 @@
|
|||||||
<Button Content="{Binding InvertMsg}" Grid.Column="0"
|
<Button Content="{Binding InvertMsg}" Grid.Column="0"
|
||||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||||
Command="{Binding InvertCommand}"
|
Command="{Binding InvertCommand}"
|
||||||
|
Visibility="{Binding InvertBtnVisibility}"
|
||||||
Margin="2.5,0,2.5,0"/>
|
Margin="2.5,0,2.5,0"/>
|
||||||
|
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|||||||
@@ -16,6 +16,25 @@ Public Class SplitModeVM
|
|||||||
Private m_CurrLastInd As Integer = -1
|
Private m_CurrLastInd As Integer = -1
|
||||||
Private m_SelectedItemsList As New ObservableCollection(Of NameIdLsBxItem)
|
Private m_SelectedItemsList As New ObservableCollection(Of NameIdLsBxItem)
|
||||||
|
|
||||||
|
' numero di lavorazioni di tipo lama
|
||||||
|
Private m_nCountSawing As Integer = 0
|
||||||
|
' numero di lavprazioni di tipo waterjet
|
||||||
|
Private m_nCountWaterjetting As Integer = 0
|
||||||
|
' altri tipi di lavorazioni (Foro/Fresa)
|
||||||
|
Private m_nCountOtherMachining As Integer = 0
|
||||||
|
' verifico che le lavorazioni selezionate siano omogenee (con lo stesso utensile)
|
||||||
|
Private m_bAreHomogeneous As Boolean = False
|
||||||
|
|
||||||
|
' Flag di pagina attiva
|
||||||
|
Private m_bActive As Boolean = False
|
||||||
|
' Drag
|
||||||
|
Private m_nDragInd As Integer = -1
|
||||||
|
Private m_nDragType As Integer = 0 '0=niente, 1=attacco, 2=uscita
|
||||||
|
Private m_ptDragPrev As Point3d
|
||||||
|
Private m_bDragging As Boolean = False
|
||||||
|
' Selected cut
|
||||||
|
Private m_nSelected As Integer = GDB_ID.NULL
|
||||||
|
|
||||||
Private m_ItemList As New ObservableCollection(Of NameIdLsBxItem)
|
Private m_ItemList As New ObservableCollection(Of NameIdLsBxItem)
|
||||||
Public ReadOnly Property ItemList As ObservableCollection(Of NameIdLsBxItem)
|
Public ReadOnly Property ItemList As ObservableCollection(Of NameIdLsBxItem)
|
||||||
Get
|
Get
|
||||||
@@ -45,6 +64,149 @@ Public Class SplitModeVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_CutBtnVisibility As Visibility
|
||||||
|
Public Property CutBtnVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_CutBtnVisibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_CutBtnVisibility = value
|
||||||
|
NotifyPropertyChanged(NameOf(CutBtnVisibility))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_CutStartBtnVisibility As Visibility
|
||||||
|
Public Property CutStartBtnVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_CutStartBtnVisibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_CutStartBtnVisibility = value
|
||||||
|
NotifyPropertyChanged(NameOf(CutStartBtnVisibility))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_CutEndBtnVisibility As Visibility
|
||||||
|
Public Property CutEndBtnVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_CutEndBtnVisibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_CutEndBtnVisibility = value
|
||||||
|
NotifyPropertyChanged(NameOf(CutEndBtnVisibility))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_OutCenStartBtnVisibility As Visibility
|
||||||
|
Public Property OutCenStartBtnVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_OutCenStartBtnVisibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_OutCenStartBtnVisibility = value
|
||||||
|
NotifyPropertyChanged(NameOf(OutCenStartBtnVisibility))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_OutCenEndBtnVisibility As Visibility
|
||||||
|
Public Property OutCenEndBtnVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_OutCenEndBtnVisibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_OutCenEndBtnVisibility = value
|
||||||
|
NotifyPropertyChanged(NameOf(OutCenEndBtnVisibility))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_InvertBtnVisibility As Visibility
|
||||||
|
Public Property InvertBtnVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_InvertBtnVisibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_InvertBtnVisibility = value
|
||||||
|
NotifyPropertyChanged(NameOf(InvertBtnVisibility))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_PauseBtnVisibility As Visibility
|
||||||
|
Public Property PauseBtnVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_PauseBtnVisibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_PauseBtnVisibility = value
|
||||||
|
NotifyPropertyChanged(NameOf(PauseBtnVisibility))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_AllOutStartBtnVisibility As Visibility
|
||||||
|
Public Property AllOutStartBtnVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_AllOutStartBtnVisibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_AllOutStartBtnVisibility = value
|
||||||
|
NotifyPropertyChanged(NameOf(AllOutStartBtnVisibility))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_AllCenStartBtnVisibility As Visibility
|
||||||
|
Public Property AllCenStartBtnVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_AllCenStartBtnVisibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_AllCenStartBtnVisibility = value
|
||||||
|
NotifyPropertyChanged(NameOf(AllCenStartBtnVisibility))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_AllOutEndBtnVisibility As Visibility
|
||||||
|
Public Property AllOutEndBtnVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_AllOutEndBtnVisibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_AllOutEndBtnVisibility = value
|
||||||
|
NotifyPropertyChanged(NameOf(AllOutEndBtnVisibility))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_AllCenEndBtnVisibility As Visibility
|
||||||
|
Public Property AllCenEndBtnVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_AllCenEndBtnVisibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_AllCenEndBtnVisibility = value
|
||||||
|
NotifyPropertyChanged(NameOf(AllCenEndBtnVisibility))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_AllExtendBtnVisibility As Visibility
|
||||||
|
Public Property AllExtendBtnVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_AllExtendBtnVisibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_AllExtendBtnVisibility = value
|
||||||
|
NotifyPropertyChanged(NameOf(AllExtendBtnVisibility))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_AllReduceBtnVisibility As Visibility
|
||||||
|
Public Property AllReduceBtnVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_AllReduceBtnVisibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_AllReduceBtnVisibility = value
|
||||||
|
NotifyPropertyChanged(NameOf(AllReduceBtnVisibility))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
#Region "Messages"
|
#Region "Messages"
|
||||||
|
|
||||||
Public ReadOnly Property OnOffMsg As String
|
Public ReadOnly Property OnOffMsg As String
|
||||||
@@ -193,6 +355,10 @@ Public Class SplitModeVM
|
|||||||
#Region "METHODS"
|
#Region "METHODS"
|
||||||
|
|
||||||
Friend Function InitSplitRaw() As Boolean
|
Friend Function InitSplitRaw() As Boolean
|
||||||
|
m_bActive = True
|
||||||
|
'm_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||||
|
m_nDragInd = -1
|
||||||
|
m_nDragType = 0
|
||||||
' Nascondo eventuali pezzi in parcheggio
|
' Nascondo eventuali pezzi in parcheggio
|
||||||
EstCalc.HideParkedParts()
|
EstCalc.HideParkedParts()
|
||||||
' Nascondo eventuale contorno da foto
|
' Nascondo eventuale contorno da foto
|
||||||
@@ -201,11 +367,13 @@ Public Class SplitModeVM
|
|||||||
EgtDeselectAll()
|
EgtDeselectAll()
|
||||||
VeinMatching.OnDeselectAll()
|
VeinMatching.OnDeselectAll()
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
|
' Elimino eventuali pretagli su uscite
|
||||||
|
CamAuto.RemoveAllExitPreCuts()
|
||||||
' Se non sono in sola visualizzazione, faccio ordine automatico delle lavorazioni
|
' Se non sono in sola visualizzazione, faccio ordine automatico delle lavorazioni
|
||||||
If Not OmagOFFICEMap.refMachiningTabVM.IsShow Then
|
If Not OmagOFFICEMap.refMachiningTabVM.IsShow Then
|
||||||
If CurrentMachine.WaterJettingActive Then ResetAllMachinings()
|
If CurrentMachine.WaterJettingActive Then ResetAllMachinings()
|
||||||
If SortAllMachinings() Then EstCalc.SetOrderMachiningFlag()
|
If SortAllMachinings() Then EstCalc.SetOrderMachiningFlag()
|
||||||
If CurrentMachine.WaterJettingActive Then
|
If CurrentMachine.WaterJettingActive Then
|
||||||
Dim bModif As Boolean = TestAllMachiningsForStrict()
|
Dim bModif As Boolean = TestAllMachiningsForStrict()
|
||||||
If bModif Then OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(90321), 3, MSG_TYPE.WARNING) 'Ridotte alcune lavorazioni per evitare interferenze
|
If bModif Then OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(90321), 3, MSG_TYPE.WARNING) 'Ridotte alcune lavorazioni per evitare interferenze
|
||||||
End If
|
End If
|
||||||
@@ -223,12 +391,18 @@ Public Class SplitModeVM
|
|||||||
ShowOnePhaseMachiningPreview(m_nCurrPhase)
|
ShowOnePhaseMachiningPreview(m_nCurrPhase)
|
||||||
' Preparo la lista delle lavorazioni
|
' Preparo la lista delle lavorazioni
|
||||||
CalculateSplitMachList(m_nCurrPhase, m_MachiningList)
|
CalculateSplitMachList(m_nCurrPhase, m_MachiningList)
|
||||||
|
' azzero i contatori delle lavorazioni
|
||||||
|
m_nCountSawing = 0
|
||||||
|
m_nCountWaterjetting = 0
|
||||||
|
m_nCountOtherMachining = 0
|
||||||
' Aggiorno visualizzazione delle lavorazioni
|
' Aggiorno visualizzazione delle lavorazioni
|
||||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||||
' sistemo colore
|
' sistemo colore
|
||||||
ColorMachining(m_MachiningList(nI))
|
ColorMachining(m_MachiningList(nI))
|
||||||
' assegno numerazione
|
' assegno numerazione
|
||||||
NumberDirectionMachining(nI)
|
NumberDirectionMachining(nI)
|
||||||
|
' conto il numero di tipi di lavorazioni
|
||||||
|
CountMachiningType(m_MachiningList(nI), m_nCountSawing, m_nCountWaterjetting, m_nCountOtherMachining)
|
||||||
Next
|
Next
|
||||||
' Preparo la lista degli Item
|
' Preparo la lista degli Item
|
||||||
ShowMachiningList()
|
ShowMachiningList()
|
||||||
@@ -247,6 +421,7 @@ Public Class SplitModeVM
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function ExitSplitRaw(Optional bTrueExit As Boolean = True) As Boolean
|
Friend Function ExitSplitRaw(Optional bTrueExit As Boolean = True) As Boolean
|
||||||
|
m_bActive = False
|
||||||
' Rimuovo evidenziazione e numeri
|
' Rimuovo evidenziazione e numeri
|
||||||
RemoveMarkAndNumbers()
|
RemoveMarkAndNumbers()
|
||||||
' Ripristino colori lavorazioni
|
' Ripristino colori lavorazioni
|
||||||
@@ -392,8 +567,14 @@ Public Class SplitModeVM
|
|||||||
HideAllMachinings()
|
HideAllMachinings()
|
||||||
' Preparo la lista delle lavorazioni e le disabilito
|
' Preparo la lista delle lavorazioni e le disabilito
|
||||||
CalculateSplitMachList(m_nCurrPhase, m_MachiningList)
|
CalculateSplitMachList(m_nCurrPhase, m_MachiningList)
|
||||||
|
' azzero i contatori delle lavorazioni
|
||||||
|
m_nCountSawing = 0
|
||||||
|
m_nCountWaterjetting = 0
|
||||||
|
m_nCountOtherMachining = 0
|
||||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||||
m_MachiningList(nI).m_bEnabled = False
|
m_MachiningList(nI).m_bEnabled = False
|
||||||
|
' conto il numero di tipi di lavorazioni
|
||||||
|
CountMachiningType(m_MachiningList(nI), m_nCountSawing, m_nCountWaterjetting, m_nCountOtherMachining)
|
||||||
Next
|
Next
|
||||||
' Aggiorno visualizzazione delle lavorazioni
|
' Aggiorno visualizzazione delle lavorazioni
|
||||||
EgtEmptyGroup(m_nNbrGrpId)
|
EgtEmptyGroup(m_nNbrGrpId)
|
||||||
@@ -419,24 +600,28 @@ Public Class SplitModeVM
|
|||||||
Dim sText As String = String.Empty
|
Dim sText As String = String.Empty
|
||||||
If Math.Abs(Mach.m_dSideAng) < EPS_ANG_SMALL Then
|
If Math.Abs(Mach.m_dSideAng) < EPS_ANG_SMALL Then
|
||||||
sText = EgtMsg(90791) & " " & i.ToString()
|
sText = EgtMsg(90791) & " " & i.ToString()
|
||||||
If Mach.m_sLay = NAME_ONPATH Then AddTopText( sText)
|
If Mach.m_sLay = NAME_ONPATH Then AddTopText(sText)
|
||||||
Else
|
Else
|
||||||
sText = EgtMsg(90791) & " " & i.ToString() & " " & DoubleToString(Mach.m_dSideAng, 2) & "°"
|
sText = EgtMsg(90791) & " " & i.ToString() & " " & DoubleToString(Mach.m_dSideAng, 2) & "°"
|
||||||
End If
|
End If
|
||||||
If Mach.m_bPause Then AddPauseText(sText)
|
If Mach.m_bPause Then AddPauseText(sText)
|
||||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.SAWING))
|
||||||
ElseIf Mach.m_nType = MCH_OY.DRILLING Then ' Foratura
|
ElseIf Mach.m_nType = MCH_OY.DRILLING Then ' Foratura
|
||||||
Dim sText As String = EgtMsg(90792) & " " & i.ToString()
|
Dim sText As String = EgtMsg(90792) & " " & i.ToString()
|
||||||
If Mach.m_bPause Then AddPauseText(sText)
|
If Mach.m_bPause Then AddPauseText(sText)
|
||||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.DRILLING))
|
||||||
ElseIf Mach.m_nType = MCH_OY.MILLING Then ' Fresatura
|
ElseIf Mach.m_nType = MCH_OY.MILLING Then ' Fresatura
|
||||||
Dim sText As String = EgtMsg(90793) & " " & i.ToString()
|
Dim sText As String = EgtMsg(90793) & " " & i.ToString()
|
||||||
If Mach.m_sLay = NAME_ONPATH Then AddTopText( sText)
|
If Mach.m_sLay = NAME_ONPATH Then AddTopText(sText)
|
||||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.MILLING))
|
||||||
|
ElseIf Mach.m_nType = MCH_OY.POCKETING Then ' Svuotatura
|
||||||
|
Dim sText As String = EgtMsg(90796) & " " & i.ToString()
|
||||||
|
If Mach.m_bPause Then AddPauseText(sText)
|
||||||
|
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.POCKETING))
|
||||||
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then ' Waterjet
|
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then ' Waterjet
|
||||||
Dim sText As String = EgtMsg(90797) & " " & i.ToString()
|
Dim sText As String = EgtMsg(90797) & " " & i.ToString()
|
||||||
If Mach.m_bPause Then AddPauseText(sText)
|
If Mach.m_bPause Then AddPauseText(sText)
|
||||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.WATERJETTING))
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
@@ -476,6 +661,87 @@ Public Class SplitModeVM
|
|||||||
Not OmagOFFICEMap.refMachiningTabVM.ByHand)
|
Not OmagOFFICEMap.refMachiningTabVM.ByHand)
|
||||||
' Altri bottoni
|
' Altri bottoni
|
||||||
SplitModeIsEnabled = Not OmagOFFICEMap.refMachiningTabVM.IsShow
|
SplitModeIsEnabled = Not OmagOFFICEMap.refMachiningTabVM.IsShow
|
||||||
|
|
||||||
|
' nascondo i comandi che non devono essere visualizzati in funzione delle lavorazioni attive
|
||||||
|
If m_nCountSawing = 0 And (m_nCountWaterjetting > 0 Or m_nCountOtherMachining > 0) Then
|
||||||
|
VisibilityButtonFromMachining(MCH_OY.WATERJETTING)
|
||||||
|
Else
|
||||||
|
VisibilityButtonFromMachining(MCH_OY.SAWING)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub VerifyHomogenousMachining(ItemList As List(Of NameIdLsBxItem))
|
||||||
|
If IsNothing(ItemList) OrElse ItemList.Count = 0 Then
|
||||||
|
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
Dim nSawing As Integer = 0
|
||||||
|
Dim nWaterjetting As Integer = 0
|
||||||
|
Dim nOtherMachining As Integer = 0
|
||||||
|
' conto il numero di tipi di lavprazioni
|
||||||
|
For Each Item As NameIdLsBxItem In ItemList
|
||||||
|
If Item.Type = MCH_OY.SAWING Then
|
||||||
|
nSawing += 1
|
||||||
|
ElseIf Item.Type = MCH_OY.WATERJETTING Then
|
||||||
|
nWaterjetting += 1
|
||||||
|
Else
|
||||||
|
nOtherMachining += 1
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' verifico se le lavorazioni sono omeogenee
|
||||||
|
If nSawing > 0 And (nWaterjetting > 0 Or nOtherMachining > 0) Then
|
||||||
|
m_bAreHomogeneous = False
|
||||||
|
VisibilityButtonFromMachining(MCH_OY.SAWING)
|
||||||
|
ElseIf nSawing = 0 And nOtherMachining > 0 And nWaterjetting > 0 Then
|
||||||
|
m_bAreHomogeneous = False
|
||||||
|
VisibilityButtonFromMachining(MCH_OY.WATERJETTING)
|
||||||
|
Else
|
||||||
|
VisibilityButtonFromMachining(ItemList(0).Type)
|
||||||
|
m_bAreHomogeneous = True
|
||||||
|
End If
|
||||||
|
' eventualmente stampo messaggio
|
||||||
|
If Not m_bAreHomogeneous Then
|
||||||
|
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||||
|
OmagOFFICEMap.refStatusBarVM.SetOutputMessage("Lavorazioni non omogenee", MSG_TYPE.WARNING)
|
||||||
|
Else
|
||||||
|
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub VisibilityButtonFromMachining(ByVal Type As Integer)
|
||||||
|
If Type <> MCH_OY.SAWING Then
|
||||||
|
CutBtnVisibility = Visibility.Hidden
|
||||||
|
CutStartBtnVisibility = Visibility.Hidden
|
||||||
|
CutEndBtnVisibility = Visibility.Hidden
|
||||||
|
|
||||||
|
OutCenStartBtnVisibility = Visibility.Hidden
|
||||||
|
OutCenEndBtnVisibility = Visibility.Hidden
|
||||||
|
InvertBtnVisibility = Visibility.Hidden
|
||||||
|
PauseBtnVisibility = Visibility.Hidden
|
||||||
|
AllOutStartBtnVisibility = Visibility.Hidden
|
||||||
|
AllCenStartBtnVisibility = Visibility.Hidden
|
||||||
|
AllOutEndBtnVisibility = Visibility.Hidden
|
||||||
|
AllCenEndBtnVisibility = Visibility.Hidden
|
||||||
|
AllExtendBtnVisibility = Visibility.Hidden
|
||||||
|
AllReduceBtnVisibility = Visibility.Hidden
|
||||||
|
Else
|
||||||
|
CutBtnVisibility = Visibility.Visible
|
||||||
|
CutStartBtnVisibility = Visibility.Visible
|
||||||
|
CutEndBtnVisibility = Visibility.Visible
|
||||||
|
|
||||||
|
OutCenStartBtnVisibility = Visibility.Visible
|
||||||
|
OutCenEndBtnVisibility = Visibility.Visible
|
||||||
|
InvertBtnVisibility = Visibility.Visible
|
||||||
|
PauseBtnVisibility = Visibility.Visible
|
||||||
|
AllOutStartBtnVisibility = Visibility.Visible
|
||||||
|
AllCenStartBtnVisibility = Visibility.Visible
|
||||||
|
AllOutEndBtnVisibility = Visibility.Visible
|
||||||
|
AllCenEndBtnVisibility = Visibility.Visible
|
||||||
|
AllExtendBtnVisibility = Visibility.Visible
|
||||||
|
AllReduceBtnVisibility = Visibility.Visible
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function ModifyOtherLeadIn(nI As Integer, nLiOthType As Integer) As Boolean
|
Private Function ModifyOtherLeadIn(nI As Integer, nLiOthType As Integer) As Boolean
|
||||||
@@ -803,7 +1069,16 @@ Public Class SplitModeVM
|
|||||||
' Imposto flag di modifica
|
' Imposto flag di modifica
|
||||||
m_bModified = True
|
m_bModified = True
|
||||||
' Abilitazione bottone Next
|
' Abilitazione bottone Next
|
||||||
EnableButtons()
|
' EnableButtons()
|
||||||
|
' recupero l'elenco degli elementi selezionati
|
||||||
|
Dim ItemList As New List(Of NameIdLsBxItem)
|
||||||
|
For Each Item As NameIdLsBxItem In m_SelectedItemsList ' MachiningLsBx.SelectedItems
|
||||||
|
ItemList.Add(Item)
|
||||||
|
Next
|
||||||
|
'For Each Item As NameIdLsBxItem In m_ItemList
|
||||||
|
' If Item.bIsActive Then ItemList.Add(Item)
|
||||||
|
'Next
|
||||||
|
VerifyHomogenousMachining(ItemList)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' OnOffCommand
|
#End Region ' OnOffCommand
|
||||||
@@ -1443,13 +1718,22 @@ Public Class SplitModeVM
|
|||||||
If Not ModifStartWindow.ShowDialog() Then Return
|
If Not ModifStartWindow.ShowDialog() Then Return
|
||||||
' Modifica della lavorazione
|
' Modifica della lavorazione
|
||||||
Dim dUsal As Double = ModifStartWindowVM.GetVal()
|
Dim dUsal As Double = ModifStartWindowVM.GetVal()
|
||||||
EgtSetCurrMachining(nOperId)
|
Dim bRepeat As Boolean = False
|
||||||
Dim dAddLen As Double = 0
|
Do
|
||||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
EgtSetCurrMachining(nOperId)
|
||||||
If dAddLen - dOrigUsal < -10 * EPS_SMALL Then Return
|
Dim dAddLen As Double = 0
|
||||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
|
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
||||||
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
|
If dAddLen - dOrigUsal < -10 * EPS_SMALL Then Return
|
||||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
|
||||||
|
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
|
||||||
|
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||||
|
bRepeat = Not UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||||
|
If bRepeat Then
|
||||||
|
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dOrigUsal)
|
||||||
|
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
|
||||||
|
dUsal = dOrigUsal
|
||||||
|
End If
|
||||||
|
Loop Until Not bRepeat
|
||||||
' verifico interferenza
|
' verifico interferenza
|
||||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||||
ColorMachining(m_MachiningList(nI))
|
ColorMachining(m_MachiningList(nI))
|
||||||
@@ -1538,14 +1822,25 @@ Public Class SplitModeVM
|
|||||||
ModifStartWindowVM.SetVal(dOrigUeal)
|
ModifStartWindowVM.SetVal(dOrigUeal)
|
||||||
If Not ModifStartWindow.ShowDialog() Then Return
|
If Not ModifStartWindow.ShowDialog() Then Return
|
||||||
' Modifica della lavorazione
|
' Modifica della lavorazione
|
||||||
Dim dUsal As Double = ModifStartWindowVM.GetVal()
|
Dim dUeal As Double = ModifStartWindowVM.GetVal()
|
||||||
EgtSetCurrMachining(nOperId)
|
Dim bRepeat As Boolean = False
|
||||||
Dim dAddLen As Double = 0
|
Do
|
||||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
EgtSetCurrMachining(nOperId)
|
||||||
If dAddLen - dOrigUeal < -10 * EPS_SMALL Then Return
|
Dim dAddLen As Double = 0
|
||||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUsal - dOrigUeal)
|
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
||||||
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dUsal)
|
If dAddLen - dOrigUeal < -10 * EPS_SMALL Then
|
||||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
Return
|
||||||
|
End If
|
||||||
|
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
|
||||||
|
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dUeal)
|
||||||
|
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||||
|
bRepeat = Not UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||||
|
If bRepeat Then
|
||||||
|
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dOrigUeal)
|
||||||
|
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
|
||||||
|
dUeal = dOrigUeal
|
||||||
|
End If
|
||||||
|
Loop Until Not bRepeat
|
||||||
' verifico interferenza
|
' verifico interferenza
|
||||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||||
ColorMachining(m_MachiningList(nI))
|
ColorMachining(m_MachiningList(nI))
|
||||||
@@ -1688,6 +1983,200 @@ Public Class SplitModeVM
|
|||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
#Region "EVENTS"
|
||||||
|
|
||||||
|
Friend Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||||
|
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
|
||||||
|
If Not m_bActive OrElse OmagOFFICEMap.refMachiningTabVM.IsShow Then Return
|
||||||
|
' Si può selezionare solo con il tasto sinistro e se stato NULL
|
||||||
|
If e.Button <> Windows.Forms.MouseButtons.Left Or
|
||||||
|
Not OmagOFFICEMap.refSceneHostVM.MainScene.IsStatusNull() Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' Reset drag
|
||||||
|
m_nDragInd = -1
|
||||||
|
m_nDragType = 0
|
||||||
|
' Reset selection interface
|
||||||
|
m_nSelected = GDB_ID.NULL
|
||||||
|
' Verifico se selezionato estremo di taglio con lama
|
||||||
|
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
||||||
|
Dim nSel As Integer
|
||||||
|
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel)
|
||||||
|
Dim nId As Integer = EgtGetFirstObjInSelWin()
|
||||||
|
While nId <> GDB_ID.NULL
|
||||||
|
' Verifico sia un attacco o uscita di taglio con lama
|
||||||
|
Dim nType As Integer = 0
|
||||||
|
Dim sName As String = ""
|
||||||
|
EgtGetName(nId, sName)
|
||||||
|
If String.Compare(sName, NAME_PV_PRECUT) = 0 Then
|
||||||
|
nType = 1
|
||||||
|
ElseIf String.Compare(sName, NAME_PV_POSTCUT) = 0 Then
|
||||||
|
nType = 2
|
||||||
|
ElseIf String.Compare(sName, NAME_PV_CUT) = 0 Then
|
||||||
|
nType = 3
|
||||||
|
End If
|
||||||
|
If nType = 1 Or nType = 2 Then
|
||||||
|
Dim nPvId As Integer = EgtGetParent(EgtGetParent(nId))
|
||||||
|
Dim nMchId As Integer = GDB_ID.NULL
|
||||||
|
If EgtGetInfo(nPvId, "MId", nMchId) Then
|
||||||
|
For nInd As Integer = 0 To m_MachiningList.Count() - 1
|
||||||
|
If m_MachiningList(nInd).m_nId = nMchId Then
|
||||||
|
m_nDragInd = nInd
|
||||||
|
m_nDragType = nType
|
||||||
|
End If
|
||||||
|
For nJ As Integer = 0 To m_MachiningList(nInd).m_vOthId.Count() - 1
|
||||||
|
If m_MachiningList(nInd).m_vOthId(nJ) = nMchId Then
|
||||||
|
m_nDragInd = nInd
|
||||||
|
m_nDragType = nType
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If m_nDragInd >= 0 Then
|
||||||
|
' Assegno l'id dell'elemento selezionato
|
||||||
|
m_nSelected = m_nDragInd
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If m_nDragInd >= 0 Then
|
||||||
|
' Assegno l'id dell'elemento selezionato
|
||||||
|
m_nSelected = m_nDragInd
|
||||||
|
Exit While
|
||||||
|
End If
|
||||||
|
ElseIf nType = 3 Then
|
||||||
|
Dim nPvId As Integer = EgtGetParent(EgtGetParent(nId))
|
||||||
|
Dim nMchId As Integer = GDB_ID.NULL
|
||||||
|
If EgtGetInfo(nPvId, "MId", nMchId) Then
|
||||||
|
For nInd As Integer = 0 To m_MachiningList.Count() - 1
|
||||||
|
If m_MachiningList(nInd).m_nId = nMchId Then
|
||||||
|
m_nSelected = nInd
|
||||||
|
End If
|
||||||
|
For nJ As Integer = 0 To m_MachiningList(nInd).m_vOthId.Count() - 1
|
||||||
|
If m_MachiningList(nInd).m_vOthId(nJ) = nMchId Then
|
||||||
|
m_nSelected = nInd
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If m_nSelected >= 0 Then Exit For
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If m_nSelected >= 0 Then Exit While
|
||||||
|
End If
|
||||||
|
nId = EgtGetNextObjInSelWin()
|
||||||
|
End While
|
||||||
|
' Sistemazioni per drag
|
||||||
|
If m_nSelected >= 0 AndAlso EgtUnProjectPoint(e.Location, m_ptDragPrev) Then
|
||||||
|
Dim nItemIndex = 0
|
||||||
|
For Each Item In ItemList
|
||||||
|
Item.IsSelected = (nItemIndex = m_nSelected)
|
||||||
|
nItemIndex += 1
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
m_nDragInd = -1
|
||||||
|
m_nDragType = 0
|
||||||
|
m_nSelected = GDB_ID.NULL
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub OnMyMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||||
|
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
|
||||||
|
If Not m_bActive OrElse OmagOFFICEMap.refMachiningTabVM.IsShow Then Return
|
||||||
|
' Se drag non abilitato o in corso
|
||||||
|
If m_nDragInd = -1L Or m_bDragging Then Return
|
||||||
|
m_bDragging = True
|
||||||
|
Dim nOperId As Integer = m_MachiningList(m_nDragInd).m_nId
|
||||||
|
' Ricavo il punto corrente in coordinate mondo
|
||||||
|
Dim ptCurr As Point3d
|
||||||
|
EgtUnProjectPoint(e.Location, ptCurr)
|
||||||
|
' Ricavo il vettore di movimento e la variazione di lunghezza
|
||||||
|
Dim vtMove As Vector3d = ptCurr - m_ptDragPrev
|
||||||
|
Dim dDelta = vtMove * m_MachiningList(m_nDragInd).m_vtDir
|
||||||
|
If m_nDragType = 1 Then
|
||||||
|
Dim dOrigUsal As Double = 0
|
||||||
|
Dim dUsal As Double
|
||||||
|
' ----------------------- REPEAT -----------------------
|
||||||
|
Do
|
||||||
|
dDelta = -dDelta
|
||||||
|
' Leggo il valore salvato nella geometria
|
||||||
|
EgtGetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
|
||||||
|
dUsal = dOrigUsal + dDelta
|
||||||
|
' Se c'è limite alla lunghezza libera
|
||||||
|
If m_MachiningList(m_nDragInd).m_dStartFreeLen < FREELEN_INF Then
|
||||||
|
' Recupero sicurezza in corner interno
|
||||||
|
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, CurrentMachine.sMachIniFile), 10 * EPS_SMALL)
|
||||||
|
' Recupero lunghezza baffo del taglio
|
||||||
|
Dim nPvId As Integer = GDB_ID.NULL
|
||||||
|
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||||
|
Dim dDT As Double = 0
|
||||||
|
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||||
|
dUsal = Math.Min(dUsal, m_MachiningList(m_nDragInd).m_dStartFreeLen - dDT - dCornerSafety)
|
||||||
|
End If
|
||||||
|
' Modifica della lavorazione
|
||||||
|
EgtSetCurrMachining(nOperId)
|
||||||
|
Dim dAddLen As Double = 0
|
||||||
|
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
||||||
|
If dAddLen - dOrigUsal < -10 * EPS_SMALL Then
|
||||||
|
m_bDragging = False
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
|
||||||
|
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
|
||||||
|
Loop Until UpdateMachiningPreview(m_MachiningList(m_nDragInd).m_nId, True)
|
||||||
|
' ----------------------- REPEAT (solo se il segmento scompare) -----------------------
|
||||||
|
Else
|
||||||
|
Dim dOrigUeal As Double = 0
|
||||||
|
Dim dUeal As Double
|
||||||
|
dDelta = -dDelta
|
||||||
|
Do
|
||||||
|
dDelta = -dDelta
|
||||||
|
' Leggo il valore salvato nella geometria
|
||||||
|
EgtGetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
|
||||||
|
dUeal = dOrigUeal + dDelta
|
||||||
|
' Se c'è limite alla lunghezza libera
|
||||||
|
If m_MachiningList(m_nDragInd).m_dEndFreeLen < FREELEN_INF Then
|
||||||
|
' Recupero sicurezza in corner interno
|
||||||
|
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, CurrentMachine.sMachIniFile), 10 * EPS_SMALL)
|
||||||
|
' Recupero lunghezza baffo del taglio
|
||||||
|
Dim nPvId As Integer = GDB_ID.NULL
|
||||||
|
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||||
|
Dim dDT As Double = 0
|
||||||
|
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||||
|
dUeal = Math.Min(dUeal, m_MachiningList(m_nDragInd).m_dEndFreeLen - dDT - dCornerSafety)
|
||||||
|
End If
|
||||||
|
' Modifica della lavorazione
|
||||||
|
EgtSetCurrMachining(nOperId)
|
||||||
|
Dim dAddLen As Double = 0
|
||||||
|
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
||||||
|
If dAddLen - dOrigUeal < -10 * EPS_SMALL Then
|
||||||
|
m_bDragging = False
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
|
||||||
|
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dUeal)
|
||||||
|
Loop Until UpdateMachiningPreview(m_MachiningList(m_nDragInd).m_nId, True)
|
||||||
|
End If
|
||||||
|
' verifico interferenza
|
||||||
|
EgtVerifyMachining(m_MachiningList(m_nDragInd).m_nId, m_MachiningList(m_nDragInd).m_nInterf)
|
||||||
|
ColorMachining(m_MachiningList(m_nDragInd))
|
||||||
|
ColorNumberArrow(m_nDragInd)
|
||||||
|
' Aggiorno visualizzazione
|
||||||
|
EgtDraw()
|
||||||
|
m_bModified = True
|
||||||
|
' Aggiorno punto e stato di drag
|
||||||
|
m_ptDragPrev = ptCurr
|
||||||
|
m_bDragging = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub OnMyMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||||
|
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
|
||||||
|
If Not m_bActive OrElse OmagOFFICEMap.refMachiningTabVM.IsShow Then Return
|
||||||
|
' Se drag in corso
|
||||||
|
If m_nDragInd >= 0 Then
|
||||||
|
m_nDragInd = -1
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' EVENTS
|
||||||
|
|
||||||
'-----------------------------------------------------------------------------------------------
|
'-----------------------------------------------------------------------------------------------
|
||||||
Public Class NameIdLsBxItem
|
Public Class NameIdLsBxItem
|
||||||
@@ -1696,6 +2185,7 @@ Public Class SplitModeVM
|
|||||||
Private m_nInd As Integer
|
Private m_nInd As Integer
|
||||||
Private m_sName As String
|
Private m_sName As String
|
||||||
Private m_bIsActive As Boolean
|
Private m_bIsActive As Boolean
|
||||||
|
Private m_nType As Integer
|
||||||
|
|
||||||
Public Property Ind As Integer
|
Public Property Ind As Integer
|
||||||
Get
|
Get
|
||||||
@@ -1738,16 +2228,31 @@ Public Class SplitModeVM
|
|||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
If Not IsNothing(value) Then
|
If Not IsNothing(value) Then
|
||||||
m_IsSelected = value
|
m_IsSelected = value
|
||||||
If value Then
|
If value AndAlso Not OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList.Contains(Me) Then
|
||||||
OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList.Add(Me)
|
OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList.Add(Me)
|
||||||
Else
|
Else
|
||||||
OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList.Remove(Me)
|
OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList.Remove(Me)
|
||||||
End If
|
End If
|
||||||
|
' se non è stato aggiunto nessun nuovo elemento alla lista dei selezionati allora esco
|
||||||
|
If OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList.Count = 0 Then
|
||||||
|
EgtDraw()
|
||||||
|
NotifyPropertyChanged("IsSelected")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' se ho un solo elemento allora so che è coerrente con se stesso come lavorazione
|
||||||
|
If OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList.Count = 1 Then
|
||||||
|
OmagOFFICEMap.refSplitModeVM.m_bAreHomogeneous = True
|
||||||
|
End If
|
||||||
' creo lista ordinata dei selezionati
|
' creo lista ordinata dei selezionati
|
||||||
Dim ItemList As New List(Of NameIdLsBxItem)
|
Dim ItemList As New List(Of NameIdLsBxItem)
|
||||||
For Each Item In OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList
|
For Each Item In OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList
|
||||||
ItemList.Add(Item)
|
ItemList.Add(Item)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
' ------------------------ verifico che le lavorazioni siano dello stesso tipo ------------------------
|
||||||
|
OmagOFFICEMap.refSplitModeVM.VerifyHomogenousMachining(ItemList)
|
||||||
|
' -----------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
ItemList.Sort(Function(x, y) Comparer(Of Integer).Default.Compare(OmagOFFICEMap.refSplitModeVM.m_ItemList.IndexOf(x),
|
ItemList.Sort(Function(x, y) Comparer(Of Integer).Default.Compare(OmagOFFICEMap.refSplitModeVM.m_ItemList.IndexOf(x),
|
||||||
OmagOFFICEMap.refSplitModeVM.m_ItemList.IndexOf(y)))
|
OmagOFFICEMap.refSplitModeVM.m_ItemList.IndexOf(y)))
|
||||||
If Not My.Computer.Keyboard.ShiftKeyDown And (My.Computer.Keyboard.CtrlKeyDown And value) Then
|
If Not My.Computer.Keyboard.ShiftKeyDown And (My.Computer.Keyboard.CtrlKeyDown And value) Then
|
||||||
@@ -1793,10 +2298,20 @@ Public Class SplitModeVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Sub New(Name As String, Ind As Integer, bIsActive As Boolean)
|
Public Property Type As Integer
|
||||||
|
Get
|
||||||
|
Return m_nType
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_nType = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(Name As String, Ind As Integer, bIsActive As Boolean, nType As Integer)
|
||||||
Me.m_sName = Name
|
Me.m_sName = Name
|
||||||
Me.m_nInd = Ind
|
Me.m_nInd = Ind
|
||||||
Me.m_bIsActive = bIsActive
|
Me.m_bIsActive = bIsActive
|
||||||
|
Me.m_nType = nType
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
Command="{Binding ImportDxfCommand}">
|
Command="{Binding ImportDxfCommand}">
|
||||||
<Image Source="/Resources/NestingTab/ImportDxf.png" Stretch="Uniform"/>
|
<Image Source="/Resources/NestingTab/ImportDxf.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<ToggleButton Grid.Column="4" Grid.Row="0"
|
<ToggleButton Grid.Column="4" Grid.Row="0"
|
||||||
Style="{StaticResource OptionPanel_NestingToggleButton}"
|
Style="{StaticResource OptionPanel_NestingToggleButton}"
|
||||||
IsChecked="{Binding CsvImport_IsChecked}">
|
IsChecked="{Binding CsvImport_IsChecked}">
|
||||||
<Image Source="/Resources/NestingTab/ImportCsv.png" Stretch="Uniform"/>
|
<Image Source="/Resources/NestingTab/ImportCsv.png" Stretch="Uniform"/>
|
||||||
@@ -148,11 +148,24 @@
|
|||||||
Margin="2.5,0,0,0"/>
|
Margin="2.5,0,0,0"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
<Button Content="{Binding RemovePartMsg}"
|
<Grid Margin="0,0,-2.5,5">
|
||||||
Style="{StaticResource OptionPanel_TextButton}"
|
<Grid.ColumnDefinitions>
|
||||||
Command="{Binding RemovePartCommand}"
|
<ColumnDefinition Width="1*"/>
|
||||||
Margin="0,0,0,5"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button Content="{Binding RemovePartMsg}"
|
||||||
|
Grid.ColumnSpan="{Binding DragRettangle_Cl_Span}"
|
||||||
|
Style="{StaticResource OptionPanel_TextButton}"
|
||||||
|
Command="{Binding RemovePartCommand}"
|
||||||
|
Margin="0,0,2.5,0"/>
|
||||||
|
<ToggleButton Content="{Binding DragRettangleMsg}" Grid.Column="1"
|
||||||
|
Visibility="{Binding DragRettangle_Visibility}"
|
||||||
|
Style="{StaticResource OptionPanel_ToggleButton}"
|
||||||
|
IsChecked="{Binding bDragRettangle}"
|
||||||
|
Margin="2.5,0,2.5,0"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
<UniformGrid Columns="2" Margin="0,0,0,5">
|
<UniformGrid Columns="2" Margin="0,0,0,5">
|
||||||
<Button Content="{Binding SelectAllMsg}"
|
<Button Content="{Binding SelectAllMsg}"
|
||||||
Style="{StaticResource OptionPanel_TextButton}"
|
Style="{StaticResource OptionPanel_TextButton}"
|
||||||
|
|||||||
@@ -35,6 +35,18 @@ Public Class NestingTabVM
|
|||||||
Private m_bTrfData As Boolean = False
|
Private m_bTrfData As Boolean = False
|
||||||
Private m_bCsvData As Boolean = False
|
Private m_bCsvData As Boolean = False
|
||||||
|
|
||||||
|
' Id del rettangolo, del traglio e della curva da modificare tramite Drag
|
||||||
|
Private m_nIdSelectedOutLoopRettangle As Integer = GDB_ID.NULL
|
||||||
|
Private m_nIdSelectedRegionRettangle As Integer = GDB_ID.NULL
|
||||||
|
Private m_nIdSelectedSawRettangle As Integer = GDB_ID.NULL
|
||||||
|
Private m_nIdSelectedCurvRettangle As Integer = GDB_ID.NULL
|
||||||
|
Private m_nIdSelectedTextRettangle As Integer = GDB_ID.NULL
|
||||||
|
Private m_nIdSelectedTextTopRettangle As Integer = GDB_ID.NULL
|
||||||
|
Private m_nIdSelectedFlatSurfRettangle As Integer = GDB_ID.NULL
|
||||||
|
Private m_SideListRettangle(4) As Integer
|
||||||
|
Private m_sTextContent As String = String.Empty
|
||||||
|
|
||||||
|
|
||||||
Private m_CsvImportWindow As CsvWindowV
|
Private m_CsvImportWindow As CsvWindowV
|
||||||
Friend ReadOnly Property CsvImportWindow As CsvWindowV
|
Friend ReadOnly Property CsvImportWindow As CsvWindowV
|
||||||
Get
|
Get
|
||||||
@@ -161,6 +173,12 @@ Public Class NestingTabVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property DragRettangleMsg As String
|
||||||
|
Get
|
||||||
|
Return "Drag Rettangle"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property SelectAllMsg As String
|
Public ReadOnly Property SelectAllMsg As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg(MSG_NESTPAGEUC + 4)
|
Return EgtMsg(MSG_NESTPAGEUC + 4)
|
||||||
@@ -211,6 +229,13 @@ Public Class NestingTabVM
|
|||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
|
If (GetMainPrivateProfileInt(S_NEST, K_DRAGRETTANGLE, 1) <> 0) Then
|
||||||
|
m_DragRettangle_Visibility = Visibility.Visible
|
||||||
|
Else
|
||||||
|
m_DragRettangle_Visibility = Visibility.Collapsed
|
||||||
|
End If
|
||||||
|
NotifyPropertyChanged("DragRettangle_Visibility")
|
||||||
|
NotifyPropertyChanged("DragRettangle_Cl_Span")
|
||||||
' Creo riferimento a questa classe in OmagOFFICEMap
|
' Creo riferimento a questa classe in OmagOFFICEMap
|
||||||
OmagOFFICEMap.SetRefNestingTabVM(Me)
|
OmagOFFICEMap.SetRefNestingTabVM(Me)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -506,8 +531,318 @@ Public Class NestingTabVM
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
#Region "DRAG RETTANGLE"
|
||||||
|
|
||||||
|
' funzione chiamata da OnMyMouseMoveScene: verifica che la selezione sia corretta (deve essere il lato di una figura rettangolare)
|
||||||
|
Private Sub OnMyMouseDownSceneSelSideRettangle(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||||
|
' Si può selezionare solo con il tasto sinistro e se il bottone TEST Attivo
|
||||||
|
If e.Button <> Windows.Forms.MouseButtons.Left Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' Verifico se selezionato indicativo di pezzo
|
||||||
|
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
||||||
|
Dim nSelMy As Integer
|
||||||
|
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSelMy)
|
||||||
|
Dim nIdMy As Integer = EgtGetFirstObjInSelWin()
|
||||||
|
While nIdMy <> GDB_ID.NULL
|
||||||
|
Dim sLayer As String = String.Empty
|
||||||
|
' layer di origine
|
||||||
|
Dim nIdParent As Integer = EgtGetParent(nIdMy)
|
||||||
|
' recupero il nome del Layer
|
||||||
|
EgtGetName(nIdParent, sLayer)
|
||||||
|
' solo se il nome del layer è quello associato ad un lato esterno allora procedo con l'evidenziazione
|
||||||
|
If sLayer = NAME_OUTLOOP Then
|
||||||
|
If EgtGetType(nIdMy) = GDB_TY.CRV_LINE Then
|
||||||
|
' -------------------------------- INIZIO VERIFICHE --------------------------------
|
||||||
|
m_nIdSelectedOutLoopRettangle = nIdParent
|
||||||
|
If Not IsRettangle(m_SideListRettangle) Then
|
||||||
|
'm_CurrProjPage.ClearMessage()
|
||||||
|
'm_CurrProjPage.SetWarningMessage("Non è un rettangolo (0)")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' recupero il gruppo della lavorazione associata
|
||||||
|
Dim nIdParentPart As Integer = EgtGetParent(nIdParent)
|
||||||
|
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, "PV")
|
||||||
|
' se non esiste un gruppo di lavorazione associato allora esco
|
||||||
|
If nIdPV = GDB_ID.NULL Then
|
||||||
|
'm_CurrProjPage.ClearMessage()
|
||||||
|
'm_CurrProjPage.SetWarningMessage("Pezzo in parcheggio (1)")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' se esiste ma è vuoto (pezzo scaricato da tavola)
|
||||||
|
If EgtGetFirstInGroup(nIdPV) = GDB_ID.NULL Then
|
||||||
|
'm_CurrProjPage.ClearMessage()
|
||||||
|
'm_CurrProjPage.SetWarningMessage("Pezzo in parcheggio (2)")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' Devo verificare che sia una lavorazione solo di lama?
|
||||||
|
Dim nIdSaw As Integer = EgtGetFirstNameInGroup(nIdPV, "Saw" & nIdMy.ToString)
|
||||||
|
' -------------------------------- FINE VERIFICHE --------------------------------
|
||||||
|
|
||||||
|
If Not EgtGetGroupObjs(nIdSaw) Then
|
||||||
|
m_nIdSelectedSawRettangle = nIdSaw
|
||||||
|
m_nIdSelectedCurvRettangle = nIdMy
|
||||||
|
|
||||||
|
m_nIdSelectedRegionRettangle = EgtGetFirstNameInGroup(nIdParentPart, NAME_REGION)
|
||||||
|
' recupero i testi cintenuti nel layer Region
|
||||||
|
If m_nIdSelectedRegionRettangle <> GDB_ID.NULL Then
|
||||||
|
Dim nCurrId As Integer = EgtGetFirstInGroup(m_nIdSelectedRegionRettangle)
|
||||||
|
While nCurrId <> GDB_ID.NULL
|
||||||
|
If EgtGetType(nCurrId) = GDB_TY.EXT_TEXT Then
|
||||||
|
Dim sVal As String = String.Empty
|
||||||
|
EgtTextGetContent(nCurrId, sVal)
|
||||||
|
If sVal = "*TOP*" Then
|
||||||
|
m_nIdSelectedTextTopRettangle = nCurrId
|
||||||
|
Else
|
||||||
|
m_nIdSelectedTextRettangle = nCurrId
|
||||||
|
m_sTextContent = GetMyRettangleText(sVal)
|
||||||
|
End If
|
||||||
|
ElseIf EgtGetType(nCurrId) = GDB_TY.SRF_FRGN Then
|
||||||
|
m_nIdSelectedFlatSurfRettangle = nCurrId
|
||||||
|
End If
|
||||||
|
nCurrId = EgtGetNext(nCurrId)
|
||||||
|
End While
|
||||||
|
End If
|
||||||
|
' seleziono ed evidenzio il lato selezionato
|
||||||
|
EgtSelectObj(nIdSaw)
|
||||||
|
EgtSetMark(nIdSaw)
|
||||||
|
EgtSelectObj(nIdMy)
|
||||||
|
EgtDraw()
|
||||||
|
Exit While
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
' se le'elemto corrente non è una linea
|
||||||
|
End If
|
||||||
|
' se le'elemto corrente non appartiene al layer OutLoop passo al prossimo elemento dell'elenco
|
||||||
|
nIdMy = EgtGetNextObjInSelWin()
|
||||||
|
End While
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' restituisce il valore del Text ripulito dalle dimensioni
|
||||||
|
Private Function GetMyRettangleText(sTextPz As String) As String
|
||||||
|
' da DrawPageUC.xaml.vb/MultipleInsert
|
||||||
|
Dim sText As String = String.Empty
|
||||||
|
If sTextPz.Contains("<br/>") Then
|
||||||
|
Dim nLastIndex As Integer = sTextPz.LastIndexOf(">")
|
||||||
|
sText = sTextPz.Remove(nLastIndex + 1)
|
||||||
|
Return sText
|
||||||
|
End If
|
||||||
|
If sTextPz.Contains(" ") Then
|
||||||
|
Dim sInfo() As String = sTextPz.Split(" "c)
|
||||||
|
If sInfo.Count > 3 Then
|
||||||
|
Return sText = sInfo(0) & " " & sInfo(1) & " "
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Return sText
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' verifico che la figura selezionata sia realmente un rettangolo
|
||||||
|
Private Function IsRettangle(ByRef IdSideList() As Integer) As Boolean
|
||||||
|
' creo una lista con i lati del rettangolo
|
||||||
|
Dim nCounter As Integer = 0
|
||||||
|
' recupero i lati dal leyer "OutLoop"
|
||||||
|
Dim IdSideRettangle As Integer = EgtGetFirstInGroup(m_nIdSelectedOutLoopRettangle)
|
||||||
|
While IdSideRettangle <> GDB_ID.NULL And nCounter < 4
|
||||||
|
Dim sVal As String = String.Empty
|
||||||
|
Dim dPrevAng As Double = 0
|
||||||
|
EgtGetInfo(IdSideRettangle, "PrevAng", sVal)
|
||||||
|
StringToDouble(sVal, dPrevAng)
|
||||||
|
Dim dNextAng As Double = 0
|
||||||
|
EgtGetInfo(IdSideRettangle, "NextAng", sVal)
|
||||||
|
StringToDouble(sVal, dNextAng)
|
||||||
|
' se gli angoli non sono retti allora esco senza caricare il lato corrente
|
||||||
|
If Math.Abs(dPrevAng - 90) > EPS_ANG_SMALL OrElse Math.Abs(dNextAng - 90) > EPS_ANG_SMALL Then
|
||||||
|
Exit While
|
||||||
|
End If
|
||||||
|
IdSideList(nCounter) = IdSideRettangle
|
||||||
|
nCounter += 1
|
||||||
|
IdSideRettangle = EgtGetNext(IdSideRettangle)
|
||||||
|
End While
|
||||||
|
' verifico che siano solo quattro lati
|
||||||
|
If IdSideRettangle = GDB_ID.NULL And nCounter = 4 Then
|
||||||
|
' solo se la figura ha 4 lati ortogonali
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
|
||||||
|
m_nIdSelectedOutLoopRettangle = GDB_ID.NULL
|
||||||
|
' la figura presenta più/meno di 4 lati
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' recupero le informazioni correnti per sapere se la figura è mdificabile
|
||||||
|
Private Function GetRettangleInfoScale(ByRef frFixed As Frame3d, ByRef MaxLen As Double, ByRef MinLen As Double) As Vector3d
|
||||||
|
' determino la direzione del lato selezionato
|
||||||
|
Dim vtDirSelectedCurv As New Vector3d
|
||||||
|
EgtStartVector(m_nIdSelectedCurvRettangle, GDB_ID.ROOT, vtDirSelectedCurv)
|
||||||
|
|
||||||
|
' recupero il lato successivo a quello selezionato
|
||||||
|
Dim Index As Integer = 0
|
||||||
|
Dim Len As Double = 0
|
||||||
|
For Ind As Integer = 0 To 3
|
||||||
|
If m_SideListRettangle(Ind) = m_nIdSelectedCurvRettangle Then
|
||||||
|
' verifico se esiste un lato Precedente altrimenti recupero l'ultimo della lista
|
||||||
|
If Ind = 0 Then
|
||||||
|
Index = 3
|
||||||
|
Else
|
||||||
|
Index = Ind - 1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' recupero la dimensione del lato
|
||||||
|
EgtCurveLength(m_SideListRettangle(Index), MaxLen)
|
||||||
|
EgtCurveLength(m_nIdSelectedCurvRettangle, MinLen)
|
||||||
|
|
||||||
|
' verifico che il lato selezionato sia il maggiore
|
||||||
|
If MinLen > MaxLen Then Return Nothing
|
||||||
|
|
||||||
|
' determimo il versore dal lato appena calcolato
|
||||||
|
Dim vtDir As New Vector3d
|
||||||
|
|
||||||
|
EgtStartVector(m_SideListRettangle(Index), GDB_ID.ROOT, vtDir)
|
||||||
|
vtDir.Normalize()
|
||||||
|
Dim dProjectionBaseX As Double = vtDir * Vector3d.X_AX
|
||||||
|
Dim ptFixed As New Point3d
|
||||||
|
EgtStartPoint(m_SideListRettangle(Index), GDB_ID.ROOT, ptFixed)
|
||||||
|
|
||||||
|
Dim vtPerp As New Vector3d(vtDir.x, vtDir.y, vtDir.z)
|
||||||
|
vtPerp.Rotate(Vector3d.Z_AX, 90)
|
||||||
|
|
||||||
|
' determino il Frame corrente
|
||||||
|
frFixed = New Frame3d(ptFixed, vtDir, vtPerp, Vector3d.Z_AX)
|
||||||
|
|
||||||
|
Return vtDir
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' funzione chiamata da OnMyMouseMoveScene: gestisce la modifica lungo una dimensione del rettangolo selezionato
|
||||||
|
Private Sub OnMyMouseMoveSawRettangle(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||||
|
' Se drag non abilitato o già in esecuzione, esco
|
||||||
|
If Not m_bDrag Or m_bDragging 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
|
||||||
|
|
||||||
|
' riferiemento che deve rimanere fisso del rettangolo
|
||||||
|
Dim frFixed As Frame3d = Nothing
|
||||||
|
' lunghezza del lato da modificare
|
||||||
|
Dim MaxLen As Double = 0
|
||||||
|
Dim MinLen As Double = 0
|
||||||
|
' recupero info sul rettangolo selezionato
|
||||||
|
Dim vtDir As Vector3d = GetRettangleInfoScale(frFixed, MaxLen, MinLen)
|
||||||
|
If vtDir.Equals(Vector3d.NULL) Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Inizio esecuzione di drag
|
||||||
|
m_bDragging = True
|
||||||
|
|
||||||
|
' Ricavo il punto corrente in coordinate mondo
|
||||||
|
Dim ptCurr As Point3d
|
||||||
|
EgtUnProjectPoint(e.Location, ptCurr)
|
||||||
|
' Ricavo il vettore di movimento
|
||||||
|
Dim vtMove As Vector3d = ptCurr - m_ptPrev
|
||||||
|
' ricavo il valore efficace di allungamento (la proiezione)
|
||||||
|
Dim dProjection As Double = vtMove * vtDir
|
||||||
|
vtMove = vtDir * dProjection
|
||||||
|
' recupero il valore di scalatura
|
||||||
|
Dim dScalefactor = dProjection / MaxLen + 1
|
||||||
|
|
||||||
|
' Modifico dimensione figura
|
||||||
|
If Math.Abs(dScalefactor) > EPS_SMALL * EPS_SMALL Then
|
||||||
|
EgtScale(m_nIdSelectedOutLoopRettangle, frFixed, dScalefactor, 1, 1, GDB_ID.ROOT)
|
||||||
|
EgtScale(m_nIdSelectedFlatSurfRettangle, frFixed, dScalefactor, 1, 1, GDB_ID.ROOT)
|
||||||
|
Dim ptCen As Point3d
|
||||||
|
EgtCenterPoint(m_nIdSelectedTextRettangle, ptCen)
|
||||||
|
EgtModifyText(m_nIdSelectedTextRettangle, m_sTextContent & LenToString(MaxLen + dProjection, 2) & " x " & LenToString(MinLen, 2))
|
||||||
|
EgtMove(m_nIdSelectedTextRettangle, vtMove * 0.5)
|
||||||
|
If m_nIdSelectedTextTopRettangle <> GDB_ID.NULL Then
|
||||||
|
EgtMove(m_nIdSelectedTextTopRettangle, vtMove * 0.5)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim nWarn As Integer = 0
|
||||||
|
ResetAllMachinings(nWarn)
|
||||||
|
EnableReferenceRegion(False)
|
||||||
|
' se la modifica genera un errore allora ripristino la figura prima della defomrazione
|
||||||
|
If Not EgtVerifyPart(EgtGetParent(m_nIdSelectedOutLoopRettangle), True) Then
|
||||||
|
EgtScale(m_nIdSelectedOutLoopRettangle, frFixed, 1 / dScalefactor, 1, 1, GDB_ID.ROOT)
|
||||||
|
EgtScale(m_nIdSelectedFlatSurfRettangle, frFixed, 1 / dScalefactor, 1, 1, GDB_ID.ROOT)
|
||||||
|
Dim ptCen As Point3d
|
||||||
|
EgtCenterPoint(m_nIdSelectedTextRettangle, ptCen)
|
||||||
|
EgtModifyText(m_nIdSelectedTextRettangle, m_sTextContent & LenToString(MaxLen, 2) & " x " & LenToString(MinLen, 2))
|
||||||
|
EgtMove(m_nIdSelectedTextRettangle, -vtMove * 0.5)
|
||||||
|
If m_nIdSelectedTextTopRettangle <> GDB_ID.NULL Then
|
||||||
|
EgtMove(m_nIdSelectedTextTopRettangle, -vtMove * 0.5)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
EgtDraw()
|
||||||
|
' Aggiorno il punto precedente
|
||||||
|
m_ptPrev = ptCurr
|
||||||
|
' Terminata esecuzione di drag
|
||||||
|
m_bDragging = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' funzione chiamata da OnMyMouseUp: gestisce il reset di tutti gli indici in uso
|
||||||
|
Public Sub ResetDragRettangleParam()
|
||||||
|
' deseleziono l'elemento corrente
|
||||||
|
EgtDeselectObj(m_nIdSelectedSawRettangle)
|
||||||
|
EgtDeselectObj(m_nIdSelectedCurvRettangle)
|
||||||
|
EgtResetMark(m_nIdSelectedSawRettangle)
|
||||||
|
' resetto gli indici
|
||||||
|
m_nIdSelectedOutLoopRettangle = GDB_ID.NULL
|
||||||
|
m_nIdSelectedRegionRettangle = GDB_ID.NULL
|
||||||
|
m_nIdSelectedSawRettangle = GDB_ID.NULL
|
||||||
|
m_nIdSelectedCurvRettangle = GDB_ID.NULL
|
||||||
|
m_nIdSelectedTextRettangle = GDB_ID.NULL
|
||||||
|
m_nIdSelectedTextTopRettangle = GDB_ID.NULL
|
||||||
|
m_nIdSelectedFlatSurfRettangle = GDB_ID.NULL
|
||||||
|
m_SideListRettangle = {GDB_ID.NULL, GDB_ID.NULL, GDB_ID.NULL, GDB_ID.NULL}
|
||||||
|
m_sTextContent = String.Empty
|
||||||
|
' disattivo il drag
|
||||||
|
m_bDrag = False
|
||||||
|
' aggiorno le lavorazioni
|
||||||
|
Dim nWarn As Integer = 0
|
||||||
|
ResetAllMachinings(nWarn)
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Drag Rettangolo
|
||||||
|
|
||||||
#End Region ' METHODS
|
#End Region ' METHODS
|
||||||
|
|
||||||
|
Private m_bDragRettangle As Boolean
|
||||||
|
Public Property bDragRettangle As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bDragRettangle
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_bDragRettangle = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_DragRettangle_Visibility As Visibility = Visibility.Collapsed
|
||||||
|
Public ReadOnly Property DragRettangle_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_DragRettangle_Visibility
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property DragRettangle_Cl_Span As Integer
|
||||||
|
Get
|
||||||
|
If m_DragRettangle_Visibility = Visibility.Visible Then
|
||||||
|
Return 1
|
||||||
|
End If
|
||||||
|
Return 2
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
#Region "DrawCommand"
|
#Region "DrawCommand"
|
||||||
@@ -523,6 +858,7 @@ Public Class NestingTabVM
|
|||||||
|
|
||||||
Public Sub Draw(ByVal param As Object)
|
Public Sub Draw(ByVal param As Object)
|
||||||
Dim CompoWindow As New CompoWindowV(Application.Current.MainWindow, New CompoWindowVM)
|
Dim CompoWindow As New CompoWindowV(Application.Current.MainWindow, New CompoWindowVM)
|
||||||
|
CompoWindow.Height = 700
|
||||||
CompoWindow.ShowDialog()
|
CompoWindow.ShowDialog()
|
||||||
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1168,6 +1504,17 @@ Public Class NestingTabVM
|
|||||||
#Region "EVENTS"
|
#Region "EVENTS"
|
||||||
|
|
||||||
Friend Sub OnMouseDownScene(sender As Object, e As Windows.Forms.MouseEventArgs)
|
Friend Sub OnMouseDownScene(sender As Object, e As Windows.Forms.MouseEventArgs)
|
||||||
|
' se in modalità DragRettangle (deformazione delle componenti rettangolari)
|
||||||
|
If m_bDragRettangle Then
|
||||||
|
OnMyMouseDownSceneSelSideRettangle(sender, e)
|
||||||
|
' Dati per drag (abilito il Drag)
|
||||||
|
m_locPrev = e.Location
|
||||||
|
m_bDrag = EgtUnProjectPoint(e.Location, m_ptPrev) And m_nIdSelectedCurvRettangle <> GDB_ID.NULL
|
||||||
|
m_bDragToStart = m_bDrag
|
||||||
|
m_bVerify = m_bDrag AndAlso (Keyboard.Modifiers And ModifierKeys.Shift) > 0
|
||||||
|
m_vtTotMove = Vector3d.NULL()
|
||||||
|
Return
|
||||||
|
End If
|
||||||
' Per default no drag
|
' Per default no drag
|
||||||
m_bDrag = False
|
m_bDrag = False
|
||||||
' Verifico se selezionato indicativo di pezzo
|
' Verifico se selezionato indicativo di pezzo
|
||||||
@@ -1215,6 +1562,13 @@ Public Class NestingTabVM
|
|||||||
End If
|
End If
|
||||||
m_bDragToStart = False
|
m_bDragToStart = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' se devo muovere un lato del rettangolo
|
||||||
|
If m_bDragRettangle Then
|
||||||
|
OnMyMouseMoveSawRettangle(sender, e)
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
' Determino cosa muovere
|
' Determino cosa muovere
|
||||||
Dim nMoveId = If(m_nIdToSel <> GDB_ID.NULL, m_nIdToSel, GDB_ID.SEL)
|
Dim nMoveId = If(m_nIdToSel <> GDB_ID.NULL, m_nIdToSel, GDB_ID.SEL)
|
||||||
' Verifico se in tavola o in parcheggio
|
' Verifico se in tavola o in parcheggio
|
||||||
@@ -1303,6 +1657,11 @@ Public Class NestingTabVM
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
Friend Sub OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||||
|
If m_bDragRettangle Then
|
||||||
|
' deseleziono gli oggeti, resetto le variabili usate, aggiorno il disegno
|
||||||
|
ResetDragRettangleParam()
|
||||||
|
Return
|
||||||
|
End If
|
||||||
' Se eseguito drag
|
' Se eseguito drag
|
||||||
If Not m_bDragToStart Then
|
If Not m_bDragToStart Then
|
||||||
' Se movimento con sola verifica finale
|
' Se movimento con sola verifica finale
|
||||||
@@ -1336,11 +1695,11 @@ Public Class NestingTabVM
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
m_bFromParking = False
|
m_bFromParking = False
|
||||||
' altrimenti caso con verifica durante il movimento
|
' altrimenti caso con verifica durante il movimento
|
||||||
Else
|
Else
|
||||||
' Basta reset alla fine
|
' Basta reset alla fine
|
||||||
End If
|
End If
|
||||||
' Se selezione da eseguire
|
' Se selezione da eseguire
|
||||||
ElseIf m_nIdToSel <> GDB_ID.NULL Then
|
ElseIf m_nIdToSel <> GDB_ID.NULL Then
|
||||||
' Determino se pezzo in tavola o in parcheggio
|
' Determino se pezzo in tavola o in parcheggio
|
||||||
Dim bPartInTable As Boolean = (EgtGetParent(m_nIdToSel) = GetRawId())
|
Dim bPartInTable As Boolean = (EgtGetParent(m_nIdToSel) = GetRawId())
|
||||||
@@ -1357,7 +1716,7 @@ Public Class NestingTabVM
|
|||||||
VeinMatching.OnSelectPart(m_nIdToSel)
|
VeinMatching.OnSelectPart(m_nIdToSel)
|
||||||
' Set flag posizione selezionati
|
' Set flag posizione selezionati
|
||||||
m_nPartPos = If(bPartInTable, PART_POS.IN_TABLE, PART_POS.OUT_TABLE)
|
m_nPartPos = If(bPartInTable, PART_POS.IN_TABLE, PART_POS.OUT_TABLE)
|
||||||
' Se deselezione da eseguire
|
' Se deselezione da eseguire
|
||||||
ElseIf m_nIdToDesel <> GDB_ID.NULL Then
|
ElseIf m_nIdToDesel <> GDB_ID.NULL Then
|
||||||
EgtDeselectObj(m_nIdToDesel)
|
EgtDeselectObj(m_nIdToDesel)
|
||||||
' Eventuale aggiornamento VeinMatching
|
' Eventuale aggiornamento VeinMatching
|
||||||
|
|||||||
@@ -129,7 +129,7 @@
|
|||||||
Margin="13,0,0,5"
|
Margin="13,0,0,5"
|
||||||
IsEnabled="{Binding OffsetYIsEnabled}" TextAlignment="Right"/>
|
IsEnabled="{Binding OffsetYIsEnabled}" TextAlignment="Right"/>
|
||||||
<TextBlock Text="{Binding KerfMsg}"/>
|
<TextBlock Text="{Binding KerfMsg}"/>
|
||||||
<EgtWpfLib5:EgtTextBox Text="{Binding Kerf}"
|
<EgtWpfLib5:EgtTextBox Text="{Binding Kerf, UpdateSourceTrigger=PropertyChanged}"
|
||||||
Margin="13,0,0,5"
|
Margin="13,0,0,5"
|
||||||
IsEnabled="{Binding KerfIsEnabled}" TextAlignment="Right"/>
|
IsEnabled="{Binding KerfIsEnabled}" TextAlignment="Right"/>
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ Public Class RawPartTabVM
|
|||||||
Private m_dPhotoOffsetX As Double
|
Private m_dPhotoOffsetX As Double
|
||||||
Public Property PhotoOffsetX As String
|
Public Property PhotoOffsetX As String
|
||||||
Get
|
Get
|
||||||
Return LenToString(m_dPhotoOffsetX, -2)
|
Return LenToString(m_dPhotoOffsetX, 2)
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
Dim dVal As Double = 0
|
Dim dVal As Double = 0
|
||||||
@@ -125,7 +125,7 @@ Public Class RawPartTabVM
|
|||||||
Private m_dPhotoOffsetY As Double
|
Private m_dPhotoOffsetY As Double
|
||||||
Public Property PhotoOffsetY As String
|
Public Property PhotoOffsetY As String
|
||||||
Get
|
Get
|
||||||
Return LenToString(m_dPhotoOffsetY, -2)
|
Return LenToString(m_dPhotoOffsetY, 2)
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
Dim dVal As Double = 0
|
Dim dVal As Double = 0
|
||||||
@@ -142,7 +142,7 @@ Public Class RawPartTabVM
|
|||||||
Private m_dPhotoRot As Double
|
Private m_dPhotoRot As Double
|
||||||
Public Property PhotoRot As String
|
Public Property PhotoRot As String
|
||||||
Get
|
Get
|
||||||
Return LenToString(m_dPhotoRot, -2)
|
Return LenToString(m_dPhotoRot, 2)
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
Dim dVal As Double = 0
|
Dim dVal As Double = 0
|
||||||
@@ -223,15 +223,17 @@ Public Class RawPartTabVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
#Region "Parametri Grezzo"
|
||||||
|
|
||||||
Private m_dLength As Double
|
Private m_dLength As Double
|
||||||
Public Property Length As String
|
Public Property Length As String
|
||||||
Get
|
Get
|
||||||
If m_InvertKerf < 0 Then
|
If m_InvertKerf < 0 Then
|
||||||
Return LenToString(m_dLength + 2 * m_dKerf, -2)
|
Return LenToString(m_dLength + 2 * m_dKerf, 2)
|
||||||
Else
|
Else
|
||||||
Return LenToString(m_dLength, -2)
|
Return LenToString(m_dLength, 2)
|
||||||
End If
|
End If
|
||||||
'Return LenToString(m_dLength, -2)
|
'Return LenToString(m_dLength, 2)
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
Dim dLength As Double = 0
|
Dim dLength As Double = 0
|
||||||
@@ -279,9 +281,9 @@ Public Class RawPartTabVM
|
|||||||
Public Property Width As String
|
Public Property Width As String
|
||||||
Get
|
Get
|
||||||
If m_InvertKerf < 0 Then
|
If m_InvertKerf < 0 Then
|
||||||
Return LenToString(m_dWidth + 2 * m_dKerf, -2)
|
Return LenToString(m_dWidth + 2 * m_dKerf, 2)
|
||||||
Else
|
Else
|
||||||
Return LenToString(m_dWidth, -2)
|
Return LenToString(m_dWidth, 2)
|
||||||
End If
|
End If
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
@@ -329,7 +331,7 @@ Public Class RawPartTabVM
|
|||||||
Private m_dHeight As Double
|
Private m_dHeight As Double
|
||||||
Public Property Height As String
|
Public Property Height As String
|
||||||
Get
|
Get
|
||||||
Return LenToString(m_dHeight, -2)
|
Return LenToString(m_dHeight, 2)
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
Dim dHeight As Double = 0
|
Dim dHeight As Double = 0
|
||||||
@@ -370,9 +372,9 @@ Public Class RawPartTabVM
|
|||||||
Public Property OffsetX As String
|
Public Property OffsetX As String
|
||||||
Get
|
Get
|
||||||
If m_InvertKerf < 0 Then
|
If m_InvertKerf < 0 Then
|
||||||
Return LenToString(m_dOffsetX - m_dKerf, -2)
|
Return LenToString(m_dOffsetX - m_dKerf, 2)
|
||||||
Else
|
Else
|
||||||
Return LenToString(m_dOffsetX, -2)
|
Return LenToString(m_dOffsetX, 2)
|
||||||
End If
|
End If
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
@@ -388,7 +390,7 @@ Public Class RawPartTabVM
|
|||||||
RecalcRawPart()
|
RecalcRawPart()
|
||||||
ElseIf m_InvertKerf < 0 And dOffsetX >= 0 And dOffsetX < dMaxOffsetX + m_dKerf Then
|
ElseIf m_InvertKerf < 0 And dOffsetX >= 0 And dOffsetX < dMaxOffsetX + m_dKerf Then
|
||||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||||
m_dOffsetX = dOffsetX + m_dKerf
|
m_dOffsetX = dOffsetX
|
||||||
RecalcRawPart()
|
RecalcRawPart()
|
||||||
ElseIf dOffsetX <= dMinOffsetX - EPS_SMALL Then
|
ElseIf dOffsetX <= dMinOffsetX - EPS_SMALL Then
|
||||||
NotifyPropertyChanged("OffsetX")
|
NotifyPropertyChanged("OffsetX")
|
||||||
@@ -435,9 +437,9 @@ Public Class RawPartTabVM
|
|||||||
Public Property OffsetY As String
|
Public Property OffsetY As String
|
||||||
Get
|
Get
|
||||||
If m_InvertKerf < 0 Then
|
If m_InvertKerf < 0 Then
|
||||||
Return LenToString(m_dOffsetY - m_dKerf, -2)
|
Return LenToString(m_dOffsetY - m_dKerf, 2)
|
||||||
Else
|
Else
|
||||||
Return LenToString(m_dOffsetY, -2)
|
Return LenToString(m_dOffsetY, 2)
|
||||||
End If
|
End If
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
@@ -453,7 +455,7 @@ Public Class RawPartTabVM
|
|||||||
RecalcRawPart()
|
RecalcRawPart()
|
||||||
ElseIf m_InvertKerf < 0 And dOffsetY >= 0 And dOffsetY < dMaxOffsetY + m_dKerf Then
|
ElseIf m_InvertKerf < 0 And dOffsetY >= 0 And dOffsetY < dMaxOffsetY + m_dKerf Then
|
||||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||||
m_dOffsetY = dOffsetY + m_dKerf
|
m_dOffsetY = dOffsetY
|
||||||
RecalcRawPart()
|
RecalcRawPart()
|
||||||
ElseIf dOffsetY <= dMinOffsetY - EPS_SMALL Then
|
ElseIf dOffsetY <= dMinOffsetY - EPS_SMALL Then
|
||||||
NotifyPropertyChanged("OffsetY")
|
NotifyPropertyChanged("OffsetY")
|
||||||
@@ -496,6 +498,7 @@ Public Class RawPartTabVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_PrecKerf As Double = 1
|
||||||
Private m_InvertKerf As Double = 1
|
Private m_InvertKerf As Double = 1
|
||||||
Public ReadOnly Property InvertKerf As Double
|
Public ReadOnly Property InvertKerf As Double
|
||||||
Get
|
Get
|
||||||
@@ -510,12 +513,18 @@ Public Class RawPartTabVM
|
|||||||
Private m_dKerf As Double
|
Private m_dKerf As Double
|
||||||
Public Property Kerf As String
|
Public Property Kerf As String
|
||||||
Get
|
Get
|
||||||
Return LenToString(m_dKerf * m_InvertKerf, -2)
|
Return LenToString(m_dKerf * m_InvertKerf, 2)
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
Dim dKerf As Double = 0
|
Dim dKerf As Double = 0
|
||||||
Dim dMaxKerf As Double = Math.Min(Math.Min(m_dOffsetX, m_dOffsetY),
|
Dim dMaxKerf As Double = Math.Min(Math.Min(m_dOffsetX, m_dOffsetY),
|
||||||
Math.Min(m_dTableLength - m_dLength - m_dOffsetX, m_dTableWidth - m_dWidth - m_dOffsetY))
|
Math.Min(m_dTableLength - m_dLength - m_dOffsetX, m_dTableWidth - m_dWidth - m_dOffsetY))
|
||||||
|
' recuper il segno del valore del Kerf precedente
|
||||||
|
Dim dInvertKerf As Double = 1
|
||||||
|
EgtGetInfo(EgtGetFirstRawPart(), KEY_INVERT_KERF, dInvertKerf)
|
||||||
|
m_PrecKerf = Math.Abs(m_dKerf)
|
||||||
|
m_PrecKerf = m_PrecKerf * dInvertKerf
|
||||||
|
|
||||||
' carcio di dati della lastra letti da intrfaccia
|
' carcio di dati della lastra letti da intrfaccia
|
||||||
Dim dRawLength, dRawWidth, dRawOffsetX, dRawOffsetY As Double
|
Dim dRawLength, dRawWidth, dRawOffsetX, dRawOffsetY As Double
|
||||||
If Not StringToLen(Length, dRawLength) Then Return
|
If Not StringToLen(Length, dRawLength) Then Return
|
||||||
@@ -526,9 +535,22 @@ Public Class RawPartTabVM
|
|||||||
If Not StringToLen(value, dKerf) Then
|
If Not StringToLen(value, dKerf) Then
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' interrompo il processo di caricamento dati se il valore della TexBox è lo stesso della calsse
|
||||||
|
If dKerf * dInvertKerf = m_dKerf Then Return
|
||||||
|
|
||||||
If dKerf >= 0 And dKerf < dMaxKerf + EPS_SMALL Then
|
If dKerf >= 0 And dKerf < dMaxKerf + EPS_SMALL Then
|
||||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||||
If GetRawMode() <> RAWMODE.FROM_PHOTO Then
|
If GetRawMode() <> RAWMODE.FROM_PHOTO Then
|
||||||
|
If m_PrecKerf < 0 Then
|
||||||
|
' definsco la dimensione del grezzo pari a quella del kerf
|
||||||
|
m_dKerf = 0
|
||||||
|
AdjustRawPartNegativeKerf()
|
||||||
|
UpdateCircles()
|
||||||
|
UpdateRawPartKerf()
|
||||||
|
m_dKerf = dKerf
|
||||||
|
m_PrecKerf = 0
|
||||||
|
End If
|
||||||
' Specifico che si tratta di un Kerf negativo (per interfaccia grafica)
|
' Specifico che si tratta di un Kerf negativo (per interfaccia grafica)
|
||||||
EgtSetInfo(EstCalc.GetRawId(), KEY_INVERT_KERF, 1)
|
EgtSetInfo(EstCalc.GetRawId(), KEY_INVERT_KERF, 1)
|
||||||
SetInvertKerf(1)
|
SetInvertKerf(1)
|
||||||
@@ -538,7 +560,7 @@ Public Class RawPartTabVM
|
|||||||
m_dOffsetX = dRawOffsetX
|
m_dOffsetX = dRawOffsetX
|
||||||
m_dOffsetY = dRawOffsetY
|
m_dOffsetY = dRawOffsetY
|
||||||
m_dKerf = dKerf
|
m_dKerf = dKerf
|
||||||
RecalcRawPart()
|
' RecalcRawPart()
|
||||||
UpdateRawPartKerf()
|
UpdateRawPartKerf()
|
||||||
' Recupero id contorno kerf
|
' Recupero id contorno kerf
|
||||||
Dim nKerfId As Integer = EgtGetFirstNameInGroup(EstCalc.GetRawId(), NAME_KERF)
|
Dim nKerfId As Integer = EgtGetFirstNameInGroup(EstCalc.GetRawId(), NAME_KERF)
|
||||||
@@ -554,14 +576,37 @@ Public Class RawPartTabVM
|
|||||||
EgtSetInfo(EstCalc.GetRawId(), KEY_INVERT_KERF, -1)
|
EgtSetInfo(EstCalc.GetRawId(), KEY_INVERT_KERF, -1)
|
||||||
SetInvertKerf(-1)
|
SetInvertKerf(-1)
|
||||||
' aggiorno dati grezzo (partendo dalle dimensioni esterne del grezzo)
|
' aggiorno dati grezzo (partendo dalle dimensioni esterne del grezzo)
|
||||||
m_dLength = dRawLength + 2 * dKerf
|
If m_PrecKerf >= 0 Then
|
||||||
m_dWidth = dRawWidth + 2 * dKerf
|
m_dLength = dRawLength + 2 * dKerf
|
||||||
m_dOffsetX = dRawOffsetX - dKerf
|
m_dWidth = dRawWidth + 2 * dKerf
|
||||||
m_dOffsetY = dRawOffsetY - dKerf
|
m_dOffsetX = dRawOffsetX - dKerf
|
||||||
|
m_dOffsetY = dRawOffsetY - dKerf
|
||||||
|
End If
|
||||||
m_dKerf = -dKerf
|
m_dKerf = -dKerf
|
||||||
RecalcRawPart()
|
If m_PrecKerf >= 0 Then
|
||||||
|
' definsco la dimensione del grezzo pari a quella del kerf
|
||||||
|
m_dKerf = 0
|
||||||
|
AdjustRawPartNegativeKerf(False)
|
||||||
|
EgtDraw()
|
||||||
|
UpdateCircles()
|
||||||
|
EgtDraw()
|
||||||
|
UpdateRawPartKerf()
|
||||||
|
EgtDraw()
|
||||||
|
m_dKerf = -dKerf
|
||||||
|
m_PrecKerf = 0
|
||||||
|
End If
|
||||||
|
If Not AdjustRawPartNegativeKerf() Then
|
||||||
|
' se fallisce la generazione (TEMPORANEAMENTE) ripristino l'ultimo valore inserito (vedi riga sopra)!
|
||||||
|
m_dKerf = 0
|
||||||
|
NotifyPropertyChanged("Kerf")
|
||||||
|
End If
|
||||||
|
EgtDraw()
|
||||||
|
UpdateCircles()
|
||||||
|
EgtDraw()
|
||||||
|
' RecalcRawPart()
|
||||||
'EstCalc.UpdateRawPart()
|
'EstCalc.UpdateRawPart()
|
||||||
UpdateRawPartKerf()
|
'UpdateRawPartKerf()
|
||||||
|
|
||||||
' Recupero id contorno kerf
|
' Recupero id contorno kerf
|
||||||
Dim nKerfId As Integer = EgtGetFirstNameInGroup(EstCalc.GetRawId(), NAME_KERF)
|
Dim nKerfId As Integer = EgtGetFirstNameInGroup(EstCalc.GetRawId(), NAME_KERF)
|
||||||
' Modifico il colore
|
' Modifico il colore
|
||||||
@@ -601,6 +646,8 @@ Public Class RawPartTabVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Parametri Grezzo
|
||||||
|
|
||||||
Public ReadOnly Property MaterialList As ObservableCollection(Of Material)
|
Public ReadOnly Property MaterialList As ObservableCollection(Of Material)
|
||||||
Get
|
Get
|
||||||
Return CurrentMachine.Materials
|
Return CurrentMachine.Materials
|
||||||
@@ -942,6 +989,7 @@ Public Class RawPartTabVM
|
|||||||
If OmagOFFICEMap.refMainWindowVM.MainWindowM.m_SlabDB Then
|
If OmagOFFICEMap.refMainWindowVM.MainWindowM.m_SlabDB Then
|
||||||
'Me.OmagPhoto = New OmagPhotoV(Application.Current.MainWindow(), New OmagPhotoVM)
|
'Me.OmagPhoto = New OmagPhotoV(Application.Current.MainWindow(), New OmagPhotoVM)
|
||||||
Me.OmagPhoto = New OmagPhotoV
|
Me.OmagPhoto = New OmagPhotoV
|
||||||
|
If Not PhotoMap.ContinueApplication Then End
|
||||||
End If
|
End If
|
||||||
' Aggiungo voci alla lista di tipi di definizione grezzo
|
' Aggiungo voci alla lista di tipi di definizione grezzo
|
||||||
m_TypeList.Add(EgtMsg(MSG_RAWPARTPAGEUC + 1))
|
m_TypeList.Add(EgtMsg(MSG_RAWPARTPAGEUC + 1))
|
||||||
@@ -1013,6 +1061,7 @@ Public Class RawPartTabVM
|
|||||||
NotifyPropertyChanged("Width")
|
NotifyPropertyChanged("Width")
|
||||||
NotifyPropertyChanged("OffsetX")
|
NotifyPropertyChanged("OffsetX")
|
||||||
NotifyPropertyChanged("OffsetY")
|
NotifyPropertyChanged("OffsetY")
|
||||||
|
NotifyPropertyChanged("Height")
|
||||||
NotifyPropertyChanged("Kerf")
|
NotifyPropertyChanged("Kerf")
|
||||||
' aggiorno offset e rotazione foto
|
' aggiorno offset e rotazione foto
|
||||||
Dim dPhotoOffsetX, dPhotoOffsetY, dPhotoRot As Double
|
Dim dPhotoOffsetX, dPhotoOffsetY, dPhotoRot As Double
|
||||||
@@ -1077,6 +1126,8 @@ Public Class RawPartTabVM
|
|||||||
ElseIf dRawKerf > Math.Min(m_dTableLength, m_dTableWidth) / 5 Then
|
ElseIf dRawKerf > Math.Min(m_dTableLength, m_dTableWidth) / 5 Then
|
||||||
dRawKerf = Math.Min(m_dTableLength, m_dTableWidth) / 5
|
dRawKerf = Math.Min(m_dTableLength, m_dTableWidth) / 5
|
||||||
End If
|
End If
|
||||||
|
' assegno il valore del Kerf corrente
|
||||||
|
m_PrecKerf = dRawKerf
|
||||||
If dRawLen < 0 Then
|
If dRawLen < 0 Then
|
||||||
dRawLen = 100
|
dRawLen = 100
|
||||||
ElseIf dRawLen > m_dTableLength - 2 * dRawKerf Then
|
ElseIf dRawLen > m_dTableLength - 2 * dRawKerf Then
|
||||||
@@ -1305,12 +1356,58 @@ Public Class RawPartTabVM
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
' -------------------------------- INIZIO Nuove funzioni per la gestione del Kerf negativo --------------------------------
|
||||||
|
|
||||||
|
Private Function AdjustRawPartNegativeKerf(Optional NegativeOffset As Boolean = True) As Boolean
|
||||||
|
' Se non c'è il grezzo, esco
|
||||||
|
If EstCalc.GetRawId() = GDB_ID.NULL Then Return False
|
||||||
|
' Cancello eventuale vecchio contorno di kerf
|
||||||
|
Dim nKerfId As Integer = EgtGetFirstNameInGroup(EstCalc.GetRawId(), NAME_KERF)
|
||||||
|
Dim nInvert As Double = 1
|
||||||
|
If Not NegativeOffset Then
|
||||||
|
nInvert = -1
|
||||||
|
End If
|
||||||
|
Dim dOffset As Double = (-m_dKerf - m_PrecKerf) * nInvert
|
||||||
|
EgtSaveFile("c:\EgtData\OmagOFFICE\Temp\Error.nge", NGE.TEXT)
|
||||||
|
Dim nCount As Integer = 0
|
||||||
|
Dim bOK As Boolean = EgtOffsetCurve(nKerfId, dOffset, OFF_TYPE.EXTEND)
|
||||||
|
EgtSetColor(nKerfId, m_KerfCol)
|
||||||
|
' ------ Gestione corretta dei kerf ------
|
||||||
|
'Dim nNewKerfId As Integer = EgtOffsetCurveAdv(nKerfId, dOffset, OFF_TYPE.EXTEND, nCount)
|
||||||
|
'EgtSetColor(nNewKerfId, m_KerfCol)
|
||||||
|
'EgtSetName(nNewKerfId, "Kerf")
|
||||||
|
'EgtErase(nKerfId)
|
||||||
|
'-----------------------------------------
|
||||||
|
' Salvo il valore del kerf (sempre in mm)
|
||||||
|
EgtSetInfo(EstCalc.GetRawId(), KEY_KERF, m_dKerf)
|
||||||
|
Return bOK
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function AdjustRawPartPositionNegativeKerf() As Boolean
|
||||||
|
' Sistemo la posizione
|
||||||
|
Dim ptRef As New Point3d(m_dOffsetX, m_dOffsetY, CurrentMachine.dAdditionalTable)
|
||||||
|
If EgtMoveToCornerRawPart(EstCalc.GetRawId(), ptRef, MCH_CR.BL) Then
|
||||||
|
' Parametro ereditato da OmagCUT
|
||||||
|
' OkBtn.IsEnabled = True
|
||||||
|
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||||
|
Else
|
||||||
|
' OkBtn.IsEnabled = False
|
||||||
|
Dim sMsg As String = EgtMsg(MSG_RAWPARTPAGEUC + 47)
|
||||||
|
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(sMsg, 3, MSG_TYPE.ERROR_) ' Errore nella posizione o dimensione del grezzo
|
||||||
|
End If
|
||||||
|
' Aggiorno visualizzazione
|
||||||
|
EgtZoom(ZM.ALL)
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' -------------------------------- FINE Nuove funzioni per la gestione del Kerf negativo --------------------------------
|
||||||
|
|
||||||
Private Sub UpdateRawPartHeight()
|
Private Sub UpdateRawPartHeight()
|
||||||
' Se da creare
|
' Se da creare
|
||||||
If EstCalc.GetRawId() = GDB_ID.NULL Then
|
If EstCalc.GetRawId() = GDB_ID.NULL Then
|
||||||
RecalcRawPart(True)
|
RecalcRawPart(True)
|
||||||
Return
|
Return
|
||||||
' se da cancellare
|
' se da cancellare
|
||||||
ElseIf m_dHeight < EPS_SMALL Then
|
ElseIf m_dHeight < EPS_SMALL Then
|
||||||
' Se ci sono pezzi
|
' Se ci sono pezzi
|
||||||
If EgtGetFirstPartInRawPart(EstCalc.GetRawId()) <> GDB_ID.NULL Then
|
If EgtGetFirstPartInRawPart(EstCalc.GetRawId()) <> GDB_ID.NULL Then
|
||||||
@@ -1331,7 +1428,7 @@ Public Class RawPartTabVM
|
|||||||
End If
|
End If
|
||||||
' Elimino il grezzo
|
' Elimino il grezzo
|
||||||
EgtRemoveRawPart(EstCalc.GetRawId())
|
EgtRemoveRawPart(EstCalc.GetRawId())
|
||||||
' altrimenti da aggiornare
|
' altrimenti da aggiornare
|
||||||
Else
|
Else
|
||||||
' Salvo vecchia altezza
|
' Salvo vecchia altezza
|
||||||
Dim dOldHeight As Double = EstCalc.GetRawHeight()
|
Dim dOldHeight As Double = EstCalc.GetRawHeight()
|
||||||
@@ -1350,7 +1447,12 @@ Public Class RawPartTabVM
|
|||||||
EgtMovePartInRawPart(nPartId, vtMove)
|
EgtMovePartInRawPart(nPartId, vtMove)
|
||||||
nPartId = EgtGetNextPartInRawPart(nPartId)
|
nPartId = EgtGetNextPartInRawPart(nPartId)
|
||||||
End While
|
End While
|
||||||
|
' aggiorno la posizione dei cerchi del Kerf
|
||||||
|
UpdateCircles()
|
||||||
|
' Aggiorno la posizione della zona rovinata
|
||||||
|
UpdateDemageArea(vtMove)
|
||||||
End If
|
End If
|
||||||
|
' aggiorno l'Id del grezzo
|
||||||
EstCalc.UpdateRawPart()
|
EstCalc.UpdateRawPart()
|
||||||
' Se c'è foto, aggiorno quota fotografia
|
' Se c'è foto, aggiorno quota fotografia
|
||||||
If GetPhoto() <> GDB_ID.NULL Then
|
If GetPhoto() <> GDB_ID.NULL Then
|
||||||
@@ -1374,7 +1476,7 @@ Public Class RawPartTabVM
|
|||||||
Dim Col = m_RawCol
|
Dim Col = m_RawCol
|
||||||
If GetPhoto() <> GDB_ID.NULL Then Col.A = 20
|
If GetPhoto() <> GDB_ID.NULL Then Col.A = 20
|
||||||
' Aggiorno il grezzo
|
' Aggiorno il grezzo
|
||||||
EgtModifyRawPart(EstCalc.GetRawId(), nKerfId, m_dKerf, m_ptTableMin.z, m_dHeight, Col)
|
Dim x As Boolean = EgtModifyRawPart(EstCalc.GetRawId(), nKerfId, m_dKerf, m_ptTableMin.z, m_dHeight, Col)
|
||||||
' Salvo il nuovo valore (sempre in mm)
|
' Salvo il nuovo valore (sempre in mm)
|
||||||
EgtSetInfo(EstCalc.GetRawId(), KEY_KERF, m_dKerf)
|
EgtSetInfo(EstCalc.GetRawId(), KEY_KERF, m_dKerf)
|
||||||
' Aggiorno dimensioni e posizione grezzo
|
' Aggiorno dimensioni e posizione grezzo
|
||||||
@@ -1425,6 +1527,16 @@ Public Class RawPartTabVM
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub UpdateDemageArea(vtMove As Vector3d)
|
||||||
|
Dim nId As Integer = GDB_ID.NULL
|
||||||
|
nId = EgtGetFirstNameInGroup(EstCalc.GetRawId(), NAME_DAMAGED)
|
||||||
|
While nId <> GDB_ID.NULL
|
||||||
|
EgtMove(nId, vtMove)
|
||||||
|
nId = EgtGetNext(nId)
|
||||||
|
End While
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub ModifyPhoto(vtMove As Vector3d)
|
Private Sub ModifyPhoto(vtMove As Vector3d)
|
||||||
' Non ci deve essere movimento in Z
|
' Non ci deve essere movimento in Z
|
||||||
vtMove.z = 0
|
vtMove.z = 0
|
||||||
|
|||||||
@@ -101,9 +101,9 @@ Public Class MachineAxis
|
|||||||
EgtSetAxisPos(m_Name, dVal)
|
EgtSetAxisPos(m_Name, dVal)
|
||||||
EgtGetAxisPos(m_Name, dVal)
|
EgtGetAxisPos(m_Name, dVal)
|
||||||
If m_Linear Then
|
If m_Linear Then
|
||||||
Value = LenToString(dVal, -3)
|
Value = LenToString(dVal, 3)
|
||||||
Else
|
Else
|
||||||
Value = DoubleToString(dVal, -3)
|
Value = DoubleToString(dVal, 3)
|
||||||
End If
|
End If
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -9,6 +9,6 @@ Documentazione del progetto Omag Office
|
|||||||
|
|
||||||
|
|
||||||
| vers | data | note |
|
| vers | data | note |
|
||||||
|-----|-----|-----|
|
| ---- | ---- | ---- |
|
||||||
|1.0|aaa| bbb|
|
| 2.3g1 | 6/07/2021 | Add: Nuova gestione sovra-tavola |
|
||||||
|
|
||||||
|
|||||||
@@ -13,17 +13,19 @@
|
|||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Grid Visibility="{Binding Legenda_Visibility}"
|
<!--Titolo delle colonne-->
|
||||||
|
<Grid Visibility="{Binding Legenda_Visibility}"
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Margin="0,0,0,5">
|
Margin="0,0,0,5">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1.8*"/>
|
<ColumnDefinition Width="1.8*"/>
|
||||||
<ColumnDefinition Width="0.6*"/>
|
<ColumnDefinition Width="0.6*"/>
|
||||||
<ColumnDefinition Width="0.6*"/>
|
<ColumnDefinition Width="0.6*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
<!--Prima colonna-->
|
||||||
<TextBlock Text="{Binding FirstColumnMsg}" Grid.Column="1" HorizontalAlignment="Center"/>
|
<TextBlock Text="{Binding FirstColumnMsg}" Grid.Column="1" HorizontalAlignment="Center"/>
|
||||||
<TextBlock Text="{Binding SecondColumnMsg}" Grid.Column="2" HorizontalAlignment="Center"/>
|
<!--Seconda colonna-->
|
||||||
|
<TextBlock Text="{Binding SecondColumnMsg}" Grid.Column="2" HorizontalAlignment="Center"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<EgtWPFLib5:EgtScrollViewer VerticalScrollBarVisibility="Auto"
|
<EgtWPFLib5:EgtScrollViewer VerticalScrollBarVisibility="Auto"
|
||||||
@@ -38,8 +40,10 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
<!--Nome della riga ("An")-->
|
||||||
<TextBlock Text="{Binding sEntityName}"
|
<TextBlock Text="{Binding sEntityName}"
|
||||||
VerticalAlignment="Center"/>
|
VerticalAlignment="Center"/>
|
||||||
|
|
||||||
<!--Drip e Engrave-->
|
<!--Drip e Engrave-->
|
||||||
<UniformGrid Grid.Column="1" Columns="3" Rows="1">
|
<UniformGrid Grid.Column="1" Columns="3" Rows="1">
|
||||||
<CheckBox IsChecked="{Binding bIsChecked}"
|
<CheckBox IsChecked="{Binding bIsChecked}"
|
||||||
@@ -56,6 +60,7 @@
|
|||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Margin="2.5,0,0,0"/>
|
Margin="2.5,0,0,0"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
<!--SideAngle-->
|
<!--SideAngle-->
|
||||||
<UniformGrid Grid.Column="1" Columns="2" Rows="1">
|
<UniformGrid Grid.Column="1" Columns="2" Rows="1">
|
||||||
<EgtWPFLib5:EgtTextBox Text="{Binding GrphSideAngle}"
|
<EgtWPFLib5:EgtTextBox Text="{Binding GrphSideAngle}"
|
||||||
@@ -67,6 +72,41 @@
|
|||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Margin="2.5,0,0,0"/>
|
Margin="2.5,0,0,0"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
|
|
||||||
|
<!--Alz&Front-->
|
||||||
|
<Grid Grid.ColumnSpan="2"
|
||||||
|
Grid.Row="2"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1.8*"/>
|
||||||
|
<ColumnDefinition Width="0.6*"/>
|
||||||
|
<ColumnDefinition Width="0.6*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<CheckBox IsChecked="{Binding bIsCheckedAlz}"
|
||||||
|
Grid.Column="1"
|
||||||
|
Visibility="{Binding CheckAlz_Visibility}"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"/>
|
||||||
|
<CheckBox IsChecked="{Binding bIsCheckedFront}"
|
||||||
|
Grid.Column="2"
|
||||||
|
Visibility="{Binding CheckFront_Visibility}"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"/>
|
||||||
|
</Grid>
|
||||||
|
<!--<UniformGrid Grid.Column="1" Columns="2" Rows="1">
|
||||||
|
<CheckBox IsChecked="{Binding bIsCheckedAlz}"
|
||||||
|
Grid.Column="1"
|
||||||
|
Visibility="{Binding CheckAlz_Visibility}"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"/>
|
||||||
|
<CheckBox IsChecked="{Binding bIsCheckedFront}"
|
||||||
|
Grid.Column="1"
|
||||||
|
Visibility="{Binding CheckFront_Visibility}"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"/>
|
||||||
|
</UniformGrid>-->
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
@@ -104,7 +144,7 @@
|
|||||||
<EgtWPFLib5:EgtTextBox Text="{Binding Parameter2a}"/>
|
<EgtWPFLib5:EgtTextBox Text="{Binding Parameter2a}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Text="{Binding Parameter2b}"/>
|
<EgtWPFLib5:EgtTextBox Text="{Binding Parameter2b}"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid Visibility="{Binding Parameter23_Visibility}"
|
<Grid Visibility="{Binding Parameter23_Visibility}"
|
||||||
Grid.Row="4"
|
Grid.Row="4"
|
||||||
|
|||||||
@@ -5,11 +5,20 @@ Imports EgtWPFLib5
|
|||||||
Public Class SideEntityControlVM
|
Public Class SideEntityControlVM
|
||||||
Inherits VMBase
|
Inherits VMBase
|
||||||
|
|
||||||
|
Private Const INFO_ALZFRONT As String = "AF"
|
||||||
|
|
||||||
Public Enum ModeOpt As Integer
|
Public Enum ModeOpt As Integer
|
||||||
SIDEANGLE = 0 ' inclina lato
|
SIDEANGLE = 0 ' inclina lato
|
||||||
DRIP = 1 ' incidi da sotto
|
DRIP = 1 ' incidi da sotto
|
||||||
ENGRAVE = 2 ' incidi da sopra
|
ENGRAVE = 2 ' incidi da sopra
|
||||||
FILOTOP = 3 ' filo top
|
FILOTOP = 3 ' filo top
|
||||||
|
ALZANDFRONT = 4 ' alzatine e frontalini
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum ModeAlzAndFront
|
||||||
|
ALZATINA = 0
|
||||||
|
FRONTALINO = 1
|
||||||
|
NONE = 2
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
Public Enum CallingWindowOpt As Integer
|
Public Enum CallingWindowOpt As Integer
|
||||||
@@ -33,11 +42,14 @@ Public Class SideEntityControlVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
#Region "Titolo colonne"
|
||||||
|
|
||||||
' stampa il nome delle colonne
|
' stampa il nome delle colonne
|
||||||
Public ReadOnly Property Legenda_Visibility As Visibility
|
Public ReadOnly Property Legenda_Visibility As Visibility
|
||||||
Get
|
Get
|
||||||
If m_Mode = SideEntityControlVM.ModeOpt.FILOTOP OrElse
|
If m_Mode = SideEntityControlVM.ModeOpt.FILOTOP OrElse m_SideEntityList.Count() = 0 Then
|
||||||
m_SideEntityList.Count() = 0 Then
|
Return Visibility.Collapsed
|
||||||
|
ElseIf m_Mode = SideEntityControlVM.ModeOpt.SIDEANGLE And m_SideAngleCheck Then
|
||||||
Return Visibility.Collapsed
|
Return Visibility.Collapsed
|
||||||
Else
|
Else
|
||||||
Return Visibility.Visible
|
Return Visibility.Visible
|
||||||
@@ -54,6 +66,9 @@ Public Class SideEntityControlVM
|
|||||||
ElseIf m_Mode = SideEntityControlVM.ModeOpt.SIDEANGLE Then
|
ElseIf m_Mode = SideEntityControlVM.ModeOpt.SIDEANGLE Then
|
||||||
' A°
|
' A°
|
||||||
sMsg = EgtMsg(91653)
|
sMsg = EgtMsg(91653)
|
||||||
|
ElseIf m_Mode = SideEntityControlVM.ModeOpt.ALZANDFRONT Then
|
||||||
|
' Alz
|
||||||
|
sMsg = "Alz."
|
||||||
End If
|
End If
|
||||||
Return sMsg
|
Return sMsg
|
||||||
End Get
|
End Get
|
||||||
@@ -68,32 +83,17 @@ Public Class SideEntityControlVM
|
|||||||
ElseIf m_Mode = SideEntityControlVM.ModeOpt.SIDEANGLE Then
|
ElseIf m_Mode = SideEntityControlVM.ModeOpt.SIDEANGLE Then
|
||||||
' T
|
' T
|
||||||
sMsg = EgtMsg(91654)
|
sMsg = EgtMsg(91654)
|
||||||
|
ElseIf m_Mode = SideEntityControlVM.ModeOpt.ALZANDFRONT Then
|
||||||
|
' Front
|
||||||
|
sMsg = "Front."
|
||||||
End If
|
End If
|
||||||
Return sMsg
|
Return sMsg
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private m_Parameter23_Visibility As Visibility
|
#End Region 'Titolo colonne
|
||||||
Public Property Parameter23_Visibility As Visibility
|
|
||||||
Get
|
|
||||||
Return m_Parameter23_Visibility
|
|
||||||
End Get
|
|
||||||
Set(value As Visibility)
|
|
||||||
m_Parameter23_Visibility = value
|
|
||||||
NotifyPropertyChanged("Parameter23_Visibility")
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_Parameter4_Visibility As Visibility
|
#Region "Parameter 1"
|
||||||
Public Property Parameter4_Visibility As Visibility
|
|
||||||
Get
|
|
||||||
Return m_Parameter4_Visibility
|
|
||||||
End Get
|
|
||||||
Set(value As Visibility)
|
|
||||||
m_Parameter4_Visibility = value
|
|
||||||
NotifyPropertyChanged(NameOf(Parameter4_Visibility))
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_Parameter1_Visibility As Visibility
|
Private m_Parameter1_Visibility As Visibility
|
||||||
Public ReadOnly Property Parameter1_Visibility As Visibility
|
Public ReadOnly Property Parameter1_Visibility As Visibility
|
||||||
@@ -116,7 +116,7 @@ Public Class SideEntityControlVM
|
|||||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||||
Return DoubleToString(m_Parameter1, 2)
|
Return DoubleToString(m_Parameter1, 2)
|
||||||
Else
|
Else
|
||||||
Return LenToString(m_Parameter1, -2)
|
Return LenToString(m_Parameter1, 2)
|
||||||
End If
|
End If
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
@@ -145,15 +145,22 @@ Public Class SideEntityControlVM
|
|||||||
StringToLen(value, m_dDripOffset)
|
StringToLen(value, m_dDripOffset)
|
||||||
' Creo le geometrie dei gocciolatoi
|
' Creo le geometrie dei gocciolatoi
|
||||||
RefreshSideAngleText()
|
RefreshSideAngleText()
|
||||||
|
' Aggiorno i dati delle alette
|
||||||
|
RefreshDataAlzAndFront()
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Sub SetParameter1(value As Double)
|
Private Sub SetParameter1(value As Double)
|
||||||
m_Parameter1 = value
|
m_Parameter1 = value
|
||||||
SideAngleEntity.m_Parameter1 = value
|
SideAngleEntity.m_Parameter1 = value
|
||||||
|
AlzAndFrontEntity.m_Parameter1 = value
|
||||||
NotifyPropertyChanged("Parameter1")
|
NotifyPropertyChanged("Parameter1")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#End Region 'Parameter 1
|
||||||
|
|
||||||
|
#Region "Parameter 2"
|
||||||
|
|
||||||
Private m_Parameter2_Visibility As Visibility = Visibility.Visible
|
Private m_Parameter2_Visibility As Visibility = Visibility.Visible
|
||||||
Public Property Parameter2_Visibility As Visibility
|
Public Property Parameter2_Visibility As Visibility
|
||||||
Get
|
Get
|
||||||
@@ -171,7 +178,7 @@ Public Class SideEntityControlVM
|
|||||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||||
Return LenToString(m_Parameter2, 2)
|
Return LenToString(m_Parameter2, 2)
|
||||||
Else
|
Else
|
||||||
Return LenToString(m_Parameter2, -2)
|
Return LenToString(m_Parameter2, 2)
|
||||||
End If
|
End If
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
@@ -225,23 +232,40 @@ Public Class SideEntityControlVM
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private m_Parameter2a As Integer
|
Private m_Parameter2a As Integer
|
||||||
|
Private m_dParameter2a As Double
|
||||||
Public Property Parameter2a As String
|
Public Property Parameter2a As String
|
||||||
Get
|
Get
|
||||||
|
If m_Mode = ModeOpt.ALZANDFRONT Then
|
||||||
|
Return DoubleToString(m_dParameter2a, 2)
|
||||||
|
End If
|
||||||
Return DoubleToString(m_Parameter2a, 2)
|
Return DoubleToString(m_Parameter2a, 2)
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
|
' recupero il valore passato come intero
|
||||||
StringToInt(value, m_Parameter2a)
|
StringToInt(value, m_Parameter2a)
|
||||||
|
' recupero il valore passato come double
|
||||||
|
StringToDouble(value, m_dParameter2a)
|
||||||
' Recupero il valore
|
' Recupero il valore
|
||||||
StringToInt(value, m_nEngrNbr2)
|
StringToInt(value, m_nEngrNbr2)
|
||||||
' Creo le geometrie dei gocciolatoi
|
' Creo le geometrie dei gocciolatoi
|
||||||
RefreshSideAngleText()
|
RefreshSideAngleText()
|
||||||
|
' Aggiorno i dati delle alette
|
||||||
|
RefreshDataAlzAndFront()
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
' Gestione del dato intero (Incisioni)
|
||||||
Private Sub SetParameter2a(value As Integer)
|
Private Sub SetParameter2a(value As Integer)
|
||||||
m_Parameter2a = value
|
m_Parameter2a = value
|
||||||
SideAngleEntity.m_Parameter2a = value
|
SideAngleEntity.m_Parameter2a = value
|
||||||
NotifyPropertyChanged("Parameter2a")
|
NotifyPropertyChanged("Parameter2a")
|
||||||
End Sub
|
End Sub
|
||||||
|
' Gestione del dato Double (Alette)
|
||||||
|
Private Sub SetdParameter2a(value As Double)
|
||||||
|
m_dParameter2a = value
|
||||||
|
SideAngleEntity.m_dParameter2a = value
|
||||||
|
AlzAndFrontEntity.m_dParameter2a = value
|
||||||
|
NotifyPropertyChanged("Parameter2a")
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private m_Parameter2b As Double
|
Private m_Parameter2b As Double
|
||||||
Public Property Parameter2b As String
|
Public Property Parameter2b As String
|
||||||
@@ -254,18 +278,36 @@ Public Class SideEntityControlVM
|
|||||||
StringToLen(value, m_dDripOffset2)
|
StringToLen(value, m_dDripOffset2)
|
||||||
' Creo le geometrie dei gocciolatoi
|
' Creo le geometrie dei gocciolatoi
|
||||||
RefreshSideAngleText()
|
RefreshSideAngleText()
|
||||||
|
' Aggiorno i dati delle alette
|
||||||
|
RefreshDataAlzAndFront()
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Sub SetParameter2b(value As Double)
|
Private Sub SetParameter2b(value As Double)
|
||||||
m_Parameter2b = value
|
m_Parameter2b = value
|
||||||
SideAngleEntity.m_Parameter2b = value
|
SideAngleEntity.m_Parameter2b = value
|
||||||
|
AlzAndFrontEntity.m_Parameter2b = value
|
||||||
NotifyPropertyChanged("Parameter2b")
|
NotifyPropertyChanged("Parameter2b")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#End Region 'Parameter 2
|
||||||
|
|
||||||
|
#Region "Parameter 3"
|
||||||
|
|
||||||
|
Private m_Parameter23_Visibility As Visibility
|
||||||
|
Public Property Parameter23_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_Parameter23_Visibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_Parameter23_Visibility = value
|
||||||
|
NotifyPropertyChanged("Parameter23_Visibility")
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_Parameter3 As Double
|
Private m_Parameter3 As Double
|
||||||
Public Property Parameter3 As String
|
Public Property Parameter3 As String
|
||||||
Get
|
Get
|
||||||
Return LenToString(m_Parameter3, -2)
|
Return LenToString(m_Parameter3, 2)
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If m_Mode <> ModeOpt.SIDEANGLE Then
|
If m_Mode <> ModeOpt.SIDEANGLE Then
|
||||||
@@ -273,18 +315,36 @@ Public Class SideEntityControlVM
|
|||||||
m_dDripDepth = m_Parameter3
|
m_dDripDepth = m_Parameter3
|
||||||
' Creo le geometrie dei gocciolatoi
|
' Creo le geometrie dei gocciolatoi
|
||||||
RefreshSideAngleText()
|
RefreshSideAngleText()
|
||||||
|
' Aggiorno i dati delle alette
|
||||||
|
RefreshDataAlzAndFront()
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Sub SetParameter3(value As Double)
|
Private Sub SetParameter3(value As Double)
|
||||||
m_Parameter3 = value
|
m_Parameter3 = value
|
||||||
|
AlzAndFrontEntity.m_Parameter3 = value
|
||||||
NotifyPropertyChanged("Parameter3")
|
NotifyPropertyChanged("Parameter3")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#End Region 'Parameter 3
|
||||||
|
|
||||||
|
#Region "Parameter 4"
|
||||||
|
|
||||||
|
Private m_Parameter4_Visibility As Visibility
|
||||||
|
Public Property Parameter4_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_Parameter4_Visibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_Parameter4_Visibility = value
|
||||||
|
NotifyPropertyChanged(NameOf(Parameter4_Visibility))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_Parameter4 As Double
|
Private m_Parameter4 As Double
|
||||||
Public Property Parameter4 As String
|
Public Property Parameter4 As String
|
||||||
Get
|
Get
|
||||||
Return LenToString(m_Parameter4, -2)
|
Return LenToString(m_Parameter4, 2)
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
If m_Mode <> ModeOpt.SIDEANGLE Then
|
If m_Mode <> ModeOpt.SIDEANGLE Then
|
||||||
@@ -300,8 +360,15 @@ Public Class SideEntityControlVM
|
|||||||
NotifyPropertyChanged("Parameter4")
|
NotifyPropertyChanged("Parameter4")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#End Region 'Parameter 4
|
||||||
|
|
||||||
Private m_dSideAngle As Double = 0
|
Private m_dSideAngle As Double = 0
|
||||||
|
|
||||||
|
Private m_HeightA As Double = 0
|
||||||
|
Private m_HeightF As Double = 0
|
||||||
|
Private m_DeltaAngF As Double = 0
|
||||||
|
Private m_DeltaAngA As Double = 0
|
||||||
|
|
||||||
Private m_dOffsetFiloTop As Double = 5
|
Private m_dOffsetFiloTop As Double = 5
|
||||||
Private m_dDepthFiloTop As Double = 5
|
Private m_dDepthFiloTop As Double = 5
|
||||||
|
|
||||||
@@ -338,15 +405,24 @@ Public Class SideEntityControlVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property Parameter3Msg As String
|
Private m_Parameter3Msg As String = EgtMsg(MSG_IMPORTPAGEUC + 11)
|
||||||
|
Public Property Parameter3Msg As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg(MSG_IMPORTPAGEUC + 11) ' Affondamento
|
Return m_Parameter3Msg ' Affondamento
|
||||||
End Get
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_Parameter3Msg = value
|
||||||
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Public ReadOnly Property Parameter4Msg As String
|
|
||||||
|
Private m_Parameter4Msg As String = EgtMsg(MSG_IMPORTPAGEUC + 12)
|
||||||
|
Public Property Parameter4Msg As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg(MSG_IMPORTPAGEUC + 12) ' Accorciamento
|
Return m_Parameter4Msg ' Accorciamento
|
||||||
End Get
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_Parameter4Msg = value
|
||||||
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
#End Region ' Messages
|
#End Region ' Messages
|
||||||
@@ -368,11 +444,14 @@ Public Class SideEntityControlVM
|
|||||||
m_SideAngleCheck = If(GetMainPrivateProfileInt(S_COMPO, K_SIDEMODE, 0) = 0, True, False)
|
m_SideAngleCheck = If(GetMainPrivateProfileInt(S_COMPO, K_SIDEMODE, 0) = 0, True, False)
|
||||||
SideAngleEntity.dMaxSideAng = GetMainPrivateProfileDouble(S_SIDES, K_MAXSIDEANGLE, SideAngleEntity.STD_MAXSIDEANG)
|
SideAngleEntity.dMaxSideAng = GetMainPrivateProfileDouble(S_SIDES, K_MAXSIDEANGLE, SideAngleEntity.STD_MAXSIDEANG)
|
||||||
|
|
||||||
|
'------------------ DEFINIZIONE LISTA LATI
|
||||||
|
' creo la lista dei parametri
|
||||||
If CallingWindow = CallingWindowOpt.COMPO Then
|
If CallingWindow = CallingWindowOpt.COMPO Then
|
||||||
' Imposto contesto corrente
|
' Imposto contesto corrente
|
||||||
EgtSetCurrentContext(CallingWndScene.GetCtx())
|
EgtSetCurrentContext(CallingWndScene.GetCtx())
|
||||||
' Inizializzo lati per angoli (ne compilo la lista e aggiungo la scritta nel disegno)
|
' Inizializzo lati per angoli (ne compilo la lista e aggiungo la scritta nel disegno)
|
||||||
InitSides()
|
InitSides()
|
||||||
|
' aggiorno i testi sui lati della figura
|
||||||
RefreshSideAngleText()
|
RefreshSideAngleText()
|
||||||
|
|
||||||
ElseIf CallingWindow = CallingWindowOpt.DXFIMPORT Then
|
ElseIf CallingWindow = CallingWindowOpt.DXFIMPORT Then
|
||||||
@@ -380,14 +459,26 @@ Public Class SideEntityControlVM
|
|||||||
EgtSetCurrentContext(CallingWndScene.GetCtx())
|
EgtSetCurrentContext(CallingWndScene.GetCtx())
|
||||||
' Inizializzo lati per angoli (ne compilo la lista e aggiungo la scritta nel disegno)
|
' Inizializzo lati per angoli (ne compilo la lista e aggiungo la scritta nel disegno)
|
||||||
InitSides()
|
InitSides()
|
||||||
|
' aggiorno i testi sui lati della figura
|
||||||
RefreshSideAngleText()
|
RefreshSideAngleText()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Gestisco visualizzazione dei parametri
|
'------------------ VISIBILITA' PARAMETRI
|
||||||
If m_Mode = ModeOpt.SIDEANGLE Or m_Mode = ModeOpt.FILOTOP Then
|
' Gestisco visualizzazione dei parametri (sotto l'elenco dei parametri)
|
||||||
|
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||||
Parameter23_Visibility = Windows.Visibility.Hidden
|
Parameter23_Visibility = Windows.Visibility.Hidden
|
||||||
Parameter2_Visibility = Visibility.Visible
|
Parameter2_Visibility = Visibility.Visible
|
||||||
Parameter2ab_Visibility = Visibility.Hidden
|
Parameter2ab_Visibility = Visibility.Hidden
|
||||||
|
Parameter4_Visibility = Visibility.Hidden
|
||||||
|
ElseIf m_Mode = ModeOpt.FILOTOP Then
|
||||||
|
Parameter23_Visibility = Windows.Visibility.Hidden
|
||||||
|
Parameter2_Visibility = Visibility.Visible
|
||||||
|
Parameter2ab_Visibility = Visibility.Hidden
|
||||||
|
ElseIf m_Mode = ModeOpt.ALZANDFRONT Then
|
||||||
|
Parameter2_Visibility = Visibility.Hidden
|
||||||
|
Parameter23_Visibility = Windows.Visibility.Visible
|
||||||
|
Parameter2ab_Visibility = Visibility.Visible
|
||||||
|
Parameter4_Visibility = Visibility.Hidden
|
||||||
Else
|
Else
|
||||||
' Temporaneamente lo disabilito
|
' Temporaneamente lo disabilito
|
||||||
Parameter23_Visibility = Windows.Visibility.Visible
|
Parameter23_Visibility = Windows.Visibility.Visible
|
||||||
@@ -396,12 +487,14 @@ Public Class SideEntityControlVM
|
|||||||
Parameter2_Visibility = Visibility.Hidden
|
Parameter2_Visibility = Visibility.Hidden
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'------------------ VALORI E TITOLI PARAMETRI
|
||||||
' Aggiorno valori delle TextBlock che indicano i titoli delle colonne
|
' Aggiorno valori delle TextBlock che indicano i titoli delle colonne
|
||||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||||
Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 9) ' Angolo
|
Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 9) ' Angolo
|
||||||
Parameter2Msg = EgtMsg(91002) ' Tallone
|
Parameter2Msg = EgtMsg(91002) ' Tallone
|
||||||
m_dSideAngle = GetMainPrivateProfileDouble(S_SIDES, K_SIDEANGLE, 45)
|
m_dSideAngle = GetMainPrivateProfileDouble(S_SIDES, K_SIDEANGLE, 45)
|
||||||
SetParameter1(m_dSideAngle)
|
SetParameter1(m_dSideAngle)
|
||||||
|
|
||||||
ElseIf m_Mode = ModeOpt.FILOTOP Then
|
ElseIf m_Mode = ModeOpt.FILOTOP Then
|
||||||
Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
|
Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
|
||||||
Dim x As String = EgtMsg(MSG_IMPORTPAGEUC + 11)
|
Dim x As String = EgtMsg(MSG_IMPORTPAGEUC + 11)
|
||||||
@@ -410,7 +503,8 @@ Public Class SideEntityControlVM
|
|||||||
m_dDepthFiloTop = GetMainPrivateProfileDouble(S_SIDES, K_FILOTOPDEPTH, 5)
|
m_dDepthFiloTop = GetMainPrivateProfileDouble(S_SIDES, K_FILOTOPDEPTH, 5)
|
||||||
SetParameter1(m_dOffsetFiloTop)
|
SetParameter1(m_dOffsetFiloTop)
|
||||||
SetParameter2(m_dDepthFiloTop)
|
SetParameter2(m_dDepthFiloTop)
|
||||||
Else
|
|
||||||
|
ElseIf m_Mode = ModeOpt.ENGRAVE Or m_Mode = ModeOpt.DRIP Then
|
||||||
Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
|
Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
|
||||||
Parameter2Msg = EgtMsg(MSG_IMPORTPAGEUC + 16) ' Offset 2
|
Parameter2Msg = EgtMsg(MSG_IMPORTPAGEUC + 16) ' Offset 2
|
||||||
m_dDripOffset = GetMainPrivateProfileDouble(S_SIDES, K_DRIPOFFSET, 20)
|
m_dDripOffset = GetMainPrivateProfileDouble(S_SIDES, K_DRIPOFFSET, 20)
|
||||||
@@ -424,6 +518,22 @@ Public Class SideEntityControlVM
|
|||||||
SetParameter2b(m_dDripOffset2)
|
SetParameter2b(m_dDripOffset2)
|
||||||
SetParameter3(m_dDripDepth)
|
SetParameter3(m_dDripDepth)
|
||||||
SetParameter4(m_dDripShort)
|
SetParameter4(m_dDripShort)
|
||||||
|
|
||||||
|
ElseIf m_Mode = ModeOpt.ALZANDFRONT Then
|
||||||
|
' definisco i nomi dei campi
|
||||||
|
Parameter1Msg = "Spessore"
|
||||||
|
Parameter2Msg = "Altezza"
|
||||||
|
Parameter3Msg = "Delta Ang."
|
||||||
|
' carico i valori letti da file ini
|
||||||
|
m_HeightA = GetMainPrivateProfileDouble("Alz&Front", "A_Height", 0)
|
||||||
|
m_HeightF = GetMainPrivateProfileDouble("Alz&Front", "F_Height", 0)
|
||||||
|
m_DeltaAngF = GetMainPrivateProfileDouble("Alz&Front", "F_DeltaAng", 0)
|
||||||
|
SetParameter1(EstCalc.GetRawHeight)
|
||||||
|
SetdParameter2a(m_HeightA)
|
||||||
|
SetParameter2b(m_HeightF)
|
||||||
|
SetParameter3(m_DeltaAngF)
|
||||||
|
' ricalcolo le alette della figura
|
||||||
|
LoadCurrentCompo()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Aggiorno visualizzazione
|
' Aggiorno visualizzazione
|
||||||
@@ -437,12 +547,13 @@ Public Class SideEntityControlVM
|
|||||||
#End Region ' CONSTRUCTOR
|
#End Region ' CONSTRUCTOR
|
||||||
|
|
||||||
#Region "METHODS"
|
#Region "METHODS"
|
||||||
|
' aggiorno i messaggi scritti sui lati della figura (anche per le alette)
|
||||||
Private Sub RefreshSideAngleText()
|
Private Sub RefreshSideAngleText()
|
||||||
' Imposto contesto corrente
|
' Imposto contesto corrente
|
||||||
EgtSetCurrentContext(m_CallingWndScene.GetCtx())
|
EgtSetCurrentContext(m_CallingWndScene.GetCtx())
|
||||||
Dim PartId As Integer = GDB_ID.NULL
|
Dim PartId As Integer = GDB_ID.NULL
|
||||||
Dim LoopId As Integer = GDB_ID.NULL
|
Dim LoopId As Integer = GDB_ID.NULL
|
||||||
|
|
||||||
If m_CallingWindow = CallingWindowOpt.COMPO Then
|
If m_CallingWindow = CallingWindowOpt.COMPO Then
|
||||||
' Ricavo nome primo pezzo
|
' Ricavo nome primo pezzo
|
||||||
PartId = If(CompoWindowMap.refCompoSceneHostV.SelectedLayer <> GDB_ID.NULL, EgtGetFirstInGroup(GDB_ID.ROOT), GDB_ID.NULL)
|
PartId = If(CompoWindowMap.refCompoSceneHostV.SelectedLayer <> GDB_ID.NULL, EgtGetFirstInGroup(GDB_ID.ROOT), GDB_ID.NULL)
|
||||||
@@ -479,14 +590,26 @@ Public Class SideEntityControlVM
|
|||||||
If SideEntity.dSideHeel > 10 * EPS_SMALL Then sText += "; " & LenToString(SideEntity.dSideHeel, 1)
|
If SideEntity.dSideHeel > 10 * EPS_SMALL Then sText += "; " & LenToString(SideEntity.dSideHeel, 1)
|
||||||
AddTextToLine(sText, Entity.nTextId, Entity.nGeomId, 20, dBBoxRad, True)
|
AddTextToLine(sText, Entity.nTextId, Entity.nGeomId, 20, dBBoxRad, True)
|
||||||
Next
|
Next
|
||||||
' Altrimenti modalità gocciolatoio
|
ElseIf m_Mode = ModeOpt.ALZANDFRONT Then
|
||||||
Else
|
' ---------------- ATTENZIONE ----------------
|
||||||
|
' tutta le gestione dei mesaggi è eseguita dal file lua della componente!
|
||||||
|
' Per ogni entità, creo testo con nome e angolo di inclinazione
|
||||||
|
For Each Entity In m_SideEntityList
|
||||||
|
Dim SideEntity As AlzAndFrontEntity = TryCast(Entity, AlzAndFrontEntity)
|
||||||
|
Dim sText As String = Entity.sEntityName '& " = " & DoubleToString(SideEntity.dSideAngle, 1) & "°"
|
||||||
|
'If SideEntity.dSideHeel > 10 * EPS_SMALL Then sText += "; " & LenToString(SideEntity.dSideHeel, 1)
|
||||||
|
'AddTextToLine(sText, Entity.nTextId, Entity.nGeomId, 20, dBBoxRad, True)
|
||||||
|
Next
|
||||||
|
' Altrimenti modalità gocciolatoio
|
||||||
|
ElseIf m_Mode = ModeOpt.DRIP Or m_Mode = ModeOpt.ENGRAVE Then
|
||||||
' Per ogni entità creo testo con nome
|
' Per ogni entità creo testo con nome
|
||||||
For Each Entity In m_SideEntityList
|
For Each Entity In m_SideEntityList
|
||||||
AddTextToLine(Entity.sEntityName, Entity.nTextId, Entity.nGeomId, 20, dBBoxRad, True)
|
AddTextToLine(Entity.sEntityName, Entity.nTextId, Entity.nGeomId, 20, dBBoxRad, True)
|
||||||
Next
|
Next
|
||||||
' Creo le geometrie dei gocciolatoi
|
' Creo le geometrie dei gocciolatoi
|
||||||
CreateDripGeom(PartId)
|
CreateDripGeom(PartId)
|
||||||
|
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
||||||
|
'--- ??? ---
|
||||||
End If
|
End If
|
||||||
' Aggiorno visualizzazione
|
' Aggiorno visualizzazione
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
@@ -544,7 +667,16 @@ Public Class SideEntityControlVM
|
|||||||
nOtherIndex += 1
|
nOtherIndex += 1
|
||||||
End If
|
End If
|
||||||
ElseIf m_Mode = ModeOpt.FILOTOP Then
|
ElseIf m_Mode = ModeOpt.FILOTOP Then
|
||||||
|
' --- NON FARE NIENTE ---
|
||||||
|
ElseIf m_Mode = ModeOpt.ALZANDFRONT Then
|
||||||
|
If VerifySideAnglePossible(PrevLine, CurrLine, NextLine, bOutLoop) And ApprovedSideToAlzFront(CurrLine) Then
|
||||||
|
' Aggiungo il lato alla lista di quelli inclinabili e ne azzero l'inclinazione
|
||||||
|
AddAlzAndFront(CurrLine, TextLayer, dBBoxRad, nEntityIndex)
|
||||||
|
nEntityIndex += 1
|
||||||
|
Else
|
||||||
|
EgtSetName(CurrLine, "B" & nOtherIndex.ToString())
|
||||||
|
nOtherIndex += 1
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
If VerifyIsSideDripPossible(PrevLine, CurrLine, NextLine) Then
|
If VerifyIsSideDripPossible(PrevLine, CurrLine, NextLine) Then
|
||||||
' Aggiungo il lato alla lista di quelli su cui è possibile mettere il gocciolatoio
|
' Aggiungo il lato alla lista di quelli su cui è possibile mettere il gocciolatoio
|
||||||
@@ -646,6 +778,37 @@ Public Class SideEntityControlVM
|
|||||||
AddTextToLine(sText, TextLayer, CurrLine, 20, dBBoxRad, True)
|
AddTextToLine(sText, TextLayer, CurrLine, 20, dBBoxRad, True)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' Funzione che gestisce l'aggiunta delle alzatine nella lista
|
||||||
|
Private Sub AddAlzAndFront(CurrLine As Integer, TextLayer As Integer, dBBoxRad As Double, nEntityIndex As Integer)
|
||||||
|
' Imposto nome del lato
|
||||||
|
EgtSetName(CurrLine, "A" & nEntityIndex.ToString())
|
||||||
|
Dim sEntityName As String = String.Empty
|
||||||
|
EgtGetName(CurrLine, sEntityName)
|
||||||
|
Dim NewEntity As AlzAndFrontEntity = Nothing
|
||||||
|
NewEntity = New AlzAndFrontEntity(CurrLine, sEntityName, TextLayer, ModeOpt.ALZANDFRONT)
|
||||||
|
Dim sInfo As String = "0"
|
||||||
|
EgtGetInfo(CurrLine, "AF", sInfo)
|
||||||
|
If sInfo = "1" Then
|
||||||
|
NewEntity.SetbIsCheckedAlz(True)
|
||||||
|
ElseIf sInfo = "2" Then
|
||||||
|
NewEntity.SetbIsCheckedFront(True)
|
||||||
|
Else
|
||||||
|
NewEntity.SetbIsCheckedAlz(False)
|
||||||
|
NewEntity.SetbIsCheckedFront(False)
|
||||||
|
End If
|
||||||
|
' inserisco riferimento univoco al lato (solo se non esiste)
|
||||||
|
Dim sInfoRef As String = String.Empty
|
||||||
|
EgtGetInfo(CurrLine, "RefAF", sInfoRef)
|
||||||
|
If String.IsNullOrEmpty(sInfoRef) Then
|
||||||
|
Dim sRefGUID As String = System.Guid.NewGuid().ToString()
|
||||||
|
EgtSetInfo(CurrLine, "RefAF", sRefGUID)
|
||||||
|
End If
|
||||||
|
EgtSetInfo(NewEntity.nGeomId, "IsModify", 0)
|
||||||
|
m_SideEntityList.Add(NewEntity)
|
||||||
|
NotifyPropertyChanged("Legenda_Visibility")
|
||||||
|
'AddTextToLine("A" & CurrLine.ToString, TextLayer, CurrLine, 20, dBBoxRad, True)
|
||||||
|
End Sub
|
||||||
|
|
||||||
' Funzione che gestisce le operazioni sull'entità con gocciolatoio
|
' Funzione che gestisce le operazioni sull'entità con gocciolatoio
|
||||||
Private Sub AddDripSide(CurrLine As Integer, TextLayer As Integer, dBBoxRad As Double, nEntityIndex As Integer)
|
Private Sub AddDripSide(CurrLine As Integer, TextLayer As Integer, dBBoxRad As Double, nEntityIndex As Integer)
|
||||||
' Imposto nome del lato
|
' Imposto nome del lato
|
||||||
@@ -837,6 +1000,7 @@ Public Class SideEntityControlVM
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub CreateDripGeom(nPartId As Integer)
|
Friend Sub CreateDripGeom(nPartId As Integer)
|
||||||
|
If nPartId = GDB_ID.NULL Then Return
|
||||||
' Recupero Id layer di contorno esterno
|
' Recupero Id layer di contorno esterno
|
||||||
Dim nOutLoopId = EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP)
|
Dim nOutLoopId = EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP)
|
||||||
' Preparo layer con geometria gocciolatoi (svuotandolo o creandolo)
|
' Preparo layer con geometria gocciolatoi (svuotandolo o creandolo)
|
||||||
@@ -864,6 +1028,8 @@ Public Class SideEntityControlVM
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
If vJoint.Count < 1 Then Return
|
||||||
|
|
||||||
If vJoint(0) And vJoint(vJoint.Count - 1) Then
|
If vJoint(0) And vJoint(vJoint.Count - 1) Then
|
||||||
bJointStart = True
|
bJointStart = True
|
||||||
End If
|
End If
|
||||||
@@ -1416,6 +1582,160 @@ Public Class SideEntityControlVM
|
|||||||
End While
|
End While
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
'---------------------- GESTIONE ALZATIENE E FRONTALINI ----------------------
|
||||||
|
' eseguo compo
|
||||||
|
Shared Sub LoadCurrentCompo()
|
||||||
|
Dim m_dBBoxRad As Double = 0.5 * Point3d.DistXY(EstCalc.GetRawPtMin, EstCalc.GetRawPtMax)
|
||||||
|
Dim m_dH As Double = 0.05 * m_dBBoxRad
|
||||||
|
|
||||||
|
' !! ATTENZIONE !! : per problemi di spazio è stata spenta la text per stampare i messaggi (ma potrebbe servire?)
|
||||||
|
' Pulisco l'ambiente lua
|
||||||
|
EgtLuaResetGlobVar("CMP")
|
||||||
|
EgtLuaResetGlobVar("CMP_Draw")
|
||||||
|
|
||||||
|
Dim nCompoName As Integer
|
||||||
|
Dim sCompoFile As String = ""
|
||||||
|
Dim sCompoImage As String = ""
|
||||||
|
|
||||||
|
' recupero il nome del direttorio
|
||||||
|
Dim sCompoDir As String = String.Empty
|
||||||
|
GetMainPrivateProfileString("Alz&Front", K_COMPODIR, "", sCompoDir)
|
||||||
|
' leggo le info inserite nel campo "Alz&Front"
|
||||||
|
Dim CItem As CompoItem = CompoWindowMap.refCompoListPageVM.GetPrivateProfileCompo("Alz&Front", "Alz&Front")
|
||||||
|
nCompoName = CItem.Index
|
||||||
|
sCompoFile = CItem.LuaPath
|
||||||
|
sCompoImage = CItem.ImagePath
|
||||||
|
'Dim sCompoImageSource As ImageSource
|
||||||
|
|
||||||
|
' Costruisco path completa del componente
|
||||||
|
Dim sPath = sCompoDir & "\" & sCompoFile
|
||||||
|
' Carico il file
|
||||||
|
EgtLuaExecFile(sPath)
|
||||||
|
|
||||||
|
' carico la lista di variabili
|
||||||
|
Dim dVal As Double
|
||||||
|
If StringToLen(AlzAndFrontEntity.m_dParameter2a.ToString, dVal) Then
|
||||||
|
EgtLuaSetGlobNumVar("CMP.A_Height", dVal)
|
||||||
|
End If
|
||||||
|
If StringToLen(AlzAndFrontEntity.m_Parameter2b.ToString, dVal) Then
|
||||||
|
EgtLuaSetGlobNumVar("CMP.F_Height", dVal)
|
||||||
|
End If
|
||||||
|
If StringToLen("0", dVal) Then
|
||||||
|
EgtLuaSetGlobNumVar("CMP.A_DeltaAng", dVal)
|
||||||
|
End If
|
||||||
|
If StringToLen("0", dVal) Then
|
||||||
|
EgtLuaSetGlobNumVar("CMP.F_DeltaAng", dVal)
|
||||||
|
End If
|
||||||
|
' deve essere imposta sempre la dimensione della lastra
|
||||||
|
If StringToLen(AlzAndFrontEntity.m_Parameter1.ToString, dVal) Then
|
||||||
|
EgtLuaSetGlobNumVar("CMP.ThicknessRaw", dVal)
|
||||||
|
End If
|
||||||
|
' parametri per la scrittura dei caratteri
|
||||||
|
EgtLuaSetGlobNumVar("CMP.BBoxRad", m_dBBoxRad)
|
||||||
|
EgtLuaSetGlobNumVar("CMP.HeightText", m_dH)
|
||||||
|
|
||||||
|
|
||||||
|
Dim sMsg As String = String.Empty
|
||||||
|
' eseguo la funzione per il disegno della componente (CMP_Draw)
|
||||||
|
If Not EgtLuaExecLine("CMP_Draw" & "(true)") Then
|
||||||
|
sMsg = "Error in component execution"
|
||||||
|
'm_bDrawOk = False
|
||||||
|
Else
|
||||||
|
EgtLuaGetGlobStringVar("CMP" & ".MSG", sMsg)
|
||||||
|
Dim nErr As Integer = 0
|
||||||
|
EgtLuaGetGlobIntVar("CMP" & ".ERR", nErr)
|
||||||
|
'm_bDrawOk = (nErr = 0)
|
||||||
|
End If
|
||||||
|
' aggiorno la grafica
|
||||||
|
EgtZoom(ZM.ALL)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' restituisce vero se il lato possiede delle info legate al sideangle
|
||||||
|
Private Function VerifyIsThereSideAngle(nCurrLine As Integer) As Boolean
|
||||||
|
Dim sInfoSideAngle As String = String.Empty
|
||||||
|
EgtGetInfo(nCurrLine, INFO_SIDE_ANGLE, sInfoSideAngle)
|
||||||
|
If Not String.IsNullOrWhiteSpace(sInfoSideAngle) Or Not String.IsNullOrEmpty(sInfoSideAngle) Then
|
||||||
|
' verifico che il dato salvato sia un double
|
||||||
|
Try
|
||||||
|
Dim dSideAngle As Double = 0
|
||||||
|
StringToDouble(sInfoSideAngle, dSideAngle)
|
||||||
|
If dSideAngle <> 0 Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' restituisce vero se il lato possiede delle info legate alle alette
|
||||||
|
Private Function VerifyIsThereAlzFront(nCurrLine As Integer) As Boolean
|
||||||
|
Dim sInfoAlzFront As String = String.Empty
|
||||||
|
EgtGetInfo(nCurrLine, INFO_ALZFRONT, sInfoAlzFront)
|
||||||
|
If Not String.IsNullOrWhiteSpace(sInfoAlzFront) Or Not String.IsNullOrEmpty(sInfoAlzFront) Then
|
||||||
|
If sInfoAlzFront.Trim <> "0" Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' approvo la costruzione dell'aletta sul lato indicato
|
||||||
|
Private Function ApprovedSideToAlzFront(nCurrLine As Integer) As Boolean
|
||||||
|
If VerifyIsThereSideAngle(nCurrLine) And Not VerifyIsThereAlzFront(nCurrLine) Then
|
||||||
|
' se esiste SideAngle e un'aletta allora NON approvo
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Shared Sub RefreshEntity(bIsAlz As Boolean, bIsChecked As Boolean, GeneralSideEntity As SideEntity, Optional DrawCompo As Boolean = True)
|
||||||
|
|
||||||
|
Dim Loacl_AlzFrontEntity As AlzAndFrontEntity = Nothing
|
||||||
|
Try
|
||||||
|
Loacl_AlzFrontEntity = DirectCast(GeneralSideEntity, AlzAndFrontEntity)
|
||||||
|
Catch ex As Exception
|
||||||
|
Return
|
||||||
|
End Try
|
||||||
|
If bIsAlz Then
|
||||||
|
If bIsChecked Then
|
||||||
|
Loacl_AlzFrontEntity.Type = ModeAlzAndFront.ALZATINA
|
||||||
|
Else
|
||||||
|
Loacl_AlzFrontEntity.Type = ModeAlzAndFront.NONE
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If bIsChecked Then
|
||||||
|
Loacl_AlzFrontEntity.Type = ModeAlzAndFront.FRONTALINO
|
||||||
|
Else
|
||||||
|
Loacl_AlzFrontEntity.Type = ModeAlzAndFront.NONE
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Select Case Loacl_AlzFrontEntity.Type
|
||||||
|
Case SideEntityControlVM.ModeAlzAndFront.NONE
|
||||||
|
EgtSetInfo(Loacl_AlzFrontEntity.nGeomId, INFO_ALZFRONT, 0)
|
||||||
|
Case SideEntityControlVM.ModeAlzAndFront.ALZATINA
|
||||||
|
EgtSetInfo(Loacl_AlzFrontEntity.nGeomId, INFO_ALZFRONT, 1)
|
||||||
|
Case SideEntityControlVM.ModeAlzAndFront.FRONTALINO
|
||||||
|
EgtSetInfo(Loacl_AlzFrontEntity.nGeomId, INFO_ALZFRONT, 2)
|
||||||
|
End Select
|
||||||
|
EgtSetInfo(Loacl_AlzFrontEntity.nGeomId, "IsModify", 1)
|
||||||
|
' di default viene ricostruito tutto il disegno
|
||||||
|
If DrawCompo Then LoadCurrentCompo()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RefreshDataAlzAndFront()
|
||||||
|
If m_Mode = ModeOpt.ALZANDFRONT Then
|
||||||
|
AlzAndFrontEntity.m_Parameter1 = m_Parameter1
|
||||||
|
AlzAndFrontEntity.m_dParameter2a = m_dParameter2a
|
||||||
|
AlzAndFrontEntity.m_Parameter2b = m_Parameter2b
|
||||||
|
AlzAndFrontEntity.m_Parameter3 = m_Parameter3
|
||||||
|
LoadCurrentCompo()
|
||||||
|
WriteMainPrivateProfileString("Alz&Front", "A_Height", LenToString(AlzAndFrontEntity.m_dParameter2a, 2))
|
||||||
|
WriteMainPrivateProfileString("Alz&Front", "F_Height", LenToString(AlzAndFrontEntity.m_Parameter2b, 2))
|
||||||
|
WriteMainPrivateProfileString("Alz&Front", "F_DeltaAng", LenToString(AlzAndFrontEntity.m_Parameter3, 2))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region ' METHODS
|
#End Region ' METHODS
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -1456,6 +1776,8 @@ Public MustInherit Class SideEntity
|
|||||||
Else
|
Else
|
||||||
Return Visibility.Visible
|
Return Visibility.Visible
|
||||||
End If
|
End If
|
||||||
|
ElseIf m_Mode = SideEntityControlVM.ModeOpt.ALZANDFRONT Then
|
||||||
|
Return Visibility.Collapsed
|
||||||
Else
|
Else
|
||||||
Return Visibility.Collapsed
|
Return Visibility.Collapsed
|
||||||
End If
|
End If
|
||||||
@@ -1469,6 +1791,8 @@ Public MustInherit Class SideEntity
|
|||||||
Else
|
Else
|
||||||
Return Visibility.Collapsed
|
Return Visibility.Collapsed
|
||||||
End If
|
End If
|
||||||
|
ElseIf m_Mode = SideEntityControlVM.ModeOpt.ALZANDFRONT Then
|
||||||
|
Return Visibility.Collapsed
|
||||||
Else
|
Else
|
||||||
Return Visibility.Visible
|
Return Visibility.Visible
|
||||||
End If
|
End If
|
||||||
@@ -1478,10 +1802,85 @@ Public MustInherit Class SideEntity
|
|||||||
' imposto la visibilità delle TextBox per Drip ed Engrave
|
' imposto la visibilità delle TextBox per Drip ed Engrave
|
||||||
Public ReadOnly Property Value_Visibility_DE As Visibility
|
Public ReadOnly Property Value_Visibility_DE As Visibility
|
||||||
Get
|
Get
|
||||||
Return Visibility.Visible
|
If m_Mode = SideEntityControlVM.ModeOpt.ALZANDFRONT Then
|
||||||
|
Return Visibility.Collapsed
|
||||||
|
ElseIf m_Mode = SideEntityControlVM.ModeOpt.SIDEANGLE Then
|
||||||
|
Return Visibility.Collapsed
|
||||||
|
Else
|
||||||
|
Return Visibility.Visible
|
||||||
|
End If
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'--------------------------ALZ AND FRONT -----------------------------
|
||||||
|
Public ReadOnly Property CheckAlz_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
If m_Mode = SideEntityControlVM.ModeOpt.ALZANDFRONT Then
|
||||||
|
Return Visibility.Visible
|
||||||
|
Else
|
||||||
|
Return Visibility.Collapsed
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property CheckFront_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
If m_Mode = SideEntityControlVM.ModeOpt.ALZANDFRONT Then
|
||||||
|
Return Visibility.Visible
|
||||||
|
Else
|
||||||
|
Return Visibility.Collapsed
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_bIsCheckedAlz As Boolean = False
|
||||||
|
Public Property bIsCheckedAlz As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bIsCheckedAlz
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
If value Then
|
||||||
|
m_bIsCheckedAlz = True
|
||||||
|
m_bIsCheckedFront = False
|
||||||
|
Else
|
||||||
|
m_bIsCheckedAlz = False
|
||||||
|
End If
|
||||||
|
SideEntityControlVM.RefreshEntity(True, value, Me)
|
||||||
|
NotifyPropertyChanged("bIsCheckedAlz")
|
||||||
|
NotifyPropertyChanged("bIsCheckedFront")
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Public Sub SetbIsCheckedAlz(value As Boolean)
|
||||||
|
' con questa funzione evito di ridisegnare la pagina delle alzatine per ognilato
|
||||||
|
m_bIsCheckedAlz = value
|
||||||
|
NotifyPropertyChanged("bIsCheckedAlz")
|
||||||
|
NotifyPropertyChanged("bIsCheckedFront")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_bIsCheckedFront As Boolean = False
|
||||||
|
Public Property bIsCheckedFront As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bIsCheckedFront
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
If value Then
|
||||||
|
m_bIsCheckedAlz = False
|
||||||
|
m_bIsCheckedFront = True
|
||||||
|
Else
|
||||||
|
m_bIsCheckedFront = False
|
||||||
|
End If
|
||||||
|
SideEntityControlVM.RefreshEntity(False, value, Me)
|
||||||
|
NotifyPropertyChanged("bIsCheckedAlz")
|
||||||
|
NotifyPropertyChanged("bIsCheckedFront")
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Public Sub SetbIsCheckedFront(value As Boolean)
|
||||||
|
' con questa funzione evito di ridisegnare la pagina delle alzatine per ognilato
|
||||||
|
m_bIsCheckedFront = value
|
||||||
|
NotifyPropertyChanged("bIsCheckedAlz")
|
||||||
|
NotifyPropertyChanged("bIsCheckedFront")
|
||||||
|
End Sub
|
||||||
|
'--------------------------ALZ AND FRONT -----------------------------
|
||||||
|
|
||||||
Public MustOverride Property bIsChecked As Boolean
|
Public MustOverride Property bIsChecked As Boolean
|
||||||
|
|
||||||
Sub New(nId As Integer, sEntityName As String, nTextId As Integer, Mode As SideEntityControlVM.ModeOpt)
|
Sub New(nId As Integer, sEntityName As String, nTextId As Integer, Mode As SideEntityControlVM.ModeOpt)
|
||||||
@@ -1508,6 +1907,7 @@ Friend Class SideAngleEntity
|
|||||||
Friend Shared m_Parameter1 As Double
|
Friend Shared m_Parameter1 As Double
|
||||||
Friend Shared m_Parameter2 As Double
|
Friend Shared m_Parameter2 As Double
|
||||||
Friend Shared m_Parameter2a As Integer
|
Friend Shared m_Parameter2a As Integer
|
||||||
|
Friend Shared m_dParameter2a As Double
|
||||||
Friend Shared m_Parameter2b As Double
|
Friend Shared m_Parameter2b As Double
|
||||||
Friend Shared m_ModifySideAngle As Action(Of String, Double)
|
Friend Shared m_ModifySideAngle As Action(Of String, Double)
|
||||||
Friend Shared m_ModifySideHeel As Action(Of String, Double)
|
Friend Shared m_ModifySideHeel As Action(Of String, Double)
|
||||||
@@ -1906,4 +2306,147 @@ Friend Class ColorEngrave
|
|||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
Friend Class AlzAndFrontEntity
|
||||||
|
Inherits SideEntity
|
||||||
|
|
||||||
|
Public Const STD_MAXSIDEANG As Double = 50.0
|
||||||
|
Public Const MAX_MAXSIDEANG As Double = 75.0
|
||||||
|
Private Shared m_dMaxSideAng As Double = STD_MAXSIDEANG
|
||||||
|
Friend Shared WriteOnly Property dMaxSideAng As Double
|
||||||
|
Set(value As Double)
|
||||||
|
m_dMaxSideAng = Math.Max(Math.Min(value, MAX_MAXSIDEANG), 0)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Friend Shared m_Parameter1 As Double
|
||||||
|
Friend Shared m_Parameter2 As Double
|
||||||
|
Friend Shared m_Parameter2a As Integer
|
||||||
|
Friend Shared m_dParameter2a As Double
|
||||||
|
Friend Shared m_Parameter2b As Double
|
||||||
|
Friend Shared m_Parameter3 As Double
|
||||||
|
Friend Shared m_ModifySideAngle As Action(Of String, Double)
|
||||||
|
Friend Shared m_ModifySideHeel As Action(Of String, Double)
|
||||||
|
Friend Shared m_RefreshSideAngleText As Action
|
||||||
|
|
||||||
|
'Private m_dSideAngle As Double
|
||||||
|
'Public Property GrphSideAngle As String
|
||||||
|
' Get
|
||||||
|
' Return DoubleToString(m_dSideAngle, 2)
|
||||||
|
' End Get
|
||||||
|
' Set(value As String)
|
||||||
|
' Dim dVal As Double = 0
|
||||||
|
' If Not String.IsNullOrWhiteSpace(value) Then StringToDouble(value, dVal)
|
||||||
|
' If dVal <> m_dSideAngle Then
|
||||||
|
' ' Assegno controllando i limiti
|
||||||
|
' If dVal < -m_dMaxSideAng Then
|
||||||
|
' m_dSideAngle = -m_dMaxSideAng
|
||||||
|
' NotifyPropertyChanged("GrphSideAngle")
|
||||||
|
' ElseIf dVal > m_dMaxSideAng Then
|
||||||
|
' m_dSideAngle = m_dMaxSideAng
|
||||||
|
' NotifyPropertyChanged("GrphSideAngle")
|
||||||
|
' Else
|
||||||
|
' m_dSideAngle = dVal
|
||||||
|
' End If
|
||||||
|
' ' Lo modifico nella geometria e nella lista inclinazioni
|
||||||
|
' m_ModifySideAngle(sEntityName, dSideAngle)
|
||||||
|
' ' Aggiorno tutti i testi
|
||||||
|
' m_RefreshSideAngleText()
|
||||||
|
' End If
|
||||||
|
' End Set
|
||||||
|
'End Property
|
||||||
|
'Public Property dSideAngle As Double
|
||||||
|
' Get
|
||||||
|
' Return m_dSideAngle
|
||||||
|
' End Get
|
||||||
|
' Set(value As Double)
|
||||||
|
' ' Assegno controllando i limiti
|
||||||
|
' If value < -m_dMaxSideAng Then
|
||||||
|
' m_dSideAngle = -m_dMaxSideAng
|
||||||
|
' ElseIf value > m_dMaxSideAng Then
|
||||||
|
' m_dSideAngle = m_dMaxSideAng
|
||||||
|
' Else
|
||||||
|
' m_dSideAngle = value
|
||||||
|
' End If
|
||||||
|
' End Set
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Private m_dSideHeel As Double
|
||||||
|
'Public Property GrphSideHeel As String
|
||||||
|
' Get
|
||||||
|
' Return LenToString(m_dSideHeel, 2)
|
||||||
|
' End Get
|
||||||
|
' Set(value As String)
|
||||||
|
' Dim dVal As Double = 0
|
||||||
|
' If Not String.IsNullOrWhiteSpace(value) Then StringToLen(value, dVal)
|
||||||
|
' If Math.Abs(dVal - m_dSideHeel) > EPS_SMALL Then
|
||||||
|
' ' Verifico stia nei limiti
|
||||||
|
' If dVal < 0 Then
|
||||||
|
' m_dSideHeel = 0
|
||||||
|
' NotifyPropertyChanged("GrphSideHeel")
|
||||||
|
' Else
|
||||||
|
' m_dSideHeel = dVal
|
||||||
|
' End If
|
||||||
|
' ' Lo modifico nella geometria e nella lista inclinazioni
|
||||||
|
' m_ModifySideHeel(sEntityName, dSideHeel)
|
||||||
|
' ' Aggiorno tutti i testi
|
||||||
|
' m_RefreshSideAngleText()
|
||||||
|
' End If
|
||||||
|
' End Set
|
||||||
|
'End Property
|
||||||
|
'Public Property dSideHeel As Double
|
||||||
|
' Get
|
||||||
|
' Return m_dSideHeel
|
||||||
|
' End Get
|
||||||
|
' Set(value As Double)
|
||||||
|
' ' Verifico stia nei limiti
|
||||||
|
' If value < 0 Then
|
||||||
|
' m_dSideHeel = 0
|
||||||
|
' Else
|
||||||
|
' m_dSideHeel = value
|
||||||
|
' End If
|
||||||
|
' End Set
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
Public Overrides Property bIsChecked As Boolean
|
||||||
|
Get
|
||||||
|
Return False
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
'If value Then
|
||||||
|
' m_dSideAngle = m_Parameter1
|
||||||
|
' m_dSideHeel = m_Parameter2
|
||||||
|
'Else
|
||||||
|
' m_dSideAngle = 0
|
||||||
|
' m_dSideHeel = 0
|
||||||
|
'End If
|
||||||
|
'' '' Converto nome checkbox in nome elemento tenendo conto dello slittamento verso il basso
|
||||||
|
'''Dim nCurrSide As Integer = m_SideAngleEntityList.Count() - (10 - CInt(CurrCheckBox.Name.Substring(1)))
|
||||||
|
'''Dim sCurrSide As String = "A" & nCurrSide.ToString()
|
||||||
|
'' Lo modifico nella geometria e nella lista inclinazioni
|
||||||
|
'm_ModifySideAngle(sEntityName, m_dSideAngle)
|
||||||
|
'm_ModifySideHeel(sEntityName, m_dSideHeel)
|
||||||
|
'' Aggiorno tutti i testi
|
||||||
|
'm_RefreshSideAngleText()
|
||||||
|
NotifyPropertyChanged("bIsChecked")
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Type As SideEntityControlVM.ModeAlzAndFront = SideEntityControlVM.ModeAlzAndFront.NONE
|
||||||
|
Public Property Type As SideEntityControlVM.ModeAlzAndFront
|
||||||
|
Get
|
||||||
|
Return m_Type
|
||||||
|
End Get
|
||||||
|
Set(value As SideEntityControlVM.ModeAlzAndFront)
|
||||||
|
m_Type = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(nId As Integer, sEntityName As String, nTextId As Integer, Mode As SideEntityControlVM.ModeOpt)
|
||||||
|
MyBase.New(nId, sEntityName, nTextId, Mode)
|
||||||
|
'm_dSideAngle = dSideAngle
|
||||||
|
'm_dSideHeel = dSideHeel
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|||||||
@@ -215,22 +215,19 @@ Public Class TopCommandBarVM
|
|||||||
''' Returns a command that do SaveAs.
|
''' Returns a command that do SaveAs.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public ReadOnly Property SaveAsCommand As ICommand
|
Public ReadOnly Property SaveAsCommand As ICommand
|
||||||
Get
|
Get
|
||||||
If m_cmdSaveAs Is Nothing Then
|
If m_cmdSaveAs Is Nothing Then
|
||||||
m_cmdSaveAs = New Command(AddressOf SaveAs)
|
m_cmdSaveAs = New Command(AddressOf SaveAs)
|
||||||
End If
|
End If
|
||||||
Return m_cmdSaveAs
|
Return m_cmdSaveAs
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Execute the SaveAs. This method is invoked by the SaveAsCommand.
|
''' Execute the SaveAs. This method is invoked by the SaveAsCommand.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Sub SaveAs(ByVal param As Object)
|
Public Sub SaveAs(ByVal param As Object)
|
||||||
' non posso avere la stessa lastra in due progetti
|
' non posso avere la stessa lastra in due progetti -> gestita da DataBase
|
||||||
If OmagOFFICEMap.refMainWindowVM.MainWindowM.m_SlabDB Then
|
|
||||||
Return
|
|
||||||
End If
|
|
||||||
OmagOFFICEMap.refSceneHostVM.SaveAsProject()
|
OmagOFFICEMap.refSceneHostVM.SaveAsProject()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Public Class UnderDrillControlVM
|
|||||||
Private m_dDrillDepth As Double
|
Private m_dDrillDepth As Double
|
||||||
Public Property dDrillDepth As String
|
Public Property dDrillDepth As String
|
||||||
Get
|
Get
|
||||||
Return LenToString(m_dDrillDepth, -2)
|
Return LenToString(m_dDrillDepth, 2)
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
StringToLen(value, m_dDrillDepth)
|
StringToLen(value, m_dDrillDepth)
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ Module OmagOFFICEMap
|
|||||||
Not IsNothing(m_refOptionPanelVM) AndAlso Not IsNothing(m_refRawPartTabVM) AndAlso
|
Not IsNothing(m_refOptionPanelVM) AndAlso Not IsNothing(m_refRawPartTabVM) AndAlso
|
||||||
Not IsNothing(m_refNestingTabVM) AndAlso Not IsNothing(m_refSimulTabVM) AndAlso
|
Not IsNothing(m_refNestingTabVM) AndAlso Not IsNothing(m_refSimulTabVM) AndAlso
|
||||||
Not IsNothing(m_refMachiningTabVM) AndAlso
|
Not IsNothing(m_refMachiningTabVM) AndAlso
|
||||||
LibMap.EndInit() AndAlso PhotoMap.ContninueApplication
|
LibMap.EndInit() AndAlso PhotoMap.ContinueApplication
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
#End Region ' Init
|
#End Region ' Init
|
||||||
|
|||||||
Reference in New Issue
Block a user