DataBeam :

- modifiche per gestire macchina Turn (BD.TURN)
- corretto riconoscimento fori di coda.
This commit is contained in:
DarioS
2022-04-22 10:13:45 +02:00
parent d6485ddc0d
commit e0e9b7b089
7 changed files with 23 additions and 18 deletions
+5 -5
View File
@@ -682,7 +682,7 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
local bDown = ( vtN[1]:getZ() < BD.NZ_MINB and vtN[2]:getZ() < BD.NZ_MINB) or
( vtN[1]:getZ() < BD.NZ_MINA and vtN[2]:getZ() < 0.5 and ( vtN[2]:getZ() < -0.1 or not bSmall)) or
( vtN[2]:getZ() < BD.NZ_MINA and vtN[1]:getZ() < 0.5 and ( vtN[1]:getZ() < -0.1 or not bSmall))
bDown = ( bDown and not BD.DOWN_HEAD)
bDown = ( bDown and not BD.DOWN_HEAD and not BD.TURN)
return true, bDown
-- se più di 2 facce
else
@@ -772,7 +772,7 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
local nFaceAdj = GetFaceAdj( Proc, nFacInd, dH, dV) or -1
local bIsL = ( Proc.Fct == 2 or TestElleShape3( Proc) or TestElleShape4( Proc) == 2)
-- verifico se è lavorabile solo dal basso
local bDown = ( vtN:getZ() < BD.NZ_MINA and not BD.DOWN_HEAD)
local bDown = ( vtN:getZ() < BD.NZ_MINA and not BD.DOWN_HEAD and not BD.TURN)
-- se verso il basso, verifico se utilizzabile seconda faccia
if bDown then
if nFacInd2 and dElev2 < 2 * dElev then
@@ -917,7 +917,7 @@ local function MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId, bDownHead)
local bFaceOk = {}
bFaceOk[1] = ( vtN[1]:getZ() >= BD.NZ_MINB)
bFaceOk[2] = ( vtN[2]:getZ() >= BD.NZ_MINB)
if not bDownHead and not bFaceOk[1] and not bFaceOk[2] then
if not bDownHead and not BD.TURN and not bFaceOk[1] and not bFaceOk[2] then
local sErr = 'Error : LapJoint from bottom impossible'
EgtOutLog( sErr)
return false, sErr
@@ -3276,7 +3276,7 @@ local function MakePocket( Proc, nPartId, ptPs, tvtN, nFaceRef, sMchFind, nUseRo
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.ORTHO_CONT)
-- imposto posizione braccio porta testa
local nSCC = MCH_SCC.NONE
if not BD.C_SIMM then
if not BD.C_SIMM and not BD.TURN then
nSCC = MCH_SCC.ADIR_YM
if AreSameVectorApprox( tvtN[2], Z_AX()) then
nSCC = MCH_SCC.ADIR_YM
@@ -4745,7 +4745,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
end
-- verifico non sia orientata verso il basso o ci sia una testa dal basso
local bFaceDown = ( vtN:getZ() < BD.NZ_MINA)
if bFaceDown and not BD.DOWN_HEAD then
if bFaceDown and not BD.DOWN_HEAD and not BD.TURN then
local sErr = 'Error : LapJoint from bottom impossible'
EgtOutLog( sErr)
return false, sErr