Compare commits

...

55 Commits

Author SHA1 Message Date
andrea.villa d4c9843597 In LapJoint, la SawPlusChain è estesa alla topologia "Groove-Through-RightAngles-NotParallel-3" 2024-12-04 08:25:57 +01:00
luca.mazzoleni 077cb2c586 - in HeadCut e Split si sceglie sempre la lama primaria più grande
- in LapJoint -> SawPlusChain si sceglie la lama in base alla profondità della tasca
2024-12-02 17:51:59 +01:00
luca.mazzoleni 8e9de6026e Merge tag '2.6k2' into develop
2.6k2
2024-11-28 09:51:19 +01:00
luca.mazzoleni b382560cfa Merge branch 'release/2.6k2' 2024-11-28 09:51:03 +01:00
luca.mazzoleni 339c6acb37 update log e version 2024-11-28 09:50:47 +01:00
andrea.villa 570a65c7a1 In FacesBySaw ridotto a 15° limite per accorciare geometria bilinea 2024-11-21 12:12:09 +01:00
andrea.villa e18a816647 In LapJoint, se forma a U si ricalcola dimensione della tasca 2024-11-21 11:24:46 +01:00
andrea.villa d578194d43 In DiceCut migliorato controllo rimozione del primo cubetto molto piccolo 2024-11-20 11:50:10 +01:00
luca.mazzoleni e0f20d19f0 - in FacesBySaw migliorati i casi in cui si inverte l'SCC per facilitare la caduta del legno 2024-11-20 10:03:16 +01:00
luca.mazzoleni cff4ef0d47 Merge tag '2.6k1' into develop
2.6k1
2024-11-15 16:03:39 +01:00
luca.mazzoleni d9fb464066 Merge branch 'release/2.6k1' 2024-11-15 16:03:29 +01:00
luca.mazzoleni 9d6a5fb496 update version e log 2024-11-15 15:58:29 +01:00
luca.mazzoleni c3fab404a5 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataBeam into develop 2024-11-15 15:45:44 +01:00
luca.mazzoleni fa139c84f3 - piccola correzione in ProcessDovetail 2024-11-15 15:45:40 +01:00
andrea.villa ae6853cd3f In Drill, se foro doppio si aumenta lo step per evitare collisione tra le punte durante lavorazione. 2024-11-12 09:40:24 +01:00
luca.mazzoleni c0618cd628 Merge branch 'master' into develop 2024-11-06 10:27:53 +01:00
luca.mazzoleni 524b6a470c update log e version 2024-11-06 10:26:52 +01:00
luca.mazzoleni cd4aa8ee11 -in Drill non si riclassificano come Down i fori fatti in doppio (risolve problemi di chariot collision su macchine tipo PF) 2024-11-06 10:22:01 +01:00
luca.mazzoleni 242f5f4516 -in Drill non si riclassificano come Down i fori fatti in doppio (risolve problemi di chariot collision su macchine tipo PF) 2024-11-05 14:29:23 +01:00
luca.mazzoleni e6a3e0c519 - in Cut correzione a utilizzo Q07 (forzatura fresa)
- in LapJoint se arriva da Cut si applica sempre svuotatura
- in LapJoint se birdsmouth a L si applica svuotatura anche in caso di elevazione non raggiunta (non si tenta la fresatura che fallirebbe non trovando facce sul lato lungo)
2024-11-05 11:17:39 +01:00
luca.mazzoleni 640c8af05f - in ProcessCut lunghezza minima feature per considerare taglio lungo portata a 400 mm per macchine tipo Fast 2024-10-29 11:56:40 +01:00
luca.mazzoleni 48ceceb8e0 Merge branch 'master' into develop 2024-10-29 10:05:46 +01:00
luca.mazzoleni 5165463dbd update log 2024-10-29 10:05:36 +01:00
luca.mazzoleni 9e1d424bc7 Merge branch 'master' into develop 2024-10-29 09:28:04 +01:00
luca.mazzoleni 15c96303de Merge branch 'develop' 2024-10-29 09:25:58 +01:00
luca.mazzoleni 3211f21869 Merge branch 'master' into develop 2024-10-18 12:12:52 +02:00
luca.mazzoleni 1f4fe3597b update version e log 2024-10-18 12:10:37 +02:00
luca.mazzoleni 0749e56b9f Merge tag 'DrillTenonTail' into develop
hotfix
2024-10-18 12:08:03 +02:00
luca.mazzoleni 7424bdc147 Merge branch 'hotfix/DrillTenonTail' 2024-10-18 12:07:46 +02:00
luca.mazzoleni a623072e89 - in BeamExec -> dipendenza feature rimosso foro di coda se tenone è di coda 2024-10-18 12:07:28 +02:00
luca.mazzoleni 7f15b08b20 Merge branch 'master' into develop 2024-10-17 12:26:09 +02:00
luca.mazzoleni 82d4fadaaa update log e versione 2024-10-17 12:25:43 +02:00
luca.mazzoleni d9f4d0584a Merge tag 'DrillSideAndDown' into develop
fix
2024-10-17 12:21:52 +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 8b1d38c451 modifiche a FacesBySaw del commit precedente estese anche a Fast 2024-10-17 08:57:52 +02:00
andrea.villa abe3465514 - In FacesBySaw, se taglio orizzontale (con componente Z del vtTg a zero) si orienta SCC aggregato lama verso l'interno. In modo che quando si stacca il pezzo non cada sopra l'aggregato.
- In LapJoint, se si utilizza fresa per BlockHaus, si considera sempre di coda
2024-10-11 12:38:28 +02:00
luca.mazzoleni fc753c47be Merge branch 'master' into develop 2024-10-10 14:31:22 +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
16 changed files with 324 additions and 95 deletions
+21 -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
return true
end
-- se primo è foro e secondo è un ribasso, 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
-- 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) 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
return true
end
-- se primo è un ribasso e secondo è un foro, 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
-- 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) 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
return false
end
@@ -1221,7 +1221,7 @@ local function ClassifyFeatures( vProc, b3Raw, Stats)
bOk, bDown, bSide = ProfHead.Classify( Proc, b3Raw)
-- se contorno libero
elseif FreeContour.Identify( Proc) then
bOk, bDown, bSide = FreeContour.Classify( Proc, b3Raw)
bOk, bDown, bSide, bDownSideOnHeadOk = FreeContour.Classify( Proc, b3Raw)
-- se decorazione
elseif Decor.Identify( Proc) then
bOk, bDown = Decor.Classify( Proc)
@@ -1231,7 +1231,7 @@ local function ClassifyFeatures( vProc, b3Raw, Stats)
end
-- assegno risultato
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
Proc.Flg = 0
Proc.Down = true
@@ -2034,6 +2034,10 @@ 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
Proc.PassedByDtMortise = true
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
-- verifiche per specchiature
if BD.DOWN_HEAD or BD.TWO_EQUAL_HEADS then
-- forature
@@ -2107,6 +2111,17 @@ function BeamExec.ProcessFeatures()
PrintFeatures( vProc, b3Raw)
end
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
local bNeedHCut = VerifyNeedForHeadCut( vProc, bSomeDown, bSomeSide)
-- 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
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
function BeamLib.GetAdjacencyMatrix( Proc)
+4 -1
View File
@@ -275,12 +275,15 @@ local function VerifyFirstOrthoCut( CutTable, OffsetP, BBoxRawPart, dNzLimDwnUp)
-- normale alla faccia ortogonale
local _, vtO = EgtSurfTmFacetCenter( CutOId, 0, GDB_ID.ROOT)
vtO = vtO - vtO * vtN1 * vtN1 ; vtO:normalize()
local dMaxElev = EgtSurfTmFacetElevationInBBox( CutOId, 0, BBoxRawPart, true, GDB_ID.ROOT)
-- calcolo lunghezza prima semi-faccia
local asseX1 = vtO
local asseY1 = vtN1 ^ asseX1
local Frame1 = Frame3d( ptC1, ptC1+asseX1, ptC1+asseY1)
local Box1 = EgtGetBBoxRef( Cut1Id, GDB_BB.STANDARD, Frame1)
local x1 = Box1:getDimX()
-- prendo il massimo tra la lugnhezza della faccia parallela e l'elevazione della corrispondente ortogonale
x1 = max( x1, dMaxElev)
-- calcolo lunghezza seconda semi-faccia
local asseX2 = vtO
local asseY2 = vtN2 ^ asseX2
@@ -430,7 +433,7 @@ function DiceCut.GetDice( nParent, BBoxRawPart, ptCPlanes, vtNPlanes, bGetOrtoPl
if dElevO then
local m = ceil( dElevO / OffsetO)
OffsetO = dElevO / m
end
end
-- elenco di tutte le superfici generate dai tagli
local TabFUCHSIA = {}
+15 -5
View File
@@ -309,7 +309,7 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
bIsBiLinea = true
local vtTg1 = ptPm - ptP1 ; vtTg1:normalize()
local vtTg2 = ptP2 - ptPm ; vtTg2:normalize()
local dCosMax = 0.951 -- cos( 18°)
local dCosMax = 0.966 -- cos( 15°)
local dLenMin = 30
local dLenMax = max( 0.5 * dSawDiam * 0.17365 + 1, 2 * dLenMin)
dCosAngleL1L2 = vtTg1 * vtTg2
@@ -467,9 +467,19 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
if BD.C_SIMM and bMaximizeVerticalDepth then
nSCC = MCH_SCC.ADIR_ZM
elseif abs( vtAux:getX()) > abs( vtAux:getY()) - GEO.EPS_SMALL then
nSCC = EgtIf( ( vtAux:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
-- se il taglio è orizzontale, si gira aggregato lama per facilitare caduta del legno
if abs( vtTg:getZ()) < 10 * GEO.EPS_SMALL and not AreSameOrOppositeVectorApprox( vtN, Z_AX()) then
nSCC = EgtIf( ( vtAux:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
else
nSCC = EgtIf( ( vtAux:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
end
else
nSCC = EgtIf( ( vtAux:getY() > -GEO.EPS_SMALL), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
-- se il taglio è orizzontale, si gira aggregato lama per facilitare caduta del legno
if abs( vtTg:getZ()) < 10 * GEO.EPS_SMALL and not AreSameOrOppositeVectorApprox( vtN, Z_AX()) then
nSCC = EgtIf( ( vtAux:getY() > -GEO.EPS_SMALL), MCH_SCC.ADIR_YM, MCH_SCC.ADIR_YP)
else
nSCC = EgtIf( ( vtAux:getY() > -GEO.EPS_SMALL), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
end
end
else
if BD.TURN == 2 then
@@ -609,8 +619,8 @@ function FacesBySaw.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, sCutType,
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
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[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[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.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
local sErr = 'Error : TwoFacesBySaw from bottom impossible'
EgtOutLog( sErr)
+3 -3
View File
@@ -170,7 +170,7 @@ function VerifyTool( Machining, MachiningType, Params, bH2)
return VerifyDrillPocket( Machining, Params.Diam, Params.Depth, bH2)
end
elseif MachiningType == MCH_MY.SAWING then
return true, { H2 = bH2}
return ( not Params.Depth or Machining.Tool.MaxMat > Params.Depth - GEO.EPS_SMALL), { H2 = bH2}
elseif MachiningType == MCH_MY.MILLING then
return VerifyMill( Machining, Params.Depth, Params.TuuidMstr, Params.MaxDiam, Params.MaxTotLen, bH2)
elseif MachiningType == MCH_MY.POCKETING then
@@ -450,8 +450,8 @@ local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead,
end
---------------------------------------------------------------------
function MachiningLib.FindCutting( sType, bTopHead, bDownHead)
return FindMachining( MCH_MY.SAWING, sType, nil, bTopHead, bDownHead)
function MachiningLib.FindCutting( sType, bTopHead, bDownHead, dDepth, sSortingCriterion)
return FindMachining( MCH_MY.SAWING, sType, { Depth = dDepth}, bTopHead, bDownHead, nil, nil, sSortingCriterion)
end
---------------------------------------------------------------------
+9 -2
View File
@@ -46,7 +46,14 @@ local ML = require( 'MachiningLib')
---------------------------------------------------------------------
-- Riconoscimento della feature
function ProcessCut.Identify( Proc)
return ( ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 10)
-- se richiesto si forza fresatura
Proc.bForceMill = ( ( ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 10) 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
---------------------------------------------------------------------
@@ -267,7 +274,7 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
if bFromBottom == nil then
bFromBottom = ( vtN:getZ() > 0.25 and b3Solid:getDimX() < BD.LEN_SHORT_PART and not Proc.AdvTail and vtN:getX() < 0 and abs( vtN:getY()) < 0.259)
end
local dMinFeatureLengthForLongCut = 590.000
local dMinFeatureLengthForLongCut = EgtIf( BD.C_SIMM, 590, 400)
-- verifico se da considerare taglio lungo ( non da sotto, inclinato non più di 30deg, largo come la trave e abbastanza lungo)
local bLongCut = ( not bDownCut and vtN:getZ() > 0.865 and
Proc.Box:getDimY() > b3Solid:getDimY() - 10 * GEO.EPS_SMALL and
+2 -2
View File
@@ -1190,14 +1190,14 @@ local function Make2Faces( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Raw, b3Sol
return MakeByBlade( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Raw, b3Solid)
-- altrimenti provo con il truciolatore
else
local sName = 'Mill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
-- se non ho la lavorazione esco
if not sMilling then
local sErr = 'Error, machining or tool not found ' .. sName .. '-' .. sMilling
local sErr = 'Error, machining or tool not found ' .. sName
EgtOutLog( sErr)
return false, sErr
end
-- inserisco la lavorazione di fresatura
local sName = 'Mill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchFId = EgtAddMachining( sName, sMilling)
if not nMchFId then
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
+17 -2
View File
@@ -250,8 +250,13 @@ function ProcessDrill.Classify( Proc, b3Raw, sDownOrSideOrStd)
-- se ci sono delle dipendenze da altre feature da rispettare
if sDownOrSideOrStd then
if sDownOrSideOrStd == 'DOWN' then
if vtExtr:getZ() < - BD.DRILL_VZ_MIN then
Proc.Down = true
-- 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
-- in doppio non cambio di fase al foro perchè devo garantire il lato master su H1
if not( Proc.Double) or Proc.Double == 0 then
Proc.Down = true
Proc.Side = false
end
return true
end
end
@@ -599,6 +604,16 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
end
-- se lavorazione in doppio
if Proc.Double and Proc.Double > 0 then
-- calcolo gli step reali
local dStep = EgtGetMachiningParam( MCH_MP.STEP)
local nNumStep = ceil( dDepth/dStep)
local dRealStep = dDepth / nNumStep
-- Se nel penultimo step le punte si trovano più vicine del minimo ( MinDistX1X2 + Puntina centraggio H1 + puntina centraggio H2) ricalcolo facendo uno step in meno
if ( ( dLen / 2) - ( dRealStep * (nNumStep - 1))) * 2 < ( 40 + 10 + 10) then
dRealStep = ceil( dDepth / (nNumStep - 1))
EgtSetMachiningParam( MCH_MP.STEP, dRealStep)
sMyWarn ='Warning in drill-double : step changed to ' .. tostring(dRealStep) .. 'mm'
end
sUserNotes = EgtSetValInNotes( sUserNotes, 'DOUBLE', Proc.Double)
if Proc.Double ~= Proc.PrevDouble then
sUserNotes = EgtSetValInNotes( sUserNotes, 'StartZmax', 2)
+17 -6
View File
@@ -31,6 +31,8 @@ local Q_DEPTH_CHAMFER = 'Q02' -- d
local Q_OVERMAT_FOR_FINISH = 'Q03' -- d
local Q_ONLY_CHAMFER = 'Q00' -- i
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
@@ -99,6 +101,8 @@ end
function ProcessFreeContour.Classify( Proc, b3Raw)
-- verifico se di tipo pocket
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
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
if not AuxId then return false end
@@ -107,23 +111,23 @@ function ProcessFreeContour.Classify( Proc, b3Raw)
-- se tasca
if bPocket then
local bDown = ( vtN:getZ() < - 0.5)
return true, bDown, false
return true, bDown, false, bDownSideOnHeadOk
-- se altrimenti profilo orizzontale
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
elseif Proc.Box:getDimZ() < 0.9 * b3Raw:getDimZ() then
local bDown = ( vtN:getZ() < - 0.5)
return true, bDown, false
return true, bDown, false, bDownSideOnHeadOk
-- altrimenti è profilo verticale che interessa tutta la sezione
else
-- recupero la massima capacità di lavoro dell'utensile da utilizzare
local sMilling, dMaxDepth = ML.FindMilling( 'FreeContour')
if not sMilling then dMaxDepth = 0 end
if Proc.Box:getDimZ() > dMaxDepth and BD.ROT90 then
return true, false, true
return true, false, true, bDownSideOnHeadOk
else
return true, false, false
return true, false, false, bDownSideOnHeadOk
end
end
end
@@ -713,7 +717,13 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- eventuale segnalazione ingombro di testa o coda
local dMinHIng = min( 0.5 * BD.VICE_MINH, 0.5 * 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
local dOffs = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX()
BL.UpdateHCING( nRawId, dOffs)
@@ -722,6 +732,7 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
BL.UpdateTCING( nRawId, dOffs)
end
end
return true, sWarn
end
+1 -1
View File
@@ -365,7 +365,7 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
-- eventuali informazioni sul tipo di finitura
local nQ05 = EgtGetInfo( nOriId or GDB_ID.NULL, 'Q05', 'i') or 0
-- recupero la lavorazione
local sCutting = ML.FindCutting( 'HeadSide')
local sCutting = ML.FindCutting( 'HeadSide', nil, nil, nil, 'Longest')
if not sCutting then
local sErr = 'Error : cutting not found in library'
EgtOutLog( sErr)
+120 -52
View File
@@ -117,6 +117,7 @@ local ProcessLapJoint = {}
require( 'EgtBase')
local BL = require( 'BeamLib')
local Fbs = require( 'FacesBySaw')
local Fbp = require( 'FaceByPocket')
local Cut = require( 'ProcessCut')
local DoubleCut = require( 'ProcessDoubleCut')
local LongCut = require( 'ProcessLongCut')
@@ -155,18 +156,22 @@ local bTrySidePocketAtFirst = true
---------------------------------------------------------------------
-- Riconoscimento della feature
function ProcessLapJoint.Identify( Proc)
return ( (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 16) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 17) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 20) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 25) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 30) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 32) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 33) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 34) or
(( 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))
if Proc.bForceMill then
return true
else
return ( (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 16) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 17) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 20) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 25) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 30) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 32) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 33) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 34) or
(( 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
---------------------------------------------------------------------
@@ -779,14 +784,16 @@ function ProcessLapJoint.IsTailFeature( Proc, b3Raw)
local nPartId = EgtGetParent( EgtGetParent( Proc.Id) or GDB_ID.NULL)
local b3Solid = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
-- verifico se è in coda
local dEndDist = Proc.Box:getMin():getX() - b3Solid:getMin():getX()
if dEndDist > BD.MAX_DIST_HTFEA then
if ( dEndDist > BD.MAX_DIST_HTFEA) or bUseBHSideMill then
if not( BD.BH_MACHINE) and bUseBHSideMill and ( Proc.Box:getMax():getX() - b3Solid:getMin():getX()) < 400 then
return true
else
return false
end
end
-- se lunga come trave, oppure non è trave corta e la sua lunghezza supera il massimo o il 80% della lunghezza della trave
if Proc.Box:getDimX() > b3Solid:getDimX() - 1 or
( b3Solid:getDimX() > BD.LEN_SHORT_PART and Proc.Box:getDimX() > min( BD.MAX_LEN_HTFEA, 0.8 * b3Solid:getDimX())) then
@@ -986,8 +993,11 @@ local function MakeOneFaceByMill( Proc, nPhase, nRawId, nPartId)
EgtSetMachiningParam( MCH_MP.FACEUSE, EgtIf( bUp, MCH_MILL_FU.ORTHO_RIGHT, MCH_MILL_FU.PARAL_RIGHT))
end
-- imposto lato di correzione
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
if not bUp then EgtSetMachiningParam( MCH_MP.INVERT, true) end
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
if not bUp then
EgtSetMachiningParam( MCH_MP.INVERT, true)
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
end
-- imposto posizione braccio porta testa
if vtN:getY() < GEO.EPS_SMALL then
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YM)
@@ -3472,6 +3482,7 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
local sMchFind = 'Pocket'
local dAngLimit = 40
local sWarn
-- se feature é larga come trave imposto openpocket
if nDiffWidth == 0 then
@@ -3485,6 +3496,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
-- faccia principale e quindi la componente X del versore della faccia potrebbe dare un valore non coerente
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
if cos( dDiffFromSqAng) < cos( dAngLimit) then
-- applico la svuotatura
@@ -3510,14 +3530,28 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ Proc.Id, nSideFace}})
-- imposto uso faccia
local nFaceUse = BL.GetNearestOrthoOpposite(tvtN[1])
-- imposto vettore direzione e faceUse
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
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH')
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
EgtSetMachiningParam( MCH_MP.INVERT, false)
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
if tvtN[2]:getY() < GEO.EPS_SMALL then
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YM)
@@ -3525,9 +3559,9 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YP)
end
-- imposto elevazione e dichiaro non si generano sfridi per VMill
local sNotes = 'MaxElev=' .. EgtNumToString( dElev, 1) .. ';'
sNotes = sNotes .. 'VMRS=0;'
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dElev, 1))
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
@@ -3547,36 +3581,27 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
bOpenStart = true
bOpenEnd = true
else
local vAdj2 = EgtSurfTmFacetAdjacencies( Proc.Id, (nBaseFace))[1]
for j = 1, #vAdj2 do
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
bOpenStart = EdgeToMachine.IsStartOpen
bOpenEnd = EdgeToMachine.IsEndOpen
end
local sMilling
if nUseRoughTool > 0 then
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
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
if not sMilling then
local sErr = 'Error : Long2Cut & LongSmallCut not found in library'
EgtOutLog( sErr)
return false, sErr
sMilling = ML.FindMilling( 'LongSmallCut')
if not sMilling then sMilling = ML.FindMilling( 'Long2Cut') end
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
-- recupero i dati dell'utensile
local dTDiam = 50
@@ -3602,7 +3627,11 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
-- sistemazione inversione del percorso
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
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
-- calcolo elevazione per allungamenti attacchi con fianchi chiusi
@@ -3625,7 +3654,11 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
EgtSetMachiningParam( MCH_MP.LITANG, 0)
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
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
if bOpenEnd then
@@ -3638,8 +3671,12 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.LINEAR)
EgtSetMachiningParam( MCH_MP.LITANG, 0)
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
EgtSetMachiningParam( MCH_MP.LIPERP, dElev)
EgtSetMachiningParam( MCH_MP.LOPERP, dElev)
if bOpenStart then
EgtSetMachiningParam( MCH_MP.LIPERP, 0)
else
EgtSetMachiningParam( MCH_MP.LIPERP, dElev)
end
end
end
-- eseguo
@@ -3650,7 +3687,8 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
end
end
end
return true
return true, sWarn
end
---------------------------------------------------------------------
@@ -4712,6 +4750,7 @@ SawPlusChain.ApplyOnlySawblade = false
function SawPlusChain.IsTopologyOk( Proc)
if Proc.TopologyLongName == 'Pocket-Blind-RightAngles-Parallel-5' or
Proc.TopologyLongName == 'Groove-Through-RightAngles-Parallel-3' or
Proc.TopologyLongName == 'Groove-Through-RightAngles-NotParallel-3' or
Proc.TopologyLongName == 'Groove-Blind-RightAngles-Parallel-4' or
Proc.TopologyLongName == 'Tunnel-Through-RightAngles-Parallel-4' then
@@ -5230,11 +5269,16 @@ function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, Edg
end
-- ricerca lavorazione
Cutting.Name = ML.FindCutting( 'HeadSide', true, false)
Cutting.Name = ML.FindCutting( 'HeadSide', true, false, abs( EdgeToMachine.Elevation))
if not Cutting.Name then
Cutting.Message = 'Feature '.. Proc.FeatureId .. ' : strategy ' .. SawPlusChain.Name .. ' not applicable - saw blade not found'
Cutting.CanApply = false
EgtOutLog( Cutting.Message)
-- ricerca lavorazione senza considerare massima elevazione
Cutting.Name = ML.FindCutting( 'HeadSide', true, false, nil, 'Longest')
if not Cutting.Name then
Cutting.Message = 'Feature '.. Proc.FeatureId .. ' : strategy ' .. SawPlusChain.Name .. ' not applicable - saw blade not found'
Cutting.CanApply = false
EgtOutLog( Cutting.Message)
return Cutting
end
end
Cutting.Type = MCH_OY.MILLING
Cutting.Tool = SawPlusChain.GetToolFromMachining( Cutting.Name)
@@ -5635,7 +5679,7 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
end
else
-- se la lama non è arrivata sul fondo e c'è almeno un lato aperto va lavorato
if Cutting.RadialOffset > 10 * GEO.EPS_SMALL then
if Cutting.CanApply and Cutting.RadialOffset > 10 * GEO.EPS_SMALL then
-- eventuale lavorazione di lama - lato della tasca da cui inizia la lavorazione
if Proc.MainFaces.LongFace.Edges.BottomEdge.IsStartOpen then
Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.SideEdges.StartEdge)
@@ -6297,6 +6341,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
if sMyPocketing and
( dMyTMaxDepth > dFacElev + dCollSic - 10 * GEO.EPS_SMALL or ( dMyTMaxDepth > 0.8 * dFacElev + dCollSic and not bIsU) or
( bIsL and nUseRoughTool == 0) or
( bIsL and Proc.Prc == 20) or
( Proc.Prc == 25 and not bIsU and not bIsL)) or
( dUserMaxElev and dUserMaxElev > 10 * GEO.EPS_SMALL) then
sPocketing = sMyPocketing
@@ -6359,6 +6404,21 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
bUseOtherFace = true
rfFac, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacInd, GDB_ID.ROOT)
end
-- se forma a U (recupero la larghezza della faccia perpendicolarmente alle altre)
if Proc.Fct == 3 and bIsU then
local vtN2 = EgtSurfTmFacetNormVersor( Proc.Id, EgtIf( nFacInd == 0, 1, 0), GDB_ID.ROOT)
local vtX = vtN2 ^ vtN
if not vtX:isSmall() then
local frRef = Frame3d( ptC, ptC + 100 * vtX, ptC + 100 * vtN2)
local b3Ref = EgtSurfTmGetFacetBBoxRef( Proc.Id, nFacInd, GDB_BB.STANDARD, frRef)
if b3Ref then
dH = b3Ref:getDimX()
dV = b3Ref:getDimY()
end
end
end
-- eseguo
bOk, sWarn, sStat = MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
rfFac, dH, dV, dFacElev, bForceUseBlade,
@@ -7241,7 +7301,7 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- in base al tipo di feature attribuisco il significato dei parametri Q
AssignQIdent( Proc)
-- 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
-- se ho attivo la lama e ho la feature 30, verifico i parametri Q propri della feature
if bUseBlade then
@@ -7382,6 +7442,14 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- se è una spianatura a una faccia richiamo la LongCut
elseif Proc.Prc == 90 then
return LongCut.Make( Proc, nPhase, nRawId, nPartId)
-- se arriva da una cut si applica una svuotatura
elseif Proc.Prc == 10 then
local dDiam = min( Proc.Face[1].Height, Proc.Face[1].Width) * 3
local bMillUp = ( BD.DOWN_HEAD and Proc.Face[1].VtN:getZ() > -0.259)
local bMillDown = ( BD.DOWN_HEAD and Proc.Face[1].VtN:getZ() < 0.342)
local sMchFindMaster = 'OpenPocket'
local _, sPocketing = VerifyPocket( Proc, dDiam, nil, nil, sMchFindMaster, bMillUp, bMillDown)
return Fbp.Make( Proc, Proc.Id, 0, sPocketing, nPartId, b3Solid)
-- altrimenti, con lama
else
return Cut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
+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)
if b3Fac1 then dHCI = b3Raw:getMax():getX() - dOvmHead - b3Fac1:getMin():getX() end
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
BL.UpdateHCING( nRawId, dHCI)
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)
if b3Fac1 then dTCI = b3Fac1:getMax():getX() - b3Solid:getMin():getX() end
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
BL.UpdateTCING( nRawId, dTCI)
end
+30 -11
View File
@@ -196,28 +196,47 @@ local function ApplyDiceCut( vFaceOrd, nGoodFace1, nGoodFace4, nAddGrpId, b3Soli
end
end
local dDiceFaceMaxH = 0
local dDiceFaceMinH = GEO.INFINITO
-- controllo per eseguire solo un taglio ottimizzato
local bExecJustOneCut = false
local dDiceFaceDim = GEO.INFINITO
if ( i % 2) == 0 then
for cont = 1, #vCuts[i] do
local _, dDiceFaceH, dDiceFaceV = BL.GetFaceHvRefDim( vCuts[i][cont], 0)
dDiceFaceMaxH = max( dDiceFaceMaxH, dDiceFaceH)
-- calcolo lato orizzontale minore ipotizzando sia un trapezio
local dDiceFaceH2 = ( 2 * EgtSurfArea( vCuts[i][cont]) ) / dDiceFaceV - dDiceFaceH
dDiceFaceMinH = min( dDiceFaceMinH, dDiceFaceH2)
-- se feature verso Z, si ammette anche lavorazione in doppio
if AreSameVectorApprox( vtRef, Z_AX()) then
if dMaxDepth * 2 > dDiceFaceH + BD.CUT_EXTRA then
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
-- 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 dCutExtra = BD.CUT_EXTRA
if dMaxDepth < dDiceFaceMaxH + BD.CUT_EXTRA then
if dMaxDepth < dDiceFaceDim then
bDoubleCut = true
dCutExtra = - 0.5 * dDiceFaceMinH + BD.CUT_EXTRA_MIN
end
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
end
if bDoubleCut then
+1 -1
View File
@@ -573,7 +573,7 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
if not bOkc then return bOkc, sErrC end
end
-- recupero la lavorazione
local sCutting = ML.FindCutting( 'TailSide')
local sCutting = ML.FindCutting( 'TailSide', nil, nil, nil, 'Longest')
if not sCutting then
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' cutting not found in library'
EgtOutLog( sErr)
+37
View File
@@ -1,5 +1,42 @@
==== Beam Update Log ====
Versione 2.6k2 (28/11/2024)
- Modif : nei tagli migliorati i casi in cui si inverte l'SCC per facilitare la caduta del legno
- Modif : nei tagli migliorato controllo rimozione del primo cubetto molto piccolo
- Modif : nei tagli migliorati i casi con bilinea
- Fixed : in lapjoint corretto un caso in cui si sbagliava a calcolare la dimensione della tasca
Versione 2.6k1 (15/11/2024)
- Modif : in macchine tipo Fast lunghezza minima feature per considerare taglio lungo portata a 400 mm
- Modif : in tacche si applica svuotatura anche nel caso di elevazione non raggiunta
- Modif : in forature in doppio, se necessario, si aumenta lo step per evitare collisione tra le punte durante lavorazione
- Fixed : in L010 correzione in utilizzo Q07 (forzatura frese)
- Fixed : in coda di rondine corretto bug che causava un blocco anomalo del programma
Versione 2.6j4 (06/11/2024)
- Fixed : corretto caso in cui i fori passanti fatti con due teste finiviano nella rotazione sbagliata, provocando un errore di chariot collision
Versione 2.6j3 (18/10/2024)
- Modif : nei tagli orizzontali si inverte SCC per evitare problemi di cubetti incastrati
- Modif : modifiche in ordinamento fori che intersecano tenoni
- Fixed : corretto caso con fori sul tenone spostati in coda nella fase errata
Versione 2.6j2 (17/10/2024)
- Fixed : in forature con precedenza corretto caso in cui il foro veniva ripetuto in rotazioni diverse
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
+1 -1
View File
@@ -2,5 +2,5 @@
-- Gestione della versione di Beam
NAME = 'Beam'
VERSION = '2.6i2'
VERSION = '2.6k2'
MIN_EXE = '2.6e5'