DataBeam :

- aggiunto calcolo del solido della trave tramite operatori booleani su Stm.
This commit is contained in:
Dario Sassi
2019-11-23 17:53:31 +00:00
parent 309be3d7a7
commit 8ce7008a76
5 changed files with 103 additions and 5 deletions
+18 -2
View File
@@ -1,4 +1,4 @@
-- DisableFeatures.lua by Egaltech s.r.l. 2018/04/25
-- DisableFeatures.lua by Egaltech s.r.l. 2019/11/22
-- Gestione disabilitazione delle feature selezionate
-- Intestazioni
@@ -10,11 +10,15 @@ if EgtGetSelectedObjCount() == 0 then
EgtOutBox( 'Nessuna lavorazione selezionata', 'Disabilita lavorazioni', 'ERROR')
end
-- Elenco dei pezzi interessati
local vParts = {}
-- Disabilito features selezionate
local nId = EgtGetFirstSelectedObj()
while nId do
-- verifico sia una feature
local nParentId = EgtGetParent( nId)
if EgtIsLayer( nParentId) and EgtGetName( nParentId) == 'Processings' and
if EgtIsLayer( nParentId or GDB_ID.NULL) and EgtGetName( nParentId) == 'Processings' and
EgtGetInfo( nId, 'GRP', 'i') and EgtGetInfo( nId, 'PRC', 'i') then
EgtSetInfo( nId, 'DO', 0)
EgtSetColor( nId, Color3d( 160, 160, 160))
@@ -22,10 +26,22 @@ while nId do
if nAuxId then
EgtSetColor( nId + nAuxId, Color3d( 160, 160, 160))
end
table.insert( vParts, EgtGetParent( nParentId))
end
nId = EgtGetNextSelectedObj()
end
-- Cancello eventuale solido dei pezzi interessati
table.sort( vParts)
local PrevPartId = GDB_ID.NULL
for i = 1, #vParts do
if vParts[i] ~= PrevPartId then
local SolidLy = EgtGetFirstNameInGroup( vParts[i], 'Solid')
EgtErase( SolidLy or GDB_ID.NULL)
PrevPartId = vParts[i]
end
end
EgtDeselectAll()
EgtZoom( SCE_ZM.ALL)