From 43482f5a6dfc94b6f0f0a49f8d6ac9f3fdf359d0 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Fri, 24 May 2024 15:33:36 +0200 Subject: [PATCH] - in LapJoint se non si trova una lavorazione di tipo side si cerca una pocketing --- LuaLibs/WProcessLapJoint.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/LuaLibs/WProcessLapJoint.lua b/LuaLibs/WProcessLapJoint.lua index e94e1d5..30870b4 100644 --- a/LuaLibs/WProcessLapJoint.lua +++ b/LuaLibs/WProcessLapJoint.lua @@ -1351,7 +1351,7 @@ local function MakeByMill( Proc, nFacet, nOthFac, nRawId, b3Raw, dSideDist) if not sMilling then local sErr = 'Error : Side not found in library' EgtOutLog( sErr) - return false, sErr + return false, sErr, true end -- recupero i dati dell'utensile local dMillDiam = 20 @@ -2755,7 +2755,10 @@ local function MakeTwoFaces( Proc, nRawId, b3Raw) bLikeAsMakeFirstGroove = false return MakeSideGrooveByMill( Proc, nFacetVert, nRawId, b3Raw, EgtIf( bEnableMillOnSide and dMaxDepthOnSide, sMillOnSide, nil), dMaxDepthOnSide, bMakeFirstGroove, bMachFromDn, dAng, bLikeAsMakeFirstGroove, nil, nil, bDoubleMillOnSide) else - local bOk, sErr = MakeByMill( Proc, nFacet, 1 - nFacet, nRawId, b3Raw, dSideDist) + local bOk, sErr, bSideMachiningNotFound = MakeByMill( Proc, nFacet, 1 - nFacet, nRawId, b3Raw, dSideDist) + if not bOk and bSideMachiningNotFound then + bOk, sErr = MakeByPocketing( Proc, nFacet, nRawId, b3Raw) + end -- se angolo ottuso riprendo il lato quasi verticale if bOk and dAng and dAng > -90 + 10 * GEO.EPS_SMALL then local bOk2, sErr2 = MakeSideGrooveByMill( Proc, nFacetVert, nRawId, b3Raw, EgtIf( bEnableMillOnSide and dMaxDepthOnSide, sMillOnSide, nil), dMaxDepthOnSide, bMakeFirstGroove, bMachFromDn, dAng, false, nil, true)