Compare commits
128 Commits
Ticket#2050
...
2.7d3
| Author | SHA1 | Date | |
|---|---|---|---|
| a34147ce15 | |||
| 06e266226a | |||
| 74b40a6ad7 | |||
| ab7971e5f9 | |||
| e188753f49 | |||
| 9b12a74591 | |||
| e17e8189f7 | |||
| a5d4503180 | |||
| 41f92e9dd4 | |||
| c5a6300d15 | |||
| bf5c12ec8a | |||
| 777ba74e4d | |||
| 268e578125 | |||
| 13f0545ebe | |||
| 445a76f543 | |||
| 4b52653a2e | |||
| ced290604a | |||
| 2c68515b93 | |||
| b26ad523ab | |||
| cd346b8536 | |||
| 2853731c4c | |||
| d31efb1f2a | |||
| e1702d1263 | |||
| 236254fed6 | |||
| 82f20f3c87 | |||
| adc75c0504 | |||
| 761778b87c | |||
| 5fa40fad99 | |||
| 8e608bd623 | |||
| 60a1707d43 | |||
| 1848ed85d0 | |||
| 197673de11 | |||
| 19e1d4e760 | |||
| abb1509314 | |||
| b9e4d9b01f | |||
| fcb541175a | |||
| 99e0b9967e | |||
| b88caa12ab | |||
| 40912bb7b7 | |||
| 7d6903d181 | |||
| 43cf75d400 | |||
| 2fa3ea24a5 | |||
| c82a27ebae | |||
| a7df54d8d2 | |||
| e8d11f150e | |||
| 6d8bd01266 | |||
| 65a256ba7b | |||
| d403f9cfcf | |||
| 30cc274c2e | |||
| 6564bdc74f | |||
| 6cdf1583c0 | |||
| 5441ff7b50 | |||
| d03ed02b2c | |||
| 8c4000a74c | |||
| 4c48085e4f | |||
| 37265932e9 | |||
| 8f602fc10a | |||
| f7ef38162b | |||
| 1bc17e7bb7 | |||
| 4d545c38ea | |||
| 83b9b3858d | |||
| 0de82a5fd9 | |||
| 8dc16e1ed9 | |||
| 4500f96d6d | |||
| a9921f9b17 | |||
| 8c4f0e15de | |||
| 46802be7d8 | |||
| 0a77cc2e12 | |||
| 6d07e1638b | |||
| 09d3df0fe1 | |||
| 838671d968 | |||
| f286f50855 | |||
| ff2dff29ee | |||
| 28cdaff2d0 | |||
| 3c4d299c58 | |||
| f388cf47f3 | |||
| 38b1eba03e | |||
| 6caa4fb6b5 | |||
| c1b781c142 | |||
| c219a6842b | |||
| 677ff492e7 | |||
| e4ba021482 | |||
| 24218e8d8c | |||
| 739311a02b | |||
| 61ef5dd9ed | |||
| aed21e027c | |||
| 1c64f500b3 | |||
| 542c421ac8 | |||
| 95e6f49e4f | |||
| 4c19cc49e2 | |||
| 74681a1f1d | |||
| d7b88e738f | |||
| d4c9843597 | |||
| 077cb2c586 | |||
| 8e9de6026e | |||
| b382560cfa | |||
| 339c6acb37 | |||
| 570a65c7a1 | |||
| e18a816647 | |||
| d578194d43 | |||
| e0f20d19f0 | |||
| cff4ef0d47 | |||
| d9fb464066 | |||
| 9d6a5fb496 | |||
| c3fab404a5 | |||
| fa139c84f3 | |||
| ae6853cd3f | |||
| c0618cd628 | |||
| 524b6a470c | |||
| cd4aa8ee11 | |||
| 242f5f4516 | |||
| e6a3e0c519 | |||
| 640c8af05f | |||
| 48ceceb8e0 | |||
| 5165463dbd | |||
| 9e1d424bc7 | |||
| 15c96303de | |||
| 3211f21869 | |||
| 1f4fe3597b | |||
| 0749e56b9f | |||
| 7424bdc147 | |||
| a623072e89 | |||
| 7f15b08b20 | |||
| 82d4fadaaa | |||
| d9f4d0584a | |||
| 8b1d38c451 | |||
| abe3465514 | |||
| fc753c47be |
+60
-6
@@ -101,6 +101,21 @@ local function WriteTimeToLogFile( dTime)
|
||||
hFile:close()
|
||||
end
|
||||
|
||||
-- Funzioni per riportare stato lavorazione o pezzo in nge
|
||||
local function WriteErrToNge( nProcId, sErr, sMsg, sRot, sCutId, sTaskId)
|
||||
EgtSetInfo( nProcId, 'STATUS.ERR', sErr)
|
||||
EgtSetInfo( nProcId, 'STATUS.MSG', sMsg)
|
||||
EgtSetInfo( nProcId, 'STATUS.ROT', sRot)
|
||||
EgtSetInfo( nProcId, 'CUTID', sCutId)
|
||||
EgtSetInfo( nProcId, 'TASKID', sTaskId)
|
||||
end
|
||||
local function WriteFallToNge( nPartId, sErr, sMsg, sCutId, sFall)
|
||||
EgtSetInfo( nPartId, 'STATUS.ERR', sErr)
|
||||
EgtSetInfo( nPartId, 'STATUS.MSG', sMsg)
|
||||
EgtSetInfo( nPartId, 'CUTID', sCutId)
|
||||
EgtSetInfo( nPartId, 'STATUS.FALL', sFall)
|
||||
end
|
||||
|
||||
-- Funzione per gestire visualizzazione dopo errore
|
||||
local function PostErrView( nErr, sMsg)
|
||||
if nErr ~= 0 and ( BEAM.FLAG == 1 or BEAM.FLAG == 2) then
|
||||
@@ -122,13 +137,25 @@ end
|
||||
-- Funzione per aggiornare dati ausiliari
|
||||
local function UpdateAuxData( sAuxFile)
|
||||
local bModif = false
|
||||
local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL
|
||||
-- Se definito LOAD90, aggiorno
|
||||
local sLoad90 = EgtGetStringFromIni( 'AuxData', 'LOAD90', '', sAuxFile)
|
||||
if sLoad90 ~= '' then
|
||||
local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL
|
||||
EgtSetInfo( BtlInfoId, 'LOAD90', sLoad90)
|
||||
bModif = true
|
||||
end
|
||||
-- Se definito PROJID, aggiorno
|
||||
local sProjId = EgtGetStringFromIni( 'AuxData', 'PROJID', '', sAuxFile)
|
||||
if sProjId ~= '' then
|
||||
EgtSetInfo( BtlInfoId, 'PROJECTNUMBER', sProjId)
|
||||
bModif = true
|
||||
end
|
||||
-- Se definito PRODID, aggiorno
|
||||
local sProdId = EgtGetStringFromIni( 'AuxData', 'PRODID', '', sAuxFile)
|
||||
if sProdId ~= '' then
|
||||
EgtSetInfo( BtlInfoId, 'PRODID', sProdId)
|
||||
bModif = true
|
||||
end
|
||||
return bModif
|
||||
end
|
||||
|
||||
@@ -401,6 +428,9 @@ if bToProcess then
|
||||
BEAM.CUTID = Stats[i].CutId
|
||||
BEAM.TASKID = Stats[i].TaskId
|
||||
WriteErrToLogFile( BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
|
||||
if Stats[i].ProcId then
|
||||
WriteErrToNge( Stats[i].ProcId, BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
|
||||
end
|
||||
elseif Stats[i].Err > 0 then
|
||||
nErrCnt = nErrCnt + 1
|
||||
sOutput = sOutput .. string.format( '[%d,%d] %s\n', Stats[i].CutId, Stats[i].TaskId, sMsg)
|
||||
@@ -410,6 +440,9 @@ if bToProcess then
|
||||
BEAM.CUTID = Stats[i].CutId
|
||||
BEAM.TASKID = Stats[i].TaskId
|
||||
WriteErrToLogFile( BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
|
||||
if Stats[i].ProcId then
|
||||
WriteErrToNge( Stats[i].ProcId, BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
|
||||
end
|
||||
elseif Stats[i].Err < 0 then
|
||||
-- se segnalazione scarico pezzo standard, incompleto o a caduta
|
||||
if Stats[i].Err == -100 or Stats[i].Err == -101 or Stats[i].Err == -102 then
|
||||
@@ -418,6 +451,9 @@ if bToProcess then
|
||||
BEAM.CUTID = Stats[i].CutId
|
||||
BEAM.FALL = abs( Stats[i].Err + 100)
|
||||
WriteFallToLogFile( BEAM.ERR, BEAM.MSG, BEAM.CUTID, BEAM.FALL)
|
||||
if Stats[i].ProcId then
|
||||
WriteFallToNge( Stats[i].PartId, BEAM.ERR, BEAM.MSG, BEAM.CUTID, BEAM.FALL)
|
||||
end
|
||||
-- altri avvertimenti
|
||||
else
|
||||
nWarnCnt = nWarnCnt + 1
|
||||
@@ -428,6 +464,9 @@ if bToProcess then
|
||||
BEAM.CUTID = Stats[i].CutId
|
||||
BEAM.TASKID = Stats[i].TaskId
|
||||
WriteErrToLogFile( BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
|
||||
if Stats[i].ProcId then
|
||||
WriteErrToNge( Stats[i].ProcId, BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -443,30 +482,45 @@ if bToProcess then
|
||||
PostWarnView( 19, sOutput)
|
||||
end
|
||||
|
||||
-- Altrimenti carico il progetto salvato e dichiaro nessun errore
|
||||
-- Altrimenti carico il progetto salvato, rileggo gli errori da nge e riscrivo il log txt con gli stati precedenti
|
||||
else
|
||||
EgtOutLog( ' +++ Loading Project already processed >>>')
|
||||
-- Carico il progetto già fatto
|
||||
EgtOpenFile( sNgeFile)
|
||||
-- Dichiaro nessun errore
|
||||
-- Riscrivo il log txt
|
||||
local nPartId = EgtGetFirstPart()
|
||||
while nPartId do
|
||||
local nCutId = EgtGetInfo( nPartId, 'CUTID')
|
||||
if nCutId then
|
||||
-- stato a livello di singola feature
|
||||
local nProcId = EgtGetFirstInGroup( EgtGetFirstNameInGroup( nPartId, 'Processings') or GDB_ID.NULL)
|
||||
while nProcId do
|
||||
local bIsFea = EgtExistsInfo( nProcId, 'GRP') and EgtExistsInfo( nProcId, 'PRC')
|
||||
local nTaskId = EgtGetInfo( nProcId, 'TASKID')
|
||||
local sErr = EgtGetInfo( nProcId, 'STATUS.ERR') or 0
|
||||
local sMsg = EgtGetInfo( nProcId, 'STATUS.MSG') or '---'
|
||||
local sRot = EgtGetInfo( nProcId, 'STATUS.ROT') or 0
|
||||
if bIsFea and nTaskId then
|
||||
BEAM.ERR = 0
|
||||
BEAM.MSG = '---'
|
||||
BEAM.ROT = 0
|
||||
BEAM.ERR = sErr
|
||||
BEAM.MSG = sMsg
|
||||
BEAM.ROT = sRot
|
||||
BEAM.CUTID = nCutId
|
||||
BEAM.TASKID = nTaskId
|
||||
WriteErrToLogFile( BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
|
||||
end
|
||||
nProcId = EgtGetNext( nProcId)
|
||||
end
|
||||
-- stato a livello di pezzo
|
||||
local sErr = EgtGetInfo( nPartId, 'STATUS.ERR') or 0
|
||||
if sErr == -100 or sErr == -101 or sErr == -102 then
|
||||
local sMsg = EgtGetInfo( nPartId, 'STATUS.MSG') or '---'
|
||||
local sFall = EgtGetInfo( nPartId, 'STATUS.FALL') or 0
|
||||
BEAM.ERR = sErr
|
||||
BEAM.MSG = sMsg
|
||||
BEAM.CUTID = nCutId
|
||||
BEAM.FALL = sFall
|
||||
WriteFallToLogFile( BEAM.ERR, BEAM.MSG, BEAM.CUTID, BEAM.FALL)
|
||||
end
|
||||
end
|
||||
nPartId = EgtGetNextPart( nPartId)
|
||||
end
|
||||
|
||||
+57
-29
@@ -395,6 +395,8 @@ local function CollectFeatures( PartId, b3Raw, dCurrOvmH, dCurrOvmT)
|
||||
Proc2.TaskId = Proc.TaskId
|
||||
Proc2.AdjId = Proc.AdjId
|
||||
Proc2.MainId = Proc.MainId
|
||||
-- recupero l'elenco delle facce della parte interessate dalla feature
|
||||
Proc2.AffectedFaces = BL.GetProcessAffectedFaces( Proc2)
|
||||
table.insert( vProc, Proc2)
|
||||
-- verifico se devo inserire i prefori
|
||||
if Drill.IsPredrillNeeded( Proc2) then
|
||||
@@ -1236,7 +1238,7 @@ local function ClassifyFeatures( vProc, b3Raw, Stats)
|
||||
Proc.Flg = 0
|
||||
Proc.Down = true
|
||||
bAllOk = false
|
||||
table.insert( Stats, {Err = 1, Msg='Error : impossible to machine by orientation', CutId=Proc.CutId, TaskId=Proc.TaskId})
|
||||
table.insert( Stats, {Err = 1, Msg='Error : impossible to machine by orientation', CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id})
|
||||
-- gestione feature di coda da lavorare ribaltata
|
||||
elseif Proc.Tail and bDown then
|
||||
Proc.Down = true
|
||||
@@ -1257,12 +1259,12 @@ local function ClassifyFeatures( vProc, b3Raw, Stats)
|
||||
elseif Proc.Flg == 0 then
|
||||
bAllOk = false
|
||||
Proc.ErrMsg = 'Error : out of the part'
|
||||
table.insert( Stats, {Err = 1, Msg=Proc.ErrMsg, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
||||
table.insert( Stats, {Err = 1, Msg=Proc.ErrMsg, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id})
|
||||
else
|
||||
Proc.Flg = 0
|
||||
bAllOk = false
|
||||
if not Proc.ErrMsg then Proc.ErrMsg = 'Error : impossible to machine' end
|
||||
table.insert( Stats, {Err = 1, Msg=Proc.ErrMsg, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
||||
table.insert( Stats, {Err = 1, Msg=Proc.ErrMsg, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id})
|
||||
end
|
||||
end
|
||||
-- se necessario ribaltamento, assegno intestatura alla fase ribaltata
|
||||
@@ -1824,7 +1826,10 @@ local function VerifyDrillMirrored( Proc, vProc, b3Raw)
|
||||
sDrilling, sType, dMaxDepth = ML.FindDrilling( dDiam, 0, true, false, true)
|
||||
dMachiningDepth = dMaxDepth or dMachiningDepth
|
||||
end
|
||||
if not sDrilling or ( sType ~= 'Drill' and sType ~= 'Pocket') or not EgtMdbSetCurrMachining( sDrilling) then
|
||||
if not sDrilling
|
||||
or ( sType ~= 'Drill' and ( sType ~= 'Pocket'or ( Proc.Fcs ~= 0 and Proc.Fce ~= 0)))
|
||||
or not EgtMdbSetCurrMachining( sDrilling) then
|
||||
|
||||
return
|
||||
end
|
||||
local dDrillingStep = EgtMdbGetCurrMachiningParam( MCH_MP.STEP)
|
||||
@@ -1858,10 +1863,16 @@ local function VerifyDrillMirrored( Proc, vProc, b3Raw)
|
||||
( BD.DOWN_HEAD and AreOppositeVectorApprox( vtExtr, Y_AX())) then
|
||||
Proc.Double = 2
|
||||
Proc.MachDepthDouble = dMachiningDepth
|
||||
Proc.MirrorId = ProcToDisable.Id
|
||||
Proc.MirrorCutId = ProcToDisable.CutId
|
||||
Proc.MirrorTaskId = ProcToDisable.TaskId
|
||||
DisableOtherDrilling( ProcToDisable, vProc)
|
||||
elseif BD.DOWN_HEAD and AreSameVectorApprox( vtExtr, Z_AX()) then
|
||||
Proc.Double = 3
|
||||
Proc.MachDepthDouble = dMachiningDepth
|
||||
Proc.MirrorId = ProcToDisable.Id
|
||||
Proc.MirrorCutId = ProcToDisable.CutId
|
||||
Proc.MirrorTaskId = ProcToDisable.TaskId
|
||||
DisableOtherDrilling( ProcToDisable, vProc)
|
||||
end
|
||||
end
|
||||
@@ -2026,9 +2037,12 @@ function GetFeatureInfoAndDependency( vProc, b3Raw)
|
||||
local ProcB = vProc[j]
|
||||
-- verifico se feature tipo LapJoint è attraversata da almeno un foro
|
||||
if ( Proc.Topology == 'Pocket' or Proc.Topology == 'Tunnel' or Proc.Topology == 'Groove' or Mortise.Identify( Proc)) and Drill.Identify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then
|
||||
Proc.PassedByHole = true
|
||||
ProcB.Dependency = {}
|
||||
ProcB.Dependency.ExecBefore = Proc
|
||||
-- se foro in coda non setto la dipendenza
|
||||
if not ProcB.AffectedFaces.Left then
|
||||
Proc.PassedByHole = true
|
||||
ProcB.Dependency = {}
|
||||
ProcB.Dependency.ExecBefore = Proc
|
||||
end
|
||||
end
|
||||
-- verifico se feature tipo LapJoint è attraversata da almeno una mortasa a coda di rondine
|
||||
if ( Proc.Topology == 'Pocket' or Proc.Topology == 'Tunnel' or Proc.Topology == 'Groove') and DtMortise.SideIdentify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then
|
||||
@@ -2038,10 +2052,6 @@ function GetFeatureInfoAndDependency( vProc, b3Raw)
|
||||
if Tenon.Identify( Proc) and Drill.Identify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then
|
||||
Proc.PassedByHole = true
|
||||
end
|
||||
-- se tenone di coda è attraversato da foro allora anche il foro deve essere di coda
|
||||
if Tenon.Identify( Proc) and Proc.Tail and Drill.Identify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then
|
||||
ProcB.Tail = true
|
||||
end
|
||||
-- verifiche per specchiature
|
||||
if BD.DOWN_HEAD or BD.TWO_EQUAL_HEADS then
|
||||
-- forature
|
||||
@@ -2168,13 +2178,19 @@ function BeamExec.ProcessFeatures()
|
||||
end
|
||||
if not bOk then
|
||||
nTotErr = nTotErr + 1
|
||||
table.insert( Stats, {Err=1, Msg=sMsg, Rot=-2, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
||||
elseif sMsg and #sMsg > 0 then
|
||||
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=-2, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
||||
else
|
||||
table.insert( Stats, {Err=0, Msg='', Rot=-2, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
||||
table.insert( Stats, {Err=1, Msg=sMsg, Rot=-2, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id, PartId = nPartId})
|
||||
if Proc.Double == 2 or Proc.Double == 3 then
|
||||
table.insert( Stats, {Err=0, Msg='', Rot=-2, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId})
|
||||
table.insert( Stats, {Err=1, Msg=sMsg, Rot=-2, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId, ProcId = Proc.MirrorId, PartId = nPartId})
|
||||
end
|
||||
elseif sMsg and #sMsg > 0 then
|
||||
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=-2, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id, PartId = nPartId})
|
||||
if Proc.Double == 2 or Proc.Double == 3 then
|
||||
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=-2, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId, ProcId = Proc.MirrorId, PartId = nPartId})
|
||||
end
|
||||
else
|
||||
table.insert( Stats, {Err=0, Msg='', Rot=-2, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id, PartId = nPartId})
|
||||
if Proc.Double == 2 or Proc.Double == 3 then
|
||||
table.insert( Stats, {Err=0, Msg='', Rot=-2, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId, ProcId = Proc.MirrorId, PartId = nPartId})
|
||||
end
|
||||
end
|
||||
-- se è taglio di separazione, verifico se ha già aggiunto una nuova fase oppure se è da creare
|
||||
@@ -2258,13 +2274,19 @@ function BeamExec.ProcessFeatures()
|
||||
end
|
||||
if not bOk then
|
||||
nTotErr = nTotErr + 1
|
||||
table.insert( Stats, {Err=1, Msg=sMsg, Rot=-1, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
||||
elseif sMsg and #sMsg > 0 then
|
||||
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=-1, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
||||
else
|
||||
table.insert( Stats, {Err=0, Msg='', Rot=-1, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
||||
table.insert( Stats, {Err=1, Msg=sMsg, Rot=-1, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id, PartId = nPartId})
|
||||
if Proc.Double == 2 or Proc.Double == 3 then
|
||||
table.insert( Stats, {Err=0, Msg='', Rot=-1, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId})
|
||||
table.insert( Stats, {Err=1, Msg=sMsg, Rot=-1, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId, ProcId = Proc.MirrorId, PartId = nPartId})
|
||||
end
|
||||
elseif sMsg and #sMsg > 0 then
|
||||
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=-1, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id, PartId = nPartId})
|
||||
if Proc.Double == 2 or Proc.Double == 3 then
|
||||
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=-1, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId, ProcId = Proc.MirrorId, PartId = nPartId})
|
||||
end
|
||||
else
|
||||
table.insert( Stats, {Err=0, Msg='', Rot=-1, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id, PartId = nPartId})
|
||||
if Proc.Double == 2 or Proc.Double == 3 then
|
||||
table.insert( Stats, {Err=0, Msg='', Rot=-1, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId, ProcId = Proc.MirrorId, PartId = nPartId})
|
||||
end
|
||||
end
|
||||
if bOk then nSideMchOk = nSideMchOk + 1 end
|
||||
@@ -2336,13 +2358,19 @@ function BeamExec.ProcessFeatures()
|
||||
end
|
||||
if not bOk then
|
||||
nTotErr = nTotErr + 1
|
||||
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
||||
elseif sMsg and #sMsg > 0 then
|
||||
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
||||
else
|
||||
table.insert( Stats, {Err=0, Msg='', Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
||||
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id, PartId = nPartId})
|
||||
if Proc.Double == 2 or Proc.Double == 3 then
|
||||
table.insert( Stats, {Err=0, Msg='', Rot=0, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId})
|
||||
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId, ProcId = Proc.MirrorId, PartId = nPartId})
|
||||
end
|
||||
elseif sMsg and #sMsg > 0 then
|
||||
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id, PartId = nPartId})
|
||||
if Proc.Double == 2 or Proc.Double == 3 then
|
||||
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=0, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId, ProcId = Proc.MirrorId, PartId = nPartId})
|
||||
end
|
||||
else
|
||||
table.insert( Stats, {Err=0, Msg='', Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId, ProcId = Proc.Id, PartId = nPartId})
|
||||
if Proc.Double == 2 or Proc.Double == 3 then
|
||||
table.insert( Stats, {Err=0, Msg='', Rot=0, CutId=Proc.MirrorCutId, TaskId=Proc.MirrorTaskId, ProcId = Proc.MirrorId, PartId = nPartId})
|
||||
end
|
||||
end
|
||||
-- se era taglio di separazione, aggiungo nuova fase
|
||||
|
||||
+46
-1
@@ -642,7 +642,7 @@ function BeamLib.GetFaceWithMostAdj( Proc, nPartId, bCompare3Fc, dCosSideAng)
|
||||
-- premio quella che non è sottosquadra e che ha la X minore
|
||||
local bDiffSmall = true
|
||||
for i = 1, #dtElev do
|
||||
if dtElev[i] > dMinElev + 5 or dtElev[i] > 80 then
|
||||
if ( dtElev[i] > dMinElev + 5 or dtElev[i] > 80) and dMinElev < 0.85 * dtElev[i] then
|
||||
bDiffSmall = false
|
||||
end
|
||||
end
|
||||
@@ -1335,5 +1335,50 @@ function BeamLib.IsCutNeeded( Proc, b3Raw, dOvmHead, dOvmTail)
|
||||
return true
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
function BeamLib.GetToolFromMachining( sMachiningName)
|
||||
local Tool = {}
|
||||
if EgtMdbSetCurrMachining( sMachiningName) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
Tool.Name = EgtTdbGetCurrToolParam( MCH_TP.NAME)
|
||||
Tool.IsCCW = ( EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0)
|
||||
Tool.Type = EgtTdbGetCurrToolParam( MCH_TP.TYPE)
|
||||
Tool.Diameter = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or 0
|
||||
Tool.HeadType = {}
|
||||
Tool.PreferredSide = {}
|
||||
if BD.GetSetupInfo then
|
||||
Tool.HeadType = BD.GetSetupInfo( EgtTdbGetCurrToolParam( MCH_TP.HEAD)).HeadType
|
||||
Tool.PreferredSide = BD.GetSetupInfo( EgtTdbGetCurrToolParam( MCH_TP.HEAD)).PreferredSide
|
||||
end
|
||||
-- lama
|
||||
if Tool.Type == MCH_TY.SAW_STD or Tool.Type == MCH_TY.SAW_FLAT then
|
||||
Tool.Thickness = EgtTdbGetCurrToolParam(MCH_TP.THICK) or 0
|
||||
Tool.MaxDepth = EgtTdbGetCurrToolMaxDepth() or 0
|
||||
Tool.SideStep = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDESTEP', 'd')
|
||||
-- sega a catena
|
||||
elseif Tool.Type == MCH_TY.MORTISE_STD then
|
||||
Tool.Length = EgtTdbGetCurrToolParam( MCH_TP.LEN) or 0
|
||||
Tool.MaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or 0
|
||||
Tool.Width = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or 0
|
||||
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
|
||||
if BD.GetSetupInfo then
|
||||
Tool.IsOnAggregate = BD.GetSetupInfo( EgtTdbGetCurrToolParam( MCH_TP.HEAD)).bToolOnAggregate
|
||||
else
|
||||
Tool.IsOnAggregate = false
|
||||
end
|
||||
-- altri utensili al momento non previsti
|
||||
else
|
||||
error( 'Wrong tool type')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return Tool
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
return BeamLib
|
||||
+5
-2
@@ -275,12 +275,15 @@ local function VerifyFirstOrthoCut( CutTable, OffsetP, BBoxRawPart, dNzLimDwnUp)
|
||||
-- normale alla faccia ortogonale
|
||||
local _, vtO = EgtSurfTmFacetCenter( CutOId, 0, GDB_ID.ROOT)
|
||||
vtO = vtO - vtO * vtN1 * vtN1 ; vtO:normalize()
|
||||
local dMaxElev = EgtSurfTmFacetElevationInBBox( CutOId, 0, BBoxRawPart, true, GDB_ID.ROOT)
|
||||
-- calcolo lunghezza prima semi-faccia
|
||||
local asseX1 = vtO
|
||||
local asseY1 = vtN1 ^ asseX1
|
||||
local Frame1 = Frame3d( ptC1, ptC1+asseX1, ptC1+asseY1)
|
||||
local Box1 = EgtGetBBoxRef( Cut1Id, GDB_BB.STANDARD, Frame1)
|
||||
local x1 = Box1:getDimX()
|
||||
-- prendo il massimo tra la lugnhezza della faccia parallela e l'elevazione della corrispondente ortogonale
|
||||
x1 = max( x1, dMaxElev)
|
||||
-- calcolo lunghezza seconda semi-faccia
|
||||
local asseX2 = vtO
|
||||
local asseY2 = vtN2 ^ asseX2
|
||||
@@ -404,7 +407,7 @@ function DiceCut.GetDice( nParent, BBoxRawPart, ptCPlanes, vtNPlanes, bGetOrtoPl
|
||||
local dNzLimDwnUp = BL.GetNzLimDownUp( BBoxRawPart)
|
||||
|
||||
-- se non c'è testa da sotto e normali senza componenti in Y con faccia quasi verticale e trave non alta, uso per offset i limiti dei tagli di testa e coda
|
||||
if not BD.DOWN_HEAD and abs( vtNPlanes:getY()) < 0.1 and vtNPlanes:getZ() < 0.7071 and ( not vtNBond or abs( vtNBond:getY()) < 0.1) and BBoxRawPart:getDimZ() < BD.MIN_DIM_HBEAM then
|
||||
if not BD.TURN and not BD.DOWN_HEAD and abs( vtNPlanes:getY()) < 0.1 and vtNPlanes:getZ() < 0.7071 and ( not vtNBond or abs( vtNBond:getY()) < 0.1) and BBoxRawPart:getDimZ() < BD.MIN_DIM_HBEAM then
|
||||
OffsetO = dOrthoMaxDim or BD.MAX_DIM_HTCUT
|
||||
end
|
||||
|
||||
@@ -430,7 +433,7 @@ function DiceCut.GetDice( nParent, BBoxRawPart, ptCPlanes, vtNPlanes, bGetOrtoPl
|
||||
if dElevO then
|
||||
local m = ceil( dElevO / OffsetO)
|
||||
OffsetO = dElevO / m
|
||||
end
|
||||
end
|
||||
|
||||
-- elenco di tutte le superfici generate dai tagli
|
||||
local TabFUCHSIA = {}
|
||||
|
||||
+49
-12
@@ -233,8 +233,12 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
||||
if not dVzLimDwnUp then dVzLimDwnUp = BL.GetNzLimDownUp( b3Raw, vtN, vtOrthO) end
|
||||
local bDownHead = ( dVzLimDwnUp and dVzLimDwnUp < - 1.5)
|
||||
local bDownUp = ( vtN:getZ() < dVzLimDwnUp)
|
||||
-- Commentato perchè il vtFaceUse non funziona correttaemnte in caso che il lato da lavorare sia a 45°. Potrebbe ritornare una trilinea, non gestibile. Si passano le direzioni normali agli assi.
|
||||
--local ptP1, ptPm, ptP2, vtV1, vtV2, dLen, dWidth = EgtSurfTmFacetOppositeSide( nSurfId, nFacet, vtOrthO, GDB_ID.ROOT)
|
||||
|
||||
-- linea o bilinea di lavorazione
|
||||
local ptP1, ptPm, ptP2, vtV1, vtV2, dLen, dWidth = EgtSurfTmFacetOppositeSide( nSurfId, nFacet, vtOrthO, GDB_ID.ROOT)
|
||||
local ptP1, ptPm, ptP2, vtV1, vtV2, dLen, dWidth = EgtSurfTmFacetOppositeSide( nSurfId, nFacet, BL.GetVersRef( nOrthoOpposite), GDB_ID.ROOT)
|
||||
|
||||
if not dLen or dLen < 1.1 or not dWidth or dWidth < 1.1 then
|
||||
local sWarn = 'Face ' .. string.format( '%d,%d', nSurfId, nFacet) .. ' skipped : too small'
|
||||
EgtOutLog( sWarn, 1)
|
||||
@@ -246,6 +250,12 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
||||
return false
|
||||
end
|
||||
local bIsSawCCW = ( EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0)
|
||||
-- se settato nelle note lavorazione si lavora in discordanza
|
||||
EgtMdbSetCurrMachining( sCutting)
|
||||
local sMachiningNotes = EgtMdbGetCurrMachiningParam( MCH_MP.USERNOTES) or ''
|
||||
if ( EgtGetValInNotes( sMachiningNotes, 'PATHINVERT', 'd') or 0) == 1 then
|
||||
bIsSawCCW = not bIsSawCCW
|
||||
end
|
||||
local bInvert = bForceInvert
|
||||
-- l'inversione può essere comandata da rotazione lama (direzione concorde, legata anche a DownUp) oppure da direzione Z del percorso (si preferisce lavorare dal basso verso l'alto per limitare le corse)
|
||||
-- se c'è disaccordo tra rotazione e direzione si cambia il lato di lavoro, se possibile. Se ciò non è possbile comanda la direzione. Se percorso orizzontale comanda la rotazione.
|
||||
@@ -309,7 +319,7 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
||||
bIsBiLinea = true
|
||||
local vtTg1 = ptPm - ptP1 ; vtTg1:normalize()
|
||||
local vtTg2 = ptP2 - ptPm ; vtTg2:normalize()
|
||||
local dCosMax = 0.951 -- cos( 18°)
|
||||
local dCosMax = 0.966 -- cos( 15°)
|
||||
local dLenMin = 30
|
||||
local dLenMax = max( 0.5 * dSawDiam * 0.17365 + 1, 2 * dLenMin)
|
||||
dCosAngleL1L2 = vtTg1 * vtTg2
|
||||
@@ -367,6 +377,7 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
||||
local dLenLi = sqrt( dLiTang * dLiTang + dLiPerp * dLiPerp)
|
||||
local dLenLo = sqrt( dLoTang * dLoTang + dLoPerp * dLoPerp)
|
||||
local dLiCompLength = 0
|
||||
local dLoCompLength = 0
|
||||
-- attacco tangente
|
||||
local dLi2Tang = 0
|
||||
local dLi2Perp = 0
|
||||
@@ -388,6 +399,7 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
||||
end
|
||||
local dLenLi2 = abs( dLi2Tang)
|
||||
local dLenLo2 = abs( dLo2Tang)
|
||||
local dBiLineaAddLength = 0
|
||||
|
||||
-- se il lato non lavorato della bilinea è aperto, setto entrata/uscita con la stessa direzione
|
||||
if bIsBiLinea then
|
||||
@@ -416,8 +428,9 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
||||
local dDistPointToCenter = sqrt( dDistPtTang * dDistPtTang + dDistToCenter * dDistToCenter)
|
||||
-- se distanza al punto è maggiore del raggio lama, significa che non ho già lavorato, quindi calcolo uscita opportunamente
|
||||
if dDistPointToCenter > 0.5 * dSawDiam then
|
||||
dBiLineaAddLength = dDistPointToCenter - ( 0.5 * dSawDiam)
|
||||
dLoTang = -dAllEnd * dCosAlpha
|
||||
dLoPerp = dDist2 * dSinAlpha
|
||||
dLoPerp = dDist2 * dSinAlpha
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -449,11 +462,23 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
||||
-- dLoPerp rimane invariato
|
||||
end
|
||||
elseif BD.TURN then
|
||||
bLioTang = 2
|
||||
local dMove = dist( ptP1, ptP2)
|
||||
dLiTang, dLiPerp = dLi2Tang, dLi2Perp
|
||||
dLoTang = -( dLiTang - dAccStart - dAccEnd + dMove)
|
||||
dLoPerp = BD.COLL_SIC
|
||||
-- se angolo bilinea ottuso si segue bilinea per un tratto per tagliare completamente cubetto a forma di rombo
|
||||
if dCosAngleL1L2 > 0.707 and bIsBiLinea then
|
||||
-- calcolo uscita per prolungare solo della parte mancante per completare il taglio
|
||||
if dBiLineaAddLength > 0 then
|
||||
dLoTang = dLoTang * ( dBiLineaAddLength + BD.COLL_SIC) / 100
|
||||
dLoPerp = dLoPerp * ( dBiLineaAddLength + BD.COLL_SIC) / 100
|
||||
end
|
||||
-- aggiungo componente perpendicolare a percorso per ritornare dal punto di ingresso, altrimenti l'uscita viene allungata fino dall'altra parte del grezzo
|
||||
dLoCompLength = 100
|
||||
-- se angolo bilinea oltre 45°, faccio movimento in retrazione
|
||||
else
|
||||
bLioTang = 2
|
||||
local dMove = dist( ptP1, ptP2)
|
||||
dLoTang = -( dLiTang - dAccStart - dAccEnd + dMove)
|
||||
dLoPerp = BD.COLL_SIC
|
||||
end
|
||||
else
|
||||
bLioTang = true
|
||||
dLiTang, dLiPerp, dLoTang, dLoPerp, dLiCompLength = dLi2Tang, dLi2Perp, dLo2Tang, dLo2Perp, dLi2CompLength
|
||||
@@ -467,9 +492,19 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
||||
if BD.C_SIMM and bMaximizeVerticalDepth then
|
||||
nSCC = MCH_SCC.ADIR_ZM
|
||||
elseif abs( vtAux:getX()) > abs( vtAux:getY()) - GEO.EPS_SMALL then
|
||||
nSCC = EgtIf( ( vtAux:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
|
||||
-- se il taglio è orizzontale, si gira aggregato lama per facilitare caduta del legno
|
||||
if abs( vtTg:getZ()) < 10 * GEO.EPS_SMALL and not AreSameOrOppositeVectorApprox( vtN, Z_AX()) then
|
||||
nSCC = EgtIf( ( vtAux:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
|
||||
else
|
||||
nSCC = EgtIf( ( vtAux:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
|
||||
end
|
||||
else
|
||||
nSCC = EgtIf( ( vtAux:getY() > -GEO.EPS_SMALL), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
|
||||
-- se il taglio è orizzontale, si gira aggregato lama per facilitare caduta del legno
|
||||
if abs( vtTg:getZ()) < 10 * GEO.EPS_SMALL and not AreSameOrOppositeVectorApprox( vtN, Z_AX()) then
|
||||
nSCC = EgtIf( ( vtAux:getY() > -GEO.EPS_SMALL), MCH_SCC.ADIR_YM, MCH_SCC.ADIR_YP)
|
||||
else
|
||||
nSCC = EgtIf( ( vtAux:getY() > -GEO.EPS_SMALL), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
|
||||
end
|
||||
end
|
||||
else
|
||||
if BD.TURN == 2 then
|
||||
@@ -516,8 +551,9 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
||||
EgtSetMachiningGeometry( {{ nSurfId, nFacet}})
|
||||
-- imposto uso faccia
|
||||
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
|
||||
local sNoteVtFaceUse = 'VtFaceUse=' .. EgtNumToString( vtOrthO:getX(),3) .. ',' .. EgtNumToString( vtOrthO:getY(),3) .. ',' .. EgtNumToString( vtOrthO:getZ(),3) .. ';'
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sNoteVtFaceUse)
|
||||
-- Commentato perchè il vtFaceUse non funziona correttaemnte in caso che il lato da lavorare sia a 45°. Potrebbe ritornare una trilinea, non gestibile.
|
||||
-- local sNoteVtFaceUse = 'VtFaceUse=' .. EgtNumToString( vtOrthO:getX(),3) .. ',' .. EgtNumToString( vtOrthO:getY(),3) .. ',' .. EgtNumToString( vtOrthO:getZ(),3) .. ';'
|
||||
-- EgtSetMachiningParam( MCH_MP.USERNOTES, sNoteVtFaceUse)
|
||||
-- imposto posizione braccio porta testa
|
||||
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||
-- imposto inversione e lato correzione
|
||||
@@ -535,6 +571,7 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
||||
if BD.TURN and bLioTang == 2 then EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LO.PERP_TG) end
|
||||
EgtSetMachiningParam( MCH_MP.LOTANG, dLoTang)
|
||||
EgtSetMachiningParam( MCH_MP.LOPERP, dLoPerp)
|
||||
EgtSetMachiningParam( MCH_MP.LOCOMPLEN, dLoCompLength)
|
||||
-- imposto allungamenti iniziale e finale
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dAllStart - dAccStart)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dAllEnd - dAccEnd)
|
||||
@@ -611,7 +648,7 @@ function FacesBySaw.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, sCutType,
|
||||
local bFaceOk = {}
|
||||
bFaceOk[1] = ( vtN[1]:getZ() >= ( BD.CUT_VZ_MIN or BD.NZ_MINB) or abs( vtN[1]:getY()) < 0.174 or ( Proc.AffectedFaces.Left ~= Proc.AffectedFaces.Right and Proc.Face[1].Elevation < dMaxDepth - 10 * GEO.EPS_SMALL))
|
||||
bFaceOk[2] = ( vtN[2]:getZ() >= ( BD.CUT_VZ_MIN or BD.NZ_MINB) or abs( vtN[2]:getY()) < 0.174 or ( Proc.AffectedFaces.Left ~= Proc.AffectedFaces.Right and Proc.Face[2].Elevation < dMaxDepth - 10 * GEO.EPS_SMALL))
|
||||
if not bDownHead and ( not bFaceOk[1] or not bFaceOk[2]) then
|
||||
if not bDownHead and not bFaceOk[1] and not bFaceOk[2] then
|
||||
local sErr = 'Error : TwoFacesBySaw from bottom impossible'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
|
||||
@@ -170,7 +170,7 @@ function VerifyTool( Machining, MachiningType, Params, bH2)
|
||||
return VerifyDrillPocket( Machining, Params.Diam, Params.Depth, bH2)
|
||||
end
|
||||
elseif MachiningType == MCH_MY.SAWING then
|
||||
return true, { H2 = bH2}
|
||||
return ( not Params.Depth or Machining.Tool.MaxMat > Params.Depth - GEO.EPS_SMALL), { H2 = bH2}
|
||||
elseif MachiningType == MCH_MY.MILLING then
|
||||
return VerifyMill( Machining, Params.Depth, Params.TuuidMstr, Params.MaxDiam, Params.MaxTotLen, bH2)
|
||||
elseif MachiningType == MCH_MY.POCKETING then
|
||||
@@ -450,8 +450,8 @@ local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead,
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function MachiningLib.FindCutting( sType, bTopHead, bDownHead)
|
||||
return FindMachining( MCH_MY.SAWING, sType, nil, bTopHead, bDownHead)
|
||||
function MachiningLib.FindCutting( sType, bTopHead, bDownHead, dDepth, sSortingCriterion)
|
||||
return FindMachining( MCH_MY.SAWING, sType, { Depth = dDepth}, bTopHead, bDownHead, nil, nil, sSortingCriterion)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
|
||||
+29
-11
@@ -47,7 +47,7 @@ local ML = require( 'MachiningLib')
|
||||
-- Riconoscimento della feature
|
||||
function ProcessCut.Identify( Proc)
|
||||
-- se richiesto si forza fresatura
|
||||
Proc.bForceMill = ( Proc.prc == 30 and ( ( EgtGetInfo( Proc.Id, 'Q07', 'd') or 0) == 1))
|
||||
Proc.bForceMill = ( ( ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 10) and ( ( EgtGetInfo( Proc.Id, 'Q07', 'd') or 0) == 1))
|
||||
|
||||
if Proc.bForceMill then
|
||||
return false
|
||||
@@ -92,7 +92,7 @@ function ProcessCut.Classify( Proc, b3Raw)
|
||||
-- calcolo l'ingombro orizzontale della faccia
|
||||
local _, 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
|
||||
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
|
||||
end
|
||||
end
|
||||
@@ -262,6 +262,7 @@ end
|
||||
---------------------------------------------------------------------
|
||||
-- Applicazione della lavorazione con testa da sopra
|
||||
local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, nLimitingSurf, bForceTangentLeadInOut)
|
||||
local sWarn
|
||||
-- ingombro del grezzo
|
||||
b3Raw = b3Raw or EgtGetRawPartBBox( nRawId)
|
||||
-- ingombro del pezzo
|
||||
@@ -272,9 +273,9 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
||||
local dNzLimDwnUp = BL.GetNzLimDownUp( b3Raw, vtN)
|
||||
local bDownCut = ( vtN:getZ() <= dNzLimDwnUp)
|
||||
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 BL.IsSplittedPartPhase( nPhase)) and not Proc.AdvTail and vtN:getX() < 0 and abs( vtN:getY()) < 0.259)
|
||||
end
|
||||
local dMinFeatureLengthForLongCut = 590.000
|
||||
local dMinFeatureLengthForLongCut = EgtIf( BD.C_SIMM, 590, 400)
|
||||
-- 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
|
||||
@@ -373,10 +374,17 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
||||
end
|
||||
-- verifico se necessari tagli supplementari o se presente superficie limitante
|
||||
EgtOutLog( string.format( 'MaxDepth=%.1f MaxVertDepth=%.1f CutH=%.1f CutV=%.1f', dMaxDepth, dMaxVertDepth, dCutH, dCutV), 3)
|
||||
-- se lungo, una faccia e rivolto sul retro verso l'alto si forzano i cubetti per evitare di rovinare il pezzo successivo
|
||||
local bForceDicing = ( Proc.Fct == 1 and Proc.AffectedFaces.Left and bLongCut and vtN:getZ() > 10 * GEO.EPS_SMALL and vtN:getY() < 10 * GEO.EPS_SMALL)
|
||||
local vCuts = {}
|
||||
if not Proc.AdvTail and ( dCutH > dMaxDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC or dCutV > dMaxVertDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC) then
|
||||
if ( ( not Proc.AdvTail) or bForceDicing) and ( dCutH > dMaxDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC or dCutV > dMaxVertDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC) then
|
||||
local ptExtra, vtExtra
|
||||
local bAutoCalcSurf = true
|
||||
if Proc.AdvTail then
|
||||
-- do avviso che la lama può sbordare nel pezzo successivo
|
||||
sWarn = 'Warning : Cut machining can damage next piece'
|
||||
EgtOutLog( sWarn .. ' (process ' .. tostring( Proc.Id) .. ')')
|
||||
end
|
||||
if bFillAreaPiece or bFillTail then
|
||||
local ptMiddle = ( b3Solid:getMin() + b3Solid:getMax()) / 2
|
||||
ptExtra = Point3d( b3Solid:getMin():getX() + 5*GEO.EPS_SMALL, ptMiddle:getY(), ptMiddle:getZ())
|
||||
@@ -415,7 +423,7 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
||||
end
|
||||
end
|
||||
-- se il taglio è più spesso della lama abilito il dicing, altrimenti no
|
||||
if dMaxElev > dSawThick then
|
||||
if ( dMaxElev > dSawThick) or bForceDicing then
|
||||
vCuts = DC.GetDice( nAddGrpId, EgtIf( bForced, b3Raw, b3Solid), ptC, vtN, bAutoCalcSurf, ptExtra, vtExtra, dMaxVertDepth - BD.CUT_EXTRA, dNewDiceDim)
|
||||
-- se taglio sborda in coda e non è stato inserito nessun taglio a cubetti, lo rilancio con le dimensioni customizzate
|
||||
if ( bFillTail or bCustDiceCut) and #vCuts == 0 then
|
||||
@@ -608,7 +616,8 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
||||
local vtOrthoO
|
||||
if bFromBottom and dCutV < dMaxDepth - BD.CUT_EXTRA and vtN:getZ() > 0 then
|
||||
vtOrthoO = -Z_AX()
|
||||
elseif bHorizCut and ( not bVertCutOk or b3Solid:getDimX() > BD.LEN_SHORT_PART or Proc.AdvTail or ( vtN:getX() > 0 and vtN:getZ() <= 0.708) or ( abs( vtN:getY()) < 0.1 and vtN:getZ() <= 0)) then
|
||||
elseif ( bHorizCut or ( dCutV < dMaxDepth - BD.CUT_EXTRA and not bVertCutOk)) and
|
||||
( not bVertCutOk or b3Solid:getDimX() > BD.LEN_SHORT_PART or Proc.AdvTail or ( vtN:getX() > 0 and vtN:getZ() <= 0.708) or ( abs( vtN:getY()) < 0.1 and vtN:getZ() <= 0)) then
|
||||
vtOrthoO = Z_AX()
|
||||
elseif b3Solid:getDimX() < BD.LEN_SHORT_PART and not Proc.AdvTail and abs( vtN:getY()) > 0.259 and
|
||||
vtN:getZ() > -0.174 and abs( vtN:getY()) > abs( vtN:getZ()) and dCutH < dMaxDepth + 10 * GEO.EPS_SMALL then
|
||||
@@ -641,7 +650,7 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
||||
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dCutExtra, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
|
||||
if not bOk then return bOk, sErr end
|
||||
end
|
||||
return true
|
||||
return true, sWarn
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
@@ -866,22 +875,31 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom,
|
||||
return false, sErr
|
||||
end
|
||||
local bNoDicing = false
|
||||
local sWarn
|
||||
-- se taglio con testa da sopra
|
||||
if not bDownHead and not bDownTurn then
|
||||
local bOk, sErr, bNoDicing2 = MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, nLimitingSurf, bForceTangentLeadInOut)
|
||||
bNoDicing = bNoDicing2
|
||||
if not bOk then return false, sErr end
|
||||
if not bOk then
|
||||
return false, sErr
|
||||
else
|
||||
sWarn = sErr
|
||||
end
|
||||
-- altrimenti taglio con testa da sotto
|
||||
else
|
||||
local bOk, sErr = MakeFromDown( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
if not bOk then return false, sErr end
|
||||
if not bOk then
|
||||
return false, sErr
|
||||
else
|
||||
sWarn = sErr
|
||||
end
|
||||
end
|
||||
-- Aggiornamento ingombro (se vero taglio o richiesto)
|
||||
-- Se lascio il cordolo (bNoDicing) non aggiorno il grezzo perchè lo scarto rimane attaccato
|
||||
if ( ProcessCut.Identify( Proc) or bUpdateIng) and not bNoDicing then
|
||||
UpdateEncumbrance( Proc, vtN, dOvmHead, nRawId, b3Solid, b3Raw)
|
||||
end
|
||||
return true
|
||||
return true, sWarn
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
|
||||
@@ -1190,14 +1190,14 @@ local function Make2Faces( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Raw, b3Sol
|
||||
return MakeByBlade( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Raw, b3Solid)
|
||||
-- altrimenti provo con il truciolatore
|
||||
else
|
||||
local sName = 'Mill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||
-- se non ho la lavorazione esco
|
||||
if not sMilling then
|
||||
local sErr = 'Error, machining or tool not found ' .. sName .. '-' .. sMilling
|
||||
local sErr = 'Error, machining or tool not found ' .. sName
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- inserisco la lavorazione di fresatura
|
||||
local sName = 'Mill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||
local nMchFId = EgtAddMachining( sName, sMilling)
|
||||
if not nMchFId then
|
||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
||||
|
||||
@@ -209,7 +209,8 @@ function ProcessDrill.AddPredrillFromDrillProc( Proc)
|
||||
PredrillProc.MainId = Proc.MainId
|
||||
PredrillProc.IsPredrill = true
|
||||
PredrillProc.IsPredrillOf = Proc.Id
|
||||
|
||||
-- recupero l'elenco delle facce della parte interessate dalla feature
|
||||
PredrillProc.AffectedFaces = BL.GetProcessAffectedFaces( PredrillProc)
|
||||
return true, PredrillProc
|
||||
end
|
||||
end
|
||||
@@ -252,8 +253,11 @@ function ProcessDrill.Classify( Proc, b3Raw, sDownOrSideOrStd)
|
||||
if sDownOrSideOrStd == 'DOWN' then
|
||||
-- se foro fatto in doppio entrambe le forature (valore assoluto) devono essere sopra al valore limite, se foro singolo deve essere sopra al valore limite se ribaltato
|
||||
if ( abs( Proc.Flg) == 2 and ( abs( vtExtr:getZ()) < - BD.DRILL_VZ_MIN) or ( abs( Proc.Flg) ~= 2 and vtExtr:getZ() < - BD.DRILL_VZ_MIN)) then
|
||||
Proc.Down = true
|
||||
Proc.Side = false
|
||||
-- in doppio non cambio di fase al foro perchè devo garantire il lato master su H1
|
||||
if not( Proc.Double) or Proc.Double == 0 then
|
||||
Proc.Down = true
|
||||
Proc.Side = false
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
@@ -479,6 +483,18 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- eventuale inversione foro in base al lato di lavoro e al lato testa dell'utensile scelto
|
||||
-- se non già richiesta inversione e foro quasi orizzontale (15deg) passante
|
||||
if not bToInvert and Proc.Flg == 1 and bOpen and abs( vtExtr:getZ()) < 0.259 and abs( vtExtr:getY()) > 0.966 then
|
||||
local Tool = BL.GetToolFromMachining( sDrilling)
|
||||
-- lato testa e lato di lavoro devono corrispondere
|
||||
if ( ( Tool.PreferredSide.bFront == true) and vtExtr:getY() > 10 * GEO.EPS_SMALL)
|
||||
or ( ( Tool.PreferredSide.bBack == true) and vtExtr:getY() < - 10 * GEO.EPS_SMALL) then
|
||||
ptCen = ptCen - vtExtr * dLen
|
||||
vtExtr = - vtExtr
|
||||
bToInvert = true
|
||||
end
|
||||
end
|
||||
-- Determino la faccia di inizio del foro e dati correlati
|
||||
local nFac, CosB, vFaces = GetHoleStartData( ptCen, vtExtr, b3Solid)
|
||||
-- Calcolo acciorciamento affondamento utile per evitare collisione portautensile con faccia
|
||||
@@ -601,6 +617,16 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
end
|
||||
-- se lavorazione in doppio
|
||||
if Proc.Double and Proc.Double > 0 then
|
||||
-- calcolo gli step reali
|
||||
local dStep = EgtGetMachiningParam( MCH_MP.STEP)
|
||||
local nNumStep = ceil( dDepth/dStep)
|
||||
local dRealStep = dDepth / nNumStep
|
||||
-- Se nel penultimo step le punte si trovano più vicine del minimo ( MinDistX1X2 + Puntina centraggio H1 + puntina centraggio H2) ricalcolo facendo uno step in meno
|
||||
if ( ( dLen / 2) - ( dRealStep * (nNumStep - 1))) * 2 < ( 40 + 10 + 10) then
|
||||
dRealStep = ceil( dDepth / (nNumStep - 1))
|
||||
EgtSetMachiningParam( MCH_MP.STEP, dRealStep)
|
||||
sMyWarn ='Warning in drill-double : step changed to ' .. tostring(dRealStep) .. 'mm'
|
||||
end
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'DOUBLE', Proc.Double)
|
||||
if Proc.Double ~= Proc.PrevDouble then
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'StartZmax', 2)
|
||||
|
||||
@@ -33,6 +33,7 @@ local Q_ONLY_CHAMFER = 'Q00' -- i
|
||||
local Q_RADIAL_OFFSET = 'Q06' -- d, valido solo per pocket
|
||||
local Q_IGNORE_LASER_PROBLEMS = 'Q07'
|
||||
local Q_FORCE_CLAMPABLE_AREA = 'Q08'
|
||||
local Q_INVERT_LAST_PATH = 'Q09'
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- Riconoscimento della feature
|
||||
@@ -588,6 +589,8 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
end
|
||||
end
|
||||
end
|
||||
-- eventuale inversione ultimo segmento
|
||||
local bInvertLastPath = ( ( EgtGetInfo( Proc.Id, Q_INVERT_LAST_PATH, 'd') or 0) == 1)
|
||||
-- eseguo
|
||||
for i = 1, nStep do
|
||||
for j = 1, nDouble do
|
||||
@@ -630,35 +633,66 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
-- aggiungo geometria
|
||||
EgtSetMachiningGeometry( {{ AuxId, -1}})
|
||||
-- eventuale accorciamento di testa
|
||||
local dStartAddLen, dEndAddLen, dWorkSide, bToolInvert, bInvert
|
||||
if ( j == 1 and i > 1) or ( j == 2 and i < nStep) then
|
||||
local dStartAddLen = EgtIf( j == 1, - ( i - 1) * dStep, - ( nStep - i) * dStep)
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dStartAddLen)
|
||||
dStartAddLen = EgtIf( j == 1, - ( i - 1) * dStep, - ( nStep - i) * dStep)
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, EgtIf( j == 1, dStartAddSpec, dEndAddSpec))
|
||||
dStartAddLen = EgtIf( j == 1, dStartAddSpec, dEndAddSpec)
|
||||
end
|
||||
-- eventuale accorciamento di coda
|
||||
if ( j == 1 and i < nStep) or ( j == 2 and i > 1) then
|
||||
local dEndAddLen = EgtIf( j == 1, - ( nStep - i) * dStep, - ( i - 1) * dStep)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEndAddLen)
|
||||
dEndAddLen = EgtIf( j == 1, - ( nStep - i) * dStep, - ( i - 1) * dStep)
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, EgtIf( j == 1, dEndAddSpec, dStartAddSpec))
|
||||
dEndAddLen = EgtIf( j == 1, dEndAddSpec, dStartAddSpec)
|
||||
end
|
||||
-- se estrusione da sotto, inverto direzione fresa
|
||||
if ( j == 1 and bToolInv) or ( j == 2 and not bToolInv) then
|
||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
|
||||
bToolInvert = true
|
||||
else
|
||||
bToolInvert = false
|
||||
end
|
||||
-- se seconda passata, inverto direzione di lavoro
|
||||
if j == 2 then
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
||||
bInvert = true
|
||||
else
|
||||
bInvert = false
|
||||
end
|
||||
|
||||
-- assegno lato di lavoro
|
||||
if Proc.Grp == 0 then
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.CENTER)
|
||||
dWorkSide = MCH_MILL_WS.CENTER
|
||||
elseif ( Proc.Grp == 3 and not bToolInv) or ( Proc.Grp == 4 and bToolInv) or ( Proc.Grp == 1 and bToolInv) or ( Proc.Grp == 2 and bToolInv) then
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
||||
dWorkSide = MCH_MILL_WS.LEFT
|
||||
elseif ( Proc.Grp == 3 and bToolInv) or ( Proc.Grp == 4 and not bToolInv) or ( Proc.Grp == 1 and not bToolInv) or ( Proc.Grp == 2 and not bToolInv) then
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
||||
dWorkSide = MCH_MILL_WS.RIGHT
|
||||
end
|
||||
|
||||
-- se ultimo step da invertire
|
||||
if i == nStep and bInvertLastPath then
|
||||
-- se profilo orizzontale
|
||||
if abs( vtExtr:getZ()) < 10 * GEO.EPS_SMALL then
|
||||
dStartAddLen, dEndAddLen = dEndAddLen, dStartAddLen
|
||||
bInvert = not( bInvert)
|
||||
bToolInvert = not( bToolInvert)
|
||||
else
|
||||
dStartAddLen, dEndAddLen = dEndAddLen, dStartAddLen
|
||||
bInvert = not( bInvert)
|
||||
if dWorkSide == MCH_MILL_WS.LEFT then
|
||||
dWorkSide = MCH_MILL_WS.RIGHT
|
||||
elseif dWorkSide == MCH_MILL_WS.RIGHT then
|
||||
dWorkSide = MCH_MILL_WS.LEFT
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- setto i valori
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dStartAddLen)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEndAddLen)
|
||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, bToolInvert)
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, bInvert)
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, dWorkSide)
|
||||
|
||||
|
||||
-- posizione braccio porta testa
|
||||
local nSCC = MCH_SCC.NONE
|
||||
if not BD.C_SIMM then
|
||||
|
||||
@@ -365,7 +365,15 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
|
||||
-- eventuali informazioni sul tipo di finitura
|
||||
local nQ05 = EgtGetInfo( nOriId or GDB_ID.NULL, 'Q05', 'i') or 0
|
||||
-- recupero la lavorazione
|
||||
local sCutting = ML.FindCutting( 'HeadSide')
|
||||
-- TODO questa parte andrà cambiata quando si gestiranno i volumi liberi in cui girare da mlse
|
||||
local dMinWidthForBigBlade = 300
|
||||
local dMaxHeightForBigBlade = 300
|
||||
local sCutting
|
||||
if b3Raw:getDimY() > dMinWidthForBigBlade and b3Raw:getDimZ() < dMaxHeightForBigBlade then
|
||||
sCutting = ML.FindCutting( 'HeadSide', nil, nil, nil, 'Longest')
|
||||
else
|
||||
sCutting = ML.FindCutting( 'HeadSide')
|
||||
end
|
||||
if not sCutting then
|
||||
local sErr = 'Error : cutting not found in library'
|
||||
EgtOutLog( sErr)
|
||||
@@ -398,17 +406,23 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
|
||||
dSawThick2 = EgtTdbGetCurrToolParam( MCH_TP.THICK) or dSawThick2
|
||||
end
|
||||
end
|
||||
-- determino se lo spessore del materiale da rimuovere è eccessivo e quindi vanno fatti più tagli con offset
|
||||
local nCuts = max( ceil( dOvmHead / (( BD.MAX_LEN_SCRAP_START or BD.MAX_LEN_SCRAP) + 0.5)), 1)
|
||||
local dOffsL = dOvmHead / nCuts
|
||||
-- caratteristiche taglio
|
||||
local dDimYRef = EgtIf( b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, dMaxDepth, abs( BD.MAX_DIM_HTCUT_HBEAM))
|
||||
local bBigSectionCut = ( b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) and
|
||||
( b3Raw:getDimZ() > EgtIf( BD.TURN, 2 * dMaxVertDepth, dMaxVertDepth + dMaxDepth2) - 2 * BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
||||
( b3Raw:getDimZ() > EgtIf( BD.TURN, 2 * dMaxVertDepth, dMaxVertDepth + dMaxDepth2) - 2 * BD.CUT_EXTRA + 10 * GEO.EPS_SMALL)
|
||||
local bHorizCut = ( ( b3Raw:getDimY() > b3Raw:getDimZ() + 10 * GEO.EPS_SMALL or BD.TURN) and b3Raw:getDimZ() < dMaxVertDepth - BD.CUT_EXTRA)
|
||||
local bDoubleHorizCut = ( ( BD.DOWN_HEAD or BD.TURN) and not bHorizCut and b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
||||
local bDoubleCut = ( not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL)
|
||||
local bDoubleCut = ( not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL) and
|
||||
( b3Raw:getDimY() < 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
||||
-- verifico necessità di tagli aggiuntivi orizzontali o verticali
|
||||
local dMinOvmHeadForAddeddCuts = 10.123
|
||||
local bNeedVerticalAddedCuts = ( Proc.Face[1].WidthTrimmed > BD.MAX_LEN_DICE) and ( dOvmHead > dMinOvmHeadForAddeddCuts - 10 * GEO.EPS_SMALL)
|
||||
local bNeedHorizontalAddedCuts = ( Proc.Face[1].HeightTrimmed > ( BD.MIN_HEIGHT_ADDED_CUTS or BD.MAX_LEN_DICE)) and not bBigSectionCut and ( dOvmHead > dMinOvmHeadForAddeddCuts - 10 * GEO.EPS_SMALL)
|
||||
local bNeedHorizontalAddedCuts = ( Proc.Face[1].HeightTrimmed > ( BD.MIN_HEIGHT_ADDED_CUTS or BD.MAX_LEN_DICE)) and
|
||||
not bBigSectionCut and ( dOvmHead > dMinOvmHeadForAddeddCuts - 10 * GEO.EPS_SMALL) and
|
||||
dOffsL < BD.MAX_DIM_DICE
|
||||
-- dati lavorazioni sopra e sotto
|
||||
local Cutting1Data = { sCutting = sCutting, dSawDiam = dSawDiam, dMaxDepth = dMaxDepth, dSawThick = dSawThick, dMaxVertDepth = dMaxVertDepth}
|
||||
local Cutting2Data = { sCutting = sCutting2, dSawDiam = dSawDiam2, dMaxDepth = dMaxDepth2, dSawThick = dSawThick2}
|
||||
@@ -420,9 +434,6 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
|
||||
if not bNeedHCut and AreSameVectorApprox( vtN, X_AX()) and abs( ptC:getX() - b3Raw:getMax():getX()) < 10 * GEO.EPS_SMALL then
|
||||
return true
|
||||
end
|
||||
-- determino se lo spessore del materiale da rimuovere è eccessivo e quindi vanno fatti più tagli con offset
|
||||
local nCuts = max( ceil( dOvmHead / (( BD.MAX_LEN_SCRAP_START or BD.MAX_LEN_SCRAP) + 0.5)), 1)
|
||||
local dOffsL = dOvmHead / nCuts
|
||||
-- se taglio per sezioni alte e larghe
|
||||
if bBigSectionCut then
|
||||
if dOvmHead > 0 then
|
||||
|
||||
+126
-66
@@ -117,6 +117,7 @@ local ProcessLapJoint = {}
|
||||
require( 'EgtBase')
|
||||
local BL = require( 'BeamLib')
|
||||
local Fbs = require( 'FacesBySaw')
|
||||
local Fbp = require( 'FaceByPocket')
|
||||
local Cut = require( 'ProcessCut')
|
||||
local DoubleCut = require( 'ProcessDoubleCut')
|
||||
local LongCut = require( 'ProcessLongCut')
|
||||
@@ -199,6 +200,7 @@ local function AssignQIdent( Proc)
|
||||
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 17 then
|
||||
Q_DEPTH_CHAMFER = 'Q01' -- d
|
||||
Q_ONLY_CHAMFER = 'Q02' -- i
|
||||
Q_USE_MILL = 'Q03' -- i
|
||||
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 20 then
|
||||
Q_DEPTH_CHAMFER = 'Q01' -- d
|
||||
Q_USE_MILL = 'Q02' -- i
|
||||
@@ -413,11 +415,11 @@ local function VerifyPocket( Proc, dDiam, dDepth, dMaxTotLen, sMchFindMaster, bP
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function VerifyBHSideMill( Proc, bIsU, bIsL, bSinglePart, bPrevBhSideMill)
|
||||
local function VerifyBHSideMill( Proc, bIsU, bIsL, bSinglePart, bPrevBhSideMill, b3Raw)
|
||||
|
||||
-- se non feature BlockHausHalfLap e non abilitato parametro Q per lavorarlo di fianco e non macchina BH esco
|
||||
local nUseSideTool = EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') or 0
|
||||
if Proc.Prc ~= 37 and nUseSideTool == 0 and not BD.BH_MACHINE then
|
||||
if Proc.Prc ~= 37 and not BD.BH_MACHINE and ( nUseSideTool == 0 or ( nUseSideTool == 4 and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right))) then
|
||||
return false
|
||||
end
|
||||
|
||||
@@ -443,9 +445,13 @@ local function VerifyBHSideMill( Proc, bIsU, bIsL, bSinglePart, bPrevBhSideMill)
|
||||
|
||||
-- le facce devono contenere X e quelle di chiusura devono essere perpendicolari a X
|
||||
local bStopY, bStopZ
|
||||
if not Proc.TopologyLongName then
|
||||
Topology.Classify( Proc, b3Raw)
|
||||
end
|
||||
for i = 1, Proc.Fct do
|
||||
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, i-1, GDB_ID.ROOT)
|
||||
if abs( vtN:getX()) > 0.001 and abs( vtN:getX()) < 0.999962 then
|
||||
-- permessa U passante non parallela agli assi principali
|
||||
if abs( vtN:getX()) > 0.001 and abs( vtN:getX()) < 0.999962 and Proc.TopologyLongName ~= "Groove-Through-RightAngles-NotParallel-3" then
|
||||
return false
|
||||
end
|
||||
if abs( vtN:getY()) > 0.866 then bStopY = true end
|
||||
@@ -775,7 +781,7 @@ function ProcessLapJoint.IsTailFeature( Proc, b3Raw)
|
||||
-- in base al tipo di feature attribuisco il significato dei parametri Q
|
||||
AssignQIdent( Proc)
|
||||
-- se può essere fatto con utensile tipo lama
|
||||
local bUseBHSideMill, bHead, bHeadDir = VerifyBHSideMill( Proc)
|
||||
local bUseBHSideMill, bHead, bHeadDir = VerifyBHSideMill( Proc, nil, nil, nil, nil, b3Raw)
|
||||
if bUseBHSideMill then
|
||||
Proc.HeadDir = bHeadDir
|
||||
end
|
||||
@@ -784,18 +790,25 @@ function ProcessLapJoint.IsTailFeature( Proc, b3Raw)
|
||||
local b3Solid = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||
-- verifico se è in coda
|
||||
local dEndDist = Proc.Box:getMin():getX() - b3Solid:getMin():getX()
|
||||
if dEndDist > BD.MAX_DIST_HTFEA then
|
||||
if ( dEndDist > BD.MAX_DIST_HTFEA) or bUseBHSideMill then
|
||||
if not( BD.BH_MACHINE) and bUseBHSideMill and ( Proc.Box:getMax():getX() - b3Solid:getMin():getX()) < 400 then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
-- se lunga come trave, oppure non è trave corta e la sua lunghezza supera il massimo o il 80% della lunghezza della trave
|
||||
if Proc.Box:getDimX() > b3Solid:getDimX() - 1 or
|
||||
( b3Solid:getDimX() > BD.LEN_SHORT_PART and Proc.Box:getDimX() > min( BD.MAX_LEN_HTFEA, 0.8 * b3Solid:getDimX())) then
|
||||
return false
|
||||
end
|
||||
|
||||
-- se interessa la coda, e pezzo lungo, si sposta dopo separazione
|
||||
if b3Solid:getDimX() > BD.LEN_SHORT_PART and Proc.AffectedFaces.Left and Proc.Fct >= 2 then
|
||||
return true
|
||||
end
|
||||
|
||||
-- se una o due facce e interessa veramente la coda, allora di coda
|
||||
if Proc.Fct <= 2 then
|
||||
if Proc.Box:getMin():getX() < b3Solid:getMin():getX() + 1. then
|
||||
@@ -833,7 +846,7 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
|
||||
-- se 2 facce
|
||||
elseif Proc.Fct == 2 then
|
||||
-- se può essere fatto con utensile tipo lama
|
||||
local bUseBHSideMill = VerifyBHSideMill( Proc)
|
||||
local bUseBHSideMill = VerifyBHSideMill( Proc, nil, nil, nil, nil, b3Raw)
|
||||
if bUseBHSideMill then
|
||||
return true, false
|
||||
end
|
||||
@@ -870,12 +883,25 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
|
||||
end
|
||||
-- se è presente il rinvio angolare con lavorazioni di tasca ed è una tasca perfettamente verticale da sotto, non ruoto
|
||||
if BD.ANG_TRASM and Proc.Fct >= 4 and not bClosedOrthoFaces then
|
||||
local vtNBottomFace = EgtSurfTmFacetNormVersor( Proc.Id, nFacInd, GDB_ID.ROOT)
|
||||
if AreOppositeVectorApprox( vtNBottomFace, Z_AX()) and
|
||||
if AreOppositeVectorApprox( Proc.Face[nFacInd + 1].VtN, Z_AX()) and
|
||||
( Proc.Fct >= 5 and ML.FindPocketing( 'Pocket_AT') or ( Proc.Fct < 5 and ML.FindPocketing( 'OpenPocket_AT'))) then
|
||||
return true, false
|
||||
end
|
||||
end
|
||||
-- se groove da sotto e possibile fresatura tipo SideMillAsBlade non ruoto
|
||||
if Proc.AllRightAngles and ( Proc.Topology == 'Groove' or Proc.Topology == 'Pocket') and not( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back) and AreOppositeVectorApprox( Proc.Face[nFacInd + 1].VtN, Z_AX()) then
|
||||
-- recupero gruppo per geometria addizionale
|
||||
local nAddGrpId = BL.GetAddGroup( nPartId)
|
||||
if not nAddGrpId then
|
||||
local sErr = 'Error : missing AddGroup'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
if VerifySideMillAsSaw( Proc, nAddGrpId, Proc.Face[nFacInd + 1].VtN, min( Proc.Face[nFacInd + 1].Height, Proc.Face[nFacInd + 1].Width) , Proc.Face[nFacInd + 1].Elevation) then
|
||||
Proc.OkFromBottom = true
|
||||
return true, false
|
||||
end
|
||||
end
|
||||
-- se scanalatura chiusa lavoro la faccia di fondo
|
||||
if Proc.Topology == 'Pocket' and ( Proc.IsParallel or Proc.AllRightAngles) and not bClosedOrthoFaces then
|
||||
nFacInd = Topology.GetFacesWithGivenAdjacencyNumber( Proc, nil, 4)[1]
|
||||
@@ -900,7 +926,7 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
|
||||
local rfFac, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacInd, GDB_ID.ROOT)
|
||||
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nFacInd, GDB_ID.ROOT)
|
||||
-- se può essere fatto con utensile tipo lama
|
||||
local bUseBHSideMill, _, _, _, _, dTDiam = VerifyBHSideMill( Proc)
|
||||
local bUseBHSideMill, _, _, _, _, dTDiam = VerifyBHSideMill( Proc, nil, nil, nil, nil, b3Raw)
|
||||
if bUseBHSideMill then
|
||||
if vtN:getZ() > -0.5 or b3Raw:getDimZ() - Proc.Box:getDimZ() < ( BD.MAX_DIST_BH_FROM_BOTTOM or 395) - dTDiam / 2 then
|
||||
return true, false
|
||||
@@ -919,7 +945,7 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
|
||||
local bIsU = ( Proc.Fct == 3 and not TestElleShape3( Proc))
|
||||
-- se forzata la lavorazione con fresa di lato da parametro Q03=2/3 non devo ruotare
|
||||
local nSideRoughTool = EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'd')
|
||||
local bForceSideMill = ( ( nSideRoughTool == 2 or nSideRoughTool == 3) and ( Proc.Fct == 3 or Proc.Fct == 4))
|
||||
local bForceSideMill = ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back) and ( nSideRoughTool == 2 or nSideRoughTool == 3) and ( Proc.Fct == 3 or Proc.Fct == 4)
|
||||
if bForceSideMill then
|
||||
bDown = false
|
||||
elseif nFacInd2 and dElev2 < 160 and dElev2 < 2 * dElev then
|
||||
@@ -4747,6 +4773,7 @@ SawPlusChain.ApplyOnlySawblade = false
|
||||
function SawPlusChain.IsTopologyOk( Proc)
|
||||
if Proc.TopologyLongName == 'Pocket-Blind-RightAngles-Parallel-5' or
|
||||
Proc.TopologyLongName == 'Groove-Through-RightAngles-Parallel-3' or
|
||||
Proc.TopologyLongName == 'Groove-Through-RightAngles-NotParallel-3' or
|
||||
Proc.TopologyLongName == 'Groove-Blind-RightAngles-Parallel-4' or
|
||||
Proc.TopologyLongName == 'Tunnel-Through-RightAngles-Parallel-4' then
|
||||
|
||||
@@ -5034,38 +5061,6 @@ function SawPlusChain.GetLongFaceEdges( Proc, Face)
|
||||
end
|
||||
|
||||
|
||||
function SawPlusChain.GetToolFromMachining( sMachiningName)
|
||||
local Tool = {}
|
||||
if EgtMdbSetCurrMachining( sMachiningName) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
Tool.Name = EgtTdbGetCurrToolParam( MCH_TP.NAME)
|
||||
Tool.IsCCW = ( EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0)
|
||||
Tool.Type = EgtTdbGetCurrToolParam( MCH_TP.TYPE)
|
||||
Tool.Diameter = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or 0
|
||||
-- lama
|
||||
if Tool.Type == MCH_TY.SAW_STD or Tool.Type == MCH_TY.SAW_FLAT then
|
||||
Tool.Thickness = EgtTdbGetCurrToolParam(MCH_TP.THICK) or 0
|
||||
Tool.MaxDepth = EgtTdbGetCurrToolMaxDepth() or 0
|
||||
Tool.SideStep = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDESTEP', 'd')
|
||||
-- sega a catena
|
||||
elseif Tool.Type == MCH_TY.MORTISE_STD then
|
||||
Tool.Length = EgtTdbGetCurrToolParam( MCH_TP.LEN) or 0
|
||||
Tool.MaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or 0
|
||||
Tool.Width = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or 0
|
||||
Tool.Thickness = EgtTdbGetCurrToolParam( MCH_TP.THICK) or 0
|
||||
Tool.CornerRadius = EgtTdbGetCurrToolParam( MCH_TP.CORNRAD) or 0
|
||||
-- altri utensili al momento non previsti
|
||||
else
|
||||
error( 'Wrong tool type')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return Tool
|
||||
end
|
||||
|
||||
|
||||
function SawPlusChain.CalculateLeadInOut( Machining, EdgeToMachine)
|
||||
-- TODO implementare le funzioni di Tool Collision Avoidance (vedi wiki e FacesBysaw -> CalcLeadInOutPerpGeom)
|
||||
|
||||
@@ -5265,14 +5260,19 @@ function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, Edg
|
||||
end
|
||||
|
||||
-- ricerca lavorazione
|
||||
Cutting.Name = ML.FindCutting( 'HeadSide', true, false)
|
||||
Cutting.Name = ML.FindCutting( 'HeadSide', true, false, abs( EdgeToMachine.Elevation))
|
||||
if not Cutting.Name then
|
||||
Cutting.Message = 'Feature '.. Proc.FeatureId .. ' : strategy ' .. SawPlusChain.Name .. ' not applicable - saw blade not found'
|
||||
Cutting.CanApply = false
|
||||
EgtOutLog( Cutting.Message)
|
||||
-- ricerca lavorazione senza considerare massima elevazione
|
||||
Cutting.Name = ML.FindCutting( 'HeadSide', true, false, nil, 'Longest')
|
||||
if not Cutting.Name then
|
||||
Cutting.Message = 'Feature '.. Proc.FeatureId .. ' : strategy ' .. SawPlusChain.Name .. ' not applicable - saw blade not found'
|
||||
Cutting.CanApply = false
|
||||
EgtOutLog( Cutting.Message)
|
||||
return Cutting
|
||||
end
|
||||
end
|
||||
Cutting.Type = MCH_OY.MILLING
|
||||
Cutting.Tool = SawPlusChain.GetToolFromMachining( Cutting.Name)
|
||||
Cutting.Tool = BL.GetToolFromMachining( Cutting.Name)
|
||||
|
||||
-- verifica dimensioni tasca e direzione compatibili
|
||||
-- se tasca meno spessa della lama la strategia non è applicabile
|
||||
@@ -5289,7 +5289,7 @@ function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, Edg
|
||||
EgtOutLog( Cutting.Message)
|
||||
end
|
||||
end
|
||||
if EdgeToMachine.ToolDirection:getZ() < BD.NZ_MINA then
|
||||
if EdgeToMachine.ToolDirection:getZ() < BD.NZ_MINA and BD.C_SIMM then
|
||||
Cutting.CanApply = false
|
||||
Cutting.Message = 'Feature '.. Proc.FeatureId .. ' : skipped sawblade from bottom'
|
||||
EgtOutLog( Cutting.Message)
|
||||
@@ -5470,7 +5470,7 @@ function SawPlusChain.Chainsaw.CalculateMachiningParameters( Proc, FaceToMachine
|
||||
EgtOutLog( Mortising.Message)
|
||||
end
|
||||
Mortising.Type = MCH_OY.MORTISING
|
||||
Mortising.Tool = SawPlusChain.GetToolFromMachining( Mortising.Name)
|
||||
Mortising.Tool = BL.GetToolFromMachining( Mortising.Name)
|
||||
|
||||
-- in caso di tunnel da un lato permetto eventuale inversione lato di lavoro in caso di errori di applicazione (es: Outstroke)
|
||||
if Proc.Topology == 'Tunnel' and sMortisingType == 'OneSide' or sMortisingType == 'OneSideAndExtend' then
|
||||
@@ -5670,7 +5670,7 @@ function SawPlusChain.Make( bOnlySaw, Proc, nRawId)
|
||||
end
|
||||
else
|
||||
-- se la lama non è arrivata sul fondo e c'è almeno un lato aperto va lavorato
|
||||
if Cutting.RadialOffset > 10 * GEO.EPS_SMALL then
|
||||
if Cutting.CanApply and Cutting.RadialOffset > 10 * GEO.EPS_SMALL then
|
||||
-- eventuale lavorazione di lama - lato della tasca da cui inizia la lavorazione
|
||||
if Proc.MainFaces.LongFace.Edges.BottomEdge.IsStartOpen then
|
||||
Cutting = SawPlusChain.Saw.CalculateMachiningParameters( Proc, Proc.MainFaces.LongFace, Proc.MainFaces.LongFace.Edges.SideEdges.StartEdge)
|
||||
@@ -5954,9 +5954,9 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
local bIsL = ( Proc.Fct == 2 or TestElleShape3( Proc) or TestElleShape4( Proc) == 2)
|
||||
-- se parametro Q03=2 forzo la fresatura di lato; con Q03=3 forzo solo se la faccia di lavoro non è rivolta verso l'alto +/-10°; per rabbet che guardano in giù sempre fresatura di lato
|
||||
local bIsRabbetAlongXTowardsBottom = ( Proc.TopologyLongName == 'Rabbet-Through-RightAngles-Parallel-2' and ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back) and Proc.AffectedFaces.Bottom and Proc.AffectedFaces.Left and Proc.AffectedFaces.Right)
|
||||
local bForceSideMill = bIsRabbetAlongXTowardsBottom or ( ( EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') == 2 or ( EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') == 3 and vtN:getZ() < 0.985)) and ( ( Proc.Fct == 4 and ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back)) or Proc.Fct == 3 or Proc.Fct == 2))
|
||||
local bForceSideMill = ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back) and ( bIsRabbetAlongXTowardsBottom or ( ( EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') == 2 or ( EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') == 3 and vtN:getZ() < 0.985)) and ( ( Proc.Fct == 4 and ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back)) or Proc.Fct == 3 or Proc.Fct == 2)))
|
||||
-- se fattibile con fresa BH di fianco e spessore utensile inferiore alla larghezza faccia
|
||||
local bMakeBySideMill, bHead, bHeadDir, sMilling, dMaxMat, dToolDiam = VerifyBHSideMill( Proc, bIsU, bIsL, bSinglePart, bPrevBhSideMill)
|
||||
local bMakeBySideMill, bHead, bHeadDir, sMilling, dMaxMat, dToolDiam = VerifyBHSideMill( Proc, bIsU, bIsL, bSinglePart, bPrevBhSideMill, b3Raw)
|
||||
if bPrevBhSideMill == nil then
|
||||
bPrevBhSideMill = bMakeBySideMill
|
||||
end
|
||||
@@ -5972,8 +5972,10 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
vtN, vtN2 = vtN2, vtN
|
||||
end
|
||||
end
|
||||
-- informazioni utensile
|
||||
local Tool = BL.GetToolFromMachining( sMilling)
|
||||
-- se lavorazione da sotto e lunga, va divisa in due metà
|
||||
local bDouble = ( vtN:getZ() < -0.5 and dH > ( BD.MAX_LEN_BH_FROM_BOTTOM or 200) and not BD.TURN)
|
||||
local bDouble = not Tool.IsOnAggregate and ( vtN:getZ() < -0.5 and dH > ( BD.MAX_LEN_BH_FROM_BOTTOM or 200) and not BD.TURN)
|
||||
-- inserisco la lavorazione di fresatura
|
||||
local sName = 'BHMill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||
local nMchFId = EgtAddMachining( sName, sMilling)
|
||||
@@ -6009,6 +6011,12 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
||||
EgtSetMachiningParam( MCH_MP.LIPERP, dFacElev + BD.CUT_SIC)
|
||||
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LO.AS_LI)
|
||||
local vtN2 = EgtSurfTmFacetNormVersor( Proc.Id, EgtIf( nFacInd == 0, 1, 0), GDB_ID.ROOT)
|
||||
if vtN2 then
|
||||
local AddLen = sqrt( dV^2 * ( ( 1 / abs( vtN2:getX())^2) - 1)) + BD.CUT_SIC
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, AddLen)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, AddLen)
|
||||
end
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, 0)
|
||||
EgtSetMachiningParam( MCH_MP.LITANG, dToolDiam / 2 + BD.CUT_SIC)
|
||||
@@ -6041,6 +6049,22 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
end
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||
-- impostazioni per fresa a disco su aggregato
|
||||
if Tool.IsOnAggregate then
|
||||
if AreSameVectorApprox( vtN, -Z_AX()) then
|
||||
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_RIGHT)
|
||||
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YP)
|
||||
if bHeadDir then
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, false)
|
||||
end
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_ZP)
|
||||
end
|
||||
end
|
||||
-- eseguo
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
@@ -6129,9 +6153,20 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
vtN, vtN2 = vtN2, vtN
|
||||
sPocketing = ML.FindPocketing( sMchFind, dDiam2, dFacElev2 + dCollSic2)
|
||||
if not sPocketing then
|
||||
local sErr = 'Error : '..sMchFind..' not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
dDiam, dDiam2 = dDiam2, dDiam
|
||||
dCollSic, dCollSic2 = dCollSic2, dCollSic
|
||||
nFacInd, nFacInd2 = nFacInd2, nFacInd
|
||||
dH, dH2 = dH2, dH
|
||||
dV, dV2 = dV2, dV
|
||||
dFacElev, dFacElev2 = dFacElev2, dFacElev
|
||||
rfFac, rfFac2 = rfFac2, rfFac
|
||||
vtN, vtN2 = vtN2, vtN
|
||||
sPocketing = ML.FindPocketing( sMchFind, dDiam2, nil, nil, nil, nil, nil, nil, 'Longest')
|
||||
if not sPocketing then
|
||||
local sErr = 'Error : '..sMchFind..' not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
end
|
||||
end
|
||||
-- provo con contornatura
|
||||
@@ -6200,7 +6235,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
if BD.ANG_TRASM and Proc.Fct >= 4 and AreOppositeVectorApprox( vtN, Z_AX()) then
|
||||
bLapJointAngTrasm = true
|
||||
-- se orientata verso il basso e non c'è testa da sotto, verifico l'alternativa
|
||||
elseif vtN:getZ() < BD.NZ_MINA and not BD.DOWN_HEAD and nFacInd2 then
|
||||
elseif vtN:getZ() < BD.NZ_MINA and not BD.DOWN_HEAD and nFacInd2 and not Proc.OkFromBottom then
|
||||
ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacInd2, GDB_ID.ROOT)
|
||||
nFacInd, nFacInd2 = nFacInd2, nFacInd
|
||||
dFacElev, dFacElev2 = dFacElev2, dFacElev
|
||||
@@ -6208,7 +6243,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
end
|
||||
-- verifico non sia orientata verso il basso o ci sia una testa dal basso o la lavorazione sia dal lato.
|
||||
local bFaceDown = ( vtN:getZ() < BD.NZ_MINA)
|
||||
if bFaceDown and not BD.DOWN_HEAD and not BD.TURN and not bForceSideMill and not bLapJointAngTrasm then
|
||||
if bFaceDown and not BD.DOWN_HEAD and not BD.TURN and not bForceSideMill and not bLapJointAngTrasm and not Proc.OkFromBottom then
|
||||
local sErr = 'Error : LapJoint from bottom impossible'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
@@ -6332,6 +6367,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
if sMyPocketing and
|
||||
( dMyTMaxDepth > dFacElev + dCollSic - 10 * GEO.EPS_SMALL or ( dMyTMaxDepth > 0.8 * dFacElev + dCollSic and not bIsU) or
|
||||
( bIsL and nUseRoughTool == 0) or
|
||||
( bIsL and Proc.Prc == 20) or
|
||||
( Proc.Prc == 25 and not bIsU and not bIsL)) or
|
||||
( dUserMaxElev and dUserMaxElev > 10 * GEO.EPS_SMALL) then
|
||||
sPocketing = sMyPocketing
|
||||
@@ -6394,6 +6430,21 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
bUseOtherFace = true
|
||||
rfFac, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacInd, GDB_ID.ROOT)
|
||||
end
|
||||
|
||||
-- se forma a U (recupero la larghezza della faccia perpendicolarmente alle altre)
|
||||
if Proc.Fct == 3 and bIsU then
|
||||
local vtN2 = EgtSurfTmFacetNormVersor( Proc.Id, EgtIf( nFacInd == 0, 1, 0), GDB_ID.ROOT)
|
||||
local vtX = vtN2 ^ vtN
|
||||
if not vtX:isSmall() then
|
||||
local frRef = Frame3d( ptC, ptC + 100 * vtX, ptC + 100 * vtN2)
|
||||
local b3Ref = EgtSurfTmGetFacetBBoxRef( Proc.Id, nFacInd, GDB_BB.STANDARD, frRef)
|
||||
if b3Ref then
|
||||
dH = b3Ref:getDimX()
|
||||
dV = b3Ref:getDimY()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- eseguo
|
||||
bOk, sWarn, sStat = MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
||||
rfFac, dH, dV, dFacElev, bForceUseBlade,
|
||||
@@ -7002,7 +7053,7 @@ local function MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
for i = 1, #vAddId do
|
||||
local b3Box = EgtGetBBoxGlob( vAddId[i], GDB_BB.STANDARD)
|
||||
local nFct = EgtSurfTmFacetCount( vAddId[i])
|
||||
local AddProc = { Id = vAddId[i], Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Box, TotBox = Proc.Box, Fct = nFct, Flg = Proc.Flg, PartId = Proc.PartId, TaskId = Proc.TaskId, FeatureId = Proc.FeatureId, IsSplittedLapJoint = true, AffectedFaces = Proc.AffectedFaces}
|
||||
local AddProc = { Id = vAddId[i], Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Box, TotBox = Proc.Box, Fct = nFct, Flg = Proc.Flg, PartId = Proc.PartId, TaskId = Proc.TaskId, FeatureId = Proc.FeatureId, IsSplittedLapJoint = true, AffectedFaces = Proc.AffectedFaces, OkFromBottom = Proc.OkFromBottom}
|
||||
Topology.Classify( AddProc, b3Raw)
|
||||
-- lasciare il false nel sesto parametro (perchè internamente viene verificato se diverso da nil)
|
||||
local bOk, sMyWarn
|
||||
@@ -7049,11 +7100,9 @@ local function TestTwoFacesDownHead( Proc)
|
||||
if not ( Proc.Face[1].IsTooDownwardForTopBlade or Proc.Face[2].IsTooDownwardForTopBlade) then
|
||||
bDownHeadBlade = false
|
||||
else
|
||||
for i = 1, Proc.Fct do
|
||||
if Proc.Face[i].IsTooDownwardForTopBlade and ( not Proc.IsTopDownRabbet or Proc.Face[i].IsTooWideForTopBlade) then
|
||||
bDownHeadBlade = true
|
||||
break
|
||||
end
|
||||
if ( Proc.Face[1].IsTooDownwardForTopBlade and Proc.Face[2].IsTooWideForTopBlade) or
|
||||
( Proc.Face[2].IsTooDownwardForTopBlade and Proc.Face[1].IsTooWideForTopBlade) then
|
||||
bDownHeadBlade = true
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -7283,6 +7332,9 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
if Proc.Prc == 30 or Proc.Prc == 20 then
|
||||
local nBladeAntisplint = EgtGetInfo( Proc.Id, Q_ANTISPLINT_TYPE, 'i') or 0
|
||||
local nUseRoughToolOnSide = EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') or 0
|
||||
if nUseRoughToolOnSide == 4 and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right) then
|
||||
nUseRoughToolOnSide = 0
|
||||
end
|
||||
nForceUseBladeOnNotContinueFace = EgtGetInfo( Proc.Id, Q_BLADE_ON_ALONG_FACE, 'i') or 0
|
||||
-- se antischeggia di fresa o abilitato sgrossatore di fianco
|
||||
if nBladeAntisplint == 2 or nUseRoughToolOnSide > 0 then
|
||||
@@ -7308,7 +7360,7 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
-- se lunghezza richiede spezzatura
|
||||
if ( Proc.Box:getDimX() > BD.LONGCUT_MAXLEN) or
|
||||
( Proc.Box:getDimX() > 0.7 * b3Solid:getDimX() and Proc.Box:getDimX() > BD.LONGCUT_ENDLEN) or
|
||||
( ( nForceUseBladeOnNotContinueFace and nForceUseBladeOnNotContinueFace > 0) and ( Proc.Box:getDimX() > BD.LEN_SHORT_PART or 1000)) then
|
||||
( ( nForceUseBladeOnNotContinueFace and nForceUseBladeOnNotContinueFace > 0) and ( Proc.Box:getDimX() > ( BD.LEN_SHORT_PART or 1000))) then
|
||||
-- una faccia
|
||||
if Proc.Fct == 1 then
|
||||
if bUseBlade then
|
||||
@@ -7417,6 +7469,14 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
-- se è una spianatura a una faccia richiamo la LongCut
|
||||
elseif Proc.Prc == 90 then
|
||||
return LongCut.Make( Proc, nPhase, nRawId, nPartId)
|
||||
-- se arriva da una cut si applica una svuotatura
|
||||
elseif Proc.Prc == 10 then
|
||||
local dDiam = min( Proc.Face[1].Height, Proc.Face[1].Width) * 3
|
||||
local bMillUp = ( BD.DOWN_HEAD and Proc.Face[1].VtN:getZ() > -0.259)
|
||||
local bMillDown = ( BD.DOWN_HEAD and Proc.Face[1].VtN:getZ() < 0.342)
|
||||
local sMchFindMaster = 'OpenPocket'
|
||||
local _, sPocketing = VerifyPocket( Proc, dDiam, nil, nil, sMchFindMaster, bMillUp, bMillDown)
|
||||
return Fbp.Make( Proc, Proc.Id, 0, sPocketing, nPartId, b3Solid)
|
||||
-- altrimenti, con lama
|
||||
else
|
||||
return Cut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
@@ -7448,7 +7508,7 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
-- determino l'angolo tra le facce
|
||||
local bAdj, _, _, dAng = EgtSurfTmFacetsContact( Proc.Id, 0, 1, GDB_ID.ROOT)
|
||||
-- se con BH
|
||||
if VerifyBHSideMill( Proc) then
|
||||
if VerifyBHSideMill( Proc, nil, nil, nil, nil, b3Raw) then
|
||||
return MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, true)
|
||||
-- se ortogonali e non forzata lama, con fresa
|
||||
elseif not bUseBlade then
|
||||
|
||||
@@ -50,6 +50,7 @@ end
|
||||
-- Applicazione della lavorazione
|
||||
function ProcessRidgeLap.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
local nForceUseBladeOnNotContinueFace = EgtGetInfo( Proc.Id, 'Q04', 'i') or 0
|
||||
local bUseMill = ( EgtGetInfo( Proc.Id, 'Q05', 'i') or 0) == 1
|
||||
-- recupero l'ingombro del grezzo di appartenenza
|
||||
local b3Raw = EgtGetRawPartBBox( nRawId)
|
||||
-- ingombro del pezzo
|
||||
@@ -139,6 +140,9 @@ function ProcessRidgeLap.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
if BL.IsCutNeeded( CutProc, b3Raw, dOvmHead) then
|
||||
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead, false)
|
||||
if not bOk then return bOk, sErr end
|
||||
elseif bUseMill then
|
||||
Proc.bForceMill = true
|
||||
return LapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
elseif nForceUseBladeOnNotContinueFace > 0 then
|
||||
EgtSurfTmRemoveFacet( Proc.Id, vFaceOrd[1] - 1)
|
||||
Proc.Fct = Proc.Fct - 1
|
||||
|
||||
@@ -443,7 +443,7 @@ function ProcessScarfJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmTa
|
||||
if not nGoodFace1 or nGoodFace1 == 0 then
|
||||
-- inserisco la lavorazione
|
||||
local vtRef2 = EgtIf( abs(vtRef:getZ()) < GEO.EPS_SMALL, Z_AX(), EgtIf( bHead, Y_AX(), -Y_AX()))
|
||||
bOkd, sErrD = Fbs.MakeOne( nFace4, nGoodFace4 - 1, sCutting, dSawDiam, vtRef2, nil, 0, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
|
||||
bOkd, sErrD = Fbs.MakeOne( nFace4, nGoodFace4 - 1, sCutting, dSawDiam, vtRef2, nil, BD.CUT_EXTRA, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
|
||||
if not bOkd then return bOkd, sErrD end
|
||||
-- lavoro la faccia opposta (definita dal parametro P11)
|
||||
if vFaceOrd[3] ~= 0 then
|
||||
|
||||
@@ -573,7 +573,15 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
|
||||
if not bOkc then return bOkc, sErrC end
|
||||
end
|
||||
-- recupero la lavorazione
|
||||
local sCutting = ML.FindCutting( 'TailSide')
|
||||
-- TODO questa parte andrà cambiata quando si gestiranno i volumi liberi in cui girare da mlse
|
||||
local dMinWidthForBigBlade = 300
|
||||
local dMaxHeightForBigBlade = 300
|
||||
local sCutting
|
||||
if b3Raw:getDimY() > dMinWidthForBigBlade and b3Raw:getDimZ() < dMaxHeightForBigBlade then
|
||||
sCutting = ML.FindCutting( 'TailSide', nil, nil, nil, 'Longest')
|
||||
else
|
||||
sCutting = ML.FindCutting( 'TailSide')
|
||||
end
|
||||
if not sCutting then
|
||||
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' cutting not found in library'
|
||||
EgtOutLog( sErr)
|
||||
@@ -623,10 +631,11 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
|
||||
-- caratteristiche taglio
|
||||
local dDimYRef = EgtIf( b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, dSawMaxDepth, abs( BD.MAX_DIM_HTCUT_HBEAM))
|
||||
local bBigSectionCut = ( b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) and
|
||||
( b3Raw:getDimZ() > EgtIf( BD.TURN, 2 * dMaxVertDepth, dMaxVertDepth + dSawMaxDepth2) - 2 * BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
||||
( b3Raw:getDimZ() > EgtIf( BD.TURN, 2 * dMaxVertDepth, dMaxVertDepth + dSawMaxDepth2) - 2 * BD.CUT_EXTRA + 10 * GEO.EPS_SMALL)
|
||||
local bHorizCut = ( ( b3Raw:getDimY() > b3Raw:getDimZ() + 10 * GEO.EPS_SMALL or BD.TURN) and ( b3Raw:getDimZ() < dMaxVertDepth - BD.CUT_EXTRA))
|
||||
local bDoubleHorizCut = ( ( BD.DOWN_HEAD or BD.TURN) and not bHorizCut and b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
||||
local bDoubleCut = ( not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL)
|
||||
local bDoubleCut = ( not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL) and
|
||||
( b3Raw:getDimY() < 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
|
||||
-- dati geometrici del taglio
|
||||
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
|
||||
-- separazione solo se esiste grezzo successivo con pezzi o scaricabile
|
||||
@@ -652,7 +661,10 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
|
||||
-- determino la necessità di tagli aggiuntivi
|
||||
local dMinTailScrapForAdditionalCuts = 10.123
|
||||
local bNeedVerticalAddedCuts = not bSplit and ( Proc.Face[1].WidthTrimmed > BD.MAX_LEN_DICE) and ( dLenEndRaw > dMinTailScrapForAdditionalCuts - 10 * GEO.EPS_SMALL)
|
||||
local bNeedHorizontalAddedCuts = not bSplit and ( Proc.Face[1].HeightTrimmed > ( BD.MIN_HEIGHT_ADDED_CUTS or BD.MAX_LEN_DICE)) and not bBigSectionCut and ( dLenEndRaw > dMinTailScrapForAdditionalCuts - 10 * GEO.EPS_SMALL)
|
||||
local bNeedHorizontalAddedCuts = not bSplit and not bBigSectionCut and
|
||||
( Proc.Face[1].HeightTrimmed > ( BD.MIN_HEIGHT_ADDED_CUTS or BD.MAX_LEN_DICE)) and
|
||||
( dLenEndRaw > dMinTailScrapForAdditionalCuts - 10 * GEO.EPS_SMALL) and
|
||||
dOffsL < BD.MAX_DIM_DICE
|
||||
-- dati lavorazioni sopra e sotto
|
||||
local Cutting1Data = { sCutting = sCutting, dSawDiam = dSawDiam, dMaxDepth = dSawMaxDepth, dSawThick = dSawThick, dMaxVertDepth = dMaxVertDepth}
|
||||
local Cutting2Data = { sCutting = sCutting2, dSawDiam = dSawDiam2, dMaxDepth = dSawMaxDepth2, dSawThick = dSawThick2}
|
||||
|
||||
@@ -321,9 +321,9 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
-- se contorno aperto, cambio parametri di attacco/uscita
|
||||
if not bClosed then
|
||||
EgtSetMachiningParam( MCH_MP.LITANG, 0.7 * dMillDiam)
|
||||
EgtSetMachiningParam( MCH_MP.LIPERP, 0)
|
||||
EgtSetMachiningParam( MCH_MP.LIPERP, 20)
|
||||
EgtSetMachiningParam( MCH_MP.LOTANG, 0.7 * dMillDiam)
|
||||
EgtSetMachiningParam( MCH_MP.LOPERP, 0)
|
||||
EgtSetMachiningParam( MCH_MP.LOPERP, 20)
|
||||
end
|
||||
-- imposto posizione braccio porta testa
|
||||
local nSCC = MCH_SCC.NONE
|
||||
|
||||
@@ -1,5 +1,85 @@
|
||||
==== Beam Update Log ====
|
||||
|
||||
Versione 2.7d2 (17/04/2025)
|
||||
- Added : in scanalatura aggiunta Q03 per forzare fresa
|
||||
- Modif : in slot con lama + sega a catena abilitata lavorazione da sotto per macchine con testa sopra
|
||||
- Modif : nei tagli modifche in caso di tagli di coda anticipati
|
||||
- Modif : in lavorazioni tipo tacca ma 3 facce migliorata la scelta faccia
|
||||
|
||||
Versione 2.7d1 (04/04/2025)
|
||||
- Fixed : in PreDrill piccola correzione
|
||||
- Fixed : nei tagli varie correzioni
|
||||
- Fixed : in HeadCut e Split corretto calcolo lunghezza extra di taglio
|
||||
|
||||
Versione 2.7c2 (24/03/2025)
|
||||
- Fixed : in BatchProcess (Ts7) riabilitata modifica barra erroneamente rimossa
|
||||
|
||||
Versione 2.7c1 (17/03/2025)
|
||||
- Modif : in HeadCut e Split, per decidere se fare doppio taglio verticale, si controlla anche il massimo possibile e non solo il minimo
|
||||
- Modif : in LapJoint migliorato controllo per decidere se feature di coda
|
||||
- Modif : nei tagli, se taglio rivolto verso il basso e non possibile tagliare di fianco, si fa in fase ribaltata
|
||||
- Fixed : in BatchProcess (Ts7) corretta restituzione stato feature erroneamente segnalata verde
|
||||
- Fixed : corretta restituzione stato feature lavorata in doppio
|
||||
|
||||
Versione 2.7b3 (03/03/2025)
|
||||
- Modif : in forature passanti orizzontali fatte da un solo lato, si inverte il lato di lavoro in base all'utensile scelto
|
||||
- Modif : in LapJoint in lavorazione tipo BH permessa U passante non parallela agli assi principali; attacchi migliorati
|
||||
- Modif : in LapJoint le feature di coda con pezzo lungo vengono spostate sempre dopo separazione
|
||||
- Fixed : in macchine tipo Turn piccoli miglioramenti ai tagli di lama
|
||||
|
||||
Versione 2.7b2 (05/02/2025)
|
||||
- Modif : si consentono DrillPocket in doppio solo se foro non passante
|
||||
|
||||
Versione 2.7b1 (04/02/2025)
|
||||
- Modif : in tagli di testa e coda l'utilizzo delle lame grandi (es: 1000 su 15003TMAX) è limitato ai pezzi più bassi di 300 mm e più larghi di 300 mm
|
||||
|
||||
Versione 2.7a2 (23/01/2025)
|
||||
- Added : in RidgeLap aggiunta Q05 per usare la fresa tipo LapJoint
|
||||
- Fixed : in BatchProcess (Ts7) piccola correzione
|
||||
- Fixed : in ScarfJoint, in caso di taglio dal lato, aggiunta estensione oltre il bordo
|
||||
|
||||
Versione 2.7a1 (21/01/2025)
|
||||
- Added : in FreeContour aggiunta Q09 per inversione ultima lavorazione
|
||||
- Modif : in Cut, si taglia dal basso solo se il pezzo piccolo è già staccato dalla barra
|
||||
- Modif : in BatchProcess (Ts7) aggiunta scrittura id progetto e produzione in Btm
|
||||
|
||||
Versione 2.6l2 (07/01/2025)
|
||||
- Added : in LapJoint abiitata SideMillAsBlade anche da sotto e varie migliorie
|
||||
- Modif : in LapJoint L030 aggiunto Q03=4 per lavorare con fresa evitando tasche aperte testa/coda
|
||||
- Modif : in LapJoint modifiche per gestione fresa a disco su aggregato
|
||||
- Modif : in fresature con lama o simili aggiunta la possibilità di invertire il senso di percorrenza calcolato in automatico
|
||||
- Modif : migliorie all'ordinamento
|
||||
- Fixed : in LapJoint la Q per forzare lavorazione di lato funziona solo se la feature è aperta davnti o dietro
|
||||
|
||||
Versione 2.6l1 (11/12/2024)
|
||||
- Added : aggiunta gestione slot e tagli di lama con lame molto grandi
|
||||
- Modif : in lama + motosega aggiunta gestione slot aperte con lato obliquo
|
||||
- Modif : modificata retrazione per tenoni aperti
|
||||
|
||||
Versione 2.6k2 (28/11/2024)
|
||||
- Modif : nei tagli migliorati i casi in cui si inverte l'SCC per facilitare la caduta del legno
|
||||
- Modif : nei tagli migliorato controllo rimozione del primo cubetto molto piccolo
|
||||
- Modif : nei tagli migliorati i casi con bilinea
|
||||
- Fixed : in lapjoint corretto un caso in cui si sbagliava a calcolare la dimensione della tasca
|
||||
|
||||
Versione 2.6k1 (15/11/2024)
|
||||
- Modif : in macchine tipo Fast lunghezza minima feature per considerare taglio lungo portata a 400 mm
|
||||
- Modif : in tacche si applica svuotatura anche nel caso di elevazione non raggiunta
|
||||
- Modif : in forature in doppio, se necessario, si aumenta lo step per evitare collisione tra le punte durante lavorazione
|
||||
- Fixed : in L010 correzione in utilizzo Q07 (forzatura frese)
|
||||
- Fixed : in coda di rondine corretto bug che causava un blocco anomalo del programma
|
||||
|
||||
Versione 2.6j4 (06/11/2024)
|
||||
- Fixed : corretto caso in cui i fori passanti fatti con due teste finiviano nella rotazione sbagliata, provocando un errore di chariot collision
|
||||
|
||||
Versione 2.6j3 (18/10/2024)
|
||||
- Modif : nei tagli orizzontali si inverte SCC per evitare problemi di cubetti incastrati
|
||||
- Modif : modifiche in ordinamento fori che intersecano tenoni
|
||||
- Fixed : corretto caso con fori sul tenone spostati in coda nella fase errata
|
||||
|
||||
Versione 2.6j2 (17/10/2024)
|
||||
- Fixed : in forature con precedenza corretto caso in cui il foro veniva ripetuto in rotazioni diverse
|
||||
|
||||
Versione 2.6j1 (10/10/2024)
|
||||
- Modif : se la macchina è tipo BlockHaus, i LapJoint vengono fatti prima del taglio di separazione
|
||||
- Modif : se tenone di coda è attraversato da foro allora anche il foro sarà di coda
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@
|
||||
-- Gestione della versione di Beam
|
||||
|
||||
NAME = 'Beam'
|
||||
VERSION = '2.6j1'
|
||||
VERSION = '2.7d2'
|
||||
MIN_EXE = '2.6e5'
|
||||
|
||||
Reference in New Issue
Block a user