Compare commits

...

12 Commits

Author SHA1 Message Date
daniele.nicoli e482c60775 ProcessDrill - Nei fori dritti su parete inclinata sposta la MaxElev tenendo conto di inclinazione della parete e ToolHolder 2026-06-16 16:36:39 +02:00
daniele.nicoli e557d57dae Aggiunti commenti ad ultima modifica 2026-06-16 08:51:14 +02:00
daniele.nicoli d377a33420 Merge branch 'test_AddVertDice_T#3031' into develop 2026-06-16 08:42:45 +02:00
daniele.nicoli f5a5350e70 ProcessCut - Aggiunti tagli verticali anche in caso di tagli inclinati su testa o coda per rendere più piccoli i pezzi che possono cadere sul motore 2026-06-16 08:16:04 +02:00
daniele.nicoli 0d7e9e09b3 Merge branch 'test_SkipMortCut_T#3005' into develop 2026-06-12 16:33:15 +02:00
daniele.nicoli 198031a3c1 ProcessMortise - Elimina i tagli del piano ed eventuale cubettatura se già presente da un'altra feature, prima eliminava quelli della feature dando problemi con l'ordinamento. 2026-06-12 16:03:49 +02:00
daniele.nicoli ce2fcf4a42 ProcessCut e FacesBySaw.MakeOne - Modifica non ancora funzionante 2026-06-12 12:09:26 +02:00
andrea.villa 2f312c5cb8 Aggiunto controllo su massima lunghezza pezzo processabile 2026-06-10 15:05:12 +02:00
daniele.nicoli c9fae12574 Merge remote-tracking branch 'origin/HEAD' into develop 2026-06-09 09:47:02 +02:00
daniele.nicoli a137794c75 Merge branch 'develop' of https://gitlab.steamware.net/egalware-cadcam/lua/DataBeam into develop 2026-06-09 09:46:01 +02:00
luca.mazzoleni 2c3b6030c2 update log 2026-06-08 09:41:34 +02:00
luca.mazzoleni d255d8aaa9 update log 2026-06-08 09:38:13 +02:00
9 changed files with 89 additions and 7 deletions
+18
View File
@@ -277,6 +277,15 @@ if bToProcess then
else
vBeam[i].Box = b3Solid
end
if BD.MAX_LENGTH and BD.MAX_LENGTH > 10 and b3Solid:getDimX() > BD.MAX_LENGTH then
local sOut = 'Piece-Length (' .. EgtNumToString( b3Solid:getDimX(), 2) .. ') ' ..
'out of machine limits (' .. EgtNumToString( BD.MAX_LENGTH, 2) .. ') '
BEAM.ERR = 17
BEAM.MSG = sOut
WriteErrToLogFile( BEAM.ERR, BEAM.MSG)
PostErrView( BEAM.ERR, BEAM.MSG)
return
end
end
-- Assegno lunghezza della barra
dBarLen = vBeam[1].Box:getDimX() + 10
@@ -330,6 +339,15 @@ if bToProcess then
else
vBeam[i].Box = b3Solid
end
if BD.MAX_LENGTH and BD.MAX_LENGTH > 10 and b3Solid:getDimX() > BD.MAX_LENGTH then
local sOut = 'Piece-Length (' .. EgtNumToString( b3Solid:getDimX(), 2) .. ') ' ..
'out of machine limits (' .. EgtNumToString( BD.MAX_LENGTH, 2) .. ') '
BEAM.ERR = 17
BEAM.MSG = sOut
WriteErrToLogFile( BEAM.ERR, BEAM.MSG)
PostErrView( BEAM.ERR, BEAM.MSG)
return
end
end
end
+4 -2
View File
@@ -1641,7 +1641,8 @@ local function SetCutsOnFrontMortises( vProc)
-- verifico se i piani coincidono
local bSamePlane = ( ptC1 and vtN1 and ptC2 and vtN2 and AreSameVectorApprox( vtN1, vtN2) and ( ptC2 - ptC1) * vtN1 < 1.0)
if bSamePlane then
vProc[i].CutFront = vProc[j].Id
--vProc[i].CutFront = vProc[j].Id
vProc[j].bSkipCut = true
end
-- log
local sMsg = string.format( 'Cut %d meet Mortise %d', vProc[i].Id, vProc[j].Id) .. EgtIf( bSamePlane, ' with same plane', '')
@@ -1658,7 +1659,8 @@ local function SetCutsOnFrontMortises( vProc)
-- verifico se i piani coincidono
local bSamePlane = ( ptC1 and vtN1 and ptC2 and vtN2 and AreSameVectorApprox( vtN1, vtN2) and ( ptC2 - ptC1) * vtN1 < 1.0)
if bSamePlane then
vProc[i].CutFront = vProc[j].Id
--vProc[i].CutFront = vProc[j].Id
vProc[j].bSkipCut = true
end
-- log
local sMsg = string.format( 'Cut %d meet DtMortise %d', vProc[i].Id, vProc[j].Id) .. EgtIf( bSamePlane, ' with same plane', '')
+1 -1
View File
@@ -457,7 +457,7 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
-- se distanza al punto è maggiore del raggio lama, significa che non ho già lavorato, quindi calcolo entrata opportunamente
if dDistPointToCenter > 0.5 * dSawDiam then
dLiTang = -dAllStart * dCosAlpha
dLiPerp = dDist1 * dSinAlpha
dLiPerp = dDist1 * dSinAlpha
end
end
-- se ho accorciato uscita, setto componente tangente e perpendicolare sul percorso di uscita
+48 -1
View File
@@ -479,12 +479,16 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
-- determino il modo di tagliare
local vtOrthoO
local bNoPerpCuts = false
local vtO
-- Se tagli ortogonali (indice dispari)
if i % 2 == 1 then
vtOrthoO = Vector3d( vtN)
-- Se tagli perpendicolari (indice pari)
else
local vtO
-- Se elemento precedente contiene tagli ortogonali
if #vCuts[i-1] > 0 then
vtO = EgtSurfTmFacetNormVersor( vCuts[i-1][1], 0, GDB_ID.ROOT)
-- Se elemento successivo contiene tagli ortogonali
elseif vCuts[i+1] and #vCuts[i+1] > 0 then
-- lunghezza faccia nell'eventuale direzione ortogonale
local asseX = EgtSurfTmFacetNormVersor( vCuts[i+1][1], 0, GDB_ID.ROOT)
@@ -552,8 +556,51 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
end
local bOk2, sErr2 = Fbs.MakeOne( nSurfToCut, 0, sCutting, dSawDiam, nFaceUseCut2, nil, dCutExtra, BD.CUT_SIC, 0, 0, 0, '', b3Raw)
if not bOk2 then return false, sErr2 end
-- caso standard
else
-- se necessario aggiungo tagli obliqui per cubettare pezzi lunghi che potrebbero cadere sul motore
if ( i % 2) == 0 and Proc.Fct == 1 and AreSameOrOppositeVectorApprox( vtO, Z_AX()) then
local vtOrthoVert = vtN ^ vtO
-- inverte direzione superfici per corretta direzione SCC
if ( vtN:getY() > 0 and vtOrthoVert:getY() > 0) or ( vtN:getY() < 0 and vtOrthoVert:getY() < 0) then
vtOrthoVert = -vtOrthoVert
end
local Frame = Frame3d( ptC, vtN, vtO)
local b3Fac = EgtGetBBoxRef( vCuts[i][1], GDB_BB.STANDARD, Frame)
-- se cubetto più grande di MAX_DIM_DICE
if abs( b3Fac:getDimY() - BD.MAX_DIM_DICE) > 10 * GEO.EPS_SMALL then
local nVerticalCuts = ceil( b3Fac:getDimY() / ( BD.MAX_LEN_DICE)) - 1
local dVerticalSliceDist = b3Fac:getDimY() / ( nVerticalCuts + 1)
-- selezione utensile
local dSawDiam = 400
if EgtMdbSetCurrMachining( sCutting) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dSawDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiam
end
end
-- crea faccia per tagli verticali e le taglia a dimensione corretta
for k = 1, nVerticalCuts do
local nFaceUse = BL.GetNearestOrthoOpposite( vtN)
local dVerticalCutOffset = dVerticalSliceDist * k
local sLeadInOutType = 'Perpendicular'
local nMergedParallelSurfId = EgtSurfTmBySewing( nAddGrpId, vCuts[i], false)
local ptVertCut = EgtSurfTmFacetCenter( nMergedParallelSurfId, 0, GDB_ID.ROOT)
ptVertCut = ptVertCut + ( -b3Fac:getDimY()/2 + dVerticalCutOffset) * vtOrthoVert
local nSurfId = EgtSurfTmPlaneInBBox( nAddGrpId, ptVertCut, vtOrthoVert, b3Raw, GDB_RT.GLOB)
-- se non è il primo taglio parallelo taglia anche le superfici con la faccia parallela precedente
if i ~= 2 then
local nMergedPreviousParallelSurfId = EgtSurfTmBySewing( nAddGrpId, vCuts[i-2], false)
local ptOnPreviousParallelSurf = EgtSurfTmFacetCenter( nMergedPreviousParallelSurfId, 0, GDB_ID.ROOT)
EgtCutSurfTmPlane( nSurfId, ptOnPreviousParallelSurf, vtN, false, GDB_RT.GLOB)
end
EgtCutSurfTmPlane( nSurfId, ptVertCut, -vtN, false, GDB_RT.GLOB)
local bOk, sErr = Fbs.MakeOne( nSurfId, 0, sCutting, dSawDiam, nFaceUse, nil, -0.1, BD.CUT_SIC, 0, 0, 0, '', b3Raw, nil, nil, nil, sLeadInOutType, nil, 0, nil)
if not bOk then return bOk, sErr end
end
end
end
-- lavoro la faccia
for j = 1, #vCuts[i] do
-- se taglio dal basso
+3 -1
View File
@@ -594,8 +594,10 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
local dHoleToCutDistance = vDistance[1]
-- se il taglio accorcia realmente il foro
if ( dHoleToCutDistance > 10 * GEO.EPS_SMALL or Proc.AffectedFaces.Right) and dHoleToCutDistance < dLen then
local dToolTipFromCenterDrill = ( ( dDiam / 2) - ( dToolDiam / 2))
local dExtraSicDistFromThToTiltedCut = sqrt( ( dToolTipFromCenterDrill / CosB)^2 - dToolTipFromCenterDrill^2) + sqrt( ( ( dDiamTh / 2) / CosB)^2 - (dDiamTh / 2)^2)
dMaxDepth = dMaxDepthOri
dMaxElev = dLen - dHoleToCutDistance
dMaxElev = dLen - ( dHoleToCutDistance - dExtraSicDistFromThToTiltedCut)
bTryDrill = true
local dToolAddLength = dLen - dMaxElev
-- se l'utensile è comunque troppo corto lavoro il massimo possibile
+1 -1
View File
@@ -236,7 +236,7 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- verifico se frontale
local bFront = ( Proc.Prc == 56)
-- se mortasa di fronte, eseguo il taglio della faccia
if bFront then
if bFront and not Proc.bSkipCut then
-- verifico esista la faccia di taglio
local ptCutC, vtCutN = EgtSurfTmFacetCenter( Proc.Id, 1, GDB_ID.ROOT)
if ptCutC and vtCutN and AreSameVectorApprox( vtExtr, vtCutN) then
+1 -1
View File
@@ -467,7 +467,7 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- se mortasa di fronte, eseguo il taglio della faccia
if bFront then
if bFront and not Proc.bSkipCut then
-- verifico esista la faccia di taglio
local ptCutC, vtCutN = EgtSurfTmFacetCenter( Proc.Id, 1, GDB_ID.ROOT)
if ptCutC and vtCutN and AreSameVectorApprox( vtExtr, vtCutN) then
+8
View File
@@ -89,6 +89,14 @@ local function MyProcessInputData()
else
vBeam[i].Box = b3Solid
end
if BD.MAX_LENGTH and BD.MAX_LENGTH > 10 and b3Solid:getDimX() > BD.MAX_LENGTH then
local sOut = 'Lunghezza (' .. EgtNumToString( b3Solid:getDimX(), 2) .. ') ' ..
'oltre i limiti della macchina (' .. EgtNumToString( BD.MAX_LENGTH, 2) .. ') '
EgtOutLog( sOut)
EgtOutBox( sOut, 'Lavora Travi', 'WARNING')
EgtDraw()
return false
end
end
dRawW = vBeam[1].Box:getDimY()
dRawH = vBeam[1].Box:getDimZ()
+5
View File
@@ -1,5 +1,10 @@
==== Beam Update Log ====
Versione 3.1e2 (01/06/2026)
- Added : in Cut aggiunta Q18 per evitare di ruotare
- Modif : gli smussi di testa sono in senso orario
- Modif : in mortasa coda di rondine piccole correzioni
Versione 3.1e1 (05/05/2026)
- Modif : in LapJoint migliorate slot con sega a catena
- Fixed : in DrillPocket in doppio eliminata lavorazione aggiuntiva in caso di utensile non abbastanza lungo