|
|
|
@@ -78,6 +78,7 @@
|
|
|
|
|
-- 2023/09/26 Modificata chiamata a GetFaceWithMostAdj.
|
|
|
|
|
-- 2023/09/27 In MakeMoreFaces e Classify refactoring della gestione scanalatura chiusa.
|
|
|
|
|
-- 2023/09/27 In MakeLongMoreFaces aggiunto Topology.Classify alla Proc creata.
|
|
|
|
|
-- 2023/10/03 In MakePocket aggiunto messaggio in caso si rovini il pezzo successivo.
|
|
|
|
|
|
|
|
|
|
-- Tabella per definizione modulo
|
|
|
|
|
local ProcessLapJoint = {}
|
|
|
|
@@ -3077,8 +3078,9 @@ local function MakeAntiSplintBySaw( Proc, nFacet, vtN, b3Raw, nFacInd, bReduceDe
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
---------------------------------------------------------------------
|
|
|
|
|
local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFind, nUseRoughTool, sMasterPocket, dPrevFaceElev, tDimAndRef, dAng, bOpenOutRaw, bLapJointAngTrasm)
|
|
|
|
|
|
|
|
|
|
local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFind, nUseRoughTool, sMasterPocket, dPrevFaceElev, tDimAndRef, dAng, bOpenOutRaw, bLapJointAngTrasm, nPhase, nRawId)
|
|
|
|
|
-- distanza dal pezzo successivo
|
|
|
|
|
local dDistToNextPiece = BL.GetDistanceToNextPart( nRawId, nPhase)
|
|
|
|
|
-- calcolo l'elevazione dal punto medio
|
|
|
|
|
local dElev
|
|
|
|
|
local dLenIn, dLedOut = BL.GetPointDirDepth( nPartId, ptPs, tvtN[2])
|
|
|
|
@@ -3201,6 +3203,11 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin
|
|
|
|
|
return false, sErr
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
-- se la lavorazione rovina il pezzo successivo emetto warning
|
|
|
|
|
if ( not Proc.Tail or Proc.AdvTail) and Proc.AffectedFaces.Left and dDistToNextPiece < dDiamTool / 2 then
|
|
|
|
|
sWarn = 'Warning on pocketing ' .. sName .. ': machining can damage next piece. Minimum distance needed : ' .. ( 1 + dDiamTool / 2) .. ' mm'
|
|
|
|
|
EgtOutLog( sWarn)
|
|
|
|
|
end
|
|
|
|
|
if BD.TURN then
|
|
|
|
|
-- centro del pezzo
|
|
|
|
|
local ptCen = ORIG()
|
|
|
|
@@ -3244,7 +3251,7 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
|
|
|
|
|
-- se l'angolo dalla verticale si discosta di più dell'angolo limite impostato, utilizzo la svuotatura
|
|
|
|
|
if cos( dDiffFromSqAng) < cos( dAngLimit) then
|
|
|
|
|
-- applico la svuotatura
|
|
|
|
|
local bOk, sWarn, sTuuidPk, dDiamTool, dElev = MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nSideFace, sMchFind, nUseRoughTool, sPocketing, dPrevFaceElev, tDimAndRef, dAng)
|
|
|
|
|
local bOk, sWarn, sTuuidPk, dDiamTool, dElev = MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nSideFace, sMchFind, nUseRoughTool, sPocketing, dPrevFaceElev, tDimAndRef, dAng, nil, nil, nPhase, nRawId)
|
|
|
|
|
if not bOk then
|
|
|
|
|
-- se ho id utensile e diametro è perchè non ha fatto svuotatura perchè la faccia è più stretta del diametro utensile
|
|
|
|
|
-- e provo ad inserire singola passata di testa
|
|
|
|
@@ -5178,7 +5185,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|
|
|
|
dToolMaxDiam = min ( dFacDim1, dFacDim2, dToolTargetDiam)
|
|
|
|
|
end
|
|
|
|
|
local _, sPocketing = VerifyPocket( Proc, dToolMaxDiam, dFacElev, nil, sMyMchFind)
|
|
|
|
|
bOk, sWarn2, sTuuidPk, dDiamTool, dDepth = MakePocket( Proc, nPartId, b3Solid, ptPs, tvtNx, nFacInd, sMyMchFind, nUseRoughTool, sPocketing, dMachDepth, nil, nil, bAllWithEndCap)
|
|
|
|
|
bOk, sWarn2, sTuuidPk, dDiamTool, dDepth = MakePocket( Proc, nPartId, b3Solid, ptPs, tvtNx, nFacInd, sMyMchFind, nUseRoughTool, sPocketing, dMachDepth, nil, nil, bAllWithEndCap, nil, nPhase, nRawId)
|
|
|
|
|
if not bOk then return false, sWarn2 end
|
|
|
|
|
if sWarn2 then
|
|
|
|
|
if not sWarn then sWarn = '' end
|
|
|
|
@@ -5388,7 +5395,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|
|
|
|
dMachiningDepth = dFacElev + dCollSic
|
|
|
|
|
end
|
|
|
|
|
local bOk, sWarn2
|
|
|
|
|
bOk, sWarn2, sTuuidPk, dDiamTool = MakePocket( Proc, nPartId, b3Solid, ptC, tvtNx, nFacInd, sMchFind, nUseRoughTool, sPocketing, dMachiningDepth, nil, nil, bAllWithEndCap, bLapJointAngTrasm)
|
|
|
|
|
bOk, sWarn2, sTuuidPk, dDiamTool = MakePocket( Proc, nPartId, b3Solid, ptC, tvtNx, nFacInd, sMchFind, nUseRoughTool, sPocketing, dMachiningDepth, nil, nil, bAllWithEndCap, bLapJointAngTrasm, nPhase, nRawId)
|
|
|
|
|
if not bOk then return false, sWarn2 end
|
|
|
|
|
if sWarn2 then
|
|
|
|
|
if not sWarn then sWarn = '' end
|
|
|
|
@@ -5631,6 +5638,7 @@ local function MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|
|
|
|
local nFct = EgtSurfTmFacetCount( vAddId[i])
|
|
|
|
|
local AddProc = { Id = vAddId[i], Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Box, TotBox = Proc.Box, Fct = nFct, Flg = Proc.Flg, PartId = Proc.PartId}
|
|
|
|
|
Topology.Classify( AddProc, b3Raw)
|
|
|
|
|
AddProc.AffectedFaces = BL.GetProcessAffectedFaces( AddProc)
|
|
|
|
|
-- lasciare il false nel sesto parametro (perchè internamente viene verificato se diverso da nil)
|
|
|
|
|
local bOk, sMyWarn
|
|
|
|
|
bOk, sMyWarn, bPrevBhSideMill = MakeMoreFaces( AddProc, nPhase, nRawId, nPartId, dOvmHead, bAllWithEndCap, bPrevBhSideMill, bAllWithEndCap)
|
|
|
|
|