Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7a64a68167 | |||
| 2e086f9f42 | |||
| c7e8c63f37 | |||
| 8e9de6026e | |||
| b382560cfa | |||
| 339c6acb37 | |||
| 2311ab4614 |
+43
-23
@@ -362,7 +362,7 @@ local function CollectFeatures( PartId, b3Raw, dCurrOvmH, dCurrOvmT)
|
||||
-- se foro
|
||||
if Drill.Identify( Proc) then
|
||||
-- assegno diametro e facce di ingresso e uscita (dati tabelle sempre per riferimento)
|
||||
Proc.Diam, Proc.Len, Proc.Fcs, Proc.Fce = Drill.GetData( Proc, b3Raw)
|
||||
Proc.Diam, Proc.Len, Proc.Fcs, Proc.Fce, Proc.vtDrillDir = Drill.GetData( Proc, b3Raw)
|
||||
-- verifico se devo inserire i prefori
|
||||
if Drill.IsPredrillNeeded( Proc) then
|
||||
local bAddProc, PredrillProc= Drill.AddPredrillFromDrillProc( Proc)
|
||||
@@ -391,6 +391,7 @@ local function CollectFeatures( PartId, b3Raw, dCurrOvmH, dCurrOvmT)
|
||||
Proc2.Tail = Drill.IsTailFeature( Proc2, b3Raw, dCurrOvmH)
|
||||
Proc2.Fcs = Proc.Fce
|
||||
Proc2.Fce = Proc.Fcs
|
||||
Proc2.vtDrillDir = -Proc.vtDrillDir
|
||||
Proc2.CutId = Proc.CutId
|
||||
Proc2.TaskId = Proc.TaskId
|
||||
Proc2.AdjId = Proc.AdjId
|
||||
@@ -1119,7 +1120,7 @@ local function ClassifyFeatures( vProc, b3Raw, Stats)
|
||||
end
|
||||
|
||||
-- se senza geometria (già disabilitato)
|
||||
if Proc.Flg == 0 and not Proc.Double then
|
||||
if Proc.Flg == 0 and not Proc.Double and not Proc.bGrouped then
|
||||
bOk = false
|
||||
-- se intestatura
|
||||
elseif Hcut.Identify( Proc) then
|
||||
@@ -1352,7 +1353,8 @@ local function AddFeatureMachining( Proc, nPhase, nRawId, nPartId, dCurrOvmH, bN
|
||||
-- se foratura ( 3/4-040-X)
|
||||
elseif Drill.Identify( Proc) then
|
||||
-- esecuzione foratura
|
||||
bOk, sErr = Drill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
local bUseMultiDrill = BD.USE_MULTI_DRILL
|
||||
bOk, sErr = Drill.Make( Proc, nPhase, nRawId, nPartId, bUseMultiDrill)
|
||||
-- se giunzione francese ( 1/2-035-X)
|
||||
elseif FrenchRidgeLap.Identify( Proc) then
|
||||
-- esecuzione giunzione francese
|
||||
@@ -2024,26 +2026,44 @@ function GetFeatureInfoAndDependency( vProc, b3Raw)
|
||||
-- controllo la feature con tutte le altre per recuperare le dipendenze
|
||||
for j = 1, #vProc do
|
||||
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
|
||||
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
|
||||
Proc.PassedByDtMortise = true
|
||||
end
|
||||
-- se tenone è attraversato da foro allora il foro deve essere fatto prima
|
||||
if Tenon.Identify( Proc) and Drill.Identify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then
|
||||
Proc.PassedByHole = true
|
||||
end
|
||||
-- verifiche per specchiature
|
||||
if BD.DOWN_HEAD or BD.TWO_EQUAL_HEADS then
|
||||
-- forature
|
||||
if BD.DOUBLE_HEAD_DRILLING and Drill.Identify( Proc) and Drill.Identify( ProcB) and not Proc.Mirror then
|
||||
if AreDrillingsMirrored( Proc, ProcB, b3Raw) then
|
||||
Proc.Mirror = ProcB
|
||||
-- se non è la stessa feature
|
||||
if Proc.Id ~= ProcB.Id then
|
||||
-- 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
|
||||
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
|
||||
Proc.PassedByDtMortise = true
|
||||
end
|
||||
-- se tenone è attraversato da foro allora il foro deve essere fatto prima
|
||||
if Tenon.Identify( Proc) and Drill.Identify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then
|
||||
Proc.PassedByHole = true
|
||||
end
|
||||
-- verifiche per specchiature
|
||||
if BD.DOWN_HEAD or BD.TWO_EQUAL_HEADS then
|
||||
-- forature
|
||||
if BD.DOUBLE_HEAD_DRILLING and Drill.Identify( Proc) and Drill.Identify( ProcB) and not Proc.Mirror then
|
||||
if AreDrillingsMirrored( Proc, ProcB, b3Raw) then
|
||||
Proc.Mirror = ProcB
|
||||
end
|
||||
end
|
||||
end
|
||||
-- raggruppamento fori appartenenti allo stesso spezzone di trave
|
||||
if Drill.Identify( Proc) and Proc.Flg ~= 0 and Drill.Identify( ProcB) and ProcB.Flg ~= 0 then
|
||||
local dDrillRange = EgtIf( b3Raw:getDimX() < BD.LEN_SHORT_PART, BD.DRILL_RANGE_SP or BD.LONGCUT_ENDLEN/3, BD.DRILL_RANGE or BD.LONGCUT_ENDLEN)
|
||||
local nXSegmentProc = ceil( ( Proc.Box:getCenter():getX() - b3Raw:getMin():getX()) / dDrillRange)
|
||||
local nXSegmentProcB = ceil( ( ProcB.Box:getCenter():getX() - b3Raw:getMin():getX()) / dDrillRange)
|
||||
-- se fanno parte dello stesso spezzone, scrivo info geometria nella prima e disattivo la seconda
|
||||
if nXSegmentProc == nXSegmentProcB and Proc.Diam == ProcB.Diam and AreSameVectorApprox( Proc.vtDrillDir, ProcB.vtDrillDir) then
|
||||
if not Proc.OtherGeometries then
|
||||
Proc.OtherGeometries = {}
|
||||
end
|
||||
table.insert( Proc.OtherGeometries, ProcB)
|
||||
ProcB.Flg = 0
|
||||
ProcB.bGrouped = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -214,7 +214,7 @@ function GetMachinings( MachiningType, sType)
|
||||
Machining.Tool.MaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
|
||||
end
|
||||
if MachiningType == MCH_MY.DRILLING then
|
||||
if EgtStartsWith( Machining.Type, 'Drill') then
|
||||
if EgtStartsWith( Machining.Type, 'Drill') or EgtStartsWith( Machining.Type, 'MultiDrill') then
|
||||
Machining.SubType = 'Drill'
|
||||
elseif EgtStartsWith( Machining.Type, 'AngleDrill') then
|
||||
Machining.SubType = 'AngleDrill'
|
||||
@@ -297,7 +297,7 @@ end
|
||||
function ReturnParams( MachiningType, MachiningName, sType, ToolParams)
|
||||
if MachiningType == MCH_MY.DRILLING then
|
||||
local _, sOrigType = EgtEndsWith( sType, '_H2')
|
||||
return MachiningName, sType, EgtIf( sOrigType == 'Drill' or sOrigType == 'Drill_AT' or sOrigType == 'AngleDrill' or sOrigType == 'Predrill' , ToolParams.TMaxMat, ToolParams.TMaxDepth), ToolParams.MaxToolLength, ToolParams.ToolDiam, ToolParams.DiamTh, ToolParams.FreeLen
|
||||
return MachiningName, sType, EgtIf( sOrigType == 'Drill' or sOrigType == 'MultiDrill' or sOrigType == 'Drill_AT' or sOrigType == 'AngleDrill' or sOrigType == 'Predrill' , ToolParams.TMaxMat, ToolParams.TMaxDepth), ToolParams.MaxToolLength, ToolParams.ToolDiam, ToolParams.DiamTh, ToolParams.FreeLen
|
||||
elseif MachiningType == MCH_MY.SAWING then
|
||||
return MachiningName, ToolParams.H2
|
||||
elseif MachiningType == MCH_MY.MILLING then
|
||||
@@ -455,10 +455,13 @@ function MachiningLib.FindCutting( sType, bTopHead, bDownHead)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function MachiningLib.FindDrilling( dDiam, dDepth, bTopHead, bDownHead, bExcludeH2, bAngleTransmission, bIsPredrill)
|
||||
function MachiningLib.FindDrilling( dDiam, dDepth, bTopHead, bDownHead, bExcludeH2, bAngleTransmission, bIsPredrill, bIsMultidrill)
|
||||
local MachiningName, MachiningType, Param1, Param2, Param3, Param4, Param5, sTypeMach
|
||||
-- se la macchina ha gruppi a forare, si prova con quelli
|
||||
if bIsMultidrill then
|
||||
sTypeMach = 'MultiDrill'
|
||||
-- se il foro è un predrill, cerco solo punte abilitate al Predrill
|
||||
if bIsPredrill then
|
||||
elseif bIsPredrill then
|
||||
sTypeMach = 'Predrill'
|
||||
else
|
||||
sTypeMach = EgtIf( bAngleTransmission, 'Drill_AT', 'Drill')
|
||||
|
||||
+46
-11
@@ -102,8 +102,8 @@ end
|
||||
function ProcessDrill.GetData( Proc, b3Raw)
|
||||
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
|
||||
-- verifico se foro da adattare
|
||||
local nNewAuxId
|
||||
if EgtExistsInfo( Proc.Id, 'DiamUser') then
|
||||
local nNewAuxId
|
||||
if AuxId then nNewAuxId = AuxId + Proc.Id end
|
||||
if AuxId and EgtGetType( nNewAuxId) == GDB_TY.CRV_ARC and BD.USER_HOLE_DIAM and BD.USER_HOLE_DIAM > 1 then
|
||||
EgtModifyArcRadius( nNewAuxId, BD.USER_HOLE_DIAM / 2)
|
||||
@@ -115,7 +115,13 @@ function ProcessDrill.GetData( Proc, b3Raw)
|
||||
-- recupero faccia di entrata e uscita
|
||||
local nFcs = EgtGetInfo( Proc.Id, 'FCS', 'i') or 0
|
||||
local nFce = EgtGetInfo( Proc.Id, 'FCE', 'i') or 0
|
||||
return dDiam, dLen, nFcs, nFce
|
||||
|
||||
local vtDrillDir
|
||||
if AuxId then
|
||||
nNewAuxId = AuxId + Proc.Id
|
||||
vtDrillDir = EgtCurveExtrusion( nNewAuxId, GDB_RT.GLOB)
|
||||
end
|
||||
return dDiam, dLen, nFcs, nFce, vtDrillDir
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
@@ -314,7 +320,7 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- Applicazione della lavorazione
|
||||
function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, bUseMultiDrill)
|
||||
-- default per costanti
|
||||
BD.DRILL_VX_MAX_ANGLEDRILL = ( BD.DRILL_VX_MAX_ANGLEDRILL or 0.928)
|
||||
-- ingombro del pezzo
|
||||
@@ -387,9 +393,9 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
end
|
||||
-- primo gruppo di controlli con lunghezza utensile pari a metà foro se passante
|
||||
-- recupero la lavorazione
|
||||
local sDrilling, sType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, dCheckDepth, bDrillUp, bDrillDown, bExcludeH2, bDrillAngTrasm, Proc.IsPredrill)
|
||||
local sDrilling, sType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, dCheckDepth, bDrillUp, bDrillDown, bExcludeH2, bDrillAngTrasm, Proc.IsPredrill, bUseMultiDrill)
|
||||
if not sDrilling and dCheckDepth then
|
||||
sDrilling, sType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, 0, bDrillUp, bDrillDown, bExcludeH2, bDrillAngTrasm, Proc.IsPredrill)
|
||||
sDrilling, sType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, 0, bDrillUp, bDrillDown, bExcludeH2, bDrillAngTrasm, Proc.IsPredrill, bUseMultiDrill)
|
||||
if sDrilling then dCheckDepth = nil end
|
||||
end
|
||||
if not sDrilling then
|
||||
@@ -554,16 +560,33 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
return false, sErr
|
||||
end
|
||||
-- aggiungo geometria
|
||||
EgtSetMachiningGeometry( {{ AuxId, -1}})
|
||||
if Proc.SkippedGeometries and #Proc.SkippedGeometries > 0 then
|
||||
EgtSetMachiningGeometry( Proc.SkippedGeometries)
|
||||
Proc.SkippedGeometries = nil
|
||||
elseif Proc.OtherGeometries and #Proc.OtherGeometries > 0 then
|
||||
local HolesGeometries = {}
|
||||
-- aggiungo foro principale
|
||||
table.insert( HolesGeometries, { AuxId, -1})
|
||||
-- aggiungo altre geometrie connesse
|
||||
for i = 1, #Proc.OtherGeometries do
|
||||
-- recupero geometria da lavorare
|
||||
local OtherAuxId = Proc.OtherGeometries[i].Id + EgtGetInfo( Proc.OtherGeometries[i].Id, 'AUXID', 'i')
|
||||
local Geometry = { OtherAuxId, -1}
|
||||
table.insert( HolesGeometries, Geometry)
|
||||
end
|
||||
EgtSetMachiningGeometry( HolesGeometries)
|
||||
else
|
||||
EgtSetMachiningGeometry( {{ AuxId, -1}})
|
||||
end
|
||||
-- eventuale inversione
|
||||
if sType == 'Drill' or sType == 'Drill_H2' or sType == 'Drill_AT' or sType == 'AngleDrill' or sType == 'Predrill' then
|
||||
if sType == 'Drill' or sType == 'MultiDrill' or sType == 'Drill_H2' or sType == 'Drill_AT' or sType == 'AngleDrill' or sType == 'Predrill' then
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, bToInvert)
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, bToInvert)
|
||||
end
|
||||
-- imposto posizione braccio porta testa
|
||||
local nSCC = MCH_SCC.NONE
|
||||
if bDrillAngTrasm then
|
||||
if bDrillAngTrasm or bUseMultiDrill then
|
||||
nSCC = MCH_SCC.ADIR_NEAR
|
||||
elseif not BD.C_SIMM and not BD.TURN then
|
||||
nSCC = MCH_SCC.ADIR_YM
|
||||
@@ -623,16 +646,28 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
-- eseguo
|
||||
local bOk = ML.ApplyMachining( true, false)
|
||||
if not bOk and bDownDrill and bOpen and abs( Proc.Flg) == 1 then
|
||||
if sType == 'Drill' or sType == 'Drill_H2' or sType == 'AngleDrill' then
|
||||
if sType == 'Drill' or sType == 'MultiDrill' or sType == 'Drill_H2' or sType == 'AngleDrill' then
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
|
||||
end
|
||||
bOk = ML.ApplyMachining( true, false)
|
||||
end
|
||||
|
||||
-- in caso di fori raggruppati, mi faccio restituire gli eventuali fori saltati
|
||||
local SkippedGeometries = {}
|
||||
SkippedGeometries = EgtGetMachiningSkippedGeometry()
|
||||
if SkippedGeometries and #SkippedGeometries > 0 and bUseMultiDrill then
|
||||
if #SkippedGeometries == #Proc.OtherGeometries + 1 then
|
||||
EgtRemoveOperation( nMchId)
|
||||
end
|
||||
Proc.SkippedGeometries = SkippedGeometries
|
||||
ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, false)
|
||||
end
|
||||
|
||||
if not bOk then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sErr
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
@@ -645,7 +680,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
end
|
||||
|
||||
return true, sMyWarn
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
return ProcessDrill
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
==== Beam Update Log ====
|
||||
|
||||
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
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@
|
||||
-- Gestione della versione di Beam
|
||||
|
||||
NAME = 'Beam'
|
||||
VERSION = '2.6k1'
|
||||
VERSION = '2.6k2'
|
||||
MIN_EXE = '2.6e5'
|
||||
|
||||
Reference in New Issue
Block a user