DataBeam :

- in DiceCut ora si fanno i cubetti anche quando le facce superano la massima lunghezza anche se strette
- in Cut corretto orientamento testa per tagli particolari
- rifatta Classify di DoubleCut
- in Drill migliorato controllo ingombro pinza portautensile
- in Tenon e DtTenon portato a 6 il massimo numero di passi.
This commit is contained in:
Dario Sassi
2020-09-25 05:51:49 +00:00
parent 56e5cfc517
commit 14d500e4ab
7 changed files with 79 additions and 51 deletions
+37 -15
View File
@@ -1,4 +1,4 @@
-- ProcessCut.lua by Egaltech s.r.l. 2020/09/22
-- ProcessCut.lua by Egaltech s.r.l. 2020/09/24
-- Gestione calcolo singoli tagli di lama per Travi
-- Tabella per definizione modulo
@@ -38,8 +38,7 @@ function ProcessCut.Classify( Proc, b3Raw)
local _, DimH, DimV = BL.GetFaceHvRefDim( Proc.Id, 0)
-- confronto anche qua la distanza maggiore della faccia con la massima distanza del DiceCut
-- e se il rapporto supera il 2 (implica che genera 3 tagli) dichiaro impossibile la lavorazione
if DimH and BD.MAX_DIM_DICE and abs(BD.MAX_DIM_DICE) > 20 * GEO.EPS_SMALL and
abs( DimH / BD.MAX_DIM_DICE) > 2 then
if DimH and BD.MAX_DIM_DICE and abs( BD.MAX_DIM_DICE) > 20 * GEO.EPS_SMALL and abs( DimH / BD.MAX_DIM_DICE) > 2 then
return true, true
end
end
@@ -266,7 +265,17 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom)
if #vCuts[i-1] > 0 then
vtO = EgtSurfTmFacetNormVersor( vCuts[i-1][1], 0, GDB_ID.ROOT)
elseif vCuts[i+1] and #vCuts[i+1] > 0 then
vtO = EgtSurfTmFacetNormVersor( vCuts[i+1][1], 0, GDB_ID.ROOT)
-- lunghezza faccia nell'eventuale direzione ortogonale
local asseX = EgtSurfTmFacetNormVersor( vCuts[i+1][1], 0, GDB_ID.ROOT)
local asseY = asseX ^ vtN
local Frame = Frame3d( ptC, ptC + asseX, ptC + asseY)
local b3Fac = EgtGetBBoxRef( vCuts[i][1], GDB_BB.STANDARD, Frame)
-- se lunghezza inferiore al limite, accetto la direzione
if b3Fac:getDimX() < dMaxDepth - BD.CUT_EXTRA then
vtO = asseX
else
bNoPerpCuts = true
end
else
bNoPerpCuts = true
end
@@ -288,7 +297,7 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom)
end
-- lavoro la faccia
for j = 1, #vCuts[i] do
-- se taglio dal basso
-- 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
@@ -328,27 +337,40 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom)
end
-- altrimenti tagli diretti della faccia
else
-- tagli molto di lato e inclinati sono permessi fino a -45deg
if abs( vtN:getX()) < 0.5 then dNzLimDwnUp = -0.707 end
-- lavoro la faccia
local vtOrthoO
if bFromBottom and dCutV < dMaxDepth - BD.CUT_EXTRA and vtN:getZ() > 0 then
vtOrthoO = -Z_AX()
elseif bHorizCut then
vtOrthoO = Z_AX()
elseif Proc.Head and abs( vtN:getY()) > 0.259 and vtN:getZ() > -0.174 and abs( vtN:getY()) > abs( vtN:getZ()) and dCutH < dMaxDepth + 10 * GEO.EPS_SMALL then
vtOrthoO = X_AX()
elseif Proc.Tail and abs( vtN:getY()) > 0.259 and vtN:getZ() > -0.174 and abs( vtN:getY()) > abs( vtN:getZ()) and dCutH < dMaxDepth + 10 * GEO.EPS_SMALL then
vtOrthoO = -X_AX()
elseif vtN:getY() > -0.02 then
if not Proc.Head then
vtOrthoO = -Y_AX()
elseif b3Solid:getDimX() < BD.LEN_SHORT_PART and abs( vtN:getY()) > 0.259 and vtN:getZ() > -0.174 and abs( vtN:getY()) > abs( vtN:getZ()) and dCutH < dMaxDepth + 10 * GEO.EPS_SMALL then
if Proc.Head then
vtOrthoO = X_AX()
else
vtOrthoO = -X_AX()
end
elseif vtN:getZ() < dNzLimDwnUp and abs( vtN:getY()) > 0.259 and abs( vtN:getY()) > abs( vtN:getZ()) and dCutH < dMaxDepth + 10 * GEO.EPS_SMALL then
if Proc.Head then
vtOrthoO = X_AX()
else
vtOrthoO = -X_AX()
end
elseif vtN:getY() > -0.02 then
if Proc.Head then
vtOrthoO = Y_AX()
else
vtOrthoO = -Y_AX()
end
else
vtOrthoO = -Y_AX()
if Proc.Head then
vtOrthoO = Y_AX()
else
vtOrthoO = -Y_AX()
end
end
-- tagli molto di lato e inclinati sono permessi fino a -45deg
if abs( vtN:getX()) < 0.5 then dNzLimDwnUp = -0.707 end
-- taglio
local bOk, sErr = BL.MakeOneFaceBySaw( Proc.Id, 0, sCutting, dSawDiam, vtOrthoO, dNzLimDwnUp, BD.CUT_EXTRA, BD.CUT_SIC, 0, 0, nil, b3Raw)
if not bOk then
return bOk, sErr