DataBeam :

- correzioni per finiture profili (errore segnalato da Olav)
- correzioni LapJoint con processo 17 e similari.
This commit is contained in:
Dario Sassi
2021-03-30 08:04:23 +00:00
parent 5e5a21a7ad
commit c48db72693
6 changed files with 56 additions and 46 deletions
+6 -6
View File
@@ -191,7 +191,7 @@ local function TestElleShape4( Proc)
end
if nFac3Adj ~= 2 then return false end
-- verifico se L profonda oppure lunga
if dMinArea3 < dMaxArea2 then
if dMinArea3 < 2 * dMaxArea2 then
return 1
else
return 2
@@ -634,11 +634,11 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
local ptC2, vtN2 = EgtSurfTmFacetCenter( Proc.Id, nFaceAdj, GDB_ID.ROOT)
bDown = ( vtN2:getZ() < BD.NZ_MINB)
end
-- verifico se la faccia principale è sottosquadra, ha forma L e anche la faccia adiacente
elseif vtN:getZ() < -10 * GEO.EPS_SMALL and bIsL and nFaceAdj >= 0 then
-- verifico se la faccia principale è sottosquadra, ha forma L ed esiste la faccia adiacente
elseif vtN:getZ() < -0.2589 and bIsL and nFaceAdj >= 0 then
-- box del pezzo
local b3Solid = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
-- se il numero di facce > 2 or il box della feature supera una certa distanza dalle teste allora controllo la z della faccia ausiiaria
-- se il numero di facce > 2 o il box della feature supera una certa distanza dalle teste allora controllo la z della faccia ausiiaria
if Proc.Fct > 2 or ( Proc.Box:getMax():getX() < b3Solid:getMin():getX() - 150) or ( Proc.Box:getMin():getX() > b3Solid:getMax():getX() + 150) then
local ptC2, vtN2 = EgtSurfTmFacetCenter( Proc.Id, nFaceAdj, GDB_ID.ROOT)
bDown = ( vtN2:getZ() < BD.NZ_MINB)
@@ -3518,8 +3518,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
if bMillDown then
sMchFind = sMchFind ..'_H2'
end
-- se feature 16 o 17 e forzata lama e forma ad U, annulla la svuotatura
if ( Proc.Prc == 16 or Proc.Prc == 17) and bForceUseBlade and Proc.Fct == 3 and bIsU then
-- 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
+10 -8
View File
@@ -1,4 +1,4 @@
-- ProcessProfCamb.lua by Egaltech s.r.l. 2020/11/19
-- ProcessProfCamb.lua by Egaltech s.r.l. 2021/03/28
-- Gestione calcolo profilo caudato per Travi
-- Tabella per definizione modulo
@@ -234,8 +234,9 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
return false, sChamfer
end
--variabili utilizzate in varie parti
local dToolMaxDepth = 0
local dMillDiam = 0
local dToolMaxDepth = 0
local dToolMaxMat = 0
local sMilling
-- in base alla direzione iniziale della curva e al valore di entrata valido, setto l'antischeggia
local bMakeAs
@@ -275,8 +276,9 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
if EgtMdbSetCurrMachining( sMilling) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dToolMaxDepth = EgtTdbGetCurrToolMaxDepth()
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
dToolMaxDepth = EgtTdbGetCurrToolMaxDepth() or dToolMaxDepth
dToolMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dToolMaxMat
end
end
-- se non da sotto e abilitato dal parametro Q aggiungo taglio di lama
@@ -500,9 +502,9 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtOutLog( sErr)
return false, sErr
else
-- riporto il sovramateriale originale e tolgo i passi
-- riporto il sovramateriale originale e tolgo i passi inutili
EgtSetMachiningParam( MCH_MP.OFFSR, dOriOffset)
EgtSetMachiningParam( MCH_MP.STEP, 0)
EgtSetMachiningParam( MCH_MP.STEP, dToolMaxMat)
-- eseguo
if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
@@ -578,9 +580,9 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtOutLog( sErr)
return false, sErr
else
-- riporto il sovramateriale originale e tolgo i passi
-- riporto il sovramateriale originale e tolgo i passi inutili
EgtSetMachiningParam( MCH_MP.OFFSR, dOriOffset)
EgtSetMachiningParam( MCH_MP.STEP, 0)
EgtSetMachiningParam( MCH_MP.STEP, dToolMaxMat)
-- eseguo
if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
+10 -8
View File
@@ -1,4 +1,4 @@
-- ProcessProfConcave.lua by Egaltech s.r.l. 2020/12/30
-- ProcessProfConcave.lua by Egaltech s.r.l. 2021/03/28
-- Gestione calcolo profilo concavo per Travi
-- Tabella per definizione modulo
@@ -364,13 +364,15 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
return false, sErr
end
-- Recupero i dati dell'utensile
local dToolMaxDepth = 0
local dToolDiam = 0
local dToolMaxDepth = 0
local dToolMaxMat = 0
if EgtMdbSetCurrMachining( sMilling) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dToolMaxDepth = EgtTdbGetCurrToolMaxDepth()
dToolDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
dToolDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dToolDiam
dToolMaxDepth = EgtTdbGetCurrToolMaxDepth() or dToolMaxDepth
dToolMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dToolMaxMat
end
end
-- verifico se necessario lavorare in doppio
@@ -460,9 +462,9 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtOutLog( sErr)
return false, sErr
else
-- riporto il sovramateriale originale e tolgo i passi
-- riporto il sovramateriale originale e tolgo i passi inutili
EgtSetMachiningParam( MCH_MP.OFFSR, dOriOffset)
EgtSetMachiningParam( MCH_MP.STEP, 0)
EgtSetMachiningParam( MCH_MP.STEP, dToolMaxMat)
-- eseguo
if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
@@ -522,9 +524,9 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtOutLog( sErr)
return false, sErr
else
-- riporto il sovramateriale originale e tolgo i passi
-- riporto il sovramateriale originale e tolgo i passi inutili
EgtSetMachiningParam( MCH_MP.OFFSR, dOriOffset)
EgtSetMachiningParam( MCH_MP.STEP, 0)
EgtSetMachiningParam( MCH_MP.STEP, dToolMaxMat)
-- eseguo
if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
+10 -8
View File
@@ -1,4 +1,4 @@
-- ProcessProfConvex.lua by Egaltech s.r.l. 2020/11/19
-- ProcessProfConvex.lua by Egaltech s.r.l. 2021/03/28
-- Gestione calcolo profilo convesso per Travi
-- Tabella per definizione modulo
@@ -364,13 +364,15 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
return false, sErr
end
-- Recupero i dati dell'utensile
local dToolMaxDepth = 0
local dToolDiam = 0
local dToolMaxDepth = 0
local dToolMaxMat = 0
if EgtMdbSetCurrMachining( sMilling) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dToolMaxDepth = EgtTdbGetCurrToolMaxDepth()
dToolDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
dToolDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dToolDiam
dToolMaxDepth = EgtTdbGetCurrToolMaxDepth() or dToolMaxDepth
dToolMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dToolMaxMat
end
end
-- verifico se necessario lavorare in doppio
@@ -460,9 +462,9 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtOutLog( sErr)
return false, sErr
else
-- riporto il sovramateriale originale e tolgo i passi
-- riporto il sovramateriale originale e tolgo i passi inutili
EgtSetMachiningParam( MCH_MP.OFFSR, dOriOffset)
EgtSetMachiningParam( MCH_MP.STEP, 0)
EgtSetMachiningParam( MCH_MP.STEP, dToolMaxMat)
-- eseguo
if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
@@ -522,9 +524,9 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtOutLog( sErr)
return false, sErr
else
-- riporto il sovramateriale originale e tolgo i passi
-- riporto il sovramateriale originale e tolgo i passi inutili
EgtSetMachiningParam( MCH_MP.OFFSR, dOriOffset)
EgtSetMachiningParam( MCH_MP.STEP, 0)
EgtSetMachiningParam( MCH_MP.STEP, dToolMaxMat)
-- eseguo
if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
+10 -8
View File
@@ -1,4 +1,4 @@
-- ProcessProfFront.lua by Egaltech s.r.l. 2020/12/30
-- ProcessProfFront.lua by Egaltech s.r.l. 2021/03/28
-- Gestione calcolo profilo frontale per Travi
-- Tabella per definizione modulo
@@ -323,13 +323,15 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
return false, sErr
end
-- Recupero i dati dell'utensile
local dToolMaxDepth = 0
local dToolDiam = 0
local dToolMaxDepth = 0
local dToolMaxMat = 0
if EgtMdbSetCurrMachining( sMilling) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dToolMaxDepth = EgtTdbGetCurrToolMaxDepth()
dToolDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
dToolDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dToolDiam
dToolMaxDepth = EgtTdbGetCurrToolMaxDepth() or dToolMaxDepth
dToolMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dToolMaxMat
end
end
-- verifico se necessario lavorare in doppio
@@ -413,9 +415,9 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtOutLog( sErr)
return false, sErr
else
-- riporto il sovramateriale originale e tolgo i passi
-- riporto il sovramateriale originale e tolgo i passi inutili
EgtSetMachiningParam( MCH_MP.OFFSR, dOriOffset)
EgtSetMachiningParam( MCH_MP.STEP, 0)
EgtSetMachiningParam( MCH_MP.STEP, dToolMaxMat)
-- eseguo
if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
@@ -472,9 +474,9 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtOutLog( sErr)
return false, sErr
else
-- riporto il sovramateriale originale e tolgo i passi
-- riporto il sovramateriale originale e tolgo i passi inutili
EgtSetMachiningParam( MCH_MP.OFFSR, dOriOffset)
EgtSetMachiningParam( MCH_MP.STEP, 0)
EgtSetMachiningParam( MCH_MP.STEP, dToolMaxMat)
-- eseguo
if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
+10 -8
View File
@@ -1,4 +1,4 @@
-- ProcessProfHead.lua by Egaltech s.r.l. 2020/12/30
-- ProcessProfHead.lua by Egaltech s.r.l. 2021/03/28
-- Gestione calcolo profilo di testa per Travi
-- Tabella per definizione modulo
@@ -370,13 +370,15 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
return false, sErr
end
-- Recupero i dati dell'utensile
local dToolMaxDepth = 0
local dToolDiam = 0
local dToolMaxDepth = 0
local dToolMaxMat = 0
if EgtMdbSetCurrMachining( sMilling) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dToolMaxDepth = EgtTdbGetCurrToolMaxDepth()
dToolDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
dToolDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dToolDiam
dToolMaxDepth = EgtTdbGetCurrToolMaxDepth() or dToolMaxDepth
dToolMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dToolMaxMat
end
end
-- verifico se necessario lavorare in doppio
@@ -467,9 +469,9 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtOutLog( sErr)
return false, sErr
else
-- riporto il sovramateriale originale e tolgo i passi
-- riporto il sovramateriale originale e tolgo i passi inutili
EgtSetMachiningParam( MCH_MP.OFFSR, dOriOffset)
EgtSetMachiningParam( MCH_MP.STEP, 0)
EgtSetMachiningParam( MCH_MP.STEP, dToolMaxMat)
-- eseguo
if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
@@ -530,9 +532,9 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtOutLog( sErr)
return false, sErr
else
-- riporto il sovramateriale originale e tolgo i passi
-- riporto il sovramateriale originale e tolgo i passi inutili
EgtSetMachiningParam( MCH_MP.OFFSR, dOriOffset)
EgtSetMachiningParam( MCH_MP.STEP, 0)
EgtSetMachiningParam( MCH_MP.STEP, dToolMaxMat)
-- eseguo
if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()