DataBeam :

- modifiche in BeamLib.MakeOneFaceBySaw per scelta lati da seguire quando più di uno.
This commit is contained in:
DarioS
2021-07-05 09:55:14 +02:00
parent 5c42d2a033
commit dce3888e90
+10 -6
View File
@@ -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