Icarus :
- assegnazione default nuovi parametri di materiali - sistemazione esportazione 3mf/stl - assegnazione direttorio base dei file lua in esecuzione degli stessi.
This commit is contained in:
@@ -215,6 +215,7 @@ Public Class MaterialIndex
|
||||
|
||||
Friend Function GetSelMaterialData(Param As MaterialParam.Params) As Double
|
||||
Dim sParamKey As String = ""
|
||||
Dim dDefault As Double = 0
|
||||
Select Case Param
|
||||
Case MaterialParam.Params.T1
|
||||
sParamKey = MAT_T1
|
||||
@@ -228,8 +229,10 @@ Public Class MaterialIndex
|
||||
sParamKey = MAT_T5
|
||||
Case MaterialParam.Params.K_EXTRUSION
|
||||
sParamKey = MAT_KEXTRUSION
|
||||
dDefault = 100
|
||||
Case MaterialParam.Params.K_LAY_TIME
|
||||
sParamKey = MAT_KLAYERTIME
|
||||
dDefault = 100
|
||||
Case MaterialParam.Params.C1
|
||||
sParamKey = MAT_C1
|
||||
Case MaterialParam.Params.C2
|
||||
@@ -255,7 +258,7 @@ Public Class MaterialIndex
|
||||
Case MaterialParam.Params.KN
|
||||
sParamKey = MAT_KN
|
||||
End Select
|
||||
Return ReadMaterialParamDouble(m_nIndex, sParamKey, 0)
|
||||
Return ReadMaterialParamDouble(m_nIndex, sParamKey, dDefault)
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -508,8 +508,8 @@ Public Class MySceneHostVM
|
||||
.Title = "Export",
|
||||
.Filter = "Stereolithography (*.stl)|*.stl" &
|
||||
"|3D Manufacturing format (*.3mf)|*.3mf",
|
||||
.FilterIndex = 0,
|
||||
.FileName = Path.ChangeExtension(MainController.GetCurrFile(), "stl")
|
||||
.FilterIndex = 1,
|
||||
.FileName = Path.ChangeExtension(MainController.GetCurrFile(), "3mf")
|
||||
}
|
||||
Dim DialogResult As Boolean? = SaveFileDialog.ShowDialog
|
||||
If IsNothing(DialogResult) OrElse Not DialogResult Then Return
|
||||
|
||||
@@ -10,6 +10,7 @@ Module LuaExec
|
||||
If bSlice Then
|
||||
EgtLuaCreateGlobTable("PRINT")
|
||||
EgtLuaSetGlobIntVar("PRINT.PROGRAM", 1)
|
||||
EgtLuaSetGlobStringVar("PRINT.BASEDIR", Map.refMainWindowVM.MainWindowM.s3dPrintingDir)
|
||||
bOk = bOk AndAlso EgtLuaExecFile(Map.refMainWindowVM.MainWindowM.s3dPrintingDir & "\Slicing.lua")
|
||||
' Cancello tavola globale
|
||||
EgtLuaResetGlobVar("PRINT")
|
||||
@@ -29,6 +30,9 @@ Module LuaExec
|
||||
dMachiningConstant = MachiningConstant.dValue
|
||||
End If
|
||||
End If
|
||||
EgtLuaCreateGlobTable("PRINT")
|
||||
EgtLuaSetGlobIntVar("PRINT.PROGRAM", 1)
|
||||
EgtLuaSetGlobStringVar("PRINT.BASEDIR", Map.refMainWindowVM.MainWindowM.s3dPrintingDir)
|
||||
EgtLuaCreateGlobTable("MACHINING")
|
||||
EgtLuaSetGlobNumVar("MACHINING.K", dMachiningConstant)
|
||||
EgtLuaCreateGlobTable("MATERIAL")
|
||||
@@ -49,17 +53,14 @@ Module LuaExec
|
||||
' Eseguo lo script
|
||||
If EgtLuaExecFile(sExecPath) Then
|
||||
bOk = True
|
||||
'' Recupero i risultati
|
||||
'Dim nErr As Integer = 999
|
||||
'EgtLuaGetGlobIntVar("MATERIAL.ERR", nErr)
|
||||
'bOk = (nErr <= 0)
|
||||
'If Not bOk Then EgtOutLog("ExecSlice Err=" & nErr.ToString())
|
||||
Else
|
||||
EgtOutLog("Error executing Slice Exec script " & sExecPath)
|
||||
bOk = False
|
||||
End If
|
||||
' Cancello tavola globale
|
||||
EgtLuaResetGlobVar("MATERIAL")
|
||||
EgtLuaResetGlobVar("MACHINING")
|
||||
EgtLuaResetGlobVar("PRINT")
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
@@ -68,6 +69,7 @@ Module LuaExec
|
||||
' eseguo generazione
|
||||
EgtLuaCreateGlobTable("PRINT")
|
||||
EgtLuaSetGlobIntVar("PRINT.PROGRAM", 1)
|
||||
EgtLuaSetGlobStringVar("PRINT.BASEDIR", Map.refMainWindowVM.MainWindowM.s3dPrintingDir)
|
||||
Dim sIsoFilePath As String = ""
|
||||
Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE)
|
||||
If nTabPartId <> GDB_ID.NULL Then
|
||||
@@ -98,6 +100,8 @@ Module LuaExec
|
||||
EgtOutLog("-- Start ExecSolid --")
|
||||
' eseguo generazione
|
||||
EgtLuaCreateGlobTable("PRINT")
|
||||
EgtLuaSetGlobIntVar("PRINT.PROGRAM", 1)
|
||||
EgtLuaSetGlobStringVar("PRINT.BASEDIR", Map.refMainWindowVM.MainWindowM.s3dPrintingDir)
|
||||
Dim bOk As Boolean = EgtLuaExecFile(Map.refMainWindowVM.MainWindowM.s3dPrintingDir & "\CalcSolids.lua")
|
||||
If bOk Then
|
||||
Dim nErr As Integer = 999
|
||||
|
||||
Reference in New Issue
Block a user