3dPrinting :

- in Generazione Cn si genera anche il codice e si rimane in Disegna
- in Posizionamento Pezzo si inserisce il punto di Inizio dopo la creazione del grezzo.
This commit is contained in:
DarioS
2022-05-20 11:20:49 +02:00
parent bc3c3176bb
commit 33e461b914
2 changed files with 36 additions and 13 deletions
+27 -2
View File
@@ -1,4 +1,4 @@
-- RunGcodeGenerate.lua by Egaltech s.r.l. 2022/04/11
-- RunGcodeGenerate.lua by Egaltech s.r.l. 2022/05/19
-- Calcoli prima fase per Stampa 3d
-- Tabella per definizione modulo
@@ -68,9 +68,19 @@ function RunGcodeGenerate.Exec()
return
end
-- Aggiungo la lavorazione
-- Imposto gruppo di lavoro
EgtSetCurrMachGroup()
-- Assegno il nome del file CN
local MchGrpId = EgtGetCurrMachGroup()
local sPath = EgtGetCurrFilePath()
local sDir, sName, sExt = EgtSplitPath( sPath)
EgtSetInfo( MchGrpId, 'NcName', sName..'.cnc')
-- Rimuovo eventuali precedenti lavorazioni
EgtRemoveAllOperations()
-- Aggiungo la lavorazione
local nMchId = EgtAddMachining( 'Extrusion 1', 'Extrusion')
if not nMchId then
EgtOutBox( 'Error adding Extrusion', 'GcodeGenerate')
@@ -86,6 +96,21 @@ function RunGcodeGenerate.Exec()
EgtOutBox( 'Error applying Extrusion', 'GcodeGenerate')
return
end
-- Salvo il progetto
EgtSaveFile()
-- Genero il programma CN
local sInfo = 'EgtCAM5 ver.' .. EgtGetExeVersion() .. ' - ' .. sPath
local bGenOk = EgtGenerate( '', sInfo)
EgtResetCurrMachGroup()
if bGenOk then
EgtOutBox( 'Generation successful.', 'GcodeGeneration', 'INFO')
else
EgtOutBox( 'Generation failed.', 'GcodeGeneration', 'ERROR')
end
end
---------------------------------------------------------------------