Compare commits

...

2 Commits

+9 -6
View File
@@ -1367,7 +1367,7 @@ local function MakeByMill( Proc, nFacet, nOthFac, nRawId, b3Raw, dSideDist)
if not sMilling then
local sErr = 'Error : Side not found in library'
EgtOutLog( sErr)
return false, sErr, true
return false, sErr
end
-- recupero i dati dell'utensile
local dMillDiam = 20
@@ -1390,13 +1390,13 @@ local function MakeByMill( Proc, nFacet, nOthFac, nRawId, b3Raw, dSideDist)
if dMillDiam < dDiam or dMaxDepth < dElev then
local sErr = 'Error : Side Elevation too big'
EgtOutLog( sErr)
return false, sErr, true
return false, sErr
end
local dMillExtra = dMillTotLen - dMillLen
if Proc.Box:getMin():getZ() - dMillExtra < b3Raw:getMin():getZ() - 10 * GEO.EPS_SMALL then
local sErr = 'Error : Tool collide with table'
EgtOutLog( sErr)
return false, sErr, true
return false, sErr
end
-- inserisco la lavorazione di contornatura
local sName = 'Mill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
@@ -1453,7 +1453,7 @@ local function MakeByMill( Proc, nFacet, nOthFac, nRawId, b3Raw, dSideDist)
if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchFId, false)
return false, sErr
return false, sErr, nMchFId
end
return true
end
@@ -2797,8 +2797,11 @@ local function MakeTwoFaces( Proc, nRawId, b3Raw)
bLikeAsMakeFirstGroove = false
return MakeSideGrooveByMill( Proc, nFacetVert, nRawId, b3Raw, EgtIf( bEnableMillOnSide and dMaxDepthOnSide, sMillOnSide, nil), dMaxDepthOnSide, bMakeFirstGroove, bMachFromDn, dAng, bLikeAsMakeFirstGroove, nil, nil, bDoubleMillOnSide)
else
local bOk, sErr, bSideMachiningNotFound = MakeByMill( Proc, nFacet, 1 - nFacet, nRawId, b3Raw, dSideDist)
if not bOk and bSideMachiningNotFound then
local bOk, sErr, nInvalidMachId = MakeByMill( Proc, nFacet, 1 - nFacet, nRawId, b3Raw, dSideDist)
if not bOk then
if nInvalidMachId then
EgtRemoveOperation( nInvalidMachId)
end
bOk, sErr = MakeByPocketing( Proc, nFacet, nRawId, b3Raw)
end
-- se angolo ottuso riprendo il lato quasi verticale