From 54fcc27c496ba0aafae639ca255fbb7197f738b9 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Fri, 3 Nov 2023 09:42:12 +0100 Subject: [PATCH] =?UTF-8?q?-=20in=20LapJoint=20->=20MakeStaircaseStep=20ag?= =?UTF-8?q?giunta=20riduzione=20profondit=C3=A0=20lama=20in=20caso=20di=20?= =?UTF-8?q?angolo=20inferiore=20a=2090deg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/ProcessLapJoint.lua | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index a649113..689bd1b 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -5673,7 +5673,6 @@ end local function MakeStaircaseStep( Proc, nRawId, b3Raw, b3Solid) -- angolo tra le facce local _, _, _, dAng = EgtSurfTmFacetsContact( Proc.Id, 0, 1, GDB_ID.ROOT) - local _, _, _, dAng2 = EgtSurfTmFacetsContact( Proc.Id, 1, 0, GDB_ID.ROOT) -- l'angolo tra le facce deve essere compreso tra 80 e 90.5 deg if ( dAng > -89.5 + 10 * GEO.EPS_ANG_SMALL) or ( dAng < -100 - 10 * GEO.EPS_ANG_SMALL) then return false end -- normali delle facce @@ -5721,16 +5720,24 @@ local function MakeStaircaseStep( Proc, nRawId, b3Raw, b3Solid) local dSawMaxDepth = 0 local dSawDiam = 400 local dSawRotationSpeed = 0 + local dSawThick = 5 if sCutting then if EgtMdbSetCurrMachining( sCutting) then local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID) if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then dSawMaxDepth = EgtTdbGetCurrToolMaxDepth() or dSawMaxDepth - dSawRotationSpeed = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED)or dSawRotationSpeed + dSawRotationSpeed = EgtTdbGetCurrToolParam( MCH_MP.SPEED) or dSawRotationSpeed + dSawThick = EgtTdbGetCurrToolParam( MCH_TP.THICK) or dSawThick end end end + -- calcolo riduzione profondità lama in caso di angolo inferiore a 90deg + local dCutExtraSaw = 0 + if dAng < -91 and dAng > -179 then + dCutExtraSaw = - dSawThick / tan( 180 + dAng) + end + -- fresatura della pedata per fare spazio alla lama local dMillingDepth = dVTread - dSawMaxDepth + 10 -- divido in passate orizzontali @@ -5809,10 +5816,10 @@ local function MakeStaircaseStep( Proc, nRawId, b3Raw, b3Solid) end for i = 2, 1, -1 do -- inserisco la lavorazione della faccia - local dCutRadialOffsetTread = ( i - 1) * dSawMaxDepth / 2 + local dCutRadialOffsetTread = - dSawMaxDepth / 2 * ( i - 1) -- componente limite del vettore Z per lama downUp; impostata a -2 per non farla mai rientrare in quel caso local dVzLimDwnUp = -2 - local bOkSawTread, sErr = Fbs.MakeOne( Proc.Id, nFacetTread, sCutting, dSawDiam, nFaceUseTread, dVzLimDwnUp, -dCutRadialOffsetTread, 0, 0, 0, 0, nil, b3Raw) + local bOkSawTread, sErr = Fbs.MakeOne( Proc.Id, nFacetTread, sCutting, dSawDiam, nFaceUseTread, dVzLimDwnUp, dCutRadialOffsetTread + dCutExtraSaw, 0, 0, 0, 0, nil, b3Raw) end -- taglio di lama dell'alzata @@ -5826,10 +5833,10 @@ local function MakeStaircaseStep( Proc, nRawId, b3Raw, b3Solid) end for i = nSawStepsRiser, 1, -1 do -- inserisco la lavorazione della faccia - local dCutRadialOffsetRiser = ( i - 1) * dSawStepRiser + local dCutRadialOffsetRiser = - dSawStepRiser * ( i - 1) -- componente limite del vettore Z per lama downUp; impostata a -2 per non farla mai rientrare in quel caso local dVzLimDwnUp = -2 - local bOkSawRiser, sErr = Fbs.MakeOne( Proc.Id, nFacetRiser, sCutting, dSawDiam, nFaceUseRiser, dVzLimDwnUp, -dCutRadialOffsetRiser, 0, 0, 0, 0, nil, b3Raw) + local bOkSawRiser, sErr = Fbs.MakeOne( Proc.Id, nFacetRiser, sCutting, dSawDiam, nFaceUseRiser, dVzLimDwnUp, dCutRadialOffsetRiser + dCutExtraSaw, 0, 0, 0, 0, nil, b3Raw) end end