Compare commits

...

33 Commits

Author SHA1 Message Date
Dario Sassi 00bf8a90ec EgtCAM5 :
- corretto Update di BeamNT.
2026-07-16 09:55:14 +02:00
Dario Sassi aeaf8c61f5 EgtCAM5 3.1g3 :
- aggiunta gestione BeamNT
- aggiunto switch automatico toolbar Beam e BeamNT (dipende da ultimo lancio da programma esterno e salvato in INI come [BeamNT] BntShow=1).
2026-07-15 17:52:47 +02:00
Dario Sassi 1988529431 EgtCAM5 3.1g2 :
- ricompilazione con cambio versione.
2026-07-15 08:37:09 +02:00
Emmanuele Sassi 15381e0678 Merge branch 'master' of https://gitlab.steamware.net/egaltech/EgtCAM5 2026-07-14 13:17:14 +02:00
Emmanuele Sassi f6a6a174fa - aggiunto parametro per bloccare modifica bwe se pezzo in produzione 2026-07-14 13:16:58 +02:00
Dario Sassi a6884b8e28 EgtCAM5 3.1g1 :
- ricompilazione con cambio versione.
2026-07-03 19:06:16 +02:00
Demetrio Cassarino ac185c3cc9 -aggiunto controllo visibilità su pulsante aggiungi nota 2026-07-03 12:53:02 +02:00
Dario Sassi 410a28a791 EgtCAM5 :
- piccoli aggiustamenti per parametri sgrossatura e finitura cornici con lama.
2026-07-02 11:55:06 +02:00
Dario Sassi 58805c1fa8 EgtCAM5 :
- in analisi colore del numero di curva in composita dipende dalle info OPEN e OPEN2 con vettore inidici curve semplici aperte o aperte da non oltrepassare.
2026-06-29 16:10:51 +02:00
Dario Sassi bff4141c67 EgtCAM5 3.1f4 :
- corretto problema mancata selezione grezzo durante modifica posizione in Disposizione.
2026-06-29 11:58:18 +02:00
Dario Sassi 7259bd863d EgtCAM5 3.1f3 :
- ricompilazione con cambio versione.
2026-06-25 19:08:19 +02:00
Dario Sassi 431cce7d82 EgtCAM5 3.1f2 :
- ricompilazione con cambio versione.
2026-06-19 19:17:59 +02:00
Dario Sassi 333aa2e052 EgtCAM5 :
- piccolo aggiustamento nella dimensione combo per nome macchina.
2026-06-18 15:41:04 +02:00
Demetrio Cassarino 193b0b1b01 -piccola modifica a combobox machine 2026-06-18 10:29:49 +02:00
Demetrio Cassarino d5b3abf665 corretto merge 2026-06-17 16:34:38 +02:00
Demetrio Cassarino 951ae72624 -piccola modfica a griglia dinamica e ad analizeischecked 2026-06-17 16:34:24 +02:00
Dario Sassi 4bb7052d50 EgtCAM5 :
- altra modifica a scelta diretta path partprogram (ora la scelta non viene salvata).
2026-06-09 15:28:45 +02:00
Dario Sassi 0847ab0cd3 EgtCAM5 :
- corretta gestione PreviewMachiningTool con ricalcolo lavorazione e visualizzazione disabilitata.
2026-06-09 11:45:24 +02:00
Dario Sassi 74ec4c7ebf EgtCAM5 :
- piccola miglioria alla precedente modifica.
2026-06-08 19:58:28 +02:00
Dario Sassi bc59d9e357 EgtCAM5 :
- aggiunta possibilità di scegliere path del partprogram premendo CTRL+genera (come Icarus).
2026-06-08 19:42:40 +02:00
Dario Sassi d7090f7f9a EgtCAM5 3.1f1 :
- ricompilazione con cambio versione.
2026-06-08 17:30:32 +02:00
Demetrio Cassarino f52743c277 -rimosso doppia selezione tastiera 2026-06-04 15:22:34 +02:00
Demetrio Cassarino dc24ac337b EgtCAM5 3.1e4:
- aggiunto controllo su puilsante aggiungi nota quando si duplica una lavorazione
2026-05-28 10:15:03 +02:00
Dario Sassi d26a89e0a5 EgtCAM5 3.1e3 :
- ricompilazione con cambio versione.
2026-05-25 08:16:16 +02:00
Dario Sassi 39c9f8cabe EgtCAM5 :
- ricalcolo supporto grezzo dopo rotazione attorno ad asse non parallelo a Z.
2026-05-15 18:34:30 +02:00
Dario Sassi 8724a8cee9 EgtCAM5 :
- riordino posizioni parametri generici svuotature in lista operazioni.
2026-05-10 11:38:01 +02:00
Dario Sassi 17917c682e EgtCAM5 3.1e2 :
- ricompilazione con cambio versione.
2026-05-08 17:14:30 +02:00
Demetrio Cassarino d339d58ad1 -piccola modifica gestione AdvancedParamIsExpander 2026-05-08 16:54:16 +02:00
Demetrio Cassarino 6efad10da5 corretto commit 2026-05-08 15:25:28 +02:00
Demetrio Cassarino 77a708f35f -gestito apertura expander advanced con slider
-piccola modifica per visualizzare parametri EPICYCLESRAD e EPICYCLESDIST in pocketing
2026-05-08 15:24:14 +02:00
Dario Sassi 7668db1917 EgtCAM5 3.1e1 :
- ricompilazione con cambio versione.
2026-05-07 12:25:00 +02:00
Dario Sassi 2ad2f50a4f EgtCAM5 3.1d2 :
- bloccata l'uscita diretta con ALT+F4 che evitava la richiesta di salvataggio del lavoro in corso.
2026-04-28 19:26:17 +02:00
Dario Sassi 051cbb2a5a EgtCAM5 :
- modifiche per parametri da visualizzare in fresatura di tipo STONE.
2026-04-23 18:17:02 +02:00
40 changed files with 718 additions and 239 deletions
+6
View File
@@ -58,6 +58,12 @@ Public Class AboutBoxWndV
IniFile.GetSpecialLuaVersion( IniFile.m_sBeamDirPath, sVersion)
sInfo &= Environment.NewLine & "Beam ver. " & sVersion & " " & IniFile.m_sBeamDirPath
End If
If IniFile.IsActiveBeamNT() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion( IniFile.m_sBeamNTDirPath, sVersion)
sInfo &= Environment.NewLine & "BeamNT ver. " & sVersion & " " & IniFile.m_sBeamNTDirPath
End If
If IniFile.IsActiveWall() Then
bExtensions = True
Dim sVersion As String = "---"
+7
View File
@@ -125,6 +125,13 @@ Module ConstIni
Public Const K_SPECIALENABLE As String = "SpecialEnable"
Public Const K_BUTTON As String = "Button"
Public Const S_BEAMNT As String = "BeamNT"
Public Const K_BEAMNTENABLE As String = "BntEnable"
Public Const K_BEAMNTSHOW As String = "BntShow"
Public Const K_BEAMNTBASEDIR As String = "BaseDir"
Public Const K_BEAMNTBWEEXEC As String = "BweExec"
Public Const K_BEAMNTBUTTON As String = "Button"
Public Const S_BEAM As String = "Beam"
Public Const K_BEAMENABLE As String = "BtlEnable"
Public Const K_BEAMBASEDIR As String = "BaseDir"
+10 -1
View File
@@ -266,7 +266,6 @@
<DependentUpon>SetUpV.xaml</DependentUpon>
</Compile>
<Compile Include="SetUp\SetUpVM.vb" />
<Compile Include="Special-BeamWall\Beam.vb" />
<Compile Include="Command\Command.vb" />
<Compile Include="Command\RelayCommand.vb" />
<Compile Include="Constants\ConstDoors.vb" />
@@ -282,6 +281,12 @@
<DependentUpon>SelMachGroupWndV.xaml</DependentUpon>
</Compile>
<Compile Include="SelMachGroupWnd\SelMachGroupWndVM.vb" />
<Compile Include="Special-BeamWall\Beam.vb" />
<Compile Include="Special-BeamWall\BeamNT.vb" />
<Compile Include="Special-BeamWall\BeamNTPanelV.xaml.vb">
<DependentUpon>BeamNTPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="Special-BeamWall\BeamNTPanelVM.vb" />
<Compile Include="Special-BeamWall\BeamWallPanelVM.vb" />
<Compile Include="Special-BeamWall\BeamWallPanelV.xaml.vb">
<DependentUpon>BeamWallPanelV.xaml</DependentUpon>
@@ -608,6 +613,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Special-BeamWall\BeamNTPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Special-BeamWall\BeamWallPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
+1 -1
View File
@@ -32,7 +32,7 @@ Public Class InstrumentPanelVM
Map.refProjectVM.GetScene.SetStatusAnalyze()
Else
Map.refProjectVM.GetScene.ResetStatusAnalyze()
Map.refManageLayerExpanderVM.SelectIdInObjTree(GDB_ID.NULL)
'Map.refManageLayerExpanderVM.SelectIdInObjTree(GDB_ID.NULL)
Map.refStatusBarVM.NotifyStatusOutput("")
Analyze.EraseAnalyzeGroup()
EgtDraw()
+11 -11
View File
@@ -7,14 +7,14 @@
<StackPanel Orientation="Horizontal">
<!--Combobox per selezionare la macchina corrente-->
<ComboBox ItemsSource="{Binding Path=MachinesList}" DisplayMemberPath="Name"
SelectedItem="{Binding Path=SelectedMachine}" SelectedValuePath="Name"
Height="22" Width="150" IsEnabled="{Binding MachineListIsEnabled}" Margin="2,0"/>
SelectedItem="{Binding Path=SelectedMachine}" SelectedValuePath="Name"
Height="22" Width="175" IsEnabled="{Binding MachineListIsEnabled}" Margin="2,0"/>
<Button Content="{Binding ToolDBMsg}"
Command="{Binding ToolDbCommand}"
IsEnabled="{Binding ToolDb_IsEnabled}"
Width="55"
ToolTip="{Binding ToolDBToolTip}"
Style="{StaticResource GridViewPanelButton}"/>
Command="{Binding ToolDbCommand}"
IsEnabled="{Binding ToolDb_IsEnabled}"
Width="55"
ToolTip="{Binding ToolDBToolTip}"
Style="{StaticResource GridViewPanelButton}"/>
<Button Content="{Binding MachiningDbMsg}"
Command="{Binding MachDbCommand}"
IsEnabled="{Binding MachDb_IsEnabled}"
@@ -28,10 +28,10 @@
ToolTip="{Binding SetUpDbToolTip}"
Style="{StaticResource GridViewPanelButton}"/>
<Button Command="{Binding MachOptionsCommand}"
ToolTip="{Binding MachOptionsToolTip}">
<Image Source="/Resources/MachinePanel/MachineOptions.png"
Height="22" />
ToolTip="{Binding MachOptionsToolTip}">
<Image Source="/Resources/MachinePanel/MachineOptions.png"
Height="22" />
</Button>
</StackPanel>
</StackPanel>
</EgtFloating:EgtFloatingPanel>
+9 -2
View File
@@ -4,13 +4,13 @@ Imports EgtWPFLib5
Class MainWindowV
Inherits EgtCustomWindow
Private Sub Me_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
Private Sub MainWindow_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
If Not ProjectVM.GetAppToShow() Then
Me.ShowInTaskbar = False
End If
End Sub
Private Sub EgtCustomWindow_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
Private Sub MainWindow_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
' Posizione e dimensioni del Form
Dim WinPos As New WinPos
If ProjectVM.GetAppToShow() Then
@@ -21,6 +21,13 @@ Class MainWindowV
WinPosToWindow(Me, WinPos)
End Sub
Private Sub MainWindowV_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles Me.Closing
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt AndAlso Keyboard.IsKeyDown(Key.F4) Then
e.Cancel = True
Return
End If
End Sub
Private Sub MainWindow_Drop(sender As Object, e As DragEventArgs)
' Se drag di file
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
+4 -3
View File
@@ -171,7 +171,6 @@ Public Class MainWindowVM
Public Sub CloseApplication(ByVal param As Object)
If IniFile.m_bScriptRunning Then
If Not IniFile.m_bFailedRun Then
'MessageBox.Show("Can't exit now. Wait until the end of the script execution", "", MessageBoxButton.OK, MessageBoxImage.Stop)
Return
End If
End If
@@ -379,8 +378,8 @@ Public Class MainWindowVM
EgtSetLockId(sLockId)
End If
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(3279, 3104, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 3104, 1, IniFile.m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(3279, 3107, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 3107, 1, IniFile.m_nKeyOptions)
' Leggo e imposto livello utilizzatore
IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
' Imposto abilitazione lavorazioni avanzate
@@ -609,11 +608,13 @@ Public Class MainWindowVM
Map.refMachiningParameterExpanderVM.CurrOperation.SetShowNoteListCombo_IsEnable(True)
End If
ElseIf (e.Key = Key.Left OrElse e.Key = Key.Right) AndAlso Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then
If Map.refMachiningParameterExpanderVM.CurrOperation.AdvancedParamIsExpander Then Map.refMachiningParameterExpanderVM.CurrOperation.AdvancedParamIsExpander = True
Map.refMachiningParameterExpanderVM.FocusSlider()
Dim nStep As Integer = If(e.Key = Key.Right, 1, -1)
Map.refMachiningParameterExpanderVM.SetSliderValue(nStep)
e.Handled = True
ElseIf (e.Key = Key.Up OrElse e.Key = Key.Down) AndAlso Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then
If Map.refMachiningParameterExpanderVM.CurrOperation.AdvancedParamIsExpander Then Map.refMachiningParameterExpanderVM.CurrOperation.AdvancedParamIsExpander = True
Map.refMachiningParameterExpanderVM.FocusButtonPreview()
If e.Key = Key.Down Then
Map.refMachiningParameterExpanderVM.RevertPreviewMachiningTool()
+2 -2
View File
@@ -70,6 +70,6 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("3.1.4.1")>
<Assembly: AssemblyFileVersion("3.1.4.1")>
<Assembly: AssemblyVersion("3.1.7.3")>
<Assembly: AssemblyFileVersion("3.1.7.3")>
@@ -55,10 +55,10 @@
</Grid.ColumnDefinitions>
<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}" Grid.Column="0"
IsChecked="{Binding OnOff}" Visibility="{Binding IsHidden}" Focusable="True" Height="15" Width="15" Margin="0,0,5,0"/>
<Image Grid.Column="1" Source="{Binding PictureString}" Height="15" Margin="0,0,5,0"/>
<TextBlock Grid.Column="2" Text="{Binding Name}" Margin="0,0,5,0"/>
<Ellipse Grid.Column="3" Height="10" Width="10" Fill="{Binding LayerColor}" />
IsChecked="{Binding OnOff}" Visibility="{Binding IsHidden}" Focusable="False" Height="15" Width="15" Margin="0,0,5,0"/>
<Image Grid.Column="1" Source="{Binding PictureString}" Focusable="False" Height="15" Margin="0,0,5,0"/>
<TextBlock Grid.Column="2" Text="{Binding Name}" Focusable="False" Margin="0,0,5,0"/>
<Ellipse Grid.Column="3" Height="10" Width="10" Focusable="False" Fill="{Binding LayerColor}" />
</Grid>
</HierarchicalDataTemplate>
@@ -322,7 +322,7 @@ Public Class DispositionParameterExpanderVM
StringToLen(Values(2), dSupp)
End If
Else
m_InputErrorMsg = "Il valore non è un punto X,Y"
m_InputErrorMsg = "Il valore non è un punto X,Y o X,Y,Z"
OnPropertyChanged("InputErrorMsg")
Return
End If
@@ -429,6 +429,29 @@ Public Class DispositionParameterExpanderVM
Select Case m_ActiveObject
Case ObjectType.RAWPART
If EgtRotateRawPart(nSelId, vtRotAx, InputAngle) Then
' Se rotazione attorno ad asse diverso da Z
If Math.Abs( InputAngle) > EPS_ANG_ZERO AndAlso
( Math.Abs( vtRotAx.x) > EPS_ZERO OrElse Math.Abs( vtRotAx.y) > EPS_ZERO) Then
' Elimino eventuale vecchio supporto
Dim nOldSuppId As Integer = EgtGetFirstNameInGroup(nSelId, SUPPORT)
EgtErase( nOldSuppId)
' Se necessario, aggiungo nuovo supporto
Dim ptRawRefPoint As Point3d = DispositionUtility.GetRawPartRefPoint(nSelId, m_RawRefPosition)
Dim dSupp As Double = ptRawRefPoint.z
If dSupp > EPS_SMALL Then
Dim nNewSuppId As Integer = GDB_ID.NULL
Dim nRawOutLnId As Integer = EgtGetFirstNameInGroup(nSelId, RAWOUTLINE)
If nRawOutLnId <> GDB_ID.NULL Then
Dim vtExtr As New Vector3d( 0, 0, -dSupp)
nNewSuppId = EgtCreateSurfTmByRegionExtrusion( nSelId, 1, {nRawOutLnId}, vtExtr, 0.05, GDB_RT.GLOB)
End If
If nNewSuppId <> GDB_ID.NULL Then
EgtSetName( nNewSuppId, SUPPORT)
EgtSetColor( nNewSuppId, New Color3d(150, 75, 0))
If nOldSuppId <> GDB_ID.NULL Then EgtChangeId( nNewSuppId, nOldSuppId)
End If
End If
End If
Dim vtOrigMove As Vector3d = Vector3d.NULL()
Dim vtRefMove As Vector3d = Vector3d.NULL()
DispositionUtility.VerifyRawPosition(nSelId, vtOrigMove, vtRefMove)
@@ -119,11 +119,7 @@ Public Class MachiningParameterExpanderVM
End Set
End Property
Friend Sub ResetSliderValue()
If m_nPreviewMachiningTool = MCH_LOOK.TAB_TOOL OrElse m_nPreviewMachiningTool = MCH_LOOK.TAB_HEAD Then
m_nPtEntId = EgtPreviewMachiningTool(GDB_ID.NULL, MCH_PTM.AFTER)
Else
m_nPtEntId = GDB_ID.NULL
End If
m_nPtEntId = EgtPreviewMachiningTool(GDB_ID.NULL, MCH_PTM.AFTER)
m_SliderValue = 1
NotifyPropertyChanged(NameOf(SliderValue))
End Sub
@@ -188,7 +184,11 @@ Public Class MachiningParameterExpanderVM
Dim nType As Integer
EgtGetMachiningParam(MCH_MP.NAME, sName)
EgtGetMachiningParam(MCH_MP.TYPE, nType)
Dim oldValue As Boolean = If(Not IsNothing(m_CurrOperation), m_CurrOperation.AdvancedParamIsExpander, False)
Dim oldOperation As MachiningTreeViewItem = If(Not IsNothing(m_CurrOperation), m_CurrOperation, Nothing)
m_CurrOperation = New MachiningTreeViewItem(sName, DirectCast(nType, MCH_MY))
m_CurrOperation.AdvancedParamIsExpander = oldValue
m_CurrOperation.ReadOperationParam()
@@ -251,8 +251,7 @@ Public Class MachiningParameterExpanderVM
If MatType = MaterialType.STONE5 Then
' se macchina di tipo STONE ricavo il tipo di utensile
Dim sMachiningToolName = String.Empty
EgtMdbSetCurrMachining(sName)
EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sMachiningToolName)
EgtGetMachiningParam(MCH_MP.TOOL, sMachiningToolName)
EgtTdbSetCurrTool(sMachiningToolName)
Dim dValue As Double = 0
Dim nToolType As Integer
@@ -129,13 +129,8 @@
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngleTxBl}"
ParamTxBx="{Binding Path=SideAngle,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
@@ -151,8 +146,13 @@
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"
Visibility="{Binding Epicycles_Visibility}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngleTxBl}"
ParamTxBx="{Binding Path=SideAngle,
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
@@ -119,24 +119,21 @@
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadInTypeTxBl}"
ParamCmBxList="{Binding Path=LeadInTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadInType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadOutTypeTxBl}"
ParamCmBxList="{Binding Path=LeadOutTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
@@ -252,6 +249,62 @@
</Grid>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadInTypeTxBl}"
ParamCmBxList="{Binding Path=LeadInTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadInType}"
Style="{DynamicResource ComboParamV_Margin}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartAddLenTxBl}"
ParamTxBx="{Binding Path=StartAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LiTangTxBl}"
ParamTxBx="{Binding Path=LiTang,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LiElevTxBl}"
ParamTxBx="{Binding Path=LiElev,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadOutTypeTxBl}"
ParamCmBxList="{Binding Path=LeadOutTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}"
Style="{DynamicResource ComboParamV_Margin}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EndAddLenTxBl}"
ParamTxBx="{Binding Path=EndAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LoTangTxBl}"
ParamTxBx="{Binding Path=LoTang,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LoElevTxBl}"
ParamTxBx="{Binding Path=LoElev,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
@@ -93,6 +93,12 @@
ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding HeadSideTxBl}"
ParamCmBxList="{Binding Path=HeadSideList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedHeadSide}"
Style="{DynamicResource ComboParamV_Margin}"/>
<UniformGrid Columns="2">
<TextBlock Text="{Binding UserNotesTxBl}"
@@ -131,6 +137,24 @@
ParamCmBxSelIndex="{Binding Path=SelectedLeadLinkType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartAddLenTxBl}"
ParamTxBx="{Binding Path=StartAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EndAddLenTxBl}"
ParamTxBx="{Binding Path=EndAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
@@ -271,22 +295,6 @@
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding OffsetGpBxLbl}"/>
</Expander.Header>
<UniformGrid Columns="1">
<EgtWPFLib5:StringParamV Grid.Row="0"
ParamTxBl="{Binding OffSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</UniformGrid>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/>
@@ -81,13 +81,13 @@
Converter={StaticResource DepthUnitConverter}}"
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</UniformGrid>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding StepTypeTxBl}"
ParamCmBxList="{Binding Path=StepTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding HeadSideTxBl}"
ParamCmBxList="{Binding Path=HeadSideList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedHeadSide}"
Style="{DynamicResource ComboParamV_Margin}"/>
<UniformGrid Columns="2">
<TextBlock Text="{Binding UserNotesTxBl}"
@@ -111,12 +111,6 @@
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding HeadSideTxBl}"
ParamCmBxList="{Binding Path=HeadSideList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedHeadSide}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV Grid.Column="0" Grid.Row="0"
ParamTxBl="{Binding StartPosTxBl}"
ParamTxBx="{Binding Path=StartPos,
@@ -129,6 +123,18 @@
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadLinkType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartAddLenTxBl}"
ParamTxBx="{Binding Path=StartAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EndAddLenTxBl}"
ParamTxBx="{Binding Path=EndAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
@@ -247,6 +253,13 @@
<Expander Header="{Binding StepGpBxLbl}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding StepTypeTxBl}"
ParamCmBxList="{Binding Path=StepTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged,
@@ -179,9 +179,6 @@ Public Class OperationParametersExpanderVM
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomProbing
End Select
' Imposto visualizzazione utensile
'Map.refMachiningParameterExpanderVM.SetPreviewMachiningTool(MCH_LOOK.TAB_TOOL)
'Map.refMachiningParameterExpanderVM.SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Tool.png")
'Map.refMachiningParameterExpanderVM.SetSlider_IsEnable(True)
EgtPreparePreviewMachiningTool()
Map.refMachiningParameterExpanderVM.PreviewMachiningTool()
EgtDraw()
@@ -470,6 +470,9 @@ Public Class OperationsListExpanderVM
If EgtGetOperationType(selOperation.Id) <> MCH_OY.DISP Then
Map.refMachiningParameterExpanderVM.SetSliderScale(EgtGetPreviewMachiningToolStepCount())
Map.refMachiningParameterExpanderVM.ResetSliderValue()
If Map.refMachiningParameterExpanderVM.CurrOperation.NotesListCombo.Count > 0 Then
Map.refMachiningParameterExpanderVM.CurrOperation.SetShowNoteListCombo_Visibility(Visibility.Visible)
End If
EgtDraw()
End If
End If
@@ -780,6 +783,10 @@ Public Class OperationsListExpanderVM
End If
' Ricarico la lista operazioni aggiornata
LoadOperationList(MachiningId)
' Aggiunto controllo visibilita' pulsante aggiungi note
If Map.refMachiningParameterExpanderVM.CurrOperation.NotesListCombo.Count > 0 Then
Map.refMachiningParameterExpanderVM.CurrOperation.SetShowNoteListCombo_Visibility(Visibility.Visible)
End If
End Sub
#End Region ' DuplicateMachCommand
@@ -91,17 +91,41 @@ Public Class SimulationExpanderVM
' Verifico se richiesta anche visualizzazione del CN
Dim bNcView As Boolean = ((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift)
' Verifico se richiesto anche nome del CN
Dim bNcName As Boolean = ((Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control)
' Recupero la fase corrente
Dim nPhase As Integer = EgtGetCurrPhase()
Dim nPhase As Integer = Math.Max( EgtGetCurrPhase(), 1)
' Aggiorno le lavorazioni
If Not UpdateAllMachinings() Then
EgtSetCurrPhase(If(nPhase = 0, 1, nPhase), True)
EgtSetCurrPhase(nPhase, True)
Return
End If
' Recupero nome file CN (dopo aver verificato salvataggio progetto)
Dim sCncFile As String = ""
Dim sInfo As String = ""
If Not GetCncFileName(True, sCncFile, sInfo) Then Return
If Not GetCncFileName(True, sCncFile, sInfo) Then
EgtSetCurrPhase(nPhase, True)
Return
End If
' Se richiesta scelta del nome file
If bNcName Then
Dim sExt As String = Path.GetExtension( sCncFile)
Dim NewSaveFileDialog As New Windows.Forms.SaveFileDialog With {.Title = "PartProgram File Name",
.Filter = "|*" & sExt,
.FilterIndex = 1,
.InitialDirectory = System.IO.Path.GetDirectoryName(sCncFile),
.FileName = sCncFile,
.CreatePrompt = True,
.OverwritePrompt = True,
.ValidateNames = False}
If NewSaveFileDialog.ShowDialog() = Forms.DialogResult.Ok Then
sCncFile = NewSaveFileDialog.FileName
End If
End If
' Eseguo
If Not EgtGenerate(sCncFile, sInfo) Then
Dim nErr As Integer = EgtGetLastMachMgrErrorId()
@@ -120,7 +144,7 @@ Public Class SimulationExpanderVM
Map.refStatusBarVM.NotifyStatusOutput(EgtMsg(5332) & " (" & sCncFile & ")")
End If
' Torno alla fase originale (o alla prima se non definita)
EgtSetCurrPhase(If(nPhase = 0, 1, nPhase), True)
EgtSetCurrPhase(nPhase, True)
' Se richiesta anche la visualizzazione del CN corrente, procedo
If bNcView Then
@@ -459,7 +483,7 @@ Public Class SimulationExpanderVM
sInfo &= "-" & sMGrpName
End If
End If
Dim sExt As String = ".cnc"
Dim sExt As String = ".cnc"
EgtUILib.GetPrivateProfileString(S_PARTPROGRAM, K_EXTENSION, sExt, sExt, IniFile.m_sCurrMachIniFilePath)
sCncFile = Path.ChangeExtension(sCncFile, sExt)
End If
+1 -1
View File
@@ -6,7 +6,7 @@
<Grid x:Name="MachiningGrid" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
<Grid.RowDefinitions>
<RowDefinition MinHeight="100" Height="400" MaxHeight="800"
<RowDefinition MinHeight="100" Height="400" MaxHeight="600"
EgtCAM5:MachiningOptionPanelVM.IsExpanded="{Binding OperationsListRowIsExpanded}"
EgtCAM5:MachiningOptionPanelVM.TargetSplitter="{Binding ElementName=MachiningGridSplitter}"/>
<RowDefinition Height="Auto"/>
+2
View File
@@ -71,6 +71,7 @@ Friend Module OptionModule
' Variabili per gli Extra
Friend m_bSpecialOn As Boolean
Friend m_bBeamNTOn As Boolean
Friend m_bBeamOn As Boolean
Friend m_bWallOn As Boolean
Friend m_bDoorsOn As Boolean
@@ -184,6 +185,7 @@ Friend Module OptionModule
m_bUseDispositionScript = (GetPrivateProfileInt(S_OPTIONS, K_USEDISPOSITIONSCRIPT, 0) <> 0)
' Inizializzo variabili per Extra
m_bSpecialOn = (GetPrivateProfileInt(S_SPECIAL, K_SPECIALENABLE, 0) <> 0)
m_bBeamNTOn = (GetPrivateProfileInt(S_BEAMNT, K_BEAMNTENABLE, 0) <> 0)
m_bBeamOn = (GetPrivateProfileInt(S_BEAM, K_BEAMENABLE, 0) <> 0)
m_bWallOn = (GetPrivateProfileInt(S_WALL, K_WALLENABLE, 0) <> 0)
m_bDoorsOn = (GetPrivateProfileInt(S_DOORS, K_DDFENABLE, 0) <> 0)
+26 -18
View File
@@ -448,6 +448,7 @@
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding BeamMsg}"
Grid.Row="0" Grid.Column="0" Margin="0,5,0,5"/>
@@ -456,40 +457,47 @@
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding BeamActive}"
Command="{Binding UpdateBeam_Command}"
Grid.Row="0" Grid.Column="2" Height="26"/>
<TextBlock Text="{Binding WallMsg}"
<TextBlock Text="{Binding BeamNTMsg}"
Grid.Row="1" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding WallOn}" IsEnabled="{Binding WallEnabled}"
<CheckBox IsChecked="{Binding BeamNTOn}" IsEnabled="{Binding BeamNTEnabled}"
Grid.Row="1" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding BeamNTActive}"
Command="{Binding UpdateBeamNT_Command}"
Grid.Row="1" Grid.Column="2" Height="26"/>
<TextBlock Text="{Binding WallMsg}"
Grid.Row="2" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding WallOn}" IsEnabled="{Binding WallEnabled}"
Grid.Row="2" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding WallActive}"
Command="{Binding UpdateWall_Command}"
Grid.Row="1" Grid.Column="2" Height="26"/>
Grid.Row="2" Grid.Column="2" Height="26"/>
<TextBlock Text="{Binding DoorsMsg}" VerticalAlignment="Center"
Grid.Row="2" Grid.Column="0" Margin="0,5,0,5"/>
Grid.Row="3" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding DoorsOn}" IsEnabled="{Binding DoorsEnabled}"
Grid.Row="2" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
Grid.Row="3" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding DoorsActive}"
Command="{Binding UpdateDoors_Command}"
Grid.Row="2" Grid.Column="2" Height="26"/>
Grid.Row="3" Grid.Column="2" Height="26"/>
<TextBlock Text="{Binding WindowMsg}" VerticalAlignment="Center"
Grid.Row="3" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding WindowOn}" IsEnabled="{Binding WindowEnabled}"
Grid.Row="3" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding TrimmingMsg}" VerticalAlignment="Center"
Grid.Row="4" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding TrimmingOn}" IsEnabled="{Binding TrimmingEnabled}"
<CheckBox IsChecked="{Binding WindowOn}" IsEnabled="{Binding WindowEnabled}"
Grid.Row="4" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding ReversePostMsg}" VerticalAlignment="Center"
<TextBlock Text="{Binding TrimmingMsg}" VerticalAlignment="Center"
Grid.Row="5" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding ReversePostOn}" IsEnabled="{Binding ReversePostEnabled}"
<CheckBox IsChecked="{Binding TrimmingOn}" IsEnabled="{Binding TrimmingEnabled}"
Grid.Row="5" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding GunstockMsg}" VerticalAlignment="Center"
<TextBlock Text="{Binding ReversePostMsg}" VerticalAlignment="Center"
Grid.Row="6" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding GunstockOn}" IsEnabled="{Binding GunstockEnabled}"
<CheckBox IsChecked="{Binding ReversePostOn}" IsEnabled="{Binding ReversePostEnabled}"
Grid.Row="6" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding SpecialMsg}"
Grid.Row="7" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding SpecialOn}"
<TextBlock Text="{Binding GunstockMsg}" VerticalAlignment="Center"
Grid.Row="7" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding GunstockOn}" IsEnabled="{Binding GunstockEnabled}"
Grid.Row="7" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding SpecialMsg}"
Grid.Row="8" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding SpecialOn}"
Grid.Row="8" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
</Grid>
</StackPanel>
</TabItem>
+130 -4
View File
@@ -813,6 +813,26 @@ Public Class OptionWindowVM
End Set
End Property
Public ReadOnly Property BeamNTEnabled As Boolean
Get
Return ((IniFile.m_nKeyOptions And KEY_OPT.BEAM) <> 0) AndAlso (GetPrivateProfileInt(S_BEAMNT, K_BEAMNTENABLE, -1) >= 0)
End Get
End Property
Public ReadOnly Property BeamNTActive As Boolean
Get
Return IniFile.IsActiveBeamNT()
End Get
End Property
Public Property BeamNTOn As Boolean
Get
Return BeamNTEnabled AndAlso OptionModule.m_bBeamNTOn
End Get
Set(value As Boolean)
OptionModule.m_bBeamNTOn = value
WritePrivateProfileString(S_BEAMNT, K_BEAMNTENABLE, If(value, "1", "0"))
End Set
End Property
Public ReadOnly Property BeamEnabled As Boolean
Get
Return (IniFile.m_nKeyOptions And KEY_OPT.BEAM) <> 0
@@ -943,6 +963,7 @@ Public Class OptionWindowVM
Private m_cmdDefMaterialColor As ICommand
Private m_cmdAddMachineCmd As ICommand
Private m_cmdExportMachineCmd As ICommand
Private m_cmdUpdateBeamNTCmd As ICommand
Private m_cmdUpdateBeamCmd As ICommand
Private m_cmdUpdateWallCmd As ICommand
Private m_cmdUpdateDoorsCmd As ICommand
@@ -1195,6 +1216,11 @@ Public Class OptionWindowVM
Return "Special"
End Get
End Property
Public ReadOnly Property BeamNTMsg As String
Get
Return "BeamNT"
End Get
End Property
Public ReadOnly Property BeamMsg As String
Get
Return "Beam"
@@ -1470,7 +1496,7 @@ Public Class OptionWindowVM
End If
End Sub
#End Region ' AddMachine
#End Region ' UpdateLicence
#Region "AddMachine"
@@ -1708,6 +1734,109 @@ Public Class OptionWindowVM
#End Region ' ExportMachine
#Region "UpdateBeamNT"
Public ReadOnly Property UpdateBeamNT_Command() As ICommand
Get
If m_cmdUpdateBeamNTCmd Is Nothing Then
m_cmdUpdateBeamNTCmd = New RelayCommand(AddressOf UpdateBeamNTCmd)
End If
Return m_cmdUpdateBeamNTCmd
End Get
End Property
Public Sub UpdateBeamNTCmd()
' Recupero la versione del programma in esecuzione
Dim sExeVer As String = IniFile.GetProgramVersion()
' Verifico presenza di una precedente installazione del Beam
Dim sBeamNTVer As String = ""
IniFile.GetSpecialLuaVersion(IniFile.m_sBeamNTDirPath, sBeamNTVer)
If String.IsNullOrEmpty(sBeamNTVer) Then
' Il modulo "{0}" non è stato trovato, impossibile aggiornare. - Avviso
Dim sOut As String = String.Format(EgtMsg(6555), "BeamNT")
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
' Esco
Return
End If
' Apro dialogo per richiesta file zip del BeamNT
Dim BeamNTDlg As New Microsoft.Win32.OpenFileDialog() With {
.DefaultExt = ".zip",
.Filter = "BeamNT (.zip)|*.zip",
.CheckFileExists = True,
.ValidateNames = True
}
If BeamNTDlg.ShowDialog() <> True Then Return
Dim sBeamZip As String = BeamNTDlg.FileName
' Preparo direttorio temporaneo
Dim sTempDir As String = Path.Combine(IniFile.m_sTempDir, "BeamNT")
If My.Computer.FileSystem.DirectoryExists(sTempDir) Then
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
My.Computer.FileSystem.CreateDirectory(sTempDir)
' Unzip nel direttorio temporaneo
Using zip As New Ionic.Zip.ZipFile(sBeamZip)
zip.ExtractAll(sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
End Using
' Recupero i dati del nuovo Beam
Dim sNewName = ""
Dim sNewVer = ""
Dim sNewMinExe = ""
IniFile.GetSpecialLuaData(sTempDir, sNewName, sNewVer, sNewMinExe)
' Verifico che sia veramente il BeamNT
If String.Compare(sNewName, "BeamNT") <> 0 Then
' Il file zip non contiene il modulo "{0}". - Avviso
Dim sOut As String = String.Format(EgtMsg(6556), "BeamNT")
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
' Verifico la versione minima del programma
If String.Compare(sExeVer, sNewMinExe) < 0 Then
' Il nuovo modulo "{0}" richiede un programma con versione minima {1}. - Avviso
Dim sOut As String = String.Format(EgtMsg(6557), "BeamNT", sNewMinExe)
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
' Verifico la versione del BeamNT e se più vecchia chiedo cosa fare
If String.Compare(sNewVer, sBeamNTVer) < 0 Then
' La versione del nuovo modulo "{0}" è più vecchia dell'attuale. Vuoi sovrascrivere lo stesso ?
Dim sOut As String = String.Format(EgtMsg(6558), "BeamNT")
If MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then
' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
End If
' Faccio una copia di backup del Beam corrente
Dim sBackupDir As String = IniFile.m_sBeamNTDirPath & ".old"
If My.Computer.FileSystem.DirectoryExists(sBackupDir) Then
My.Computer.FileSystem.DeleteDirectory(sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
Try
My.Computer.FileSystem.MoveDirectory(IniFile.m_sBeamNTDirPath, sBackupDir, True)
Catch ex As Exception
' Ripristino lo stato originale ed esco
My.Computer.FileSystem.MoveDirectory(sBackupDir, IniFile.m_sBeamNTDirPath, True)
' L'aggiornamento del modulo "{0}" non è riuscito. - Errore
Dim sOut As String = String.Format(EgtMsg(6559), "BeamNT")
EgtOutLog(sOut)
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End Try
' Installo il Beam
My.Computer.FileSystem.MoveDirectory(sTempDir, IniFile.m_sBeamNTDirPath, True)
' Il modulo "{0}" è stata aggiornato con successo. - Info
Dim sOk As String = String.Format(EgtMsg(6560), "BeamNT")
EgtOutLog(sOk)
MessageBox.Show(Application.Current.MainWindow, sOk, EgtMsg(15003), MessageBoxButton.OK)
End Sub
#End Region ' UpdateBeamNT
#Region "UpdateBeam"
Public ReadOnly Property UpdateBeam_Command() As ICommand
Get
@@ -1811,7 +1940,6 @@ Public Class OptionWindowVM
#End Region ' UpdateBeam
#Region "UpdateWall"
Public ReadOnly Property UpdateWall_Command() As ICommand
Get
@@ -1915,7 +2043,6 @@ Public Class OptionWindowVM
#End Region ' UpdateWall
#Region "UpdateDoors"
Public ReadOnly Property UpdateDoors_Command() As ICommand
Get
@@ -2024,7 +2151,6 @@ Public Class OptionWindowVM
#End Region ' UpdateDoors
#Region "CloseOptionsCommand"
''' <summary>
+3 -63
View File
@@ -3,6 +3,7 @@
Public Class ProjectV
Private m_bSpecial As Boolean = False
Private m_bBeamNT As Boolean = False
Private m_bBeam As Boolean = False
Private m_bWall As Boolean = False
Private m_bDoors As Boolean = False
@@ -19,23 +20,9 @@ Public Class ProjectV
Dim nIndex As Integer = -1
Dim nLeft As Integer = -1
Dim nTop As Integer = -1
'ShowPanel.IsFloating = False
'ViewPanel.IsFloating = False
''InstrumentPanel.IsFloating = False
'GridPanel.IsFloating = False
'DbPanel.IsFloating = False
'ExecutePanel.IsFloating = False
'SpecialPanel.IsFloating = False
'BeamPanel.IsFloating = False
'WallPanel.IsFloating = False
'BeamWallPanel.IsFloating = False
'DoorsPanel.IsFloating = False
'GunStockPanel.IsFloating = False
'DrawPanel.IsFloating = False
'OptionPanel.IsFloating = False
' MachGroupPanel.IsFloating = False
' Carico Pannelli Speciali
m_bSpecial = IniFile.IsActiveSpecialPanel()
m_bBeamNT = IniFile.IsActiveBeamNT()
m_bBeam = IniFile.IsActiveBeam()
m_bWall = IniFile.IsActiveWall()
m_bDoors = IniFile.IsActiveDoors()
@@ -43,67 +30,20 @@ Public Class ProjectV
End Sub
Private Sub PanelPositioning(FloatingPanel As EgtFloatingPanel, sState As String, nIndex As Integer, nLeft As Integer, nTop As Integer)
'Select Case sState
' Case "TOP"
' FloatingPanel.ChangePosition(TOPTRAY)
' Case "BOTTOM"
' FloatingPanel.ChangePosition(BOTTOMTRAY)
' Case "LEFT"
' FloatingPanel.ChangePosition(LEFTTRAY)
' Case "RIGHT"
' FloatingPanel.ChangePosition(RIGHTTRAY)
' Case "FLOATING"
' FloatingPanel.ChangePosition(New Point(nLeft, nTop))
'End Select
End Sub
Friend Sub SetDbPanelVisibility()
'DbPanel.Visibility = If(IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW, Visibility.Collapsed, Visibility.Visible)
End Sub
Friend Sub MachiningMode_IsChecked()
''ShowPanel.Visibility = Visibility.Visible
'ViewPanel.Visibility = Visibility.Visible
''InstrumentPanel.Visibility = Visibility.Visible
'GridPanel.Visibility = Visibility.Visible
'DbPanel.Visibility = Visibility.Visible
'ExecutePanel.Visibility = Visibility.Collapsed
'SpecialPanel.Visibility = If(m_bSpecial And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(True), Visibility.Visible, Visibility.Collapsed)
'BeamPanel.Visibility = Visibility.Collapsed
'WallPanel.Visibility = Visibility.Collapsed
'BeamWallPanel.Visibility = Visibility.Collapsed
'DoorsPanel.Visibility = If(m_bDoors, Visibility.Visible, Visibility.Collapsed)
'PrintingPanel.Visibility = Visibility.Collapsed
'GunStockPanel.Visibility = Visibility.Collapsed
'DrawPanel.Visibility = Visibility.Collapsed
'OptionPanel.Visibility = Visibility.Visible
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(IniFile.m_bMachiningGroup) ' MachGroupPanel.Visibility = If(IniFile.m_bMachiningGroup, Visibility.Visible, Visibility.Collapsed)
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(IniFile.m_bMachiningGroup)
If m_bDoors Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(False)
End Sub
Friend Sub DrawMode_IsChecked()
''ShowPanel.Visibility = Visibility.Visible
'ViewPanel.Visibility = Visibility.Visible
''InstrumentPanel.Visibility = Visibility.Visible
'GridPanel.Visibility = Visibility.Visible
'DbPanel.Visibility = If(IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW, Visibility.Collapsed, Visibility.Visible)
'ExecutePanel.Visibility = Visibility.Visible
'SpecialPanel.Visibility = If(m_bSpecial And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(False), Visibility.Visible, Visibility.Collapsed)
'BeamPanel.Visibility = If(m_bBeam, Visibility.Visible, Visibility.Collapsed)
'WallPanel.Visibility = If(m_bWall, Visibility.Visible, Visibility.Collapsed)
'BeamWallPanel.Visibility = If(m_bBeam Or m_bWall, Visibility.Visible, Visibility.Collapsed)
'DoorsPanel.Visibility = If(m_bDoors, Visibility.Visible, Visibility.Collapsed)
'PrintingPanel.Visibility = If(m_bPrinting3d, Visibility.Visible, Visibility.Collapsed)
'GunStockPanel.Visibility = If(m_bGunStock, Visibility.Visible, Visibility.Collapsed)
'DrawPanel.Visibility = Visibility.Visible
'OptionPanel.Visibility = Visibility.Visible
' Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False) ' MachGroupPanel.Visibility = Visibility.Collapsed
' If m_bDoors Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(True)
End Sub
Private Sub UserControl_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
' Salvo le posizioni di tutti gli EgtPanel
End Sub
End Class
+35 -11
View File
@@ -248,6 +248,13 @@ Public Class ProjectVM
Dim sOut As String = "Beam ver. " & sVersion & " " & IniFile.m_sBeamDirPath
EgtOutLog(sOut)
End If
If IniFile.IsActiveBeamNT() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion(IniFile.m_sBeamNTDirPath, sVersion)
Dim sOut As String = "BeamNT ver. " & sVersion & " " & IniFile.m_sBeamNTDirPath
EgtOutLog(sOut)
End If
If IniFile.IsActiveWall() Then
bExtensions = True
Dim sVersion As String = "---"
@@ -542,9 +549,10 @@ Public Class ProjectVM
Map.refMainWindowVM.CloseApplicationCmd()
Return
End If
IniFile.UpdateShowBeamNT( False)
' Esecuzione
bOk = ExecBeam(sFile, sMachine, nFlag, True)
' altrimenti pareti
bOk = ExecBeam(sFile, sMachine, nFlag, True, False)
' altrimenti pareti
Else
' Verifica abilitazione elaborazione pareti
If Not VerifyWall(sFile, sMachine, nFlag) Then
@@ -621,27 +629,42 @@ Public Class ProjectVM
Map.refMainWindowVM.CloseApplicationCmd()
Return
End If
' Se file bwe, gestione file da calcolare per Beam&Wall
' Se file bwe, gestione file da calcolare per Beam&Wall e AEdifica
If sExt = ".bwe" And Environment.GetCommandLineArgs.Count() > 2 Then
' recupero tipo di progetto : 1 = travi, 2 = pareti, 3 = sandwich
' recupero tipo di progetto : 1 = travi, 2 = pareti, 3 = sandwich (+10 per New Version)
Dim nBWType As Integer = 0
If Environment.GetCommandLineArgs.Count() > 2 Then Integer.TryParse(Environment.GetCommandLineArgs(2), nBWType)
' recupero nome macchina
Dim sMachine As String = ""
If Environment.GetCommandLineArgs.Count() > 3 Then sMachine = Environment.GetCommandLineArgs(3)
'' Flag
' Flag
Dim nFlag As Integer = 0
If Environment.GetCommandLineArgs.Count() > 4 Then Integer.TryParse(Environment.GetCommandLineArgs(4), nFlag)
' Stato di produzione
Dim nProductionState As Integer = -1
If Environment.GetCommandLineArgs.Count() > 5 Then Integer.TryParse(Environment.GetCommandLineArgs(5), nProductionState)
Dim bOk As Boolean = False
' Se travi
If nBWType = 1 Then
' Verifica abilitazione elaborazione travi
If Not VerifyBeam(sFile, sMachine, nFlag) Then
Map.refMainWindowVM.CloseApplicationCmd()
Return
End If
IniFile.UpdateShowBeamNT( False)
' Esecuzione
bOk = ExecBeam(sFile, sMachine, nFlag, False)
' altrimenti pareti
bOk = ExecBeam(sFile, sMachine, nFlag, False, nProductionState >= 0)
' se altrimenti travi New
elseIf nBWType = 11 Then
' Verifica abilitazione elaborazione travi
If Not VerifyBeamNT(sFile, sMachine, nFlag) Then
Map.refMainWindowVM.CloseApplicationCmd()
Return
End If
IniFile.UpdateShowBeamNT( True)
' Esecuzione
bOk = ExecBeamNT(sFile, sMachine, nFlag, nProductionState >= 0)
' se altrimenti pareti
ElseIf nBWType = 2 Then
' Verifica abilitazione elaborazione pareti
If Not VerifyWall(sFile, sMachine, nFlag) Then
@@ -649,7 +672,7 @@ Public Class ProjectVM
Return
End If
' Esecuzione
bOk = ExecWall(sFile, sMachine, nFlag, False)
bOk = ExecWall(sFile, sMachine, nFlag, False, nProductionState >= 0)
End If
' Se richiesta uscita immediata
If nFlag = 0 Or nFlag = 3 Or nFlag = 4 Or nFlag = 8 Then
@@ -1159,6 +1182,7 @@ Public Class ProjectVM
' Per default no drag
m_bDrag = False
Dim nSel As Integer
EgtSetObjFilterForSelWin(True, True, True, True, True)
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel)
Dim nId As Integer = EgtGetFirstObjInSelWin()
While nId <> GDB_ID.NULL
@@ -1467,7 +1491,7 @@ Public Class ProjectVM
' Visualizzo numerazione
Analyze.CreateAnalyzeGroup()
Analyze.CreateCurveCompoPntNbrs(nId)
' Se superficie trimesh, visualizzo dati faccetta toccata
' Se superficie trimesh, visualizzo dati faccetta toccata
ElseIf EgtGetType(nId) = GDB_TY.SRF_MESH Then
Dim nFac As Integer = EgtSurfTmFacetFromTria(nId, nSub)
If nFac >= 0 Then
@@ -1494,7 +1518,7 @@ Public Class ProjectVM
End If
Map.refStatusBarVM.NotifyStatusOutput(sOut)
End If
' Se Regione, visualizzo dati parte toccata
' Se Regione, visualizzo dati parte toccata
ElseIf EgtGetType(nId) = GDB_TY.SRF_FRGN Then
Dim nChk As Integer = nSub
If nChk >= 0 AndAlso nChk < EgtSurfFrChunkCount(nId) Then
@@ -1515,7 +1539,7 @@ Public Class ProjectVM
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
Map.refStatusBarVM.NotifyStatusOutput(sOut)
End If
' Se Superficie di Bezier
' Se Superficie di Bezier
ElseIf EgtGetType(nId) = GDB_TY.SRF_BEZ Then
' Visualizzo il punto selezionato, la normale e le tangenti nelle direzioni dei parametri
Analyze.CreateAnalyzeGroup()
+2 -2
View File
@@ -18,7 +18,7 @@ Module Beam
Return False
End Function
Friend Function ExecBeam(sFile As String, sMachine As String, nFlag As Integer, bBtl As Boolean) As Boolean
Friend Function ExecBeam(sFile As String, sMachine As String, nFlag As Integer, bBtl As Boolean, bOnlySimulation As Boolean) As Boolean
EgtOutLog("-- Start ExecBeam --")
' Recupero lo script da eseguire
Dim sExecName As String = ""
@@ -60,7 +60,7 @@ Module Beam
' Se simulazione
If bOk And nFlag = 2 Then
' Se da TS3 e non pezzo da Vista, impedisco di fare altro
If bBtl AndAlso sFile.IndexOf( "Part_", StringComparison.InvariantCulture) = -1 Then
If (bBtl AndAlso sFile.IndexOf("Part_", StringComparison.InvariantCulture) = -1) OrElse bOnlySimulation Then
Map.refSimulationExpanderVM.bOnlySimulation = True
End If
' Vado in simulazione
+71
View File
@@ -0,0 +1,71 @@
Imports System.IO
Imports System.Globalization
Imports EgtUILib
Imports EgtWPFLib5
Module BeamNT
Friend Function VerifyBeamNT(sFile As String, sMachine As String, nFlag As Integer) As Boolean
' Se abilitato, esco con successo
If IsActiveBeamNT() Then Return True
' Segnalo il problema
Dim sErr As String = "BeamNT processing not enabled by licence"
EgtOutLog(sErr)
Try
File.WriteAllText(Path.ChangeExtension(sFile, ".txt"), "ERR=1" & vbNewLine & sErr & vbNewLine)
Catch
End Try
Return False
End Function
Friend Function ExecBeamNT(sFile As String, sMachine As String, nFlag As Integer, bOnlySimulation As Boolean) As Boolean
EgtOutLog("-- Start ExecBeamNT --")
' Recupero lo script da eseguire
Dim sExecName As String = ""
GetPrivateProfileString(S_BEAMNT, K_BEAMNTBWEEXEC, "", sExecName)
Dim sExecPath As String = (IniFile.m_sBeamNTDirPath & "\" & sExecName).TrimEnd({"\"c})
If Not My.Computer.FileSystem.FileExists(sExecPath) Then
EgtOutLog("Not found BeamNTExec script " & sExecPath)
Return False
End If
' Preparo interfaccia per aggiornamento
Map.refManageLayerExpanderVM.ClearObjTree()
' Assegno i dati
EgtLuaCreateGlobTable("BEAM")
EgtLuaSetGlobStringVar("BEAM.BASEDIR", IniFile.m_sBeamNTDirPath)
EgtLuaSetGlobStringVar("BEAM.FILE", sFile)
EgtLuaSetGlobStringVar("BEAM.MACHINE", sMachine)
EgtLuaSetGlobIntVar("BEAM.FLAG", nFlag)
' variabile che comunica al lua che e' stato avviato da interfaccia BEAMWALL (per gestione messaggi errore lua)
EgtLuaSetGlobBoolVar("BEAM.BW", True)
' Eseguo lo script
Dim bOk As Boolean = False
If EgtLuaExecFile(sExecPath) Then
' Recupero i risultati
Dim nErr As Integer = 999
EgtLuaGetGlobIntVar("BEAM.ERR", nErr)
bOk = (nErr <= 0)
If Not bOk Then EgtOutLog("BeamNTExec Err=" & nErr.ToString())
Else
EgtOutLog("Error executing BeamNT Exec script " & sExecPath)
Return False
End If
' Cancello tavola globale
EgtLuaResetGlobVar("BEAM")
' Aggiorno interfaccia
Map.refProjectVM.UpdateProjectUI(True)
Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(EgtGetCurrLayer())
If EgtGetCurrMachGroup() <> GDB_ID.NULL Then
Map.refTopCommandBarVM.SetMachiningMode()
' Se simulazione
If bOk And nFlag = 2 Then
' Se richiesta sola simulazione
If bOnlySimulation Then Map.refSimulationExpanderVM.bOnlySimulation = True
' Vado in simulazione
Map.refSimulationExpanderVM.Simulation_IsExpanded = True
End If
End If
Return bOk
End Function
End Module
+28
View File
@@ -0,0 +1,28 @@
<EgtFloating:EgtFloatingPanel x:Class="BeamNTPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtCAM5"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Visibility="{Binding BeamNTPanel_Visibility}">
<ItemsControl ItemsSource="{Binding ButtonList}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.Resources>
<DataTemplate DataType="{x:Type local:ButtonItem}">
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}">
<Image Source="{Binding ImagePath}"/>
</Button>
</DataTemplate>
<DataTemplate DataType="{x:Type local:SeparatorItem}">
<Border Style="{StaticResource Trimming_Border}">
<Border Style="{StaticResource Separator_Border}"/>
</Border>
</DataTemplate>
</ItemsControl.Resources>
</ItemsControl>
</EgtFloating:EgtFloatingPanel>
+3
View File
@@ -0,0 +1,3 @@
Public Class BeamNTPanelV
End Class
+37
View File
@@ -0,0 +1,37 @@
Public Class BeamNTPanelVM
Inherits VMBase
Private m_ButtonList As New List(Of ButtonListItem)
Public ReadOnly Property ButtonList As List(Of ButtonListItem)
Get
Return m_ButtonList
End Get
End Property
Private m_BeamNTPanel_Visibility As Visibility
Public ReadOnly Property BeamNTPanel_Visibility As Visibility
Get
Return m_BeamNTPanel_Visibility
End Get
End Property
Friend Sub SetBeamNTPanelVisibility(bValue As Boolean)
m_BeamNTPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(BeamNTPanel_Visibility))
End Sub
Sub New()
' Creo riferimento a questa classe in Map
Map.SetRefBeamNTPanelVM(Me)
' Se attivo, inizializzo i bottoni leggendoli da file ini
If IniFile.IsActiveBeamNT() Then
' Inizializzo i bottoni leggendoli da file ini
Dim BtnIndex As Integer = 1
Dim CurrBtn As ButtonListItem = Nothing
While GetPrivateProfileButton(S_BEAMNT, K_BEAMNTBUTTON & BtnIndex, IniFile.m_sBeamNTDirPath, CurrBtn)
m_ButtonList.Add(CurrBtn)
BtnIndex += 1
End While
End If
End Sub
End Class
+2 -2
View File
@@ -22,8 +22,8 @@
Sub New()
' Creo riferimento a questa classe in Map
Map.SetRefBeamWallPanelVM(Me)
' Se attivo Beam o Wall, inizializzo i bottoni leggendoli da file ini
If IniFile.IsActiveBeam() Or IniFile.IsActiveWall() Then
' Se attivo BeamNT, Beam o Wall, inizializzo i bottoni leggendoli da file ini
If IniFile.IsActiveBeamNT() OrElse IniFile.IsActiveBeam() OrElse IniFile.IsActiveWall() Then
GetPrivateProfileString(S_BEAMWALL, K_BEAMWALLBASEDIR, "", m_sBeamWallDirPath)
' Inizializzo i bottoni leggendoli da file ini
Dim BtnIndex As Integer = 1
+2 -2
View File
@@ -18,7 +18,7 @@ Module Wall
Return False
End Function
Friend Function ExecWall(sFile As String, sMachine As String, nFlag As Integer, bBtl As Boolean) As Boolean
Friend Function ExecWall(sFile As String, sMachine As String, nFlag As Integer, bBtl As Boolean, Optional bOnlySimulation As Boolean = True) As Boolean
EgtOutLog("-- Start ExecWall --")
' Recupero lo script da eseguire
Dim sExecPath As String = ""
@@ -61,7 +61,7 @@ Module Wall
' Se simulazione
If bOk And nFlag = 2 Then
' Se da TS3 e non pezzo da Vista, impedisco di fare altro
If bBtl AndAlso sFile.IndexOf( "Part_", StringComparison.InvariantCulture) = -1 Then
If (bBtl AndAlso sFile.IndexOf("Part_", StringComparison.InvariantCulture) = -1) OrElse (Not bBtl AndAlso bOnlySimulation) Then
Map.refSimulationExpanderVM.bOnlySimulation = True
End If
' Vado in simulazione
+9 -4
View File
@@ -178,7 +178,7 @@ Public Class ButtonItem
If m_sLuaCmdPath = BeamPanelVM.BEAM_MACHININGS Then
Beam.BeamMachDb()
Return
' se altrimenti per pareti
' se altrimenti per pareti
ElseIf m_sLuaCmdPath = WallPanelVM.WALL_MACHININGS Then
Wall.WallMachDb()
Return
@@ -187,7 +187,7 @@ Public Class ButtonItem
If Not Path.GetExtension(m_sLuaCmdPath).ToLower = ".lua" Then Return
' Abilito eventi se comando lua lanciato da Beam o Wall
m_sCurrBarName = m_sBarName
Dim bRaiseEvent As Boolean = (m_sBarName = "Beam" OrElse m_sBarName = "Wall")
Dim bRaiseEvent As Boolean = (m_sBarName = "BeamNT" OrElse m_sBarName = "Beam" OrElse m_sBarName = "Wall")
' eseguo file Lua
Map.refProjectVM.PreExecScript(False)
Map.refProjectVM.ExecScript(m_sLuaCmdPath, bRaiseEvent)
@@ -198,7 +198,10 @@ Public Class ButtonItem
End Sub
Private Shared Sub OnPreControllerExec(sFilePath As String) Handles m_ProjectVM.OnPreControllerExec
If m_sCurrBarName = "Beam" Then
If m_sCurrBarName = "BeamNT" Then
EgtLuaCreateGlobTable("BEAM")
EgtLuaSetGlobStringVar("BEAM.BASEDIR", IniFile.m_sBeamNTDirPath)
ElseIf m_sCurrBarName = "Beam" Then
EgtLuaCreateGlobTable("BEAM")
EgtLuaSetGlobStringVar("BEAM.BASEDIR", IniFile.m_sBeamDirPath)
If EgtGetUserLevel() >= 9 AndAlso GetPrivateProfileInt(S_LUA, K_BWSIM, 0) = 1 Then EgtLuaSetGlobBoolVar("BEAM.BW", True)
@@ -210,7 +213,9 @@ Public Class ButtonItem
End Sub
Private Shared Sub OnPostControllerExec() Handles m_ProjectVM.OnPostControllerExec
If m_sCurrBarName = "Beam" Then
If m_sCurrBarName = "BeamNT" Then
EgtLuaResetGlobVar("BEAM")
ElseIf m_sCurrBarName = "Beam" Then
EgtLuaResetGlobVar("BEAM")
ElseIf m_sCurrBarName = "Wall" Then
EgtLuaResetGlobVar("WALL")
+3 -3
View File
@@ -1,7 +1,7 @@
<StackPanel x:Class="TopCommandBarV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Orientation="Horizontal">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Orientation="Horizontal">
<!--Barra superiore dei comandi-->
<UniformGrid Rows="1"
+46 -34
View File
@@ -805,9 +805,10 @@ Public Class TopCommandBarVM
Map.refMachinePanelVM.SetMachinePanelVisibility(IniFile.m_ProjectMode <> ProjectModeOpt.ONLYDRAW)
Map.refExecutePanelVM.SetExecutePanelVisibility(GetPrivateProfileInt(S_GENERAL, K_EXECUTE, 0) = 1)
Map.refSpecialPanelVM.SetSpecialPanelVisibility(IniFile.IsActiveSpecialPanel() And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(False))
Map.refBeamPanelVM.SetBeamPanelVisibility(IniFile.IsActiveBeam())
Map.refBeamPanelVM.SetBeamPanelVisibility(IniFile.IsToShowBeam())
Map.refBeamNTPanelVM.SetBeamNTPanelVisibility(IniFile.IsToShowBeamNT())
Map.refWallPanelVM.SetWallPanelVisibility(IniFile.IsActiveWall())
Map.refBeamWallPanelVM.SetBeamWallPanelVisibility(IniFile.IsActiveBeam() Or IniFile.IsActiveWall())
Map.refBeamWallPanelVM.SetBeamWallPanelVisibility(IniFile.IsActiveBeamNT() OrElse IniFile.IsActiveBeam() OrElse IniFile.IsActiveWall())
Map.refDoorPanelVM.SetDoorPanelVisibility(IniFile.IsActiveDoors())
Map.refWindowPanelVM.SetWindowPanelVisibility(IniFile.IsActiveWindow())
Map.refTrimmingPanelVM.SetTrimmingPanelVisibility(IniFile.IsActiveTrimming())
@@ -842,45 +843,56 @@ Public Class TopCommandBarVM
Friend Sub MachiningMode_IsChecked()
' ProjectV
If IniFile.IsActivePlugin() Then
For Each Panel In Map.refProjectVM.PanelList
If TypeOf Panel Is WinFormPluginControlV Then
Dim WinFormPanel As WinFormPluginControlV = TryCast(Panel, WinFormPluginControlV)
If Not IsNothing(WinFormPanel) Then
WinFormPanel.WinFormPluginControlVM.SetPanelVisibility(ProjectModeOpt.MACHINING)
If Not IsNothing(Map.refProjectV) Then
If IniFile.IsActivePlugin() Then
For Each Panel In Map.refProjectVM.PanelList
If TypeOf Panel Is WinFormPluginControlV Then
Dim WinFormPanel As WinFormPluginControlV = TryCast(Panel, WinFormPluginControlV)
If Not IsNothing(WinFormPanel) Then
WinFormPanel.WinFormPluginControlVM.SetPanelVisibility(ProjectModeOpt.MACHINING)
End If
End If
End If
Next
Next
End If
Map.refProjectV.MachiningMode_IsChecked()
Map.refMachinePanelVM.SetMachinePanelVisibility(True)
Map.refExecutePanelVM.SetExecutePanelVisibility(False)
Map.refSpecialPanelVM.SetSpecialPanelVisibility(IniFile.IsActiveSpecialPanel() And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(True))
Map.refBeamPanelVM.SetBeamPanelVisibility(False)
Map.refBeamNTPanelVM.SetBeamNTPanelVisibility(False)
Map.refWallPanelVM.SetWallPanelVisibility(False)
Map.refBeamWallPanelVM.SetBeamWallPanelVisibility(False)
Map.refDoorPanelVM.SetDoorPanelVisibility(IniFile.IsActiveDoors())
Map.refWindowPanelVM.SetWindowPanelVisibility(False)
Map.refTrimmingPanelVM.SetTrimmingPanelVisibility(False)
Map.refReversePostPanelVM.SetReversePostPanelVisibility(False)
Map.refGunStockPanelVM.SetGunStockPanelVisibility(False)
If Not IsNothing(Map.refDrawPanelVM) Then Map.refDrawPanelVM.SetDrawPanelVisibility(False)
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(IniFile.m_bMachiningGroup)
If IniFile.IsActiveDoors() Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(False)
Map.refOptionPanelVM.SetPanelVisibility(ProjectModeOpt.MACHINING)
End If
Map.refProjectV.MachiningMode_IsChecked()
Map.refMachinePanelVM.SetMachinePanelVisibility(True)
Map.refExecutePanelVM.SetExecutePanelVisibility(False)
Map.refSpecialPanelVM.SetSpecialPanelVisibility(IniFile.IsActiveSpecialPanel() And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(True))
Map.refBeamPanelVM.SetBeamPanelVisibility(False)
Map.refWallPanelVM.SetWallPanelVisibility(False)
Map.refBeamWallPanelVM.SetBeamWallPanelVisibility(False)
Map.refDoorPanelVM.SetDoorPanelVisibility(IniFile.IsActiveDoors())
Map.refWindowPanelVM.SetWindowPanelVisibility(False)
Map.refTrimmingPanelVM.SetTrimmingPanelVisibility(False)
Map.refReversePostPanelVM.SetReversePostPanelVisibility(False)
Map.refGunStockPanelVM.SetGunStockPanelVisibility(False)
If Not IsNothing(Map.refDrawPanelVM) Then Map.refDrawPanelVM.SetDrawPanelVisibility(False)
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(IniFile.m_bMachiningGroup)
If IniFile.IsActiveDoors() Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(False)
Map.refOptionPanelVM.SetPanelVisibility(ProjectModeOpt.MACHINING)
' ProjectVM
Map.refProjectVM.MachiningMode_IsChecked()
If Not IsNothing(Map.refProjectVM) Then
Map.refProjectVM.MachiningMode_IsChecked()
End If
' OptionPanelVM
If Not IsNothing(Map.refOptionPanelVM) Then Map.refOptionPanelVM.MachiningMode_IsChecked()
If Not IsNothing(Map.refOptionPanelVM) Then
Map.refOptionPanelVM.MachiningMode_IsChecked()
End If
' MyMachinePanelVM
Map.refMachinePanelVM.MachineListIsEnabled = False
If Not IsNothing(Map.refMachinePanelVM) Then
Map.refMachinePanelVM.MachineListIsEnabled = False
End If
' InstrumentPanel
Map.refInstrumentPanelVM.AnalyzeIsChecked = False
Map.refInstrumentPanelVM.AnalyzeIsEnabled = False
If Not IsNothing(Map.refInstrumentPanelVM) Then
Map.refInstrumentPanelVM.AnalyzeIsChecked = False
Map.refInstrumentPanelVM.AnalyzeIsEnabled = False
End If
' MyStatusBarVM
Map.refStatusBarVM.OutputMessage = String.Empty
If Not IsNothing(Map.refStatusBarVM) Then
Map.refStatusBarVM.OutputMessage = String.Empty
End If
End Sub
#End Region
+1
View File
@@ -26,6 +26,7 @@
</EgtFloating:EgtFloatingPanel>
<local:MachinePanelV DataContext="{StaticResource DbPanelViewModel}"/>
<local:ExecutePanelV DataContext="{StaticResource ExecutePanelViewModel}"/>
<local:BeamNTPanelV DataContext="{StaticResource BeamNTPanelViewModel}"/>
<local:BeamPanelV DataContext="{StaticResource BeamPanelViewModel}"/>
<local:WallPanelV DataContext="{StaticResource WallPanelViewModel}"/>
<local:BeamWallPanelV DataContext="{StaticResource BeamWallPanelViewModel}"/>
+29 -1
View File
@@ -122,6 +122,28 @@ Module Analyze
Dim dStart, dEnd As Double
EgtCurveDomain( nId, dStart, dEnd)
Dim nCount As Integer = CInt( dEnd - dStart) - 1
' Gestione OPEN/OPEN2
Const PCK_KEY_OPEN As String = "OPEN"
Const PCK_KEY_OPEN2 As String = "OPEN2"
Dim vOpen(nCount) As Integer
Dim sInfo As String = ""
If EgtGetInfo( nId, PCK_KEY_OPEN, sInfo) Then
Dim vInfo() As String = sInfo.Split( ","C)
For Each sInd As String In vInfo
Dim nInd As Integer = -1
If StringToInt( sInd, nInd) AndAlso nInd >= 0 AndAlso nInd <= nCount Then
vOpen(nInd) = 1
End If
Next
ElseIf EgtGetInfo( nId, PCK_KEY_OPEN2, sInfo) Then
Dim vInfo() As String = sInfo.Split( ","C)
For Each sInd As String In vInfo
Dim nInd As Integer = -1
If StringToInt( sInd, nInd) AndAlso nInd >= 0 AndAlso nInd <= nCount Then
vOpen(nInd) = 2
End If
Next
End If
' Ciclo sulle curve semplici
For i As Integer = 0 To nCount
' Scrivo il punto iniziale di ogni curva componente
@@ -135,7 +157,13 @@ Module Analyze
Dim dLen As Double = 2 * Point3d.Dist( ptS, ptP)
Dim dH As Double = Math.Min( 0.25 * dLen, 10)
Dim nTxtId As Integer = EgtCreateTextAdv( m_AnaGrpId, ptP, 0, i.ToString(), "", 100, False, dH, 1, 0, INS_POS.MC, GDB_RT.GRID)
EgtSetColor( nTxtId, New Color3d( 255, 0,0))
If vOpen(i) = 1 Then
EgtSetColor( nTxtId, New Color3d(0, 0, 192))
ElseIf vOpen(i) = 2 Then
EgtSetColor( nTxtId, New Color3d(128, 0, 128))
Else
EgtSetColor( nTxtId, New Color3d(255, 0, 0))
End If
Next
' Se curva aperta aggiungo il punto finale
If Not EgtCurveIsClosed( nId) Then
+1
View File
@@ -32,6 +32,7 @@
<EgtCAM5:MyMachinePanelVM x:Key="DbPanelViewModel"/>
<EgtCAM5:ExecutePanelVM x:Key="ExecutePanelViewModel"/>
<EgtCAM5:SpecialPanelVM x:Key="SpecialPanelViewModel"/>
<EgtCAM5:BeamNTPanelVM x:Key="BeamNTPanelViewModel"/>
<EgtCAM5:BeamPanelVM x:Key="BeamPanelViewModel"/>
<EgtCAM5:WallPanelVM x:Key="WallPanelViewModel"/>
<EgtCAM5:BeamWallPanelVM x:Key="BeamWallPanelViewModel"/>
+29
View File
@@ -82,6 +82,8 @@ Public Module IniFile
Friend m_sLogFile As String
' path della cartella BEAM
Friend m_sBeamDirPath As String
' path della cartella BEAMNT
Friend m_sBeamNTDirPath As String
' path della cartella WALL
Friend m_sWallDirPath As String
' path della cartella BEAMWALL
@@ -297,6 +299,33 @@ Public Module IniFile
Return bIsActive
End Function
Friend Function IsToShowBeam() As Boolean
If Not IsActiveBeam() Then Return False
If Not IsActiveBeamNT() Then Return True
Return (GetPrivateProfileInt(S_BEAMNT, K_BEAMNTSHOW, 0) = 0)
End Function
Friend Function IsActiveBeamNT() As Boolean
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.BEAM) <> 0 And (GetPrivateProfileInt(S_BEAMNT, K_BEAMNTENABLE, 0) > 0)
If bIsActive Then
Dim sTemp As String = ""
GetPrivateProfileString(S_BEAMNT, K_BEAMNTBASEDIR, "", sTemp)
m_sBeamNTDirPath = sTemp.TrimEnd("\"c)
End If
Return bIsActive
End Function
Friend Function IsToShowBeamNT() As Boolean
If Not IsActiveBeamNT() Then Return False
If Not IsActiveBeam() Then Return True
Return (GetPrivateProfileInt(S_BEAMNT, K_BEAMNTSHOW, 0) > 0)
End Function
Friend Function UpdateShowBeamNT( bShowBeamNT As Boolean) As Boolean
WritePrivateProfileString(S_BEAMNT, K_BEAMNTSHOW, If( bShowBeamNT, "1", "0"))
Return True
End Function
Friend Function IsActiveWall() As Boolean
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.WALL) <> 0 And (GetPrivateProfileInt(S_WALL, K_WALLENABLE, 0) <> 0)
If bIsActive Then
+10
View File
@@ -30,6 +30,7 @@ Module Map
Private m_refDoorPanelVM As DoorPanelVM
Private m_refSpecialPanelVM As SpecialPanelVM
Private m_refExecutePanelVM As ExecutePanelVM
Private m_refBeamNTPanelVM As BeamNTPanelVM
Private m_refBeamPanelVM As BeamPanelVM
Private m_refWallPanelVM As WallPanelVM
Private m_refBeamWallPanelVM As BeamWallPanelVM
@@ -188,6 +189,11 @@ Module Map
Return m_refExecutePanelVM
End Get
End Property
Public ReadOnly Property refBeamNTPanelVM As BeamNTPanelVM
Get
Return m_refBeamNTPanelVM
End Get
End Property
Public ReadOnly Property refBeamPanelVM As BeamPanelVM
Get
Return m_refBeamPanelVM
@@ -329,6 +335,10 @@ Module Map
m_refExecutePanelVM = ExecutePanelVM
Return Not IsNothing(m_refExecutePanelVM)
End Function
Friend Function SetRefBeamNTPanelVM(BeamNTPanelVM As BeamNTPanelVM) As Boolean
m_refBeamNTPanelVM = BeamNTPanelVM
Return Not IsNothing(m_refBeamNTPanelVM)
End Function
Friend Function SetRefBeamPanelVM(BeamPanelVM As BeamPanelVM) As Boolean
m_refBeamPanelVM = BeamPanelVM
Return Not IsNothing(m_refBeamPanelVM)
+3 -3
View File
@@ -660,8 +660,8 @@
Sawroughing(12) = Visibility.Visible ' StartFeed
Sawroughing(13) = Visibility.Visible ' EndFeed
Sawroughing(14) = Visibility.Visible ' TipFeed
Sawroughing(15) = Visibility.Collapsed ' OffSr
Sawroughing(16) = Visibility.Collapsed ' OffSl
Sawroughing(15) = Visibility.Visible ' OffSr
Sawroughing(16) = Visibility.Visible ' OffSl
Sawroughing(17) = Visibility.Collapsed ' SideAngle
Sawroughing(18) = Visibility.Collapsed ' Approx
Sawroughing(19) = Visibility.Visible ' StartPos
@@ -726,7 +726,7 @@
Sawfinishing(12) = Visibility.Visible ' StartFeed
Sawfinishing(13) = Visibility.Visible ' EndFeed
Sawfinishing(14) = Visibility.Visible ' TipFeed
Sawfinishing(15) = Visibility.Collapsed ' OffSr
Sawfinishing(15) = Visibility.Visible ' OffSr
Sawfinishing(16) = Visibility.Collapsed ' OffSl
Sawfinishing(17) = Visibility.Collapsed ' SideAngle
Sawfinishing(18) = Visibility.Collapsed ' Approx