Improvement/SideMillGreater90:

- piccole correzioni e miglioramenti
This commit is contained in:
luca.mazzoleni
2022-12-06 12:41:47 +01:00
parent d236b19d6a
commit 3bf3ba3b43
+9 -6
View File
@@ -1385,8 +1385,8 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
local nOtherFacet = abs( nFacet - 1)
local vtN2 = EgtSurfTmFacetNormVersor( Proc.Id, nOtherFacet, GDB_ID.ROOT)
local dElevOtherFacet = WL.GetFaceElevation( Proc.Id, nOtherFacet, nRawId)
-- se lap joint 2 facce dal basso e angolo più di 90°
local bExcludeSideMill = Proc.Fct == 2 and dAng and dAng > -90 + 10 * GEO.EPS_SMALL and vtN2:getZ() < -0.99 and vtN2:getZ() > -1.01
-- se lap joint 2 facce dal basso e angolo negativo
local bExcludeSideMill = Proc.Fct == 2 and vtN:getZ() < -0.01 and vtN2:getZ() < -0.01
-- dimensioni della faccia principale
local _, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacet, GDB_ID.ROOT)
local dThick = min( dH, dV)
@@ -2039,8 +2039,11 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
EgtSetOperationMode( nMchFId, false)
return false, sErr
end
elseif bExcludeSideMill then
local sErr = 'Feature not machinable by orientation'
EgtOutLog( sErr)
return false, sErr
end
return true, sWarn
end
@@ -2345,11 +2348,12 @@ local function MakeTwoFaces( Proc, nRawId, b3Raw)
EgtOutLog( sErr)
return false, sErr
end
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nFacInd, GDB_ID.ROOT)
local vtNTemp = EgtSurfTmFacetNormVersor( Proc.Id, nFacInd, GDB_ID.ROOT)
local dSideDist
local ptMid = ( ptP1 + ptP2) / 2
-- faccia orizzontale
local nFacet = EgtIf( vtN:getZ() >= WD.NZ_MINA, nFacInd, nFacInd2)
local nFacet = EgtIf( vtNTemp:getZ() >= WD.NZ_MINA, nFacInd, nFacInd2)
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nFacet, GDB_ID.ROOT)
-- faccia verticale
local nFacetVert = EgtIf( nFacet == nFacInd, nFacInd2, nFacInd)
local vtNV = EgtSurfTmFacetNormVersor( Proc.Id, nFacetVert, GDB_ID.ROOT)
@@ -2593,7 +2597,6 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw)
local sErr = 'Side milling not possible'
EgtOutLog( sErr)
return true, sErr
end
-- fessura verticale
elseif Proc.Stype == 3 then