Compare commits
20 Commits
Ticket#2811
...
3.1e2
| Author | SHA1 | Date | |
|---|---|---|---|
| e4f448bcf0 | |||
| bf58b58b47 | |||
| 3445fb2525 | |||
| 723713707f | |||
| fd0a52ad6b | |||
| 3e2ae92adc | |||
| c746a11e45 | |||
| d337e4cc18 | |||
| 5fcaf823a0 | |||
| 6b76dd2f4f | |||
| cc7f5abf40 | |||
| 389e722f7c | |||
| 946f5e8bf6 | |||
| a5cd84172e | |||
| 895740feff | |||
| 7e243bb9ea | |||
| ca21098226 | |||
| 32052e3016 | |||
| 4138f89f69 | |||
| 66013f5e07 |
@@ -1991,6 +1991,9 @@ local function VerifyDrillMirrored( Proc, vProc, b3Raw)
|
|||||||
end
|
end
|
||||||
local dToolDoubleDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM, 'd')
|
local dToolDoubleDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM, 'd')
|
||||||
local dToolDoubleMaxDepth = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
|
local dToolDoubleMaxDepth = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
|
||||||
|
if ( sType == 'Pocket_AT' or sType == 'Pocket') then
|
||||||
|
dToolDoubleMaxDepth = EgtTdbGetCurrToolMaxDepth()
|
||||||
|
end
|
||||||
dMachiningDepth = min( dMachiningDepth, dToolDoubleMaxDepth)
|
dMachiningDepth = min( dMachiningDepth, dToolDoubleMaxDepth)
|
||||||
-- recupero la lunghezza della parte inclinata della punta
|
-- recupero la lunghezza della parte inclinata della punta
|
||||||
local dToolDoubleTipLength = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN) - EgtTdbGetCurrToolParam( MCH_TP.LEN)
|
local dToolDoubleTipLength = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN) - EgtTdbGetCurrToolParam( MCH_TP.LEN)
|
||||||
|
|||||||
@@ -883,6 +883,25 @@ function BeamLib.GetBlockedAxis( sMachining, sBlockedAxis, b3Raw, vtTool, vtOut)
|
|||||||
return ''
|
return ''
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
function BeamLib.GetAuxDir( sMachining, sBlockedAxis, b3Raw, vtTool, vtOut)
|
||||||
|
-- informazioni sull'utensile della lavorazione
|
||||||
|
local nToolType, sHead
|
||||||
|
if EgtMdbSetCurrMachining( sMachining) then
|
||||||
|
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||||
|
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||||
|
nToolType = EgtTdbGetCurrToolParam( MCH_TP.TYPE)
|
||||||
|
sHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- se presente funzione specifica nella macchina, la richiamo
|
||||||
|
if BD.GetAuxDir then
|
||||||
|
return BD.GetAuxDir( sHead, nToolType, sBlockedAxis, b3Raw, vtTool, vtOut)
|
||||||
|
end
|
||||||
|
-- niente
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
-- Trova l'Ind (0 based) della faccia meglio orientata come l'asse vtAx. Restituisce anche vtN e ptC della faccia stessa. La faccia di indice (0 based) fctExclude non viene considerata nella ricerca.
|
-- Trova l'Ind (0 based) della faccia meglio orientata come l'asse vtAx. Restituisce anche vtN e ptC della faccia stessa. La faccia di indice (0 based) fctExclude non viene considerata nella ricerca.
|
||||||
function BeamLib.FindFaceBestOrientedAsAxis( Proc, vtAx, fctExclude)
|
function BeamLib.FindFaceBestOrientedAsAxis( Proc, vtAx, fctExclude)
|
||||||
@@ -1158,6 +1177,31 @@ function BeamLib.Is3EdgesApprox( Proc, nFacet, nAddGrpId)
|
|||||||
return bResult
|
return bResult
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
function BeamLib.IsPointOnBoxLimits( ptPoint, b3Solid)
|
||||||
|
local dTol = 500 * GEO.EPS_SMALL
|
||||||
|
|
||||||
|
local dMinX = b3Solid:getMin():getX()
|
||||||
|
local dMinY = b3Solid:getMin():getY()
|
||||||
|
local dMinZ = b3Solid:getMin():getZ()
|
||||||
|
|
||||||
|
local dMaxX = b3Solid:getMax():getX()
|
||||||
|
local dMaxY = b3Solid:getMax():getY()
|
||||||
|
local dMaxZ = b3Solid:getMax():getZ()
|
||||||
|
|
||||||
|
-- Check di ogni piano limite
|
||||||
|
if abs( ptPoint:getX() - dMinX) < dTol then return true, "Left" end
|
||||||
|
if abs( ptPoint:getX() - dMaxX) < dTol then return true, "Right" end
|
||||||
|
|
||||||
|
if abs( ptPoint:getY() - dMinY) < dTol then return true, "Front" end
|
||||||
|
if abs( ptPoint:getY() - dMaxY) < dTol then return true, "Back" end
|
||||||
|
|
||||||
|
if abs( ptPoint:getZ() - dMinZ) < dTol then return true, "Bottom" end
|
||||||
|
if abs( ptPoint:getZ() - dMaxZ) < dTol then return true, "Top" end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
-- restituisce le facce della parte interessate dalla feature Proc
|
-- restituisce le facce della parte interessate dalla feature Proc
|
||||||
function BeamLib.GetProcessAffectedFaces( Proc)
|
function BeamLib.GetProcessAffectedFaces( Proc)
|
||||||
|
|||||||
@@ -170,6 +170,12 @@ function MakeParallelOne( nSurfId, nFacet, sCutting, dSawDiam, nFaceUse, dVzLimD
|
|||||||
end
|
end
|
||||||
local vtOut = EgtIf( vtN:getX() > 0, X_AX(), -X_AX())
|
local vtOut = EgtIf( vtN:getX() > 0, X_AX(), -X_AX())
|
||||||
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetBlockedAxis( sCutting, 'perpendicular', b3Raw, vtTool, vtOut))
|
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetBlockedAxis( sCutting, 'perpendicular', b3Raw, vtTool, vtOut))
|
||||||
|
local sAuxDir, sInitAngs = BL.GetAuxDir( sCutting, 'perpendicular', b3Raw, vtTool, vtOut)
|
||||||
|
if sAuxDir then
|
||||||
|
sNotes = EgtSetValInNotes( sNotes, 'VtAuxDir', sAuxDir)
|
||||||
|
EgtSetMachiningParam( MCH_MP.INITANGS, sInitAngs)
|
||||||
|
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.STD)
|
||||||
|
end
|
||||||
-- eventuali note
|
-- eventuali note
|
||||||
if ( sLeadInOutType == 'PerpendicularOutraw') then
|
if ( sLeadInOutType == 'PerpendicularOutraw') then
|
||||||
sNotes = EgtSetValInNotes( sNotes, 'OutRaw', 3)
|
sNotes = EgtSetValInNotes( sNotes, 'OutRaw', 3)
|
||||||
@@ -631,6 +637,12 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
|||||||
-- imposto angolo 3° asse rot
|
-- imposto angolo 3° asse rot
|
||||||
local sBlockedAxis = EgtIf( bMaximizeVerticalDepth, 'parallel', 'perpendicular')
|
local sBlockedAxis = EgtIf( bMaximizeVerticalDepth, 'parallel', 'perpendicular')
|
||||||
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetBlockedAxis( sCutting, sBlockedAxis, b3Raw, vtN, vtOrthO))
|
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetBlockedAxis( sCutting, sBlockedAxis, b3Raw, vtN, vtOrthO))
|
||||||
|
local sAuxDir, sInitAngs = BL.GetAuxDir( sCutting, sBlockedAxis, b3Raw, vtN, vtOrthO)
|
||||||
|
if sAuxDir then
|
||||||
|
sNotes = EgtSetValInNotes( sNotes, 'VtAuxDir', sAuxDir)
|
||||||
|
EgtSetMachiningParam( MCH_MP.INITANGS, sInitAngs)
|
||||||
|
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.STD)
|
||||||
|
end
|
||||||
-- eventuali note
|
-- eventuali note
|
||||||
if ( sLeadInOutType == 'PerpendicularOutraw') then
|
if ( sLeadInOutType == 'PerpendicularOutraw') then
|
||||||
sNotes = EgtSetValInNotes( sNotes, 'OutRaw', 3)
|
sNotes = EgtSetValInNotes( sNotes, 'OutRaw', 3)
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ function ProcessCut.Classify( Proc, b3Raw)
|
|||||||
if ( BD.C_SIMM and BD.DOWN_HEAD) or BD.TURN then
|
if ( BD.C_SIMM and BD.DOWN_HEAD) or BD.TURN then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
local bForceNoBeamRotation = ( EgtGetInfo( Proc.Id, 'Q18', 'i') == 1)
|
||||||
-- recupero i dati del taglio
|
-- recupero i dati del taglio
|
||||||
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
|
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
|
||||||
-- calcolo le massime estensioni lineari orizzontale e verticale della faccia
|
-- calcolo le massime estensioni lineari orizzontale e verticale della faccia
|
||||||
@@ -73,7 +74,7 @@ function ProcessCut.Classify( Proc, b3Raw)
|
|||||||
then
|
then
|
||||||
-- confronto queste estensioni con la massima dimensione del DiceCut (impossibile lavorare se entrambe maggiori)
|
-- confronto queste estensioni con la massima dimensione del DiceCut (impossibile lavorare se entrambe maggiori)
|
||||||
if DimH > BD.MAX_DIM_DICE + 100 * GEO.EPS_SMALL and DimV > BD.MAX_DIM_DICE + 100 * GEO.EPS_SMALL then
|
if DimH > BD.MAX_DIM_DICE + 100 * GEO.EPS_SMALL and DimV > BD.MAX_DIM_DICE + 100 * GEO.EPS_SMALL then
|
||||||
return true, true
|
return true, not bForceNoBeamRotation
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- se è un taglio da sotto, lo verifico
|
-- se è un taglio da sotto, lo verifico
|
||||||
@@ -96,7 +97,7 @@ function ProcessCut.Classify( Proc, b3Raw)
|
|||||||
_, DimH, DimV = BL.GetFaceHvRefDim( Proc.Id, 0)
|
_, DimH, DimV = BL.GetFaceHvRefDim( Proc.Id, 0)
|
||||||
-- confronto questo ingombro con il doppio della massima dimensione del DiceCut (impossibile lavorare sotto da sopra se più di 2 tagli oppure se tipo PF, taglio inclinato in Y e non taglio singolo orizzontale)
|
-- confronto questo ingombro con il doppio della massima dimensione del DiceCut (impossibile lavorare sotto da sopra se più di 2 tagli oppure se tipo PF, taglio inclinato in Y e non taglio singolo orizzontale)
|
||||||
if DimH > 2 * BD.MAX_DIM_DICE or ( BD.C_SIMM and ( abs( vtN:getY()) > 0.1) and dMaxMat < DimH + BD.CUT_EXTRA) then
|
if DimH > 2 * BD.MAX_DIM_DICE or ( BD.C_SIMM and ( abs( vtN:getY()) > 0.1) and dMaxMat < DimH + BD.CUT_EXTRA) then
|
||||||
return true, true
|
return true, not bForceNoBeamRotation
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return true, false
|
return true, false
|
||||||
|
|||||||
@@ -613,6 +613,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
local dDepthOri = dDepth
|
||||||
-- se foro da saltare per eccessiva inclinazione
|
-- se foro da saltare per eccessiva inclinazione
|
||||||
if not bTryDrill then
|
if not bTryDrill then
|
||||||
sMyWarn = 'Warning in drill : too slant hole'
|
sMyWarn = 'Warning in drill : too slant hole'
|
||||||
@@ -654,6 +655,9 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
local dReduceDepth = MIRROR_POCKETS_MIN_DISTANCE / 2 + 10
|
local dReduceDepth = MIRROR_POCKETS_MIN_DISTANCE / 2 + 10
|
||||||
dLastStepDepth = dDepth + dReduceDepth
|
dLastStepDepth = dDepth + dReduceDepth
|
||||||
dDepth = dDepth - dReduceDepth
|
dDepth = dDepth - dReduceDepth
|
||||||
|
if ( dLastStepDepth > dMaxDepth + 10 * GEO.EPS_SMALL) and ( dMaxDepth <= ( dLen / 2) - dReduceDepth) and ( dDepthOri ~= dDepth) then
|
||||||
|
dDepth = dMaxDepth
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'LastStep', MIRROR_DRILLINGS_MIN_DISTANCE / 2 + 15)
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'LastStep', MIRROR_DRILLINGS_MIN_DISTANCE / 2 + 15)
|
||||||
@@ -718,12 +722,12 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
else
|
else
|
||||||
-- se DrillPocket passante in doppio si fa lavorazione aggiuntiva dell'ultimo step
|
-- se DrillPocket passante in doppio si fa lavorazione aggiuntiva dell'ultimo step
|
||||||
if Proc.Double and Proc.Double > 0 and ( sType == 'Pocket_AT' or sType == 'Pocket') and bOpen then
|
if Proc.Double and Proc.Double > 0 and ( sType == 'Pocket_AT' or sType == 'Pocket') and bOpen then
|
||||||
|
if dLastStepDepth > dMaxDepth + 10 * GEO.EPS_SMALL then
|
||||||
|
sMyWarn = 'Warning in drill pocket last step: depth (' .. EgtNumToString( dLastStepDepth, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth, 1) .. ')'
|
||||||
|
return false, sMyWarn
|
||||||
|
end
|
||||||
local idMachiningLastStep = EgtCopyMachining( EgtIf( EgtStartsWith( sType, 'Predrill'), 'Predrill_', 'Drill_') .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)), sName)
|
local idMachiningLastStep = EgtCopyMachining( EgtIf( EgtStartsWith( sType, 'Predrill'), 'Predrill_', 'Drill_') .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)), sName)
|
||||||
EgtSetCurrMachining( idMachiningLastStep)
|
EgtSetCurrMachining( idMachiningLastStep)
|
||||||
if dLastStepDepth > dMaxDepth + 10 * GEO.EPS_SMALL then
|
|
||||||
sMyWarn = 'Warning in drill pocket last step: depth (' .. EgtNumToString( dLastStepDepth, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth, 1) .. ')'
|
|
||||||
dLastStepDepth = dMaxDepth
|
|
||||||
end
|
|
||||||
local dMaxElevLastStep = dLastStepDepth - dDepth
|
local dMaxElevLastStep = dLastStepDepth - dDepth
|
||||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElevLastStep, 1))
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElevLastStep, 1))
|
||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dLastStepDepth)
|
EgtSetMachiningParam( MCH_MP.DEPTH, dLastStepDepth)
|
||||||
|
|||||||
@@ -229,10 +229,10 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
end
|
end
|
||||||
local b3DtMrt = EgtGetBBoxRef( Proc.Id, GDB_BB.STANDARD, rfDtMrt)
|
local b3DtMrt = EgtGetBBoxRef( Proc.Id, GDB_BB.STANDARD, rfDtMrt)
|
||||||
local dAltMort = b3DtMrt:getDimZ()
|
local dAltMort = b3DtMrt:getDimZ()
|
||||||
-- verifico se di tipo pocket
|
-- verifico se di tipo pocket o se antischeggia disabilitato
|
||||||
local bPocket = ( EgtGetInfo( Proc.Id, 'P05', 'i') == 1)
|
local bPocket = ( EgtGetInfo( Proc.Id, 'P05', 'i') == 1)
|
||||||
local dForcePrecutBypass = EgtGetInfo( Proc.Id, 'Q01', 'i')
|
local bDisableAntiSplint = ( EgtGetInfo( Proc.Id, 'Q01', 'i') or 0) == 1
|
||||||
if bPocket or dForcePrecutBypass == 1 then bMakeAntiSplitPath = false end
|
if bPocket or bDisableAntiSplint then bMakeAntiSplitPath = false end
|
||||||
-- verifico se frontale
|
-- verifico se frontale
|
||||||
local bFront = ( Proc.Prc == 56)
|
local bFront = ( Proc.Prc == 56)
|
||||||
-- se mortasa di fronte, eseguo il taglio della faccia
|
-- se mortasa di fronte, eseguo il taglio della faccia
|
||||||
@@ -362,7 +362,7 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
dMaxMat = 30
|
dMaxMat = 30
|
||||||
dSideAng = 0
|
dSideAng = 0
|
||||||
bCW = true
|
bCW = true
|
||||||
bMillOnAggregate = sMchExt == '_AT'
|
bMillOnAggregate = ( sMchExt == '_AT')
|
||||||
if EgtMdbSetCurrMachining( sMilling) then
|
if EgtMdbSetCurrMachining( sMilling) then
|
||||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||||
@@ -424,8 +424,16 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
end
|
end
|
||||||
-- aggiungo geometria
|
-- aggiungo geometria
|
||||||
EgtSetMachiningGeometry( {{ Aux2Id, -1}})
|
EgtSetMachiningGeometry( {{ Aux2Id, -1}})
|
||||||
-- dichiaro non si generano sfridi per VMill
|
-- recupero note utente per aggiornarle
|
||||||
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
|
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
|
||||||
|
-- eventuali impostazioni per 3° asse rot
|
||||||
|
local sAuxDir, sInitAngs = BL.GetAuxDir( sPocketing, "", b3Solid, vtExtr, vtExtr)
|
||||||
|
if sAuxDir then
|
||||||
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'VtAuxDir', sAuxDir)
|
||||||
|
EgtSetMachiningParam( MCH_MP.INITANGS, sInitAngs)
|
||||||
|
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.STD)
|
||||||
|
end
|
||||||
|
-- dichiaro non si generano sfridi per VMill
|
||||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxMat - 0.1, 1))
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxMat - 0.1, 1))
|
||||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
|
||||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||||
@@ -537,8 +545,16 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
if nSCC then
|
if nSCC then
|
||||||
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||||
end
|
end
|
||||||
-- dichiaro non si generano sfridi per VMill
|
-- recupero note utente per aggiornarle
|
||||||
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
|
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
|
||||||
|
-- eventuali impostazioni per 3° asse rot
|
||||||
|
local sAuxDir, sInitAngs = BL.GetAuxDir( sMilling, "", b3Solid, vtExtr, vtExtr)
|
||||||
|
if sAuxDir then
|
||||||
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'VtAuxDir', sAuxDir)
|
||||||
|
EgtSetMachiningParam( MCH_MP.INITANGS, sInitAngs)
|
||||||
|
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.STD)
|
||||||
|
end
|
||||||
|
-- dichiaro non si generano sfridi per VMill
|
||||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dAltMort, 1))
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dAltMort, 1))
|
||||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
|
||||||
-- se lavorazione in doppio
|
-- se lavorazione in doppio
|
||||||
@@ -697,12 +713,20 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
|||||||
if nSCC then
|
if nSCC then
|
||||||
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||||
end
|
end
|
||||||
|
-- recupero note utente per aggiornarle
|
||||||
|
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
|
||||||
|
-- eventuali impostazioni per 3° asse rot
|
||||||
|
local sAuxDir, sInitAngs = BL.GetAuxDir( sMilling, "", b3Solid, vtExtr, vtExtr)
|
||||||
|
if sAuxDir then
|
||||||
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'VtAuxDir', sAuxDir)
|
||||||
|
EgtSetMachiningParam( MCH_MP.INITANGS, sInitAngs)
|
||||||
|
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.STD)
|
||||||
|
end
|
||||||
-- dichiaro massima elevazione e assenza sfridi per VMill
|
-- dichiaro massima elevazione e assenza sfridi per VMill
|
||||||
local dMaxElev = dMaxMat
|
local dMaxElev = dMaxMat
|
||||||
if bMultipleZPasses then
|
if bMultipleZPasses then
|
||||||
dMaxElev = dVerticalStep
|
dMaxElev = dVerticalStep
|
||||||
end
|
end
|
||||||
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
|
|
||||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElev - 0.1, 1))
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElev - 0.1, 1))
|
||||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
|
||||||
-- in presenza di pocket dichiaro che non sto entrando e uscendo nel grezzo
|
-- in presenza di pocket dichiaro che non sto entrando e uscendo nel grezzo
|
||||||
|
|||||||
@@ -162,10 +162,11 @@ end
|
|||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
-- smussi in testa
|
-- smussi in testa
|
||||||
local function MakeHeadChamfer( idProc, nPartId)
|
local function MakeHeadChamfer( idProc, nPartId)
|
||||||
|
|
||||||
local dDepthHeadChamfer = EgtGetInfo( idProc, 'Q08', 'd') or 0
|
local dDepthHeadChamfer = EgtGetInfo( idProc, 'Q08', 'd') or 0
|
||||||
-- se non attivo esco subito
|
-- se non attivo esco subito
|
||||||
if dDepthHeadChamfer < 100 * GEO.EPS_SMALL then
|
if dDepthHeadChamfer < 100 * GEO.EPS_SMALL then
|
||||||
return
|
return true, nil
|
||||||
end
|
end
|
||||||
|
|
||||||
-- recupero gruppo per geometria aggiuntiva
|
-- recupero gruppo per geometria aggiuntiva
|
||||||
@@ -254,7 +255,8 @@ local function MakeHeadChamfer( idProc, nPartId)
|
|||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepthHeadChamfer + dExtra)
|
EgtSetMachiningParam( MCH_MP.DEPTH, dDepthHeadChamfer + dExtra)
|
||||||
EgtSetMachiningParam( MCH_MP.OFFSR, dExtra)
|
EgtSetMachiningParam( MCH_MP.OFFSR, dExtra)
|
||||||
-- assegno lato di lavoro
|
-- assegno lato di lavoro
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
||||||
|
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
||||||
-- eseguo
|
-- eseguo
|
||||||
if not ML.ApplyMachining( true, false) then
|
if not ML.ApplyMachining( true, false) then
|
||||||
local _, sErr = EgtGetLastMachMgrError()
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
@@ -639,11 +641,12 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
|
|||||||
|
|
||||||
local bOk, sErr = MakeStandardCuts( Proc, b3Raw, nCuts, dOffsL, HeadCutType, Cutting1Data, Cutting2Data, nil, dOvmHead)
|
local bOk, sErr = MakeStandardCuts( Proc, b3Raw, nCuts, dOffsL, HeadCutType, Cutting1Data, Cutting2Data, nil, dOvmHead)
|
||||||
|
|
||||||
|
|
||||||
-- alla fine del taglio si aggiungono gli smussi in testa
|
-- alla fine del taglio si aggiungono gli smussi in testa
|
||||||
local _, sErrHeadChamfer = MakeHeadChamfer( nOriId or Proc.Id, nPartId)
|
local _, sErrHeadChamfer = MakeHeadChamfer( nOriId or Proc.Id, nPartId)
|
||||||
if sErr then
|
if sErr then
|
||||||
sErr = sErr..'\n'..sErrHeadChamfer
|
if sErrHeadChamfer then
|
||||||
|
sErr = sErr..'\n'..sErrHeadChamfer
|
||||||
|
end
|
||||||
else
|
else
|
||||||
sErr = sErrHeadChamfer
|
sErr = sErrHeadChamfer
|
||||||
end
|
end
|
||||||
|
|||||||
+42
-17
@@ -3408,7 +3408,9 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
|||||||
bGoFromHead = false
|
bGoFromHead = false
|
||||||
-- continuo di testa se fessura con tre facce o non è tunnel
|
-- continuo di testa se fessura con tre facce o non è tunnel
|
||||||
else
|
else
|
||||||
bGoFromHead = (( bIs3Faces and dMaxElev) or not bOrthoFaces)
|
bGoFromHead = (( bIs3Faces and ( dMaxElev
|
||||||
|
or ( Proc.Topology == 'Groove' and Proc.IsThrough and (Proc.AffectedFaces.Left or Proc.AffectedFaces.Right) and not Proc.IsParallel)))
|
||||||
|
or not bOrthoFaces)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- se continuo a lavorare di testa
|
-- se continuo a lavorare di testa
|
||||||
@@ -3473,17 +3475,35 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
|||||||
-- imposto offset radiale
|
-- imposto offset radiale
|
||||||
local dOffs = ( i - 1) * dStep
|
local dOffs = ( i - 1) * dStep
|
||||||
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
|
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
|
||||||
|
local bElevAdj
|
||||||
|
local dToolEntryAngle, _, _, dTanToolEntryAngle = GetToolEntryAngle( Proc, rfFac:getVersZ())
|
||||||
-- se necessario, avverto limitazione dell'affondamento
|
-- se necessario, avverto limitazione dell'affondamento
|
||||||
if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then
|
if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then
|
||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dMaxDepth)
|
if Proc.Fct == 3 and Proc.Topology == 'Groove' and Proc.IsThrough and (Proc.AffectedFaces.Left or Proc.AffectedFaces.Right) and not Proc.IsParallel then
|
||||||
sWarn = 'Warning in LapJoint : elevation (' .. EgtNumToString( dElev, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth, 1) .. ')'
|
local Edges = BL.GetEdgesInfo( Proc, Proc.Face[nFacAdj+1])
|
||||||
EgtOutLog( sWarn)
|
local dWorkEdgeWidth
|
||||||
|
for i = 1, #Edges do
|
||||||
|
if Edges[i].AdjacentFaceId == nFacInd then
|
||||||
|
dWorkEdgeWidth = Edges[i].Length
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local dDeltaDepth = dWorkEdgeWidth * cos( dToolEntryAngle)
|
||||||
|
bElevAdj = true
|
||||||
|
EgtSetMachiningParam( MCH_MP.DEPTH, dMaxDepth - dDeltaDepth)
|
||||||
|
else
|
||||||
|
EgtSetMachiningParam( MCH_MP.DEPTH, dMaxDepth)
|
||||||
|
sWarn = 'Warning in LapJoint : elevation (' .. EgtNumToString( dElev, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth, 1) .. ')'
|
||||||
|
EgtOutLog( sWarn)
|
||||||
|
end
|
||||||
|
|
||||||
--local dDepth = dMaxDepth - dElev
|
--local dDepth = dMaxDepth - dElev
|
||||||
--EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH '..EgtNumToString( dDepth, 1))
|
--EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH '..EgtNumToString( dDepth, 1))
|
||||||
end
|
end
|
||||||
-- imposto massima elevazione
|
-- imposto massima elevazione
|
||||||
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
|
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
|
||||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dElev, 2))
|
local dElevAdj = EgtIf( bElevAdj, dElev / sin( dToolEntryAngle), dElev)
|
||||||
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dElevAdj, 2))
|
||||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||||
-- eseguo
|
-- eseguo
|
||||||
if not ML.ApplyMachining( true, false) then
|
if not ML.ApplyMachining( true, false) then
|
||||||
@@ -4803,7 +4823,7 @@ local function ManageAntiSplintBySaw( Proc, b3Raw, b3Solid, bIsU, vtN, nFacInd,
|
|||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
local function MakePathsOnExtremPoints( nAddGrpId, nIdPath, pPaths, dTDiam)
|
local function MakePathsOnExtremePoints( nAddGrpId, nIdPath, pPaths, dTDiam, b3Solid)
|
||||||
|
|
||||||
local dLength = 2
|
local dLength = 2
|
||||||
if not nIdPath then return pPaths end
|
if not nIdPath then return pPaths end
|
||||||
@@ -4819,15 +4839,20 @@ local function MakePathsOnExtremPoints( nAddGrpId, nIdPath, pPaths, dTDiam)
|
|||||||
local vtIni = EgtSV( nIdPath, GDB_RT.GLOB)
|
local vtIni = EgtSV( nIdPath, GDB_RT.GLOB)
|
||||||
local vtEnd = EgtEV( nIdPath, GDB_RT.GLOB)
|
local vtEnd = EgtEV( nIdPath, GDB_RT.GLOB)
|
||||||
|
|
||||||
local ptIniP = ptIni
|
-- si costruisce il percorso solo per i punti sui bordi del grezzo
|
||||||
local ptEndP = ptIniP + (vtIni * dLength)
|
if BL.IsPointOnBoxLimits( ptIni, b3Solid) then
|
||||||
local nAuxId = EgtLine( nAddGrpId, ptIniP, ptEndP, GDB_RT.GLOB)
|
local ptIniP = ptIni
|
||||||
table.insert( pPaths, { nAuxId, 1, ptIniP})
|
local ptEndP = ptIniP + (vtIni * dLength)
|
||||||
|
local nAuxId = EgtLine( nAddGrpId, ptIniP, ptEndP, GDB_RT.GLOB)
|
||||||
|
table.insert( pPaths, { nAuxId, 1, ptIniP})
|
||||||
|
end
|
||||||
|
|
||||||
ptIniP = ptEnd
|
if BL.IsPointOnBoxLimits( ptEnd, b3Solid) then
|
||||||
ptEndP = ptEnd - ( vtEnd * dLength)
|
local ptIniP = ptEnd
|
||||||
nAuxId = EgtLine( nAddGrpId, ptIniP, ptEndP, GDB_RT.GLOB)
|
local ptEndP = ptEnd - ( vtEnd * dLength)
|
||||||
table.insert( pPaths, { nAuxId, 2, ptIniP})
|
local nAuxId = EgtLine( nAddGrpId, ptIniP, ptEndP, GDB_RT.GLOB)
|
||||||
|
table.insert( pPaths, { nAuxId, 2, ptIniP})
|
||||||
|
end
|
||||||
|
|
||||||
return pPaths
|
return pPaths
|
||||||
end
|
end
|
||||||
@@ -5081,7 +5106,7 @@ local function ManageAntiSplintByMill( Proc, nPhase, nRawId, nPartId, b3Raw,
|
|||||||
-- creo percorsi antisplint dagli estremi dei percorsi di contorno trovati
|
-- creo percorsi antisplint dagli estremi dei percorsi di contorno trovati
|
||||||
for i = 1, nNumId do
|
for i = 1, nNumId do
|
||||||
local nIdPath = nFirstId + i - 1
|
local nIdPath = nFirstId + i - 1
|
||||||
pPaths = MakePathsOnExtremPoints( nAddGrpId, nIdPath, pPaths, dTDiam)
|
pPaths = MakePathsOnExtremePoints( nAddGrpId, nIdPath, pPaths, dTDiam, b3Solid)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- alrimenti ho la faccia aggiunta
|
-- alrimenti ho la faccia aggiunta
|
||||||
@@ -5116,7 +5141,7 @@ local function ManageAntiSplintByMill( Proc, nPhase, nRawId, nPartId, b3Raw,
|
|||||||
-- se non ho un percorso chiuso estraggo i percorsi
|
-- se non ho un percorso chiuso estraggo i percorsi
|
||||||
if bOpenPath then
|
if bOpenPath then
|
||||||
-- creo percorsi antisplint dagli estremi dei percorsi di contorno trovati
|
-- creo percorsi antisplint dagli estremi dei percorsi di contorno trovati
|
||||||
pPaths = MakePathsOnExtremPoints( nAddGrpId, nFirstId, pPaths, dTDiam)
|
pPaths = MakePathsOnExtremePoints( nAddGrpId, nFirstId, pPaths, dTDiam, b3Solid)
|
||||||
end
|
end
|
||||||
EgtErase(nFirstId)
|
EgtErase(nFirstId)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -258,7 +258,8 @@ local function MakeTailChamfer( idProc, nPartId, dDepthTailChamfer)
|
|||||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepthTailChamfer + dExtra)
|
EgtSetMachiningParam( MCH_MP.DEPTH, dDepthTailChamfer + dExtra)
|
||||||
EgtSetMachiningParam( MCH_MP.OFFSR, dExtra)
|
EgtSetMachiningParam( MCH_MP.OFFSR, dExtra)
|
||||||
-- assegno lato di lavoro
|
-- assegno lato di lavoro
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
||||||
|
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
||||||
-- eseguo
|
-- eseguo
|
||||||
if not ML.ApplyMachining( true, false) then
|
if not ML.ApplyMachining( true, false) then
|
||||||
local _, sErr = EgtGetLastMachMgrError()
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
|
|||||||
@@ -1,4 +1,14 @@
|
|||||||
==== Beam Update Log ====
|
==== Beam Update Log ====
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
Versione 3.1d2 (10/04/2026)
|
||||||
|
- Added : in StepJoint aggiunto Q02=1 per forzare fresa
|
||||||
|
- Added : in DtMortise aggiunto Q01=1 per disabilitare antischeggia
|
||||||
|
- Fixed : in LapJoint correzione a antischeggia con fresa in caso di feature spezzata
|
||||||
|
|
||||||
Versione 3.1d1 (08/04/2026)
|
Versione 3.1d1 (08/04/2026)
|
||||||
- Added : le forature vengono accorciate con massima elevazione anche in presenza di tagli di testa
|
- Added : le forature vengono accorciate con massima elevazione anche in presenza di tagli di testa
|
||||||
- Modif : nelle slot con lama verticali si lavora sempre in concordanza
|
- Modif : nelle slot con lama verticali si lavora sempre in concordanza
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
-- Version.lua by Egaltech s.r.l. 2026/02/09
|
-- Version.lua by Egaltech s.r.l. 2026/05/31
|
||||||
-- Gestione della versione di Beam
|
-- Gestione della versione di Beam
|
||||||
|
|
||||||
NAME = 'Beam'
|
NAME = 'Beam'
|
||||||
VERSION = '3.1d1'
|
VERSION = '3.1e2'
|
||||||
MIN_EXE = '3.1b1'
|
MIN_EXE = '3.1b1'
|
||||||
|
|||||||
Reference in New Issue
Block a user