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:
@@ -1,4 +1,4 @@
|
||||
-- ProcessChamfer.lua by Egaltech s.r.l. 2020/06/09
|
||||
-- ProcessChamfer.lua by Egaltech s.r.l. 2020/09/01
|
||||
-- Gestione calcolo profilo libero per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -80,11 +80,11 @@ function ProcessChamfer.Make( Proc, nPhase, nRawId, nPartId)
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sErr
|
||||
end
|
||||
|
||||
-- altrimenti smusso standard
|
||||
else
|
||||
-- normale ed elevazione della faccia principale
|
||||
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
|
||||
local _, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, 0, GDB_ID.ROOT)
|
||||
local _, dElev = BL.GetPointDirDepth( nPartId, ptC, vtN)
|
||||
local bFront = ( vtN:getY() < 0)
|
||||
-- limitazioni su inizio e fine derivanti da altre facce
|
||||
@@ -119,6 +119,9 @@ function ProcessChamfer.Make( Proc, nPhase, nRawId, nPartId)
|
||||
end
|
||||
-- determino numero di parti
|
||||
local dLen = Proc.Box:getDimX()
|
||||
-- calcolo la differenza tra lunghezza faccia 0 e lunghezza feature
|
||||
-- per far corrispondere i punti di inizio-fine delle lavorazioni multiple (a passi)
|
||||
local dAddLen = (( dH - dLen) / EgtIf( bLimXmax and bLimXmin , 2, 1))
|
||||
local dStartAccDist = BD.LONGCUT_ENDLEN
|
||||
local dEndAccDist = BD.LONGCUT_ENDLEN
|
||||
local nC = ceil( ( dLen - dStartAccDist - dEndAccDist) / BD.LONGCUT_MAXLEN)
|
||||
@@ -157,11 +160,11 @@ function ProcessChamfer.Make( Proc, nPhase, nRawId, nPartId)
|
||||
-- imposto attacchi e uscite
|
||||
local dSal, dEal
|
||||
if bFront then
|
||||
dSal = EgtIf( i == 1, dStartAll, -( i - 1) * dC)
|
||||
dEal = EgtIf( i == nC, dEndAll, -( nC - i) * dC)
|
||||
dSal = EgtIf( i == 1, dStartAll, -( i - 1) * dC - dAddLen + 0.5)
|
||||
dEal = EgtIf( i == nC, dEndAll, -( nC - i) * dC - dAddLen + 0.5)
|
||||
else
|
||||
dSal = EgtIf( i == nC, dStartAll, -( nC - i) * dC)
|
||||
dEal = EgtIf( i == 1, dEndAll, -( i - 1) * dC)
|
||||
dSal = EgtIf( i == nC, dStartAll, -( nC - i) * dC - dAddLen + 0.5)
|
||||
dEal = EgtIf( i == 1, dEndAll, -( i - 1) * dC - dAddLen + 0.5)
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dSal)
|
||||
EgtSetMachiningParam( MCH_MP.LIPERP, dMillDiam / 4)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- ProcessFreeContour.lua by Egaltech s.r.l. 2020/08/26
|
||||
-- ProcessFreeContour.lua by Egaltech s.r.l. 2020/09/03
|
||||
-- Gestione calcolo profilo libero per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -215,12 +215,20 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
dDepth = dDepth + BD.CUT_EXTRA
|
||||
end
|
||||
end
|
||||
if dDepth > dMaxDepth then
|
||||
if bCanDouble then
|
||||
nDouble = 2
|
||||
dDepth = min( 0.5 * dDepth, dMaxDepth)
|
||||
else
|
||||
dDepth = dMaxDepth
|
||||
-- se parametro beamdata forza codolo in centro e lavorazione orizzontale e se larghezza trave è sufficientemente larga
|
||||
if BD.DIM_TO_CENTER_STRIP and BD.DIM_TO_CENTER_STRIP > 10 * GEO.EPS_SMALL and nStep > 1 and
|
||||
bCanDouble and b3Raw:getDimY() > BD.DIM_TO_CENTER_STRIP - 0.1 then
|
||||
nDouble = 2
|
||||
dDepth = min( ( b3Raw:getDimY() - BD.DIM_STRIP) * 0.5, dMaxDepth)
|
||||
else
|
||||
-- se altezza geometria supera capacità taglio utensile ed è orizzontale setto per eseguire codolo in centro
|
||||
if dDepth > dMaxDepth then
|
||||
if bCanDouble then
|
||||
nDouble = 2
|
||||
dDepth = min( 0.5 * dDepth, dMaxDepth)
|
||||
else
|
||||
dDepth = dMaxDepth
|
||||
end
|
||||
end
|
||||
end
|
||||
-- se utensile orizzontale verso Y+, non in doppio e codolo da lasciare, devo invertire per lavorare sempre da Y-
|
||||
|
||||
+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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- ProcessRoundArch.lua by Egaltech s.r.l. 2019/12/07
|
||||
-- ProcessRoundArch.lua by Egaltech s.r.l. 2020/09/03
|
||||
-- Gestione calcolo archi per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -155,12 +155,20 @@ function ProcessRoundArch.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
dDepth = dDepth + BD.CUT_EXTRA
|
||||
end
|
||||
end
|
||||
if dDepth > dMaxDepth then
|
||||
if bCanDouble then
|
||||
nDouble = 2
|
||||
dDepth = min( 0.5 * dDepth, dMaxDepth)
|
||||
else
|
||||
dDepth = dMaxDepth
|
||||
-- se parametro beamdata forza codolo in centro e lavorazione orizzontale e se larghezza trave è sufficientemente larga
|
||||
if BD.DIM_TO_CENTER_STRIP and BD.DIM_TO_CENTER_STRIP > 10 * GEO.EPS_SMALL and nStep > 1 and
|
||||
bCanDouble and b3Raw:getDimY() > BD.DIM_TO_CENTER_STRIP - 0.1 then
|
||||
nDouble = 2
|
||||
dDepth = min( ( b3Raw:getDimY() - BD.DIM_STRIP) * 0.5, dMaxDepth)
|
||||
else
|
||||
-- se altezza geometria supera capacità taglio utensile ed è orizzontale setto per eseguire codolo in centro
|
||||
if dDepth > dMaxDepth then
|
||||
if bCanDouble then
|
||||
nDouble = 2
|
||||
dDepth = min( 0.5 * dDepth, dMaxDepth)
|
||||
else
|
||||
dDepth = dMaxDepth
|
||||
end
|
||||
end
|
||||
end
|
||||
-- se utensile orizzontale verso Y+, non in doppio e codolo da lasciare, devo invertire per lavorare sempre da Y-
|
||||
|
||||
Reference in New Issue
Block a user