diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index 4fbd954..1de34e8 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -2300,7 +2300,7 @@ function BeamExec.ProcessFeatures() BD.IMPROVE_HEAD_TAIL_DRILLINGS = true end -- costanti per doppio - MIRROR_DRILLINGS_MIN_DISTANCE = 40 + MIRROR_DRILLINGS_MIN_DISTANCE = 25 --TODO spostare la variabile MinDistToolX1X2 nel BeamData e usare quella MIRROR_POCKETS_MIN_DISTANCE = EgtIf( BD.DOWN_HEAD, 35, 50) -- verifica se possibile rotazione di 90 gradi BD.ROT90 = BD.ROT90 and Verify90DegRotation( EgtGetFirstRawPart()) @@ -2555,7 +2555,7 @@ function BeamExec.ProcessFeatures() local nNextRawId = EgtGetNextRawPart( nRawId) if nNextRawId and EgtGetPartInRawPartCount( nNextRawId) == 0 and EgtGetRawPartBBox( nNextRawId):getDimX() < BD.MinRaw then EgtRemoveRawPartFromCurrPhase( nNextRawId) - end + end end nPhase = EgtGetCurrPhase() nDispId = EgtGetPhaseDisposition( nPhase) diff --git a/LuaLibs/BeamLib.lua b/LuaLibs/BeamLib.lua index 92dceda..724a7cc 100644 --- a/LuaLibs/BeamLib.lua +++ b/LuaLibs/BeamLib.lua @@ -1448,7 +1448,7 @@ function BeamLib.GetToolFromMachining( sMachiningName) Tool.Thickness = EgtTdbGetCurrToolParam( MCH_TP.THICK) or 0 Tool.CornerRadius = EgtTdbGetCurrToolParam( MCH_TP.CORNRAD) or 0 -- fresa (TODO al momento aggiunte solo le informazioni che servono) - elseif Tool.Type == MCH_TY.MILL_STD or MCH_TY.MILL_NOTIP then + elseif Tool.Type == MCH_TY.MILL_STD or Tool.Type == MCH_TY.MILL_NOTIP then if BD.GetSetupInfo then Tool.IsOnAggregate = BD.GetSetupInfo( EgtTdbGetCurrToolParam( MCH_TP.HEAD)).bToolOnAggregate else @@ -1459,6 +1459,8 @@ function BeamLib.GetToolFromMachining( sMachiningName) if Tool.StemDiameter > Tool.Diameter + GEO.EPS_SMALL then Tool.MaxDepth = Tool.MaxDepth - BD.COLL_SIC end + elseif Tool.Type == MCH_TY.DRILL_STD or Tool.Type == MCH_TY.DRILL_LONG then + Tool.Length = EgtTdbGetCurrToolParam( MCH_TP.LEN) or 0 -- altri utensili al momento non previsti else error( 'Wrong tool type') diff --git a/LuaLibs/ProcessDrill.lua b/LuaLibs/ProcessDrill.lua index 534392a..bd89452 100644 --- a/LuaLibs/ProcessDrill.lua +++ b/LuaLibs/ProcessDrill.lua @@ -559,7 +559,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) nFac, CosB, vFaces = GetHoleStartData( ptCen, vtExtr, b3Solid) -- Calcolo acciorciamento affondamento utile per evitare collisione portautensile con faccia TgA = CosB / sqrt( 1 - CosB * CosB) - dSubL = ( dDiamTh / 2 + ( Proc.Diam - dToolDiam) / 2 + 4) * TgA + local dSubL = ( dDiamTh / 2 + ( Proc.Diam - dToolDiam) / 2 + 4) * TgA -- Per fori molto inclinati ( < 30 gradi) si usa la testa della macchina per l'accorciamento. Fast esclusa if BD.C_SIMM and CosB > 0.866 then dSubL = ( 190 / 2 + ( Proc.Diam - dToolDiam) / 2 + 4) * TgA - 116 @@ -667,7 +667,13 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) end end else - sUserNotes = EgtSetValInNotes( sUserNotes, 'LastStep', MIRROR_DRILLINGS_MIN_DISTANCE / 2 + 10) + local Tool = BL.GetToolFromMachining( sDrilling) + local dDrillbitTipLength_H1 = dMaxToolLength - Tool.Length + local sNotes = EgtTdbGetCurrToolParam( MCH_TP.USERNOTES) + EgtTdbSetCurrTool( EgtGetValInNotes( sNotes, 'DOUBLE', 's') or Tool.Name) + local dDrillbitTipLength_H2 = ( EgtTdbGetCurrToolParam( MCH_TP.TOTLEN) or 0) - ( EgtTdbGetCurrToolParam( MCH_TP.LEN) or 0) + EgtTdbSetCurrTool( Tool.Name) + sUserNotes = EgtSetValInNotes( sUserNotes, 'LastStep', ( MIRROR_DRILLINGS_MIN_DISTANCE + dDrillbitTipLength_H1 + dDrillbitTipLength_H2 + 10) / 2 + 1) end if dDepth > Proc.MachDepthDouble + 10 * GEO.EPS_SMALL then sMyWarn = 'Warning in double head drilling : depth (' .. EgtNumToString( dDepth, 1) .. ') reduced to (' .. EgtNumToString( Proc.MachDepthDouble, 1) .. ') to match H2 max tool depth'