3dPrinting :
- gestita interruzione degli script.
This commit is contained in:
@@ -69,8 +69,8 @@ function RunMachParamFromSWCalc.Exec()
|
||||
local dStrand = EgtGetInfo( nPartId, KEY_STRAND, 'd')
|
||||
local dStrandCount = EgtGetInfo( nPartId, KEY_SHELLS_NBR, 'd')
|
||||
-- recupero numero di strati per progress
|
||||
local nLastLayerId = EgtGetLastNameInGroup( nPartId, SLICE_LAYER .. '*')
|
||||
local nLayerQty = EgtGetInfo( nLastLayerId, KEY_SLICE_NBR, 'i')
|
||||
local nLastLayerId = EgtGetLastNameInGroup( nPartId, SLICE_LAYER .. '*') or GDB_ID.NULL
|
||||
local nLayerQty = EgtGetInfo( nLastLayerId, KEY_SLICE_NBR, 'i') or 0
|
||||
-- ciclo sui layer
|
||||
local nLayerIndex = 1
|
||||
local nLayerId = EgtGetFirstNameInGroup( nPartId, SLICE_LAYER .. nLayerIndex) or EgtGetFirstNameInGroup( nPartId, "__" .. SLICE_LAYER .. nLayerIndex)
|
||||
@@ -210,7 +210,11 @@ function RunMachParamFromSWCalc.Exec()
|
||||
EgtSetInfo( nLayerResultId, KEY_MF, dMF)
|
||||
EgtSetInfo( nLayerResultId, KEY_TOTAREA, dTotLayerArea)
|
||||
-- aggiorno interfaccia
|
||||
EgtProcessEvents( 500 + ( nLayerIndex / nLayerQty * 100), 0)
|
||||
if EgtProcessEvents( 500 + ( nLayerIndex / nLayerQty * 100), 0) == 1 then
|
||||
EgtEmptyGroup( nResultLayerId)
|
||||
return
|
||||
end
|
||||
|
||||
nLayerIndex = nLayerIndex + 1
|
||||
nLayerId = EgtGetFirstNameInGroup( nPartId, SLICE_LAYER .. nLayerIndex) or EgtGetFirstNameInGroup( nPartId, "__" .. SLICE_LAYER .. nLayerIndex)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user