OmagCUT :
- aggiunti box X e Y quando input da disegno in tagli diretti che ne mancavano - aggiunto flag per non ruotare C in taglio diretto spianatura - migliorato aspetto dialoghi tagli diretti.
This commit is contained in:
+30
-4
@@ -9,8 +9,8 @@
|
||||
|
||||
<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{StaticResource OmagCut_LightGray}">
|
||||
|
||||
<!-- Definizione della Grid MultipleCut -->
|
||||
<Grid Name="SingleCutGrid" >
|
||||
<!-- Definizione della Grid FlatteningCut -->
|
||||
<Grid Name="FlatteningCutGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
@@ -25,7 +25,8 @@
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
@@ -75,7 +76,10 @@
|
||||
<EgtWPFLib:EgtTextBox Name="OverlapTxBx" Grid.Column="1" Grid.Row="6" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<CheckBox Name="SideChBx" Grid.Row="7" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox}" Margin="6,0,6,0"/>
|
||||
<TextBlock Name="SideTxBl" Grid.Row="7" Grid.ColumnSpan="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<CheckBox Name="SideChBx" Grid.Row="7" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||
|
||||
<ComboBox Name="TypeCmBx" Grid.Row="8" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
@@ -85,6 +89,28 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="RotLockTxBl" Grid.Row="9" Grid.ColumnSpan="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<CheckBox Name="RotLockChBx" Grid.Row="9" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||
|
||||
<Grid Grid.Row="10" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
|
||||
+88
-17
@@ -84,7 +84,8 @@ Public Class FlatteningCut
|
||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||
WidthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 26)
|
||||
OverlapTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 27)
|
||||
SideChBx.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
||||
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
||||
RotLockTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 29)
|
||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
End Sub
|
||||
@@ -105,21 +106,6 @@ Public Class FlatteningCut
|
||||
EgtDraw()
|
||||
Return
|
||||
End If
|
||||
' Reset punto acquisito
|
||||
m_bPointP1Ok = False
|
||||
' Inizializzo primo punto acquisito dal disegno come centro del grezzo
|
||||
GetRawCenter(m_ptPrev)
|
||||
' Imposto modalità di acquisizione punti
|
||||
PointModeCmBx.SelectedIndex = PT_MODE.DRAW
|
||||
' Imposto tipo di lavorazione della spianatura
|
||||
TypeCmBx.SelectedIndex = MACH_TYPE.ZIGZAG
|
||||
' Assegno parametri di lavorazione già definiti
|
||||
DepthTxBx.Text = LenToString(m_dDepth, 1)
|
||||
LenghtTxBx.Text = LenToString(m_dLen, 1)
|
||||
' Inizializzo valori non ancora definiti
|
||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||
WidthTxBx.Text = LenToString(m_dWid, 2)
|
||||
OverlapTxBx.Text = LenToString(m_dOverlap, 2)
|
||||
' Origine tavola
|
||||
m_bRawOk = True
|
||||
If Not EgtGetTableRef(1, m_ptTabOri) Then
|
||||
@@ -131,6 +117,24 @@ Public Class FlatteningCut
|
||||
m_bRawOk = False
|
||||
EgtOutLog("Error on RawBox")
|
||||
End If
|
||||
' Reset punto acquisito
|
||||
m_bPointP1Ok = False
|
||||
m_bPointP2Ok = False
|
||||
' Inizializzo primo punto acquisito dal disegno come centro del grezzo
|
||||
GetRawCenter(m_ptPrev)
|
||||
' Imposto modalità di acquisizione punti
|
||||
PointModeCmBx.SelectedIndex = PT_MODE.DRAW
|
||||
SetCoordVisibility(True)
|
||||
ShowCoord()
|
||||
' Imposto tipo di lavorazione della spianatura
|
||||
TypeCmBx.SelectedIndex = MACH_TYPE.ZIGZAG
|
||||
' Assegno parametri di lavorazione già definiti
|
||||
DepthTxBx.Text = LenToString(m_dDepth, 1)
|
||||
LenghtTxBx.Text = LenToString(m_dLen, 1)
|
||||
' Inizializzo valori non ancora definiti
|
||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||
WidthTxBx.Text = LenToString(m_dWid, 2)
|
||||
OverlapTxBx.Text = LenToString(m_dOverlap, 2)
|
||||
' Reset taglio e disabilito bottone esecuzione
|
||||
m_bCutOk = False
|
||||
UpdateSimulOkBtn()
|
||||
@@ -204,11 +208,17 @@ Public Class FlatteningCut
|
||||
m_ptPrev += vtDir * (m_ptRawMax.z - m_ptPrev.z) / vtDir.z
|
||||
End If
|
||||
End If
|
||||
' Visualizzo coordinate (rispetto a 0 tavola)
|
||||
ShowCoord()
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub PointModeCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles PointModeCmBx.SelectionChanged
|
||||
SetCoordVisibility(PointModeCmBx.SelectedIndex = PT_MODE.DRAW)
|
||||
End Sub
|
||||
|
||||
Private Sub Point1Btn_Click(sender As Object, e As RoutedEventArgs) Handles Point1Btn.Click
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
@@ -282,7 +292,7 @@ Public Class FlatteningCut
|
||||
Private Sub Point2Btn_Click(sender As Object, e As RoutedEventArgs) Handles Point2Btn.Click
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' Deseleziono il bottone (poichè si seleziona automaticamente) cos' nel caso ci sia un errore rimane deselezionato
|
||||
' Deseleziono il bottone (poichè si seleziona automaticamente) così nel caso ci sia un errore rimane deselezionato
|
||||
Point2Btn.IsChecked = False
|
||||
' Reset punto non acquisito
|
||||
m_bPointP2Ok = False
|
||||
@@ -471,6 +481,45 @@ Public Class FlatteningCut
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub RotLockChBx_Click(sender As Object, e As EventArgs) Handles RotLockChBx.Click
|
||||
' Disegno il taglio
|
||||
If m_bPointP2Ok Then
|
||||
Create2PointsFlatteningCut()
|
||||
Else
|
||||
CreateFlatteningCut()
|
||||
End If
|
||||
SetMachineInCurrPos()
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub XcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles XcoordTxBx.EgtClosed
|
||||
' Recupero il valore della coordinata (in 0 Tab)
|
||||
Dim dXcoord As Double = 0
|
||||
StringToLen(XcoordTxBx.Text, dXcoord)
|
||||
XcoordTxBx.Text = LenToString(dXcoord, 2)
|
||||
' lo assegno al punto corrente (in 0 Macc)
|
||||
m_ptPrev.x = dXcoord + m_ptTabOri.x
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub YcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles YcoordTxBx.EgtClosed
|
||||
' Recupero il valore della coordinata (in 0 Tab)
|
||||
Dim dYcoord As Double = 0
|
||||
StringToLen(YcoordTxBx.Text, dYcoord)
|
||||
YcoordTxBx.Text = LenToString(dYcoord, 2)
|
||||
' lo assegno al punto corrente (in 0 Macc)
|
||||
m_ptPrev.y = dYcoord + m_ptTabOri.y
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub SimulBtn_Click(sender As Object, e As RoutedEventArgs) Handles SimulBtn.Click
|
||||
' Verifico ci sia un taglio valido
|
||||
If Not m_bCutOk Then Return
|
||||
@@ -544,6 +593,10 @@ Public Class FlatteningCut
|
||||
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, m_dAngV)
|
||||
' Imposto prima direzione
|
||||
EgtSetInfo(nCutId, INFO_DIR, 1)
|
||||
' Eventuale bloccaggio rotazione asse C tra le passate
|
||||
If RotLockChBx.IsChecked Then
|
||||
EgtSetInfo(nCutId, INFO_ENABLE_INVERT, False)
|
||||
End If
|
||||
' Funzione che crea i tagli successivi al primo
|
||||
MultiplyCut(nLayerId, nCutId)
|
||||
' Creo layer per crocetta di riferimento
|
||||
@@ -597,6 +650,10 @@ Public Class FlatteningCut
|
||||
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, m_dAngV)
|
||||
' Imposto prima direzione
|
||||
EgtSetInfo(nCutId, INFO_DIR, 1)
|
||||
' Eventuale bloccaggio rotazione asse C tra le passate
|
||||
If RotLockChBx.IsChecked Then
|
||||
EgtSetInfo(nCutId, INFO_ENABLE_INVERT, False)
|
||||
End If
|
||||
' Funzione che crea i tagli successivi al primo
|
||||
MultiplyCut(nLayerId, nCutId)
|
||||
' Creo layer per crocette di riferimento
|
||||
@@ -678,6 +735,20 @@ Public Class FlatteningCut
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub SetCoordVisibility(bShow As Boolean)
|
||||
XcoordTxBl.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
XcoordTxBx.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
YcoordTxBl.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
YcoordTxBx.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
End Sub
|
||||
|
||||
Private Sub ShowCoord()
|
||||
Dim ptText As Point3d = m_ptPrev
|
||||
ptText.ToLoc(New Frame3d(m_ptTabOri))
|
||||
XcoordTxBx.Text = LenToString(ptText.x, 2)
|
||||
YcoordTxBx.Text = LenToString(ptText.y, 2)
|
||||
End Sub
|
||||
|
||||
Private Function SetMachineInCurrPos() As Boolean
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
|
||||
+21
-1
@@ -101,7 +101,27 @@
|
||||
|
||||
</Grid>
|
||||
|
||||
<CheckBox Name="SideChBx" Grid.Row="6" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox}" Margin="6,0,6,0"/>
|
||||
<TextBlock Name="SideTxBl" Grid.Row="6" Grid.ColumnSpan="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<CheckBox Name="SideChBx" Grid.Row="6" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||
|
||||
<Grid Grid.Row="7" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
+63
-12
@@ -70,7 +70,7 @@ Public Class GridCut
|
||||
DimPzXTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 20)
|
||||
NumPzYTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 21)
|
||||
DimPzYTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 22)
|
||||
SideChBx.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
||||
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
End Sub
|
||||
@@ -91,17 +91,6 @@ Public Class GridCut
|
||||
EgtDraw()
|
||||
Return
|
||||
End If
|
||||
' Reset punto acquisito
|
||||
m_bPointP1Ok = False
|
||||
' Inizializzo primo punto acquisito dal disegno come centro del grezzo
|
||||
GetRawCenter(m_ptPrev)
|
||||
' Imposto modalità di acquisizione punti
|
||||
PointModeCmBx.SelectedIndex = PT_MODE.DRAW
|
||||
' Assegno parametri di lavorazione già definiti
|
||||
DepthTxBx.Text = LenToString(m_dDepth, 1)
|
||||
' Inizializzo valori non ancora definiti
|
||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
||||
' Origine tavola
|
||||
m_bRawOk = True
|
||||
If Not EgtGetTableRef(1, m_ptTabOri) Then
|
||||
@@ -113,6 +102,20 @@ Public Class GridCut
|
||||
m_bRawOk = False
|
||||
EgtOutLog("Error on RawBox")
|
||||
End If
|
||||
' Reset punto acquisito
|
||||
m_bPointP1Ok = False
|
||||
m_bPointP2Ok = False
|
||||
' Inizializzo primo punto acquisito dal disegno come centro del grezzo
|
||||
GetRawCenter(m_ptPrev)
|
||||
' Imposto modalità di acquisizione punti
|
||||
PointModeCmBx.SelectedIndex = PT_MODE.DRAW
|
||||
SetCoordVisibility(True)
|
||||
ShowCoord()
|
||||
' Assegno parametri di lavorazione già definiti
|
||||
DepthTxBx.Text = LenToString(m_dDepth, 1)
|
||||
' Inizializzo valori non ancora definiti
|
||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
||||
' Reset taglio e disabilito bottone esecuzione
|
||||
m_bCutOk = False
|
||||
UpdateSimulOkBtn()
|
||||
@@ -186,11 +189,17 @@ Public Class GridCut
|
||||
m_ptPrev += vtDir * (m_ptRawMax.z - m_ptPrev.z) / vtDir.z
|
||||
End If
|
||||
End If
|
||||
' Visualizzo coordinate (rispetto a 0 tavola)
|
||||
ShowCoord()
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub PointModeCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles PointModeCmBx.SelectionChanged
|
||||
SetCoordVisibility(PointModeCmBx.SelectedIndex = PT_MODE.DRAW)
|
||||
End Sub
|
||||
|
||||
Private Sub Point1Btn_Click(sender As Object, e As RoutedEventArgs) Handles Point1Btn.Click
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
@@ -398,6 +407,34 @@ Public Class GridCut
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub XcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles XcoordTxBx.EgtClosed
|
||||
' Recupero il valore della coordinata (in 0 Tab)
|
||||
Dim dXcoord As Double = 0
|
||||
StringToLen(XcoordTxBx.Text, dXcoord)
|
||||
XcoordTxBx.Text = LenToString(dXcoord, 2)
|
||||
' lo assegno al punto corrente (in 0 Macc)
|
||||
m_ptPrev.x = dXcoord + m_ptTabOri.x
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub YcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles YcoordTxBx.EgtClosed
|
||||
' Recupero il valore della coordinata (in 0 Tab)
|
||||
Dim dYcoord As Double = 0
|
||||
StringToLen(YcoordTxBx.Text, dYcoord)
|
||||
YcoordTxBx.Text = LenToString(dYcoord, 2)
|
||||
' lo assegno al punto corrente (in 0 Macc)
|
||||
m_ptPrev.y = dYcoord + m_ptTabOri.y
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub SimulBtn_Click(sender As Object, e As RoutedEventArgs) Handles SimulBtn.Click
|
||||
' Verifico ci sia un taglio valido
|
||||
If Not m_bCutOk Then Return
|
||||
@@ -623,6 +660,20 @@ Public Class GridCut
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub SetCoordVisibility(bShow As Boolean)
|
||||
XcoordTxBl.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
XcoordTxBx.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
YcoordTxBl.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
YcoordTxBx.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
End Sub
|
||||
|
||||
Private Sub ShowCoord()
|
||||
Dim ptText As Point3d = m_ptPrev
|
||||
ptText.ToLoc(New Frame3d(m_ptTabOri))
|
||||
XcoordTxBx.Text = LenToString(ptText.x, 2)
|
||||
YcoordTxBx.Text = LenToString(ptText.y, 2)
|
||||
End Sub
|
||||
|
||||
Private Function SetMachineInCurrPos() As Boolean
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
|
||||
+23
-2
@@ -24,6 +24,7 @@
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
@@ -106,9 +107,29 @@
|
||||
|
||||
</Grid>
|
||||
|
||||
<CheckBox Name="SideChBx" Grid.Row="7" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox}" Margin="6,0,6,0"/>
|
||||
<TextBlock Name="SideTxBl" Grid.Row="7" Grid.ColumnSpan="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<CheckBox Name="SideChBx" Grid.Row="7" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||
|
||||
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
||||
<Grid Grid.Row="8" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="9" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
|
||||
+64
-13
@@ -70,7 +70,7 @@ Public Class MultipleCut
|
||||
SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16)
|
||||
NumPzTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 17)
|
||||
DimPzTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 18)
|
||||
SideChBx.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
||||
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
End Sub
|
||||
@@ -91,18 +91,6 @@ Public Class MultipleCut
|
||||
EgtDraw()
|
||||
Return
|
||||
End If
|
||||
' Reset punto acquisito
|
||||
m_bPointP1Ok = False
|
||||
' Inizializzo primo punto acquisito dal disegno come centro del grezzo
|
||||
GetRawCenter(m_ptPrev)
|
||||
' Imposto modalità di acquisizione punti
|
||||
PointModeCmBx.SelectedIndex = PT_MODE.DRAW
|
||||
' Assegno parametri di lavorazione già definiti
|
||||
DepthTxBx.Text = LenToString(m_dDepth, 1)
|
||||
LenghtTxBx.Text = LenToString(m_dLen, 1)
|
||||
' Inizializzo valori non ancora definiti
|
||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
||||
' Origine tavola
|
||||
m_bRawOk = True
|
||||
If Not EgtGetTableRef(1, m_ptTabOri) Then
|
||||
@@ -114,6 +102,21 @@ Public Class MultipleCut
|
||||
m_bRawOk = False
|
||||
EgtOutLog("Error on RawBox")
|
||||
End If
|
||||
' Reset punto acquisito
|
||||
m_bPointP1Ok = False
|
||||
m_bPointP2Ok = False
|
||||
' Inizializzo primo punto acquisito dal disegno come centro del grezzo
|
||||
GetRawCenter(m_ptPrev)
|
||||
' Imposto modalità di acquisizione punti
|
||||
PointModeCmBx.SelectedIndex = PT_MODE.DRAW
|
||||
SetCoordVisibility(True)
|
||||
ShowCoord()
|
||||
' Assegno parametri di lavorazione già definiti
|
||||
DepthTxBx.Text = LenToString(m_dDepth, 1)
|
||||
LenghtTxBx.Text = LenToString(m_dLen, 1)
|
||||
' Inizializzo valori non ancora definiti
|
||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
||||
' Reset taglio e disabilito bottone esecuzione
|
||||
m_bCutOk = False
|
||||
UpdateSimulOkBtn()
|
||||
@@ -187,11 +190,17 @@ Public Class MultipleCut
|
||||
m_ptPrev += vtDir * (m_ptRawMax.z - m_ptPrev.z) / vtDir.z
|
||||
End If
|
||||
End If
|
||||
' Visualizzo coordinate (rispetto a 0 tavola)
|
||||
ShowCoord()
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub PointModeCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles PointModeCmBx.SelectionChanged
|
||||
SetCoordVisibility(PointModeCmBx.SelectedIndex = PT_MODE.DRAW)
|
||||
End Sub
|
||||
|
||||
Private Sub Point1Btn_Click(sender As Object, e As RoutedEventArgs) Handles Point1Btn.Click
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
@@ -415,6 +424,34 @@ Public Class MultipleCut
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub XcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles XcoordTxBx.EgtClosed
|
||||
' Recupero il valore della coordinata (in 0 Tab)
|
||||
Dim dXcoord As Double = 0
|
||||
StringToLen(XcoordTxBx.Text, dXcoord)
|
||||
XcoordTxBx.Text = LenToString(dXcoord, 2)
|
||||
' lo assegno al punto corrente (in 0 Macc)
|
||||
m_ptPrev.x = dXcoord + m_ptTabOri.x
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub YcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles YcoordTxBx.EgtClosed
|
||||
' Recupero il valore della coordinata (in 0 Tab)
|
||||
Dim dYcoord As Double = 0
|
||||
StringToLen(YcoordTxBx.Text, dYcoord)
|
||||
YcoordTxBx.Text = LenToString(dYcoord, 2)
|
||||
' lo assegno al punto corrente (in 0 Macc)
|
||||
m_ptPrev.y = dYcoord + m_ptTabOri.y
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub SimulBtn_Click(sender As Object, e As RoutedEventArgs) Handles SimulBtn.Click
|
||||
' Verifico ci sia un taglio valido
|
||||
If Not m_bCutOk Then Return
|
||||
@@ -647,6 +684,20 @@ Public Class MultipleCut
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub SetCoordVisibility(bShow As Boolean)
|
||||
XcoordTxBl.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
XcoordTxBx.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
YcoordTxBl.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
YcoordTxBx.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
End Sub
|
||||
|
||||
Private Sub ShowCoord()
|
||||
Dim ptText As Point3d = m_ptPrev
|
||||
ptText.ToLoc(New Frame3d(m_ptTabOri))
|
||||
XcoordTxBx.Text = LenToString(ptText.x, 2)
|
||||
YcoordTxBx.Text = LenToString(ptText.y, 2)
|
||||
End Sub
|
||||
|
||||
Private Function SetMachineInCurrPos() As Boolean
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
|
||||
@@ -314,7 +314,7 @@
|
||||
<!--CheckBox-->
|
||||
|
||||
<Style x:Key="OmagCut_CheckBox" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource {x:Type CheckBox}}">
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSize_LowerCaseCharacter}"/>
|
||||
<Setter Property="FontSize" Value="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<Setter Property="Height" Value="{DynamicResource CheckBox_Height}"/>
|
||||
</Style>
|
||||
|
||||
|
||||
@@ -66,14 +66,6 @@
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<!--<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="5" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="SawTipTxBl" Grid.Column="0" Grid.Row="10" Grid.ColumnSpan="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" Text=""/>
|
||||
|
||||
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@@ -85,7 +85,6 @@ Public Class SawTestUC
|
||||
' Reset punto acquisito
|
||||
m_bPointP1Ok = False
|
||||
m_bPointP2Ok = False
|
||||
SawTipTxBl.Text = String.Empty
|
||||
' Imposto modalità di acquisizione punti
|
||||
PointModeCmBx.SelectedIndex = PT_MODE.DRAW
|
||||
' Assegno parametri di lavorazione già definiti
|
||||
@@ -193,7 +192,6 @@ Public Class SawTestUC
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' Reset punto non acquisito
|
||||
m_bPointP1Ok = False
|
||||
SawTipTxBl.Text = String.Empty
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
@@ -264,7 +262,6 @@ Public Class SawTestUC
|
||||
Point2Btn.IsChecked = False
|
||||
' Reset punto non acquisito
|
||||
m_bPointP2Ok = False
|
||||
SawTipTxBl.Text = String.Empty
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
|
||||
@@ -93,9 +93,6 @@
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="SawTipTxBl" Grid.Column="0" Grid.Row="10" Grid.ColumnSpan="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" Text=""/>
|
||||
|
||||
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
|
||||
@@ -97,7 +97,6 @@ Public Class SingleCutUC
|
||||
' Reset punto acquisito
|
||||
m_bPointP1Ok = False
|
||||
m_bPointP2Ok = False
|
||||
SawTipTxBl.Text = String.Empty
|
||||
' Inizializzo primo punto acquisito dal disegno come centro del grezzo
|
||||
GetRawCenter(m_ptPrev)
|
||||
' Imposto modalità di acquisizione punti
|
||||
@@ -200,7 +199,6 @@ Public Class SingleCutUC
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' Reset punto non acquisito
|
||||
m_bPointP1Ok = False
|
||||
SawTipTxBl.Text = String.Empty
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
@@ -275,7 +273,6 @@ Public Class SingleCutUC
|
||||
Point2Btn.IsChecked = False
|
||||
' Reset punto non acquisito
|
||||
m_bPointP2Ok = False
|
||||
SawTipTxBl.Text = String.Empty
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user