altra piccola correzione

This commit is contained in:
luca.mazzoleni
2023-03-14 18:55:48 +01:00
parent 83048f2f52
commit afef9c54fe
+8 -8
View File
@@ -3493,7 +3493,9 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
else
bOrthoFaces = bOrthoFacesMaster
end
local bMakeContour = false
local bMakePocket, sPocketing, dMaxDepth, dDiamTool
local sMilling
-- se è un tunnel verifico se è possibile usare la svuotatura
if bOrthoFaces then
-- ottengo le dimensioni del tunnel
@@ -3520,7 +3522,7 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
-- ricalcolo se è lavorabile da sotto
bMillDown = ( BD.DOWN_HEAD == true)
-- verifico se può essere fatto con svuotatura
local bMakePocket, sPocketing, dMaxDepth, dDiamTool = VerifyPocket( Proc, dDimMin, dDepth / 2, nil, sMchFind, nil, nil, sChosenToolUuid)
bMakePocket, sPocketing, dMaxDepth, dDiamTool = VerifyPocket( Proc, dDimMin, dDepth / 2, nil, sMchFind, nil, nil, sChosenToolUuid)
local bMakePocketDn, sPocketingDn, dMaxDepthDn, dDiamToolDn
if bMillDown then
bMakePocketDn, sPocketingDn, dMaxDepthDn, dDiamToolDn = VerifyPocket( Proc, dDimMin, dDepth / 2, nil, sMchFind, nil, true, sChosenToolUuid)
@@ -3532,11 +3534,9 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
end
local nFacInd, dFacElev = BL.GetFaceWithMostAdj( Proc.Id, nPartId)
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nFacInd, GDB_ID.ROOT)
local bMakeContour = false
local sMilling
-- recupero la lavorazione di contornatura
sMilling = ML.FindMilling( 'Prof', nil, sChosenToolUuid)
if dFacElev < dMinFaceElevForPocket and ( bIsU or bIsL) and ( Proc.Fct == 2 or Proc.Fct == 3) and abs( vtN:getZ()) > 0.996 then
-- recupero la lavorazione di contornatura
sMilling = ML.FindMilling( 'Prof', nil, sChosenToolUuid, nil, nil, not bMillDown, bMillDown)
if not sMilling then
local sMyWarn = 'Warning : Prof not found in library'
EgtOutLog( sMyWarn)
@@ -3874,7 +3874,7 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
end
end
-- se non completo e U, cerco di lavorare anche la faccia di fondo (con il massimo affondamento possibile)
if not bComplete and bIs3Faces then
if not bComplete and bIs3Faces and not bMakeContour then
-- recupero la faccia da lavorare
local nFacInd, dFacElev = BL.GetFaceWithMostAdj( Proc.Id, nPartId)
local vtN
@@ -3948,7 +3948,7 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
end
end
end
if sChosenToolUuid == '' then
if ( sChosenToolUuid == '') or ( sChosenToolUuid and ( ( bMakeContour and not sMilling) or not sPocketing)) then
local sErr = 'Error : no machining found with chosen Tool_ID'
EgtOutLog( sErr)
return -1, sErr