DataBeam :

- aggiunta gestione feature Dovetail (1/2/3/4-138-X)
- correzioni e migliorie varie.
This commit is contained in:
Dario Sassi
2020-04-25 09:51:20 +00:00
parent 2c5529b87b
commit 4ba7936167
7 changed files with 1917 additions and 182 deletions
+9 -14
View File
@@ -225,7 +225,7 @@ function BeamLib.GetNearestParalOpposite( vtRef)
else
return MCH_MILL_FU.PARAL_RIGHT
end
elseif abs( vtRef:getY()) > abs( vtRef:getZ()) then
else
if vtRef:getY() > 0 then
return MCH_MILL_FU.PARAL_FRONT
else
@@ -359,17 +359,11 @@ function BeamLib.GetFaceElevation( nSurfId, nFac, nPartId)
end
---------------------------------------------------------------------
function BeamLib.GetFaceWithMostAdj( nSurfId, nPartId, bCompare3Fc, dSinAngleUSquare)
function BeamLib.GetFaceWithMostAdj( nSurfId, nPartId, bCompare3Fc, dCosSideAng)
-- recupero il numero di facce
local nFacCnt = EgtSurfTmFacetCount( nSurfId)
local dSinAngUsq
local bNotCheckUsq
if not dSinAngleUSquare then
dSinAngUsq = -0.05
elseif dSinAngleUSquare == -2 then
bNotCheckUsq = true
else
dSinAngUsq = dSinAngleUSquare
if not dCosSideAng then
dCosSideAng = -0.05
end
-- recupero le normali delle facce
local vvtN = {}
@@ -394,16 +388,17 @@ function BeamLib.GetFaceWithMostAdj( nSurfId, nPartId, bCompare3Fc, dSinAngleUSq
vAdj[i] = nCount
-- ne determino eventuale sottosquadra ( dal valore passato o - 3deg) e ortogonalità
local bUcut = false
local bOrto = false
local bOrtho = true
for j = 1, #vFacAdj do
if vFacAdj[j] >= 0 then
local vtN = vvtN[i]
local vtN2 = vvtN[vFacAdj[j]+1]
local dResV = vtN * vtN2
if not bNotCheckUsq and dResV < dSinAngUsq - GEO.EPS_SMALL then
if dResV < dCosSideAng - GEO.EPS_SMALL then
bUcut = true
elseif abs(dResV) < GEO.EPS_SMALL then
bOrtho = true
end
if abs( dResV) > 2 * GEO.EPS_SMALL then
bOrtho = false
end
end
end