Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a1ca23acc9 | |||
| 19d8be5c9e | |||
| 41a05b4199 | |||
| ab48827689 | |||
| a859f170aa | |||
| 06f7fdb385 | |||
| 36d0e0c198 | |||
| e1dc521fe5 | |||
| 30fc2ab1a4 | |||
| dacf2c5860 | |||
| abb7735f9d | |||
| 2fb4338d50 | |||
| b0150f5b03 | |||
| 5802f26bbf | |||
| 3be500974a | |||
| 199c327151 | |||
| 5b6ed18a8e | |||
| f34367da55 | |||
| 6665209c66 | |||
| ea7e9dedac | |||
| b7b8f30a8c | |||
| 9ea1c502e8 | |||
| 4a4c5e7349 | |||
| 5f47ce88da | |||
| 8370ef5b3a | |||
| 19edc158c7 | |||
| 041706a04d | |||
| 77cec328a6 | |||
| afef9c54fe | |||
| 83048f2f52 | |||
| 8dce03138e | |||
| ee1c67b006 |
@@ -6,6 +6,7 @@
|
||||
-- 2022/11/25 Per FindMilling implementata la possibilità di escludere la testa H3 dalla ricerca utensile.
|
||||
-- 2022/12/28 Per FindMilling e FindDrilling possibilità di escludere la testa H2 dalla ricerca utensile.
|
||||
-- 2023/01/31 Per FindPocketing implementata la possibilità di escludere le teste H2 o H3 dalla ricerca utensile.
|
||||
-- 2023/03/13 Per FindPocketing implementata la scelta lavorazione da UUID dell'utensile.
|
||||
-- 2023/07/28 Aggiunta gestione del tipo di foratura "Drill_AT".
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -163,13 +164,15 @@ function VerifyMill( dDepth, sTuuidMstr, dMaxDiam, dMaxTotLen, bH2)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function VerifyPocket( dMaxDiam, dDepth, dMaxTotLen, bH2)
|
||||
function VerifyPocket( dMaxDiam, dDepth, dMaxTotLen, sTuuidMstr, bH2)
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
||||
local dTMaxDepth = EgtTdbGetCurrToolMaxDepth()
|
||||
local dTTotLen = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN)
|
||||
if ( not dMaxDiam or dTDiam < dMaxDiam + GEO.EPS_SMALL) and
|
||||
( not dDepth or dTMaxDepth > dDepth - GEO.EPS_SMALL) and
|
||||
( not dMaxTotLen or dTTotLen < dMaxTotLen + GEO.EPS_SMALL) then
|
||||
( not dMaxTotLen or dTTotLen < dMaxTotLen + GEO.EPS_SMALL) and
|
||||
( not sTuuidMstr or sTuuidMstr == sTuuid) then
|
||||
return true, { TDiam = dTDiam, TMaxDepth = dTMaxDepth, H2 = bH2}
|
||||
end
|
||||
end
|
||||
@@ -187,7 +190,7 @@ function VerifyTool( MachiningType, sType, Params, bH2)
|
||||
elseif MachiningType == MCH_MY.MILLING then
|
||||
return VerifyMill( Params.Depth, Params.TuuidMstr, Params.MaxDiam, Params.MaxTotLen, bH2)
|
||||
elseif MachiningType == MCH_MY.POCKETING then
|
||||
return VerifyPocket( Params.MaxDiam, Params.Depth, Params.MaxTotLen, bH2)
|
||||
return VerifyPocket( Params.MaxDiam, Params.Depth, Params.MaxTotLen, Params.TuuidMstr, bH2)
|
||||
elseif MachiningType == MCH_MY.MORTISING then
|
||||
return true, { H2 = bH2}
|
||||
else
|
||||
@@ -404,8 +407,8 @@ function MachiningLib.FindMilling( sType, dDepth, sTuuidMstr, dMaxDiam, dMaxTotL
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function MachiningLib.FindPocketing( sType, dMaxDiam, dDepth, dMaxTotLen, bTopHead, bDownHead, bExcludeH2, bExcludeH3)
|
||||
return FindMachining( MCH_MY.POCKETING, sType, { MaxDiam = dMaxDiam, Depth = dDepth, MaxTotLen = dMaxTotLen}, bTopHead, bDownHead, bExcludeH2, bExcludeH3)
|
||||
function MachiningLib.FindPocketing( sType, dMaxDiam, dDepth, dMaxTotLen, bTopHead, bDownHead, bExcludeH2, bExcludeH3, sTuuidMstr)
|
||||
return FindMachining( MCH_MY.POCKETING, sType, { MaxDiam = dMaxDiam, Depth = dDepth, MaxTotLen = dMaxTotLen, TuuidMstr = sTuuidMstr}, bTopHead, bDownHead, bExcludeH2, bExcludeH3)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
-- 2023/06/19 Aggiunti tagli speciali per evitare il rischio che il cubetto rimanga appoggiato al motore.
|
||||
-- 2023/08/01 Correzione su offset per taglio doppio di lato.
|
||||
-- 2023/08/01 In caso di pezzi alti su macchina tipo PF i tagli doppi di lato non vengono usati, si usa il metodo standard.
|
||||
-- 2023/09/12 In MakeFromTop abbassato a 590 mm il limite per convertire in LongCut.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local ProcessCut = {}
|
||||
@@ -249,14 +250,15 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
||||
if bFromBottom == nil then
|
||||
bFromBottom = ( vtN:getZ() > 0.25 and b3Solid:getDimX() < BD.LEN_SHORT_PART and not Proc.AdvTail and vtN:getX() < 0 and abs( vtN:getY()) < 0.259)
|
||||
end
|
||||
local dMinFeatureLengthForLongCut = 590.000
|
||||
-- verifico se da considerare taglio lungo ( non da sotto, inclinato non più di 30deg, largo come la trave e abbastanza lungo)
|
||||
local bLongCut = ( not bDownCut and vtN:getZ() > 0.865 and
|
||||
Proc.Box:getDimY() > b3Solid:getDimY() - 10 * GEO.EPS_SMALL and
|
||||
( Proc.Box:getDimX() > 0.75 * b3Solid:getDimX() or Proc.Box:getDimX() > 600.000))
|
||||
( Proc.Box:getDimX() > 0.75 * b3Solid:getDimX() or Proc.Box:getDimX() > dMinFeatureLengthForLongCut))
|
||||
-- verifico se da considerare taglio lungo dal lato, solo per macchine tipo PF1250, inclinato non più di 30deg
|
||||
local bLongCutFromSide = ( not bDownCut and ( BD.C_SIMM and BD.DOWN_HEAD and ( abs(vtN:getY()) > 0.865) and
|
||||
Proc.Box:getDimZ() > b3Solid:getDimZ() - 10 * GEO.EPS_SMALL) and
|
||||
( Proc.Box:getDimX() > 0.75 * b3Solid:getDimX() or Proc.Box:getDimX() > 600.000))
|
||||
( Proc.Box:getDimX() > 0.75 * b3Solid:getDimX() or Proc.Box:getDimX() > dMinFeatureLengthForLongCut))
|
||||
-- se taglio lungo e Q04 = 1 allora lancio il processo dell'L10
|
||||
local bNoDicing = EgtGetInfo( Proc.Id, 'Q04', 'i') == 1
|
||||
if bNoDicing then
|
||||
|
||||
@@ -249,7 +249,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
-- verifico possibilità di foratura da sotto
|
||||
local bDownDrill = ( BD.TURN or ( BD.DOWN_HEAD and ML.FindDrilling( dDiam, nil, false, true)))
|
||||
-- se presente rinvio angolare
|
||||
local bDrillAngTrasm = ( BD.ANG_TRASM and AreOppositeVectorApprox( vtExtr, Z_AX()))
|
||||
local bDrillAngTrasm = ( BD.ANG_TRASM and AreOppositeVectorApprox( vtExtr, Z_AX()) and not bOpen)
|
||||
-- verifico che il foro non sia fattibile solo da sotto
|
||||
local bToInvert = ( vtExtr:getZ() < BD.DRILL_VZ_MIN and not bDownDrill) and not bDrillAngTrasm
|
||||
if bToInvert and ( not bOpen or Proc.Flg ~= 1) then
|
||||
|
||||
+92
-39
@@ -1,4 +1,4 @@
|
||||
-- ProcessLapJoint.lua by Egaltech s.r.l. 2023/07/19
|
||||
-- ProcessLapJoint.lua by Egaltech s.r.l. 2023/08/10
|
||||
-- Gestione calcolo mezzo-legno per Travi
|
||||
-- 2019/10/08 Agg. gestione OpenPocket.
|
||||
-- 2021/01/24 Con sega a catena ora sempre impostato asse A.
|
||||
@@ -64,6 +64,7 @@
|
||||
-- 2023/02/06 Alla MakeDrillOnCorner aggiunto controllo distanza di sicurezza minima.
|
||||
-- 2023/02/16 Piccola correzione alla scelta utensile di svuotatura.
|
||||
-- 2023/02/21 Piccola correzione alla MakeByPocket.
|
||||
-- 2023/03/13 In MakeByPocket aggiunto Q11=Tool_ID per forzare la scelta utensile in casi con Q03=2/3.
|
||||
-- 2023/03/31 Correzione al calcolo della distanza di collisione nel caso in cui il gambo sia più piccolo dell'utensile.
|
||||
-- 2023/06/06 Limiti su svuotature tasche a L 4 facce come per L 3 facce. In svuotatura aggiunto recupero UserNotes da libreria per MaxOptSize.
|
||||
-- 2023/16/12 Corretto il recupero dati utensile che, in alcune funzioni, puntava all'utensile errato.
|
||||
@@ -71,6 +72,9 @@
|
||||
-- 2023/07/19 Correzioni e modifiche ad antischeggia con lama (#1351).
|
||||
-- 2023/08/01 Aggiunta gestione rinvio angolare solo per tasche 5 lati, da sotto e perfettamente verticali.
|
||||
-- 2023/08/02 Piccola correzione al calcolo della distanza di sicurezza in base al gambo dell'utensile.
|
||||
-- 2023/08/02 Corretto incremento della profondità pari al raggio utensile per tunnel con sega a catena.
|
||||
-- 2023/08/10 Modificata scelta SCC per tasche in Y+/- in coda o quasi (anche per relativi antischeggia con lama).
|
||||
-- 2023/09/12 In MakeByPockets gestito correttamente il ritorno nil di GetUShapeWidth.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local ProcessLapJoint = {}
|
||||
@@ -142,6 +146,7 @@ local function AssignQIdent( Proc)
|
||||
Q_SIDE_ROUGH_TOOL = ''
|
||||
Q_ANTISPLINT_TYPE = ''
|
||||
Q_MAX_ELEVATION = 'Q10'
|
||||
Q_TOOL_ID = ''
|
||||
|
||||
if ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 16 then
|
||||
Q_FORCE_BLADE = 'Q01' -- i
|
||||
@@ -165,10 +170,12 @@ local function AssignQIdent( Proc)
|
||||
Q_BLADE_ON_ALONG_FACE = 'Q04' -- i
|
||||
Q_ANTISPLINT_TYPE = 'Q06' -- i
|
||||
Q_DEPTH_CHAMFER = 'Q07' -- d
|
||||
Q_TOOL_ID = 'Q11' -- i
|
||||
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 32 then
|
||||
Q_SIDE_ROUGH_TOOL = 'Q01' -- i
|
||||
Q_CONTOUR_SMALL_TOOL = 'Q02' -- i
|
||||
Q_ANTISPLINT_TYPE = 'Q06' -- i
|
||||
Q_TOOL_ID = 'Q11' -- i
|
||||
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 33 then
|
||||
Q_ANTISPLINT_TYPE = 'Q06' -- i
|
||||
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 34 then
|
||||
@@ -324,12 +331,15 @@ local function VerifyChainSaw( Proc, dMinDim, dMaxDim)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function VerifyPocket( Proc, dDiam, dDepth, dMaxTotLen, sMchFindMaster, bPocketUp, bPocketDown)
|
||||
local function VerifyPocket( Proc, dDiam, dDepth, dMaxTotLen, sMchFindMaster, bPocketUp, bPocketDown, sChosenToolUuid)
|
||||
-- tipo di svuotatura
|
||||
local sMchFind = EgtIf( sMchFindMaster and #sMchFindMaster > 0, sMchFindMaster, 'Pocket')
|
||||
-- ricerca della svuotatura
|
||||
local sPocketing
|
||||
if dDepth then
|
||||
-- se viene specificato un utensile non guardo altro
|
||||
if sChosenToolUuid then
|
||||
sPocketing = ML.FindPocketing( sMchFind, dDiam, 0, dMaxTotLen, bPocketUp, bPocketDown, nil, nil, sChosenToolUuid)
|
||||
elseif dDepth then
|
||||
sPocketing = ML.FindPocketing( sMchFind, dDiam, dDepth, dMaxTotLen, bPocketUp, bPocketDown) or
|
||||
ML.FindPocketing( sMchFind, dDiam, 0.8 * dDepth, dMaxTotLen, bPocketUp, bPocketDown) or
|
||||
ML.FindPocketing( sMchFind, dDiam, 0.7 * dDepth, dMaxTotLen, bPocketUp, bPocketDown) or
|
||||
@@ -3172,7 +3182,10 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin
|
||||
if AreSameVectorApprox( tvtN[2], Z_AX()) then
|
||||
nSCC = MCH_SCC.ADIR_YM
|
||||
elseif abs( tvtN[2]:getX()) < 0.1 then
|
||||
nSCC = EgtIf( BL.IsPartFinalPhase( EgtGetCurrPhase()), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
|
||||
local bNearTail = ( Proc.Box:getMax():getX() < b3Solid:getCenter():getX() + 50 and
|
||||
Proc.Box:getMax():getX() - b3Solid:getMin():getX() < 1000)
|
||||
local bVeryShortPart = ( BD.LEN_VERY_SHORT_PART and b3Solid:getDimX() < BD.LEN_VERY_SHORT_PART)
|
||||
nSCC = EgtIf( BL.IsPartFinalPhase( EgtGetCurrPhase()) or ( bNearTail and not bVeryShortPart), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
|
||||
elseif tvtN[2]:getY() > 0.1 then
|
||||
nSCC = MCH_SCC.ADIR_YP
|
||||
end
|
||||
@@ -3459,7 +3472,7 @@ local function GetUShapeWidth( Proc, nFacInd)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMchFindMaster, bIs3Faces, b3Solid, bOrthoFacesMaster, bMillDown, bSetOpenBorders, bIsU, bIsL)
|
||||
local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMchFindMaster, bIs3Faces, b3Solid, bOrthoFacesMaster, bMillDown, bSetOpenBorders, bIsU, bIsL, dOvmHead)
|
||||
|
||||
local nFirstMachId
|
||||
local bOrthoFaces
|
||||
@@ -3467,8 +3480,32 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
||||
local sMchFind = 'Pocket'
|
||||
local dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, nSurfInt
|
||||
local bBadMach = false
|
||||
dOvmHead = dOvmHead or 10
|
||||
|
||||
-- minima altezza della tasca sotto alla quale fa una contornatura invece di una svuotatura
|
||||
local dMinFaceElevForPocket = 20
|
||||
|
||||
-- se l'utente forza un utensile e la lavorazione è forzata dal lato modifico la minima altezza della tasca
|
||||
local sChosenToolUuid
|
||||
if ( ( EgtGetInfo( Proc.Id, Q_TOOL_ID, 'i') or 0) > 0 and ( EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') or 0) > 1) then
|
||||
local nChosenToolUuid = EgtGetInfo( Proc.Id, Q_TOOL_ID, 'i')
|
||||
local sToolName = EgtTdbGetFirstTool( MCH_TF.MILL)
|
||||
while sToolName ~= '' do
|
||||
EgtTdbSetCurrTool( sToolName)
|
||||
local nToolId = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'Tool_ID', 'i')
|
||||
local bIsToolActive = EgtTdbGetCurrToolParam( MCH_TP.ACTIVE)
|
||||
if ( ( nChosenToolUuid == nToolId) and bIsToolActive) then break end
|
||||
sToolName = EgtTdbGetNextTool( MCH_TF.MILL)
|
||||
end
|
||||
if sToolName == '' then
|
||||
sChosenToolUuid = ''
|
||||
else
|
||||
local dChosenToolDiameter = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
||||
dMinFaceElevForPocket = dChosenToolDiameter / 2 + 10 * GEO.EPS_SMALL
|
||||
sChosenToolUuid = EgtTdbGetCurrToolParam( MCH_TP.UUID)
|
||||
end
|
||||
end
|
||||
|
||||
if sMchFindMaster and #sMchFindMaster > 0 then
|
||||
sMchFind = sMchFindMaster
|
||||
end
|
||||
@@ -3487,7 +3524,9 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
||||
else
|
||||
bOrthoFaces = bOrthoFacesMaster
|
||||
end
|
||||
|
||||
local bMakeContour = false
|
||||
local bMakePocket, sPocketing, dMaxDepth, dDiamTool
|
||||
local sMilling
|
||||
-- se è un tunnel verifico se è possibile usare la svuotatura
|
||||
if bOrthoFaces then
|
||||
-- ottengo le dimensioni del tunnel
|
||||
@@ -3498,7 +3537,7 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
||||
-- se tre facce aumento il diametro di quanto possibile
|
||||
elseif Proc.Fct == 3 then
|
||||
local nFacInd = BL.GetFaceWithMostAdj( Proc.Id, nPartId, false)
|
||||
local dWidth = GetUShapeWidth( Proc, nFacInd or -1)
|
||||
local dWidth = GetUShapeWidth( Proc, nFacInd or -1) or dDimMin
|
||||
if dWidth > dDimMin then
|
||||
dDimMin = min( 2 * dDimMin, dWidth)
|
||||
end
|
||||
@@ -3514,10 +3553,10 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
||||
-- ricalcolo se è lavorabile da sotto
|
||||
bMillDown = ( BD.DOWN_HEAD == true)
|
||||
-- verifico se può essere fatto con svuotatura
|
||||
local bMakePocket, sPocketing, dMaxDepth, dDiamTool = VerifyPocket( Proc, dDimMin, dDepth / 2, nil, sMchFind)
|
||||
bMakePocket, sPocketing, dMaxDepth, dDiamTool = VerifyPocket( Proc, dDimMin, dDepth / 2, nil, sMchFind, nil, nil, sChosenToolUuid)
|
||||
local bMakePocketDn, sPocketingDn, dMaxDepthDn, dDiamToolDn
|
||||
if bMillDown then
|
||||
bMakePocketDn, sPocketingDn, dMaxDepthDn, dDiamToolDn = VerifyPocket( Proc, dDimMin, dDepth / 2, nil, sMchFind, nil, true)
|
||||
bMakePocketDn, sPocketingDn, dMaxDepthDn, dDiamToolDn = VerifyPocket( Proc, dDimMin, dDepth / 2, nil, sMchFind, nil, true, sChosenToolUuid)
|
||||
-- se è negativo inverto il versore e la faccia
|
||||
if vtOrtho:getZ() < 0 then
|
||||
vtOrtho = -vtOrtho
|
||||
@@ -3526,11 +3565,9 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
||||
end
|
||||
local nFacInd, dFacElev = BL.GetFaceWithMostAdj( Proc.Id, nPartId)
|
||||
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nFacInd, GDB_ID.ROOT)
|
||||
local bMakeContour = false
|
||||
local sMilling
|
||||
-- recupero la lavorazione di contornatura
|
||||
sMilling = ML.FindMilling( 'Prof', nil, sChosenToolUuid)
|
||||
if dFacElev < dMinFaceElevForPocket and ( bIsU or bIsL) and ( Proc.Fct == 2 or Proc.Fct == 3) and abs( vtN:getZ()) > 0.996 then
|
||||
-- recupero la lavorazione di contornatura
|
||||
sMilling = ML.FindMilling( 'Prof', nil, nil, nil, nil, not bMillDown, bMillDown)
|
||||
if not sMilling then
|
||||
local sMyWarn = 'Warning : Prof not found in library'
|
||||
EgtOutLog( sMyWarn)
|
||||
@@ -3541,8 +3578,8 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
||||
if sMilling and EgtMdbSetCurrMachining( sMilling) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dDiamTool = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
||||
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dToolMaxDepth
|
||||
dDiamTool = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dDiamTool
|
||||
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
|
||||
bMakeContour = true
|
||||
end
|
||||
end
|
||||
@@ -3697,18 +3734,20 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
||||
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.LINEAR)
|
||||
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
||||
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
|
||||
EgtSetMachiningParam( MCH_MP.LIPERP, 30)
|
||||
EgtSetMachiningParam( MCH_MP.LOPERP, 30)
|
||||
EgtSetMachiningParam( MCH_MP.LIPERP, dMinFaceElevForPocket + 10)
|
||||
EgtSetMachiningParam( MCH_MP.LOPERP, dMinFaceElevForPocket + 10)
|
||||
elseif bIsL then
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, 30)
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, 0)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dAddWorkWidth)
|
||||
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.TANGENT)
|
||||
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.LINEAR)
|
||||
EgtSetMachiningParam( MCH_MP.LITANG, 30)
|
||||
EgtSetMachiningParam( MCH_MP.LITANG, dOvmHead + ( dDiamTool / 2) + 10)
|
||||
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
|
||||
EgtSetMachiningParam( MCH_MP.LIPERP, 0)
|
||||
EgtSetMachiningParam( MCH_MP.LOPERP, 30)
|
||||
EgtSetMachiningParam( MCH_MP.LOPERP, dMinFaceElevForPocket + 10)
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, false)
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
||||
end
|
||||
-- imposto elevazione e dichiaro non si generano sfridi per VMill
|
||||
local sNotes = ''
|
||||
@@ -3830,25 +3869,26 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
||||
EgtSetMachiningParam( MCH_MP.LIELEV, 0)
|
||||
EgtSetMachiningParam( MCH_MP.LOELEV, 0)
|
||||
if bIsU then
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dAddWorkWidth)
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dAddWorkWidth)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dAddWorkWidth)
|
||||
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.LINEAR)
|
||||
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.LINEAR)
|
||||
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
||||
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
|
||||
EgtSetMachiningParam( MCH_MP.LIPERP, 30)
|
||||
EgtSetMachiningParam( MCH_MP.LOPERP, 30)
|
||||
EgtSetMachiningParam( MCH_MP.LIPERP, dMinFaceElevForPocket + 10)
|
||||
EgtSetMachiningParam( MCH_MP.LOPERP, dMinFaceElevForPocket + 10)
|
||||
elseif bIsL then
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dAddWorkWidth)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, 30)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, 0)
|
||||
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.LINEAR)
|
||||
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.TANGENT)
|
||||
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
||||
EgtSetMachiningParam( MCH_MP.LOTANG, 30)
|
||||
EgtSetMachiningParam( MCH_MP.LIPERP, 30)
|
||||
EgtSetMachiningParam( MCH_MP.LOTANG, dOvmHead + ( dDiamTool / 2) + 10)
|
||||
EgtSetMachiningParam( MCH_MP.LIPERP, dMinFaceElevForPocket + 10)
|
||||
EgtSetMachiningParam( MCH_MP.LOPERP, 0)
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
||||
end
|
||||
-- imposto elevazione e dichiaro non si generano sfridi per VMill
|
||||
sNotes = ''
|
||||
@@ -3869,7 +3909,7 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
||||
end
|
||||
end
|
||||
-- se non completo e U, cerco di lavorare anche la faccia di fondo (con il massimo affondamento possibile)
|
||||
if not bComplete and bIs3Faces then
|
||||
if not bComplete and bIs3Faces and not bMakeContour then
|
||||
-- recupero la faccia da lavorare
|
||||
local nFacInd, dFacElev = BL.GetFaceWithMostAdj( Proc.Id, nPartId)
|
||||
local vtN
|
||||
@@ -3943,12 +3983,17 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return 0, sWarn, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, dDiamTool, bDoubleSide, nPathInt, nSurfInt, bOneShot, bMillDown, nFirstMachId, bOrthoFaces
|
||||
if ( sChosenToolUuid == '') or ( sChosenToolUuid and ( ( bMakeContour and not sMilling) or not sPocketing)) then
|
||||
local sErr = 'Error : no machining found with chosen Tool_ID'
|
||||
EgtOutLog( sErr)
|
||||
return -1, sErr
|
||||
else
|
||||
return 0, sWarn, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, dDiamTool, bDoubleSide, nPathInt, nSurfInt, bOneShot, bMillDown, nFirstMachId, bOrthoFaces
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function ManageAntiSplintBySaw( Proc, b3Raw, bIsU, vtN, nFacInd, sWarn, bMillDown, bReduceDepth)
|
||||
local function ManageAntiSplintBySaw( Proc, b3Raw, b3Solid, bIsU, vtN, nFacInd, sWarn, bMillDown, bReduceDepth)
|
||||
|
||||
local bMadeASbyBld = false
|
||||
local nNumFac = EgtIf( bIsU, 2, 1)
|
||||
@@ -3988,9 +4033,18 @@ local function ManageAntiSplintBySaw( Proc, b3Raw, bIsU, vtN, nFacInd, sWarn, bM
|
||||
if abs( vtN:getZ()) > 0.63 or abs( vtN:getY()) > 0.63 then
|
||||
-- se superficie principale parallela al piano XZ
|
||||
if nPrefSide == 0 then
|
||||
-- se facce praticamente verticali || mandrino a destra
|
||||
-- se facce praticamente verticali ||
|
||||
if abs( vtNFc:getZ()) < 0.1 then
|
||||
nPrefSide = 2
|
||||
-- se FAST, mandrino a destra o sinistra come svuotatura
|
||||
if not BD.C_SIMM and not BD.TURN then
|
||||
local bNearTail = ( Proc.Box:getMax():getX() < b3Solid:getCenter():getX() + 50 and
|
||||
Proc.Box:getMax():getX() - b3Solid:getMin():getX() < 1000)
|
||||
local bVeryShortPart = ( BD.LEN_VERY_SHORT_PART and b3Solid:getDimX() < BD.LEN_VERY_SHORT_PART)
|
||||
nPrefSide = EgtIf( BL.IsPartFinalPhase( EgtGetCurrPhase()) or ( bNearTail and not bVeryShortPart), 1, 2)
|
||||
-- altrimenti sempre a destra
|
||||
else
|
||||
nPrefSide = 2
|
||||
end
|
||||
-- se facce inclinate \\ allora mandrino a destra (per essere verso l'alto)
|
||||
elseif vtNFc:getX() * vtNFc:getZ() > 0 then
|
||||
nPrefSide = 2
|
||||
@@ -4597,13 +4651,12 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
dDepth = dDepth / 2 + BD.CUT_EXTRA
|
||||
end
|
||||
end
|
||||
local dWorkDepth = dDepth
|
||||
-- cerco di estendere il taglio considerando la parte arrotondata della lama + 1
|
||||
local dWorkDepth = dMaxMat
|
||||
-- cerco di estendere il taglio considerando la parte arrotondata della lama
|
||||
if dMaxMat > dDepth + dSawCornerRad + 1 then
|
||||
dWorkDepth = dDepth + dSawCornerRad + 1
|
||||
-- se massimo affondamento utensile inferiore alla profondità da lavorare, setto la profondità di lavoro e emetto warning
|
||||
elseif dMaxMat < dDepth then
|
||||
dWorkDepth = dMaxMat
|
||||
sWarn = 'Warning : elevation bigger than max tool depth'
|
||||
EgtOutLog( sWarn)
|
||||
end
|
||||
@@ -5085,7 +5138,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
-- lavoro con svuotature (singola o doppia contrapposta)
|
||||
local sMyMchFind = 'Pocket'
|
||||
nOk, sErr, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, _, _, _, _, _, _, _,
|
||||
bOrthoFaces = MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMyMchFind, true, b3Solid, nil, bMillDown)
|
||||
bOrthoFaces = MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMyMchFind, true, b3Solid, nil, bMillDown, bSetOpenBorders, bIsU, bIsL, dOvmHead)
|
||||
-- se lavorazione non idonee ( asse della feature troppo inclinato e impossibile lavorare completamente da due parti)
|
||||
if nOk == -2 then
|
||||
if not sMchFind then
|
||||
@@ -5152,7 +5205,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
if nChamfer < 2 and nQAntisplintResult == 1 and (( bIsU or bIsL) and ( bPassThrou or bPassEdge)) and ( vtNOri:getZ() > -0.087 or BD.DOWN_HEAD or BD.TURN) then
|
||||
local bOk
|
||||
local bSawDown = ( bMillDown and not bMillUp)
|
||||
bMadeASbyBld, bOk, sWarn = ManageAntiSplintBySaw( Proc, b3Raw, bIsU, vtNOri, nFacIndOri, sWarn, bSawDown, true)
|
||||
bMadeASbyBld, bOk, sWarn = ManageAntiSplintBySaw( Proc, b3Raw, b3Solid, bIsU, vtNOri, nFacIndOri, sWarn, bSawDown, true)
|
||||
if not bOk then return false, sWarn end
|
||||
end
|
||||
-- in base al flag interno e al numero di facce e se ha forma ad U
|
||||
@@ -5263,7 +5316,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
bSetOpenBorders = true
|
||||
end
|
||||
nOk, sErr, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, dDiamTool, bDoubleSide, nPathInt, nSurfInt, bOneShot, bMillDown, nFirstMachId,
|
||||
bOrthoFaces = MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMyMchFind, bIs3Faces, b3Solid, bOrthoFacesMaster, bMillDown, bSetOpenBorders, bIsU, bIsL)
|
||||
bOrthoFaces = MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCham, nAddGrpId, sMyMchFind, bIs3Faces, b3Solid, bOrthoFacesMaster, bMillDown, bSetOpenBorders, bIsU, bIsL, dOvmHead)
|
||||
if nOk == -3 then
|
||||
bTryWithBlades = true
|
||||
elseif nOk == -2 then
|
||||
@@ -5391,7 +5444,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
if nChamfer < 2 and nQAntisplintResult == 1 and (( bIsU or bIsL) and ( bPassThrou or bPassEdge)) and ( vtNOri:getZ() > -0.087 or BD.DOWN_HEAD or BD.TURN) then
|
||||
local bOk
|
||||
local bSawDown = ( bMillDown and not bMillUp)
|
||||
bMadeASbyBld, bOk, sWarn = ManageAntiSplintBySaw( Proc, b3Raw, bIsU, vtNOri, nFacIndOri, sWarn, bSawDown)
|
||||
bMadeASbyBld, bOk, sWarn = ManageAntiSplintBySaw( Proc, b3Raw, b3Solid, bIsU, vtNOri, nFacIndOri, sWarn, bSawDown)
|
||||
if not bOk then return false, sWarn end
|
||||
end
|
||||
if nChamfer < 2 and nQAntisplintResult == 2 then
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- ProcessMortise.lua by Egaltech s.r.l. 2023/07/21
|
||||
-- ProcessMortise.lua by Egaltech s.r.l. 2023/08/10
|
||||
-- Gestione calcolo mortase per Travi
|
||||
-- 2021/07/20 Aggiunta gestione rinvio angolare su FAST.
|
||||
-- 2021/12/01 Se frontale aggiungo taglio con Grp e Proc di vero taglio (per aggiornare ingombro di testa /coda).
|
||||
@@ -12,6 +12,7 @@
|
||||
-- 2023/05/11 Se lavorazione in doppio e precedente no oppure di tipo diverso, forzo risalita a Zmax.
|
||||
-- 2023/06/27 Esclusa la ricerca lati aperti per le mortase passanti, per le quali il contorno finisce sulla faccia e il riconoscimento sbaglia.
|
||||
-- 2023/07/21 Correzioni per mortise passanti con curva Aux che guarda in basso.
|
||||
-- 2023/08/10 Modificata scelta SCC per tasche in Y+/- in coda o quasi.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local ProcessMortise = {}
|
||||
@@ -469,11 +470,14 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
local nSCC = MCH_SCC.NONE
|
||||
if bPockAngTrasm then
|
||||
nSCC = MCH_SCC.ADIR_NEAR
|
||||
elseif not BD.C_SIMM then
|
||||
if abs( vtN:getX()) < GEO.EPS_SMALL and abs( vtN:getY()) < GEO.EPS_SMALL then
|
||||
elseif not BD.C_SIMM and not BD.TURN then
|
||||
if AreSameOrOppositeVectorApprox( vtN, Z_AX()) then
|
||||
nSCC = MCH_SCC.ADIR_YM
|
||||
elseif abs( vtN:getX()) < GEO.EPS_SMALL then
|
||||
nSCC = MCH_SCC.ADIR_XP
|
||||
elseif abs( vtN:getX()) < 0.1 then
|
||||
local bNearTail = ( Proc.Box:getMax():getX() < b3Solid:getCenter():getX() and
|
||||
Proc.Box:getMax():getX() - b3Solid:getMin():getX() < 1000)
|
||||
local bVeryShortPart = ( BD.LEN_VERY_SHORT_PART and b3Solid:getDimX() < BD.LEN_VERY_SHORT_PART)
|
||||
nSCC = EgtIf( BL.IsPartFinalPhase( EgtGetCurrPhase()) or ( bNearTail and not bVeryShortPart), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
|
||||
elseif vtN:getY() < GEO.EPS_SMALL then
|
||||
nSCC = EgtIf( bRevertSide, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
|
||||
else
|
||||
@@ -551,11 +555,14 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, EgtIf( bCW, true, false))
|
||||
-- imposto posizione braccio porta testa
|
||||
local nSCC = MCH_SCC.NONE
|
||||
if not BD.C_SIMM then
|
||||
if abs( vtN:getX()) < GEO.EPS_SMALL and abs( vtN:getY()) < GEO.EPS_SMALL then
|
||||
if not BD.C_SIMM and not BD.TURN then
|
||||
if AreSameOrOppositeVectorApprox( vtN, Z_AX()) then
|
||||
nSCC = MCH_SCC.ADIR_YM
|
||||
elseif abs( vtN:getX()) < GEO.EPS_SMALL then
|
||||
nSCC = MCH_SCC.ADIR_XP
|
||||
elseif abs( vtN:getX()) < 0.1 then
|
||||
local bNearTail = ( Proc.Box:getMax():getX() < b3Solid:getCenter():getX() and
|
||||
Proc.Box:getMax():getX() - b3Solid:getMin():getX() < 1000)
|
||||
local bVeryShortPart = ( BD.LEN_VERY_SHORT_PART and b3Solid:getDimX() < BD.LEN_VERY_SHORT_PART)
|
||||
nSCC = EgtIf( BL.IsPartFinalPhase( EgtGetCurrPhase()) or ( bNearTail and not bVeryShortPart), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
|
||||
elseif vtN:getY() < GEO.EPS_SMALL then
|
||||
nSCC = MCH_SCC.ADIR_YP
|
||||
else
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- ProcessRidgeLap.lua by Egaltech s.r.l. 2023/05/18
|
||||
-- ProcessRidgeLap.lua by Egaltech s.r.l. 2023/08/10
|
||||
-- Gestione calcolo mezzolegno di testa per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -195,7 +195,7 @@ function ProcessRidgeLap.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
-- aggiornamento ingombro di testa o coda
|
||||
if Proc.Head then
|
||||
local dHCI = 0
|
||||
if abs( vtN[vFaceOrd[3]]:getZ()) > 0.1 then
|
||||
if vtN[vFaceOrd[3]]:getZ() > 0.1 then
|
||||
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
|
||||
if b3Fac1 then dHCI = b3Raw:getMax():getX() - dOvmHead - b3Fac1:getMin():getX() end
|
||||
else
|
||||
@@ -204,7 +204,7 @@ function ProcessRidgeLap.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
BL.UpdateHCING( nRawId, dHCI)
|
||||
elseif Proc.Tail then
|
||||
local dTCI = 0
|
||||
if abs( vtN[vFaceOrd[3]]:getZ()) > 0.1 then
|
||||
if vtN[vFaceOrd[3]]:getZ() > 0.1 then
|
||||
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
|
||||
if b3Fac1 then dTCI = b3Fac1:getMax():getX() - b3Solid:getMin():getX() end
|
||||
else
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
==== Beam Update Log ====
|
||||
|
||||
Versione 2.5i1 (12/09/2023)
|
||||
- Fixed : in LapJoint gestito correttamente il ritorno nil di GetUShapeWidth [Ticket #1354].
|
||||
|
||||
Versione 2.5h1 (07/08/2023)
|
||||
- Fixed : tagli doppi di lato non effettuati se macchina tipo PF e pezzo alto [Ticket #1400]
|
||||
- Fixed : in split e headcut corretto calcolo allungamenti/accorciamenti pezzi alti per contemplare anche taglio singolo [Ticket #1227]
|
||||
- Fixed : in lapjoint piccola correzione al calcolo della distanza di sicurezza in base al gambo dell'utensile [Ticket #1227]
|
||||
- Fixed : in Lapjoint corretto incremento della profondità pari al raggio utensile per tunnel con sega a catena [Ticket #1212]
|
||||
|
||||
Versione 2.5g3 (01/08/2023)
|
||||
- Added : aggiunta gestione tasche chiuse ad orientamento verticale con rinvio angolare [Ticket #1333]
|
||||
- Modif : in LongCut ammesso uso lama da sotto fino a Norm +3deg in verticale
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
-- Version.lua by Egaltech s.r.l. 2023/08/01
|
||||
-- Version.lua by Egaltech s.r.l. 2023/08/10
|
||||
-- Gestione della versione di Beam
|
||||
|
||||
NAME = 'Beam'
|
||||
VERSION = '2.5g3'
|
||||
VERSION = '2.5i1'
|
||||
MIN_EXE = '2.5c1'
|
||||
|
||||
Reference in New Issue
Block a user