Merge branch 'Feature/Icarus'

This commit is contained in:
Emmanuele Sassi
2022-09-29 21:25:12 +02:00
3 changed files with 33 additions and 3 deletions
+2 -2
View File
@@ -203,7 +203,7 @@ end
function RunCalcSolids.Exec()
local nPartIndex = 1
local nPartId = EgtGetFirstNameInGroup( GDB_ID.ROOT, PART .. nPartIndex)
local nPartId = EgtGetFirstNameInGroup( GDB_ID.ROOT, PART .. nPartIndex) or EgtGetFirstNameInGroup( GDB_ID.ROOT, PART)
while nPartId do
if EgtGetInfo( nPartId, KEY_PART_ON_TABLE, 'b') then
@@ -295,7 +295,7 @@ function RunCalcSolids.Exec()
end
nPartIndex = nPartIndex + 1
nPartId = EgtGetFirstNameInGroup( GDB_ID.ROOT, PART .. nPartIndex)
nPartId = EgtGetFirstNameInGroup( GDB_ID.ROOT, PART .. nPartIndex) or EgtGetNextName( nPartId, PART)
end
end
+26 -1
View File
@@ -23,6 +23,9 @@ end
---------------------------------------------------------------------
function RunGcodeGenerate.Exec()
-- aggiorno interfaccia
EgtProcessEvents( 501, 0)
-- Recupero il pezzo (per ora primo e unico)
local nPartIndex = 1
local nPartId = EgtGetFirstNameInGroup( GDB_ID.ROOT, PART .. nPartIndex) or EgtGetFirstNameInGroup( GDB_ID.ROOT, PART)
@@ -41,6 +44,9 @@ function RunGcodeGenerate.Exec()
-- Recupero i parametri relativi al layer
local LayerParams = GetLayerParamsForGcodeGenerate( nPartId)
-- aggiorno interfaccia
EgtProcessEvents( 505, 0)
-- Ciclo sui layer
local vEntId = {}
for nIdx = 1, #vLayIds do
@@ -50,7 +56,7 @@ function RunGcodeGenerate.Exec()
-- recupero il gruppo dei percorsi utensile
local nTpathGrpId = EgtGetFirstNameInGroup( nCrvGrpId, TOOLPATH_GRP)
if not nTpathGrpId then
EgtOutBox( 'Error missing toolpaths', 'GcodeGenerate')
EgtOutBox( 'Error missing toolpaths', 'GcodeGenerate')
return
end
-- recupero le entità nel gruppo
@@ -68,6 +74,9 @@ function RunGcodeGenerate.Exec()
return
end
-- aggiorno interfaccia
EgtProcessEvents( 510, 0)
-- Imposto gruppo di lavoro
EgtSetCurrMachGroup()
@@ -87,6 +96,9 @@ function RunGcodeGenerate.Exec()
return
end
-- aggiorno interfaccia
EgtProcessEvents( 520, 0)
EgtSetMachiningGeometry( vEntId)
local sNotes = EgtAdjustNotes( '', 'LinkZup', LayerParams.LinkZup)
@@ -103,12 +115,18 @@ function RunGcodeGenerate.Exec()
return
end
-- aggiorno interfaccia
EgtProcessEvents( 550, 0)
-- Salvo il progetto
local sFilePath = EgtGetCurrFilePath()
sFilePath = EgtChangePathExtension( sFilePath, 'nge')
EgtSetCurrFilePath( sFilePath)
EgtSaveFile()
-- aggiorno interfaccia
EgtProcessEvents( 580, 0)
-- Genero il programma CN
local sInfo = 'EgtCAM5 ver.' .. EgtGetExeVersion() .. ' - ' .. sPath
local bGenOk = EgtGenerate( '', sInfo)
@@ -116,6 +134,9 @@ function RunGcodeGenerate.Exec()
EgtEstimate('')
end
-- aggiorno interfaccia
EgtProcessEvents( 590, 0)
EgtResetCurrMachGroup()
if PRINT and PRINT.PROGRAM == 1 then
@@ -131,6 +152,10 @@ function RunGcodeGenerate.Exec()
EgtOutBox( 'Generation failed.', 'GcodeGeneration', 'ERROR')
end
end
-- aggiorno interfaccia
EgtProcessEvents( 600, 0)
end
---------------------------------------------------------------------
+5
View File
@@ -57,6 +57,9 @@ function RunMachParamFromSWCalc.Exec()
local dSliceStep = EgtGetInfo( nPartId, KEY_SLICE_STEP, 'd')
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')
-- ciclo sui layer
local nLayerIndex = 1
local nLayerId = EgtGetFirstNameInGroup( nPartId, SLICE_LAYER .. nLayerIndex)
@@ -166,6 +169,8 @@ function RunMachParamFromSWCalc.Exec()
EgtSetInfo( nLayerResultId, KEY_FCUR, dLayerFeed)
EgtSetInfo( nLayerResultId, KEY_LENGTH, dTotLayerLength)
EgtSetInfo( nLayerResultId, KEY_SPEED, dSpeed)
-- aggiorno interfaccia
EgtProcessEvents( 400 + ( nLayerIndex / nLayerQty * 100), 0)
nLayerIndex = nLayerIndex + 1
nLayerId = EgtGetFirstNameInGroup( nPartId, SLICE_LAYER .. nLayerIndex)
end