5e2cbcc9dd
Prima versione macchina derivata da Essetre-90480025
45 lines
1.1 KiB
Lua
45 lines
1.1 KiB
Lua
-- 2018/11/21 16:30:00
|
|
-- Machining Init for Essetre-FAST machine
|
|
|
|
-- Intestazioni
|
|
require( 'EgtBase')
|
|
_ENV = EgtProtectGlobal()
|
|
EgtEnableDebug( false)
|
|
|
|
--------------------------------------------------------------------------------
|
|
-- *** Ingresso in Lavorazioni ***
|
|
|
|
-- Rendo visibile il pezzo e le geometrie aggiunte, nascondo il Box
|
|
local function ProcessPart( PartId)
|
|
-- nascondo il Box
|
|
EgtSetStatus( EgtGetFirstNameInGroup( PartId, 'Box') or GDB_ID.NULL, GDB_ST.OFF)
|
|
end
|
|
|
|
-- Disabilito segnalazione modifica progetto
|
|
local bEnMod = EgtGetEnableModified()
|
|
EgtDisableModified()
|
|
|
|
-- Processo i pezzi nella radice
|
|
local PartId = EgtGetFirstPart()
|
|
while PartId do
|
|
ProcessPart( PartId)
|
|
PartId = EgtGetNextPart( PartId)
|
|
end
|
|
|
|
-- Processo i pezzi già nei gruppi di lavoro (quando appena lanciata Process)
|
|
local GhostId = EgtGetFirstGhostPart()
|
|
while GhostId do
|
|
local PartId = EgtGetInfo( GhostId, GDB_SI.SOURCE, 'i')
|
|
if PartId then
|
|
ProcessPart( PartId)
|
|
end
|
|
GhostId = EgtGetNextGhostPart( GhostId)
|
|
end
|
|
|
|
-- Ripristino segnalazione modifica progetto
|
|
if bEnMod then
|
|
EgtEnableModified()
|
|
end
|
|
|
|
MACH.ERR = 0
|