DataBeam :
- in LapJoint e similari corretta scelta svuotatura OpenPocket se a U o a L, anzichè solo Pocket - in FreeContour corretti attacchi/uscite su tratti iniziali/finali non tangenti al resto del percorso e più corti del raggio fresa - in DovetailMortise corretto calcolo percorso antischeggia quando la mortasa è aperta anche sulla punta della V.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
-- ProcessFreeContour.lua by Egaltech s.r.l. 2020/05/16
|
||||
-- ProcessFreeContour.lua by Egaltech s.r.l. 2020/08/26
|
||||
-- Gestione calcolo profilo libero per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -109,6 +109,31 @@ function ProcessFreeContour.Classify( Proc, b3Raw)
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function CalcSpecialAdd( nCrv, bStartVsEnd, dToolDiam)
|
||||
-- recupero il dominio della curva
|
||||
local nUi, nUf = EgtCurveDomain( nCrv)
|
||||
if not nUi then return 0 end
|
||||
-- indici punti da analizzare
|
||||
local nOut = EgtIf( bStartVsEnd, nUi, nUf)
|
||||
local nIn = EgtIf( bStartVsEnd, nUi + 1, nUf - 1)
|
||||
-- tangenti prima e dopo il punto interno
|
||||
local vtPrev = EgtUV( nCrv, nIn, -1)
|
||||
local vtNext = EgtUV( nCrv, nIn, 1)
|
||||
-- se c'è perdita di tangenza (delta angolare oltre i 5 gradi)
|
||||
if vtPrev * vtNext < 0.996 then
|
||||
-- lunghezza del tratto
|
||||
local ptP0 = EgtUP( nCrv, nOut)
|
||||
local ptP1 = EgtUP( nCrv, nIn)
|
||||
local dDist = dist( ptP0, ptP1)
|
||||
-- se corto rispetto al raggio utensile, ritorno allugamento opportuno
|
||||
if dDist < 0.6 * dToolDiam then
|
||||
return ( 0.6 * dToolDiam - dDist + 1)
|
||||
end
|
||||
end
|
||||
return 0
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
-- recupero l'ingombro del grezzo di appartenenza
|
||||
@@ -143,10 +168,12 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
return false, sErr
|
||||
end
|
||||
-- recupero i dati dell'utensile
|
||||
local dToolDiam = 10
|
||||
local dMaxDepth = 0
|
||||
if EgtMdbSetCurrMachining( sMilling) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dToolDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dToolDiam
|
||||
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
|
||||
end
|
||||
end
|
||||
@@ -200,6 +227,9 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
if vtExtr:getY() > 0.707 and nDouble == 1 and bStripOnSide then
|
||||
bToolInv = true
|
||||
end
|
||||
-- verifico se primo e ultimo tratti corti e con angolo
|
||||
local dStartAddSpec = CalcSpecialAdd( AuxId, true, dToolDiam)
|
||||
local dEndAddSpec = CalcSpecialAdd( AuxId, false, dToolDiam)
|
||||
-- eseguo
|
||||
for i = 1, nStep do
|
||||
for j = 1, nDouble do
|
||||
@@ -217,11 +247,15 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
if ( j == 1 and i > 1) or ( j == 2 and i < nStep) then
|
||||
local dStartAddLen = EgtIf( j == 1, - ( i - 1) * dStep, - ( nStep - i) * dStep)
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dStartAddLen)
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, EgtIf( j == 1, dStartAddSpec, dEndAddSpec))
|
||||
end
|
||||
-- eventuale accorciamento di coda
|
||||
if ( j == 1 and i < nStep) or ( j == 2 and i > 1) then
|
||||
local dEndAddLen = EgtIf( j == 1, - ( nStep - i) * dStep, - ( i - 1) * dStep)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEndAddLen)
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, EgtIf( j == 1, dEndAddSpec, dStartAddSpec))
|
||||
end
|
||||
-- se estrusione da sotto, inverto direzione fresa
|
||||
if ( j == 1 and bToolInv) or ( j == 2 and not bToolInv) then
|
||||
|
||||
Reference in New Issue
Block a user