Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bcde9ae19c | |||
| 5004bc97b6 | |||
| c9cefa618e | |||
| dedf1366e6 | |||
| 915f8973db | |||
| 6ee0d46ff5 | |||
| bf9d0d2b8f | |||
| 0443133557 | |||
| dabd2d2681 | |||
| 2eccd38463 | |||
| 260b8f36bb | |||
| 0e0c78edf4 | |||
| 5e9ff056c2 | |||
| dbbdd9f0df | |||
| df1cb76993 |
+73
-35
@@ -18,6 +18,7 @@
|
|||||||
-- 2022/08/30 Modificata la condizione che determina l'utilizzo della testa da sotto. Ora controlla se la trave è più grande del doppio della massima larghezza del cubetto.
|
-- 2022/08/30 Modificata la condizione che determina l'utilizzo della testa da sotto. Ora controlla se la trave è più grande del doppio della massima larghezza del cubetto.
|
||||||
-- 2022/09/23 Corretta la condizione per cui è richiesto l'aggiornamento del grezzo.
|
-- 2022/09/23 Corretta la condizione per cui è richiesto l'aggiornamento del grezzo.
|
||||||
-- 2023/01/26 Migliorata la direzione di lavoro della lama in alcuni casi in cui il truciolo veniva scaricato dal lato errato.
|
-- 2023/01/26 Migliorata la direzione di lavoro della lama in alcuni casi in cui il truciolo veniva scaricato dal lato errato.
|
||||||
|
-- 2023/06/19 Aggiunti tagli speciali per evitare il rischio che il cubetto rimanga appoggiato al motore.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessCut = {}
|
local ProcessCut = {}
|
||||||
@@ -395,6 +396,19 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
|||||||
if bCustDiceCut and #vCuts == 0 then
|
if bCustDiceCut and #vCuts == 0 then
|
||||||
return false, -1
|
return false, -1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- per caso speciale in cui c'è il rischio che il cubetto rimanga appoggiato sul motore, faccio solo i tagli perpendicolari seguiti da due tagli verticali laterali
|
||||||
|
local bDangerousReliefCut = false
|
||||||
|
local frFace = BL.GetFaceHvRefDim( Proc.Id, 0)
|
||||||
|
-- verifico che i tagli perpendicolari siano perpendicolari al lato più vicino a Z
|
||||||
|
local nFirstPerpendicularCut = ( #vCuts ~= 0 and ( vCuts[1][1] or vCuts[3][1]))
|
||||||
|
if nFirstPerpendicularCut then
|
||||||
|
local vtTemp = EgtSurfTmFacetNormVersor( nFirstPerpendicularCut, 0, GDB_ID.ROOT) ^ frFace:getVersX()
|
||||||
|
if #vCuts > 0 and not ( vtTemp:isSmall()) and not ( bDownCut or bFromBottom) and not bLongCut then
|
||||||
|
bDangerousReliefCut = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--DC.PrintOrderCut( vCuts)
|
--DC.PrintOrderCut( vCuts)
|
||||||
if #vCuts > 0 then
|
if #vCuts > 0 then
|
||||||
-- sistemo posizione nel DB e nome
|
-- sistemo posizione nel DB e nome
|
||||||
@@ -453,44 +467,68 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- lavoro la faccia
|
local _, dDiceFaceH = BL.GetFaceHvRefDim( vCuts[i][1] or GDB_ID.NULL, 0)
|
||||||
for j = 1, #vCuts[i] do
|
-- caso speciale con rischio cubetto sul motore
|
||||||
-- se taglio dal basso
|
if ( i % 2 == 0) and bDangerousReliefCut and ( dMaxDepth * 2 > dDiceFaceH + BD.CUT_EXTRA) then
|
||||||
if bDownCut then
|
local bDoubleCut = false
|
||||||
-- se strato pari composto da 1 o 2 elementi
|
local nSurfToCut
|
||||||
if ( i % 2) == 0 and #vCuts[i] <= 2 then
|
local dCutExtra = BD.CUT_EXTRA
|
||||||
-- il primo elemento prende la direzione prevista, il secondo quella opposta
|
if dMaxDepth < dDiceFaceH + BD.CUT_EXTRA then
|
||||||
local vtNewOrthoO = Vector3d( vtOrthoO)
|
bDoubleCut = true
|
||||||
local dVzLimDwnUp = dNzLimDwnUp
|
dCutExtra = - 0.5 * b3Raw:getDimY() + BD.CUT_EXTRA
|
||||||
if j ~= 1 then
|
end
|
||||||
vtNewOrthoO = -vtOrthoO
|
nSurfToCut = EgtSurfTmBySewing( nAddGrpId, vCuts[i], false)
|
||||||
if not BD.C_SIMM and not BD.TURN and abs( vtN:getY()) > 0.05 then dVzLimDwnUp = -0.708 end
|
local nFaceUseCut1, nFaceUseCut2 = MCH_MILL_FU.ORTHO_BACK, MCH_MILL_FU.ORTHO_FRONT
|
||||||
|
if Proc.Tail then
|
||||||
|
nFaceUseCut1, nFaceUseCut2 = nFaceUseCut2, nFaceUseCut1
|
||||||
|
end
|
||||||
|
if bDoubleCut then
|
||||||
|
local bOk, sErr = Fbs.MakeOne( nSurfToCut, 0, sCutting, dSawDiam, nFaceUseCut1, nil, dCutExtra, BD.CUT_SIC, 0, 0, 0, '', b3Raw, true)
|
||||||
|
if not bOk then return false, sErr end
|
||||||
|
end
|
||||||
|
local bOk2, sErr2 = Fbs.MakeOne( nSurfToCut, 0, sCutting, dSawDiam, nFaceUseCut2, nil, dCutExtra, BD.CUT_SIC, 0, 0, 0, '', b3Raw)
|
||||||
|
if not bOk2 then return false, sErr2 end
|
||||||
|
-- caso standard
|
||||||
|
else
|
||||||
|
-- lavoro la faccia
|
||||||
|
for j = 1, #vCuts[i] do
|
||||||
|
-- se taglio dal basso
|
||||||
|
if bDownCut then
|
||||||
|
-- se strato pari composto da 1 o 2 elementi
|
||||||
|
if ( i % 2) == 0 and #vCuts[i] <= 2 then
|
||||||
|
-- il primo elemento prende la direzione prevista, il secondo quella opposta
|
||||||
|
local vtNewOrthoO = Vector3d( vtOrthoO)
|
||||||
|
local dVzLimDwnUp = dNzLimDwnUp
|
||||||
|
if j ~= 1 then
|
||||||
|
vtNewOrthoO = -vtOrthoO
|
||||||
|
if not BD.C_SIMM and not BD.TURN and abs( vtN:getY()) > 0.05 then dVzLimDwnUp = -0.708 end
|
||||||
|
end
|
||||||
|
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtNewOrthoO, dVzLimDwnUp, BD.CUT_EXTRA, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
|
||||||
|
if not bOk then return bOk, sErr end
|
||||||
end
|
end
|
||||||
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtNewOrthoO, dVzLimDwnUp, BD.CUT_EXTRA, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
|
-- tutti gli altri casi vengono saltati
|
||||||
|
-- caso generale
|
||||||
|
else
|
||||||
|
-- in generale sta sollevato di pochissimo
|
||||||
|
local dExtraCut = -0.1
|
||||||
|
-- se tagli paralleli
|
||||||
|
if ( i % 2) == 0 then
|
||||||
|
-- se non ci sono tagli ortogonali devo affondare
|
||||||
|
if bNoPerpCuts then
|
||||||
|
dExtraCut = BD.CUT_EXTRA
|
||||||
|
-- se altrimenti tagli ortogonali invertiti, devo approfondire dello spessore lama
|
||||||
|
elseif bOrthInv then
|
||||||
|
dExtraCut = dSawThick
|
||||||
|
-- se ultimo taglio, devo affondare
|
||||||
|
elseif j == #vCuts[i] then
|
||||||
|
dExtraCut = BD.CUT_EXTRA
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local dVzLimDwnUp = dNzLimDwnUp
|
||||||
|
if not BD.C_SIMM and not BD.TURN and vtN:getZ() > 0.707 then dVzLimDwnUp = -0.708 end
|
||||||
|
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dExtraCut, BD.CUT_SIC, 0, 0, 0, sNotes, b3Raw)
|
||||||
if not bOk then return bOk, sErr end
|
if not bOk then return bOk, sErr end
|
||||||
end
|
end
|
||||||
-- tutti gli altri casi vengono saltati
|
|
||||||
-- caso generale
|
|
||||||
else
|
|
||||||
-- in generale sta sollevato di pochissimo
|
|
||||||
local dExtraCut = -0.1
|
|
||||||
-- se tagli paralleli
|
|
||||||
if ( i % 2) == 0 then
|
|
||||||
-- se non ci sono tagli ortogonali devo affondare
|
|
||||||
if bNoPerpCuts then
|
|
||||||
dExtraCut = BD.CUT_EXTRA
|
|
||||||
-- se altrimenti tagli ortogonali invertiti, devo approfondire dello spessore lama
|
|
||||||
elseif bOrthInv then
|
|
||||||
dExtraCut = dSawThick
|
|
||||||
-- se ultimo taglio, devo affondare
|
|
||||||
elseif j == #vCuts[i] then
|
|
||||||
dExtraCut = BD.CUT_EXTRA
|
|
||||||
end
|
|
||||||
end
|
|
||||||
local dVzLimDwnUp = dNzLimDwnUp
|
|
||||||
if not BD.C_SIMM and not BD.TURN and vtN:getZ() > 0.707 then dVzLimDwnUp = -0.708 end
|
|
||||||
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dExtraCut, BD.CUT_SIC, 0, 0, 0, sNotes, b3Raw)
|
|
||||||
if not bOk then return bOk, sErr end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
-- 2022/11/24 In MakeByMill aggiunta la lavorazione sopra/sotto nel caso di testa sotto
|
-- 2022/11/24 In MakeByMill aggiunta la lavorazione sopra/sotto nel caso di testa sotto
|
||||||
-- In MakeByMill se BeamData forza lettura codolo da Q questo viene sempre fatto indipendentemente dalle dimensioni della feature
|
-- In MakeByMill se BeamData forza lettura codolo da Q questo viene sempre fatto indipendentemente dalle dimensioni della feature
|
||||||
-- 2023/03/03 Corretta MakeByMark ( non definiti b3Raw e b3Aux ).
|
-- 2023/03/03 Corretta MakeByMark ( non definiti b3Raw e b3Aux ).
|
||||||
|
-- 2023/06/21 In CalcSpecialAdd modificato l'angolo minimo da 5 a 15 deg.
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
local ProcessFreeContour = {}
|
local ProcessFreeContour = {}
|
||||||
@@ -206,8 +207,8 @@ local function CalcSpecialAdd( nCrv, bStartVsEnd, dToolDiam)
|
|||||||
-- tangenti prima e dopo il punto interno
|
-- tangenti prima e dopo il punto interno
|
||||||
local vtPrev = EgtUV( nCrv, nIn, -1)
|
local vtPrev = EgtUV( nCrv, nIn, -1)
|
||||||
local vtNext = EgtUV( nCrv, nIn, 1)
|
local vtNext = EgtUV( nCrv, nIn, 1)
|
||||||
-- se c'è perdita di tangenza (delta angolare oltre i 5 gradi)
|
-- se c'è perdita di tangenza (delta angolare oltre i 15 gradi)
|
||||||
if vtPrev * vtNext < 0.996 then
|
if vtPrev * vtNext < 0.966 then
|
||||||
-- lunghezza del tratto
|
-- lunghezza del tratto
|
||||||
local ptP0 = EgtUP( nCrv, nOut)
|
local ptP0 = EgtUP( nCrv, nOut)
|
||||||
local ptP1 = EgtUP( nCrv, nIn)
|
local ptP1 = EgtUP( nCrv, nIn)
|
||||||
|
|||||||
Reference in New Issue
Block a user