Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a137794c75 | |||
| dac5b40d3b | |||
| d255d8aaa9 | |||
| ce3fbd9b93 | |||
| fad52a8483 | |||
| e4f448bcf0 | |||
| bf58b58b47 | |||
| 3445fb2525 | |||
| 723713707f | |||
| fd0a52ad6b | |||
| 3e2ae92adc | |||
| c746a11e45 | |||
| d337e4cc18 | |||
| 5fcaf823a0 | |||
| 6b76dd2f4f | |||
| cc7f5abf40 | |||
| 389e722f7c | |||
| 946f5e8bf6 | |||
| a5cd84172e | |||
| 895740feff | |||
| 7e243bb9ea | |||
| ca21098226 | |||
| 32052e3016 | |||
| 4138f89f69 | |||
| 66013f5e07 | |||
| a9ec6744e3 | |||
| 5c82ab27c8 | |||
| 723f1a0d10 | |||
| 6c18d3fa95 | |||
| e910d6e6ba | |||
| 1f3906ab35 | |||
| 183a4a564a |
@@ -1991,6 +1991,9 @@ local function VerifyDrillMirrored( Proc, vProc, b3Raw)
|
||||
end
|
||||
local dToolDoubleDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM, 'd')
|
||||
local dToolDoubleMaxDepth = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
|
||||
if ( sType == 'Pocket_AT' or sType == 'Pocket') then
|
||||
dToolDoubleMaxDepth = EgtTdbGetCurrToolMaxDepth()
|
||||
end
|
||||
dMachiningDepth = min( dMachiningDepth, dToolDoubleMaxDepth)
|
||||
-- recupero la lunghezza della parte inclinata della punta
|
||||
local dToolDoubleTipLength = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN) - EgtTdbGetCurrToolParam( MCH_TP.LEN)
|
||||
|
||||
@@ -883,6 +883,25 @@ function BeamLib.GetBlockedAxis( sMachining, sBlockedAxis, b3Raw, vtTool, vtOut)
|
||||
return ''
|
||||
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.
|
||||
function BeamLib.FindFaceBestOrientedAsAxis( Proc, vtAx, fctExclude)
|
||||
@@ -1158,6 +1177,31 @@ function BeamLib.Is3EdgesApprox( Proc, nFacet, nAddGrpId)
|
||||
return bResult
|
||||
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
|
||||
function BeamLib.GetProcessAffectedFaces( Proc)
|
||||
|
||||
@@ -170,6 +170,12 @@ function MakeParallelOne( nSurfId, nFacet, sCutting, dSawDiam, nFaceUse, dVzLimD
|
||||
end
|
||||
local vtOut = EgtIf( vtN:getX() > 0, X_AX(), -X_AX())
|
||||
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
|
||||
if ( sLeadInOutType == 'PerpendicularOutraw') then
|
||||
sNotes = EgtSetValInNotes( sNotes, 'OutRaw', 3)
|
||||
@@ -631,6 +637,12 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
||||
-- imposto angolo 3° asse rot
|
||||
local sBlockedAxis = EgtIf( bMaximizeVerticalDepth, 'parallel', 'perpendicular')
|
||||
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
|
||||
if ( sLeadInOutType == 'PerpendicularOutraw') then
|
||||
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
|
||||
return true
|
||||
end
|
||||
local bForceNoBeamRotation = ( EgtGetInfo( Proc.Id, 'Q18', 'i') == 1)
|
||||
-- recupero i dati del taglio
|
||||
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
|
||||
-- calcolo le massime estensioni lineari orizzontale e verticale della faccia
|
||||
@@ -73,7 +74,7 @@ function ProcessCut.Classify( Proc, b3Raw)
|
||||
then
|
||||
-- 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
|
||||
return true, true
|
||||
return true, not bForceNoBeamRotation
|
||||
end
|
||||
end
|
||||
-- se è un taglio da sotto, lo verifico
|
||||
@@ -96,7 +97,7 @@ function ProcessCut.Classify( Proc, b3Raw)
|
||||
_, 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)
|
||||
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
|
||||
return true, false
|
||||
|
||||
@@ -613,6 +613,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
end
|
||||
end
|
||||
end
|
||||
local dDepthOri = dDepth
|
||||
-- se foro da saltare per eccessiva inclinazione
|
||||
if not bTryDrill then
|
||||
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
|
||||
dLastStepDepth = 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
|
||||
else
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'LastStep', MIRROR_DRILLINGS_MIN_DISTANCE / 2 + 15)
|
||||
@@ -718,12 +722,12 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
else
|
||||
-- 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 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)
|
||||
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
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElevLastStep, 1))
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH, dLastStepDepth)
|
||||
|
||||
@@ -229,9 +229,10 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
end
|
||||
local b3DtMrt = EgtGetBBoxRef( Proc.Id, GDB_BB.STANDARD, rfDtMrt)
|
||||
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)
|
||||
if bPocket then bMakeAntiSplitPath = false end
|
||||
local bDisableAntiSplint = ( EgtGetInfo( Proc.Id, 'Q01', 'i') or 0) == 1
|
||||
if bPocket or bDisableAntiSplint then bMakeAntiSplitPath = false end
|
||||
-- verifico se frontale
|
||||
local bFront = ( Proc.Prc == 56)
|
||||
-- se mortasa di fronte, eseguo il taglio della faccia
|
||||
@@ -361,7 +362,7 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
dMaxMat = 30
|
||||
dSideAng = 0
|
||||
bCW = true
|
||||
bMillOnAggregate = sMchExt == '_AT'
|
||||
bMillOnAggregate = ( sMchExt == '_AT')
|
||||
if EgtMdbSetCurrMachining( sMilling) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
@@ -423,8 +424,16 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
end
|
||||
-- aggiungo geometria
|
||||
EgtSetMachiningGeometry( {{ Aux2Id, -1}})
|
||||
-- dichiaro non si generano sfridi per VMill
|
||||
-- recupero note utente per aggiornarle
|
||||
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, 'VMRS', 0)
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||
@@ -536,8 +545,16 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
if nSCC then
|
||||
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||
end
|
||||
-- dichiaro non si generano sfridi per VMill
|
||||
-- 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 non si generano sfridi per VMill
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dAltMort, 1))
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
|
||||
-- se lavorazione in doppio
|
||||
@@ -696,12 +713,20 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
if nSCC then
|
||||
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||
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
|
||||
local dMaxElev = dMaxMat
|
||||
if bMultipleZPasses then
|
||||
dMaxElev = dVerticalStep
|
||||
end
|
||||
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElev - 0.1, 1))
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
|
||||
-- in presenza di pocket dichiaro che non sto entrando e uscendo nel grezzo
|
||||
|
||||
@@ -162,10 +162,11 @@ end
|
||||
---------------------------------------------------------------------
|
||||
-- smussi in testa
|
||||
local function MakeHeadChamfer( idProc, nPartId)
|
||||
|
||||
local dDepthHeadChamfer = EgtGetInfo( idProc, 'Q08', 'd') or 0
|
||||
-- se non attivo esco subito
|
||||
if dDepthHeadChamfer < 100 * GEO.EPS_SMALL then
|
||||
return
|
||||
return true, nil
|
||||
end
|
||||
|
||||
-- recupero gruppo per geometria aggiuntiva
|
||||
@@ -254,7 +255,8 @@ local function MakeHeadChamfer( idProc, nPartId)
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepthHeadChamfer + dExtra)
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, dExtra)
|
||||
-- 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
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
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)
|
||||
|
||||
|
||||
-- alla fine del taglio si aggiungono gli smussi in testa
|
||||
local _, sErrHeadChamfer = MakeHeadChamfer( nOriId or Proc.Id, nPartId)
|
||||
if sErr then
|
||||
sErr = sErr..'\n'..sErrHeadChamfer
|
||||
if sErrHeadChamfer then
|
||||
sErr = sErr..'\n'..sErrHeadChamfer
|
||||
end
|
||||
else
|
||||
sErr = sErrHeadChamfer
|
||||
end
|
||||
|
||||
+257
-68
@@ -1066,6 +1066,12 @@ local function MakeOneFaceByMill( Proc, nPhase, nRawId, nPartId)
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sWarn
|
||||
end
|
||||
end
|
||||
-- eventuale segnalazione ingombro di testa o coda
|
||||
UpdateEncumbrance( Proc, nRawId, b3Raw, b3Solid)
|
||||
@@ -1203,6 +1209,12 @@ local function MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId, bDownHead)
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sWarn
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1238,6 +1250,12 @@ local function MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId, bDownHead)
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sWarn
|
||||
end
|
||||
end
|
||||
-- eventuale segnalazione ingombro di testa o coda
|
||||
UpdateEncumbrance( Proc, nRawId, b3Raw, b3Solid)
|
||||
@@ -1407,6 +1425,12 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac, dH, dV
|
||||
_, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sWarn
|
||||
end
|
||||
end
|
||||
return true, '', dTDiam
|
||||
end
|
||||
@@ -2075,6 +2099,27 @@ local function MakeRoundCleanCornerOrContour( Proc, nPhase, nRawId, nPartId, b3R
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function CalcInterference( nNewProc, vtExtr, ptCentr, ToolData)
|
||||
-- controllo collisione tagliente - finito
|
||||
local ptCentrGrid1 = ptCentr + ( vtExtr * ( 10 * GEO.EPS_SMALL))
|
||||
local frOriTool = Frame3d( ptCentrGrid1, vtExtr)
|
||||
local bColl1 = EgtTestConeSurface( frOriTool, ToolData.dToolDiam/2, ToolData.dToolTotDiam/2, ToolData.dCutEdgeLen, nNewProc, 0, GDB_RT.GLOB)
|
||||
if bColl1 then return true end
|
||||
-- controllo collisione gambo - finito
|
||||
local ptCentrGrid2 = ptCentr + ( vtExtr * ToolData.dCutEdgeLen)
|
||||
frOriTool = Frame3d( ptCentrGrid2, vtExtr)
|
||||
local bColl2 = EgtTestCylSurface( frOriTool, ( ToolData.dStemDiameter + ( 10 * GEO.EPS_SMALL)) / 2, ToolData.dStemLen, nNewProc, 0, GDB_RT.GLOB)
|
||||
if bColl2 then return true end
|
||||
-- controllo collisione TH - finito
|
||||
local ptCentrGrid3 = ptCentr + ( vtExtr * ( ToolData.dCutEdgeLen + ToolData.dStemLen))
|
||||
frOriTool = Frame3d( ptCentrGrid3, vtExtr)
|
||||
local bColl3 = EgtTestCylSurface( frOriTool, ToolData.dDiamTh/2, ToolData.dLenTh, nNewProc, 0, GDB_RT.GLOB)
|
||||
if bColl3 then return true end
|
||||
-- restituisco risultato controllo collisioni
|
||||
return false
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function MakeSharpCleanCorner( Proc, nPhase, nRawId, nPartId, b3Raw, nFacInd, nAddGrpId, dDiam)
|
||||
|
||||
@@ -2087,6 +2132,43 @@ local function MakeSharpCleanCorner( Proc, nPhase, nRawId, nPartId, b3Raw, nFacI
|
||||
local sMilling
|
||||
local dMaxDepth = 0
|
||||
|
||||
-- recupero la lavorazione non calcolando l'elevazione
|
||||
sMilling = ML.FindMilling( 'CleanCorner', ( 0.5 * dDiam))
|
||||
if not sMilling then
|
||||
local sErr = 'Error : CleanCorner not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
|
||||
-- recupero i dati dell'utensile
|
||||
local ToolData = {
|
||||
dToolTotDiam = 20,
|
||||
dToolDiam = 20,
|
||||
dSideAng = 0,
|
||||
dCutEdgeLen = 20,
|
||||
dToolLength = 20,
|
||||
dStemDiameter = 20,
|
||||
dStemLen = 20,
|
||||
dDiamTh = 20,
|
||||
dLenTh = 20
|
||||
}
|
||||
if EgtMdbSetCurrMachining( sMilling) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
ToolData.dToolTotDiam = EgtTdbGetCurrToolParam( MCH_TP.TOTDIAM) or ToolData.dToolTotDiam
|
||||
ToolData.dToolDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or ToolData.dToolDiam
|
||||
ToolData.dSideAng = EgtTdbGetCurrToolParam( MCH_TP.SIDEANG) or ToolData.dSideAng
|
||||
ToolData.dCutEdgeLen = abs( EgtTdbGetCurrToolParam( MCH_TP.THICK)) or ToolData.dCutEdgeLen
|
||||
ToolData.dToolLength = EgtTdbGetCurrToolParam( MCH_TP.LEN) or ToolData.dToolLength
|
||||
ToolData.dStemDiameter = EgtTdbGetCurrToolParam( MCH_TP.STEMDIAM) or ToolData.dStemDiameter
|
||||
ToolData.dDiamTh = EgtTdbGetCurrToolThDiam() or ToolData.dDiamTh
|
||||
ToolData.dLenTh = EgtTdbGetCurrToolThLength() or ToolData.dLenTh
|
||||
-- calcolo il secondo diametro del cono
|
||||
ToolData.dToolTotDiam = ToolData.dToolDiam + ( abs( ToolData.dCutEdgeLen) * tan( ToolData.dSideAng)) * 2
|
||||
ToolData.dStemLen = ToolData.dToolLength - ToolData.dCutEdgeLen - ToolData.dLenTh
|
||||
end
|
||||
end
|
||||
|
||||
-- cerco l'angolo di riferimento dove applicare il percorso di pulitura, altrimenti esco
|
||||
local _, nIdLine, tFacAdj = ChooseCorner( Proc, nFacInd)
|
||||
if #tFacAdj == 0 then
|
||||
@@ -2112,6 +2194,8 @@ local function MakeSharpCleanCorner( Proc, nPhase, nRawId, nPartId, b3Raw, nFacI
|
||||
-- versore direzione
|
||||
local vtExtr = tFacAdj[nIdLine][nIdIniPoint] - tFacAdj[nIdLine][nIdEndPoint]
|
||||
vtExtr:normalize()
|
||||
-- versore direzione di uscita
|
||||
local vtExtrExit
|
||||
-- inserisco le prime tre linee
|
||||
if nIdIniPoint and nIdEndPoint then
|
||||
-- se fresatura da sotto salto la lavorazione
|
||||
@@ -2120,16 +2204,24 @@ local function MakeSharpCleanCorner( Proc, nPhase, nRawId, nPartId, b3Raw, nFacI
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- sommo i tre versori per avre una direzione media
|
||||
vtExtr = vtN1 + vtN2 + vtN3
|
||||
-- sommo i tre versori per avere una direzione media
|
||||
vtExtrExit = vtN2 + vtN3
|
||||
vtExtrExit:normalize()
|
||||
-- calcolo la componente Z dipendente dall'angolo tilt
|
||||
local dAlfa = EgtClamp( ToolData.dSideAng, 15, 30)
|
||||
local dGamma = 90 - asin( sqrt( 2) * sin( dAlfa))
|
||||
local dTanGamma = sin( dGamma) / cos( dGamma)
|
||||
vtExtr = vtExtrExit + ( vtN2 ^ vtN3) * dTanGamma
|
||||
vtExtr:normalize()
|
||||
-- recupero la lavorazione non calcolando l'elevazione
|
||||
sMilling = ML.FindMilling( 'CleanCorner', ( 0.5 * dDiam))
|
||||
if not sMilling then
|
||||
local sErr = 'Error : CleanCorner not found in library'
|
||||
local vtCheck = Vector3d(vtExtr)
|
||||
|
||||
-- controllo se c'è collisione con le facce della superfice
|
||||
if CalcInterference( Proc.Id, vtCheck, tFacAdj[nIdLine][nIdEndPoint], ToolData) then
|
||||
local sErr = 'Collision detected between clean corner tool and surface'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
return true, ''
|
||||
end
|
||||
|
||||
-- recupero i dati dell'utensile ( temporaneo, per compensare errore nella lavorazione)
|
||||
if EgtMdbSetCurrMachining( sMilling) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
@@ -2977,6 +3069,12 @@ local function MakeChamfer( Proc, bIs3Faces, nAddGrpId, vtOrtho, b3Solid, nSurfI
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return -1, sErr
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sWarn
|
||||
end
|
||||
end
|
||||
-- se non perpendicolare emetto un warning
|
||||
-- else
|
||||
@@ -3130,6 +3228,12 @@ local function MakeByMillAsSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sErr
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sWarn
|
||||
end
|
||||
end
|
||||
end
|
||||
-- in base all'elevazione calcolo l'impronta della lama
|
||||
@@ -3372,7 +3476,9 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
||||
bGoFromHead = false
|
||||
-- continuo di testa se fessura con tre facce o non è tunnel
|
||||
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
|
||||
-- se continuo a lavorare di testa
|
||||
@@ -3437,17 +3543,35 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
||||
-- imposto offset radiale
|
||||
local dOffs = ( i - 1) * dStep
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
|
||||
local bElevAdj
|
||||
local dToolEntryAngle, _, _, dTanToolEntryAngle = GetToolEntryAngle( Proc, rfFac:getVersZ())
|
||||
-- se necessario, avverto limitazione dell'affondamento
|
||||
if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH, dMaxDepth)
|
||||
sWarn = 'Warning in LapJoint : elevation (' .. EgtNumToString( dElev, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth, 1) .. ')'
|
||||
EgtOutLog( sWarn)
|
||||
if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then
|
||||
if Proc.Fct == 3 and Proc.Topology == 'Groove' and Proc.IsThrough and (Proc.AffectedFaces.Left or Proc.AffectedFaces.Right) and not Proc.IsParallel then
|
||||
local Edges = BL.GetEdgesInfo( Proc, Proc.Face[nFacAdj+1])
|
||||
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
|
||||
--EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH '..EgtNumToString( dDepth, 1))
|
||||
end
|
||||
-- imposto massima elevazione
|
||||
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)
|
||||
-- eseguo
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
@@ -3852,6 +3976,12 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
end
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sWarn
|
||||
end
|
||||
end
|
||||
-- se la lavorazione rovina il pezzo successivo emetto warning
|
||||
if ( not Proc.Tail or Proc.AdvTail) and Proc.AffectedFaces.Left and dDistToNextPiece < dDiamTool / 2 then
|
||||
@@ -3969,6 +4099,12 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sErr
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sWarn
|
||||
end
|
||||
end
|
||||
else
|
||||
return false, sWarn
|
||||
@@ -4096,6 +4232,12 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sWarn
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -4539,6 +4681,12 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return -1, sErr
|
||||
end
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sWarn
|
||||
end
|
||||
end
|
||||
end
|
||||
-- se non completo e U, cerco di lavorare anche la faccia di fondo (con il massimo affondamento possibile)
|
||||
@@ -4610,6 +4758,12 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return -1, sErr
|
||||
end
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sWarn
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -4646,6 +4800,16 @@ local function ManageAntiSplintBySaw( Proc, b3Raw, b3Solid, bIsU, vtN, nFacInd,
|
||||
local dSawThick = 0
|
||||
local dMaxDepth = 200
|
||||
local bAdj, dAng, dExtraOffs, sWarn2, nIdMach
|
||||
-- Se faccia sulla quale cerca di applicare l'antisplint è chiusa e limitata da altre facce non lo applica
|
||||
local FacetEdge = BL.GetEdgesInfo( Proc, Proc.Face[nFacet+1])
|
||||
for nEdge = 1, #FacetEdge do
|
||||
if AreSameVectorApprox( FacetEdge[nEdge].ToolDirection, vtN) and ( not FacetEdge[nEdge].IsStartOpen or not FacetEdge[nEdge].IsEndOpen) and not FacetEdge[nEdge].IsOpen then
|
||||
sWarn2 = 'Warning : antisplint not applicable on closed face'
|
||||
if not sWarn then sWarn = '' end
|
||||
sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sWarn2, sWarn2)
|
||||
return bMadeASbyBld, true, sWarn
|
||||
end
|
||||
end
|
||||
bMadeASbyBld, sWarn2, nIdMach, dSawThick, dMaxDepth, bAdj, dAng, dExtraOffs = MakeAntiSplintBySaw( Proc, nFacet, vtN, b3Raw, nFacInd, bReduceDepth, bMillDown)
|
||||
if not bMadeASbyBld then return bMadeASbyBld, false, sWarn2 end
|
||||
if sWarn2 then
|
||||
@@ -4722,6 +4886,12 @@ local function ManageAntiSplintBySaw( Proc, b3Raw, b3Solid, bIsU, vtN, nFacInd,
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nIdMach, false)
|
||||
return false, false, sErr
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nIdMach, false)
|
||||
return false, sWarn
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -4731,7 +4901,7 @@ local function ManageAntiSplintBySaw( Proc, b3Raw, b3Solid, bIsU, vtN, nFacInd,
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function MakePathsOnExtremPoints( nAddGrpId, nIdPath, pPaths, dTDiam)
|
||||
local function MakePathsOnExtremePoints( nAddGrpId, nIdPath, pPaths, dTDiam, b3Solid)
|
||||
|
||||
local dLength = 2
|
||||
if not nIdPath then return pPaths end
|
||||
@@ -4747,15 +4917,20 @@ local function MakePathsOnExtremPoints( nAddGrpId, nIdPath, pPaths, dTDiam)
|
||||
local vtIni = EgtSV( nIdPath, GDB_RT.GLOB)
|
||||
local vtEnd = EgtEV( nIdPath, GDB_RT.GLOB)
|
||||
|
||||
local ptIniP = ptIni
|
||||
local ptEndP = ptIniP + (vtIni * dLength)
|
||||
local nAuxId = EgtLine( nAddGrpId, ptIniP, ptEndP, GDB_RT.GLOB)
|
||||
table.insert( pPaths, { nAuxId, 1, ptIniP})
|
||||
-- si costruisce il percorso solo per i punti sui bordi del grezzo
|
||||
if BL.IsPointOnBoxLimits( ptIni, b3Solid) then
|
||||
local ptIniP = ptIni
|
||||
local ptEndP = ptIniP + (vtIni * dLength)
|
||||
local nAuxId = EgtLine( nAddGrpId, ptIniP, ptEndP, GDB_RT.GLOB)
|
||||
table.insert( pPaths, { nAuxId, 1, ptIniP})
|
||||
end
|
||||
|
||||
ptIniP = ptEnd
|
||||
ptEndP = ptEnd - ( vtEnd * dLength)
|
||||
nAuxId = EgtLine( nAddGrpId, ptIniP, ptEndP, GDB_RT.GLOB)
|
||||
table.insert( pPaths, { nAuxId, 2, ptIniP})
|
||||
if BL.IsPointOnBoxLimits( ptEnd, b3Solid) then
|
||||
local ptIniP = ptEnd
|
||||
local ptEndP = ptEnd - ( vtEnd * dLength)
|
||||
local nAuxId = EgtLine( nAddGrpId, ptIniP, ptEndP, GDB_RT.GLOB)
|
||||
table.insert( pPaths, { nAuxId, 2, ptIniP})
|
||||
end
|
||||
|
||||
return pPaths
|
||||
end
|
||||
@@ -5009,7 +5184,7 @@ local function ManageAntiSplintByMill( Proc, nPhase, nRawId, nPartId, b3Raw,
|
||||
-- creo percorsi antisplint dagli estremi dei percorsi di contorno trovati
|
||||
for i = 1, nNumId do
|
||||
local nIdPath = nFirstId + i - 1
|
||||
pPaths = MakePathsOnExtremPoints( nAddGrpId, nIdPath, pPaths, dTDiam)
|
||||
pPaths = MakePathsOnExtremePoints( nAddGrpId, nIdPath, pPaths, dTDiam, b3Solid)
|
||||
end
|
||||
end
|
||||
-- alrimenti ho la faccia aggiunta
|
||||
@@ -5044,7 +5219,7 @@ local function ManageAntiSplintByMill( Proc, nPhase, nRawId, nPartId, b3Raw,
|
||||
-- se non ho un percorso chiuso estraggo i percorsi
|
||||
if bOpenPath then
|
||||
-- creo percorsi antisplint dagli estremi dei percorsi di contorno trovati
|
||||
pPaths = MakePathsOnExtremPoints( nAddGrpId, nFirstId, pPaths, dTDiam)
|
||||
pPaths = MakePathsOnExtremePoints( nAddGrpId, nFirstId, pPaths, dTDiam, b3Solid)
|
||||
end
|
||||
EgtErase(nFirstId)
|
||||
end
|
||||
@@ -6186,24 +6361,6 @@ local function ReorderFacesFromTab( nIdSurf, vFace)
|
||||
return nIdSurf
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function CalcInterference( nNewProc, vtExtr, ptCentr, dDiam1, dDiam2,
|
||||
dTall1, dTall2, dDiam3, dTall3)
|
||||
local ptCentrGrid1 = ptCentr + ( vtExtr * 0.01)
|
||||
local frOriTool = Frame3d( ptCentrGrid1, vtExtr)
|
||||
local bColl1 = EgtTestConeSurface( frOriTool, dDiam1/2, dDiam2/2, dTall1, nNewProc, 0, GDB_RT.GLOB)
|
||||
if bColl1 then return true end
|
||||
local ptCentrGrid2 = ptCentr + ( vtExtr * ( dTall1 + 0.01))
|
||||
frOriTool = Frame3d( ptCentrGrid2, vtExtr)
|
||||
local bColl2 = EgtTestCylSurface( frOriTool, dDiam2/2, dTall2, nNewProc, 0, GDB_RT.GLOB)
|
||||
if bColl2 then return true end
|
||||
local ptCentrGrid3 = ptCentr + ( vtExtr * ( dTall2 + 0.01))
|
||||
frOriTool = Frame3d( ptCentrGrid3, vtExtr)
|
||||
local bColl3 = EgtTestCylSurface( frOriTool, dDiam3/2, dTall3, nNewProc, 0, GDB_RT.GLOB)
|
||||
if bColl3 then return true end
|
||||
-- restituisco risultato controllo collisioni
|
||||
return false
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function MakeLocalSurf( ptP1, ptP2, ptP3, nAddGrpId)
|
||||
@@ -6234,8 +6391,7 @@ end
|
||||
---------------------------------------------------------------------
|
||||
local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nAddGrpId,
|
||||
dToolDiam, sMilling, dOffsAng,
|
||||
dDiam1, dDiam2, dTall1,
|
||||
dTall2, dDiam3, dTall3, bMakeLocSurf, vFace, vtN)
|
||||
ToolData, bMakeLocSurf, vFace, vtN)
|
||||
|
||||
-- variabili costruzione geometria
|
||||
local pAuxId = {}
|
||||
@@ -6315,8 +6471,7 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nAdd
|
||||
vtCheck:rotate( vtN, dOffsAng)
|
||||
end
|
||||
-- controllo se c'è collisione con le facce della superfice
|
||||
if CalcInterference( nNewProc.Id, vtCheck, tFacAdj[nIdEndPoint], dDiam1, dDiam2,
|
||||
dTall1, dTall2, dDiam3, dTall3) then
|
||||
if CalcInterference( nNewProc.Id, vtCheck, tFacAdj[nIdEndPoint], ToolData) then
|
||||
local sErr = 'Collision detect from clean corner tool and surface'
|
||||
EgtOutLog( sErr)
|
||||
return true, ''
|
||||
@@ -6464,32 +6619,39 @@ local function AddMillCorner( vFace, Proc, dToolDiam, nAddGrpId, nMasterNewProc,
|
||||
-- se ripresa angolo con fresa cono 60° con ripresa
|
||||
|
||||
-- recupero la lavorazione di fresatura
|
||||
sMilling, dMaxDepth = ML.FindMilling( 'CleanCorner60')
|
||||
sMilling, dMaxDepth = ML.FindMilling( 'CleanCorner')
|
||||
if not sMilling then
|
||||
local sErr = 'Error : CleanCorner 60 not found in library'
|
||||
local sErr = 'Error : CleanCorner not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
|
||||
-- recupero i dati dell'utensile
|
||||
local dMillDiam = 20
|
||||
local dMillTotDiam = 20
|
||||
local dMillDiamTh = 20
|
||||
local dToolLength = 20
|
||||
local dThickTool = 20
|
||||
local dSideAng = 0
|
||||
local ToolData = {
|
||||
dToolTotDiam = 20,
|
||||
dToolDiam = 20,
|
||||
dSideAng = 0,
|
||||
dCutEdgeLen = 20,
|
||||
dToolLength = 20,
|
||||
dStemDiameter = 20,
|
||||
dStemLen = 20,
|
||||
dDiamTh = 20,
|
||||
dLenTh = 20
|
||||
}
|
||||
if EgtMdbSetCurrMachining( sMilling) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dMillDiamTh = EgtTdbGetCurrToolThDiam() or dMillDiamTh
|
||||
dMillTotDiam = EgtTdbGetCurrToolParam( MCH_TP.TOTDIAM) or dMillTotDiam
|
||||
dSideAng = EgtTdbGetCurrToolParam( MCH_TP.SIDEANG) or dSideAng
|
||||
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
||||
dThickTool = EgtTdbGetCurrToolParam( MCH_TP.THICK) or dThickTool
|
||||
dToolLength = EgtTdbGetCurrToolParam( MCH_TP.LEN) or dToolLength
|
||||
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth -- qui è la distanza dal portautensile
|
||||
ToolData.dToolTotDiam = EgtTdbGetCurrToolParam( MCH_TP.TOTDIAM) or ToolData.dToolTotDiam
|
||||
ToolData.dToolDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or ToolData.dToolDiam
|
||||
ToolData.dSideAng = EgtTdbGetCurrToolParam( MCH_TP.SIDEANG) or ToolData.dSideAng
|
||||
ToolData.dCutEdgeLen = abs( EgtTdbGetCurrToolParam( MCH_TP.THICK)) or ToolData.dCutEdgeLen
|
||||
ToolData.dToolLength = EgtTdbGetCurrToolParam( MCH_TP.LEN) or ToolData.dToolLength
|
||||
ToolData.dStemDiameter = EgtTdbGetCurrToolParam( MCH_TP.STEMDIAM) or ToolData.dStemDiameter
|
||||
ToolData.dDiamTh = EgtTdbGetCurrToolThDiam() or ToolData.dDiamTh
|
||||
ToolData.dLenTh = EgtTdbGetCurrToolThLength() or ToolData.dLenTh
|
||||
-- calcolo il secondo diametro del cono
|
||||
dMillTotDiam = dMillDiam + ( abs(dThickTool) * tan(dSideAng)) * 2
|
||||
ToolData.dToolTotDiam = ToolData.dToolDiam + ( abs( ToolData.dCutEdgeLen) * tan( ToolData.dSideAng)) * 2
|
||||
ToolData.dStemLen = ToolData.dToolLength - ToolData.dCutEdgeLen - ToolData.dLenTh
|
||||
end
|
||||
end
|
||||
-- copio la feature nel layer di appoggio
|
||||
@@ -6567,21 +6729,18 @@ local function AddMillCorner( vFace, Proc, dToolDiam, nAddGrpId, nMasterNewProc,
|
||||
-- primo taglio
|
||||
local bOk, sErr = AddMillCornerMachining( Proc.PartId, nNewProc, nFacInd, tFacAdj, nAddGrpId,
|
||||
dToolDiam, sMilling, -dAngOffs,
|
||||
dMillDiam, dMillTotDiam, abs( dThickTool),
|
||||
dMaxDepth, dMillDiamTh, dToolLength, bMakeLocSurf, vFace, vtN)
|
||||
ToolData, bMakeLocSurf, vFace, vtN)
|
||||
if not bOk then return bOk, sErr end
|
||||
-- secondo taglio
|
||||
bOk, sErr = AddMillCornerMachining( Proc.PartId, nNewProc, nFacInd, tFacAdj, nAddGrpId,
|
||||
dToolDiam, sMilling, dAngOffs,
|
||||
dMillDiam, dMillTotDiam, abs( dThickTool),
|
||||
dMaxDepth, dMillDiamTh, dToolLength, bMakeLocSurf, vFace, vtN)
|
||||
ToolData, bMakeLocSurf, vFace, vtN)
|
||||
if not bOk then return bOk, sErr end
|
||||
-- altrimenti ho un solo percorso
|
||||
else
|
||||
local bOk, sErr = AddMillCornerMachining( Proc.PartId, nNewProc, nFacInd, tFacAdj, nAddGrpId,
|
||||
dToolDiam, sMilling, 0,
|
||||
dMillDiam, dMillTotDiam, abs( dThickTool),
|
||||
dMaxDepth, dMillDiamTh, dToolLength, bMakeLocSurf, vFace, vtN)
|
||||
ToolData, bMakeLocSurf, vFace, vtN)
|
||||
if not bOk then return bOk, sErr end
|
||||
end
|
||||
end
|
||||
@@ -7163,6 +7322,12 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sWarn
|
||||
end
|
||||
end
|
||||
-- se divisa in due metà
|
||||
if bDouble then
|
||||
@@ -7183,6 +7348,12 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFNId, false)
|
||||
return false, sErr
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchFNId, false)
|
||||
return false, sWarn
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -7263,6 +7434,12 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sWarn
|
||||
end
|
||||
end
|
||||
|
||||
-- CASO SPECIALE 3 FACCE (se rimane esclusa molta sezione trasversale complessiva della feature, solo per feature 20)
|
||||
@@ -7378,6 +7555,12 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
end
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sWarn
|
||||
end
|
||||
end
|
||||
-- se abilitato dal parametro Q inserisco foro sullo spigolo
|
||||
if EgtGetInfo( Proc.Id, Q_BORE_ON_CORNER, 'i') == 1 then
|
||||
@@ -8559,6 +8742,12 @@ local function MakeStaircaseStep( Proc, nRawId, b3Raw, nPartId)
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sWarn
|
||||
end
|
||||
end
|
||||
-- eventuale segnalazione ingombro di testa o coda
|
||||
UpdateEncumbrance( Proc, nRawId, b3Raw, b3Solid)
|
||||
|
||||
@@ -258,7 +258,8 @@ local function MakeTailChamfer( idProc, nPartId, dDepthTailChamfer)
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepthTailChamfer + dExtra)
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, dExtra)
|
||||
-- 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
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
|
||||
+154
-34
@@ -140,6 +140,112 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
return true
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function MakePocket( Proc, nPartId, ptPs, vtN, nFaceRef, nDiffWidth, sMchFind, nUseRoughTool, tBHx)
|
||||
|
||||
-- calcolo il elevazione dal punto medio
|
||||
local dElev
|
||||
local dLenIn, dLedOut = BL.GetPointDirDepth( nPartId, ptPs, vtN[nFaceRef])
|
||||
if dLenIn > 0 then
|
||||
dElev = dLenIn
|
||||
elseif dLedOut then
|
||||
dElev = dLedOut
|
||||
end
|
||||
local dCollSic = 2 * BD.COLL_SIC
|
||||
local sTuuidMstr
|
||||
-- calcolo il diametro utensile
|
||||
local dDiamTool
|
||||
if nUseRoughTool == 1 then
|
||||
-- se feature passante prendo utensile più grande possibile
|
||||
if ( Proc.AffectedFaces.Top and Proc.AffectedFaces.Bottom) or ( Proc.AffectedFaces.Front and Proc.AffectedFaces.Back) then
|
||||
dDiamTool = nil
|
||||
else
|
||||
dDiamTool = max( 80, min( tBHx[nFaceRef][1], tBHx[nFaceRef][2]))
|
||||
end
|
||||
else
|
||||
-- se non uso truciolatore prendo il valore dalle dimensioni minime delle facce
|
||||
dDiamTool = min( tBHx[nFaceRef][1], tBHx[nFaceRef][2])
|
||||
end
|
||||
-- abilitazione lavorazione da sotto (testa da sotto e direzione normale sotto -30deg)
|
||||
local bTopHead = ( BD.DOWN_HEAD and vtN[nFaceRef]:getZ() > -0.1)
|
||||
local bDownHead = ( BD.DOWN_HEAD and vtN[nFaceRef]:getZ() < 0.1)
|
||||
-- recupero la lavorazione
|
||||
local sPocketing, _, _, bDownHead = ML.FindPocketing( sMchFind.. EgtIf( bDownHead, '_H2', ''), dDiamTool, dElev + dCollSic, nil, bTopHead, bDownHead)
|
||||
if not sPocketing then
|
||||
local sErr = 'Error : pocketing not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- recupero il diametro dell'utensile
|
||||
if EgtMdbSetCurrMachining( sPocketing) then
|
||||
sTuuidMstr = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuidMstr) or '') then
|
||||
dDiamTool = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dDiamTool
|
||||
end
|
||||
end
|
||||
-- inserisco la lavorazione di svuotatura
|
||||
local sName = 'Pock_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. 'F' .. tostring( nFaceRef - 1)
|
||||
local nMchFId = EgtAddMachining( sName, sPocketing)
|
||||
if not nMchFId then
|
||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sPocketing
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- aggiungo geometria
|
||||
EgtSetMachiningGeometry( {{ Proc.Id, (nFaceRef-1)}})
|
||||
-- imposto uso faccia
|
||||
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.ORTHO_CONT)
|
||||
-- imposto posizione braccio porta testa
|
||||
if vtN[nFaceRef]:getY() < GEO.EPS_SMALL then
|
||||
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YM)
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YP)
|
||||
end
|
||||
-- La tasca ha sempre almeno un lato aperto, imposto opportuno attacco
|
||||
EgtSetMachiningParam( MCH_MP.SUBTYPE, MCH_POCK_SUB.SPIRALIN)
|
||||
-- imposto elevazione
|
||||
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dElev, 1))
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
-- provo ad allargare leggermente la tasca
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, -0.1)
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
end
|
||||
end
|
||||
return true, '', sTuuidMstr
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, ptC, vtN, nBigInd, nSmaInd, ptPs, tBHx, b3Raw, nDiffWidth, nUseRoughTool, dAng)
|
||||
|
||||
local sMchFind = 'Pocket'
|
||||
-- se feature é larga come trave imposto openpocket
|
||||
if nDiffWidth == 0 then
|
||||
sMchFind = 'OpenPocket'
|
||||
-- altrimenti se non è passante disabilito il truciolatore
|
||||
else
|
||||
nUseRoughTool = 0
|
||||
end
|
||||
-- applico la svuotatura
|
||||
local bOk, sErr, sTuuidMstr = MakePocket( Proc, nPartId, ptPs, vtN, nBigInd, nDiffWidth, sMchFind, nUseRoughTool, tBHx)
|
||||
if not bOk then
|
||||
return bOk, sErr
|
||||
end
|
||||
-- se angolo tra le facce maggiore di 90, inserisco la contornatura o svuotatura del lato più corto
|
||||
if dAng > -90 then
|
||||
-- applico la svuotatura
|
||||
local bOk, sErr = MakePocket( Proc, nPartId, ptPs, vtN, nSmaInd, nDiffWidth, sMchFind, nUseRoughTool, tBHx)
|
||||
if not bOk then
|
||||
return bOk, sErr
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- Applicazione della lavorazione al caso due facce
|
||||
local function MakeTwoFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
@@ -156,6 +262,7 @@ local function MakeTwoFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
return false, sErr
|
||||
end
|
||||
-- dati delle facce
|
||||
local tBHx = {}
|
||||
local ptC = {}
|
||||
local vtN = {}
|
||||
ptC[1], vtN[1] = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
|
||||
@@ -183,11 +290,13 @@ local function MakeTwoFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
end
|
||||
-- recupero i dati dell'utensile
|
||||
local dSawDiam = 400
|
||||
local dSawThick = 2
|
||||
local dMaxDepth = 0
|
||||
if EgtMdbSetCurrMachining( sCutting) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dSawDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiam
|
||||
dSawThick = EgtTdbGetCurrToolParam( MCH_TP.THICK) or dSawThick
|
||||
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
|
||||
end
|
||||
end
|
||||
@@ -239,47 +348,58 @@ local function MakeTwoFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
vtRef[2] = vtN[2] ^ vtTg
|
||||
if vtRef[2] * vtN[1] < 0 then vtRef[2] = - vtRef[2] end
|
||||
-- determino quale faccia è più grande
|
||||
local _, dB1, dH1 = EgtSurfTmFacetMinAreaRectangle( Proc.Id, 0)
|
||||
local _, dB2, dH2 = EgtSurfTmFacetMinAreaRectangle( Proc.Id, 1)
|
||||
local rfFac1, dB1, dH1 = EgtSurfTmFacetMinAreaRectangle( Proc.Id, 0)
|
||||
local rfFac2, dB2, dH2 = EgtSurfTmFacetMinAreaRectangle( Proc.Id, 1)
|
||||
local nBigInd = EgtIf( dB1 * dH1 >= dB2 * dH2, 1, 2)
|
||||
local nSmaInd = 3 - nBigInd
|
||||
-- calcolo extra taglio
|
||||
local dCutExtra = dExtraUp
|
||||
if dAng < -90.5 and dAng > -179.5 then
|
||||
dCutExtra = - dSawThick / tan( 180 + dAng) + dExtraUp
|
||||
end
|
||||
-- verifico se necessari tagli supplementari
|
||||
local vCuts = DC.GetDice( nAddGrpId, b3Solid, ptC[nBigInd], vtN[nBigInd], false, ptC[nSmaInd], vtN[nSmaInd])
|
||||
--DC.PrintOrderCut( vCuts)
|
||||
if #vCuts > 0 then
|
||||
-- sistemo posizione nel DB e nome
|
||||
for i = 1, #vCuts do
|
||||
for j = 1, #vCuts[i] do
|
||||
EgtSetName( vCuts[i][j], 'AddCut_' .. tostring( Proc.Id))
|
||||
EgtSetInfo( vCuts[i][j], 'TASKID', Proc.TaskId)
|
||||
end
|
||||
end
|
||||
-- eseguo
|
||||
for i = 1, #vCuts do
|
||||
-- assegno il modo di tagliare
|
||||
local vtOrthO = EgtIf( ( i % 2) == 1, vtRef[nSmaInd], vtRef[nBigInd])
|
||||
-- lavoro la faccia
|
||||
for j = 1, #vCuts[i] do
|
||||
local dLocCutExtra = EgtIf( j == #vCuts[i], dCutExtra - dExtraUp, dCutExtra)
|
||||
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthO, nil, dLocCutExtra, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
|
||||
if not bOk then
|
||||
return bOk, sErr
|
||||
end
|
||||
end
|
||||
end
|
||||
-- altrimenti, tagli diretti delle facce
|
||||
else
|
||||
local bOk, sErr = Fbs.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, EgtIf( bHead, 'HeadSide', 'TailSide'))
|
||||
tBHx[1] = {dH1, dV1, rfFac1}
|
||||
tBHx[2] = {dH2, dV2, rfFac2}
|
||||
local nUseRoughTool = EgtGetInfo( Proc.Id, 'Q02', 'i')
|
||||
if nUseRoughTool == 1 and dAng < -0.1 and dAng > -90 then
|
||||
local bOk, sErr = MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, ptC, vtN, nBigInd, nSmaInd, ptPs, tBHx, b3Raw, 0, nUseRoughTool, dAng)
|
||||
if not bOk then
|
||||
return bOk, sErr
|
||||
end
|
||||
else
|
||||
-- calcolo extra taglio
|
||||
local dCutExtra = dExtraUp
|
||||
if dAng < -90.5 and dAng > -179.5 then
|
||||
dCutExtra = - dSawThick / tan( 180 + dAng) + dExtraUp
|
||||
end
|
||||
-- verifico se necessari tagli supplementari
|
||||
local vCuts = DC.GetDice( nAddGrpId, b3Solid, ptC[nBigInd], vtN[nBigInd], false, ptC[nSmaInd], vtN[nSmaInd])
|
||||
--DC.PrintOrderCut( vCuts)
|
||||
if #vCuts > 0 then
|
||||
-- sistemo posizione nel DB e nome
|
||||
for i = 1, #vCuts do
|
||||
for j = 1, #vCuts[i] do
|
||||
EgtSetName( vCuts[i][j], 'AddCut_' .. tostring( Proc.Id))
|
||||
EgtSetInfo( vCuts[i][j], 'TASKID', Proc.TaskId)
|
||||
end
|
||||
end
|
||||
-- eseguo
|
||||
for i = 1, #vCuts do
|
||||
-- assegno il modo di tagliare
|
||||
local vtOrthO = EgtIf( ( i % 2) == 1, vtRef[nSmaInd], vtRef[nBigInd])
|
||||
-- lavoro la faccia
|
||||
for j = 1, #vCuts[i] do
|
||||
local dLocCutExtra = EgtIf( j == #vCuts[i], dCutExtra - dExtraUp, dCutExtra)
|
||||
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthO, nil, dLocCutExtra, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
|
||||
if not bOk then
|
||||
return bOk, sErr
|
||||
end
|
||||
end
|
||||
end
|
||||
-- altrimenti, tagli diretti delle facce
|
||||
else
|
||||
local bOk, sErr = Fbs.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, EgtIf( bHead, 'HeadSide', 'TailSide'))
|
||||
if not bOk then
|
||||
return bOk, sErr
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- eventuale segnalazione ingombro di testa o coda
|
||||
if Proc.Head then
|
||||
local dOffs = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX()
|
||||
|
||||
@@ -1,4 +1,25 @@
|
||||
==== 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
|
||||
|
||||
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)
|
||||
- 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
|
||||
- Fixed : in DtMortise correzione a lavorazione antischeggia
|
||||
- Fixed : in LapJoint, se lavorazione vuota, si disattiva sempre; in Q02 si lavora sempre prima il lato sotto.
|
||||
|
||||
Versione 3.1c2 (18/03/2026)
|
||||
- Added : in LapJoint (solo L030) aggiunto Q02 per fare solo contorno per forme a "C" e tunnel; Q17 spessore di eventuale codolo
|
||||
- Modif : per LapJoint e simili il Q06 per antischeggia ora contempla il valore 3 per scegliere la strategia in automatico (lama o fresa)
|
||||
|
||||
+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
|
||||
|
||||
NAME = 'Beam'
|
||||
VERSION = '3.1c2'
|
||||
VERSION = '3.1e2'
|
||||
MIN_EXE = '3.1b1'
|
||||
|
||||
Reference in New Issue
Block a user