- gestito conto separato lunghezza percorso per calcolo massa totale oggetto
This commit is contained in:
@@ -79,18 +79,24 @@ function RunMachParamFromSWCalc.Exec()
|
||||
EgtRemoveInfo( nLayerId, KEY_WAITING_TIME)
|
||||
-- calcolo lunghezza totale del layer
|
||||
local dTotLayerLength = 0
|
||||
local dTotLayerLengthForMass = 0
|
||||
local dTotLayerArea = 0
|
||||
local nCrvId = EgtGetFirstNameInGroup( nLayerId, CONTOUR_GRP .. '*')
|
||||
while nCrvId do
|
||||
local nToolPathId = EgtGetFirstNameInGroup( nCrvId, TOOLPATH_GRP)
|
||||
-- sommo lunghezze percorsi
|
||||
local dTotCrvLength = 0
|
||||
local dTotCrvLengthForMass = 0
|
||||
nShellId = EgtGetFirstInGroup( nToolPathId)
|
||||
while nShellId do
|
||||
dTotCrvLength = dTotCrvLength + EgtCurveLength( nShellId)
|
||||
if EgtGetName( nShellId) ~= WIPE_CRV then
|
||||
dTotCrvLengthForMass = dTotCrvLengthForMass + EgtCurveLength( nShellId)
|
||||
end
|
||||
nShellId = EgtGetNext( nShellId)
|
||||
end
|
||||
dTotLayerLength = dTotLayerLength + dTotCrvLength
|
||||
dTotLayerLengthForMass = dTotLayerLengthForMass + dTotCrvLengthForMass
|
||||
-- recupero area
|
||||
local nOuterCrvId = EgtGetFirstNameInGroup( nCrvId, OUTER_CRV)
|
||||
if nOuterCrvId and dStrandCount > 0.5 then
|
||||
@@ -178,7 +184,7 @@ function RunMachParamFromSWCalc.Exec()
|
||||
dLayerWait = floor( dTMin + 0.5) - floor( dLayerTime + 0.5)
|
||||
end
|
||||
-- calcolo massa dello strato
|
||||
local dLayerMass = dTotLayerLength * dSliceStep * dStrand * MATERIAL.Density * 1e-6
|
||||
local dLayerMass = dTotLayerLengthForMass * dSliceStep * dStrand * MATERIAL.Density * 1e-6
|
||||
if dLayerMass and dLayerMass > 0 then
|
||||
dPrintMass = dPrintMass + dLayerMass
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user