Compare commits

..

49 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
Dario Sassi cf978712ba EgtCAM5 :
- correzione per problema blocco selezione lavorazione al rientro nella lista.
2026-04-12 21:49:59 +02:00
Dario Sassi 3e41014f5b EgtCAM5 :
- corretto aggiornamento visualizzazione PreviewTool di tipo corretto al rientro nella lavorazione.
2026-04-07 17:53:05 +02:00
Dario Sassi a62a53ea61 EgtCAM5 :
- modifica disegno utensile per preview in lavorazione.
2026-04-03 17:52:17 +02:00
Riccardo Elitropi 60adc08781 EgtCAM5 3.1d1 :
- Aggiunto parametro Overlap per Sgrossature.
2026-04-01 18:07:53 +02:00
Dario Sassi 06510d5925 EgtCAM5 :
- correzione selezione per lavorazioni.
2026-03-31 11:42:26 +02:00
Dario Sassi d8c97cf352 Merge commit '78310cd71187b942ed8c0e7d9728bd19ae207448' 2026-03-26 16:15:28 +01:00
Demetrio Cassarino 78310cd711 Merge commit '4e947f293e849ceeef263f4cc6d65bd3278e4db0' into features/NewProjectGrid 2026-03-26 15:17:59 +01:00
Demetrio Cassarino e48cbffa6b -aggiunto modifica per salvare dimensioni finestra ExecuteWindow 2026-03-26 15:17:46 +01:00
Dario Sassi 4e947f293e EgtCAM5 :
- piccole migliorie a ExecuteWindow.
2026-03-25 08:45:26 +01:00
Dario Sassi 014ce6db17 Merge remote-tracking branch 'origin/features/NewProjectGrid' 2026-03-25 08:13:42 +01:00
Dario Sassi 705aeaaab7 EgtCAM5 :
- piccola miglioria alla modifica precedente.
2026-03-24 13:35:11 +01:00
Dario Sassi 228c4f9a48 EgtCAM5 :
- correzione gestione geometria selezionata con più sottoentità per la lavorazione corrente.
2026-03-24 13:30:20 +01:00
Demetrio Cassarino 375c53122c -sistemato apertura e chiusura su infoexpander 2026-03-20 15:43:08 +01:00
Dario Sassi bb22395a22 Merge commit 'e2e365765d81fa12bad9018462bb335b668844f3' 2026-03-18 12:15:30 +01:00
Dario Sassi 4eac19a2ff EgtCAM5 :
- piccole modifiche ad analisi superfici di Bezier.
2026-03-13 13:39:21 +01:00
Dario Sassi c276398b29 Merge commit 'e88e19ed3fc5c09b063227daf658e5440c25b3ca' 2026-03-13 09:56:20 +01:00
49 changed files with 924 additions and 352 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 = "---"
+12
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"
@@ -223,4 +230,9 @@ Module ConstIni
Public Const S_MRUGUNSTOCKPEZ As String = "MruGunStockPez"
Public Const K_FILE As String = "File"
Public Const S_EXECUTEWINDOW As String = "ExecuteWindow"
Public Const K_LEFT As String = "Left"
Public Const K_TOP As String = "Top"
Public Const K_WIDTH As String = "Width"
Public Const K_HEIGHT As String = "Height"
End Module
+11 -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>
@@ -402,6 +407,7 @@
</Compile>
<Compile Include="PopUpViewPanel\PopUpViewPanelVM.vb" />
<Compile Include="Utility\SelData.vb" />
<Compile Include="Utility\WindowStateBehavior.vb" />
<Compile Include="ViewPanel\ViewPanelV.xaml.vb">
<DependentUpon>ViewPanelV.xaml</DependentUpon>
</Compile>
@@ -607,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>
+4 -2
View File
@@ -4,13 +4,14 @@
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="Execute Window"
Height="500" Width="400"
Height="500" Width="600"
IsResizable="True"
IsMinimizable="False"
WindowStartupLocation="CenterOwner"
ShowInTaskbar="False"
TitleBarHeight="32"
PreviewKeyDown="EgtCustomWindow_PreviewKeyDown"
EgtCAM5:WindowStateIniBehavior.PersistenceKey="Dimension"
CloseCommand="{Binding Close_Command,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
<Grid>
@@ -28,7 +29,8 @@
Grid.ColumnSpan="2"
Content="{Binding OkMsg}"
Command="{Binding Ok_Command}"
Style="{StaticResource EgtCAM5_InputButton}"/>
Style="{StaticResource EgtCAM5_InputButton}"
Margin="0,5,0,10"/>
<Button Grid.Column="1"
Command="{Binding Reload_Command}"
IsEnabled="{Binding bReload_IsEnable}"
+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, 3103, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 3103, 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.3.2")>
<Assembly: AssemblyFileVersion("3.1.3.2")>
<Assembly: AssemblyVersion("3.1.7.3")>
<Assembly: AssemblyFileVersion("3.1.7.3")>
@@ -22,9 +22,9 @@ Public Class LayerTreeViewItem
Return m_isSelected
End Get
Set(value As Boolean)
If value Then Map.refDrawOptionPanelVM.SetInfoRowIsExpanded(value)
If (value <> m_isSelected) Then
m_isSelected = value
Map.refDrawOptionPanelVM.SetInfoRowIsExpanded(value)
If value Then
' recupero l'Id del nuovo oggetto selezionato
Map.refManageLayerExpanderVM.IsRightClickedLayerTreeItem(False)
@@ -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>
@@ -95,16 +95,9 @@ Public Class MachiningTreeExpanderVM
EgtRelocate(MachiningId, nSelectedOperationId, GDB_POS.AFTER)
End If
' Imposto geometria da lavorare (tutta quella selezionata)
Dim vId(EgtGetSelectedObjCount() - 1) As Integer
Dim vSub(EgtGetSelectedObjCount() - 1) As Integer
Dim nInd As Integer = 0
Dim EntId As Integer = EgtGetFirstSelectedObj()
While EntId <> GDB_ID.NULL
vId(nInd) = EntId
SelData.GetSubFromId( EntId, vSub(nInd))
nInd += 1
EntId = EgtGetNextSelectedObj()
End While
Dim vId() As Integer = Nothing
Dim vSub() As Integer = Nothing
SelData.GetAllSelectedGeom(vId, vSub)
EgtSetMachiningGeometry(vId, vSub)
' Calcolo la lavorazione con la nuova geometria
EgtApplyMachining(True)
@@ -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)
@@ -13,7 +13,7 @@ Public Class MachiningParameterExpanderVM
''' </summary>
Friend Event m_EventFocusOnButtonPreview()
Private m_nPreviewMachiningTool As Integer
Private m_nPreviewMachiningTool As Integer = MCH_LOOK.NONE
Public ReadOnly Property nPreviewMachiningTool As Integer
Get
Return m_nPreviewMachiningTool
@@ -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
@@ -440,16 +439,9 @@ Public Class MachiningParameterExpanderVM
m_CurrOperation.WriteOperationParam()
' Imposto geometria da lavorare (tutta quella selezionata)
Dim vId(EgtGetSelectedObjCount() - 1) As Integer
Dim vSub(EgtGetSelectedObjCount() - 1) As Integer
Dim nInd As Integer = 0
Dim EntId As Integer = EgtGetFirstSelectedObj()
While EntId <> GDB_ID.NULL
vId(nInd) = EntId
SelData.GetSubFromId(EntId, vSub(nInd))
nInd += 1
EntId = EgtGetNextSelectedObj()
End While
Dim vId() As Integer = Nothing
Dim vSub() As Integer = Nothing
SelData.GetAllSelectedGeom(vId, vSub)
EgtSetMachiningGeometry(vId, vSub)
' Rigenero la lavorazione
@@ -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,
@@ -92,7 +92,12 @@
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<UniformGrid Columns="2">
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OverLapTxBl}"
ParamTxBx="{Binding Path=OverLap,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<UniformGrid Columns="2">
<TextBlock Text="{Binding UserNotesTxBl}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
@@ -37,14 +37,23 @@ Public Class OperationListBoxItem
If Not IsNothing(value) Then
Dim indexes As List(Of OperationListBoxItem) = New List(Of OperationListBoxItem)
Dim Count As Integer = 0
Dim nLastInd As Integer = -1
Dim nInd As Integer = 0
For Each OperationListBoxItem In Map.refOperationsListExpanderVM.OperationList
If OperationListBoxItem.IsSelected And OperationListBoxItem.Id <> m_Id Then
Count = Count + 1
indexes.Add(OperationListBoxItem)
nLastInd = nInd
End If
nInd += 1
Next
' Per evitare problemi con primo Item selezionato quando ListView non ancora esistente
If indexes.Count = 1 And nLastInd = 0 Then
Map.refOperationsListExpanderVM.OperationList(0).IsSelected = False
indexes.Clear()
End If
' E' possibile selezionare più lavorazioni solo se della stessa fase
If indexes.Count > 0 Then
If EgtGetOperationPhase(Id) <> EgtGetOperationPhase(indexes(0).Id) Then
Return
@@ -52,10 +61,11 @@ Public Class OperationListBoxItem
End If
m_IsSelected = value
' Verifico se c'è l'operazione precedente
If Not value Or
indexes.Any(Function(i) i.Type = MCH_OY.DISP) Or
(Not indexes.Any(Function(i) i.Type = MCH_OY.DISP) And Type = MCH_OY.DISP And Count > 0) Then
(Not indexes.Any(Function(i) i.Type = MCH_OY.DISP) And Type = MCH_OY.DISP And indexes.Count > 0) Then
m_IsSelected = False
@@ -77,6 +87,7 @@ Public Class OperationListBoxItem
If Map.refOperationsListExpanderVM.ForceDrawInIsSelected Then EgtDraw()
Return
End If
' Imposto la fase di lavorazione corrente
EgtSetCurrPhase(EgtGetOperationPhase(Id))
' Abilito la selezione dei Percorsi di Lavorazione
@@ -179,10 +179,8 @@ 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()
End If
OnPropertyChanged("ParametersIsExpanded")
@@ -28,8 +28,8 @@
</UniformGrid>
<ListBox Grid.Row="1"
IsSynchronizedWithCurrentItem="False"
ItemsSource="{Binding OperationList}"
IsSynchronizedWithCurrentItem="True"
x:Name="OperationList" IsEnabled="{Binding IsEnabledOperationList}" SelectionMode="Extended">
<ListBox.Resources>
<DataTemplate DataType="{x:Type EgtCAM5:MachiningOpListBoxItem}">
@@ -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
@@ -654,20 +657,17 @@ Public Class OperationsListExpanderVM
Dim sErr As String = String.Empty
Dim bOk As Boolean = EgtApplyAllMachinings(bRecalc, False, sErr)
EgtSetModified()
' Deseleziono l'Operazione selezionata e la de-evidenzio nel Disegno
' Aggiorno geometrie di lavorazione selezionate e marcate
m_ForceDrawInIsSelected = False
For Each Operation In OperationList
If Operation.IsSelected Then
Operation.IsSelected = False
Operation.IsSelected = True
End If
Next
' Ricarico la lista delle Operazioni
LoadOperationList(GDB_ID.NULL)
' Rimetto le lampadine in modo corretto
tmpStatusLamp.UpdateStatusLamp()
m_ForceDrawInIsSelected = True
' Aggiorno visualizzazione e ritorno a cursore standard
EgtDraw()
' Ripristino cursore
Application.Current.MainWindow.ForceCursor = False
Application.Current.MainWindow.Cursor = Cursors.Arrow
' In caso di errori, li segnalo
@@ -783,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
+52 -24
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
@@ -1456,7 +1480,7 @@ Public Class ProjectVM
m_Controller.MouseMoveInSelectionPoint(PtP)
End Sub
Private Sub OnMouseAnalyzedEx(sender As Object, nId As Integer, nSub As Integer, ptSel As Point3d) Handles m_ProjectScene.OnMouseAnalyzedEx
Private Sub OnMouseAnalyzedEx(sender As Object, nId As Integer, nSub As Integer, ptSel As Point3d, nModKey As Integer) Handles m_ProjectScene.OnMouseAnalyzedEx
Map.refManageLayerExpanderVM.UpdateObjInObjTree(nId)
Map.refManageLayerExpanderVM.SelectIdInObjTree(nId)
' Cancello geometria e info di eventuale precedente analisi
@@ -1467,19 +1491,17 @@ 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 <> -1 Then
If nFac >= 0 Then
' Visualizzo la normale e il contorno della faccia
Analyze.CreateAnalyzeGroup()
Analyze.CreateFacetNormal(nId, nFac)
Analyze.CreateFacetLoops(nId, nFac)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
If nModKey = Scene.MODKEY.SHIFT Then
Analyze.CreateTriaLoop(nId, nSub)
End If
' Recupero i dati (in globale o griglia a seconda della impostazione)
Dim ptC As Point3d
Dim vtN As Vector3d
@@ -1491,13 +1513,12 @@ Public Class ProjectVM
" : C(" + LenToString(ptC.x, 3) + "," + LenToString(ptC.y, 3) + "," + LenToString(ptC.z, 3) + ")" +
" N(" + DoubleToString(vtN.x, 4) + "," + DoubleToString(vtN.y, 4) + "," + DoubleToString(vtN.z, 4) + ")" +
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
If nModKey = Scene.MODKEY.SHIFT Then
sOut &= ", Triangle " + nSub.ToString()
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
@@ -1518,20 +1539,25 @@ Public Class ProjectVM
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
Map.refStatusBarVM.NotifyStatusOutput(sOut)
End If
' 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()
Dim dU As Double
Dim dV As Double
If Analyze.CreateSBzPointNormalAndTangents(nId, ptSel, dU, dV) Then
Dim sOut As String = "U = " + dU.ToString("F3") +
"; V = " + dV.ToString("F3")
Dim dU, dV As Double
Dim vtN As Vector3d
If Analyze.CreateSBzPointNormalAndTangents(nId, ptSel, dU, dV, vtN) Then
Dim dLen, dPhi, dTheta As Double
vtN.ToSpherical(dLen, dTheta, dPhi)
' Emetto info sulla barra di stato
Dim sOut As String = "U=" + DoubleToString(dU, 4) + ",V=" + DoubleToString(dV, 4) +
" : P(" + LenToString(ptSel.x, 3) + "," + LenToString(ptSel.y, 3) + "," + LenToString(ptSel.z, 3) + ")" +
" N(" + DoubleToString(vtN.x, 4) + "," + DoubleToString(vtN.y, 4) + "," + DoubleToString(vtN.z, 4) + ")" +
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
Map.refStatusBarVM.NotifyStatusOutput(sOut)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
If nModKey = Scene.MODKEY.SHIFT Then
Analyze.CreateSBzIsoParam(nId, dU, dV)
End If
End If
End If
' Aggiorno la visualizzazione
EgtDraw()
@@ -1546,6 +1572,8 @@ Public Class ProjectVM
If e.KeyData = System.Windows.Forms.Keys.Delete AndAlso Map.refTopCommandBarVM.DrawIsChecked Then
m_Controller.SetLastInteger(GDB_ID.SEL)
m_Controller.ExecuteCommand(Controller.CMD.DELETE)
' controllo per chiudere expander info
If Not Map.refInfoExpanderVM.IsEnabled Then Map.refDrawOptionPanelV.DrawGrid.RowDefinitions(1).Height = New GridLength(1, GridUnitType.Auto)
' Con END eseguo deselezione di tutto
ElseIf e.KeyData = System.Windows.Forms.Keys.End Then
m_Controller.MouseDeselectedAll(True)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 774 B

After

Width:  |  Height:  |  Size: 797 B

+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}"/>
+78 -39
View File
@@ -1,4 +1,5 @@
Imports EgtUILib
Imports System.Data
Imports EgtUILib
Module Analyze
@@ -76,20 +77,6 @@ Module Analyze
Return True
End Function
Function CreateTriaNormal( nId As Integer, nT As Integer) As Boolean
'If m_AnaGrpId = GDB_ID.NULL Then Return False
'Dim bEnMod As Boolean = EgtGetEnableModified()
'EgtDisableModified()
'Dim ptC As Point3d
'Dim vtN As Vector3d
'If EgtSurfTmTriangleNormVersor( nId, nT, GDB_ID.ROOT, ptC, vtN) Then
' Dim nNormId As Integer = EgtCreateGeoVector( m_AnaGrpId, 50 * vtN, ptC, GDB_RT.GLOB)
' EgtSetColor( nNormId, New Color3d( 255, 0,0))
'End If
'If bEnMod Then EgtEnableModified()
Return True
End Function
Function CreateChunkNormal( nId As Integer, nChk As Integer) As Boolean
If m_AnaGrpId = GDB_ID.NULL Then Return False
Dim bEnMod As Boolean = EgtGetEnableModified()
@@ -123,54 +110,107 @@ Module Analyze
If m_AnaGrpId = GDB_ID.NULL Then Return False
Dim bEnMod As Boolean = EgtGetEnableModified()
EgtDisableModified()
'Riferimento della griglia corrente
' Salvo riferimento della griglia corrente
Dim refGrid As Frame3d = EgtGetGridFrame()
'Nuovo riferimento griglia con Z come versore estrusione della curva
' Nuovo riferimento griglia con Z come versore estrusione della curva
Dim vtExtr As Vector3d : EgtCurveExtrusion( nId, vtExtr)
If Not vtExtr.IsSmall() Then
Dim refCrv As New Frame3d : refCrv.Setup( EgtGetGridOrigin(), vtExtr)
EgtSetGridFrame( refCrv)
End If
'Recupero il numero di curve semplici
' Recupero il numero di curve semplici
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
' Scrivo il punto iniziale di ogni curva componente
Dim ptS As Point3d
EgtAtParamPoint( nId, i, GDB_ID.GRID, ptS)
Dim nPntId As Integer = EgtCreateGeoPoint( m_AnaGrpId, ptS, GDB_RT.GRID)
EgtSetColor( nPntId, New Color3d( 255, 0,0))
'Scrivo il numero identificativo di ogni curva componente
' Scrivo il numero identificativo di ogni curva componente
Dim ptP As Point3d
EgtAtParamPoint( nId, i + 0.5, GDB_ID.GRID, ptP)
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
' Se curva aperta aggiungo il punto finale
If Not EgtCurveIsClosed( nId) Then
Dim ptE As Point3d
EgtEndPoint( nId, GDB_ID.GRID, ptE)
Dim nPntId As Integer = EgtCreateGeoPoint( m_AnaGrpId, ptE, GDB_RT.GRID)
EgtSetColor( nPntId, New Color3d( 255, 0,0))
End If
'Reimposto il riferimento originale alla griglia
' Reimposto il riferimento originale alla griglia
EgtSetGridFrame( refGrid)
If bEnMod Then EgtEnableModified()
Return True
End Function
Function CreateSBzPointNormalAndTangents( nId As Integer, ptBez As Point3d, ByRef dU As Double, ByRef dV As Double) As Boolean
If m_AnaGrpId = GDB_ID.NULL Then Return False
Dim bEnMod As Boolean = EgtGetEnableModified()
EgtDisableModified()
Dim bOk As Boolean = EgtSurfBezParamsFromPoint( nId, ptBez, m_AnaGrpId, dU, dV)
If bEnMod Then EgtEnableModified()
Function CreateSBzPointNormalAndTangents( nId As Integer, ptBez As Point3d, ByRef dU As Double, ByRef dV As Double, ByRef vtN As Vector3d) As Boolean
Dim ptP As Point3d
Dim vtDirU, vtDirV As Vector3d
Dim bOk As Boolean = EgtSurfBezierParamsFromPoint( nId, ptBez, GDB_ID.ROOT, dU, dV) AndAlso
EgtSurfBezierGetPointNrmD1( nId, dU, dV, SRF_SIDE.FROM_MINUS, SRF_SIDE.FROM_MINUS, GDB_ID.ROOT,
ptP, vtN, vtDirU, vtDirV)
If bOk AndAlso m_AnaGrpId <> GDB_ID.NULL Then
Dim bEnMod As Boolean = EgtGetEnableModified()
EgtDisableModified()
' Disegno Punto
Dim nPntId As Integer = EgtCreateGeoPoint( m_AnaGrpId, ptBez, GDB_RT.GLOB)
EgtSetColor( nPntId, New Color3d( 255, 0, 0))
EgtSetStatus( nPntId, GDB_ST.SEL)
' Disegno Vettore Normale
Dim nNormId As Integer = EgtCreateGeoVector( m_AnaGrpId, 50 * vtN, ptBez, GDB_RT.GLOB)
EgtSetColor( nNormId, New Color3d( 255, 0, 0))
EgtSetStatus( nNormId, GDB_ST.SEL)
' Disegno tangente in U
Dim dModU As Double = vtDirU.Len()
If dModU > EPS_ZERO Then
Dim nTgUId As Integer = EgtCreateGeoVector( m_AnaGrpId, 25 / dModU * vtDirU, ptBez, GDB_RT.GLOB)
EgtSetColor( nTgUId, New Color3d( 0, 128, 192))
EgtSetStatus( nTgUId, GDB_ST.SEL)
End If
' Disegno tangente in V
Dim dModV As Double = vtDirV.Len()
If dModV > EPS_ZERO Then
Dim nTgVId As Integer = EgtCreateGeoVector( m_AnaGrpId, 25 / dModV * vtDirV, ptBez, GDB_RT.GLOB)
EgtSetColor( nTgVId, New Color3d( 255, 128, 0))
EgtSetStatus( nTgVId, GDB_ST.SEL)
End If
If bEnMod Then EgtEnableModified()
End If
Return bOk
End Function
@@ -178,15 +218,14 @@ Module Analyze
If m_AnaGrpId = GDB_ID.NULL Then Return False
Dim bEnMod As Boolean = EgtGetEnableModified()
EgtDisableModified()
Dim nIdCrv As Integer = EgtSurfBezierGetCurveU( nId, dV, m_AnaGrpId)
EgtSetColor( nIdCrv, New Color3d(128,128,255))
Dim bOk As Boolean = nIdCrv <> GDB_ID.NULL
nIdCrv = EgtSurfBezierGetCurveV( nId, dU, m_AnaGrpId)
bOk = bOk And nIdCrv <> GDB_ID.NULL
EgtSetColor( nIdCrv, New Color3d(255,128,128))
Dim nCrvUId As Integer = EgtSurfBezierGetCurveU( nId, dV, m_AnaGrpId)
EgtSetColor( nCrvUId, New Color3d( 0, 128, 192))
EgtSetStatus( nCrvUId, GDB_ST.SEL)
Dim nCrvVId As Integer = EgtSurfBezierGetCurveV( nId, dU, m_AnaGrpId)
EgtSetColor( nCrvVId, New Color3d( 255, 128, 0))
EgtSetStatus( nCrvVId, GDB_ST.SEL)
If bEnMod Then EgtEnableModified()
Return bOk
Return ( nCrvUId <> GDB_ID.NULL And nCrvVId <> GDB_ID.NULL)
End Function
End Module
+3
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"/>
@@ -794,6 +795,8 @@
<Style x:Key="ExecuteWindow_TextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
<Setter Property="AcceptsReturn" Value="True"/>
<Setter Property="TextWrapping" Value="Wrap"/>
<Setter Property="FontFamily" Value="Consolas"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Margin" Value="5"/>
</Style>
+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)
+21 -27
View File
@@ -96,40 +96,34 @@ Module SelData
Return False
End Function
Friend Function GetIdSubCount() As Integer
Return m_IdSub.Count()
End Function
Friend Function GetIdSub(nInd As Integer, ByRef nId As Integer, ByRef nSub As Integer) As Boolean
If nInd < 0 Or nInd > m_IdSub.Count() - 1 Then
nId = GDB_ID.NULL
Return False
End If
nId = m_IdSub(nInd).m_nId
nSub = m_IdSub(nInd).m_nSub
Friend Function GetAllSelectedGeom(ByRef vId() As Integer, ByRef vSub() As Integer) As Boolean
VerifyIdSub()
' Recupero tutte le entità selezionate con le loro eventuali sotto-parti
Dim MyId As New List(Of Integer)
Dim MySub As New List(Of Integer)
Dim nEntId As Integer = EgtGetFirstSelectedObj()
While nEntId <> GDB_ID.NULL
Dim MyEntSub As New List(Of Integer)
GetSubFromId( nEntId, MyEntSub)
For Each nEntSub As Integer In MyEntSub
MyId.Add(nEntId)
MySub.Add(nEntSub)
Next
nEntId = EgtGetNextSelectedObj()
End While
vId = MyId.ToArray()
vSub = MySub.ToArray()
Return True
End Function
Friend Function GetAllIdSub(ByRef vId() As Integer, ByRef vSub() As Integer) As Boolean
Dim MyId(m_IdSub.Count() - 1) As Integer
Dim MySub(m_IdSub.Count() - 1) As Integer
For i As Integer = 0 To m_IdSub.Count() - 1
MyId(i) = m_IdSub(i).m_nId
MySub(i) = m_IdSub(i).m_nSub
Next
vId = MyId
vSub = MySub
Return True
End Function
Friend Function GetSubFromId( nId As Integer, ByRef nSub As Integer) As Boolean
Friend Function GetSubFromId(nId As Integer, ByRef vSub As List(Of Integer)) As Boolean
For i As Integer = 0 To m_IdSub.Count() - 1
If m_IdSub(i).m_nId = nId Then
nSub = m_IdSub(i).m_nSub
Return True
vSub.Add(m_IdSub(i).m_nSub)
End If
Next
nSub = -1
If vSub.Count > 0 Then Return True
vSub.Add(-1)
Return False
End Function
+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
+74
View File
@@ -0,0 +1,74 @@
Public Class WindowStateIniBehavior
Private Shared ReadOnly IsReady As New Dictionary(Of Window, Boolean)
Public Shared Function GetPersistenceKey(obj As DependencyObject) As String
Return CStr(obj.GetValue(PersistenceKeyProperty))
End Function
Public Shared Sub SetPersistenceKey(obj As DependencyObject, value As String)
obj.SetValue(PersistenceKeyProperty, value)
End Sub
Public Shared ReadOnly PersistenceKeyProperty As DependencyProperty =
DependencyProperty.RegisterAttached(
"PersistenceKey",
GetType(String),
GetType(WindowStateIniBehavior),
New PropertyMetadata(Nothing, AddressOf OnKeyChanged)
)
Private Shared Sub OnKeyChanged(d As DependencyObject, e As DependencyPropertyChangedEventArgs)
Dim Window = TryCast(d, Window)
If IsNothing(Window) Then Return
IsReady(Window) = False
AddHandler Window.Loaded, Sub() LoadState(Window)
AddHandler Window.ContentRendered,
Sub()
IsReady(Window) = True
End Sub
AddHandler Window.LocationChanged, Sub() SaveState(Window)
AddHandler Window.SizeChanged, Sub() SaveState(Window)
End Sub
Private Shared Sub SaveState(Window As Window)
If Not IsReady(Window) Then Return
EgtUILib.WritePrivateProfileString(S_EXECUTEWINDOW, K_LEFT, Window.Left.ToString(), Map.refMainWindowVM.DimensionDir)
EgtUILib.WritePrivateProfileString(S_EXECUTEWINDOW, K_TOP, Window.Top.ToString(), Map.refMainWindowVM.DimensionDir)
EgtUILib.WritePrivateProfileString(S_EXECUTEWINDOW, K_WIDTH, Window.Width.ToString(), Map.refMainWindowVM.DimensionDir)
EgtUILib.WritePrivateProfileString(S_EXECUTEWINDOW, K_HEIGHT, Window.Height.ToString(), Map.refMainWindowVM.DimensionDir)
End Sub
Private Shared Sub LoadState(Window As Window)
Dim sLeft As String = String.Empty
Dim dLeft As Double = 0
EgtUILib.GetPrivateProfileString(S_EXECUTEWINDOW, K_LEFT, String.Empty, sLeft, Map.refMainWindowVM.DimensionDir)
If sLeft IsNot String.Empty Then StringToDouble(sLeft, dLeft)
Dim sTopD As String = String.Empty
Dim dTop As Double = 0.0
EgtUILib.GetPrivateProfileString(S_EXECUTEWINDOW, K_TOP, String.Empty, sTopD, Map.refMainWindowVM.DimensionDir)
If sTopD IsNot String.Empty Then StringToDouble(sTopD, dTop)
Dim sWidth As String = String.Empty
Dim dWidth As Double = 0.0
EgtUILib.GetPrivateProfileString(S_EXECUTEWINDOW, K_WIDTH, String.Empty, sWidth, Map.refMainWindowVM.DimensionDir)
If sWidth IsNot String.Empty Then StringToDouble(sWidth, dWidth)
Dim sHeight As String = String.Empty
Dim dHeight As Double = 0.0
EgtUILib.GetPrivateProfileString(S_EXECUTEWINDOW, K_HEIGHT, String.Empty, sHeight, Map.refMainWindowVM.DimensionDir)
If sWidth IsNot String.Empty Then StringToDouble(sHeight, dHeight)
If dLeft > 0 Then Window.Left = dLeft
If dTop > 0 Then Window.Top = dTop
If dWidth > 0 Then Window.Width = dWidth
If dHeight > 0 Then Window.Height = dHeight
End Sub
End Class