DataBeam :
- modifiche per rendere più robusti i test in GetNearestParalOpposite, GetNearestOrthoOpposite, MakeOneFaceBySaw e FacesBySaw.MakeTwo - in lavorazioni con sega a catena si premia la scelta A=0 per FAST e A=90 per PF.
This commit is contained in:
@@ -59,19 +59,21 @@ function FacesBySaw.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, sCutName)
|
||||
local vtTg = ptT2 - ptT1 ;
|
||||
vtRef[1] = vtN[1] ^ vtTg
|
||||
if vtRef[1] * vtN[2] < 0 then vtRef[1] = - vtRef[1] end
|
||||
vtRef[1]:normalize()
|
||||
vtRef[2] = vtN[2] ^ vtTg
|
||||
if vtRef[2] * vtN[1] < 0 then vtRef[2] = - vtRef[2] end
|
||||
vtRef[2]:normalize()
|
||||
-- determino quale faccia è più grande
|
||||
local ptPs = ( ptT1 + ptT2) / 2
|
||||
local dSqDim1 = ( ptC[1] - ptPs):sqlen()
|
||||
local dSqDim2 = ( ptC[2] - ptPs):sqlen()
|
||||
local nBigInd = EgtIf( dSqDim1 >= dSqDim2, 1, 2)
|
||||
local nBigInd = EgtIf( dSqDim1 > dSqDim2 - 1., 1, 2)
|
||||
local nSmaInd = 3 - nBigInd
|
||||
local nUpInd = EgtIf( vtN[1]:getZ() >= vtN[2]:getZ(), 1, 2)
|
||||
local nUpInd = EgtIf( vtN[1]:getZ() > vtN[2]:getZ() - GEO.EPS_SMALL, 1, 2)
|
||||
local nOtInd = 3 - nUpInd
|
||||
-- metto in relazione la scelta facce con il confronto del versore Z con la scelta in base alla grandezza faccia
|
||||
-- se la faccia più grande è messa secondaria e il suo versore Z non è negativo
|
||||
if nOtInd == nBigInd and vtN[nBigInd]:getZ() > -( 5 * GEO.EPS_SMALL) and vtN[nSmaInd]:getZ() < 0.866 then
|
||||
if nOtInd == nBigInd and vtN[nBigInd]:getZ() > -5 * GEO.EPS_SMALL and vtN[nSmaInd]:getZ() < 0.866 then
|
||||
nOtInd = nSmaInd
|
||||
nUpInd = nBigInd
|
||||
end
|
||||
@@ -129,7 +131,7 @@ function FacesBySaw.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, sCutName)
|
||||
end
|
||||
end
|
||||
else
|
||||
nUpInd = EgtIf( vtN[1]:getZ() >= vtN[2]:getZ(), 1, 2)
|
||||
nUpInd = EgtIf( vtN[1]:getZ() > vtN[2]:getZ() - GEO.EPS_SMALL, 1, 2)
|
||||
nOtInd = 3 - nUpInd
|
||||
-- se prima faccia lavorata è da sotto scambio le facce
|
||||
if vtN[nOtInd]:getZ() < -0.5 then
|
||||
|
||||
Reference in New Issue
Block a user