3dPrinting :
- nuova versione compatibile con Icarus.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user