diff --git a/Controller.vb b/Controller.vb index a4095d3..86f625d 100644 --- a/Controller.vb +++ b/Controller.vb @@ -479,6 +479,7 @@ Public Class Controller .Title = "Import", .Filter = "Drawing Exchange Fmt(*.dxf)|*.dxf" & "|Stereolithography (*.stl)|*.stl" & + "|3D Manufacturing Format (*.3mf)|*.3mf" & "|Building parts (*.btl)|*.btl" & "|Part program ISO (*.cnc;*.xpi;*.mpf;*.iso;*.eia)|*.cnc;*.xpi;*.mpf;*.iso;*.eia" & "|Point files (*.pnt;*.xyz)|*.pnt;*.xyz" & @@ -486,7 +487,7 @@ Public Class Controller "|Cms files (*.hed;*.ent;*.ens)|*.hed;*.ent;*.ens" & sOptionalExts & "|All Files (*.*)|*.*", - .FilterIndex = 8 + nOptionalExts, + .FilterIndex = 9 + nOptionalExts, .InitialDirectory = sDir } If OpenFileDialog.ShowDialog <> Windows.Forms.DialogResult.OK Then @@ -498,7 +499,7 @@ Public Class Controller Dim nFileType As Integer = EgtGetFileType(sFile) Dim bOkType = (nFileType = FT.BTL Or nFileType = FT.BTLX Or nFileType = FT.CNC Or nFileType = FT.CSF Or nFileType = FT.DXF Or nFileType = FT.IMG Or - nFileType = FT.PNT Or nFileType = FT.STL Or + nFileType = FT.PNT Or nFileType = FT.STL Or nFileType = FT._3MF Or nFileType = FT.IGES Or nFileType = FT.STEP_ Or nFileType = FT.ACIS Or nFileType = FT.PARASOLID Or nFileType =Ft.JT Or nFileType = FT.VRML Or nFileType = FT.C3D) @@ -529,6 +530,8 @@ Public Class Controller bOk = bOk AndAlso EgtImportPnt(sFile, nFlag) Case FT.STL bOk = bOk AndAlso EgtImportStl(sFile, m_dStlScale) + Case FT._3MF + bOk = bOk AndAlso EgtImport3MF(sFile) Case FT.IGES, FT.STEP_, FT.ACIS, FT.PARASOLID, FT.JT, FT.VRML, FT.C3D bOk = bOk AndAlso EgtAdvancedImport( sFile, m_dEpsStm) End Select diff --git a/EgtInterface.vb b/EgtInterface.vb index 88b0df6..51b544a 100644 --- a/EgtInterface.vb +++ b/EgtInterface.vb @@ -1990,6 +1990,20 @@ Public Function EgtImportStl(sFilePath As String, dScaleFactor As Double) As Boo End If End Function + +Private Function EgtImport3MF_32(sFilePath As String) As Boolean +End Function + +Private Function EgtImport3MF_64(sFilePath As String) As Boolean +End Function +Public Function EgtImport3MF(sFilePath As String) As Boolean + If IntPtr.Size = 4 Then + Return EgtImport3MF_32(sFilePath) + Else + Return EgtImport3MF_64(sFilePath) + End If +End Function + Private Function EgtAdvancedImportIsEnabled_32() As Boolean End Function @@ -13369,6 +13383,7 @@ Public Enum FT As Integer PNT = 17 SVG = 18 BTLX = 19 + _3MF = 20 IGES = 31 STEP_ = 32 ACIS = 33 diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 85add04..20ecb63 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -17,7 +17,7 @@ Imports System.Runtime.InteropServices - + @@ -35,5 +35,5 @@ Imports System.Runtime.InteropServices ' È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build ' utilizzando l'asterisco (*) come descritto di seguito: - - + +