- commenti / minors

This commit is contained in:
luca.bacis
2022-01-14 17:38:54 +01:00
parent 079eecbbca
commit aec6ebf72e
+22 -25
View File
@@ -3760,7 +3760,7 @@ local function ManageAntiSplintBySaw( Proc, bIsU, vtN, nFacInd, sWarn, bMillDown
local dAng, sWarn2, nIdMach
bMadeASbyBld, sWarn2, nIdMach, dSawThick, dMaxDepth, dAng = MakeAntiSplintBySaw( Proc, nFacet, vtN, nFacInd, bReduceDepth, bMillDown)
if not bMadeASbyBld then return bMadeASbyBld, false, sWarn2 end
sWarn = FormatWarning(sWarn, sWarn2)
sWarn = FormatWarning( sWarn, sWarn2)
-- se antischeggia veramente inserito perchè necessario
if nIdMach then
-- verifico se da invertire
@@ -3783,13 +3783,13 @@ local function ManageAntiSplintBySaw( Proc, bIsU, vtN, nFacInd, sWarn, bMillDown
-- se faccia verso X+ e mandrino verso sinistra
if vtNFc:getX() > 0 and nPrefSide == 1 then
-- se angolo interno e circa -90
if abs( dAng + 90) < 5 then
if abs( dAng + 90) < 5 then
bInvertMach = true
end
-- se faccia verso X- e mandrino verso destra
elseif vtNFc:getX() < 0 and nPrefSide == 2 then
-- se angolo interno e circa -90
if abs( dAng + 90) < 5 then
if abs( dAng + 90) < 5 then
bInvertMach = true
end
end
@@ -4516,7 +4516,7 @@ local function MakeSidePocketings( Proc, nFacInd, rfFac, dH, dV, vtN, dFacElev,
local sMyMchFind = 'Pocket'
nOk, sErr, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, _, _, _, _, _, _, _,
bOrthoFaces = MakeByPockets( Proc, sMyMchFind, true, nil, bMillDown)
-- se lavorazione non idonee ( asse della feature troppo inclinato e impossibile lavorare completamente da due parti)
-- se lavorazione non idonee (asse della feature troppo inclinato e impossibile lavorare completamente da due parti)
if nOk == -2 then
if not sMchFind then
sMchFind = sMchFindBackUp
@@ -4558,7 +4558,7 @@ local function MakeSidePocketings( Proc, nFacInd, rfFac, dH, dV, vtN, dFacElev,
else
-- se devo inserire il chamfer
if ( ( Proc.Fct == 3 and bIsU) or (Proc.Fct == 2 and bIsL)) and _nChamfer > 0 then
-- ottengo le dimensioni dello pseudotunnel
-- ottengo le dimensioni dello pseudotunnel
local _, _, _, vtOrtho, _, nSurfInt = GetTunnelDimension( Proc)
local nOk, sErr = MakeChamfer( Proc, true, vtOrtho, nSurfInt)
if nOk < 0 then return 1, false, sErr end
@@ -4613,7 +4613,7 @@ local function MakeSidePocketings( Proc, nFacInd, rfFac, dH, dV, vtN, dFacElev,
local _, sWarn2 = ManageAntiSplintByMill( Proc, nFacInd, bMillDown, bDoubleSide,
vtOrtho, nPathInt, nSurfInt, dDepth,
bOneShot, nFirstMachId)
sWarn = FormatWarning(sWarn, sWarn2)
sWarn = FormatWarning( sWarn, sWarn2)
end
-- se abilitato dal parametro Q inserisco pulitura spigoli o contorno con fresa più piccola
if Q_CONTOUR_SMALL_TOOL > 0 then
@@ -4621,7 +4621,7 @@ local function MakeSidePocketings( Proc, nFacInd, rfFac, dH, dV, vtN, dFacElev,
bDoubleSide, vtOrtho, nPathInt, nSurfInt,
dDepth, bOneShotm)
if not bOk then return 1, false, sWarn2 end
sWarn = FormatWarning(sWarn, sWarn2)
sWarn = FormatWarning( sWarn, sWarn2)
end
end
bOk = true
@@ -4641,7 +4641,7 @@ local function MakeSidePocketings( Proc, nFacInd, rfFac, dH, dV, vtN, dFacElev,
end
-- eseguo (non 3 faces)
bOk, sWarn, sStat = MakeByChainOrSaw( Proc, nFacInd,
rfFac, dH, dV, dFacElev,
rfFac, dH, dV, dFacElev,
dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace,
bOrthoFaces, nBottomFace, nSurfInt)
if not bOk and sStat == 'MNF' then
@@ -4659,7 +4659,7 @@ local function MakeSidePocketings( Proc, nFacInd, rfFac, dH, dV, vtN, dFacElev,
local bOk, sWarn2
bOk, sWarn2 = MakeRoundCleanCornerOrContour( Proc, nFacInd, 100, Q_CONTOUR_SMALL_TOOL, bMillDown)
if not bOk then return 1, false, sWarn2 end
sWarn = FormatWarning(sWarn, sWarn2)
sWarn = FormatWarning( sWarn, sWarn2)
end
return 1, bOk, sWarn
end
@@ -4928,7 +4928,7 @@ local function MakePocketingOrMilling( Proc, nFacInd, nFacInd2, bSinglePart, dFa
-- 2021.04.27 esegue antischeggia di lama se forma U o L con feature passante in Y o Z
-- 2021.07.16 Per poter eseguire antischeggia di lama su feature che non sono passanti da faccia a faccia
-- ma che sono su un angolo (coinvolgono 2 facce contigue) è stato modificato il confronto in:
-- esegue antischeggia di lama se forma U o L con feature passante in Y o Z, oppure se feature a furma U e con 3 facce oppore a forma a L e con 2 facce
-- esegue antischeggia di lama se forma U o L con feature passante in Y o Z, oppure se feature a forma U e con 3 facce oppore a forma a L e con 2 facce
local bMadeASbyBld = false
local bPassThrou = ( Proc.Box:getDimY() > _b3Raw:getDimY() - 1 or Proc.Box:getDimZ() > _b3Raw:getDimZ() - 1)
local bPassEdge = ((( bIsU and Proc.Fct == 3) or ( bIsL and Proc.Fct == 2)) and bSinglePart and Proc.Box:getDimX() < 0.9 * _b3Raw:getDimX())
@@ -4951,8 +4951,8 @@ local function MakePocketingOrMilling( Proc, nFacInd, nFacInd2, bSinglePart, dFa
local bOk, sWarn2, sTuuidPk, dDiamTool
bOk, sWarn2, sTuuidPk, dDiamTool = MakePocket( Proc, ptC, tvtNx, nFacInd, sMchFind, nUseRoughTool, sPocketing, dFacElev + dCollSic)
if not bOk then return false, sWarn2 end
sWarn = FormatWarning(sWarn, sWarn2)
-- se ho più di 3 facce e non di forma ad u oppure ho 3 facce e di forma ad u
sWarn = FormatWarning( sWarn, sWarn2)
-- se ho più di 3 facce e non di forma ad U oppure ho 3 facce e di forma ad U
-- e non sono stati inseriti antischeggia di lama
-- controllo se c'è una faccia non ortogonale alla principale e la lavoro con una contornatura o svuotatura
if ( ( Proc.Fct > 3 and not bIsU) or ( Proc.Fct == 3 and bIsU)) and not bMadeASbyBld then
@@ -4967,39 +4967,36 @@ local function MakePocketingOrMilling( Proc, nFacInd, nFacInd2, bSinglePart, dFa
local tDimAndRef = {}
tvtNx = {}
tvtNx[1] = vtN
tDimAndRef[1] = {dH, dV, rfFac}
tDimAndRef[1] = { dH, dV, rfFac}
for i = 1, #vAdj do
local bAdj, ptP1, ptP2, dAng = EgtSurfTmFacetsContact( Proc.Id, nFacInd, vAdj[i], GDB_ID.ROOT)
if bAdj and dAng < 0 and 180 + dAng > 90.1 then
local rfFac2, dH2, dV2 = EgtSurfTmFacetMinAreaRectangle( Proc.Id, vAdj[i], GDB_ID.ROOT)
_, tvtNx[2] = EgtSurfTmFacetCenter( Proc.Id, vAdj[i], GDB_ID.ROOT)
tDimAndRef[2] = {dH2, dV2, rfFac2}
local ptPs = ( ptP1 + ptP2) / 2
tDimAndRef[2] = { dH2, dV2, rfFac2}
local ptPs = ( ptP1 + ptP2) / 2
local bOk, sWarn2 = MachineByMill( Proc, tvtNx, nFacInd, vAdj[i], ptPs, tDimAndRef,
EgtIf( ( Proc.Fct == 3 and bIsU), 0, 2), nUseRoughTool, dAng, sPocketing, sTuuidPk, dFacElev)
if not bOk then return bOk, sWarn2 end
sWarn = FormatWarning(sWarn, sWarn2)
sWarn = FormatWarning( sWarn, sWarn2)
end
end
end
-- se abilitato dal parametro Q inserisco foro sullo spigolo
if Q_BORE_ON_CORNER == 1 then
local bOk, sWarn2
bOk, sWarn2 = MakeDrillOnCorner( Proc, nFacInd, dDiamTool)
local bOk, sWarn2 = MakeDrillOnCorner( Proc, nFacInd, dDiamTool)
if not bOk then return false, sWarn2 end
sWarn = FormatWarning(sWarn, sWarn2)
sWarn = FormatWarning( sWarn, sWarn2)
-- altrimenti se abilitato dal parametro Q inserisco percorso di pulitura
elseif Q_BORE_ON_CORNER == 2 then
local bOk, sWarn2
bOk, sWarn2 = MakeSharpCleanCorner( Proc, nFacInd, dDiamTool)
local bOk, sWarn2 = MakeSharpCleanCorner( Proc, nFacInd, dDiamTool)
if not bOk then return false, sWarn2 end
sWarn = FormatWarning(sWarn, sWarn2)
sWarn = FormatWarning( sWarn, sWarn2)
-- altrimenti se abilitato dal parametro Q inserisco pulitura spigoli o contorno con fresa più piccola
elseif Q_CONTOUR_SMALL_TOOL > 0 then
local bOk, sWarn2
bOk, sWarn2 = MakeRoundCleanCornerOrContour( Proc, nFacInd, dDiamTool, Q_CONTOUR_SMALL_TOOL, bMillDown)
local bOk, sWarn2 = MakeRoundCleanCornerOrContour( Proc, nFacInd, dDiamTool, Q_CONTOUR_SMALL_TOOL, bMillDown)
if not bOk then return false, sWarn2 end
sWarn = FormatWarning(sWarn, sWarn2)
sWarn = FormatWarning( sWarn, sWarn2)
end
end