Compare commits

..

6 Commits

Author SHA1 Message Date
daniele.nicoli f9a9c2412a Aggiunto To do nella selezione utensile/ottimizzazione teste 2026-06-26 14:55:29 +02:00
daniele.nicoli 0e1e27dc50 Merge branch 'master' into develop 2026-06-26 14:49:32 +02:00
andrea.villa b191fbdf1f Merge remote-tracking branch 'origin/develop' 2026-06-25 12:06:42 +02:00
andrea.villa 97db4b1614 Cambio versione per rilascio a cliente 2026-06-25 12:06:32 +02:00
andrea.villa 59ad02fcf8 Per identificare feature di testa, oltre che verificare se sia troncante, si controlla anche la feature taglio 2026-06-25 11:24:02 +02:00
daniele.nicoli d756e4c44d LapJoint - CleanCorner ora funziona anche su tasche a 3 facce a U. 2026-06-23 08:53:15 +02:00
5 changed files with 84 additions and 5 deletions
+17 -1
View File
@@ -443,7 +443,7 @@ local function CalcHeadTailMachBeforeIntersDrillings( vProc, b3Raw)
for i = 1, #vProc do
local Proc = vProc[i]
if Proc.Box and not Proc.Box:isEmpty() then
if Proc.Fct == 1 and BL.IsFeatureCuttingEntireSection( Proc.Box, b3Raw:getDimY(), b3Raw:getDimZ()) and ( Proc.Head or Proc.Tail) and Proc.Prc ~= 350 then
if Proc.Fct == 1 and ( BL.IsFeatureCuttingEntireSection( Proc.Box, b3Raw:getDimY(), b3Raw:getDimZ()) or Cut.Identify( Proc)) and ( Proc.Head or Proc.Tail) and Proc.Prc ~= 350 then
if Proc.Head and Proc.Box:getCenter():getX() < dHeadX then
dHeadX = Proc.Box:getCenter():getX()
nHeadId = Proc.Id
@@ -915,6 +915,22 @@ local function ReorderFeatureWithDependency( vProc)
table.insert( vProc, nRefIndex, table.remove( vProc, i))
i = max( nRefIndex - 1, 1)
end
elseif Drill.Identify( vProc[i]) and vProc[i].Dependency and vProc[i].Dependency.ExecAfter and vProc[i].Dependency.ExecAfter.Id then
local nRefId = vProc[i].Dependency.ExecAfter.Id
local nRefIndex
for j = 1, #vProc do
if i ~= j and vProc[j].Id == nRefId then
nRefIndex = j
break
end
end
-- se il processo deve stare dopo, ma ora è prima
if nRefIndex and nRefIndex > i then
table.insert( vProc, nRefIndex, table.remove( vProc, i))
i = max( nRefIndex - 1, 1)
end
end
i = i + 1
end
+1
View File
@@ -409,6 +409,7 @@ local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead,
if nActiveHead == 0 then
return ReturnParams( MachiningType, Machining.Name, Machining.Type, ToolParams)
-- verifico se posso usare lo stesso utensile della testa attiva
--TODO - se arrivano altri ticket come 3044, valutare rimozione controllo nActiveHead e usare l'utensile già caricato anche se non è sulla testa attiva (ultima utilizzata)
elseif ( nActiveHead == 1 and not bH2 and sToolName == H1_TOOL) or ( nActiveHead == 2 and bH2 and sToolName == H2_TOOL) then
-- se l'utensile sulla testa attiva è molto più piccolo rispetto a quelli salvati non lo scelgo, a meno che non siano entrambi grandi (truciolatori)
if ( not sH1Param or not sH1Param.TDiam or ( sH1Param.TDiam < 75 and ToolParams.TDiam < 75 and sH1Param.TDiam < dBiggerToolTolerance * ToolParams.TDiam)) and ( not sH2Param or not sH2Param.TDiam or ( sH2Param.TDiam < 75 and ToolParams.TDiam < 75 and sH2Param.TDiam < 1.25 * ToolParams.TDiam)) then
+60 -3
View File
@@ -4789,7 +4789,7 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
end
end
end
return 1, sWarn, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, dDiamTool, bDoubleSide, nPathInt, nSurfInt, bOneShot, bMillDown, nFirstMachId
return 1, sWarn, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, dDiamTool, bDoubleSide, nPathInt, nSurfInt, bOneShot, bMillDown, nFirstMachId, nil, sPocketing
end
end
end
@@ -8110,7 +8110,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
bSetOpenBorders = true
end
nOk, sErr, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, dDiamTool, bDoubleSide, nPathInt, nSurfInt, bOneShot, bMillDown, nFirstMachId,
bOrthoFaces = MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMyMchFind, bIs3Faces, b3Solid, bOrthoFacesMaster, bMillDown, bSetOpenBorders, bIsU, bIsL)
bOrthoFaces, sPocketing = MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMyMchFind, bIs3Faces, b3Solid, bOrthoFacesMaster, bMillDown, bSetOpenBorders, bIsU, bIsL)
if nOk == -3 then
bTryWithBlades = true
elseif nOk == -2 then
@@ -8144,6 +8144,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
end
-- se abilitato dal parametro Q inserisco pulitura spigoli o contorno con fresa più piccola
local nContourSmallTool = EgtGetInfo( Proc.Id, Q_CONTOUR_SMALL_TOOL, 'i') or 0
local nCleanCorner = EgtGetInfo( Proc.Id, Q_CLEAN_CORNER, 'i') or 0
if nContourSmallTool > 0 then
local bOk, sWarn2 = MakeRoundCleanCornerOrContour( Proc, nPhase, nRawId, nPartId, b3Raw,
nFacInd, nAddGrpId, dDiamTool, nContourSmallTool, bMillDown,
@@ -8155,6 +8156,43 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sWarn2, sWarn2)
end
end
-- se richiesta pulizia spigoli con fresa a V
if nCleanCorner > 0 then
local dMaxToolMaterial = 0
if EgtMdbSetCurrMachining( sPocketing) then
local sTuuidPk = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuidPk) or '') then
dMaxToolMaterial = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxToolMaterial
end
end
local nNewProc
local vtSpec = vtN
if not ( Proc.Fct == 3 and bIsU) then
nNewProc = RemoveBottomFaceAndReorder( Proc, nAddGrpId, nFacInd, vtN)
-- se U passante ricavo vettore da "sopra" con componente Z forzata in positivo
else
nNewProc = EgtCopyGlob( Proc.Id, nAddGrpId) or GDB_ID.NULL
local nNumFacet = EgtSurfTmFacetCount( nNewProc)
-- vettore normale ad una delle facce adiacenti
local vtOther = EgtSurfTmFacetNormVersor( Proc.Id, Proc.Face[nFacInd+1].Adjacencies[1], GDB_ID.ROOT)
-- ricavo vettore verso l'alto (simulo faccia di fondo)
vtSpec = vtN ^ vtOther
-- se negativo in Z forzo positivo
if vtSpec:getZ() < 0 then
vtSpec:mirror(vtSpec)
end
ReorderFaces( nNewProc, nNumFacet, vtSpec)
-- normale della lavorazione clean corner
vtN = vtSpec
end
local vFace, dDepth = GetFacesData( nNewProc, dDiamTool, dMaxToolMaterial, ( dDiamTool/2), nAddGrpId, Proc.PartId, vtN)
local bCleanCornerOk, sCleanCornerWarn = AddMillCorner( vFace, Proc, dDiamTool, nAddGrpId, nNewProc, vtN)
if not bCleanCornerOk then return false, sCleanCornerWarn end
if sCleanCornerWarn then
if not sWarn then sWarn = '' end
sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sCleanCornerWarn, sCleanCornerWarn)
end
end
end
end
bOk = true
@@ -8370,7 +8408,26 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
-- se richiesta pulizia spigoli con fresa a V
if nCleanCorner > 0 then
local dThElev = dToolThDiameter / 2 * sqrt( vtN:getX() * vtN:getX() + vtN:getY() * vtN:getY())
local nNewProc = RemoveBottomFaceAndReorder( Proc, nAddGrpId, nFacInd, vtN)
local nNewProc
local vtSpec = vtN
if not ( Proc.Fct == 3 and bIsU) then
nNewProc = RemoveBottomFaceAndReorder( Proc, nAddGrpId, nFacInd, vtN)
-- se U passante ricavo vettore da "sopra" con componente Z forzata in positivo
else
nNewProc = EgtCopyGlob( Proc.Id, nAddGrpId) or GDB_ID.NULL
local nNumFacet = EgtSurfTmFacetCount( nNewProc)
-- vettore normale ad una delle facce adiacenti
local vtOther = EgtSurfTmFacetNormVersor( Proc.Id, Proc.Face[nFacInd+1].Adjacencies[1], GDB_ID.ROOT)
-- ricavo vettore verso l'alto (simulo faccia di fondo)
vtSpec = vtN ^ vtOther
-- se negativo in Z forzo positivo
if vtSpec:getZ() < 0 then
vtSpec:mirror(vtSpec)
end
ReorderFaces( nNewProc, nNumFacet, vtSpec)
-- normale della lavorazione clean corner
vtN = vtSpec
end
local vFace, dDepth = GetFacesData( nNewProc, dToolDiameter, dMaxToolMaterial, ( dToolDiameter/2), nAddGrpId, Proc.PartId, vtN)
local bCleanCornerOk, sCleanCornerWarn = AddMillCorner( vFace, Proc, dToolDiameter, nAddGrpId, nNewProc, vtN)
if not bCleanCornerOk then return false, sCleanCornerWarn end
+5
View File
@@ -1,5 +1,10 @@
==== Beam Update Log ====
Versione 3.1f3 (25/06/2026)
- Modif : LapJoint - migliorata gestione BirdsMouth con più di 3 facce
- Modif : Per identificare feature di testa, oltre che verificare se sia troncante, si controlla anche la feature taglio
- Added : LapJoint - CleanCorner per tasche a 3 facce a U
Versione 3.1f2 (18/06/2026)
- Added : Gestione svuotature in doppio tipo NT
+1 -1
View File
@@ -2,5 +2,5 @@
-- Gestione della versione di Beam
NAME = 'Beam'
VERSION = '3.1f2'
VERSION = '3.1f3'
MIN_EXE = '3.1b1'