3dPrinting :

- modifiche progress bar.
This commit is contained in:
SaraP
2022-10-03 16:08:25 +02:00
parent 5e65055e86
commit a94474869c
6 changed files with 24 additions and 20 deletions
+1 -1
View File
@@ -1518,7 +1518,7 @@ function CalcPaths.Exec( nPartId)
end
end
if EgtProcessEvents( EgtIf( PRINT, 100, 0) + nIdx / #vLayIds * 100, 0) == 1 then
if EgtProcessEvents( EgtIf( PRINT, 200, 0) + nIdx / #vLayIds * 100, 0) == 1 then
EgtDraw()
return
end
+9 -5
View File
@@ -335,8 +335,12 @@ function CalcSlices.Exec( nPartId, nStmId, HMax)
local nRecalc = 0
local dDeltaZStart = 0.2
--dDeltaZStart = 0
local vZSlices = ComputeZSlices( dZmin, dDeltaZStart, dZmax)
local nLayId = EgtParPlanesSurfTmInters( ORIG(), vtSlicing, vZSlices, nStmId, nPartId, GDB_RT.GLOB, TOLER)
if EgtProcessEvents( 1, 0) == 1 then return end
local nLayId = EgtParPlanesSurfTmInters( ORIG(), vtSlicing, vZSlices, nStmId, nPartId, GDB_RT.GLOB, TOLER)
if EgtProcessEvents( 100, 0) == 1 then return end
local vErr = {}
local vPrevCen = {}
-- scorro i risultati dello slicing
@@ -561,7 +565,7 @@ function CalcSlices.Exec( nPartId, nStmId, HMax)
end
-- passo al layer successivo
if EgtProcessEvents( nLayCnt / ( #vZSlices + 3) * 100, 0) == 1 then
if EgtProcessEvents( EgtIf( PRINT, 100, 0) + nLayCnt / ( #vZSlices + 3) * 100, 0) == 1 then
EgtDraw()
return
end
@@ -574,14 +578,14 @@ function CalcSlices.Exec( nPartId, nStmId, HMax)
if nRibsLay then
SlicingExtraObjects( vtSlicing, nRibsLay, TYPE.RIB, RIBS_GRP, RIBS_CRV)
end
if EgtProcessEvents( ( #vZSlices + 1) / ( #vZSlices + 3) * 100, 0) == 1 then return end
if EgtProcessEvents( EgtIf( PRINT, 100, 0) + ( #vZSlices + 1) / ( #vZSlices + 3) * 100, 0) == 1 then return end
-- solidi per regioni con diverso numero di passate
local nShellNbrLay = EgtGetFirstNameInGroup( s_nPartId, LAY_SHELL_NBR)
if nShellNbrLay then
SlicingExtraObjects( vtSlicing, nShellNbrLay, TYPE.EXTRA_SHELL, SHELL_NBR_GRP, SHELL_NBR_CRV)
end
if EgtProcessEvents( ( #vZSlices + 2) / ( #vZSlices + 3) * 100, 0) == 1 then return end
if EgtProcessEvents( EgtIf( PRINT, 100, 0) + ( #vZSlices + 2) / ( #vZSlices + 3) * 100, 0) == 1 then return end
-- solidi ausiliari
local nAuxSolidsLay = EgtGetFirstNameInGroup( s_nPartId, LAY_AUX_SOLIDS)
@@ -589,7 +593,7 @@ function CalcSlices.Exec( nPartId, nStmId, HMax)
AdjustAuxSolids( nAuxSolidsLay)
SlicingExtraObjects( vtSlicing, nAuxSolidsLay, TYPE.AUX_SOLID, AUX_SOLIDS_GRP, AUX_SOLIDS_CRV)
end
if EgtProcessEvents( ( #vZSlices + 3) / ( #vZSlices + 3) * 100, 0) == 1 then return end
if EgtProcessEvents( EgtIf( PRINT, 100, 0) + ( #vZSlices + 3) / ( #vZSlices + 3) * 100, 0) == 1 then return end
-- eventuale segnalazione errori
if #vErr > 0 then
+1 -1
View File
@@ -1050,7 +1050,7 @@ function CalcToolPath.Exec( nPartId)
nCrvGrpId = EgtGetNextName( nCrvGrpId, CONTOUR_GRP.."*")
end
if EgtProcessEvents( EgtIf( PRINT, 200, 0) + nIdx / #vLayIds * 100, 0) == 1 then
if EgtProcessEvents( EgtIf( PRINT, 300, 0) + nIdx / #vLayIds * 100, 0) == 1 then
EgtDraw()
return
end
+4 -4
View File
@@ -258,9 +258,9 @@ function RunCalcSolids.Exec()
-- processo gli eventi
if ( nIdx % 20) == 0 then
EgtDraw()
if EgtProcessEvents( nIdx / #vLayIds * 100, 0) == 1 then
return
end
-- if EgtProcessEvents( nIdx / #vLayIds * 100, 0) == 1 then
-- return
-- end
end
end
@@ -268,7 +268,7 @@ function RunCalcSolids.Exec()
nCrvGrpId = EgtGetNextName( nCrvGrpId, CONTOUR_GRP.."*") or GDB_ID.NULL
end
EgtDraw()
if EgtProcessEvents( EgtIf( PRINT, 300, 0) + nIdx / #vLayIds * 100, 0) == 1 then
if EgtProcessEvents( EgtIf( PRINT, 400, 0) + nIdx / #vLayIds * 100, 0) == 1 then
return
end
end
+8 -8
View File
@@ -24,7 +24,7 @@ end
function RunGcodeGenerate.Exec()
-- aggiorno interfaccia
EgtProcessEvents( 501, 0)
EgtProcessEvents( 601, 0)
-- Recupero il pezzo (per ora primo e unico)
local nPartIndex = 1
@@ -45,7 +45,7 @@ function RunGcodeGenerate.Exec()
local LayerParams = GetLayerParamsForGcodeGenerate( nPartId)
-- aggiorno interfaccia
EgtProcessEvents( 505, 0)
EgtProcessEvents( 605, 0)
-- Ciclo sui layer
local vEntId = {}
@@ -75,7 +75,7 @@ function RunGcodeGenerate.Exec()
end
-- aggiorno interfaccia
EgtProcessEvents( 510, 0)
EgtProcessEvents( 610, 0)
-- Imposto gruppo di lavoro
EgtSetCurrMachGroup()
@@ -97,7 +97,7 @@ function RunGcodeGenerate.Exec()
end
-- aggiorno interfaccia
EgtProcessEvents( 520, 0)
EgtProcessEvents( 620, 0)
EgtSetMachiningGeometry( vEntId)
@@ -116,7 +116,7 @@ function RunGcodeGenerate.Exec()
end
-- aggiorno interfaccia
EgtProcessEvents( 550, 0)
EgtProcessEvents( 650, 0)
-- Salvo il progetto
local sFilePath = EgtGetCurrFilePath()
@@ -125,7 +125,7 @@ function RunGcodeGenerate.Exec()
EgtSaveFile()
-- aggiorno interfaccia
EgtProcessEvents( 580, 0)
EgtProcessEvents( 680, 0)
-- Genero il programma CN
local sInfo = 'EgtCAM5 ver.' .. EgtGetExeVersion() .. ' - ' .. sPath
@@ -135,7 +135,7 @@ function RunGcodeGenerate.Exec()
end
-- aggiorno interfaccia
EgtProcessEvents( 590, 0)
EgtProcessEvents( 690, 0)
EgtResetCurrMachGroup()
@@ -154,7 +154,7 @@ function RunGcodeGenerate.Exec()
end
-- aggiorno interfaccia
EgtProcessEvents( 600, 0)
EgtProcessEvents( 700, 0)
end
+1 -1
View File
@@ -170,7 +170,7 @@ function RunMachParamFromSWCalc.Exec()
EgtSetInfo( nLayerResultId, KEY_LENGTH, dTotLayerLength)
EgtSetInfo( nLayerResultId, KEY_SPEED, dSpeed)
-- aggiorno interfaccia
EgtProcessEvents( 400 + ( nLayerIndex / nLayerQty * 100), 0)
EgtProcessEvents( 500 + ( nLayerIndex / nLayerQty * 100), 0)
nLayerIndex = nLayerIndex + 1
nLayerId = EgtGetFirstNameInGroup( nPartId, SLICE_LAYER .. nLayerIndex) or EgtGetFirstNameInGroup( nPartId, "__" .. SLICE_LAYER .. nLayerIndex)
end