From 3fe16f87b75ef9ae742469fc3dab1434eb5880b0 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Fri, 27 Oct 2023 17:01:07 +0200 Subject: [PATCH] =?UTF-8?q?In=20LapJoint=20->=20MakeStaircaseStep:=20-=20i?= =?UTF-8?q?nvertite=20taglio=20di=20lama=20alzata=20e=20pedata=20-=20step?= =?UTF-8?q?=20lama=20della=20pedata=20limitati=20a=202,=20uno=20a=20met?= =?UTF-8?q?=C3=A0=20e=20uno=20in=20fondo=20-=20corretto=20faceuse=20nel=20?= =?UTF-8?q?caso=20di=20lama=20da=20sotto=20(esclusi=20casi=20downup)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/ProcessLapJoint.lua | 43 +++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index a66c61a..7377c09 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -5796,11 +5796,28 @@ local function MakeStaircaseStep( Proc, nRawId, b3Raw, b3Solid) UpdateEncumbrance( Proc, nRawId, b3Raw, b3Solid) end - -- taglio di lama dell'alzata - -- calcolo direzione lavorazione per faceuse - local vtOrthoRiser = EgtIf( vtNRiser * Z_AX() > -GEO.EPS_SMALL, Z_AX(), -Z_AX()) + -- taglio di lama della pedata + -- calcolo faceuse + local nFaceUseTread = EgtIf( vtNRiser * Z_AX() > -GEO.EPS_SMALL, MCH_MILL_FU.ORTHO_DOWN, MCH_MILL_FU.ORTHO_TOP) -- divido in passate orizzontali - local nSawStepsRiser = ceil( ( dVRiser - 100 * GEO.EPS_SMALL) / ( dSawMaxDepth * 0.6)) --VEDERE SE GLI STEP DI TAGLIO SONO CORRETTI!!! + local nSawStepsTread = ceil( ( dVTread - 100 * GEO.EPS_SMALL) / ( dSawMaxDepth * 0.6)) + local dSawStepTread = 0 + if nSawStepsTread > 1 then + dSawStepTread = ( dVTread - ( dSawMaxDepth * 0.6)) / ( nSawStepsTread - 1) + end + for i = 2, 1, -1 do + -- inserisco la lavorazione della faccia + local dCutRadialOffsetTread = ( i - 1) * dSawMaxDepth / 2 + -- 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) + end + + -- taglio di lama dell'alzata + -- calcolo faceuse + local nFaceUseRiser = EgtIf( vtNRiser * Z_AX() > -GEO.EPS_SMALL, MCH_MILL_FU.ORTHO_DOWN, MCH_MILL_FU.ORTHO_TOP) + -- divido in passate orizzontali + local nSawStepsRiser = ceil( ( dVRiser - 100 * GEO.EPS_SMALL) / ( dSawMaxDepth * 0.6)) local dSawStepRiser = 0 if nSawStepsRiser > 1 then dSawStepRiser = ( dVRiser - ( dSawMaxDepth * 0.6)) / ( nSawStepsRiser - 1) @@ -5808,23 +5825,11 @@ local function MakeStaircaseStep( Proc, nRawId, b3Raw, b3Solid) for i = nSawStepsRiser, 1, -1 do -- inserisco la lavorazione della faccia local dCutRadialOffsetRiser = ( i - 1) * dSawStepRiser - local bOkSawRiser, sErr = Fbs.MakeOne( Proc.Id, nFacetRiser, sCutting, dSawDiam, vtOrthoRiser, nil, -dCutRadialOffsetRiser, 0, 0, 0, 0, nil, b3Raw) + -- 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) end - -- taglio di lama della pedata - -- calcolo direzione lavorazione per faceuse - local vtOrtho = EgtIf( vtNRiser * Z_AX() > -GEO.EPS_SMALL, Z_AX(), -Z_AX()) - -- divido in passate orizzontali - local nSawStepsTread = ceil( ( dVTread - 100 * GEO.EPS_SMALL) / ( dSawMaxDepth * 0.6)) - local dSawStepTread = 0 - if nSawStepsTread > 1 then - dSawStepTread = ( dVTread - ( dSawMaxDepth * 0.6)) / ( nSawStepsTread - 1) - end - for i = nSawStepsTread, 1, -1 do - -- inserisco la lavorazione della faccia - local dCutRadialOffsetTread = ( i - 1) * dSawStepTread - local bOkSawTread, sErr = Fbs.MakeOne( Proc.Id, nFacetTread, sCutting, dSawDiam, vtOrtho, nil, -dCutRadialOffsetTread, 0, 0, 0, 0, nil, b3Raw) - end end ---------------------------------------------------------------------