From 1cbd3dd5431e9da5e56dc58b25d4b85b08d7caa3 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 23 Oct 2025 08:20:35 +0200 Subject: [PATCH] =?UTF-8?q?DataDoors=202.7j2=20:=20-=20in=20Groove=20BOXGR?= =?UTF-8?q?OOVE=20=C3=A8=20limitato=20alla=20sola=20parte=20che=20intersec?= =?UTF-8?q?a=20la=20porta=20(per=20evitare=20problemi=20successivi=20con?= =?UTF-8?q?=20spessore=20porta).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/Groove.lua | 29 +++++++++++++++++++---------- Version.lua | 4 ++-- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/LuaLibs/Groove.lua b/LuaLibs/Groove.lua index ee08b57..f628e72 100644 --- a/LuaLibs/Groove.lua +++ b/LuaLibs/Groove.lua @@ -1,4 +1,4 @@ --- Groove.lua by EgalWare s.r.l. 2025.10.19 +-- Groove.lua by EgalWare s.r.l. 2025.10.22 -- Groove dati i valori 'L' e 'H' e 'T' e 'd' e 'p' e con nomi attributi -- 2016.09.21 V1.011 FM aggiunta messaggi di wanrning @@ -28,6 +28,7 @@ -- when blade is enables, get the mill max thickness as blade thickness in case mill is used instead blade -- 2025.01.20 V2.008 FM Manage a new .slb parameter to set to force use 1 blade for machining LH side. -- 2025.10.19 V2.7j1 DS Aggiunto BOXGROOVE anche nel caso di lama sul top della porta. +-- 2025.10.22 V2.7j2 DS Il box precedente รจ limitato alla sola parte che interseca la porta (per evitare problemi successivi con spessore porta). -- Tavola per definizione modulo (serve ma non usata) local Groove = {} @@ -1689,16 +1690,24 @@ function Groove.Draw( tOHead, bPreview, bRunByCompo, nDrawMach, dThickDoor) end -- se groove sul top della porta, creo la geometria che ne rappresenta l'ingombro (per poi verificare eventuale collisione con ventose) if EC == 0 and DGD.SIDE == 'top' and nDrawMach > 0 then - -- setto la griglia front - EgtSetGridFrame( Frame3d( 0, 0, 0, GDB_FR.FRONT)) - GId = EgtRectangle2P( Lg, Point3d( -((dWidthShape-d)/2), 0, H / 2), Point3d( ((dWidthShape-d)/2), -T, H / 2), GDB_RT.GRID) - if GId then - EgtInvertCurve(GId) - EgtModifyCurveThickness( GId, -H) - EgtSetName( GId, 'BOXGROOVE') + -- determino se interessa la porta + local dOffset = DGD.GROOVE_OFFSET or DGD.dT / 2 + local dMaxZ = min( dOffset + H / 2, DGD.dT) + local dMinZ = max( dOffset - H / 2, 0) + if dMaxZ > dMinZ + 0.1 then + -- setto la griglia front + EgtSetGridFrame( Frame3d( 0, 0, 0, GDB_FR.FRONT)) + local dPosZ = dMaxZ - dOffset + local dHeight = dMaxZ - dMinZ + GId = EgtRectangle2P( Lg, Point3d( -((dWidthShape-d)/2), 0, dPosZ), Point3d( ((dWidthShape-d)/2), -T, dPosZ), GDB_RT.GRID) + if GId then + EgtInvertCurve(GId) + EgtModifyCurveThickness( GId, -dHeight) + EgtSetName( GId, 'BOXGROOVE') + end + -- risetto la griglia top + EgtSetGridFrame( Frame3d( 0, 0, 0, GDB_FR.TOP)) end - -- risetto la griglia top - EgtSetGridFrame( Frame3d( 0, 0, 0, GDB_FR.TOP)) end end end diff --git a/Version.lua b/Version.lua index dbb593b..c2873ca 100644 --- a/Version.lua +++ b/Version.lua @@ -1,6 +1,6 @@ --- Version.lua by EgalWare s.r.l. 2025/10/19 +-- Version.lua by EgalWare s.r.l. 2025/10/22 -- Gestione della versione di Doors NAME = 'Doors' -VERSION = '2.7j1' +VERSION = '2.7j2' MIN_EXE = '2.6k4'