This commit is contained in:
luca.bacis
2021-12-20 09:56:59 +01:00
parent 409f62de52
commit 9f320e4934
+15 -18
View File
@@ -1079,7 +1079,7 @@ local function MakePreCuts( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Raw, nCha
end
---------------------------------------------------------------------
local function MakeByMill( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac, dH, dV, dElev, dCollSic, bSpecialApp, sMillMaster, nFacInd2, dFacElev2)
local function MakeByMill( Proc, nFacInd, rfFac, dH, dV, dElev, dCollSic, bSpecialApp, sMillMaster, nFacInd2, dFacElev2)
-- Cerco una faccia adiacente alla principale sul lato lungo
local nFacAdj, sErr = GetFaceAdj( Proc, nFacInd, dH, dV)
if nFacAdj < 0 then
@@ -1157,10 +1157,10 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac, dH, dV
-- inserisco la lavorazione di fresatura
local sName = 'Mill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
-- <LB> --
sName = sName .. '_F' .. tostring(nFacAdj)
EgtOutLog( '*** Milling Face=' .. tostring( nFacAdj))
-- <LB> --
-- <LB> --
EgtOutLog( '*** FaceUse=' .. tostring( nFaceUse))
EgtOutLog( '*** Milling on Face=' .. tostring( nFacAdj))
-- <LB> --
local nMchFId = EgtAddMachining( sName, sMilling)
if not nMchFId then
@@ -4462,6 +4462,7 @@ local function MakeBySideMill( Proc)
return true, ''
end
---------------------------------------------------------------------
local function AreFacesOrthogonal( nSurfId, nFacInd, nFacInd2, dCosSideAng)
-- recupero il numero di facce
if not dCosSideAng then
@@ -4555,7 +4556,7 @@ local function MakeSpecialThreeFaces( Proc, nPhase, bIsL, nRawId, nPartId, dOvmH
rfFac, rfFac2 = rfFac2, rfFac
vtN, vtN2 = vtN2, vtN
end
-- <LB> prendo a riferimento l'altra faccia
nPockFace = nFacInd2
sPocketing = ML.FindPocketing( sMchFind, dDiam2, dFacElev2 + dCollSic2)
@@ -4574,7 +4575,7 @@ local function MakeSpecialThreeFaces( Proc, nPhase, bIsL, nRawId, nPartId, dOvmH
local dDiamTool = 20
if bIsL then
local bOk, sWarn
bOk, sWarn, dDiamTool = MakeByMill( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac, dH, dV, dFacElev, dCollSic, true, sMilling, nFacInd2, dFacElev2)
bOk, sWarn, _ = MakeByMill( Proc, nFacInd, rfFac, dH, dV, dFacElev, dCollSic, true, sMilling, nFacInd2, dFacElev2)
if not bOk then return bOk, sWarn end
else
local sErr = 'Error : Impossible mill special LapJoint'
@@ -4583,9 +4584,6 @@ local function MakeSpecialThreeFaces( Proc, nPhase, bIsL, nRawId, nPartId, dOvmH
end
-- inserisco la lavorazione di svuotatura
local sName = 'Pock_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
-- <LB>
sName = sName .. '_F' .. tostring(nPockFace)
-- <LB>
local nMchFId = EgtAddMachining( sName, sPocketing)
if not nMchFId then
local sErr = 'Error adding machining ' .. sName .. '-' .. sPocketing
@@ -4593,8 +4591,6 @@ local function MakeSpecialThreeFaces( Proc, nPhase, bIsL, nRawId, nPartId, dOvmH
return false, sErr
end
EgtOutLog( '*** -----------------------------------------------------------------')
-- aggiungo geometria
EgtSetMachiningGeometry( {{ Proc.Id, nPockFace}})
-- imposto uso faccia
@@ -4632,6 +4628,10 @@ local function MakeSpecialThreeFaces( Proc, nPhase, bIsL, nRawId, nPartId, dOvmH
if not bOk then return false, sWarn end
end
--- <LB> ---
--ShowFacesNumber( Proc.Id)
EgtOutLog( '*** -----------------------------------------------------------------')
return true, ''
end
@@ -4719,7 +4719,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
local bTryWithBlades = true
-- lavoro fessura con svuotature (singola o doppia contrapposta)
local sMyMchFind = 'Pocket'
local nOk, sErr, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace = MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMyMchFind, false, b3Solid, bClosedOrthoFaces)
local nOk, sErr, dDimMin, dDimMax, dDepth, vtOrtho,
nLundIdFace = MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMyMchFind, false, b3Solid, bClosedOrthoFaces)
if nOk < 0 then
return false, sErr
elseif nOk > 0 then
@@ -4844,10 +4845,6 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
-- se riconosciuta gestione 3 facce
-- e limitata per ora alla feature 20
if bSpecial3faces and Proc.Prc == 20 and nFacInd2 then
--- <LB> ---
--ShowFacesNumber( Proc.Id)
-- se smusso non è esclusivo
if nChamfer < 2 then
local bOk, sErr = MakeSpecialThreeFaces( Proc, nPhase, bIsL, nRawId, nPartId, dOvmHead, b3Raw, nChamfer)
@@ -5086,7 +5083,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
if bIsL and not bSpecialMillOnSide then
-- se smusso non è esclusivo
if nChamfer < 2 then
return MakeByMill( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac, dH, dV, dFacElev, dCollSic)
return MakeByMill( Proc, nFacInd, rfFac, dH, dV, dFacElev, dCollSic)
end
-- altrimenti, in base alla forma, provo con svuotature di fianco o con la sega a catena o lama
else