From 0c7849263c4cad632830d55dad64d93cb1fdf3aa Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 17 Dec 2025 13:09:25 +0100 Subject: [PATCH] * DataDoors 2.7l1 : - per decorazioni da disegno aggiunta gestione trim differenziati sui 4 lati tramite nota da info TrimLTHB nel layer. --- LuaLibs/ImportNgeFile.lua | 6 +++++- Main.lua | 20 ++++++++++++++------ Version.lua | 4 ++-- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/LuaLibs/ImportNgeFile.lua b/LuaLibs/ImportNgeFile.lua index 85069eb..c3a0bd2 100644 --- a/LuaLibs/ImportNgeFile.lua +++ b/LuaLibs/ImportNgeFile.lua @@ -112,6 +112,11 @@ function ImportNgeFile.Draw( CustGeomPath, CustGeomFile ) if sRot then EgtSetInfo( Lg, 'Rotate', sRot) end + -- recupero eventuali parametri di trim sui lati (lock, top, hinge, bottom) + local sTrim = EgtGetInfo( nNewLayer, 'TrimLTHB') + if sTrim then + EgtSetInfo( Lg, 'TrimLTHB', sTrim) + end -- riloco tutti i nuovi layer dal nuovo pezzo al pezzo corrente while nNewLayer do @@ -191,7 +196,6 @@ function ImportNgeFile.Draw( CustGeomPath, CustGeomFile ) -- se non ho caricato il file geom esco if not MakeFaceGeom then - -- (NOTA : se ci sono errori il componente non viene eseguito dal programma di gestione dei componenti) -- scrivo note nel layer EgtSetInfo( Lg, 'Type' , 'ImportNgeFile') diff --git a/Main.lua b/Main.lua index 8d0dc4b..47b8f0c 100644 --- a/Main.lua +++ b/Main.lua @@ -1,4 +1,4 @@ --- Main.lua by EgalWare s.r.l. 2025.11.21 +-- Main.lua by EgalWare s.r.l. 2025.12.16 -- 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 @@ -113,6 +113,7 @@ -- 202x.xx.xx V3.xxx FM Manage new CurrCamInfo parameter 'WideDoorWidth' to manage large wide doors stored into new DGD.Part parameter -- 2025.05.06 v2.7e1 DS Correzione funzione SubAndDeleteTempSurf. -- 2025.10.29 v2.7j3 DS Correzione a SubAndDeleteTempSurf (aggiunto controllo esistenza regioni). +-- 2025.12.16 v2.7l1 DS Aggiunta gestione TrimLTHB per distanze dai bordi del trim decorazioni. -- Intestazioni require( 'EgtBase') @@ -6291,7 +6292,7 @@ local function MoveGeomDecoration( nGeomId, sFace, sSideLk) local dZedPos = 0 local bMirror = ( EgtGetInfo( nGeomId, 'Mirror', 'i') ~= 0) - local dRotToHinges = EgtGetInfo( nGeomId, 'Rotate', 'd') + local dRotToHinges = EgtGetInfo( nGeomId, 'Rotate', 'd') or 0 local b3Box = EgtGetBBox( nGeomId, GDB_BB.STANDARD) -- sistemo per eventuale rotazione @@ -6414,10 +6415,17 @@ local function MoveCopyDecoration( tDecoration, sSideLk, bPushDr, bImport) end nNewEnt = EgtGetNext( nNewEnt) end - -- eseguo trim con rettangolo porta aumentato di un poco - local dOffs = 20 - local frRef = Frame3d( -dOffs, -dOffs, -dOffs) - local vtDiag = Vector3d( DGD.dW + 2 * dOffs, DGD.dH + 2 * dOffs, 2 * dOffs) + -- eseguo trim con rettangolo porta aumentato di un poco (o con valori da disegno) + local dOffs, dOffL, dOffT, dOffH, dOffB = 20, 20, 20, 20, 20 + local vOffs = EgtGetInfo( tDecoration.geom, 'TrimLTHB', 'vd') + if vOffs and #vOffs >= 4 then + dOffL = vOffs[1] + dOffT = vOffs[2] + dOffH = vOffs[3] + dOffB = vOffs[4] + end + local frRef = Frame3d( -dOffL, -dOffB, -dOffs) + local vtDiag = Vector3d( DGD.dW + dOffL + dOffH, DGD.dH + dOffB + dOffT, 2 * dOffs) nNewEnt = EgtGetFirstInGroup( tDecoration.geom) while nNewEnt do local nNextEnt = EgtGetNext( nNewEnt) diff --git a/Version.lua b/Version.lua index 39ec83f..0f69fb9 100644 --- a/Version.lua +++ b/Version.lua @@ -1,6 +1,6 @@ --- Version.lua by EgalWare s.r.l. 2025/11/21 +-- Version.lua by EgalWare s.r.l. 2025/12/16 -- Gestione della versione di Doors NAME = 'Doors' -VERSION = '2.7k2' +VERSION = '2.7l1' MIN_EXE = '2.6k4'