- minors and spacings
This commit is contained in:
+16
-18
@@ -821,7 +821,7 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
|
||||
_, vtN[2] = EgtSurfTmFacetCenter( Proc.Id, 1, GDB_ID.ROOT)
|
||||
-- verifico se è lavorabile solo dal basso
|
||||
local bSmall = ( ( Proc.Head or Proc.Tail) and Proc.Box:getDimX() <= BD.GetMaxLenRidgeLapFromBottom( b3Raw:getDimZ())) or
|
||||
( not ( Proc.Head or Proc.Tail) and Proc.Box:getDimY() <= BD.GetMaxLenRidgeLapFromBottom( b3Raw:getDimZ()))
|
||||
( not ( Proc.Head or Proc.Tail) and Proc.Box:getDimY() <= BD.GetMaxLenRidgeLapFromBottom( b3Raw:getDimZ()))
|
||||
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.1 or not bSmall)) or
|
||||
( vtN[2]:getZ() < BD.NZ_MINA and ( vtN[1]:getZ() < -0.1 or not bSmall))
|
||||
@@ -1875,9 +1875,8 @@ local function MakeRoundCleanContour( Proc, nFacInd, dDiam, bMillDown,
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function MakeRoundCleanCornerOrContour( Proc, nFacInd, dDiam, bMillDown,
|
||||
bDoubleSide, vtOrtho, nPathInt, nSurfInt,
|
||||
dDepth, bOneShot)
|
||||
local function MakeRoundCleanCornerOrContour( Proc, nFacInd, dDiam, bMillDown, bDoubleSide,
|
||||
vtOrtho, nPathInt, nSurfInt, dDepth, bOneShot)
|
||||
local nFunction = Q_CONTOUR_SMALL_TOOL
|
||||
-- se modalitá pulitura spigoli e lavorazione di lato forzo a fare il contorno
|
||||
if nFunction == 2 and nPathInt then
|
||||
@@ -1885,9 +1884,8 @@ local function MakeRoundCleanCornerOrContour( Proc, nFacInd, dDiam, bMillDown,
|
||||
end
|
||||
-- se richiesta pulitura del contorno
|
||||
if nFunction == 1 then
|
||||
return MakeRoundCleanContour( Proc, nFacInd, dDiam, bMillDown,
|
||||
bDoubleSide, vtOrtho, nPathInt, nSurfInt,
|
||||
dDepth, bOneShot)
|
||||
return MakeRoundCleanContour( Proc, nFacInd, dDiam, bMillDown, bDoubleSide,
|
||||
vtOrtho, nPathInt, nSurfInt, dDepth, bOneShot)
|
||||
-- se richiesta pulitura dei soli corner
|
||||
elseif nFunction == 2 then
|
||||
return MakeRoundCleanCorner( Proc, nFacInd, dDiam, bMillDown, bDoubleSide)
|
||||
@@ -3096,7 +3094,7 @@ local function MakePocket( Proc, ptPs, tvtN, nFaceRef, sMchFind, nUseRoughTool,
|
||||
end
|
||||
-- se ho lavorazione precedente ricalcolo grossolanamente l'elevazione
|
||||
if dPrevFaceElev and dPrevFaceElev > 0 and dAng then
|
||||
dElev = dElev + ( sqrt( ( dElev * dElev) - ( dPrevFaceElev * dPrevFaceElev)) * sin(dAng))
|
||||
dElev = dElev + ( sqrt( ( dElev * dElev) - ( dPrevFaceElev * dPrevFaceElev)) * sin( dAng))
|
||||
elseif dPrevFaceElev and dPrevFaceElev > dElev then
|
||||
dElev = dPrevFaceElev
|
||||
end
|
||||
@@ -3455,7 +3453,7 @@ local function MakeByPockets( Proc, bOrthoFacesMaster, bMillDown)
|
||||
local sName = 'Pock_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||
local bToolInvert = false
|
||||
-- verifico se devo invertire direzione utensile (in caso di direzione verso la verticale)
|
||||
if vtOrtho:getZ() < BD.NZ_MINA and abs(vtOrtho:getZ()) >= 0.707 and not BD.DOWN_HEAD then
|
||||
if vtOrtho:getZ() < BD.NZ_MINA and abs( vtOrtho:getZ()) >= 0.707 and not BD.DOWN_HEAD then
|
||||
bToolInvert = true
|
||||
-- altrimenti se da fare in una sola volta e direzionato verso Y+ lo inverto per lavorarlo davanti
|
||||
elseif not bDoubleSide and vtOrtho:getY() > GEO.EPS_SMALL and not ( -(vtOrtho:getZ()) < BD.NZ_MINA) then
|
||||
@@ -3493,7 +3491,7 @@ local function MakeByPockets( Proc, bOrthoFacesMaster, bMillDown)
|
||||
-- se anche lavorando dal lato opposto non riesco a svuotare completamente la fessura
|
||||
-- setto i parametri affondamento ed emetto warning
|
||||
if dMaxDepth < ( dDepth / 2) + BD.CUT_EXTRA + dCollSic then
|
||||
dMachDepth = dMaxDepth - (dDepth / 2) - dCollSic
|
||||
dMachDepth = dMaxDepth - ( dDepth / 2) - dCollSic
|
||||
dElev = dMaxDepth
|
||||
bComplete = false
|
||||
sWarn = 'Warning : elevation bigger than max tool depth'
|
||||
@@ -3532,7 +3530,7 @@ local function MakeByPockets( Proc, bOrthoFacesMaster, bMillDown)
|
||||
local dActMaxDepth = EgtIf( bFacPocketDn, dMaxDepthDn, dMaxDepth)
|
||||
if dActMaxDepth < dFacElev + dFacCollSic then
|
||||
dDepth = dActMaxDepth - dFacElev + dFacCollSic
|
||||
end
|
||||
end
|
||||
-- inserisco la lavorazione di svuotatura
|
||||
local sName = EgtIf( bDoubleSide, 'Pock3rd_', 'Pock2nd_') .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||
-- eseguo svuotatura
|
||||
@@ -3543,7 +3541,7 @@ local function MakeByPockets( Proc, bOrthoFacesMaster, bMillDown)
|
||||
-- prendo l'id della prima lavorazione inserita
|
||||
if not nFirstMachId then
|
||||
nFirstMachId = nMchFId
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return 1, sWarn, dDimMin, dDimMax, dDepth, vtOrtho, nLongFaceId, dDiamTool, bDoubleSide, nPathInt, nSurfInt, bOneShot, bMillDown, nFirstMachId
|
||||
@@ -3585,8 +3583,8 @@ local function ManageAntiSplintBySaw( Proc, bIsU, vtN, nFacInd, sWarn, bMillDown
|
||||
-- verifico se da invertire
|
||||
local bInvertMach = false
|
||||
if bIsU then
|
||||
if abs(vtN:getZ()) > 0.63 or abs(vtN:getY()) > 0.63 then
|
||||
-- if abs(vtN:getZ()) > 0.7 or abs(vtN:getY()) > 0.7 then
|
||||
if abs( vtN:getZ()) > 0.63 or abs( vtN:getY()) > 0.63 then
|
||||
-- if abs( vtN:getZ()) > 0.7 or abs( vtN:getY()) > 0.7 then
|
||||
-- prendo il vettore normale alla faccia
|
||||
local ptC, vtNFc = EgtSurfTmFacetCenter( Proc.Id, nFacet, GDB_ID.ROOT)
|
||||
-- se superficie principale parallela al piano XZ
|
||||
@@ -4354,7 +4352,7 @@ local function MakeSidePocketings( Proc, tFData, dCollSic, bSpecialMillOnSide,
|
||||
end
|
||||
else
|
||||
-- se devo inserire il chamfer
|
||||
if ( ( Proc.Fct == 3 and bIsU) or (Proc.Fct == 2 and bIsL)) and _nChamfer > 0 then
|
||||
if ( ( Proc.Fct == 3 and bIsU) or ( Proc.Fct == 2 and bIsL)) and _nChamfer > 0 then
|
||||
-- ottengo le dimensioni dello pseudotunnel
|
||||
local dDimMin, dDimMax, dDepth, vtOrtho, nLongFaceId, nSurfInt = GetTunnelDimension( Proc)
|
||||
local nOk, sErr = MakeChamfer( Proc, vtOrtho, nSurfInt)
|
||||
@@ -4470,7 +4468,7 @@ local function MakePocketingOrMilling( Proc, tFData, bSinglePart)
|
||||
local bUseOtherFace
|
||||
-- se orientata verso il basso e non c'è testa da sotto, verifico l'alternativa
|
||||
if tFData.vtN:getZ() < BD.NZ_MINA and not BD.DOWN_HEAD and tFData.nFacInd2 then
|
||||
tFData = SwapFacetsData(tFData)
|
||||
tFData = SwapFacetsData( tFData)
|
||||
bUseOtherFace = true
|
||||
end
|
||||
-- verifico non sia orientata verso il basso o ci sia una testa dal basso
|
||||
@@ -4487,7 +4485,7 @@ local function MakePocketingOrMilling( Proc, tFData, bSinglePart)
|
||||
-- se non ho scambiato la faccia
|
||||
if not bUseOtherFace then
|
||||
if tFData.nFacInd2 then
|
||||
tFData = SwapFacetsData(tFData)
|
||||
tFData = SwapFacetsData( tFData)
|
||||
-- altrimenti cerco la faccia secondaria per adiacenza alla principale
|
||||
else
|
||||
-- Cerco una faccia adiacente alla principale sul lato lungo
|
||||
@@ -4693,7 +4691,7 @@ local function MakePocketingOrMilling( Proc, tFData, bSinglePart)
|
||||
end
|
||||
else
|
||||
-- se devo inserire il chamfer
|
||||
if ( ( Proc.Fct == 3 and bIsU) or (Proc.Fct == 2 and bIsL)) and _nChamfer > 0 then
|
||||
if ( ( Proc.Fct == 3 and bIsU) or ( Proc.Fct == 2 and bIsL)) and _nChamfer > 0 then
|
||||
-- ottengo le dimensioni dello pseudotunnel
|
||||
local dDimMin, dDimMax, dDepth, vtOrtho, nLongFaceId, nSurfInt = GetTunnelDimension( Proc)
|
||||
local nOk, sErr = MakeChamfer( Proc, vtOrtho, nSurfInt)
|
||||
|
||||
Reference in New Issue
Block a user