Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 12081cec28 | |||
| 27a54b0034 | |||
| c1aee47e53 | |||
| e59d50923b | |||
| e5fca60809 | |||
| f7631e5201 | |||
| 4604ae3558 | |||
| 624eb0566f | |||
| f45efb2310 |
@@ -3,6 +3,7 @@
|
|||||||
Public Const TABLE = "Table"
|
Public Const TABLE = "Table"
|
||||||
Public Const TABLE_OUTLINE = "TableOutline"
|
Public Const TABLE_OUTLINE = "TableOutline"
|
||||||
Public Const EXTRUSION_AREA = "ExtrusionArea"
|
Public Const EXTRUSION_AREA = "ExtrusionArea"
|
||||||
|
Public Const EXTRUSION_RECT = "ExtrusionRect"
|
||||||
Public Const PART = "Part"
|
Public Const PART = "Part"
|
||||||
Public Const PRINT_SOLID = "PrintSolid"
|
Public Const PRINT_SOLID = "PrintSolid"
|
||||||
Public Const LAY_MACH_START = "MachStart"
|
Public Const LAY_MACH_START = "MachStart"
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ Public Module ConstGen
|
|||||||
' Abilitazioni licenza
|
' Abilitazioni licenza
|
||||||
Friend Enum KEY_OPT As UInteger
|
Friend Enum KEY_OPT As UInteger
|
||||||
BASE = 1 ' Prodotto Icarus
|
BASE = 1 ' Prodotto Icarus
|
||||||
|
MACHINE_EXPORT = 2 ' opzione per esportare file icrx per macchina
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
' File di log generale
|
' File di log generale
|
||||||
|
|||||||
@@ -87,6 +87,9 @@
|
|||||||
<Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
|
<Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Ionic.Zip.1.9.1.8\lib\Ionic.Zip.dll</HintPath>
|
<HintPath>..\packages\Ionic.Zip.1.9.1.8\lib\Ionic.Zip.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="PresentationFramework.Aero2" />
|
<Reference Include="PresentationFramework.Aero2" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
@@ -320,6 +323,7 @@
|
|||||||
<Compile Include="Utility\DisableModifiedMgr.vb" />
|
<Compile Include="Utility\DisableModifiedMgr.vb" />
|
||||||
<Compile Include="Utility\EgwCrypto.vb" />
|
<Compile Include="Utility\EgwCrypto.vb" />
|
||||||
<Compile Include="Utility\GeomEntityColors.vb" />
|
<Compile Include="Utility\GeomEntityColors.vb" />
|
||||||
|
<Compile Include="Utility\JsonUtility.vb" />
|
||||||
<Compile Include="Utility\LuaExec.vb" />
|
<Compile Include="Utility\LuaExec.vb" />
|
||||||
<Compile Include="Utility\Map.vb" />
|
<Compile Include="Utility\Map.vb" />
|
||||||
<Compile Include="Utility\MyMachine.vb" />
|
<Compile Include="Utility\MyMachine.vb" />
|
||||||
|
|||||||
@@ -191,8 +191,8 @@ Public Class MainWindowM
|
|||||||
EgtSetLockId( sLockId)
|
EgtSetLockId( sLockId)
|
||||||
End If
|
End If
|
||||||
' Recupero livello e opzioni della chiave
|
' Recupero livello e opzioni della chiave
|
||||||
Dim bKey As Boolean = EgtGetKeyLevel(5583, 2507, 1, m_nKeyLevel) And
|
Dim bKey As Boolean = EgtGetKeyLevel(5583, 2508, 1, m_nKeyLevel) And
|
||||||
EgtGetKeyOptions(5583, 2507, 1, m_nKeyOptions)
|
EgtGetKeyOptions(5583, 2508, 1, m_nKeyOptions)
|
||||||
' Inizializzazione generale di EgtInterface
|
' Inizializzazione generale di EgtInterface
|
||||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||||
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||||
|
|||||||
@@ -70,5 +70,5 @@ Imports System.Windows
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.5.7.1")>
|
<Assembly: AssemblyVersion("2.5.8.1")>
|
||||||
<Assembly: AssemblyFileVersion("2.5.7.1")>
|
<Assembly: AssemblyFileVersion("2.5.8.1")>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports Newtonsoft.Json
|
||||||
|
|
||||||
Public Class ProjManagerVM
|
Public Class ProjManagerVM
|
||||||
Inherits VMBase
|
Inherits VMBase
|
||||||
@@ -247,9 +248,37 @@ Public Class ProjManagerVM
|
|||||||
''' Execute the Save. This method is invoked by the SaveCommand.
|
''' Execute the Save. This method is invoked by the SaveCommand.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Sub Save()
|
Public Sub Save()
|
||||||
|
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||||
|
CreateJson()
|
||||||
|
End If
|
||||||
Map.refSceneHostVM.SaveProject()
|
Map.refSceneHostVM.SaveProject()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function CreateJson() As Boolean
|
||||||
|
' creo json
|
||||||
|
Dim LayerList As New List(Of JsonLayer)
|
||||||
|
For Each Layer In Map.refTFSEditorVM.LayerList
|
||||||
|
LayerList.Add(Layer.ConvertToJsonLayer())
|
||||||
|
Next
|
||||||
|
Dim json As String = JsonConvert.SerializeObject(LayerList, Formatting.Indented)
|
||||||
|
Dim sProjName As String = ""
|
||||||
|
EgtGetCurrFilePath(sProjName)
|
||||||
|
If Not String.IsNullOrWhiteSpace(sProjName) Then
|
||||||
|
sProjName = Path.ChangeExtension(sProjName, ".json")
|
||||||
|
If File.Exists(sProjName) Then
|
||||||
|
Try
|
||||||
|
File.Delete(sProjName)
|
||||||
|
Catch ex As Exception
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
Try
|
||||||
|
File.AppendAllText(sProjName, json)
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Json writing error!")
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
#End Region ' SaveCommand
|
#End Region ' SaveCommand
|
||||||
|
|
||||||
#Region "SaveAsCommand"
|
#Region "SaveAsCommand"
|
||||||
@@ -385,7 +414,7 @@ Public Class ProjManagerVM
|
|||||||
Map.refSceneHostVM.SaveProject()
|
Map.refSceneHostVM.SaveProject()
|
||||||
End If
|
End If
|
||||||
EgtGetCurrFilePath(sCurrProject)
|
EgtGetCurrFilePath(sCurrProject)
|
||||||
' se modificato, chiedo se si vuole salvare
|
' se modificato, chiedo se si vuole salvare
|
||||||
Else
|
Else
|
||||||
If EgtGetModified() Then
|
If EgtGetModified() Then
|
||||||
If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||||
|
|||||||
@@ -682,6 +682,26 @@ Public Class MySceneHostVM
|
|||||||
Return MainController.ExportProject(SaveFileDialog.FileName, False)
|
Return MainController.ExportProject(SaveFileDialog.FileName, False)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function ExportProjectForMachine(sFilePath As String) As Boolean
|
||||||
|
' Reset controller e scena
|
||||||
|
MainController.ResetStatus()
|
||||||
|
MainController.SetDefaultFilterForExport(EEX_FLT.MODE_HIDDEN + EEX_FLT.MODE_STD + EEX_FLT.STAT_ON + EEX_FLT.STAT_OFF + EEX_FLT.LEV_TEMP)
|
||||||
|
Return MainController.ExportGeomId(Map.refTopPanelVM.SelPart.nPartId, sFilePath, False)
|
||||||
|
End Function
|
||||||
|
Public Function ExportProjectForMachine(sDirPath As String, b3dm As Boolean, ByRef sFilePath As String) As Boolean
|
||||||
|
sFilePath = sDirPath & "\ProjectSlice" & If(b3dm, ".3dm", ".3mf")
|
||||||
|
' Reset controller e scena
|
||||||
|
MainController.ResetStatus()
|
||||||
|
MainController.SetDefaultFilterForExport(EEX_FLT.MODE_HIDDEN + EEX_FLT.MODE_STD + EEX_FLT.STAT_ON + EEX_FLT.STAT_OFF + EEX_FLT.LEV_TEMP)
|
||||||
|
Dim nExportGeomId As Integer = 0
|
||||||
|
If b3dm Then
|
||||||
|
If Not ExecPrepare3dmExport(nExportGeomId) Then Return False
|
||||||
|
Else
|
||||||
|
nExportGeomId = Map.refTopPanelVM.SelPart.nPartId
|
||||||
|
End If
|
||||||
|
Return MainController.ExportGeomId(nExportGeomId, sFilePath, False)
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Overrides Function ExecScript(sFilePath As String) As Boolean
|
Public Overrides Function ExecScript(sFilePath As String) As Boolean
|
||||||
Dim bOk As Boolean = False
|
Dim bOk As Boolean = False
|
||||||
If String.IsNullOrEmpty(sFilePath) Then
|
If String.IsNullOrEmpty(sFilePath) Then
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports Microsoft.Win32
|
Imports Microsoft.Win32
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
|
Imports Ionic.Zip
|
||||||
|
Imports Newtonsoft.Json
|
||||||
|
|
||||||
Public Class SliceManagerVM
|
Public Class SliceManagerVM
|
||||||
Inherits VMBase
|
Inherits VMBase
|
||||||
@@ -705,17 +707,34 @@ Public Class SliceManagerVM
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' eseguo calcoli
|
' eseguo calcoli
|
||||||
CalcSlice(True, True)
|
Dim bOk As Boolean = CalcSlice(True, True)
|
||||||
' se non ho interrotto calcoli
|
' se non ho interrotto calcoli
|
||||||
If Not m_bStopScriptToManage Then
|
If bOk AndAlso Not m_bStopScriptToManage Then
|
||||||
If bShiftPressed Then
|
' Se esiste l'iso
|
||||||
' Se esiste ne lancio l'editing
|
If File.Exists(sIsoFilePath) Then
|
||||||
If File.Exists(sIsoFilePath) Then
|
If bShiftPressed Then
|
||||||
|
' Se esiste ne lancio l'editing
|
||||||
Process.Start("Notepad.exe", sIsoFilePath)
|
Process.Start("Notepad.exe", sIsoFilePath)
|
||||||
' altrimenti lo segnalo
|
' altrimenti lo segnalo
|
||||||
Else
|
|
||||||
MessageBox.Show("Edit failed, missing part program file" & " (" & sIsoFilePath & ")")
|
|
||||||
End If
|
End If
|
||||||
|
' verifico se creare pacchetto
|
||||||
|
If Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.MACHINE_EXPORT) Then
|
||||||
|
'If True Then
|
||||||
|
If Not CreateProjectForMachine(sIsoFilePath) Then
|
||||||
|
MessageBox.Show("Icrx file generation failed!!", "Error!", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
|
End If
|
||||||
|
' riabilito ProjManager, TopPanel e uscita dal programma
|
||||||
|
Map.refProjManagerVM.SetProjCmdIsEnabled(True)
|
||||||
|
Map.refTopPanelVM.SetTopPanelIsEnabled(True)
|
||||||
|
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(True)
|
||||||
|
Map.refTFSEditorVM.SetTFSEditorIsEnabled(True)
|
||||||
|
Map.refSliderManagerVM.SetLayerIndexIsEnabled(True)
|
||||||
|
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(True)
|
||||||
|
SetButtonsIsEnabled(True)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
' altrimenti lo segnalo
|
||||||
|
MessageBox.Show("Part program generation failed!!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
End If
|
End If
|
||||||
NotifyPropertyChanged(NameOf(Time_Visibility))
|
NotifyPropertyChanged(NameOf(Time_Visibility))
|
||||||
NotifyPropertyChanged(NameOf(Mass_Visibility))
|
NotifyPropertyChanged(NameOf(Mass_Visibility))
|
||||||
@@ -725,6 +744,142 @@ Public Class SliceManagerVM
|
|||||||
m_bCalculating = False
|
m_bCalculating = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function CreateProjectForMachine(sIsoFilePath As String) As Boolean
|
||||||
|
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
|
||||||
|
Map.refProjManagerVM.SetProjCmdIsEnabled(False)
|
||||||
|
Map.refTopPanelVM.SetTopPanelIsEnabled(False)
|
||||||
|
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(False)
|
||||||
|
Map.refTFSEditorVM.SetTFSEditorIsEnabled(False)
|
||||||
|
Map.refSliderManagerVM.SetLayerIndexIsEnabled(False)
|
||||||
|
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(False)
|
||||||
|
SetButtonsIsEnabled(False)
|
||||||
|
' creo cartella file da esportare in Temp
|
||||||
|
Dim sExportTempFolderPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\MachineExport"
|
||||||
|
If Directory.Exists(sExportTempFolderPath) Then
|
||||||
|
Try
|
||||||
|
Directory.Delete(sExportTempFolderPath, True)
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error! Impossible deleting folder " & sExportTempFolderPath & "!")
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
Try
|
||||||
|
Directory.CreateDirectory(sExportTempFolderPath)
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error! Impossible creating folder " & sExportTempFolderPath & "!")
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
' mostro solido per eportazione
|
||||||
|
Dim SolidCheck As ViewLayer = Map.refViewLayerManagerVM.LayerList.FirstOrDefault(Function(x) x.Type = ViewLayer.ViewLayerType.SOLID_SLICE)
|
||||||
|
Dim CurrSolidCheckValue As Boolean? = SolidCheck.bIsVisible
|
||||||
|
If IsNothing(SolidCheck.bIsVisible) OrElse Not SolidCheck.bIsVisible Then
|
||||||
|
SolidCheck.bIsVisible = True
|
||||||
|
End If
|
||||||
|
' esporto file progetto
|
||||||
|
Dim sFileExtension As String
|
||||||
|
If True Then
|
||||||
|
sFileExtension = ".3dm"
|
||||||
|
Else
|
||||||
|
sFileExtension = ".3mf"
|
||||||
|
End If
|
||||||
|
Dim s3dFilePath As String = ""
|
||||||
|
If Not Map.refSceneHostVM.ExportProjectForMachine(sExportTempFolderPath, True, s3dFilePath) Then
|
||||||
|
EgtOutLog("Error! Impossible exporting 3mf file!")
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
'' esporto file 3mf
|
||||||
|
'Dim s3mfPath As String = sExportTempFolderPath & "\ProjectSlice.3mf"
|
||||||
|
'If Not Map.refSceneHostVM.ExportProjectForMachine(s3mfPath) Then
|
||||||
|
' EgtOutLog("Error! Impossible exporting 3mf file!")
|
||||||
|
' Return False
|
||||||
|
'End If
|
||||||
|
' creo file json
|
||||||
|
Dim sProjName As String = ""
|
||||||
|
EgtGetCurrFilePath(sProjName)
|
||||||
|
Dim sJsonPath As String = sExportTempFolderPath & "\ProjectSlice.json"
|
||||||
|
CreateJson(sJsonPath)
|
||||||
|
' creo immagine preview
|
||||||
|
Dim sPreviewImagePath As String = sExportTempFolderPath & "\ProjectSlice.png"
|
||||||
|
CreatePreviewImage(sPreviewImagePath)
|
||||||
|
' nascondo solido
|
||||||
|
If IsNothing(CurrSolidCheckValue) OrElse Not CurrSolidCheckValue Then
|
||||||
|
SolidCheck.bIsVisible = CurrSolidCheckValue
|
||||||
|
End If
|
||||||
|
' creo path dello zip
|
||||||
|
Dim sZipPath As String = Path.ChangeExtension(sProjName, ".icrx")
|
||||||
|
' se esiste gia' lo cancello
|
||||||
|
If File.Exists(sZipPath) Then
|
||||||
|
Try
|
||||||
|
File.Delete(sZipPath)
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error! Impossible deleting old icrx file!")
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
Try
|
||||||
|
Using zip As New Ionic.Zip.ZipFile(sZipPath, Console.Out)
|
||||||
|
zip.AlternateEncodingUsage = ZipOption.Always
|
||||||
|
zip.AlternateEncoding = Text.Encoding.UTF8
|
||||||
|
zip.CompressionMethod = CompressionMethod.None
|
||||||
|
' aggiungo file Iso
|
||||||
|
zip.AddItem(sIsoFilePath, "").FileName = "ProjectSlice" & Path.GetExtension(sIsoFilePath)
|
||||||
|
' aggiungo file 3mf
|
||||||
|
zip.AddItem(s3dFilePath, "")
|
||||||
|
' aggiungo json
|
||||||
|
zip.AddItem(sJsonPath, "")
|
||||||
|
' aggiungo immagine preview
|
||||||
|
zip.AddItem(sPreviewImagePath, "")
|
||||||
|
' salvo lo zip
|
||||||
|
zip.Save()
|
||||||
|
End Using
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error! Icrx file generation failed!!")
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
' elimino tutti i file temporanei creati
|
||||||
|
If Directory.Exists(sExportTempFolderPath) Then
|
||||||
|
Directory.Delete(sExportTempFolderPath, True)
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function CreateJson(sJsonPath As String) As Boolean
|
||||||
|
' creo json
|
||||||
|
Dim JsonMain As New JsonMain(m_dTime, m_dMass)
|
||||||
|
Dim json As String = JsonConvert.SerializeObject(JsonMain, Formatting.Indented)
|
||||||
|
If File.Exists(sJsonPath) Then
|
||||||
|
Try
|
||||||
|
File.Delete(sJsonPath)
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error! Impossible deleting file " & sJsonPath & "!")
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
Try
|
||||||
|
File.AppendAllText(sJsonPath, json)
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error! Impossible writing json file " & sJsonPath & "!")
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function CreatePreviewImage(sPreviewImagePath As String) As Boolean
|
||||||
|
' recupero posizione vista corrente
|
||||||
|
Dim nCurrAngVertDeg As Integer = 0
|
||||||
|
Dim nCurrAngHorizDeg As Integer = 0
|
||||||
|
EgtGetGenericView(nCurrAngVertDeg, nCurrAngHorizDeg)
|
||||||
|
EgtSetView(VT.ISO_SW, False)
|
||||||
|
SetTableVisibility(False)
|
||||||
|
EgtZoom(ZM.ALL, False)
|
||||||
|
'EgtExportSvg(GDB_ID.ROOT, sPreviewImagePath)
|
||||||
|
EgtGetImage(SM.SHADING, New Color3d(255, 255, 255, 255), New Color3d(255, 255, 255, 255), 3000, 3000, sPreviewImagePath)
|
||||||
|
EgtSetGenericView(nCurrAngVertDeg, nCurrAngHorizDeg, False)
|
||||||
|
SetTableVisibility(True)
|
||||||
|
EgtZoom(ZM.ALL, True)
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
#End Region ' Generate
|
#End Region ' Generate
|
||||||
|
|
||||||
#Region "Simulate"
|
#Region "Simulate"
|
||||||
|
|||||||
@@ -20,23 +20,22 @@ Public Class SliderManagerVM
|
|||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
|
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
|
||||||
|
Dim DisableMgr As New DisableModifiedMgr
|
||||||
Select Case m_nSelViewSlider
|
Select Case m_nSelViewSlider
|
||||||
Case ViewSliderType.ONLY_SELECTED
|
Case ViewSliderType.ONLY_SELECTED
|
||||||
' se diverso da nullo nascondo precedente
|
' nascondo precedente
|
||||||
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
If m_nLayerIndex > 0 Then dLayerAdvancement = 100
|
||||||
If m_nLayerIndex > 0 Then dLayerAdvancement = 100
|
If m_nLayerIndex = 0 Then
|
||||||
If m_nLayerIndex = 0 Then
|
For Each Layer In Map.refTopPanelVM.SelPart.LayerList
|
||||||
For Each Layer In Map.refTopPanelVM.SelPart.LayerList
|
EgtSetStatus(Layer.nLayerId, GDB_ST.OFF)
|
||||||
EgtSetStatus(Layer.nLayerId, GDB_ST.OFF)
|
Next
|
||||||
Next
|
ElseIf m_nLayerIndex > 0 Then
|
||||||
ElseIf m_nLayerIndex > 0 Then
|
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.OFF)
|
||||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.OFF)
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
m_nLayerIndex = value
|
m_nLayerIndex = value
|
||||||
' se diverso da nullo visualizzo corrente
|
' se diverso da nullo visualizzo corrente
|
||||||
If Not IsNothing(Map.refTopPanelVM.SelPart) AndAlso m_nLayerIndex > 0 Then EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.ON_)
|
If m_nLayerIndex > 0 Then EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.ON_)
|
||||||
' porto barra nuovo strato a 100
|
' porto barra nuovo strato a 100
|
||||||
If m_nLayerIndex > 0 Then SetLayerAdvancement(100)
|
If m_nLayerIndex > 0 Then SetLayerAdvancement(100)
|
||||||
Case ViewSliderType.UNTIL_SELECTED
|
Case ViewSliderType.UNTIL_SELECTED
|
||||||
@@ -64,6 +63,7 @@ Public Class SliderManagerVM
|
|||||||
End If
|
End If
|
||||||
m_nLayerIndex = value
|
m_nLayerIndex = value
|
||||||
End Select
|
End Select
|
||||||
|
DisableMgr.ReEnable()
|
||||||
NotifyPropertyChanged(NameOf(ghShowValue))
|
NotifyPropertyChanged(NameOf(ghShowValue))
|
||||||
NotifyPropertyChanged(NameOf(ghValueIndex))
|
NotifyPropertyChanged(NameOf(ghValueIndex))
|
||||||
NotifyPropertyChanged(NameOf(ghValueHeight))
|
NotifyPropertyChanged(NameOf(ghValueHeight))
|
||||||
@@ -71,47 +71,44 @@ Public Class SliderManagerVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Sub SetLayerIndex(value As Integer)
|
Private Sub SetLayerIndex(value As Integer)
|
||||||
|
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
|
||||||
|
Dim DisableMgr As New DisableModifiedMgr
|
||||||
Select Case m_nSelViewSlider
|
Select Case m_nSelViewSlider
|
||||||
Case ViewSliderType.ONLY_SELECTED
|
Case ViewSliderType.ONLY_SELECTED
|
||||||
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
||||||
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
||||||
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
If nLayerInd = value - 1 Then
|
||||||
If nLayerInd = value - 1 Then
|
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
||||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
Else
|
||||||
Else
|
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
||||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
End If
|
||||||
End If
|
Next
|
||||||
Next
|
|
||||||
End If
|
|
||||||
m_nLayerIndex = value
|
m_nLayerIndex = value
|
||||||
Case ViewSliderType.UNTIL_SELECTED
|
Case ViewSliderType.UNTIL_SELECTED
|
||||||
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
||||||
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
||||||
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
If nLayerInd <= value - 1 Then
|
||||||
If nLayerInd <= value - 1 Then
|
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
||||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
Else
|
||||||
Else
|
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
||||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
End If
|
||||||
End If
|
Next
|
||||||
Next
|
|
||||||
End If
|
|
||||||
m_nLayerIndex = value
|
m_nLayerIndex = value
|
||||||
Case ViewSliderType.FROM_SELECTED
|
Case ViewSliderType.FROM_SELECTED
|
||||||
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
' riporto vecchio strato a visualizzazione di tutti i solidi
|
||||||
' riporto vecchio strato a visualizzazione di tutti i solidi
|
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
||||||
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
|
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
||||||
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
|
If nLayerInd >= value - 1 Then
|
||||||
If nLayerInd >= value - 1 Then
|
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
||||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
|
Else
|
||||||
Else
|
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
||||||
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
|
End If
|
||||||
End If
|
Next
|
||||||
Next
|
|
||||||
End If
|
|
||||||
m_nLayerIndex = value
|
m_nLayerIndex = value
|
||||||
End Select
|
End Select
|
||||||
|
DisableMgr.ReEnable()
|
||||||
NotifyPropertyChanged(NameOf(nLayerIndex))
|
NotifyPropertyChanged(NameOf(nLayerIndex))
|
||||||
NotifyPropertyChanged(NameOf(ghShowValue))
|
NotifyPropertyChanged(NameOf(ghShowValue))
|
||||||
NotifyPropertyChanged(NameOf(ghValueIndex))
|
NotifyPropertyChanged(NameOf(ghValueIndex))
|
||||||
@@ -201,6 +198,8 @@ Public Class SliderManagerVM
|
|||||||
Return m_dLayerAdvancement
|
Return m_dLayerAdvancement
|
||||||
End Get
|
End Get
|
||||||
Set(value As Double)
|
Set(value As Double)
|
||||||
|
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
|
||||||
|
Dim DisableMgr As New DisableModifiedMgr
|
||||||
Select Case m_nSelViewSlider
|
Select Case m_nSelViewSlider
|
||||||
Case ViewSliderType.ONLY_SELECTED
|
Case ViewSliderType.ONLY_SELECTED
|
||||||
Dim nTotSolid As Integer = 0
|
Dim nTotSolid As Integer = 0
|
||||||
@@ -247,6 +246,7 @@ Public Class SliderManagerVM
|
|||||||
End If
|
End If
|
||||||
m_dLayerAdvancement = value
|
m_dLayerAdvancement = value
|
||||||
End Select
|
End Select
|
||||||
|
DisableMgr.ReEnable()
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -335,6 +335,7 @@ Public Class SliderManagerVM
|
|||||||
WriteMainPrivateProfileString(S_PRINTING3D, K_VIEWSLIDER, m_nSelViewSlider)
|
WriteMainPrivateProfileString(S_PRINTING3D, K_VIEWSLIDER, m_nSelViewSlider)
|
||||||
' ciclo tutti i layer per nasconderli/mostrarli
|
' ciclo tutti i layer per nasconderli/mostrarli
|
||||||
If IsNothing(Map.refTopPanelVM.SelPart) OrElse IsNothing(Map.refTopPanelVM.SelPart.LayerList) Then Return
|
If IsNothing(Map.refTopPanelVM.SelPart) OrElse IsNothing(Map.refTopPanelVM.SelPart.LayerList) Then Return
|
||||||
|
Dim DisableMgr As New DisableModifiedMgr
|
||||||
Select Case m_nSelViewSlider
|
Select Case m_nSelViewSlider
|
||||||
Case ViewSliderType.ONLY_SELECTED
|
Case ViewSliderType.ONLY_SELECTED
|
||||||
For Each Layer In Map.refTopPanelVM.SelPart.LayerList
|
For Each Layer In Map.refTopPanelVM.SelPart.LayerList
|
||||||
@@ -361,6 +362,7 @@ Public Class SliderManagerVM
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End Select
|
End Select
|
||||||
|
DisableMgr.ReEnable()
|
||||||
' mostro/nascondo slider orizzontale
|
' mostro/nascondo slider orizzontale
|
||||||
m_LayerAdvancement_Visibility = If(m_nSelViewSlider = ViewSliderType.ONLY_SELECTED, Visibility.Visible, Visibility.Hidden)
|
m_LayerAdvancement_Visibility = If(m_nSelViewSlider = ViewSliderType.ONLY_SELECTED, Visibility.Visible, Visibility.Hidden)
|
||||||
NotifyPropertyChanged(NameOf(LayerAdvancement_Visibility))
|
NotifyPropertyChanged(NameOf(LayerAdvancement_Visibility))
|
||||||
|
|||||||
@@ -962,4 +962,8 @@ Public Class TFSLayer
|
|||||||
Return If(dHours > 0, dHours.ToString("00") & ":", "") & If(dHours > 0, dMinutes.ToString("00"), dMinutes.ToString()) & ":" & dSeconds.ToString("00")
|
Return If(dHours > 0, dHours.ToString("00") & ":", "") & If(dHours > 0, dMinutes.ToString("00"), dMinutes.ToString()) & ":" & dSeconds.ToString("00")
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Friend Function ConvertToJsonLayer() As JsonLayer
|
||||||
|
Return New JsonLayer(nIndex, dLength, dTMin, m_dTTrg, dTMax, dTCurr, m_dTWait, dFCurr, m_dFTrg, m_dFMax, m_dFCurr, dSpeed)
|
||||||
|
End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -156,19 +156,30 @@ Public Module CurrentMachine
|
|||||||
DisableMgr.ReEnable()
|
DisableMgr.ReEnable()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub SetTableVisibility(IsVisible As Boolean)
|
||||||
|
Dim nTableLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE)
|
||||||
|
EgtSetStatus(nTableLayerId, If(IsVisible, GDB_ST.ON_, GDB_ST.OFF))
|
||||||
|
End Sub
|
||||||
|
|
||||||
Public Sub UpdateExtrusionArea()
|
Public Sub UpdateExtrusionArea()
|
||||||
|
Dim DisableMgr As New DisableModifiedMgr
|
||||||
' recupero eventuale vecchia area di estrusione
|
' recupero eventuale vecchia area di estrusione
|
||||||
Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE)
|
Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE)
|
||||||
Dim nTabLayerId As Integer = EgtGetFirstNameInGroup(nTabPartId, TABLE)
|
Dim nTabLayerId As Integer = EgtGetFirstNameInGroup(nTabPartId, TABLE)
|
||||||
Dim nExtrusionAreaId As Integer = EgtGetFirstNameInGroup(nTabLayerId, EXTRUSION_AREA)
|
Dim nExtrusionAreaId As Integer = EgtGetFirstNameInGroup(nTabLayerId, EXTRUSION_AREA)
|
||||||
If nExtrusionAreaId <> GDB_ID.NULL Then
|
If nExtrusionAreaId <> GDB_ID.NULL Then EgtErase(nExtrusionAreaId)
|
||||||
' e la cancello
|
Dim nExtrusionRectId As Integer = EgtGetFirstNameInGroup(nTabLayerId, EXTRUSION_RECT)
|
||||||
EgtErase(nExtrusionAreaId)
|
If nExtrusionRectId <> GDB_ID.NULL Then EgtErase(nExtrusionRectId)
|
||||||
End If
|
|
||||||
' se lavorazione corrente nulla, esco
|
' se lavorazione corrente nulla, esco
|
||||||
If IsNothing(Map.refTopPanelVM.CurrMachining) Then Return
|
If IsNothing(Map.refTopPanelVM.CurrMachining) Then
|
||||||
|
DisableMgr.ReEnable()
|
||||||
|
Return
|
||||||
|
End If
|
||||||
' se non esiste file dati macchina, esco
|
' se non esiste file dati macchina, esco
|
||||||
If String.IsNullOrWhiteSpace(m_sMachDataIniFile) Then Return
|
If String.IsNullOrWhiteSpace(m_sMachDataIniFile) Then
|
||||||
|
DisableMgr.ReEnable()
|
||||||
|
Return
|
||||||
|
End If
|
||||||
' recupero tipo di slice
|
' recupero tipo di slice
|
||||||
Dim sExtrusionType As String = S_VERTICAL
|
Dim sExtrusionType As String = S_VERTICAL
|
||||||
Dim GeneralCathegory As MachiningCathegory = Map.refTopPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL)
|
Dim GeneralCathegory As MachiningCathegory = Map.refTopPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL)
|
||||||
@@ -188,12 +199,19 @@ Public Module CurrentMachine
|
|||||||
Dim dExtrXMin = GetPrivateProfileDouble(sExtrusionType, K_MINX, 0, m_sMachDataIniFile)
|
Dim dExtrXMin = GetPrivateProfileDouble(sExtrusionType, K_MINX, 0, m_sMachDataIniFile)
|
||||||
Dim dExtrYMax = GetPrivateProfileDouble(sExtrusionType, K_MAXY, 0, m_sMachDataIniFile)
|
Dim dExtrYMax = GetPrivateProfileDouble(sExtrusionType, K_MAXY, 0, m_sMachDataIniFile)
|
||||||
Dim dExtrYMin = GetPrivateProfileDouble(sExtrusionType, K_MINY, 0, m_sMachDataIniFile)
|
Dim dExtrYMin = GetPrivateProfileDouble(sExtrusionType, K_MINY, 0, m_sMachDataIniFile)
|
||||||
nExtrusionAreaId = EgtCreateRectangle2P(nTabLayerId, New Point3d(dExtrXMin, dExtrYMin, 0), New Point3d(dExtrXMax, dExtrYMax, 0))
|
Const AREA_WIDTH As Double = 10
|
||||||
|
Dim nAuxRectId As Integer = EgtCreateRectangle2P(nTabLayerId, New Point3d(dExtrXMin - AREA_WIDTH, dExtrYMin - AREA_WIDTH, 0), New Point3d(dExtrXMax + AREA_WIDTH, dExtrYMax + AREA_WIDTH, 0))
|
||||||
|
nExtrusionRectId = EgtCreateRectangle2P(nTabLayerId, New Point3d(dExtrXMin, dExtrYMin, 0), New Point3d(dExtrXMax, dExtrYMax, 0))
|
||||||
|
nExtrusionAreaId = EgtCreateSurfTmByRegion( nTabLayerId, { nAuxRectId, nExtrusionRectId}, EPS_STM)
|
||||||
|
EgtErase( nAuxRectId)
|
||||||
Dim c3Temp As New Color3d
|
Dim c3Temp As New Color3d
|
||||||
c3Temp.FromColor(System.Drawing.Color.Lime)
|
c3Temp.FromColor(System.Drawing.Color.Lime)
|
||||||
EgtSetColor(nExtrusionAreaId, c3Temp)
|
EgtSetColor(nExtrusionAreaId, c3Temp)
|
||||||
EgtSetName(nExtrusionAreaId, EXTRUSION_AREA)
|
EgtSetName(nExtrusionAreaId, EXTRUSION_AREA)
|
||||||
|
EgtSetColor(nExtrusionRectId, c3Temp)
|
||||||
|
EgtSetName(nExtrusionRectId, EXTRUSION_RECT)
|
||||||
m_b3ExtrusionArea = New BBox3d(New Point3d(dExtrXMin, dExtrYMin, 0), New Point3d(dExtrXMax, dExtrYMax, 0))
|
m_b3ExtrusionArea = New BBox3d(New Point3d(dExtrXMin, dExtrYMin, 0), New Point3d(dExtrXMax, dExtrYMax, 0))
|
||||||
|
DisableMgr.ReEnable()
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,205 @@
|
|||||||
|
Imports EgtUILib.EgtInterface
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
|
Public Class JsonMain
|
||||||
|
|
||||||
|
Private m_StrandW As Double
|
||||||
|
Public ReadOnly Property StrandW As Double
|
||||||
|
Get
|
||||||
|
Return m_StrandW
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_StrandH As Double
|
||||||
|
Public ReadOnly Property StrandH As Double
|
||||||
|
Get
|
||||||
|
Return m_StrandH
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_BoxX As Double
|
||||||
|
Public ReadOnly Property BoxX As Double
|
||||||
|
Get
|
||||||
|
Return m_BoxX
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_BoxY As Double
|
||||||
|
Public ReadOnly Property BoxY As Double
|
||||||
|
Get
|
||||||
|
Return m_BoxY
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_BoxZ As Double
|
||||||
|
Public ReadOnly Property BoxZ As Double
|
||||||
|
Get
|
||||||
|
Return m_BoxZ
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dTime As Double
|
||||||
|
Public ReadOnly Property dTime As Double
|
||||||
|
Get
|
||||||
|
Return m_dTime
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dMass As Double = 0
|
||||||
|
Public ReadOnly Property dMass As Double
|
||||||
|
Get
|
||||||
|
Return m_dMass
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_LayerQty As Double
|
||||||
|
Public ReadOnly Property LayerQty As Double
|
||||||
|
Get
|
||||||
|
Return m_LayerQty
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_MaterialName As String
|
||||||
|
Public ReadOnly Property MaterialName As String
|
||||||
|
Get
|
||||||
|
Return m_MaterialName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_JsonLayerList As New List(Of JsonLayer)
|
||||||
|
Public ReadOnly Property JsonLayerList As List(Of JsonLayer)
|
||||||
|
Get
|
||||||
|
Return m_JsonLayerList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(dTime As Double, dMass As Double)
|
||||||
|
For Each Layer In Map.refTFSEditorVM.LayerList
|
||||||
|
m_JsonLayerList.Add(Layer.ConvertToJsonLayer())
|
||||||
|
Next
|
||||||
|
m_MaterialName = Map.refTopPanelVM.SelMaterial.sName
|
||||||
|
Dim GeneralCathegory As MachiningCathegory = Map.refCurrMachiningPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL)
|
||||||
|
If Not IsNothing(GeneralCathegory) Then
|
||||||
|
Dim StrandW As CurrNumericMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.STRANDW)
|
||||||
|
Dim StrandH As CurrNumericMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.STRANDH)
|
||||||
|
If Not IsNothing(StrandW) Then
|
||||||
|
m_StrandW = StrandW.dValue
|
||||||
|
End If
|
||||||
|
If Not IsNothing(StrandH) Then
|
||||||
|
m_StrandH = StrandH.dValue
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
m_dTime = dTime
|
||||||
|
m_dMass = dMass
|
||||||
|
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
|
||||||
|
Dim b3Print As BBox3d = Map.refDispositionPanelVM.GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
|
||||||
|
m_BoxX = b3Print.DimX
|
||||||
|
m_BoxY = b3Print.DimY
|
||||||
|
m_BoxZ = b3Print.DimZ
|
||||||
|
End If
|
||||||
|
m_LayerQty = Map.refSliderManagerVM.nLayerIndex_Maximum
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class JsonLayer
|
||||||
|
Private m_nIndex As Integer
|
||||||
|
Public ReadOnly Property Index As Integer
|
||||||
|
Get
|
||||||
|
Return m_nIndex
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dLength As Double
|
||||||
|
Public ReadOnly Property Length As Double
|
||||||
|
Get
|
||||||
|
Return m_dLength
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dTMin As Double
|
||||||
|
Public ReadOnly Property TMin As Double
|
||||||
|
Get
|
||||||
|
Return m_dTMin
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dTTrg As Double
|
||||||
|
Public ReadOnly Property TTrg As Double
|
||||||
|
Get
|
||||||
|
Return m_dTTrg
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dTMax As Double
|
||||||
|
Public ReadOnly Property TMax As Double
|
||||||
|
Get
|
||||||
|
Return m_dTMax
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dTCurr As Double
|
||||||
|
Public ReadOnly Property TCurr As Double
|
||||||
|
Get
|
||||||
|
Return m_dTCurr
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dTWait As Double
|
||||||
|
Public ReadOnly Property TWait As Double
|
||||||
|
Get
|
||||||
|
Return m_dTWait
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dFMin As Double
|
||||||
|
Public ReadOnly Property FMin As Double
|
||||||
|
Get
|
||||||
|
Return m_dFMin
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dFTrg As Double
|
||||||
|
Public ReadOnly Property FTrg As Double
|
||||||
|
Get
|
||||||
|
Return m_dFTrg
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dFMax As Double
|
||||||
|
Public ReadOnly Property FMax As Double
|
||||||
|
Get
|
||||||
|
Return m_dFMax
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dFCurr As Double
|
||||||
|
Public ReadOnly Property FCurr As Double
|
||||||
|
Get
|
||||||
|
Return m_dFCurr
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dSpeed As Double
|
||||||
|
Public ReadOnly Property Speed As Double
|
||||||
|
Get
|
||||||
|
Return m_dSpeed
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(nIndex As Integer, dLength As Double, dTMin As Double, dTTrg As Double, dTMax As Double, dTCurr As Double, dTWait As Double, dFMin As Double, dFTrg As Double, dFMax As Double, dFCurr As Double, dSpeed As Double)
|
||||||
|
m_nIndex = nIndex
|
||||||
|
m_dLength = dLength
|
||||||
|
m_dTMin = dTMin
|
||||||
|
m_dTTrg = dTTrg
|
||||||
|
m_dTMax = dTMax
|
||||||
|
m_dTCurr = dTCurr
|
||||||
|
m_dTWait = dTWait
|
||||||
|
m_dFMin = dFMin
|
||||||
|
m_dFTrg = dFTrg
|
||||||
|
m_dFMax = dFMax
|
||||||
|
m_dFCurr = dFCurr
|
||||||
|
m_dSpeed = dSpeed
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -115,4 +115,18 @@ Module LuaExec
|
|||||||
Return bOk
|
Return bOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Friend Function ExecPrepare3dmExport(ByRef nExportGeomId As Integer) As Boolean
|
||||||
|
Dim bOk As Boolean = True
|
||||||
|
EgtLuaCreateGlobTable("PRINT")
|
||||||
|
EgtLuaSetGlobStringVar("PRINT.BASEDIR", Map.refMainWindowVM.MainWindowM.s3dPrintingDir)
|
||||||
|
bOk = EgtLuaExecFile(Map.refMainWindowVM.MainWindowM.s3dPrintingDir & "\PrepareExport.lua")
|
||||||
|
If bOk Then
|
||||||
|
EgtLuaGetGlobIntVar("PRINT.EXPORTLAYER", nExportGeomId)
|
||||||
|
End If
|
||||||
|
' Cancello tavola globale
|
||||||
|
EgtLuaResetGlobVar("PRINT")
|
||||||
|
Return bOk
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
End Module
|
End Module
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ Public Class ViewLayerManagerVM
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
' Creo riferimento a questa classe in EgtCAM5Map
|
' Creo riferimento a questa classe in Map
|
||||||
Map.SetRefViewLayerManagerVM(Me)
|
Map.SetRefViewLayerManagerVM(Me)
|
||||||
m_LayerList = New ObservableCollection(Of ViewLayer)({New ViewLayer(ViewLayer.ViewLayerType.PRINT_SOLID, "Print", True),
|
m_LayerList = New ObservableCollection(Of ViewLayer)({New ViewLayer(ViewLayer.ViewLayerType.PRINT_SOLID, "Print", True),
|
||||||
New ViewLayer(ViewLayer.ViewLayerType.REFERENCE, "Origin Point", True),
|
New ViewLayer(ViewLayer.ViewLayerType.REFERENCE, "Origin Point", True),
|
||||||
@@ -150,8 +150,8 @@ Public Class ViewLayer
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub UpdateVisibility(bIsVisible As Boolean)
|
Friend Sub UpdateVisibility(bIsVisible As Boolean)
|
||||||
' Disabilito segnalazione modificato
|
Dim DisableMgr As New DisableModifiedMgr
|
||||||
Dim DisableMgr As New DisableModifiedMgr ' se solidi
|
' se solidi
|
||||||
If m_Type = ViewLayerType.SOLID_SLICE Then
|
If m_Type = ViewLayerType.SOLID_SLICE Then
|
||||||
If Map.refSceneHostVM.MainController.GetStep() = 0 Then
|
If Map.refSceneHostVM.MainController.GetStep() = 0 Then
|
||||||
' aggiorno parametro di calcolo solidi sui pezzi
|
' aggiorno parametro di calcolo solidi sui pezzi
|
||||||
@@ -242,7 +242,6 @@ Public Class ViewLayer
|
|||||||
Next
|
Next
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
' Ripristino stato segnalazione modifica
|
|
||||||
DisableMgr.ReEnable()
|
DisableMgr.ReEnable()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Ionic.Zip" version="1.9.1.8" targetFramework="net472" />
|
<package id="Ionic.Zip" version="1.9.1.8" targetFramework="net472" />
|
||||||
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
|
||||||
</packages>
|
</packages>
|
||||||
Reference in New Issue
Block a user