From 6513e75408bc53f54e0e54ac126228a165ef733a Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Tue, 18 Jun 2024 12:09:01 +0200 Subject: [PATCH] =?UTF-8?q?-=20Corretto=20accorciamento=20start/end=20in?= =?UTF-8?q?=20caso=20di=20inversione=20percorso=20-=20In=20MakeByMillAsSaw?= =?UTF-8?q?=20si=20cerca=20di=20orientare=20il=20motore=20verso=20il=20lat?= =?UTF-8?q?o=20pi=C3=B9=20vicino?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/FacesBySaw.lua | 2 ++ LuaLibs/ProcessLapJoint.lua | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/LuaLibs/FacesBySaw.lua b/LuaLibs/FacesBySaw.lua index ebf2f8e..bc0e809 100644 --- a/LuaLibs/FacesBySaw.lua +++ b/LuaLibs/FacesBySaw.lua @@ -28,6 +28,7 @@ -- Implementata GetBlockedAxis che gestisce gli assi bloccati per tutti i tipi di utensile. -- 2024/02/22 Migliorato calcolo area non pinzabile in testa HCING e coda TCING -- 2024/03/27 In MakeTwo rimossa gestione calcolo differente su ultima passata in caso di macchina FAST +-- 2024/06/18 In MakeOne in caso di inversione del percorso, si scambia anche accorciamento start con end -- Tabella per definizione modulo local FacesBySaw = {} @@ -250,6 +251,7 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw if bInvert then ptP1, ptP2 = ptP2, ptP1 vtV1, vtV2 = vtV2, vtV1 + dAccStart, dAccEnd = dAccEnd, dAccStart end local vtTg = ptP2 - ptP1 ; vtTg:normalize() local dAllStart = 0 diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 00cdaf8..fca6f1c 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -105,6 +105,7 @@ -- 2024/04/15 In SideMillAsSaw gestito anche rabbet -- 2024/04/17 In MakeMoreLongFaces corretto calcolo divisione in parti per evitare problemi di ceil con interi perfetti (ceil(3) = 3 o 4??) -- 2024/04/22 In IsTailFeature se LapJoint a 2 facce che taglia intera sezione, deve essere fatto dopo taglio di coda +-- 2024/06/18 In MakeByMillAsSaw si cerca di orientare il motore verso il lato più vicino (rispetto a dove è la feature) -- Tabella per definizione modulo local ProcessLapJoint = {} @@ -2666,7 +2667,8 @@ local function MakeByMillAsSaw( Proc, nPhase, nRawId, nPartId, nFacInd, local dLen = dist( ptP1, ptP2) if abs( dLen - dMaxLen) < 5 then local vtN = EgtSurfTmFacetNormVersor( Proc.Id, vAdj[i], GDB_ID.ROOT) - if vtN:getY() > 0.5 or vtN:getZ() > 0.5 then + local bPositionedToYm = Proc.Box:getMax():getY() < ( b3Raw:getMin():getY() + b3Raw:getMax():getY()) / 2 + if ( bPositionedToYm and vtN:getY() < 0.5) or ( not bPositionedToYm and vtN:getY() > 0.5) or vtN:getZ() > 0.5 then nFacAdj = vAdj[i] dMaxLen = dLen end