From dce3888e904c8e7bd39dbc178d522cc60909b2b8 Mon Sep 17 00:00:00 2001 From: DarioS Date: Mon, 5 Jul 2021 09:55:14 +0200 Subject: [PATCH] =?UTF-8?q?DataBeam=20:=20-=20modifiche=20in=20BeamLib.Mak?= =?UTF-8?q?eOneFaceBySaw=20per=20scelta=20lati=20da=20seguire=20quando=20p?= =?UTF-8?q?i=C3=B9=20di=20uno.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/BeamLib.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/LuaLibs/BeamLib.lua b/LuaLibs/BeamLib.lua index c28d59f..8b0e56f 100644 --- a/LuaLibs/BeamLib.lua +++ b/LuaLibs/BeamLib.lua @@ -870,15 +870,19 @@ function BeamLib.MakeOneFaceBySaw( nSurfId, nFacet, sCutting, dSawDiam, Par5, dV local dDist1 = dist( ptP1, ptPm) local dDist2 = dist( ptP2, ptPm) local dCosMax = 0.951 -- cos( 18°) - local dLenMin = 2 - local dLenMax = 0.5 * dSawDiam * 0.17365 + 1 + local dLenMin = 30 + local dLenMax = max( 0.5 * dSawDiam * 0.17365 + 1, 2 * dLenMin) if vtTg1 * vtTg2 < dCosMax or ( dDist1 < dLenMax and dDist1 > dLenMin) or ( dDist2 < dLenMax and dDist2 > dLenMin) then if abs( vtTg1 * vtOrthO) < abs( vtTg2 * vtOrthO) then - ptP2 = Point3d( ptPm) - dAllEnd = - dDist2 - 10 * GEO.EPS_SMALL + if dDist1 > dLenMin or dDist1 > 0.5 * dDist2 then + ptP2 = Point3d( ptPm) + dAllEnd = - dDist2 - 10 * GEO.EPS_SMALL + end else - ptP1 = Point3d( ptPm) - dAllStart = - dDist1 - 10 * GEO.EPS_SMALL + if dDist2 > dLenMin or dDist2 > 0.5 * dDist1 then + ptP1 = Point3d( ptPm) + dAllStart = - dDist1 - 10 * GEO.EPS_SMALL + end end vtTg = ptP2 - ptP1 ; vtTg:normalize() end