DataBeam :

- correzioni varie.
This commit is contained in:
Dario Sassi
2021-03-22 14:53:55 +00:00
parent 91dd924536
commit acc6cc020b
2 changed files with 26 additions and 26 deletions
+19 -23
View File
@@ -725,7 +725,7 @@ local function MakeOneFaceByMill( Proc, nPhase, nRawId, nPartId)
end
---------------------------------------------------------------------
local function MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId)
local function MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId, bDownHead)
-- recupero l'ingombro del grezzo di appartenenza
local b3Raw = EgtGetRawPartBBox( nRawId)
-- recupero l'ingombro della trave
@@ -742,9 +742,9 @@ local function MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId)
-- verifico il parametro Q per uso fresa
local nUseRM = EgtGetInfo( Proc.Id, Q_USE_MILL, 'i')
if nUseRM and nUseRM == 1 then
sMilling = ML.FindMilling( 'LongSmallCut')
sMilling = ML.FindMilling( 'LongSmallCut' .. EgtIf( bDownHead, '_H2', ''))
else
sMilling = ML.FindMilling( 'BirdsMouth')
sMilling = ML.FindMilling( 'BirdsMouth' .. EgtIf( bDownHead, '_H2', ''))
end
-- recupero la lavorazione
local dTDiam = 0
@@ -770,7 +770,7 @@ local function MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId)
local bFaceOk = {}
bFaceOk[1] = ( vtN[1]:getZ() >= BD.NZ_MINB)
bFaceOk[2] = ( vtN[2]:getZ() >= BD.NZ_MINB)
if not bFaceOk[1] and not bFaceOk[2] then
if not bDownHead and not bFaceOk[1] and not bFaceOk[2] then
local sErr = 'Error : LapJoint from bottom impossible'
EgtOutLog( sErr)
return false, sErr
@@ -2895,16 +2895,14 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
end
-- imposto posizione braccio porta testa
local nSCC
if vtOrtho:getY() < GEO.EPS_SMALL then
if abs( vtOrtho:getX()) < 0.02 and abs( vtOrtho:getY()) > 0.02 then
local bNearTail = ( Proc.Box:getCenter():getX() < b3Solid:getCenter():getX() and Proc.Box:getCenter():getX() - b3Solid:getMin():getX() < 1000)
local bVeryShortPart = ( BD.LEN_VERY_SHORT_PART and b3Solid:getDimX() < BD.LEN_VERY_SHORT_PART)
nSCC = EgtIf( BL.IsPartFinalPhase( nPhase) or ( bNearTail and not bVeryShortPart), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
elseif vtOrtho:getY() < GEO.EPS_SMALL then
nSCC = EgtIf( bInvertMach, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
else
if abs( vtOrtho:getX()) > 0.1 then
nSCC = EgtIf( bInvertMach, MCH_SCC.ADIR_YM, MCH_SCC.ADIR_YP)
else
local bNearTail = ( Proc.Box:getCenter():getX() < b3Solid:getCenter():getX() and Proc.Box:getCenter():getX() - b3Solid:getMin():getX() < 1000)
local bVeryShortPart = ( BD.LEN_VERY_SHORT_PART and b3Solid:getDimX() < BD.LEN_VERY_SHORT_PART)
nSCC = EgtIf( BL.IsPartFinalPhase( nPhase) or ( bNearTail and not bVeryShortPart), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
end
nSCC = EgtIf( bInvertMach, MCH_SCC.ADIR_YM, MCH_SCC.ADIR_YP)
end
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
-- se tasca aperta, imposto opportuno attacco
@@ -2953,16 +2951,14 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
-- imposto posizione braccio porta testa
local nSCC
if vtOrtho:getY() < GEO.EPS_SMALL then
if abs( vtOrtho:getX()) < 0.02 and abs( vtOrtho:getY()) > 0.02 then
local bNearTail = ( Proc.Box:getCenter():getX() < b3Solid:getCenter():getX() and Proc.Box:getCenter():getX() - b3Solid:getMin():getX() < 1000)
local bVeryShortPart = ( BD.LEN_VERY_SHORT_PART and b3Solid:getDimX() < BD.LEN_VERY_SHORT_PART)
nSCC = EgtIf( BL.IsPartFinalPhase( nPhase) or ( bNearTail and not bVeryShortPart), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
elseif vtOrtho:getY() < GEO.EPS_SMALL then
nSCC = MCH_SCC.ADIR_YP
else
if abs( vtOrtho:getX()) > 0.1 then
nSCC = MCH_SCC.ADIR_YM
else
local bNearTail = ( Proc.Box:getCenter():getX() < b3Solid:getCenter():getX() and Proc.Box:getCenter():getX() - b3Solid:getMin():getX() < 1000)
local bVeryShortPart = ( BD.LEN_VERY_SHORT_PART and b3Solid:getDimX() < BD.LEN_VERY_SHORT_PART)
nSCC = EgtIf( BL.IsPartFinalPhase( nPhase) or ( bNearTail and not bVeryShortPart), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
end
nSCC = MCH_SCC.ADIR_YM
end
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
-- se tasca aperta, imposto opportuno attacco
@@ -3953,10 +3949,10 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- determino l'angolo tra le facce
local bAdj, _, _, dAng = EgtSurfTmFacetsContact( Proc.Id, 0, 1, GDB_ID.ROOT)
-- se ortogonali e non forzata lama oppure con testa da sotto, con fresa
if ( not bUseBlade and bAdj and abs( dAng + 90) < 1) or bDownHead then
if ( not bUseBlade or bDownHead) and bAdj and abs( dAng + 90) < 1 then
-- se piccole
if ( Proc.Box:getDimX() < MAX_MILL_LIN and ( Proc.Box:getDimZ() < MAX_MILL_LIN or Proc.Box:getDimY() < MAX_MILL_LIN)) then
return MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId)
return MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId, bDownHead)
else
return MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, true)
end
@@ -3987,7 +3983,7 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
local nOk, sErr = MakeChamfer( Proc, true, nAddGrpId, vtOrtho, b3Solid, nSurfInt, dDepthCham)
if nOk < 0 then return false, sErr end
end
return Fbs.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, 'HeadSide')
return Fbs.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, 'HeadSide' .. EgtIf( bDownHead, '_H2', ''), true, bDownHead)
end
-- tre o più facce
else