diff --git a/Application.xaml.vb b/Application.xaml.vb
index 88ca3a5..9a9a772 100644
--- a/Application.xaml.vb
+++ b/Application.xaml.vb
@@ -107,6 +107,7 @@ Class Application
Friend Const SWEPT As String = "Swept"
Friend Const MERGESURF As String = "MergeSurf"
Friend Const EXPLODESURF As String = "ExplodeSurf"
+ Friend Const APPROXSURF As String = "ApproxSurf"
Friend Const INVERTSURF As String = "InvertSurf"
Friend Const DELETE As String = "Delete"
Friend Const CHANGELAYER As String = "ChangeLayer"
diff --git a/DrawPanel/DrawPanelV.xaml b/DrawPanel/DrawPanelV.xaml
index e7a33ad..b5fa3bb 100644
--- a/DrawPanel/DrawPanelV.xaml
+++ b/DrawPanel/DrawPanelV.xaml
@@ -170,6 +170,11 @@
Command="{Binding InvertSurfCommand}" IsEnabled="{Binding bSelOk}">
+
diff --git a/DrawPanel/DrawPanelVM.vb b/DrawPanel/DrawPanelVM.vb
index 19f30ef..00f57a3 100644
--- a/DrawPanel/DrawPanelVM.vb
+++ b/DrawPanel/DrawPanelVM.vb
@@ -146,6 +146,11 @@ Public Class DrawPanelVM
Return EgtMsg( 5221) 'Esplodi Superfici e Regioni Piane
End Get
End Property
+ Public ReadOnly Property ApproxSurfToolTip As String
+ Get
+ Return EgtMsg( 5165) 'Approssima Superfici e Regioni Piane
+ End Get
+ End Property
Public ReadOnly Property ExtractSurfFacetToolTip As String
Get
Return EgtMsg( 5158) 'Estrai Faccia da Superficie
@@ -448,6 +453,7 @@ Public Class DrawPanelVM
Private m_cmdRuled As ICommand
Private m_cmdMergeSurf As ICommand
Private m_cmdExplodeSurf As ICommand
+ Private m_cmdApproxSurf As ICommand
Private m_cmdExtractSurfFacet As ICommand
Private m_cmdInvertSurf As ICommand
Private m_cmdExtractLoops As ICommand
@@ -1146,7 +1152,7 @@ Public Class DrawPanelVM
'''
Public Sub ExplodeSurf(ByVal param As Object)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
- Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXTRACTSURFFACET)
+ Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.SURFTMTOTRIANGLES)
Else
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXPLODESURF)
End If
@@ -1154,6 +1160,29 @@ Public Class DrawPanelVM
#End Region ' ExplodeSurfCommand
+#Region "ApproxSurfCommand"
+
+ '''
+ ''' Returns a command that do ApproxSurf.
+ '''
+ Public ReadOnly Property ApproxSurfCommand As ICommand
+ Get
+ If m_cmdApproxSurf Is Nothing Then
+ m_cmdApproxSurf = New RelayCommand(AddressOf ApproxSurf)
+ End If
+ Return m_cmdApproxSurf
+ End Get
+ End Property
+
+ '''
+ ''' Execute the ApproxSurf. This method is invoked by the ApproxSurfCommand.
+ '''
+ Public Sub ApproxSurf(ByVal param As Object)
+ Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.APPROXSURF)
+ End Sub
+
+#End Region ' ApproxSurfCommand
+
#Region "ExtractSurfFacetCommand"
'''
@@ -1175,7 +1204,7 @@ Public Class DrawPanelVM
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXTRACTSURFFACET)
End Sub
-#End Region ' ExplodeSurfCommand
+#End Region ' ExtractSurfFacetCommand
#Region "InvertSurfCommand"
diff --git a/EgtCAM5.vbproj b/EgtCAM5.vbproj
index adf4ca4..e7d53a7 100644
--- a/EgtCAM5.vbproj
+++ b/EgtCAM5.vbproj
@@ -956,6 +956,9 @@
+
+
+ IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R32.exe
diff --git a/MainWindow/MainWindowVM.vb b/MainWindow/MainWindowVM.vb
index bd93286..8c6697d 100644
--- a/MainWindow/MainWindowVM.vb
+++ b/MainWindow/MainWindowVM.vb
@@ -355,8 +355,8 @@ Public Class MainWindowVM
EgtUILib.GetPrivateProfileString( S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
EgtSetNestKey( sNestKey)
' Recupero livello e opzioni della chiave
- Dim bKey As Boolean = EgtGetKeyLevel(3279, 2410, 1, IniFile.m_nKeyLevel) And
- EgtGetKeyOptions(3279, 2410, 1, IniFile.m_nKeyOptions)
+ Dim bKey As Boolean = EgtGetKeyLevel(3279, 2411, 1, IniFile.m_nKeyLevel) And
+ EgtGetKeyOptions(3279, 2411, 1, IniFile.m_nKeyOptions)
' Leggo e imposto livello utilizzatore
IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
' Inizializzazione generale di EgtInterface
diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb
index d4e057d..a3fcde8 100644
--- a/My Project/AssemblyInfo.vb
+++ b/My Project/AssemblyInfo.vb
@@ -70,6 +70,6 @@ Imports System.Windows
' by using the '*' as shown below:
'
-
-
+
+
diff --git a/Resources/DrawPanel/ApproxSurf.png b/Resources/DrawPanel/ApproxSurf.png
new file mode 100644
index 0000000..9cea7e1
Binary files /dev/null and b/Resources/DrawPanel/ApproxSurf.png differ