From 10c44c7f82b11e69a7c737b2c6b8db70b4997d00 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Thu, 26 Jun 2025 11:17:00 +0200 Subject: [PATCH 1/4] =?UTF-8?q?-=20in=20FreeContour=20si=20usa=20EdgesFace?= =?UTF-8?q?Use=20per=20scegliere=20con=20pi=C3=B9=20precisione=20in=20lato?= =?UTF-8?q?;=20manca=20gestione=20completa=20in=20caso=20di=20lavorazione?= =?UTF-8?q?=20con=20geometrie=20multiple=20(al=20momento=20si=20pu=C3=B2?= =?UTF-8?q?=20passare=20un=20lato=20solo)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/WProcessFreeContour.lua | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/LuaLibs/WProcessFreeContour.lua b/LuaLibs/WProcessFreeContour.lua index c5a4598..ceb9901 100644 --- a/LuaLibs/WProcessFreeContour.lua +++ b/LuaLibs/WProcessFreeContour.lua @@ -761,6 +761,24 @@ local function MakeLocalSurf( ptP1, ptP2, ptP3, nAddGrpId) return nFaceId end +--------------------------------------------------------------------- +local function GetEdgeToMachineFromVector( nSurfId, nFacet, vtOrtho) + local _, EdgesEgt = EgtSurfTmGetFacetOutlineInfo( nSurfId, nFacet, GDB_ID.ROOT) + + local nEdgeIndMax = 0 + local dMaxComp = - GEO.INFINITO + for i = 1, #EdgesEgt do + local vtN = -EdgesEgt[i].Norm + local dComp = vtN * vtOrtho + if dComp > dMaxComp then + nEdgeIndMax = i -1 + dMaxComp = dComp + end + end + + return nEdgeIndMax +end + --------------------------------------------------------------------- local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTypeConeCut, nAddGrpId, dToolDiam, dThick, sMilling, dOffsAng, dDepthMach, @@ -1296,6 +1314,11 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd EgtSetMachiningParam( MCH_MP.INVERT, false) -- assegno utilizzo faccia EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN) + local nEdgeFaceUse = GetEdgeToMachineFromVector( Proc.Id, vFace[i].Fac, Z_AX()) + if nEdgeFaceUse then + local sNoteEdgeFaceUse = 'EdgesFaceUse=' .. EgtNumToString( nEdgeFaceUse) .. ';' + EgtSetMachiningParam( MCH_MP.USERNOTES, sNoteEdgeFaceUse) + end -- assegno affondamento EgtSetMachiningParam( MCH_MP.DEPTH, dDepth) -- assegno lato di lavoro @@ -1449,6 +1472,13 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd EgtSetMachiningParam( MCH_MP.INVERT, false) -- assegno utilizzo faccia EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN) + if #vGeom == 1 then + local nEdgeFaceUse = GetEdgeToMachineFromVector( Proc.Id, vGeom[1][2], Z_AX()) + if nEdgeFaceUse then + local sNoteEdgeFaceUse = 'EdgesFaceUse=' .. EgtNumToString( nEdgeFaceUse) .. ';' + EgtSetMachiningParam( MCH_MP.USERNOTES, sNoteEdgeFaceUse) + end + end -- assegno affondamento EgtSetMachiningParam( MCH_MP.DEPTH, dDepth) -- assegno lato di lavoro @@ -1473,6 +1503,13 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd EgtSetMachiningParam( MCH_MP.INVERT, false) -- assegno utilizzo faccia EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN) + if #vGeom == 1 then + local nEdgeFaceUse = GetEdgeToMachineFromVector( Proc.Id, vGeom[1][2], Z_AX()) + if nEdgeFaceUse then + local sNoteEdgeFaceUse = 'EdgesFaceUse=' .. EgtNumToString( nEdgeFaceUse) .. ';' + EgtSetMachiningParam( MCH_MP.USERNOTES, sNoteEdgeFaceUse) + end + end -- assegno affondamento -- EgtSetMachiningParam( MCH_MP.DEPTH, dDepth) if bNotThrou then @@ -1566,6 +1603,11 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd EgtSetMachiningParam( MCH_MP.INVERT, false) -- assegno utilizzo faccia EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN) + local nEdgeFaceUse = GetEdgeToMachineFromVector( Proc.Id, vFace[i].Fac, Z_AX()) + if nEdgeFaceUse then + local sNoteEdgeFaceUse = 'EdgesFaceUse=' .. EgtNumToString( nEdgeFaceUse) .. ';' + EgtSetMachiningParam( MCH_MP.USERNOTES, sNoteEdgeFaceUse) + end -- assegno affondamento EgtSetMachiningParam( MCH_MP.DEPTH, dDepth) -- assegno lato di lavoro From e59ca27cdfba24487c60acd82f772604e9cb2543 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Thu, 26 Jun 2025 12:44:21 +0200 Subject: [PATCH 2/4] update versione minima --- Version.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Version.lua b/Version.lua index e5e95f1..a71a338 100644 --- a/Version.lua +++ b/Version.lua @@ -3,4 +3,4 @@ NAME = 'Wall' VERSION = '2.7f2' -MIN_EXE = '2.6k1' +MIN_EXE = '2.7f2' From 95346a26d76f907dc1db66056e5b5dd9a6057801 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Fri, 4 Jul 2025 09:46:23 +0200 Subject: [PATCH 3/4] - correzione a FreeContour.GetEdgeToMachineFromVector --- LuaLibs/WProcessFreeContour.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/LuaLibs/WProcessFreeContour.lua b/LuaLibs/WProcessFreeContour.lua index ceb9901..681fead 100644 --- a/LuaLibs/WProcessFreeContour.lua +++ b/LuaLibs/WProcessFreeContour.lua @@ -768,7 +768,10 @@ local function GetEdgeToMachineFromVector( nSurfId, nFacet, vtOrtho) local nEdgeIndMax = 0 local dMaxComp = - GEO.INFINITO for i = 1, #EdgesEgt do - local vtN = -EdgesEgt[i].Norm + local vtN = EdgesEgt[i].Norm + if EdgesEgt[i].Open then + vtN = -vtN + end local dComp = vtN * vtOrtho if dComp > dMaxComp then nEdgeIndMax = i -1 From 0bec7ba4a58710caa83c60a694778021efa25170 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 9 Jul 2025 13:07:07 +0200 Subject: [PATCH 4/4] - update version e log --- UpdateLog.txt | 3 +++ Version.lua | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/UpdateLog.txt b/UpdateLog.txt index d1f655f..e336bd0 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,5 +1,8 @@ ==== Wall Update Log ==== +Versione 2.7g1 (09/07/2025) +- Fixed : in FreeContour corretta scelta del lato da lavorare in caso si abbiano lati inclinati + Versione 2.7f2 (06/06/2025) - Fixed : in Lapjoint migliorie alle svuotature diff --git a/Version.lua b/Version.lua index a71a338..6c4dd20 100644 --- a/Version.lua +++ b/Version.lua @@ -2,5 +2,5 @@ -- Gestione della versione di Wall NAME = 'Wall' -VERSION = '2.7f2' +VERSION = '2.7g1' MIN_EXE = '2.7f2'