DataBeam :
- aggiunta gestione scelta utensile in base al raggio in mortase con coda di rondine - corretta gestione estremi di taglio doppio longitudinale.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
-- MachiningLib.lua by Egaltech s.r.l. 2020/10/14
|
||||
-- MachiningLib.lua by Egaltech s.r.l. 2020/10/27
|
||||
-- Libreria ricerca lavorazioni per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -38,15 +38,17 @@ function MachiningLib.FindCutting( sType)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function MachiningLib.FindMilling( sType, dDepth, sTuuidMstr)
|
||||
function MachiningLib.FindMilling( sType, dDepth, sTuuidMstr, dMaxDiam)
|
||||
for i = 1, #Millings do
|
||||
local Milling = Millings[i]
|
||||
if Milling.On and Milling.Type == sType and SetCurrMachiningAndTool( Milling.Name) then
|
||||
local sTuuid = EgtGetMachiningParam( MCH_MP.TUUID)
|
||||
local dTMaxDepth = EgtTdbGetCurrToolMaxDepth()
|
||||
if ( not sTuuidMstr or sTuuidMstr == sTuuid) and
|
||||
( not dDepth or dTMaxDepth > dDepth - GEO.EPS_SMALL) then
|
||||
return Milling.Name, dTMaxDepth
|
||||
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
||||
if ( not dDepth or dTMaxDepth > dDepth - GEO.EPS_SMALL) and
|
||||
( not sTuuidMstr or sTuuidMstr == sTuuid) and
|
||||
( not dMaxDiam or dTDiam < dMaxDiam + GEO.EPS_SMALL) then
|
||||
return Milling.Name, dTMaxDepth, dTDiam
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- ProcessDtMortise.lua by Egaltech s.r.l. 2020/10/21
|
||||
-- ProcessDtMortise.lua by Egaltech s.r.l. 2020/10/27
|
||||
-- Gestione calcolo mortase a coda di rondine per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -159,13 +159,29 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
if not bOk then return bOk, sErr end
|
||||
end
|
||||
end
|
||||
-- recupero la lavorazione
|
||||
-- recupero il raggio minimo della mortasa
|
||||
local dMinRad = 1000
|
||||
local nSt, nEnd = EgtCurveDomain( AuxId)
|
||||
for i = nSt, nEnd - 1 do
|
||||
local dRad = EgtCurveCompoRadius( AuxId, i)
|
||||
if dRad > 0 and dRad < dMinRad then
|
||||
dMinRad = dRad
|
||||
end
|
||||
end
|
||||
-- recupero la lavorazione : prima ricerca per sola tipologia
|
||||
local sMilling = ML.FindMilling( 'DtMortise')
|
||||
if not sMilling then
|
||||
local sErr = 'Milling not found in library : Error on DtMortise ' .. tostring( Proc.Id)
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- recupero la lavorazione : seconda ricerca con tipologia e diametro massimo
|
||||
sMilling = ML.FindMilling( 'DtMortise', nil, nil, 2 * dMinRad)
|
||||
if not sMilling then
|
||||
local sErr = 'Radius too small : Error on DtMortise ' .. tostring( Proc.Id)
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- recupero il diametro dell'utensile e l'angolo di spoglia
|
||||
local dToolDiam = 100
|
||||
local dMaxMat = 30
|
||||
@@ -182,16 +198,6 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
bCW = ( dSpeed >= 0)
|
||||
end
|
||||
end
|
||||
-- verifico se raggio troppo piccolo per l'utensile
|
||||
local nSt, nEnd = EgtCurveDomain( AuxId)
|
||||
for i = nSt, nEnd - 1 do
|
||||
local dRad = EgtCurveCompoRadius( AuxId, i)
|
||||
if dRad > 0 and dRad < dToolDiam / 2 - GEO.EPS_ZERO then
|
||||
local sErr = 'Radius too small : Error on DtMortise ' .. tostring( Proc.Id)
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
end
|
||||
-- se con tasca, la lavoro
|
||||
if bPocket then
|
||||
-- recupero il contorno della tasca (seconda curva ausiliaria)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- ProcessLongDoubleCut.lua by Egaltech s.r.l. 2020/10/09
|
||||
-- ProcessLongDoubleCut.lua by Egaltech s.r.l. 2020/10/27
|
||||
-- Gestione calcolo doppio taglio longitudinale per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -42,10 +42,10 @@ local function IdentifyFaces( Proc)
|
||||
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, i-1, GDB_ID.ROOT)
|
||||
-- se è una faccia limite a sinistra
|
||||
if vtN:getX() > GEO.EPS_SMALL then
|
||||
nFaceLimit = nFaceLimit + 2
|
||||
nFaceLimit = nFaceLimit | 2
|
||||
-- se è una faccia limite a destra
|
||||
elseif vtN:getX() < -GEO.EPS_SMALL then
|
||||
nFaceLimit = nFaceLimit + 1
|
||||
nFaceLimit = nFaceLimit | 1
|
||||
-- altrimenti è una faccia longitudinale
|
||||
else
|
||||
local nInd = #tFaceLong + 1
|
||||
|
||||
Reference in New Issue
Block a user