Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 311cf40a8e | |||
| 4c34b62e65 |
@@ -129,6 +129,25 @@ Public Module SplitAuto
|
||||
If nRes = 0 Then
|
||||
EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
|
||||
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
|
||||
' se trasformabile in taglio di separazione, verifico se lo è
|
||||
If Mach.m_bCanStartAll Or Mach.m_bCanEndAll Then
|
||||
|
||||
@@ -4,27 +4,77 @@
|
||||
TextBlock.FontFamily="{DynamicResource OmagCut_Font}"
|
||||
Height="500" Width="500" ShowInTaskbar="False" Initialized="Window_Initialized" MinWidth="300" MinHeight="300">
|
||||
|
||||
<Grid Name="VeinMatchingGrid" Background="{DynamicResource OmagCut_Gray}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="91"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Button Name="NewBtn" Height="64"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"
|
||||
Content="New"/>
|
||||
<Button Name="ExportBtn" Height="64"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"
|
||||
Content="Export"/>
|
||||
<Button Name="AssemblyBtn" Height="64"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"
|
||||
Content="3D"/>
|
||||
<Button Name="ImportCurrProjBtn" Height="64"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"
|
||||
Content="Import"/>
|
||||
</StackPanel>
|
||||
|
||||
<Grid Name="VeinMatchingGrid" Background="{DynamicResource OmagCut_Gray}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="91"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<DockPanel>
|
||||
<StackPanel Orientation="Vertical" VerticalAlignment="Top" DockPanel.Dock="Top">
|
||||
<Button Name="NewBtn" Height="64"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"
|
||||
Content="New"/>
|
||||
<Button Name="ExportBtn" Height="64"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"
|
||||
Content="Export"/>
|
||||
<Button Name="AssemblyBtn" Height="64"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"
|
||||
Content="3D"/>
|
||||
<Button Name="ImportCurrProjBtn" Height="64"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"
|
||||
Content="Import"/>
|
||||
<ToggleButton Name="MeasureBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource MeasureImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</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>
|
||||
|
||||
</Window>
|
||||
|
||||
@@ -82,6 +82,8 @@ Public Class VeinMatchingWindow
|
||||
Dim nTxrMaxLinPix As Integer = GetPrivateProfileInt(S_SCENE, K_TEXMAXLINPIX, 4096, m_MainWindow.GetIniFile())
|
||||
EgtSetTextureMaxLinPixels(nTxrMaxLinPix)
|
||||
m_bFirst = False
|
||||
' nascondo la visulizzazione dei campi
|
||||
DistanceStkPnl.Visibility = Visibility.Hidden
|
||||
End If
|
||||
' inibisco selezione diretta da Scene
|
||||
VeinMatchingScene.SetStatusNull()
|
||||
@@ -194,6 +196,25 @@ Public Class VeinMatchingWindow
|
||||
EgtDraw()
|
||||
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
|
||||
VeinMatching.Clear()
|
||||
End Sub
|
||||
@@ -211,6 +232,25 @@ Public Class VeinMatchingWindow
|
||||
VeinMatching.LoadCurrPartFromProj()
|
||||
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
|
||||
|
||||
Friend Module VeinMatching
|
||||
|
||||
Reference in New Issue
Block a user