- Spostamento del richiamo all'interno della Drill.Make

- Piccole modifiche alla gestione
- Step diventa il 75% del teorico o se più piccolo, il diametro utensile
This commit is contained in:
daniele.nicoli
2026-02-24 12:02:43 +01:00
parent eb1878c17c
commit ae31898e05
3 changed files with 21 additions and 20 deletions
+2 -10
View File
@@ -164,9 +164,6 @@ EgtOutLog( ' BeamExec started', 1)
EgtMdbSetGeneralParam( MCH_GP.MAXDEPTHSAFE, BD.COLL_SIC)
EgtMdbSave()
-- variabili assegnazione parametri Q
local Q_ONLY_CONTOUR = 'Q04' -- i
-------------------------------------------------------------------------------------------------------------
local function IsHeadFeature( Proc, b3Raw, dCurrOvmH)
-- feature sempre di testa o coda per il gruppo
@@ -1510,13 +1507,8 @@ local function AddFeatureMachining( Proc, nPhase, nRawId, nPartId, dCurrOvmH, bN
bOk, sErr = Chamfer.Make( Proc, nPhase, nRawId, nPartId)
-- se foratura ( 3/4-040-X)
elseif Drill.Identify( Proc) then
-- Se impostata Q04 = 1 forza la contornatura
if ( EgtGetInfo( Proc.Id, Q_ONLY_CONTOUR, 'i') == 1) then
bOk, sErr = FreeContour.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
else
-- esecuzione foratura
bOk, sErr = Drill.Make( Proc, nPhase, nRawId, nPartId)
end
-- esecuzione foratura
bOk, sErr = Drill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- se giunzione francese ( 1/2-035-X)
elseif FrenchRidgeLap.Identify( Proc) then
-- esecuzione giunzione francese
+9 -2
View File
@@ -134,7 +134,8 @@ function ProcessDrill.Split( Proc, b3Raw)
local bOpen = ( Proc.Fce ~= 0) and ( Proc.Fce ~= Proc.Fcs)
-- recupero flag abilitazione split (0=auto,1=no)
local bTrySplit = ( EgtGetInfo( Proc.Id, 'Q02', 'i') ~= 1)
if not bTrySplit then
local bOnlyContour = ( EgtGetInfo( Proc.Id, 'Q04', 'i') == 1)
if ( not bTrySplit) or bOnlyContour then
return false
end
-- restituisco se va fatto in doppio (solo fori orizzontali)
@@ -341,7 +342,13 @@ end
---------------------------------------------------------------------
-- Applicazione della lavorazione
function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- Se forzato contorno foro forzo richiamo a FreeContour e uscita dalla funzione
if EgtGetInfo( Proc.Id, 'Q04', 'i') == 1 then
_G.package.loaded.ProcessFreeContour = nil
local FreeContour = require( 'ProcessFreeContour')
return FreeContour.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- default per costanti
BD.DRILL_VX_MAX_ANGLEDRILL = ( BD.DRILL_VX_MAX_ANGLEDRILL or 0.928)
-- ingombro del pezzo
+10 -8
View File
@@ -136,7 +136,7 @@ function ProcessFreeContour.Classify( Proc, b3Raw)
end
---------------------------------------------------------------------
local function VerifyChamfer( Proc, AuxId, nRawId, bMakeVertCham, bDownHead, bContourFromDrill)
local function VerifyChamfer( Proc, AuxId, nRawId, bMakeVertCham, bDownHead)
local nChamfer = 0
-- ingombro del grezzo
local b3Raw = EgtGetRawPartBBox( nRawId)
@@ -186,10 +186,8 @@ local function VerifyChamfer( Proc, AuxId, nRawId, bMakeVertCham, bDownHead, bCo
EgtOutLog( sErr)
return -1, 0, sErr
end
end
if bContourFromDrill then
nChamfer = 0
dDepth = 0
else
sMilling = ''
end
return nChamfer, dDepth, sMilling
@@ -266,7 +264,7 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- verifico se in testa o coda
local bHead = Proc.Head
-- verifico i parametri Q per profondità smusso e per eseguirlo in esclusiva
local nChamfer, dDepthCham, sChamfer = VerifyChamfer( Proc, AuxId, nRawId, true, nil, bContourFromDrill)
local nChamfer, dDepthCham, sChamfer = VerifyChamfer( Proc, AuxId, nRawId, true, nil)
-- recupero la lavorazione
local bTopHead = ( BD.DOWN_HEAD and vtExtr:getZ() > -0.1)
local bDownHead = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.1)
@@ -713,8 +711,8 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
EgtSetMachiningParam( MCH_MP.INVERT, bInvert)
EgtSetMachiningParam( MCH_MP.WORKSIDE, dWorkSide)
-- setto valori specifici se lavorazione nel pieno del solo contorno di un foro
if bContourFromDrill and ( dDepthWork / (nStep + 1) > dToolDiam ) then
local dWorkStep = dDepthWork / ( dDepthWork / dToolDiam)
if bContourFromDrill then
local dWorkStep = max( ( EgtGetMachiningParam( MCH_MP.STEP) or 0) * 0.75, dToolDiam)
EgtSetMachiningParam( MCH_MP.STEP, dWorkStep)
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.GLIDE)
EgtSetMachiningParam( MCH_MP.LIELEV, dWorkStep)
@@ -1020,6 +1018,10 @@ function ProcessFreeContour.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
Q_DEPTH_CHAMFER = 'Q01'
Q_DIM_STRIP = 'Q02'
end
if Proc.Prc == 40 then
Q_DIM_STRIP = ''
Q_OVERMAT_FOR_FINISH = ''
end
-- recupero la tipologia
local bPocket = ( EgtGetInfo( Proc.Id, 'PCKT', 'i') == 1)
-- se svuotatura