3dPrinting :

- nuova versione compatibile con Icarus.
This commit is contained in:
DarioS
2022-09-14 09:01:32 +02:00
parent c1ece8995c
commit d0928b9842
4 changed files with 28 additions and 7 deletions
+11 -2
View File
@@ -1,4 +1,4 @@
-- CalcMachParam.lua by Egaltech s.r.l. 2022/08/07
-- CalcMachParam.lua by Egaltech s.r.l. 2022/09/14
-- Calcolo dei parametri di stampa
-- Intestazioni
@@ -34,6 +34,8 @@ end
local sMachIni = EgtGetCurrMachineDir() .. '\\' .. EgtGetCurrMachineName() .. '.ini'
local dSMin = tonumber( EgtGetStringFromIni( SEC_3DPRINTING, KEY_SPEED_MIN, 0, sMachIni))
local dSMax = tonumber( EgtGetStringFromIni( SEC_3DPRINTING, KEY_SPEED_MAX, 50000, sMachIni))
-- massa materiale utilizzato
local dPrintMass = 0
-- massimo indice di layer calcolato
local nMaxIndex = 0
-- ciclo sui pezzi
@@ -133,10 +135,15 @@ while nPartId do
dLayerFeed = ( MATERIAL.C1 * pow( ( dSpeed / ( 1 + MATERIAL.K)), MATERIAL.C2)) * 1000 / ( ( dStrand - dSliceStep) * dSliceStep + pi * pow( dSliceStep / 2, 2))
dLayerTime = dTotLayerLength / dLayerFeed * 60
end
-- calcolo massa dello strato
local dLayerMass = dTotLayerLength * dSliceStep * dStrand * MATERIAL.Density * 1e-6
if dLayerMass and dLayerMass > 0 then
dPrintMass = dPrintMass + dLayerMass
end
-- scrivo info feed e speed in group toolpath
nCrvId = EgtGetFirstNameInGroup( nLayerId, CONTOUR_GRP .. '*')
while nCrvId do
local nToolPathId = EgtGetFirstNameInGroup( nCrvId, TOOLPATH_GRP)
local nToolPathId = EgtGetFirstNameInGroup( nCrvId, TOOLPATH_GRP) or GDB_ID.NULL
EgtSetInfo( nToolPathId, KEY_FEED, dLayerFeed)
EgtSetInfo( nToolPathId, KEY_SPEED, dSpeed)
nCrvId = EgtGetNextName( nCrvId, CONTOUR_GRP .. '*')
@@ -160,3 +167,5 @@ while nPartId do
nPartId = EgtGetNextPart( nPartId)
::continue::
end
-- imposto massa totale
EgtSetInfo( nResultLayerId, KEY_MASS, dPrintMass)