Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a1ca23acc9 | |||
| 19d8be5c9e | |||
| 41a05b4199 | |||
| ab48827689 | |||
| a859f170aa | |||
| 06f7fdb385 | |||
| 36d0e0c198 | |||
| e1dc521fe5 | |||
| 30fc2ab1a4 | |||
| 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/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.
|
-- 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/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".
|
-- 2023/07/28 Aggiunta gestione del tipo di foratura "Drill_AT".
|
||||||
|
|
||||||
-- Tabella per definizione modulo
|
-- Tabella per definizione modulo
|
||||||
@@ -163,13 +164,15 @@ function VerifyMill( dDepth, sTuuidMstr, dMaxDiam, dMaxTotLen, bH2)
|
|||||||
end
|
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 dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
||||||
local dTMaxDepth = EgtTdbGetCurrToolMaxDepth()
|
local dTMaxDepth = EgtTdbGetCurrToolMaxDepth()
|
||||||
local dTTotLen = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN)
|
local dTTotLen = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN)
|
||||||
if ( not dMaxDiam or dTDiam < dMaxDiam + GEO.EPS_SMALL) and
|
if ( not dMaxDiam or dTDiam < dMaxDiam + GEO.EPS_SMALL) and
|
||||||
( not dDepth or dTMaxDepth > dDepth - 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}
|
return true, { TDiam = dTDiam, TMaxDepth = dTMaxDepth, H2 = bH2}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -187,7 +190,7 @@ function VerifyTool( MachiningType, sType, Params, bH2)
|
|||||||
elseif MachiningType == MCH_MY.MILLING then
|
elseif MachiningType == MCH_MY.MILLING then
|
||||||
return VerifyMill( Params.Depth, Params.TuuidMstr, Params.MaxDiam, Params.MaxTotLen, bH2)
|
return VerifyMill( Params.Depth, Params.TuuidMstr, Params.MaxDiam, Params.MaxTotLen, bH2)
|
||||||
elseif MachiningType == MCH_MY.POCKETING then
|
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
|
elseif MachiningType == MCH_MY.MORTISING then
|
||||||
return true, { H2 = bH2}
|
return true, { H2 = bH2}
|
||||||
else
|
else
|
||||||
@@ -404,8 +407,8 @@ function MachiningLib.FindMilling( sType, dDepth, sTuuidMstr, dMaxDiam, dMaxTotL
|
|||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
function MachiningLib.FindPocketing( sType, dMaxDiam, dDepth, 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}, bTopHead, bDownHead, bExcludeH2, bExcludeH3)
|
return FindMachining( MCH_MY.POCKETING, sType, { MaxDiam = dMaxDiam, Depth = dDepth, MaxTotLen = dMaxTotLen, TuuidMstr = sTuuidMstr}, bTopHead, bDownHead, bExcludeH2, bExcludeH3)
|
||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
-- 2023/06/19 Aggiunti tagli speciali per evitare il rischio che il cubetto rimanga appoggiato al motore.
|
-- 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 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/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
|
-- Tabella per definizione modulo
|
||||||
local ProcessCut = {}
|
local ProcessCut = {}
|
||||||
@@ -249,14 +250,15 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
|||||||
if bFromBottom == nil then
|
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)
|
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
|
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)
|
-- 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
|
local bLongCut = ( not bDownCut and vtN:getZ() > 0.865 and
|
||||||
Proc.Box:getDimY() > b3Solid:getDimY() - 10 * GEO.EPS_SMALL 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
|
-- 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
|
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: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
|
-- se taglio lungo e Q04 = 1 allora lancio il processo dell'L10
|
||||||
local bNoDicing = EgtGetInfo( Proc.Id, 'Q04', 'i') == 1
|
local bNoDicing = EgtGetInfo( Proc.Id, 'Q04', 'i') == 1
|
||||||
if bNoDicing then
|
if bNoDicing then
|
||||||
|
|||||||
+69
-29
@@ -64,6 +64,7 @@
|
|||||||
-- 2023/02/06 Alla MakeDrillOnCorner aggiunto controllo distanza di sicurezza minima.
|
-- 2023/02/06 Alla MakeDrillOnCorner aggiunto controllo distanza di sicurezza minima.
|
||||||
-- 2023/02/16 Piccola correzione alla scelta utensile di svuotatura.
|
-- 2023/02/16 Piccola correzione alla scelta utensile di svuotatura.
|
||||||
-- 2023/02/21 Piccola correzione alla MakeByPocket.
|
-- 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/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/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.
|
-- 2023/16/12 Corretto il recupero dati utensile che, in alcune funzioni, puntava all'utensile errato.
|
||||||
@@ -73,6 +74,7 @@
|
|||||||
-- 2023/08/02 Piccola correzione al calcolo della distanza di sicurezza in base al gambo dell'utensile.
|
-- 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/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/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
|
-- Tabella per definizione modulo
|
||||||
local ProcessLapJoint = {}
|
local ProcessLapJoint = {}
|
||||||
@@ -144,6 +146,7 @@ local function AssignQIdent( Proc)
|
|||||||
Q_SIDE_ROUGH_TOOL = ''
|
Q_SIDE_ROUGH_TOOL = ''
|
||||||
Q_ANTISPLINT_TYPE = ''
|
Q_ANTISPLINT_TYPE = ''
|
||||||
Q_MAX_ELEVATION = 'Q10'
|
Q_MAX_ELEVATION = 'Q10'
|
||||||
|
Q_TOOL_ID = ''
|
||||||
|
|
||||||
if ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 16 then
|
if ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 16 then
|
||||||
Q_FORCE_BLADE = 'Q01' -- i
|
Q_FORCE_BLADE = 'Q01' -- i
|
||||||
@@ -167,10 +170,12 @@ local function AssignQIdent( Proc)
|
|||||||
Q_BLADE_ON_ALONG_FACE = 'Q04' -- i
|
Q_BLADE_ON_ALONG_FACE = 'Q04' -- i
|
||||||
Q_ANTISPLINT_TYPE = 'Q06' -- i
|
Q_ANTISPLINT_TYPE = 'Q06' -- i
|
||||||
Q_DEPTH_CHAMFER = 'Q07' -- d
|
Q_DEPTH_CHAMFER = 'Q07' -- d
|
||||||
|
Q_TOOL_ID = 'Q11' -- i
|
||||||
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 32 then
|
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 32 then
|
||||||
Q_SIDE_ROUGH_TOOL = 'Q01' -- i
|
Q_SIDE_ROUGH_TOOL = 'Q01' -- i
|
||||||
Q_CONTOUR_SMALL_TOOL = 'Q02' -- i
|
Q_CONTOUR_SMALL_TOOL = 'Q02' -- i
|
||||||
Q_ANTISPLINT_TYPE = 'Q06' -- i
|
Q_ANTISPLINT_TYPE = 'Q06' -- i
|
||||||
|
Q_TOOL_ID = 'Q11' -- i
|
||||||
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 33 then
|
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 33 then
|
||||||
Q_ANTISPLINT_TYPE = 'Q06' -- i
|
Q_ANTISPLINT_TYPE = 'Q06' -- i
|
||||||
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 34 then
|
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 34 then
|
||||||
@@ -326,12 +331,15 @@ local function VerifyChainSaw( Proc, dMinDim, dMaxDim)
|
|||||||
end
|
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
|
-- tipo di svuotatura
|
||||||
local sMchFind = EgtIf( sMchFindMaster and #sMchFindMaster > 0, sMchFindMaster, 'Pocket')
|
local sMchFind = EgtIf( sMchFindMaster and #sMchFindMaster > 0, sMchFindMaster, 'Pocket')
|
||||||
-- ricerca della svuotatura
|
-- ricerca della svuotatura
|
||||||
local sPocketing
|
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
|
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.8 * dDepth, dMaxTotLen, bPocketUp, bPocketDown) or
|
||||||
ML.FindPocketing( sMchFind, dDiam, 0.7 * dDepth, dMaxTotLen, bPocketUp, bPocketDown) or
|
ML.FindPocketing( sMchFind, dDiam, 0.7 * dDepth, dMaxTotLen, bPocketUp, bPocketDown) or
|
||||||
@@ -3464,7 +3472,7 @@ local function GetUShapeWidth( Proc, nFacInd)
|
|||||||
end
|
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 nFirstMachId
|
||||||
local bOrthoFaces
|
local bOrthoFaces
|
||||||
@@ -3472,8 +3480,32 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
|||||||
local sMchFind = 'Pocket'
|
local sMchFind = 'Pocket'
|
||||||
local dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, nSurfInt
|
local dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, nSurfInt
|
||||||
local bBadMach = false
|
local bBadMach = false
|
||||||
|
dOvmHead = dOvmHead or 10
|
||||||
|
|
||||||
-- minima altezza della tasca sotto alla quale fa una contornatura invece di una svuotatura
|
-- minima altezza della tasca sotto alla quale fa una contornatura invece di una svuotatura
|
||||||
local dMinFaceElevForPocket = 20
|
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
|
if sMchFindMaster and #sMchFindMaster > 0 then
|
||||||
sMchFind = sMchFindMaster
|
sMchFind = sMchFindMaster
|
||||||
end
|
end
|
||||||
@@ -3492,7 +3524,9 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
|||||||
else
|
else
|
||||||
bOrthoFaces = bOrthoFacesMaster
|
bOrthoFaces = bOrthoFacesMaster
|
||||||
end
|
end
|
||||||
|
local bMakeContour = false
|
||||||
|
local bMakePocket, sPocketing, dMaxDepth, dDiamTool
|
||||||
|
local sMilling
|
||||||
-- se è un tunnel verifico se è possibile usare la svuotatura
|
-- se è un tunnel verifico se è possibile usare la svuotatura
|
||||||
if bOrthoFaces then
|
if bOrthoFaces then
|
||||||
-- ottengo le dimensioni del tunnel
|
-- ottengo le dimensioni del tunnel
|
||||||
@@ -3503,7 +3537,7 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
|||||||
-- se tre facce aumento il diametro di quanto possibile
|
-- se tre facce aumento il diametro di quanto possibile
|
||||||
elseif Proc.Fct == 3 then
|
elseif Proc.Fct == 3 then
|
||||||
local nFacInd = BL.GetFaceWithMostAdj( Proc.Id, nPartId, false)
|
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
|
if dWidth > dDimMin then
|
||||||
dDimMin = min( 2 * dDimMin, dWidth)
|
dDimMin = min( 2 * dDimMin, dWidth)
|
||||||
end
|
end
|
||||||
@@ -3519,10 +3553,10 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
|||||||
-- ricalcolo se è lavorabile da sotto
|
-- ricalcolo se è lavorabile da sotto
|
||||||
bMillDown = ( BD.DOWN_HEAD == true)
|
bMillDown = ( BD.DOWN_HEAD == true)
|
||||||
-- verifico se può essere fatto con svuotatura
|
-- 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
|
local bMakePocketDn, sPocketingDn, dMaxDepthDn, dDiamToolDn
|
||||||
if bMillDown then
|
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
|
-- se è negativo inverto il versore e la faccia
|
||||||
if vtOrtho:getZ() < 0 then
|
if vtOrtho:getZ() < 0 then
|
||||||
vtOrtho = -vtOrtho
|
vtOrtho = -vtOrtho
|
||||||
@@ -3531,11 +3565,9 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
|||||||
end
|
end
|
||||||
local nFacInd, dFacElev = BL.GetFaceWithMostAdj( Proc.Id, nPartId)
|
local nFacInd, dFacElev = BL.GetFaceWithMostAdj( Proc.Id, nPartId)
|
||||||
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nFacInd, GDB_ID.ROOT)
|
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nFacInd, GDB_ID.ROOT)
|
||||||
local bMakeContour = false
|
-- recupero la lavorazione di contornatura
|
||||||
local sMilling
|
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
|
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
|
if not sMilling then
|
||||||
local sMyWarn = 'Warning : Prof not found in library'
|
local sMyWarn = 'Warning : Prof not found in library'
|
||||||
EgtOutLog( sMyWarn)
|
EgtOutLog( sMyWarn)
|
||||||
@@ -3546,8 +3578,8 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
|||||||
if sMilling and EgtMdbSetCurrMachining( sMilling) then
|
if sMilling and EgtMdbSetCurrMachining( sMilling) then
|
||||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||||
dDiamTool = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
dDiamTool = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dDiamTool
|
||||||
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dToolMaxDepth
|
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
|
||||||
bMakeContour = true
|
bMakeContour = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -3702,18 +3734,20 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
|||||||
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.LINEAR)
|
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.LINEAR)
|
||||||
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
|
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.LIPERP, 30)
|
EgtSetMachiningParam( MCH_MP.LIPERP, dMinFaceElevForPocket + 10)
|
||||||
EgtSetMachiningParam( MCH_MP.LOPERP, 30)
|
EgtSetMachiningParam( MCH_MP.LOPERP, dMinFaceElevForPocket + 10)
|
||||||
elseif bIsL then
|
elseif bIsL then
|
||||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, 30)
|
EgtSetMachiningParam( MCH_MP.STARTADDLEN, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dAddWorkWidth)
|
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dAddWorkWidth)
|
||||||
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.TANGENT)
|
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.TANGENT)
|
||||||
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.LINEAR)
|
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.LOTANG, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.LIPERP, 0)
|
EgtSetMachiningParam( MCH_MP.LIPERP, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.LOPERP, 30)
|
EgtSetMachiningParam( MCH_MP.LOPERP, dMinFaceElevForPocket + 10)
|
||||||
end
|
end
|
||||||
|
EgtSetMachiningParam( MCH_MP.TOOLINVERT, false)
|
||||||
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
||||||
end
|
end
|
||||||
-- imposto elevazione e dichiaro non si generano sfridi per VMill
|
-- imposto elevazione e dichiaro non si generano sfridi per VMill
|
||||||
local sNotes = ''
|
local sNotes = ''
|
||||||
@@ -3835,25 +3869,26 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
|||||||
EgtSetMachiningParam( MCH_MP.LIELEV, 0)
|
EgtSetMachiningParam( MCH_MP.LIELEV, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.LOELEV, 0)
|
EgtSetMachiningParam( MCH_MP.LOELEV, 0)
|
||||||
if bIsU then
|
if bIsU then
|
||||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dAddWorkWidth)
|
|
||||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dAddWorkWidth)
|
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dAddWorkWidth)
|
||||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dAddWorkWidth)
|
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dAddWorkWidth)
|
||||||
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.LINEAR)
|
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.LINEAR)
|
||||||
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.LINEAR)
|
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.LINEAR)
|
||||||
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
|
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.LIPERP, 30)
|
EgtSetMachiningParam( MCH_MP.LIPERP, dMinFaceElevForPocket + 10)
|
||||||
EgtSetMachiningParam( MCH_MP.LOPERP, 30)
|
EgtSetMachiningParam( MCH_MP.LOPERP, dMinFaceElevForPocket + 10)
|
||||||
elseif bIsL then
|
elseif bIsL then
|
||||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dAddWorkWidth)
|
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.LEADINTYPE, MCH_MILL_LI.LINEAR)
|
||||||
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.TANGENT)
|
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.TANGENT)
|
||||||
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.LOTANG, 30)
|
EgtSetMachiningParam( MCH_MP.LOTANG, dOvmHead + ( dDiamTool / 2) + 10)
|
||||||
EgtSetMachiningParam( MCH_MP.LIPERP, 30)
|
EgtSetMachiningParam( MCH_MP.LIPERP, dMinFaceElevForPocket + 10)
|
||||||
EgtSetMachiningParam( MCH_MP.LOPERP, 0)
|
EgtSetMachiningParam( MCH_MP.LOPERP, 0)
|
||||||
end
|
end
|
||||||
|
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
|
||||||
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
||||||
end
|
end
|
||||||
-- imposto elevazione e dichiaro non si generano sfridi per VMill
|
-- imposto elevazione e dichiaro non si generano sfridi per VMill
|
||||||
sNotes = ''
|
sNotes = ''
|
||||||
@@ -3874,7 +3909,7 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- se non completo e U, cerco di lavorare anche la faccia di fondo (con il massimo affondamento possibile)
|
-- 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
|
-- recupero la faccia da lavorare
|
||||||
local nFacInd, dFacElev = BL.GetFaceWithMostAdj( Proc.Id, nPartId)
|
local nFacInd, dFacElev = BL.GetFaceWithMostAdj( Proc.Id, nPartId)
|
||||||
local vtN
|
local vtN
|
||||||
@@ -3948,8 +3983,13 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if ( sChosenToolUuid == '') or ( sChosenToolUuid and ( ( bMakeContour and not sMilling) or not sPocketing)) then
|
||||||
return 0, sWarn, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, dDiamTool, bDoubleSide, nPathInt, nSurfInt, bOneShot, bMillDown, nFirstMachId, bOrthoFaces
|
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
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
@@ -5098,7 +5138,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|||||||
-- lavoro con svuotature (singola o doppia contrapposta)
|
-- lavoro con svuotature (singola o doppia contrapposta)
|
||||||
local sMyMchFind = 'Pocket'
|
local sMyMchFind = 'Pocket'
|
||||||
nOk, sErr, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, _, _, _, _, _, _, _,
|
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)
|
-- se lavorazione non idonee ( asse della feature troppo inclinato e impossibile lavorare completamente da due parti)
|
||||||
if nOk == -2 then
|
if nOk == -2 then
|
||||||
if not sMchFind then
|
if not sMchFind then
|
||||||
@@ -5276,7 +5316,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|||||||
bSetOpenBorders = true
|
bSetOpenBorders = true
|
||||||
end
|
end
|
||||||
nOk, sErr, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, dDiamTool, bDoubleSide, nPathInt, nSurfInt, bOneShot, bMillDown, nFirstMachId,
|
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
|
if nOk == -3 then
|
||||||
bTryWithBlades = true
|
bTryWithBlades = true
|
||||||
elseif nOk == -2 then
|
elseif nOk == -2 then
|
||||||
|
|||||||
+2
-4
@@ -1,9 +1,7 @@
|
|||||||
==== Beam Update Log ====
|
==== Beam Update Log ====
|
||||||
|
|
||||||
Versione 2.5h2 (11/08/2023)
|
Versione 2.5i1 (12/09/2023)
|
||||||
- Modif : in LapJoint e Mortise modificata posizione braccio per FAST quando vicino alla coda della trave [Ticket #1339]
|
- Fixed : in LapJoint gestito correttamente il ritorno nil di GetUShapeWidth [Ticket #1354].
|
||||||
- Fixed : corrette forature con aggregato quando lato aperto
|
|
||||||
- Fixed : in RidgeLap corretto ingombro lavorazione in testa e coda quando rivolta verso il basso.
|
|
||||||
|
|
||||||
Versione 2.5h1 (07/08/2023)
|
Versione 2.5h1 (07/08/2023)
|
||||||
- Fixed : tagli doppi di lato non effettuati se macchina tipo PF e pezzo alto [Ticket #1400]
|
- Fixed : tagli doppi di lato non effettuati se macchina tipo PF e pezzo alto [Ticket #1400]
|
||||||
|
|||||||
+1
-1
@@ -2,5 +2,5 @@
|
|||||||
-- Gestione della versione di Beam
|
-- Gestione della versione di Beam
|
||||||
|
|
||||||
NAME = 'Beam'
|
NAME = 'Beam'
|
||||||
VERSION = '2.5h2'
|
VERSION = '2.5i1'
|
||||||
MIN_EXE = '2.5c1'
|
MIN_EXE = '2.5c1'
|
||||||
|
|||||||
Reference in New Issue
Block a user