Compare commits

..

6 Commits

Author SHA1 Message Date
Nicola Pievani 311cf40a8e Allungo lato libero di tagli ridotti 2024-10-29 11:52:44 +01:00
Nicola Pievani 4c34b62e65 Inserito comando Righello nella pagina VeinMatch 2024-10-29 09:54:01 +01:00
Nicola Pievani 87037b6c6a Migliorata gestione selezione OnOff da lista lavorazioni 2024-10-28 12:09:15 +01:00
Nicola Pievani 74c479d17d Gestione attivazione comando modifica 2024-10-28 11:23:53 +01:00
Nicola Pievani ead6bcec6d Gestione deselezione tagli in pagina split 2024-10-09 16:33:45 +02:00
Nicola Pievani a1ad658f27 Correzione DoubleClick OnOff scena 2024-10-09 15:54:47 +02:00
11 changed files with 153 additions and 41 deletions
+1 -1
View File
@@ -36,7 +36,7 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Border Name="LogoBrd" Grid.Column="1"> <Border Name="LogoBrd" Grid.Column="1">
<Image Source="../Resources/NewIcons/Logo-Egalware (3).png" Stretch="Uniform"/> <Image Source="../Resources/AboutBoxImage.png" Stretch="Uniform"/>
</Border> </Border>
</Grid> </Grid>
<TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center" <TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
-4
View File
@@ -220,21 +220,17 @@ Public Class NestPageUC
m_nCountSpot = 0 m_nCountSpot = 0
m_nCountSpotCUT = 0 m_nCountSpotCUT = 0
End If End If
EgtOutLog("Numero di SPOT caricati da OFFICE: " & m_nCountSpot.ToString)
' Se nel progetto non sono inseriti punti SpotReg disabilito i comandi ' Se nel progetto non sono inseriti punti SpotReg disabilito i comandi
If m_nCountSpot < 1 Then If m_nCountSpot < 1 Then
UG0_Reg.IsEnabled = False UG0_Reg.IsEnabled = False
UG1_Reg.IsEnabled = False UG1_Reg.IsEnabled = False
EgtOutLog(" Abilito comandi gestione SPOT")
Else Else
UG0_Reg.IsEnabled = True UG0_Reg.IsEnabled = True
UG1_Reg.IsEnabled = True UG1_Reg.IsEnabled = True
EgtOutLog(" Disabilito comandi gestione SPOT")
End If End If
' Se nel progetto non sono inseriti punti SpotRegCUT provvedo ad aggiungerli ' Se nel progetto non sono inseriti punti SpotRegCUT provvedo ad aggiungerli
If m_nCountSpotCUT < 1 Then If m_nCountSpotCUT < 1 Then
InsertSpotRegistration() InsertSpotRegistration()
EgtOutLog(" Creo SPOT_CUT")
End If End If
' Se necessario riabilito impostazione modificato ' Se necessario riabilito impostazione modificato
+19
View File
@@ -129,6 +129,25 @@ Public Module SplitAuto
If nRes = 0 Then If nRes = 0 Then
EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.") EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
End If End If
ElseIf (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
Mach.m_sLay = NAME_OUTLOOP And
(Mach.m_nInterf = FMI_TYPE.LI Or Mach.m_nInterf = FMI_TYPE.LO Or Mach.m_nInterf = FMI_TYPE.RM) Then
Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
Dim bIn As Boolean = False
Dim bOut As Boolean = False
CanExtendSides(Mach, bIn, bOut)
' And (nRes And CAR_RES.LI_OK) <> 0 : da aggiungere
Mach.m_bCanStartAll = (dStartAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine And bIn And
Mach.m_nInterf <> FMI_TYPE.LI
' And (nRes And CAR_RES.LO_OK) <> 0 : da aggiungere come sopra
Mach.m_bCanEndAll = (dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine And bOut And
Mach.m_nInterf <> FMI_TYPE.LO
If nRes = 0 Then
EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
End If
End If End If
' se trasformabile in taglio di separazione, verifico se lo è ' se trasformabile in taglio di separazione, verifico se lo è
If Mach.m_bCanStartAll Or Mach.m_bCanEndAll Then If Mach.m_bCanStartAll Or Mach.m_bCanEndAll Then
+21 -7
View File
@@ -571,6 +571,11 @@ Public Class SplitPageUC
m_nDragInd = -1 m_nDragInd = -1
m_nDragType = 0 m_nDragType = 0
m_nSelected = GDB_ID.NULL m_nSelected = GDB_ID.NULL
If Not IsNothing(MachiningLsBx.SelectedItem) Then
MarkMachining(MachiningLsBx.SelectedItem.Ind, False)
EgtDraw()
End If
MachiningLsBx.SelectedIndex = -1
End If End If
End Sub End Sub
@@ -700,6 +705,11 @@ Public Class SplitPageUC
End Sub End Sub
Private Sub MachiningLsBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles MachiningLsBx.SelectionChanged Private Sub MachiningLsBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles MachiningLsBx.SelectionChanged
' se non attiva la modifica allora esco
If m_bShow Then
MachiningLsBx.SelectedIndex = -1
Return
End If
If MachiningLsBx.SelectedItems.Count = 0 Then Return If MachiningLsBx.SelectedItems.Count = 0 Then Return
If MachiningLsBx.SelectedItems.Count = 1 Then m_bAreHomogeneous = True If MachiningLsBx.SelectedItems.Count = 1 Then m_bAreHomogeneous = True
' creo lista ordinata dei selezionati ' creo lista ordinata dei selezionati
@@ -741,6 +751,8 @@ Public Class SplitPageUC
End Sub End Sub
Private Sub MachiningLsBx_MouseDoubleClick(sender As Object, e As MouseEventArgs) Handles MachiningLsBx.MouseDoubleClick Private Sub MachiningLsBx_MouseDoubleClick(sender As Object, e As MouseEventArgs) Handles MachiningLsBx.MouseDoubleClick
' se disabilitata la modifica allora esco
If m_bShow Then Return
If m_IsCtrlKeyDown Or m_IsShiftKeyDown Then Return If m_IsCtrlKeyDown Or m_IsShiftKeyDown Then Return
OnOffCut() OnOffCut()
End Sub End Sub
@@ -1946,22 +1958,22 @@ Public Class SplitPageUC
NumberDirectionMachining(nI) NumberDirectionMachining(nI)
Next Next
' -------------------- Recupero le lavorazioni indicate come attive -------------------- ' -------------------- Recupero le lavorazioni indicate come attive -- INIZIO --------------------
Dim ActiveMachLst As New List(Of Integer) Dim ActiveMachLst As New List(Of Integer)
For Each ItemSplitMach As NameIdLsBxItem In m_ItemList For Each ItemSplitMach As NameIdLsBxItem In m_ItemList
ActiveMachLst.Add(ItemSplitMach.Ind) If ItemSplitMach.bIsActive Then ActiveMachLst.Add(ItemSplitMach.Ind)
Next Next
' -------------------- Recupero le lavorazioni indicate come attive -------------------- ' -------------------- Recupero le lavorazioni indicate come attive -- FINE --------------------
' Preparo la lista degli Item ' Preparo la lista degli Item
ShowMachiningList() ShowMachiningList()
' -------------------- Riattivo le lavorazioni precedenti -------------------- ' -------------------- Riattivo le lavorazioni precedenti -- INIZIO --------------------
For Each Item As SplitMach In m_MachiningList For Each Item As SplitMach In m_MachiningList
' spengo tutte le lavorazioni disponibili
EgtSetInfo(Item.m_nId, INFO_MCH_USER_OFF, True) EgtSetInfo(Item.m_nId, INFO_MCH_USER_OFF, True)
Next Next
' riattivo solo quelle indicate come attive
For nIndex As Integer = 0 To ActiveMachLst.Count - 1 For nIndex As Integer = 0 To ActiveMachLst.Count - 1
For Each ItemSplitMach As NameIdLsBxItem In m_ItemList For Each ItemSplitMach As NameIdLsBxItem In m_ItemList
If ItemSplitMach.Ind = ActiveMachLst(nIndex) Then If ItemSplitMach.Ind = ActiveMachLst(nIndex) Then
@@ -1974,7 +1986,7 @@ Public Class SplitPageUC
End If End If
Next Next
Next Next
' -------------------- Riattivo le lavorazioni precedenti -------------------- ' -------------------- Riattivo le lavorazioni precedenti -- FINE --------------------
' Aggiorno visualizzazione ' Aggiorno visualizzazione
EgtDraw() EgtDraw()
@@ -2196,6 +2208,8 @@ Public Class SplitPageUC
VerifyHomogenousMachining(ItemList) VerifyHomogenousMachining(ItemList)
' Abilitazione bottone Next ' Abilitazione bottone Next
EnableButtons() EnableButtons()
Else
End If End If
End Sub End Sub
+1 -1
View File
@@ -27,7 +27,7 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Border Name="LogoBrd" Background="Transparent"> <Border Name="LogoBrd" Background="Transparent">
<Image Source="../Resources/NewIcons/Logo-Egalware (2).png" Stretch="Uniform" Margin="1"/> <Image Source="{DynamicResource LogoOmagImg}" Stretch="Uniform" Margin="1"/>
</Border> </Border>
<!-- ** Definizione della Grid delle tab ** --> <!-- ** Definizione della Grid delle tab ** -->
-7
View File
@@ -1376,13 +1376,6 @@
<Resource Include="Resources\NewIcons\Move-Spot-Reg.png" /> <Resource Include="Resources\NewIcons\Move-Spot-Reg.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Resources\NewIcons\Logo-Egalware.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Logo-Egalware %282%29.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\Logo-Egalware %283%29.png" />
<Resource Include="Resources\NewIcons\RawHeight.png" /> <Resource Include="Resources\NewIcons\RawHeight.png" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

+52 -2
View File
@@ -9,8 +9,8 @@
<ColumnDefinition Width="91"/> <ColumnDefinition Width="91"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<DockPanel>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical" VerticalAlignment="Top" DockPanel.Dock="Top">
<Button Name="NewBtn" Height="64" <Button Name="NewBtn" Height="64"
Style="{DynamicResource OmagCut_YellowTextButton}" Style="{DynamicResource OmagCut_YellowTextButton}"
Content="New"/> Content="New"/>
@@ -23,8 +23,58 @@
<Button Name="ImportCurrProjBtn" Height="64" <Button Name="ImportCurrProjBtn" Height="64"
Style="{DynamicResource OmagCut_YellowTextButton}" Style="{DynamicResource OmagCut_YellowTextButton}"
Content="Import"/> Content="Import"/>
<ToggleButton Name="MeasureBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayYellowIconToggleButton}">
<Image Source="{DynamicResource MeasureImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</ToggleButton>
</StackPanel> </StackPanel>
<StackPanel Name="DistanceStkPnl" Orientation="Vertical" VerticalAlignment="Bottom" DockPanel.Dock="Bottom" Margin="10,0,0,0">
<!--Distanza-->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="MeasureLabTxBl" Height="20" DockPanel.Dock="Bottom" Grid.Column="0" Foreground="{StaticResource Omag_LightGray}"
Text="Dist=" HorizontalAlignment="Right" />
<TextBlock Name="MeasureValTxBl" Height="20" DockPanel.Dock="Bottom" Grid.Column="1" Foreground="{StaticResource Omag_LightGray}"
HorizontalAlignment="Left"/>
</Grid>
<!--Proiezione in X-->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="dXLabTxBl" Height="20" DockPanel.Dock="Bottom" Grid.Column="0" Foreground="{StaticResource Omag_LightGray}"
Text="dX=" HorizontalAlignment="Right"/>
<TextBlock Name="dXValTxBl" Height="20" DockPanel.Dock="Bottom" Grid.Column="1" Foreground="{StaticResource Omag_LightGray}"
HorizontalAlignment="Left"/>
</Grid>
<!--Proiezione in Y -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="dYLabTxBl" Height="20" DockPanel.Dock="Bottom" Grid.Column="0" Foreground="{StaticResource Omag_LightGray}"
Text="dY=" HorizontalAlignment="Right"/>
<TextBlock Name="dYValTxBl" Height="20" DockPanel.Dock="Bottom" Grid.Column="1" Foreground="{StaticResource Omag_LightGray}"
HorizontalAlignment="Left"/>
</Grid>
<!--Proiezione in Z -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="dZLabTxBl" Height="20" DockPanel.Dock="Bottom" Grid.Column="0" Foreground="{StaticResource Omag_LightGray}"
Text="dZ=" HorizontalAlignment="Right"/>
<TextBlock Name="dZValTxBl" Height="20" DockPanel.Dock="Bottom" Grid.Column="1" Foreground="{StaticResource Omag_LightGray}"
HorizontalAlignment="Left"/>
</Grid>
</StackPanel>
</DockPanel>
</Grid> </Grid>
</Window> </Window>
+40
View File
@@ -82,6 +82,8 @@ Public Class VeinMatchingWindow
Dim nTxrMaxLinPix As Integer = GetPrivateProfileInt(S_SCENE, K_TEXMAXLINPIX, 4096, m_MainWindow.GetIniFile()) Dim nTxrMaxLinPix As Integer = GetPrivateProfileInt(S_SCENE, K_TEXMAXLINPIX, 4096, m_MainWindow.GetIniFile())
EgtSetTextureMaxLinPixels(nTxrMaxLinPix) EgtSetTextureMaxLinPixels(nTxrMaxLinPix)
m_bFirst = False m_bFirst = False
' nascondo la visulizzazione dei campi
DistanceStkPnl.Visibility = Visibility.Hidden
End If End If
' inibisco selezione diretta da Scene ' inibisco selezione diretta da Scene
VeinMatchingScene.SetStatusNull() VeinMatchingScene.SetStatusNull()
@@ -194,6 +196,25 @@ Public Class VeinMatchingWindow
EgtDraw() EgtDraw()
End Sub End Sub
Private Sub OnShowDistanceVector(sender As Object, vtDist As Vector3d) Handles VeinMatchingScene.OnShowDistanceVector
Dim sMsg As String = DistToString(vtDist)
Dim sItemsMsg As String() = sMsg.Split(vbCrLf)
If sItemsMsg.Count > 1 Then
' stampo solo il valore di lunghezza
MeasureValTxBl.Text = sItemsMsg(0).Split("="c)(1)
sItemsMsg(1) = sItemsMsg(1).Trim
Dim sSubItemMsg As String() = sItemsMsg(1).Split(" "c)
If sSubItemMsg.Count > 1 Then
dXValTxBl.Text = sSubItemMsg(0).Split("="c)(1)
dYValTxBl.Text = sSubItemMsg(1).Split("="c)(1)
dZValTxBl.Text = sSubItemMsg(2).Split("="c)(1)
End If
Else
MeasureValTxBl.Text = sMsg
End If
DistanceStkPnl.Visibility = Visibility.Visible
End Sub
Private Sub NewBtn_Click(sender As Object, e As RoutedEventArgs) Handles NewBtn.Click Private Sub NewBtn_Click(sender As Object, e As RoutedEventArgs) Handles NewBtn.Click
VeinMatching.Clear() VeinMatching.Clear()
End Sub End Sub
@@ -211,6 +232,25 @@ Public Class VeinMatchingWindow
VeinMatching.LoadCurrPartFromProj() VeinMatching.LoadCurrPartFromProj()
End Sub End Sub
Private Sub MeasureBtn_Checked(sender As Object, e As RoutedEventArgs) Handles MeasureBtn.Checked
VeinMatchingScene.SetStatusGetDistance()
Dim ptRef1 As Point3d
If EgtGetTableRef(1, ptRef1) Then
EgtSetGridFrame(New Frame3d(ptRef1))
VeinMatchingScene.SetGridCursorPos(True)
End If
End Sub
Private Sub MeasureBtn_Unchecked(sender As Object, e As RoutedEventArgs) Handles MeasureBtn.Unchecked
VeinMatchingScene.ResetStatusGetDistance()
VeinMatchingScene.SetStatusNull()
MeasureValTxBl.Text = ""
dXValTxBl.Text = ""
dYValTxBl.Text = ""
dZValTxBl.Text = ""
DistanceStkPnl.Visibility = Visibility.Hidden
End Sub
End Class End Class
Friend Module VeinMatching Friend Module VeinMatching