Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ce3fbd9b93 | |||
| fad52a8483 | |||
| e4f448bcf0 | |||
| bf58b58b47 | |||
| 3445fb2525 | |||
| 723713707f | |||
| fd0a52ad6b | |||
| 3e2ae92adc | |||
| c746a11e45 | |||
| d337e4cc18 | |||
| 5fcaf823a0 |
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -362,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
|
||||
@@ -424,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)
|
||||
@@ -537,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
|
||||
@@ -697,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
|
||||
|
||||
+103
-51
@@ -2099,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)
|
||||
|
||||
@@ -2111,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
|
||||
@@ -2136,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
|
||||
@@ -2144,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)
|
||||
@@ -6283,24 +6351,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)
|
||||
@@ -6331,8 +6381,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 = {}
|
||||
@@ -6412,8 +6461,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, ''
|
||||
@@ -6561,32 +6609,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
|
||||
@@ -6664,21 +6719,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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
==== 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
|
||||
|
||||
+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.1d3'
|
||||
VERSION = '3.1e2'
|
||||
MIN_EXE = '3.1b1'
|
||||
|
||||
Reference in New Issue
Block a user