Compare commits

...

8 Commits

Author SHA1 Message Date
daniele.nicoli 5ca2c39506 Merge branch 'Test/OpenPocketSplit' into develop 2026-02-20 10:02:53 +01:00
daniele.nicoli 2c3aaf01dc In ProcessLapJoint :
- Eliminata forzatura ZigZag per tasche strette e utensili < 90
- Forzato OpenOutRaw se ce l'apertura sulla curva
2026-02-20 10:02:34 +01:00
daniele.nicoli f52bf933a1 Aggiornamento Versione minima Cam5 2026-02-19 16:54:15 +01:00
daniele.nicoli 993a022894 In LapJoint aggiunta gestione lato aperto in feature lunghe spezzate 2026-02-19 15:55:36 +01:00
luca.mazzoleni 60448c217a Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataBeam into develop 2026-02-18 18:40:12 +01:00
luca.mazzoleni 3a5338c29b - migliorati commenti in LapJoint 2026-02-18 18:40:07 +01:00
daniele.nicoli 7177b58836 Merge branch 'Test/SpiralIn-Out' into develop 2026-02-18 15:00:17 +01:00
daniele.nicoli bedb274c0f - In ProcessLapJoint, Aggiunto 'OpenPocket_H2' come controllo per SpiralIn 2026-02-17 10:27:55 +01:00
2 changed files with 51 additions and 16 deletions
+50 -15
View File
@@ -3537,7 +3537,11 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin
return false, sErr
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ Proc.Id, (nFaceRef)}})
if Proc.LoopIdFacInd then
EgtSetMachiningGeometry( { Proc.LoopIdFacInd})
else
EgtSetMachiningGeometry( {{ Proc.Id, (nFaceRef)}})
end
-- imposto uso faccia
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.ORTHO_CONT)
-- imposto posizione braccio porta testa
@@ -3564,15 +3568,13 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin
end
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
-- se tasca aperta e non lavorata col truciolatore, imposto opportuno attacco
if sMchFind == 'OpenPocket' and nUseRoughTool == 0 then
if ( sMchFind == 'OpenPocket' or sMchFind == 'OpenPocket_H2') and nUseRoughTool == 0 then
EgtSetMachiningParam( MCH_MP.SUBTYPE, MCH_POCK_SUB.SPIRALIN)
end
if sMchFind == 'OpenPocket' and dDiamTool < 90 then
local _, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFaceRef, GDB_ID.ROOT)
local bL = ( Proc.Fct < 4 or TestElleShape4( Proc) == 2)
if bL and min( dH, dV) < 1.5 * dDiamTool then
EgtSetMachiningParam( MCH_MP.SUBTYPE, MCH_POCK_SUB.ZIGZAG)
EgtSetMachiningParam( MCH_MP.INVERT, false)
if not bTipMill then
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_POCK_LI.HELIX)
EgtSetMachiningParam( MCH_MP.LITANG, dDiamTool)
@@ -3597,7 +3599,7 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dElev, 1))
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
if bOpenOutRaw then
if bOpenOutRaw or ( Proc.LoopIdFacInd and ( EgtGetInfo( Proc.LoopIdFacInd, 'OPEN', 'i') or -1) > -1) then
sUserNotes = EgtSetValInNotes( sUserNotes, 'OpenOutRaw', 1)
end
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
@@ -6651,7 +6653,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
end
-- eventuale forzatura sega a catena
local bForceChainsaw = ( EgtGetInfo( Proc.Id, Q_FORCE_CHAINSAW, 'i') or 0) > 0
-- se è un tunnel provo a vedere se è possibile lavorarlo con la svuotatura o con la sega catena
-- TUNNEL: svuotatura o sega a catena
if bClosedOrthoFaces then
local bTryWithBlades = true
local dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace
@@ -6741,7 +6744,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
end
end
end
-- altrimenti non è una fessura
-- NO TUNNEL: tutti gli altri casi
else
-- dati della faccia
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacInd, GDB_ID.ROOT)
@@ -6777,6 +6781,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
if bPrevBhSideMill == nil then
bPrevBhSideMill = bMakeBySideMill
end
-- SIDEMILL (tipo BLOCKHAUS)
if bMakeBySideMill then
-- se smusso non è esclusivo
if nChamfer < 2 then
@@ -6911,7 +6917,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
end
end
end
-- altrimenti lavoro con svuotatura
-- TASCA GENERICA: si cerca il modo migliore di lavorare in base alla forma
else
local bSpecial3faces = false
-- verifico se lavorando la faccia principale rimane esclusa molta sezione trasversale complessiva della feature (da box)
@@ -6941,7 +6948,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
end
end
-- se posso in effetti fare fresatura con aggregato flottante
-- FRESATURA SPECIALE CON AGGREGATO FLOTTANTE
if bPocketFloatingAggregate then
-- inserisco la lavorazione di svuotatura
local sName = 'Float_Mill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
@@ -6964,7 +6971,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
-- imposto uso faccia
local nFaceUse = BL.GetNearestParalOpposite( vtN)
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
-- piccolo offser radiale per essere sicuri di lavorare anche con tasca larga come diametro fresa
-- piccolo offset radiale per essere sicuri di lavorare anche con tasca larga come diametro fresa
EgtSetMachiningParam( MCH_MP.OFFSR, -0.01)
-- imposto posizione braccio porta testa
@@ -6989,7 +6996,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
return false, sErr
end
-- se riconosciuta gestione 3 facce (limitatamente per ora alla feature 20)
-- CASO SPECIALE 3 FACCE (se rimane esclusa molta sezione trasversale complessiva della feature, solo per feature 20)
elseif bSpecial3faces and Proc.Prc == 20 then
-- se smusso non è esclusivo
if nChamfer < 2 then
@@ -7115,7 +7122,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
if not bOk then return false, sWarn end
end
end
-- altrimenti lavorazione di svuotatura o contornatura
-- SVUOTATURA O FRESATURA: si valuta se si può fare svuotatura o se provare altro
else
local bUseOtherFace
local bLapJointAngTrasm = false
@@ -7229,6 +7237,11 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
nUseRoughTool = 1
end
end
-- se presente curva da lavorare con lato aperto
if Proc.LoopIdFacInd and ( EgtGetInfo( Proc.LoopIdFacInd, 'OPEN', 'i') or -1) > -1 then
sMchFind = 'OpenPocket'
nUseRoughTool = 0
end
-- se abilitato rinvio da sotto
if bLapJointAngTrasm then
if not EgtEndsWith( sMchFind, '_AT') then
@@ -7273,7 +7286,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
EgtErase( nSurfPartId)
end
end
-- ricerca lavorazione
-- ricerca lavorazione di svuotatura
local sPocketing
local _, sMyPocketing, dMyTMaxDepth, dMyTDiam = VerifyPocket( Proc, dDiam, dFacElev + dCollSic, dMaxTotLen, sMchFind, bMillUp, bMillDown)
if not sMyPocketing and bMillUp then
@@ -7320,7 +7334,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
local nQAntisplintResult = EgtGetInfo( Proc.Id, Q_ANTISPLINT_TYPE, 'i') or 0
-- se lavorazione fresa come lama disabilito eventuale antischeggia
if bSpecialMillOnSide then nQAntisplintResult = 0 end
-- se non trovata una svuotatura adatta
-- NO SVUOTATURA (si deve provare altro)
if not sPocketing then
-- se forma a L provo con contornatura
if bIsL and not bSpecialMillOnSide and not bForceSideMill then
@@ -7666,6 +7681,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
end
end
end
-- SVUOTATURA OK
else
-- se devo inserire il chamfer
if ( ( Proc.Fct == 3 and bIsU) or (Proc.Fct == 2 and bIsL)) and nChamfer > 0 then
@@ -7997,9 +8014,27 @@ local function MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
local bPrevBhSideMill
for i = 1, #vAddId do
local b3Box = EgtGetBBoxGlob( vAddId[i], GDB_BB.STANDARD)
local nFct = EgtSurfTmFacetCount( vAddId[i])
local nFct = EgtSurfTmFacetCount( vAddId[i])
local AddProc = { Id = vAddId[i], Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Box, TotBox = Proc.Box, Fct = nFct, Flg = Proc.Flg, PartId = Proc.PartId, TaskId = Proc.TaskId, FeatureId = Proc.FeatureId, IsSplittedLapJoint = true, AffectedFaces = Proc.AffectedFaces, OkFromBottom = Proc.OkFromBottom}
Topology.Classify( AddProc, b3Raw)
if i > 1 and
( ( Proc.Topology == 'Groove' and Proc.IsThrough and Proc.Fct == 3 and Proc.AffectedFaces.Left and Proc.AffectedFaces.Right)
or ( Proc.Topology == 'Groove' and Proc.Fct == 4 and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right))
or Proc.Topology == 'Pocket') then
local nFacInd = BL.GetFaceWithMostAdj( AddProc, nPartId)
if type( nFacInd) == "number" and nFacInd >= 0 then
local nLoopId, nLoopCnt = EgtExtractSurfTmFacetLoops( vAddId[i], nFacInd, nAddGrpId)
if nLoopId and nLoopCnt == 1 then
local nEdgeId = BL.GetEdgeToMachineFromVector( vAddId[i], nFacInd, -X_AX())
EgtSetInfo( nLoopId, 'OPEN', nEdgeId)
AddProc.LoopIdFacInd = nLoopId
end
end
end
-- 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, bAllWithEndCap, bPrevBhSideMill, bAllWithEndCap)
+1 -1
View File
@@ -3,4 +3,4 @@
NAME = 'Beam'
VERSION = '3.1a1'
MIN_EXE = '2.7f2'
MIN_EXE = '3.1a4'