DataBeam :
- in Chamfer corretta giunzione tra lavorazioni successive per feature lunga - in FreeContour e RoundArch aggiunta gestione forzatura codolo centrale anzichè laterale - in LapJoint migliorata gestione lama con fessura e corretta gestione lato asseC per antischeggia con lama invertiti.
This commit is contained in:
+91
-28
@@ -1,4 +1,4 @@
|
||||
-- ProcessLapJoint.lua by Egaltech s.r.l. 2020/08/28
|
||||
-- ProcessLapJoint.lua by Egaltech s.r.l. 2020/09/03
|
||||
-- Gestione calcolo mezzo-legno per Travi
|
||||
-- 2019/10/08 Agg. gestione OpenPocket.
|
||||
|
||||
@@ -3253,6 +3253,10 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, bSinglePart)
|
||||
sPocketing = sMyPocketing
|
||||
end
|
||||
end
|
||||
-- se feature 16 e forzata lama e forma ad U, annulla la svuotatura
|
||||
if Proc.Prc == 16 and bForceUseBlade and Proc.Fct == 3 and bIsU then
|
||||
sPocketing = nil
|
||||
end
|
||||
-- se non trova una svuotatura adatta
|
||||
if not sPocketing then
|
||||
-- se forma a L provo con contornatura
|
||||
@@ -3265,35 +3269,86 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, bSinglePart)
|
||||
else
|
||||
local bTryWithBlades = true
|
||||
local nOk, bOk, sStat, sErr, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, bOrthoFaces
|
||||
-- in base al flag interno e al numero di facce e se ha forma ad U: provo prima la svuotatura sul fianco e
|
||||
-- se non è possibile allora provo in seguito con lama o segacatena
|
||||
-- o passare subito dalla lavorazione con lama/sega catena
|
||||
if bTrySidePocketAtFirst and Proc.Fct == 3 and bIsU then
|
||||
-- lavoro con svuotature (singola o doppia contrapposta)
|
||||
nOk, sErr, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, bOrthoFaces = MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMchFind, true, b3Solid)
|
||||
if nOk < 0 then
|
||||
return false, sErr
|
||||
elseif nOk > 0 then
|
||||
bTryWithBlades = false
|
||||
end
|
||||
bOk = true
|
||||
end
|
||||
-- Se la svuotatura precedente non è stata fatta e smusso non è esclusivo, provo con le lame
|
||||
if bTryWithBlades and nChamfer < 2 then
|
||||
bOk, sWarn, sStat = MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac, dH, dV, dFacElev, bForceUseBlade, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, bOrthoFaces, nBottomFace)
|
||||
if not bOk and sStat == 'MNF' then
|
||||
sPocketing = ML.FindPocketing( sMchFind, dDiam)
|
||||
if not sPocketing then
|
||||
local sErr = 'Error : pocketing not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
-- se feature 16 e abilitato il parametro Q01 (=1) provo prima con la lama e poi con la fresa
|
||||
if Proc.Prc == 16 and bForceUseBlade then
|
||||
-- Se la svuotatura precedente non è stata fatta e smusso non è esclusivo, provo con le lame
|
||||
if bTryWithBlades and nChamfer < 2 then
|
||||
bOk, sWarn, sStat = MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac, dH, dV, dFacElev, bForceUseBlade, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, bOrthoFaces, nBottomFace)
|
||||
if not bOk then
|
||||
-- in base al flag interno e al numero di facce e se ha forma ad U: provo prima la svuotatura sul fianco e
|
||||
-- se non è possibile allora provo in seguito con lama o segacatena
|
||||
-- o passare subito dalla lavorazione con lama/sega catena
|
||||
if Proc.Fct == 3 and bIsU then
|
||||
-- lavoro con svuotature (singola o doppia contrapposta)
|
||||
nOk, sErr, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, bOrthoFaces = MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMchFind, true, b3Solid)
|
||||
if nOk < 0 then
|
||||
return false, sErr
|
||||
elseif nOk == 0 then
|
||||
if sStat == 'MNF' then
|
||||
sPocketing = ML.FindPocketing( sMchFind, dDiam)
|
||||
if not sPocketing then
|
||||
local sErr = 'Error : pocketing not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
else
|
||||
return bOk, sWarn
|
||||
end
|
||||
else
|
||||
bOk = true
|
||||
return bOk, sErr
|
||||
end
|
||||
else
|
||||
sPocketing = ML.FindPocketing( sMchFind, dDiam)
|
||||
if not sPocketing then
|
||||
local sErr = 'Error : pocketing not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
end
|
||||
else
|
||||
return bOk, sWarn
|
||||
end
|
||||
else
|
||||
bOk = true
|
||||
return bOk, sWarn
|
||||
end
|
||||
else
|
||||
-- in base al flag interno e al numero di facce e se ha forma ad U: provo prima la svuotatura sul fianco e
|
||||
-- se non è possibile allora provo in seguito con lama o segacatena
|
||||
-- o passare subito dalla lavorazione con lama/sega catena
|
||||
if bTrySidePocketAtFirst and Proc.Fct == 3 and bIsU then
|
||||
-- lavoro con svuotature (singola o doppia contrapposta)
|
||||
nOk, sErr, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, bOrthoFaces = MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMchFind, true, b3Solid)
|
||||
if nOk < 0 then
|
||||
return false, sErr
|
||||
elseif nOk > 0 then
|
||||
bTryWithBlades = false
|
||||
end
|
||||
bOk = true
|
||||
end
|
||||
-- 03/09/2020 da conferma di Fabio Squaratti: Per ora solo sulla feature 016:
|
||||
-- se ha fallito la fresatura (qua sopra) allora di defalut ( anche se il flag Q della lama è disattivato) prima provo la lama
|
||||
if Proc.Prc == 16 then
|
||||
bForceUseBlade = true
|
||||
end
|
||||
-- Se la svuotatura precedente non è stata fatta e smusso non è esclusivo, provo con le lame
|
||||
if bTryWithBlades and nChamfer < 2 then
|
||||
bOk, sWarn, sStat = MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac, dH, dV, dFacElev, bForceUseBlade, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, bOrthoFaces, nBottomFace)
|
||||
if not bOk and sStat == 'MNF' then
|
||||
sPocketing = ML.FindPocketing( sMchFind, dDiam)
|
||||
if not sPocketing then
|
||||
local sErr = 'Error : pocketing not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
else
|
||||
return bOk, sWarn
|
||||
end
|
||||
-- altrimenti ho già svuotato dal fianco, esco
|
||||
else
|
||||
return bOk, sWarn
|
||||
end
|
||||
-- altrimenti ho già svuotato dal fianco, esco
|
||||
else
|
||||
return bOk, sWarn
|
||||
end
|
||||
end
|
||||
else
|
||||
@@ -3371,9 +3426,17 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, bSinglePart)
|
||||
elseif nSCC == MCH_SCC.ADIR_XM then
|
||||
nInvSCC = MCH_SCC.ADIR_XP
|
||||
elseif nSCC == MCH_SCC.ADIR_YP then
|
||||
nInvSCC = MCH_SCC.ADIR_YM
|
||||
if abs( vtN:getY()) < 0.707 then
|
||||
nInvSCC = MCH_SCC.ADIR_YM
|
||||
else
|
||||
nInvSCC = nSCC
|
||||
end
|
||||
elseif nSCC == MCH_SCC.ADIR_YM then
|
||||
nInvSCC = MCH_SCC.ADIR_YP
|
||||
if abs( vtN:getY()) < 0.707 then
|
||||
nInvSCC = MCH_SCC.ADIR_YP
|
||||
else
|
||||
nInvSCC = nSCC
|
||||
end
|
||||
else
|
||||
nInvSCC = nSCC
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user