diff --git a/Controller.vb b/Controller.vb index 181dd08..fa4d8f5 100644 --- a/Controller.vb +++ b/Controller.vb @@ -225,7 +225,7 @@ Public Class Controller ' aggiorno EgtZoom(ZM.ALL) RaiseEvent UpdateUI(Me, True) - ' Gestione risultato + ' Gestione risultato RaiseEvent OnNewProject(Me, bOk) Return bOk End Function @@ -511,7 +511,7 @@ Public Class Controller ElseIf nFileType = FT.STL Then bOk = EgtExportStl(GDB_ID.ROOT, sFileName) ElseIf nFileType = FT.IMG Then - bOk = EgtGetImage(SM.SHADING, New Color3d(255, 255, 255), New Color3d(255, 255, 255), + bOk = EgtGetImage(EgtGetShowMode(), New Color3d(255, 255, 255), New Color3d(255, 255, 255), m_nImgWidth, m_nImgHeight, sFileName) End If DisableCommandLog() diff --git a/EgtInterface.vb b/EgtInterface.vb index 8eeefd9..e25082e 100644 --- a/EgtInterface.vb +++ b/EgtInterface.vb @@ -1194,6 +1194,21 @@ Public Function EgtSetOutText(Callback As OutTextCallback) As Boolean End If End Function + + Private Function EgtSetMainWindowHandle_32(hMainWnd As IntPtr) As Boolean + End Function + + Private Function EgtSetMainWindowHandle_64(hMainWnd As IntPtr) As Boolean + End Function + Public Function EgtSetMainWindowHandle(hMainWnd As IntPtr) As Boolean + If IntPtr.Size = 4 Then + Return EgtSetMainWindowHandle_32(hMainWnd) + Else + Return EgtSetMainWindowHandle_64(hMainWnd) + End If + End Function + + '---------- UiUnits ------------------------------------------------------------ Private Function EgtSetUiUnits_32(bMM As Boolean) As Boolean @@ -11145,12 +11160,10 @@ Public FIX_TYPE As String = "TYPE" Public FIX_REF As String = "REF" Public FIX_VAC As String = "VAC" Public FIX_VIS As String = "VIS" -' Costanti : arco dei riferimenti +' Costanti : arco di battuta dei riferimenti Public REF_ARC As String = "Ref" -' Costanti : disco di contatto colorato -Public REF_CONTACTCOLDISK As String = "ContactColoredDisk" -' Costanti : superficie di contatto colorata -Public REF_CONTACTSURFACE As String = "ContactSurface" +' Costanti : disco colorato dei riferimenti +Public REF_DISK As String = "RefDisk" ' Costanti : tipo interferenza lavorazioni piane con pezzi Public Enum FMI_TYPE As Integer NONE = 0 diff --git a/Form1.vb b/Form1.vb index 06f91de..800dcea 100644 --- a/Form1.vb +++ b/Form1.vb @@ -184,6 +184,9 @@ Public Class Form1 If Not Scene1.Init() Then Application.Exit() End If + ' Recupero e imposto handle finestra principale + Dim hMainWnd As IntPtr = Me.Handle + EgtSetMainWindowHandle(hMainWnd) ' inizializzo gestore lavorazioni EgtInitMachMgr(m_sMachinesRoot) ' imposto unità di misura per interfaccia utente diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 4a64e28..cf4b01c 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -46,5 +46,5 @@ Imports System.Runtime.InteropServices ' utilizzando l'asterisco (*) come descritto di seguito: ' - - + + diff --git a/Scene.vb b/Scene.vb index a47678b..273e0c4 100644 --- a/Scene.vb +++ b/Scene.vb @@ -1074,6 +1074,20 @@ Public Class Scene End If End Sub + Public Function GetSnapPointType() As SP + If m_nStatus <> ST.SELPOINT And m_nStatus <> ST.SELPOINTZ Then + Return SP.PT_NONE + Else + Return m_nSnapType + End If + End Function + + Public Function SetSnapPointType(SnapPointType As SP) As Boolean + If IsNothing(SnapPointType) Then Return False + m_nSnapType = If(SnapPointType >= SP.PT_NONE And SnapPointType <= SP.PT_MINDIST, SnapPointType, SP.PT_NONE) + Return True + End Function + '-------------------------------- KeyDown -------------------------------------------------------- Private Sub Scene_KeyDown(ByVal sender As System.Object, ByVal e As KeyEventArgs) Handles MyBase.KeyDown ' Con selezione punti e drag abilitato @@ -1253,14 +1267,6 @@ Public Class Scene RaiseEvent OnCloseGetDist(Me) End Sub - Public Function GetSnapPointType() As SP - If m_nStatus <> ST.SELPOINT And m_nStatus <> ST.SELPOINTZ Then - Return SP.PT_NONE - Else - Return m_nSnapType - End If - End Function - Public Sub SetDragIntersForSelPoint(ByVal bVal As Boolean) m_bAlsoDragIntersForSnap = bVal End Sub