DataDoors 2.7e4 :

- altre modifiche per decoro Krepa di DoorArreda (comportamento speciale controllato da info nel file del disegno della decorazione).
This commit is contained in:
Dario Sassi
2025-05-25 21:44:05 +02:00
parent c608187245
commit e44f5fae57
3 changed files with 32 additions and 3 deletions
+25 -1
View File
@@ -1,4 +1,4 @@
-- Main.lua by EgalWare s.r.l. 2025.05.06
-- Main.lua by EgalWare s.r.l. 2025.05.26
-- Main creazione porte da descrizione DDF
-- 2016.09.07 V1.001 FM Modificata gestione flush bolt
-- 2016.09.14 V1.002 FM Aggiunta gestione log file
@@ -6281,8 +6281,32 @@ local function MoveGeomDecoration( nGeomId, sFace, sSideLk)
local dZedPos = 0
local bMirror = ( EgtGetInfo( nGeomId, 'Mirror', 'i') ~= 0)
local dRotToHinges = EgtGetInfo( nGeomId, 'Rotate', 'd')
local b3Box = EgtGetBBox( nGeomId, GDB_BB.STANDARD)
EgtOutLog( 'Decoration Box 1 ='.. tostring( b3Box))
-- sistemo per eventuale rotazione
if not bMirror and abs( dRotToHinges) > GEO.EPS_ANG_SMALL then
-- eseguo rotazione
local dAngRot = EgtIf( sSideLk == 'L', -dRotToHinges, dRotToHinges)
if string.lower( sFace) == 'secure' then dAngRot = -dAngRot end
local nNewEnt = EgtGetFirstInGroup( nGeomId)
while nNewEnt do
EgtRotate( nNewEnt, b3Box:getCenter(), Z_AX(), dAngRot)
nNewEnt = EgtGetNext( nNewEnt)
end
local b3NewBox = EgtGetBBox( nGeomId, GDB_BB.STANDARD)
-- riporto in posizione
local vtMove = b3Box:getMin() - b3NewBox:getMin()
nNewEnt = EgtGetFirstInGroup( nGeomId)
while nNewEnt do
EgtMove( nNewEnt, vtMove)
nNewEnt = EgtGetNext( nNewEnt)
end
-- aggiorno box
b3Box = EgtGetBBox( nGeomId, GDB_BB.STANDARD)
end
EgtOutLog( 'Decoration Box 2 ='.. tostring( b3Box))
if string.lower( sFace) == 'keyway' then -- se specificato face su lato keyway (davanti)
dZedPos = DGD.dT