Compare commits

...

27 Commits

Author SHA1 Message Date
luca.mazzoleni 82d4fadaaa update log e versione 2024-10-17 12:25:43 +02:00
luca.mazzoleni 2e5b4c9976 Merge branch 'hotfix/DrillSideAndDown' 2024-10-17 12:21:37 +02:00
luca.mazzoleni 511af04c8b - in Drill con precedenza corretto caso in cui il foro veniva ripetuto in rotazioni diverse 2024-10-17 12:20:39 +02:00
luca.mazzoleni ad8a7bf73f Merge branch 'develop' 2024-10-10 14:06:22 +02:00
luca.mazzoleni 4a21a4be36 - in ProcessCut Classify corretta lettura Q per passare a LapJoint 2024-10-10 14:05:52 +02:00
andrea.villa aafe565474 In ScarfJoint corretto problema introdotto con modifica ottimizzazione richiesta per Ticket#1992 2024-10-10 12:40:27 +02:00
luca.mazzoleni b6ef0a8d7a Merge tag '2.6j1' into develop
r
2024-10-10 10:51:49 +02:00
luca.mazzoleni 779f2105ba Merge branch 'release/2.6j1' 2024-10-10 10:51:35 +02:00
luca.mazzoleni c2b9c4b19f update log e version 2024-10-10 10:50:40 +02:00
luca.mazzoleni 8eadb81e91 Merge branch 'master' into develop 2024-10-08 12:11:09 +02:00
luca.mazzoleni 2bac228fe9 update log e version 2024-10-08 12:10:57 +02:00
luca.mazzoleni c312e72fd2 Merge tag 'RidgeLapClamping' into develop
r
2024-10-08 12:08:18 +02:00
luca.mazzoleni fd4683e4fa Merge branch 'hotfix/RidgeLapClamping' 2024-10-08 12:08:09 +02:00
luca.mazzoleni 70661aa3d2 In RidgeLap, ingombro testa coda considera inclinazione feature per pinzaggio 2024-10-08 12:08:00 +02:00
andrea.villa a82486e9fb In RidgeLap, ingombro testa coda considera inclinazione feature per pinzaggio 2024-10-07 16:11:48 +02:00
luca.mazzoleni cd4a7d3b91 - in LapJoint miglioramenti vari alla lavorazione delle facce oblique 2024-10-03 17:28:27 +02:00
luca.mazzoleni 3764c58394 - in ProcessCut aggiunta Q07 per forzare uso fresa (si passa a LapJoint)
- in LapJoint gestita feature in arrivo da Cut e piccole correzioni
2024-10-01 15:57:17 +02:00
luca.mazzoleni e49b505fbe - in ordinamento tenoni sempre fatti dopo eventuale foro secante
- in FreeContour modificati criteri pinzaggio
- in FreeContour aggiunte Q per forzare come pinzabile l'area della feature e per ignorare possibili problemi di lettura laser (taglio di testa sotto non eseguito)
2024-10-01 12:30:07 +02:00
luca.mazzoleni 72c1eb81f3 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataBeam into develop 2024-09-27 16:06:16 +02:00
luca.mazzoleni 037ac0d030 - se tenone di coda è attraversato da foro allora anche il foro deve essere di coda
- piccola correzione e TwoFacesBySaw
2024-09-27 16:06:12 +02:00
andrea.villa f1b64b1496 Se la macchina è tipo BlockHaus, i LapJpint vengono fatti prima del taglio di separazione 2024-09-27 15:44:26 +02:00
luca.mazzoleni 69ab03f3ec - in LongDoubleCut corretto typo nome variabile 2024-09-26 09:57:08 +02:00
luca.mazzoleni 3b86cd9633 Merge tag '2.6i2' into develop
release
2024-09-13 17:03:38 +02:00
luca.mazzoleni 56fc63d5ff Merge branch 'release/2.6i2' 2024-09-13 17:02:30 +02:00
luca.mazzoleni f27eeb9c3d update log e versione 2024-09-13 17:02:16 +02:00
luca.mazzoleni 5d603a57db - in HeadCut, Split modifiche ai tagli aggiuntivi orizzontali e verticali; disattivati attacchi tangenziali per tagli aggiuntivi verticali in PF1250 per evitare rischi di collisione con testa sotto che cambia utensile in tempo mascherato 2024-09-13 16:57:57 +02:00
luca.mazzoleni 6f45e63f11 Merge branch 'CheckGenerateFix' into develop 2024-09-13 12:38:07 +02:00
14 changed files with 258 additions and 88 deletions
+25 -6
View File
@@ -835,13 +835,13 @@ local function OrderFeatures( vProc, b3Raw)
if B2.AdvTail and ( not Split.Identify( B1) or not B1.Tail) then if B2.AdvTail and ( not Split.Identify( B1) or not B1.Tail) then
return true return true
end end
-- se primo è foro e secondo è un ribasso, il foro va sempre prima a meno che il ribasso non sia di testa -- se primo è foro e secondo è un ribasso o tenone, il foro va sempre prima a meno che il ribasso non sia di testa
if Drill.Identify(B1) and ( LapJoint.Identify(B2) or Mortise.Identify(B2)) and B2.PassedByHole and if Drill.Identify(B1) and ( LapJoint.Identify(B2) or Mortise.Identify(B2) or Tenon.Identify(B2)) and B2.PassedByHole and
B1.Box:getCenter():getX() > B2.Box:getMin():getX() and B1.Box:getCenter():getX() < B2.Box:getMax():getX() then B1.Box:getCenter():getX() > B2.Box:getMin():getX() and B1.Box:getCenter():getX() < B2.Box:getMax():getX() then
return true return true
end end
-- se primo è un ribasso e secondo è un foro, il ribasso va sempre dopo a meno che il ribasso non sia di testa -- se primo è un ribasso e secondo è un foro o tenone, il ribasso va sempre dopo a meno che il ribasso non sia di testa
if ( LapJoint.Identify(B1) or Mortise.Identify(B1))and B1.PassedByHole and Drill.Identify(B2) and if ( LapJoint.Identify(B1) or Mortise.Identify(B1) or Tenon.Identify(B1)) and B1.PassedByHole and Drill.Identify(B2) and
B2.Box:getCenter():getX() > B1.Box:getMin():getX() and B2.Box:getCenter():getX() < B1.Box:getMax():getX() then B2.Box:getCenter():getX() > B1.Box:getMin():getX() and B2.Box:getCenter():getX() < B1.Box:getMax():getX() then
return false return false
end end
@@ -1221,7 +1221,7 @@ local function ClassifyFeatures( vProc, b3Raw, Stats)
bOk, bDown, bSide = ProfHead.Classify( Proc, b3Raw) bOk, bDown, bSide = ProfHead.Classify( Proc, b3Raw)
-- se contorno libero -- se contorno libero
elseif FreeContour.Identify( Proc) then elseif FreeContour.Identify( Proc) then
bOk, bDown, bSide = FreeContour.Classify( Proc, b3Raw) bOk, bDown, bSide, bDownSideOnHeadOk = FreeContour.Classify( Proc, b3Raw)
-- se decorazione -- se decorazione
elseif Decor.Identify( Proc) then elseif Decor.Identify( Proc) then
bOk, bDown = Decor.Classify( Proc) bOk, bDown = Decor.Classify( Proc)
@@ -1231,7 +1231,7 @@ local function ClassifyFeatures( vProc, b3Raw, Stats)
end end
-- assegno risultato -- assegno risultato
if bOk then if bOk then
-- non ammessa feature di testa da lavorare ribaltata o ruotata -- non ammessa feature di testa da lavorare ribaltata o ruotata (lettura laser)
if Proc.Head and ( bDown or bSide) and not bDownSideOnHeadOk then if Proc.Head and ( bDown or bSide) and not bDownSideOnHeadOk then
Proc.Flg = 0 Proc.Flg = 0
Proc.Down = true Proc.Down = true
@@ -2034,6 +2034,14 @@ function GetFeatureInfoAndDependency( vProc, b3Raw)
if ( Proc.Topology == 'Pocket' or Proc.Topology == 'Tunnel' or Proc.Topology == 'Groove') and DtMortise.SideIdentify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then if ( Proc.Topology == 'Pocket' or Proc.Topology == 'Tunnel' or Proc.Topology == 'Groove') and DtMortise.SideIdentify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then
Proc.PassedByDtMortise = true Proc.PassedByDtMortise = true
end end
-- se tenone è attraversato da foro allora il foro deve essere fatto prima
if Tenon.Identify( Proc) and Drill.Identify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then
Proc.PassedByHole = true
end
-- se tenone di coda è attraversato da foro allora anche il foro deve essere di coda
if Tenon.Identify( Proc) and Proc.Tail and Drill.Identify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then
ProcB.Tail = true
end
-- verifiche per specchiature -- verifiche per specchiature
if BD.DOWN_HEAD or BD.TWO_EQUAL_HEADS then if BD.DOWN_HEAD or BD.TWO_EQUAL_HEADS then
-- forature -- forature
@@ -2107,6 +2115,17 @@ function BeamExec.ProcessFeatures()
PrintFeatures( vProc, b3Raw) PrintFeatures( vProc, b3Raw)
end end
EgtOutLog( ' *** AddMachinings ***', 1) EgtOutLog( ' *** AddMachinings ***', 1)
-- scrivo nel RawPart se ci sono feature lavorate con trave ruotata a 90 o 180 deg
if bSomeSide then
EgtSetInfo( nRawId, 'ROTATE90', 1)
else
EgtSetInfo( nRawId, 'ROTATE90', 0)
end
if bSomeDown then
EgtSetInfo( nRawId, 'ROTATE180', 1)
else
EgtSetInfo( nRawId, 'ROTATE180', 0)
end
-- verifico se comunque necessario taglio di testa -- verifico se comunque necessario taglio di testa
local bNeedHCut = VerifyNeedForHeadCut( vProc, bSomeDown, bSomeSide) local bNeedHCut = VerifyNeedForHeadCut( vProc, bSomeDown, bSomeSide)
-- inserisco corrispondenze di tagli coincidenti con mortase normali o a coda di rondine di testa -- inserisco corrispondenze di tagli coincidenti con mortase normali o a coda di rondine di testa
+34
View File
@@ -1239,6 +1239,40 @@ function BeamLib.GetFacetsInfo( Proc, b3Raw)
return Face return Face
end end
---------------------------------------------------------------------
function BeamLib.GetEdgesInfo( Proc, Face)
local Edges = {}
local nFaceType, vEdges = EgtSurfTmGetFacetOutlineInfo( Proc.Id, Face.Id, GDB_ID.ROOT)
if nFaceType < 1 then
for j = 1, #vEdges do
local nPreviousEdgeIndex = j - 1
if j == 1 then
nPreviousEdgeIndex = #vEdges
end
local nNextEdgeIndex = j + 1
if j == #vEdges then
nNextEdgeIndex = 1
end
local CurrentEdge = {}
CurrentEdge.AdjacentFaceId = vEdges[j].Adj
CurrentEdge.ToolDirection = Vector3d( vEdges[j].Norm)
CurrentEdge.Length = vEdges[j].Len
CurrentEdge.Elevation = vEdges[j].Elev
CurrentEdge.IsOpen = vEdges[j].Open
CurrentEdge.IsStartOpen = ( vEdges[nPreviousEdgeIndex].Open)
CurrentEdge.IsEndOpen = ( vEdges[nNextEdgeIndex].Open)
table.insert( Edges, CurrentEdge)
end
else
error( 'Face with closed hole')
end
return Edges
end
--------------------------------------------------------------------- ---------------------------------------------------------------------
-- restituisce la matrice delle adiacenze di Proc dove i e j sono le facce e a(ij) è l'angolo tra di esse; 0 se nessuna adiacenza -- restituisce la matrice delle adiacenze di Proc dove i e j sono le facce e a(ij) è l'angolo tra di esse; 0 se nessuna adiacenza
function BeamLib.GetAdjacencyMatrix( Proc) function BeamLib.GetAdjacencyMatrix( Proc)
+4 -4
View File
@@ -426,14 +426,14 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
local bLioTang local bLioTang
local Ktp = 1.1 local Ktp = 1.1
if BD.KIOTP then Ktp = BD.KIOTP end if BD.KIOTP then Ktp = BD.KIOTP end
if ( not bDownUp or abs( vtTg:getY()) > 0.5) and if ( bForceTangentLeadInOut or ( not bDownUp or abs( vtTg:getY()) > 0.5) and
( not bDownHead or abs( vtTg:getZ()) < 0.51) and ( not bDownHead or abs( vtTg:getZ()) < 0.51) and
abs( vtTg:getX()) < 0.9848 and abs( vtTg:getX()) < 0.9848 and
( ( abs( vtTg:getZ()) < 0.17 and ( vtV1:getZ() < -0.5 or vtV2:getZ() < -0.5) and not bDownHead) or ( ( abs( vtTg:getZ()) < 0.17 and ( vtV1:getZ() < -0.5 or vtV2:getZ() < -0.5) and not bDownHead) or
( abs( vtTg:getZ()) < 0.51 and b3Box:getDimZ() > 300 and BD.C_SIMM and BD.MAX_HEIGHT > 450 and b3Box:getDimX() > BD.LEN_SHORT_PART) or ( abs( vtTg:getZ()) < 0.51 and b3Box:getDimZ() > 300 and BD.C_SIMM and BD.MAX_HEIGHT > 450 and b3Box:getDimX() > BD.LEN_SHORT_PART) or
( abs( vtTg:getZ()) < 0.51 and ( dLenLi2 + dLenLo2) < ( dLenLi + dLenLo)) or ( abs( vtTg:getZ()) < 0.51 and ( dLenLi2 + dLenLo2) < ( dLenLi + dLenLo)) or
Ktp * ( dLenLi2 + dLenLo2) < ( dLenLi + dLenLo) or Ktp * ( dLenLi2 + dLenLo2) < ( dLenLi + dLenLo) or
( BD.TURN == 2 and vtRef:getZ() < -0.1)) then ( BD.TURN == 2 and vtRef:getZ() < -0.1))) then
if BD.TURN == 2 then if BD.TURN == 2 then
if vtTg:getY() < -0.1 then if vtTg:getY() < -0.1 then
bLioTang = 1 bLioTang = 1
@@ -609,8 +609,8 @@ function FacesBySaw.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, sCutType,
local bConvex = ( dAngT > 0) local bConvex = ( dAngT > 0)
-- verifico non siano orientate troppo verso il basso e molto sbandate (oltre 10 deg), oppure in testa o in coda e non troppo distanti dal grezzo esterno -- verifico non siano orientate troppo verso il basso e molto sbandate (oltre 10 deg), oppure in testa o in coda e non troppo distanti dal grezzo esterno
local bFaceOk = {} local bFaceOk = {}
bFaceOk[1] = ( vtN[1]:getZ() >= BD.NZ_MINB or abs( vtN[1]:getY()) < 0.174 or ( Proc.AffectedFaces.Left ~= Proc.AffectedFaces.Right and Proc.Face[1].Elevation < dMaxDepth - 10 * GEO.EPS_SMALL)) bFaceOk[1] = ( vtN[1]:getZ() >= ( BD.CUT_VZ_MIN or BD.NZ_MINB) or abs( vtN[1]:getY()) < 0.174 or ( Proc.AffectedFaces.Left ~= Proc.AffectedFaces.Right and Proc.Face[1].Elevation < dMaxDepth - 10 * GEO.EPS_SMALL))
bFaceOk[2] = ( vtN[2]:getZ() >= BD.NZ_MINB or abs( vtN[2]:getY()) < 0.174 or ( Proc.AffectedFaces.Left ~= Proc.AffectedFaces.Right and Proc.Face[2].Elevation < dMaxDepth - 10 * GEO.EPS_SMALL)) bFaceOk[2] = ( vtN[2]:getZ() >= ( BD.CUT_VZ_MIN or BD.NZ_MINB) or abs( vtN[2]:getY()) < 0.174 or ( Proc.AffectedFaces.Left ~= Proc.AffectedFaces.Right and Proc.Face[2].Elevation < dMaxDepth - 10 * GEO.EPS_SMALL))
if not bDownHead and ( not bFaceOk[1] or not bFaceOk[2]) then if not bDownHead and ( not bFaceOk[1] or not bFaceOk[2]) then
local sErr = 'Error : TwoFacesBySaw from bottom impossible' local sErr = 'Error : TwoFacesBySaw from bottom impossible'
EgtOutLog( sErr) EgtOutLog( sErr)
+13 -5
View File
@@ -46,7 +46,14 @@ local ML = require( 'MachiningLib')
--------------------------------------------------------------------- ---------------------------------------------------------------------
-- Riconoscimento della feature -- Riconoscimento della feature
function ProcessCut.Identify( Proc) function ProcessCut.Identify( Proc)
return ( ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 10) -- se richiesto si forza fresatura
Proc.bForceMill = ( Proc.prc == 30 and ( ( EgtGetInfo( Proc.Id, 'Q07', 'd') or 0) == 1))
if Proc.bForceMill then
return false
else
return ( ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 10)
end
end end
--------------------------------------------------------------------- ---------------------------------------------------------------------
@@ -254,7 +261,7 @@ end
--------------------------------------------------------------------- ---------------------------------------------------------------------
-- Applicazione della lavorazione con testa da sopra -- Applicazione della lavorazione con testa da sopra
local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, nLimitingSurf) local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, nLimitingSurf, bForceTangentLeadInOut)
-- ingombro del grezzo -- ingombro del grezzo
b3Raw = b3Raw or EgtGetRawPartBBox( nRawId) b3Raw = b3Raw or EgtGetRawPartBBox( nRawId)
-- ingombro del pezzo -- ingombro del pezzo
@@ -581,7 +588,8 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
if ( i % 2 == 0) and ( Proc.Fct == 1) and bNoPerpCuts then if ( i % 2 == 0) and ( Proc.Fct == 1) and bNoPerpCuts then
vtOrthoOAlternative = - vtOrthoO vtOrthoOAlternative = - vtOrthoO
end end
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dExtraCut, BD.CUT_SIC, 0, 0, 0, sNotes, b3Raw, nil, nil, bSpecialTangentLeadInOut, nil, vtOrthoOAlternative) bForceTangentLeadInOut = bForceTangentLeadInOut and ( ( i % 2) ~= 0)
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dExtraCut, BD.CUT_SIC, 0, 0, 0, sNotes, b3Raw, nil, nil, bSpecialTangentLeadInOut, bForceTangentLeadInOut, vtOrthoOAlternative)
if not bOk then return bOk, sErr end if not bOk then return bOk, sErr end
end end
end end
@@ -821,7 +829,7 @@ end
--------------------------------------------------------------------- ---------------------------------------------------------------------
-- Applicazione della lavorazione -- Applicazione della lavorazione
function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, dOvmTail, bUpdateIng, nLimitingSurf) function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, dOvmTail, bUpdateIng, nLimitingSurf, bForceTangentLeadInOut)
-- sovramateriale di coda -- sovramateriale di coda
dOvmTail = dOvmTail or BD.OVM_MID dOvmTail = dOvmTail or BD.OVM_MID
-- ingombro del grezzo -- ingombro del grezzo
@@ -860,7 +868,7 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom,
local bNoDicing = false local bNoDicing = false
-- se taglio con testa da sopra -- se taglio con testa da sopra
if not bDownHead and not bDownTurn then if not bDownHead and not bDownTurn then
local bOk, sErr, bNoDicing2 = MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, nLimitingSurf) local bOk, sErr, bNoDicing2 = MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, nLimitingSurf, bForceTangentLeadInOut)
bNoDicing = bNoDicing2 bNoDicing = bNoDicing2
if not bOk then return false, sErr end if not bOk then return false, sErr end
-- altrimenti taglio con testa da sotto -- altrimenti taglio con testa da sotto
+3 -1
View File
@@ -250,8 +250,10 @@ function ProcessDrill.Classify( Proc, b3Raw, sDownOrSideOrStd)
-- se ci sono delle dipendenze da altre feature da rispettare -- se ci sono delle dipendenze da altre feature da rispettare
if sDownOrSideOrStd then if sDownOrSideOrStd then
if sDownOrSideOrStd == 'DOWN' then if sDownOrSideOrStd == 'DOWN' then
if vtExtr:getZ() < - BD.DRILL_VZ_MIN then -- se foro fatto in doppio entrambe le forature (valore assoluto) devono essere sopra al valore limite, se foro singolo deve essere sopra al valore limite se ribaltato
if ( abs( Proc.Flg) == 2 and ( abs( vtExtr:getZ()) < - BD.DRILL_VZ_MIN) or ( abs( Proc.Flg) ~= 2 and vtExtr:getZ() < - BD.DRILL_VZ_MIN)) then
Proc.Down = true Proc.Down = true
Proc.Side = false
return true return true
end end
end end
+17 -6
View File
@@ -31,6 +31,8 @@ local Q_DEPTH_CHAMFER = 'Q02' -- d
local Q_OVERMAT_FOR_FINISH = 'Q03' -- d local Q_OVERMAT_FOR_FINISH = 'Q03' -- d
local Q_ONLY_CHAMFER = 'Q00' -- i local Q_ONLY_CHAMFER = 'Q00' -- i
local Q_RADIAL_OFFSET = 'Q06' -- d, valido solo per pocket local Q_RADIAL_OFFSET = 'Q06' -- d, valido solo per pocket
local Q_IGNORE_LASER_PROBLEMS = 'Q07'
local Q_FORCE_CLAMPABLE_AREA = 'Q08'
--------------------------------------------------------------------- ---------------------------------------------------------------------
-- Riconoscimento della feature -- Riconoscimento della feature
@@ -99,6 +101,8 @@ end
function ProcessFreeContour.Classify( Proc, b3Raw) function ProcessFreeContour.Classify( Proc, b3Raw)
-- verifico se di tipo pocket -- verifico se di tipo pocket
local bPocket = ( EgtGetInfo( Proc.Id, 'PCKT', 'i') == 1) local bPocket = ( EgtGetInfo( Proc.Id, 'PCKT', 'i') == 1)
-- verifico se forzata esecuzione anche se di testa e ribaltata o ruotata (lettura laser)
local bDownSideOnHeadOk = ( EgtGetInfo( Proc.Id, Q_IGNORE_LASER_PROBLEMS, 'd') or 0) == 1
-- recupero la curva associata -- recupero la curva associata
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
if not AuxId then return false end if not AuxId then return false end
@@ -107,23 +111,23 @@ function ProcessFreeContour.Classify( Proc, b3Raw)
-- se tasca -- se tasca
if bPocket then if bPocket then
local bDown = ( vtN:getZ() < - 0.5) local bDown = ( vtN:getZ() < - 0.5)
return true, bDown, false return true, bDown, false, bDownSideOnHeadOk
-- se altrimenti profilo orizzontale -- se altrimenti profilo orizzontale
elseif abs( vtN:getZ()) < 0.5 then elseif abs( vtN:getZ()) < 0.5 then
return true, false, false return true, false, false, bDownSideOnHeadOk
-- se altrimenti profilo verticale che non interessa tutta la sezione -- se altrimenti profilo verticale che non interessa tutta la sezione
elseif Proc.Box:getDimZ() < 0.9 * b3Raw:getDimZ() then elseif Proc.Box:getDimZ() < 0.9 * b3Raw:getDimZ() then
local bDown = ( vtN:getZ() < - 0.5) local bDown = ( vtN:getZ() < - 0.5)
return true, bDown, false return true, bDown, false, bDownSideOnHeadOk
-- altrimenti è profilo verticale che interessa tutta la sezione -- altrimenti è profilo verticale che interessa tutta la sezione
else else
-- recupero la massima capacità di lavoro dell'utensile da utilizzare -- recupero la massima capacità di lavoro dell'utensile da utilizzare
local sMilling, dMaxDepth = ML.FindMilling( 'FreeContour') local sMilling, dMaxDepth = ML.FindMilling( 'FreeContour')
if not sMilling then dMaxDepth = 0 end if not sMilling then dMaxDepth = 0 end
if Proc.Box:getDimZ() > dMaxDepth and BD.ROT90 then if Proc.Box:getDimZ() > dMaxDepth and BD.ROT90 then
return true, false, true return true, false, true, bDownSideOnHeadOk
else else
return true, false, false return true, false, false, bDownSideOnHeadOk
end end
end end
end end
@@ -713,7 +717,13 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- eventuale segnalazione ingombro di testa o coda -- eventuale segnalazione ingombro di testa o coda
local dMinHIng = min( 0.5 * BD.VICE_MINH, 0.5 * b3Raw:getDimZ()) local dMinHIng = min( 0.5 * BD.VICE_MINH, 0.5 * b3Raw:getDimZ())
local dMinZ = max( BD.MIN_HEIGHT, 0.35 * b3Raw:getDimZ()) local dMinZ = max( BD.MIN_HEIGHT, 0.35 * b3Raw:getDimZ())
if Proc.Box:getDimZ() > 0.75 * b3Raw:getDimZ() and Proc.Box:getMin():getZ() < b3Raw:getMin():getZ() + dMinZ then local bRawPartHas90Rotation = ( ( EgtGetInfo( nRawId, 'ROTATE90', 'd') or 0) == 1)
-- eventuale forzatura area feature pinzabile
local bForceClampableArea = ( ( EgtGetInfo( Proc.Id, Q_FORCE_CLAMPABLE_AREA, 'd') or 0) == 1)
-- se la feature è passante top/down oppure se è passante e si ruota di 90deg considero sempre non pinzabile; in alternativa si valuta in base all'ingombro
if not bForceClampableArea and ( ( Proc.Box:getDimZ() > 0.75 * b3Raw:getDimZ() and Proc.Box:getMin():getZ() < b3Raw:getMin():getZ() + dMinZ) or
( Proc.AffectedFaces.Top and Proc.AffectedFaces.Bottom and ( AreSameOrOppositeVectorApprox( vtExtr, Z_AX()))) or
( Proc.AffectedFaces.Front and Proc.AffectedFaces.Back and bRawPartHas90Rotation)) then
if Proc.Head then if Proc.Head then
local dOffs = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX() local dOffs = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX()
BL.UpdateHCING( nRawId, dOffs) BL.UpdateHCING( nRawId, dOffs)
@@ -722,6 +732,7 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
BL.UpdateTCING( nRawId, dOffs) BL.UpdateTCING( nRawId, dOffs)
end end
end end
return true, sWarn return true, sWarn
end end
+6 -2
View File
@@ -177,7 +177,7 @@ local function AddVerticalPreCuts( Proc, sCutting, dCutXOffset, b3Raw)
for j = nVerticalCuts, 1, -1 do for j = nVerticalCuts, 1, -1 do
local nFaceUse = MCH_MILL_FU.PARAL_FRONT local nFaceUse = MCH_MILL_FU.PARAL_FRONT
local dVerticalCutOffset = dVerticalSliceHeight * -j local dVerticalCutOffset = dVerticalSliceHeight * -j
local bForceTangentLeadInOut = BD.PRESS_ROLLER local bForceTangentLeadInOut = BD.PRESS_ROLLER and not BD.DOWN_HEAD
bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, nFaceUse, nil, -0.1 -dCutXOffset, BD.CUT_SIC, dVerticalCutOffset, 0, 0, '', b3Raw, nil, nil, nil, bForceTangentLeadInOut) bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, nFaceUse, nil, -0.1 -dCutXOffset, BD.CUT_SIC, dVerticalCutOffset, 0, 0, '', b3Raw, nil, nil, nil, bForceTangentLeadInOut)
if not bOk then return bOk, sErr end if not bOk then return bOk, sErr end
end end
@@ -494,7 +494,11 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
end end
-- tagli aggiuntivi non necessari -- tagli aggiuntivi non necessari
else else
bOk, sErr = Cut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, nil, false, true) local bForceTangentLeadInOut = false
if BD.PRESS_ROLLER then
bForceTangentLeadInOut = true
end
bOk, sErr = Cut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, nil, false, true, nil, nil, nil, nil, nil, bForceTangentLeadInOut)
end end
return bOk, sErr return bOk, sErr
end end
+82 -47
View File
@@ -155,18 +155,22 @@ local bTrySidePocketAtFirst = true
--------------------------------------------------------------------- ---------------------------------------------------------------------
-- Riconoscimento della feature -- Riconoscimento della feature
function ProcessLapJoint.Identify( Proc) function ProcessLapJoint.Identify( Proc)
return ( (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 16) or if Proc.bForceMill then
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 17) or return true
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 20) or else
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 25) or return ( (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 16) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 30) or (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 17) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 32) or (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 20) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 33) or (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 25) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 34) or (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 30) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 90) or (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 32) or
( Proc.Grp == 4 and Proc.Prc == 37) or (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 33) or
( Proc.Grp == 4 and Proc.Prc == 39) or (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 34) or
( Proc.Grp == 4 and Proc.Prc == 120)) (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 90) or
( Proc.Grp == 4 and Proc.Prc == 37) or
( Proc.Grp == 4 and Proc.Prc == 39) or
( Proc.Grp == 4 and Proc.Prc == 120))
end
end end
--------------------------------------------------------------------- ---------------------------------------------------------------------
@@ -781,7 +785,7 @@ function ProcessLapJoint.IsTailFeature( Proc, b3Raw)
-- verifico se è in coda -- verifico se è in coda
local dEndDist = Proc.Box:getMin():getX() - b3Solid:getMin():getX() local dEndDist = Proc.Box:getMin():getX() - b3Solid:getMin():getX()
if dEndDist > BD.MAX_DIST_HTFEA then if dEndDist > BD.MAX_DIST_HTFEA then
if bUseBHSideMill and ( Proc.Box:getMax():getX() - b3Solid:getMin():getX()) < 400 then if not( BD.BH_MACHINE) and bUseBHSideMill and ( Proc.Box:getMax():getX() - b3Solid:getMin():getX()) < 400 then
return true return true
else else
return false return false
@@ -986,8 +990,11 @@ local function MakeOneFaceByMill( Proc, nPhase, nRawId, nPartId)
EgtSetMachiningParam( MCH_MP.FACEUSE, EgtIf( bUp, MCH_MILL_FU.ORTHO_RIGHT, MCH_MILL_FU.PARAL_RIGHT)) EgtSetMachiningParam( MCH_MP.FACEUSE, EgtIf( bUp, MCH_MILL_FU.ORTHO_RIGHT, MCH_MILL_FU.PARAL_RIGHT))
end end
-- imposto lato di correzione -- imposto lato di correzione
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT) EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
if not bUp then EgtSetMachiningParam( MCH_MP.INVERT, true) end if not bUp then
EgtSetMachiningParam( MCH_MP.INVERT, true)
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
end
-- imposto posizione braccio porta testa -- imposto posizione braccio porta testa
if vtN:getY() < GEO.EPS_SMALL then if vtN:getY() < GEO.EPS_SMALL then
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YM) EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YM)
@@ -3472,6 +3479,7 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
local sMchFind = 'Pocket' local sMchFind = 'Pocket'
local dAngLimit = 40 local dAngLimit = 40
local sWarn
-- se feature é larga come trave imposto openpocket -- se feature é larga come trave imposto openpocket
if nDiffWidth == 0 then if nDiffWidth == 0 then
@@ -3485,6 +3493,15 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
-- calcolo l'angolo dalla verticale dall'angolo tra le due facce, perchè la feature potrebbe essere ruotata sulla Z locale della -- calcolo l'angolo dalla verticale dall'angolo tra le due facce, perchè la feature potrebbe essere ruotata sulla Z locale della
-- faccia principale e quindi la componente X del versore della faccia potrebbe dare un valore non coerente -- faccia principale e quindi la componente X del versore della faccia potrebbe dare un valore non coerente
local dDiffFromSqAng = dAng + 90 local dDiffFromSqAng = dAng + 90
-- informazioni sul lato da lavorare
local Edges = BL.GetEdgesInfo( Proc, Proc.Face[nSideFace + 1])
local EdgeToMachine = {}
for i = 1, #Edges do
local CurrentEdge = Edges[i]
if CurrentEdge.AdjacentFaceId == nBaseFace then
EdgeToMachine = CurrentEdge
end
end
-- se l'angolo dalla verticale si discosta di più dell'angolo limite impostato, utilizzo la svuotatura -- se l'angolo dalla verticale si discosta di più dell'angolo limite impostato, utilizzo la svuotatura
if cos( dDiffFromSqAng) < cos( dAngLimit) then if cos( dDiffFromSqAng) < cos( dAngLimit) then
-- applico la svuotatura -- applico la svuotatura
@@ -3510,14 +3527,28 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
end end
-- aggiungo geometria -- aggiungo geometria
EgtSetMachiningGeometry( {{ Proc.Id, nSideFace}}) EgtSetMachiningGeometry( {{ Proc.Id, nSideFace}})
-- imposto uso faccia -- imposto vettore direzione e faceUse
local nFaceUse = BL.GetNearestOrthoOpposite(tvtN[1]) local vtFaceUse = EdgeToMachine.ToolDirection
local sUserNotes = ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'VtFaceUse', EgtNumToString( vtFaceUse:getX(),3) .. ',' .. EgtNumToString( vtFaceUse:getY(),3) .. ',' .. EgtNumToString( vtFaceUse:getZ(),3))
local nFaceUse = BL.GetNearestOrthoOpposite( vtFaceUse)
-- aggiusto i parametri -- aggiusto i parametri
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse) EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH') EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH')
EgtSetMachiningParam( MCH_MP.OFFSR, 0) EgtSetMachiningParam( MCH_MP.OFFSR, 0)
EgtSetMachiningParam( MCH_MP.INVERT, false) EgtSetMachiningParam( MCH_MP.INVERT, false)
EgtSetMachiningParam( MCH_MP.WORKSIDE, 1) EgtSetMachiningParam( MCH_MP.WORKSIDE, 1)
-- imposto allungamenti iniziale e finale
if EdgeToMachine.IsStartOpen then
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dDiamTool / 2)
else
EgtSetMachiningParam( MCH_MP.STARTADDLEN, -dDiamTool / 2)
end
if EdgeToMachine.IsEndOpen then
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dDiamTool / 2)
else
EgtSetMachiningParam( MCH_MP.ENDADDLEN, -dDiamTool / 2)
end
-- imposto posizione braccio porta testa -- imposto posizione braccio porta testa
if tvtN[2]:getY() < GEO.EPS_SMALL then if tvtN[2]:getY() < GEO.EPS_SMALL then
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YM) EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YM)
@@ -3525,9 +3556,9 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YP) EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YP)
end end
-- imposto elevazione e dichiaro non si generano sfridi per VMill -- imposto elevazione e dichiaro non si generano sfridi per VMill
local sNotes = 'MaxElev=' .. EgtNumToString( dElev, 1) .. ';' sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dElev, 1))
sNotes = sNotes .. 'VMRS=0;' sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes) EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
if not ML.ApplyMachining( true, false) then if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError() local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false) EgtSetOperationMode( nMchId, false)
@@ -3547,36 +3578,27 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
bOpenStart = true bOpenStart = true
bOpenEnd = true bOpenEnd = true
else else
local vAdj2 = EgtSurfTmFacetAdjacencies( Proc.Id, (nBaseFace))[1] bOpenStart = EdgeToMachine.IsStartOpen
for j = 1, #vAdj2 do bOpenEnd = EdgeToMachine.IsEndOpen
if vAdj2[j] == (nSideFace) then
-- Se non esiste faccia adiacente a lato precedente -> inizio aperto
local i = EgtIf( j > 1, j - 1, #vAdj2)
while vAdj2[i] == (nSideFace) do
i = EgtIf( i > 1, i - 1, #vAdj2)
end
bOpenStart = ( vAdj2[i] < 0)
-- Se non esiste faccia adiacente a lato successivo -> fine aperto
local k = EgtIf( j < #vAdj2, j + 1, 1)
while vAdj2[k] == (nSideFace) do
k = EgtIf( k < #vAdj2, k + 1, 1)
end
bOpenEnd = ( vAdj2[k] < 0)
end
end
end end
local sMilling local sMilling
if nUseRoughTool > 0 then if nUseRoughTool > 0 then
sMilling = ML.FindMilling( 'Long2Cut', nil, sTuuidPk) sMilling = ML.FindMilling( 'Long2Cut', nil, sTuuidPk)
if not sMilling then sMilling = ML.FindMilling( 'Long2Cut') end if not sMilling then sMilling = ML.FindMilling( 'LongSmallCut', nil, sTuuidPk) end
else else
sMilling = ML.FindMilling( 'LongSmallCut', nil, sTuuidPk) sMilling = ML.FindMilling( 'LongSmallCut', nil, sTuuidPk)
if not sMilling then sMilling = ML.FindMilling( 'LongSmallCut') end if not sMilling then sMilling = ML.FindMilling( 'Long2Cut', nil, sTuuidPk) end
end end
if not sMilling then if not sMilling then
local sErr = 'Error : Long2Cut & LongSmallCut not found in library' sMilling = ML.FindMilling( 'LongSmallCut')
EgtOutLog( sErr) if not sMilling then sMilling = ML.FindMilling( 'Long2Cut') end
return false, sErr if not sMilling then
local sErr = 'Error : Long2Cut & LongSmallCut not found in library'
EgtOutLog( sErr)
return false, sErr
else
sWarn = 'Warning : lapjoint chamfer angle machined with different tool'
end
end end
-- recupero i dati dell'utensile -- recupero i dati dell'utensile
local dTDiam = 50 local dTDiam = 50
@@ -3602,7 +3624,11 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse) EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
-- sistemazione inversione del percorso -- sistemazione inversione del percorso
local nWrkSide = EgtGetMachiningParam( MCH_MP.WORKSIDE) local nWrkSide = EgtGetMachiningParam( MCH_MP.WORKSIDE)
EgtSetMachiningParam( MCH_MP.INVERT, ( nWrkSide ~= MCH_MILL_WS.RIGHT)) local bInvert = nWrkSide ~= MCH_MILL_WS.RIGHT
EgtSetMachiningParam( MCH_MP.INVERT, bInvert)
if bInvert then
bOpenStart, bOpenEnd = bOpenEnd, bOpenStart
end
-- setto a 0 eventuali offset -- setto a 0 eventuali offset
EgtSetMachiningParam( MCH_MP.OFFSR, 0) EgtSetMachiningParam( MCH_MP.OFFSR, 0)
-- calcolo elevazione per allungamenti attacchi con fianchi chiusi -- calcolo elevazione per allungamenti attacchi con fianchi chiusi
@@ -3625,7 +3651,11 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
EgtSetMachiningParam( MCH_MP.LITANG, 0) EgtSetMachiningParam( MCH_MP.LITANG, 0)
EgtSetMachiningParam( MCH_MP.LOTANG, 0) EgtSetMachiningParam( MCH_MP.LOTANG, 0)
EgtSetMachiningParam( MCH_MP.LIPERP, dElev) EgtSetMachiningParam( MCH_MP.LIPERP, dElev)
EgtSetMachiningParam( MCH_MP.LOPERP, dElev) if bOpenEnd then
EgtSetMachiningParam( MCH_MP.LOPERP, 0)
else
EgtSetMachiningParam( MCH_MP.LOPERP, dElev)
end
end end
end end
if bOpenEnd then if bOpenEnd then
@@ -3638,8 +3668,12 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.LINEAR) EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.LINEAR)
EgtSetMachiningParam( MCH_MP.LITANG, 0) EgtSetMachiningParam( MCH_MP.LITANG, 0)
EgtSetMachiningParam( MCH_MP.LOTANG, 0) EgtSetMachiningParam( MCH_MP.LOTANG, 0)
EgtSetMachiningParam( MCH_MP.LIPERP, dElev)
EgtSetMachiningParam( MCH_MP.LOPERP, dElev) EgtSetMachiningParam( MCH_MP.LOPERP, dElev)
if bOpenStart then
EgtSetMachiningParam( MCH_MP.LIPERP, 0)
else
EgtSetMachiningParam( MCH_MP.LIPERP, dElev)
end
end end
end end
-- eseguo -- eseguo
@@ -3650,7 +3684,8 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
end end
end end
end end
return true
return true, sWarn
end end
--------------------------------------------------------------------- ---------------------------------------------------------------------
@@ -7241,7 +7276,7 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- in base al tipo di feature attribuisco il significato dei parametri Q -- in base al tipo di feature attribuisco il significato dei parametri Q
AssignQIdent( Proc) AssignQIdent( Proc)
-- se non forzate frese, uso la lama -- se non forzate frese, uso la lama
local bUseBlade = EgtIf( Proc.Prc == 90, false, EgtGetInfo( Proc.Id, Q_USE_ROUGH_TOOL, 'i') ~= 1 and EgtGetInfo( Proc.Id, Q_USE_MILL, 'i') ~= 1) local bUseBlade = EgtIf( Proc.Prc == 90 or Proc.bForceMill, false, EgtGetInfo( Proc.Id, Q_USE_ROUGH_TOOL, 'i') ~= 1 and EgtGetInfo( Proc.Id, Q_USE_MILL, 'i') ~= 1)
local nForceUseBladeOnNotContinueFace local nForceUseBladeOnNotContinueFace
-- se ho attivo la lama e ho la feature 30, verifico i parametri Q propri della feature -- se ho attivo la lama e ho la feature 30, verifico i parametri Q propri della feature
if bUseBlade then if bUseBlade then
+1 -1
View File
@@ -1393,7 +1393,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
end end
end end
end end
if not Proc.MoveAfterSplit and not bEndFixed and not bConvex then if not Proc.bMoveAfterSplit and not bEndFixed and not bConvex then
-- recupero gruppo per geometria addizionale -- recupero gruppo per geometria addizionale
local nAddGrpId = BL.GetAddGroup( nPartId) local nAddGrpId = BL.GetAddGroup( nPartId)
if not nAddGrpId then if not nAddGrpId then
+12 -2
View File
@@ -209,7 +209,12 @@ function ProcessRidgeLap.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD) local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
if b3Fac1 then dHCI = b3Raw:getMax():getX() - dOvmHead - b3Fac1:getMin():getX() end if b3Fac1 then dHCI = b3Raw:getMax():getX() - dOvmHead - b3Fac1:getMin():getX() end
else else
dHCI = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX() -- se feature inclinata, si va oltre ingombro del box. Si considera metà dell'ingombro della faccia inclinata
if vtN[vFaceOrd[2]] and vtN[vFaceOrd[2]]:getZ() > 0 then
dHCI = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX() - ( vtN[vFaceOrd[2]]:getZ() * b3Raw:getDimZ())
else
dHCI = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX()
end
end end
BL.UpdateHCING( nRawId, dHCI) BL.UpdateHCING( nRawId, dHCI)
elseif Proc.Tail then elseif Proc.Tail then
@@ -218,7 +223,12 @@ function ProcessRidgeLap.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD) local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
if b3Fac1 then dTCI = b3Fac1:getMax():getX() - b3Solid:getMin():getX() end if b3Fac1 then dTCI = b3Fac1:getMax():getX() - b3Solid:getMin():getX() end
else else
dTCI = Proc.Box:getMax():getX() - b3Solid:getMin():getX() -- se feature inclinata, si va oltre ingombro del box. Si considera metà dell'ingombro della faccia inclinata
if vtN[vFaceOrd[2]] and vtN[vFaceOrd[2]]:getZ() > 0 then
dTCI = Proc.Box:getMax():getX() - b3Solid:getMin():getX() - ( vtN[vFaceOrd[2]]:getZ() * b3Raw:getDimZ())
else
dTCI = Proc.Box:getMax():getX() - b3Solid:getMin():getX()
end
end end
BL.UpdateTCING( nRawId, dTCI) BL.UpdateTCING( nRawId, dTCI)
end end
+30 -11
View File
@@ -196,28 +196,47 @@ local function ApplyDiceCut( vFaceOrd, nGoodFace1, nGoodFace4, nAddGrpId, b3Soli
end end
end end
local dDiceFaceMaxH = 0 -- controllo per eseguire solo un taglio ottimizzato
local dDiceFaceMinH = GEO.INFINITO local bExecJustOneCut = false
local dDiceFaceDim = GEO.INFINITO
if ( i % 2) == 0 then if ( i % 2) == 0 then
for cont = 1, #vCuts[i] do for cont = 1, #vCuts[i] do
local _, dDiceFaceH, dDiceFaceV = BL.GetFaceHvRefDim( vCuts[i][cont], 0) local _, dDiceFaceH, dDiceFaceV = BL.GetFaceHvRefDim( vCuts[i][cont], 0)
dDiceFaceMaxH = max( dDiceFaceMaxH, dDiceFaceH) -- se feature verso Z, si ammette anche lavorazione in doppio
-- calcolo lato orizzontale minore ipotizzando sia un trapezio if AreSameVectorApprox( vtRef, Z_AX()) then
local dDiceFaceH2 = ( 2 * EgtSurfArea( vCuts[i][cont]) ) / dDiceFaceV - dDiceFaceH if dMaxDepth * 2 > dDiceFaceH + BD.CUT_EXTRA then
dDiceFaceMinH = min( dDiceFaceMinH, dDiceFaceH2) bExecJustOneCut = true
dDiceFaceDim = dDiceFaceH
break
end
elseif AreSameVectorApprox( vtRef, Y_AX()) or AreSameVectorApprox( vtRef, -Y_AX()) then
if dMaxDepth > dDiceFaceV + BD.CUT_EXTRA then
bExecJustOneCut = true
dDiceFaceDim = dDiceFaceV
break
end
end
end end
end end
-- se si può fare, faccio unico taglio parallelo -- se si può fare, faccio unico taglio parallelo
if ( i % 2) == 0 and ( dMaxDepth > dDiceFaceMaxH - 0.5 * dDiceFaceMinH + BD.CUT_EXTRA_MIN) then if bExecJustOneCut then
local bDoubleCut = false local bDoubleCut = false
local dCutExtra = BD.CUT_EXTRA local dCutExtra = BD.CUT_EXTRA
if dMaxDepth < dDiceFaceMaxH + BD.CUT_EXTRA then if dMaxDepth < dDiceFaceDim then
bDoubleCut = true bDoubleCut = true
dCutExtra = - 0.5 * dDiceFaceMinH + BD.CUT_EXTRA_MIN
end end
local nSurfToCut = EgtSurfTmBySewing( nAddGrpId, vCuts[i], false) local nSurfToCut = EgtSurfTmBySewing( nAddGrpId, vCuts[i], false)
local nFaceUseCut1, nFaceUseCut2 = MCH_MILL_FU.ORTHO_BACK, MCH_MILL_FU.ORTHO_FRONT
if Proc.Tail then local nFaceUseCut1, nFaceUseCut2
-- se feature rivolta verso alto setto direzione taglio davanti e dietro
if AreSameVectorApprox( vtRef, Z_AX()) then
nFaceUseCut1, nFaceUseCut2 = MCH_MILL_FU.ORTHO_BACK, MCH_MILL_FU.ORTHO_FRONT
-- altrimenti taglio da sopra
else
nFaceUseCut2 = MCH_MILL_FU.ORTHO_DOWN
end
if Proc.Tail and AreSameVectorApprox( vtRef, Z_AX()) then
nFaceUseCut1, nFaceUseCut2 = nFaceUseCut2, nFaceUseCut1 nFaceUseCut1, nFaceUseCut2 = nFaceUseCut2, nFaceUseCut1
end end
if bDoubleCut then if bDoubleCut then
+6 -2
View File
@@ -352,7 +352,7 @@ local function AddVerticalPreCuts( Proc, sCutting, dCutXOffset, b3Raw, sNotes)
for j = nVerticalCuts, 1, -1 do for j = nVerticalCuts, 1, -1 do
local nFaceUse = MCH_MILL_FU.PARAL_FRONT local nFaceUse = MCH_MILL_FU.PARAL_FRONT
local dVerticalCutOffset = dVerticalSliceHeight * -j local dVerticalCutOffset = dVerticalSliceHeight * -j
local bForceTangentLeadInOut = BD.PRESS_ROLLER local bForceTangentLeadInOut = BD.PRESS_ROLLER and not BD.DOWN_HEAD
bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, nFaceUse, nil, -0.1 -dCutXOffset, BD.CUT_SIC, dVerticalCutOffset, 0, 0, sNotes, b3Raw, nil, nil, nil, bForceTangentLeadInOut) bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, nFaceUse, nil, -0.1 -dCutXOffset, BD.CUT_SIC, dVerticalCutOffset, 0, 0, sNotes, b3Raw, nil, nil, nil, bForceTangentLeadInOut)
if not bOk then return bOk, sErr end if not bOk then return bOk, sErr end
end end
@@ -766,7 +766,11 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
end end
-- tagli aggiuntivi non necessari -- tagli aggiuntivi non necessari
else else
bOk, sErr = Cut.Make( Proc, nNewPhase, nRawId, nPartId, dMaxElev, nil, false, true, b3Raw, sNotes, dCurrOvmT) local bForceTangentLeadInOut = false
if BD.PRESS_ROLLER then
bForceTangentLeadInOut = true
end
bOk, sErr = Cut.Make( Proc, nNewPhase, nRawId, nPartId, dMaxElev, nil, false, true, b3Raw, sNotes, dCurrOvmT, nil, nil, bForceTangentLeadInOut)
end end
if sNotesFinal then if sNotesFinal then
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotesFinal) EgtSetMachiningParam( MCH_MP.USERNOTES, sNotesFinal)
+24
View File
@@ -1,5 +1,29 @@
==== Beam Update Log ==== ==== Beam Update Log ====
Versione 2.6j2 (17/10/2024)
- Fixed : in forature corretto caso in cui il foro viene ripetuto in più rotazioni
Versione 2.6j1 (10/10/2024)
- Modif : se la macchina è tipo BlockHaus, i LapJoint vengono fatti prima del taglio di separazione
- Modif : se tenone di coda è attraversato da foro allora anche il foro sarà di coda
- Modif : migliorato ordinamento per tenoni con foro secante
- Modif : in FreeContour migliorato pinzaggio
- Modif : in LapJoint miglioramenti vari alla lavorazione delle facce oblique
- Modif : In RidgeLap l'ingombro testa coda considera inclinazione feature per pinzaggio
- Added : in FreeContour aggiunta Q08 per forzare come pinzabile l'area della feature e Q07 per ignorare possibili problemi di lettura laser
- Added : in tagli aggiunta Q07 per forzare uso fresa
Versione 2.6i3 (08/10/2024)
- Modif : In RidgeLap, ingombro testa coda considera inclinazione feature per pinzaggio.
Versione 2.6i2 (13/09/2024)
- Modif : in FacesBySaw si invertono gli accorciamenti solo se l'inversione del percorso non è forzata dall'esterno; adeguati HeadCut e Split
- Modif : in nesting correzione in lettura array per cambio dll di lettura
- Modif : in BatchProcess e New, in caso sia richiesta generazione senza check, verifico prima che il file log specifico non contenga errori: se sì, forzo il check
- Modif : in FacesBySaw per settare il FaceUse si usa il versore nelle UserNotes
- Modif : in HeadCut, Split modifiche ai tagli aggiuntivi orizzontali e verticali; disattivati attacchi tangenziali per tagli aggiuntivi verticali in PF1250
- Fixed : in ProcessDrill In GetData corretta gestione modifica diametro foro
Versione 2.6i1 (09/09/2024) Versione 2.6i1 (09/09/2024)
- Added : refactoring e modifiche a HeadCut e Split per introduzione pretagli a zero sul grezzo, per evitare problemi con pezzi non lunghi quanto ci si aspetta - Added : refactoring e modifiche a HeadCut e Split per introduzione pretagli a zero sul grezzo, per evitare problemi con pezzi non lunghi quanto ci si aspetta
- Added : in Mark, gestita la lavorazione del testo - Added : in Mark, gestita la lavorazione del testo
+1 -1
View File
@@ -2,5 +2,5 @@
-- Gestione della versione di Beam -- Gestione della versione di Beam
NAME = 'Beam' NAME = 'Beam'
VERSION = '2.6i1' VERSION = '2.6j2'
MIN_EXE = '2.6e5' MIN_EXE = '2.6e5'