DataBeam :

- nei LongCut lavorati con fresa di fianco corretto calcolo sicurezza aggiuntiva per inclinazione fresa rispetto alla trave
- nei LapJoint corretta gestione inversione direzione utensile con Tunnel
- nei LapJoint ora OpenPocket anche se diviso in parti ma con 1 o 2 facce
- nei LapJoint nel caso Lamello (SideMillAsBlade) introdotta lunghezza minima.
This commit is contained in:
DarioS
2021-10-20 08:24:07 +02:00
parent dffe30d640
commit e485c533ad
2 changed files with 51 additions and 31 deletions
+13 -9
View File
@@ -26,6 +26,7 @@
-- 2021/09/23 Gestione migliorata lavorazioni BH (blockhaus) su macchina fast BH,
-- migliorata applicazione lavorazioni BH su feature lunghe lavorte a passi
-- 2021/10/06 Ad antischeggia con lama in presenza di testa da sotto aggiunta preferenza a testa da sopra.
-- 2021/10/19 Corretta gestione inversione per Tunnel. OpenPocket anche se spezzato ma 1 o 2 facce. Introdotta lunghezza minima per lamello.
-- Tabella per definizione modulo
local ProcessLapJoint = {}
@@ -2741,6 +2742,7 @@ local function MakeByMillAsSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
end
for i = 1, nStep do
local dOffs = ( i - 1) * dStep
if vtN:getZ() < BD.NZ_MINA then dOffs = dOffs + dSawThick end
local bOk, sErr, nMchId = BL.MakeOneFaceBySaw( Proc.Id, nFacAdj, sCutting, dSawDiam, nFaceUse, -0.01, 0, BD.CUT_SIC, dOffs, dStartDist, dEndDist, nil, b3Raw)
if not bOk then return bOk, sErr end
-- setto l'elevazione
@@ -3632,7 +3634,7 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
bInvertMach = true
-- altrimenti se da fare in una sola volta e direzionato verso Y+ lo inverto per lavorarlo davanti
elseif not bDoubleSide and vtOrtho:getY() > GEO.EPS_SMALL then
elseif not bDoubleSide and vtOrtho:getY() > GEO.EPS_SMALL and not ( -(vtOrtho:getZ()) < BD.NZ_MINA) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
bInvertMach = true
end
@@ -4324,7 +4326,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
for i = 1, Proc.Fct do
local nNewProc = EgtCopyGlob( Proc.Id, nAddGrpId) or GDB_ID.NULL
-- elimino una faccia
nBottomFace = i-1
nBottomFace = i - 1
if EgtSurfTmRemoveFacet( nNewProc, nBottomFace) then
-- recupero la faccia con il maggior numero di adiacenze e l'elevazione relativa
nFacInd, dFacElev, nFacInd2, dFacElev2 = BL.GetFaceWithMostAdj( nNewProc, nPartId)
@@ -4738,7 +4740,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
-- settaggio voluto da Alessandro/Fabio (per fare angoli con fresa piccola)
sMchFind = 'Pocket'
local dDiam = min( dH, dV)
if bSinglePart and (( Proc.Fct == 1) or ( Proc.Fct == 2 and bIsL) or ( Proc.Fct == 3 and bIsU) or Proc.Fct == 4) then
if ( Proc.Fct == 1) or ( Proc.Fct == 2 and bIsL) or ((( Proc.Fct == 3 and bIsU) or Proc.Fct == 4) and bSinglePart) then
sMchFind = 'OpenPocket'
if bIsU then
dDiam = GetUShapeWidth( Proc, nFacInd) or dDiam
@@ -4820,7 +4822,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
local dMaxDepthOnSide = 0
if ( Proc.Prc == 16 or Proc.Prc == 30 or Proc.Prc == 32 or Proc.Prc == 39) then
-- verifico se ho una gola con 3 facce ed eventualmente delle facce terminali:
-- faccio una copia della superfice e elimino le facce che hanno dimensione X < 1 e le facce risultanti devono essere una U
-- faccio una copia della superfice ed elimino le facce che hanno dimensione X < 1 e le facce risultanti devono essere una U
local nTestId = EgtCopyGlob( Proc.Id, nAddGrpId) or GDB_ID.NULL
if nTestId then
local bNewIsU
@@ -4847,7 +4849,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
bExit = true
end
end
-- verifico che la componente x delle faccia o deve essere nulla
-- verifico che la componente x della faccia o deve essere nulla
local vtN1 = EgtSurfTmFacetNormVersor( nTestId, 0, GDB_ID.ROOT)
if bNewIsU and abs( vtN1:getX()) > 0.01 then
bNewIsU = false
@@ -4855,9 +4857,11 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
-- cancello la copia del percorso
EgtErase( nTestId)
if bNewIsU then
if bNewIsU and ( not BD.MIN_LEN_LAMELLO or
( Proc.TotBox and Proc.TotBox:getDimX() > BD.MIN_LEN_LAMELLO) or
( not Proc.TotBox and Proc.Box:getDimX() > BD.MIN_LEN_LAMELLO)) then
-- recupero la lavorazione
if vtN:getZ() < BD.NZ_MINA and BD.DOWN_HEAD then
if BD.DOWN_HEAD and vtN:getZ() < BD.NZ_MINA then
sMillingOnSide = ML.FindMilling( 'SideMillAsBlade_H2')
else
sMillingOnSide = ML.FindMilling( 'SideMillAsBlade')
@@ -4879,7 +4883,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
-- 2021.09.17 Su conferma di Fabio Squaratti, se la gola è più streta dell'utensile o la profondità della gole è maggiore
-- del valore parametro SIDEDEPTH (preso dalle note utente dell'utensile) allora si prosegue come se non fosse abilitata
-- questo tipo di lavorazione SideMillAsBlade
if dDiam >= dThickMillOnSide and dFacElev < dMaxDepthOnSide + 10 * GEO.EPS_SMALL then
if dDiam > dThickMillOnSide - 10 * GEO.EPS_SMALL and dFacElev < dMaxDepthOnSide + 10 * GEO.EPS_SMALL then
bSpecialMillOnSide = true
-- disabilito eventulae svuotatura
sPocketing = nil
@@ -5275,7 +5279,7 @@ local function MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
for i = 1, #vAddId do
local b3Box = EgtGetBBoxGlob( vAddId[i], GDB_BB.STANDARD)
local nFct = EgtSurfTmFacetCount( vAddId[i])
local AddProc = { Id = vAddId[i], Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Box, Fct = nFct, Flg = Proc.Flg}
local AddProc = { Id = vAddId[i], Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Box, TotBox = Proc.Box, Fct = nFct, Flg = Proc.Flg}
-- lasciare il false nel sesto parametro (perchè internamente viene verificato se diverso da nil)
local bOk, sMyWarn
bOk, sMyWarn, bPrevBhSideMill = MakeMoreFaces( AddProc, nPhase, nRawId, nPartId, dOvmHead, false, bPrevBhSideMill)