DataBeam :

- correzioni a profilature per smussi da sopra e sotto.
This commit is contained in:
DarioS
2021-05-04 10:07:28 +02:00
parent 6abb19d857
commit 7c1494811f
5 changed files with 93 additions and 43 deletions
+15 -6
View File
@@ -385,12 +385,21 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- sempre lavorazione da sopra o da sotto
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
if ( bHead and vtExtr:getY() > 0.1) or
( not bHead and vtExtr:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
-- se lavorazione da sopra o da sotto
if nSide ~= 0 then
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
if ( bHead and vtExtr:getY() > 0.1) or
( not bHead and vtExtr:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
end
else
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
if ( bHead and vtN:getY() > 0.1) or
( not bHead and vtN:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
end
end
-- assegno affondamento e offset radiale
EgtSetMachiningParam( MCH_MP.DEPTH, dDepthCham + dExtra)
+19 -9
View File
@@ -300,8 +300,8 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
bFlagInvert = not bFlagInvert
end
-- se lavorazione a destra da dietro o sinistra di fronte, inverto
if ( bHead and vtNF:getY() > 0.1) or
( not bHead and vtNF:getY() < -0.1) then
if ( bHead and vtN:getY() > 0.1) or
( not bHead and vtN:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
@@ -339,13 +339,23 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- resetto il flag inversione percorso
bFlagInvert = false
-- sempre lavorazione da sopra o da sotto
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
if ( bHead and vtExtr:getY() > 0.1) or
( not bHead and vtExtr:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
-- se lavorazione da sopra o da sotto
if nSide ~= 0 then
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
if ( bHead and vtExtr:getY() > 0.1) or
( not bHead and vtExtr:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
else
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
if ( bHead and vtN:getY() > 0.1) or
( not bHead and vtN:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
end
-- assegno affondamento e offset radiale
EgtSetMachiningParam( MCH_MP.DEPTH, dDepthCham + dExtra)
+19 -9
View File
@@ -300,8 +300,8 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
bFlagInvert = not bFlagInvert
end
-- se lavorazione a destra da dietro o sinistra di fronte, inverto
if ( bHead and vtNF:getY() > 0.1) or
( not bHead and vtNF:getY() < -0.1) then
if ( bHead and vtN:getY() > 0.1) or
( not bHead and vtN:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
@@ -339,13 +339,23 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- resetto il flag inversione percorso
bFlagInvert = false
-- sempre lavorazione da sopra o da sotto
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
if ( bHead and vtExtr:getY() > 0.1) or
( not bHead and vtExtr:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
-- se lavorazione da sopra o da sotto
if nSide ~= 0 then
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
if ( bHead and vtExtr:getY() > 0.1) or
( not bHead and vtExtr:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
else
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
if ( bHead and vtN:getY() > 0.1) or
( not bHead and vtN:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
end
-- assegno affondamento e offset radiale
EgtSetMachiningParam( MCH_MP.DEPTH, dDepthCham + dExtra)
+20 -10
View File
@@ -208,7 +208,7 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- verifico se sono presenti i parametri Q per la profondità smusso e
-- per eseguire in esclusiva solo lo smusso
local bMakeVertCham = BD.DOWN_HEAD
local nChamfer, dDepthCham, sChamfer = VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDepthChamferMill, sPreemptiveChamfer)
local nChamfer, dDepthCham, sChamfer, sChamfer2 = VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDepthChamferMill, sPreemptiveChamfer)
-- se non posso lavorare la feature perché condizionata dall'esecuzione del solo chamfer
-- genero errore e non faccio nulla
if nChamfer < 0 then
@@ -261,8 +261,8 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtSetMachiningParam( MCH_MP.INVERT, true)
end
-- se lavorazione a destra da dietro o sinistra di fronte, inverto
if ( bHead and vtNF:getY() > 0.1) or
( not bHead and vtNF:getY() < -0.1) then
if ( bHead and vtN:getY() > 0.1) or
( not bHead and vtN:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
EgtSetMachiningParam( MCH_MP.INVERT, true)
end
@@ -298,12 +298,22 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- sempre lavorazione da sopra o da sotto
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
if ( bHead and vtExtr:getY() > 0.1) or
( not bHead and vtExtr:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
-- se lavorazione da sopra o da sotto
if nSide ~= 0 then
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
if ( bHead and vtExtr:getY() > 0.1) or
( not bHead and vtExtr:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
end
-- altrimenti lavorazione dal davanti o dal dietro
else
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
if ( bHead and vtN:getY() > 0.1) or
( not bHead and vtN:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
end
end
-- assegno affondamento e offset radiale
EgtSetMachiningParam( MCH_MP.DEPTH, dDepthCham + dExtra)
@@ -415,7 +425,7 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- applico controllo del punto entrata lavorazione e se non è distante dall'esterno
-- della feature inverto il punto di inizio della lavorazione e modifico i parametri dell'attacco
-- e uscita
ModifySideInvertdLead( Proc, bHead, dToolDiam)
ModifySideInvertLead( Proc, bHead, dToolDiam)
end
-- se abilitata, aggiungo lavorazione di finitura
if bFinish then
+20 -9
View File
@@ -304,8 +304,8 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
bFlagInvert = not bFlagInvert
end
-- se lavorazione a destra da dietro o sinistra di fronte, inverto
if ( bHead and vtNF:getY() > 0.1) or
( not bHead and vtNF:getY() < -0.1) then
if ( bHead and vtN:getY() > 0.1) or
( not bHead and vtN:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
@@ -344,13 +344,24 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- resetto il flag inversione percorso
bFlagInvert = false
-- sempre lavorazione da sopra o da sotto
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
if ( bHead and vtExtr:getY() > 0.1) or
( not bHead and vtExtr:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
-- se lavorazione da sopra o da sotto
if nSide ~= 0 then
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
if ( bHead and vtExtr:getY() > 0.1) or
( not bHead and vtExtr:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
-- altrimenti lavorazione dal davanti o dal dietro
else
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
if ( bHead and vtN:getY() > 0.1) or
( not bHead and vtN:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
end
-- assegno affondamento e offset radiale
EgtSetMachiningParam( MCH_MP.DEPTH, dDepthCham + dExtra)