Compare commits
17 Commits
Ticket#2391_b
...
2.7l3
| Author | SHA1 | Date | |
|---|---|---|---|
| 3cd3557b12 | |||
| 70b0c3d3d2 | |||
| 2798616813 | |||
| fa74016932 | |||
| f309179270 | |||
| 9a6e4f8904 | |||
| ba2ff5a7a7 | |||
| d10b99dc3c | |||
| 743270ed4d | |||
| ad0f4048aa | |||
| cb7a114124 | |||
| b9a9ce1479 | |||
| 812adeed34 | |||
| 4b41948819 | |||
| 77599a8c68 | |||
| 4f43d74d41 | |||
| 92d0ac2e93 |
+166
-61
@@ -576,11 +576,6 @@ function BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, dOvmMid, vBeam, b
|
||||
-- salvo nota con lunghezza grezzo
|
||||
-- Recupero l'identificativo del gruppo di lavoro corrente
|
||||
local nMGrpId = EgtGetCurrMachGroup()
|
||||
-- Lunghezza della barra
|
||||
local dBarLen = EgtGetInfo( nMGrpId, 'BARLEN', 'd')
|
||||
if not dBarLen then
|
||||
EgtSetInfo( nMGrpId, 'BARLEN', dRawL)
|
||||
end
|
||||
|
||||
-- Area tavola
|
||||
local b3Tab = EgtGetTableArea()
|
||||
@@ -592,6 +587,18 @@ function BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, dOvmMid, vBeam, b
|
||||
-- Impostazione dell'attrezzaggio di default
|
||||
EgtImportSetup()
|
||||
|
||||
-- se pretagli di coda sono attivi, aumento di 10mm la lunghezza del grezzo per fare effettivamente tagliare del materiale.
|
||||
-- Altrimenti le lavorazioni pensano di essere nel vuoto e si muovono in rapido
|
||||
if BD.PRECUT_TAIL and VerifyBigSectionCut( dRawW, dRawH) then
|
||||
dRawL = dRawL + 10
|
||||
end
|
||||
|
||||
-- Lunghezza della barra
|
||||
local dBarLen = EgtGetInfo( nMGrpId, 'BARLEN', 'd')
|
||||
if not dBarLen then
|
||||
EgtSetInfo( nMGrpId, 'BARLEN', dRawL)
|
||||
end
|
||||
|
||||
-- Inserimento dei pezzi con il loro grezzo
|
||||
local Cnt = 0
|
||||
local Len = dRawL
|
||||
@@ -617,12 +624,16 @@ function BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, dOvmMid, vBeam, b
|
||||
local vProc = CollectFeatures( Pz, b3Solid, 0)
|
||||
local bSFinishingNeeded, nReplacedHeadCutFeatureId, nHeadCuttingFeatureId = AnalyzeHeadFeatures( b3Solid, vProc, dRawW, dRawH)
|
||||
local bEFinishingNeeded, nReplacedTailCutFeatureId, nTailCuttingFeatureId = AnalyzeTailFeatures( b3Solid, vProc, dRawW, dRawH)
|
||||
-- Scrivo gli di delle facce di taglio custom: serviranno dopo per calcolare l'elevazione rispetto a queste
|
||||
-- Scrivo gli id delle facce di taglio custom: serviranno dopo per calcolare l'elevazione rispetto a queste
|
||||
if nHeadCuttingFeatureId then
|
||||
EgtSetInfo( vBeam[i].Id, 'HEADCUTFEATUREID', nHeadCuttingFeatureId)
|
||||
else
|
||||
EgtRemoveInfo( vBeam[i].Id, 'HEADCUTFEATUREID')
|
||||
end
|
||||
if nTailCuttingFeatureId then
|
||||
EgtSetInfo( vBeam[i].Id, 'TAILCUTFEATUREID', nTailCuttingFeatureId)
|
||||
else
|
||||
EgtRemoveInfo( vBeam[i].Id, 'TAILCUTFEATUREID')
|
||||
end
|
||||
if bBigSectionCut then
|
||||
-- lascio in coda solo il materiale necessario; il resto verrà tolto nell'head cut successivo
|
||||
@@ -870,6 +881,45 @@ local function ReorderTruncatingCuts( vProc, nPartId)
|
||||
return true
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
-- mi assicuro che vengano rispettate le dipendenze tra le feature
|
||||
local function ReorderFeatureWithDependency( vProc)
|
||||
-- si riordina considerando le dipendenze con alcuni limiti:
|
||||
-- * se ci sono dipendenze incrociate il risultato finale non è controllato ( A->B e B->C e C->A)
|
||||
-- * se ci sono dipendenze opposte va in errore ( A->B e B->A)
|
||||
|
||||
-- si sistemano le feature da lavorare prima
|
||||
local i = 1
|
||||
local nMaxIter = ( #vProc * #vProc) + 1
|
||||
local nIter = 0
|
||||
while i <= #vProc do
|
||||
nIter = nIter + 1
|
||||
if nIter > nMaxIter then
|
||||
error( "UNEXPECTED ERROR ON DEPENDENCY")
|
||||
end
|
||||
|
||||
-- si controllano solo i fori
|
||||
if Drill.Identify( vProc[i]) and vProc[i].Dependency and vProc[i].Dependency.ExecBefore and vProc[i].Dependency.ExecBefore.Id then
|
||||
local nRefId = vProc[i].Dependency.ExecBefore.Id
|
||||
local nRefIndex
|
||||
|
||||
for j = 1, #vProc do
|
||||
if i ~= j and vProc[j].Id == nRefId then
|
||||
nRefIndex = j
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
-- se il processo deve stare prima, ma ora è dopo
|
||||
if nRefIndex and nRefIndex < i then
|
||||
table.insert( vProc, nRefIndex, table.remove( vProc, i))
|
||||
i = max( nRefIndex - 1, 1)
|
||||
end
|
||||
end
|
||||
i = i + 1
|
||||
end
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function OrderFeatures( vProc, b3Raw, nPartId)
|
||||
|
||||
@@ -899,6 +949,13 @@ local function OrderFeatures( vProc, b3Raw, nPartId)
|
||||
if Hcut.Identify( B2) then
|
||||
return false
|
||||
end
|
||||
-- se uno dipende dall'altro
|
||||
if B1.Dependency and B1.Dependency.ExecBefore and B1.Dependency.ExecBefore.Id == B2.Id then
|
||||
return true
|
||||
end
|
||||
if B2.Dependency and B2.Dependency.ExecBefore and B2.Dependency.ExecBefore.Id == B1.Id then
|
||||
return false
|
||||
end
|
||||
-- se uno di testa e non l'altro, privilegio quello di testa (a meno che non siano dei fori)
|
||||
if B1.Head ~= B2.Head and not Drill.Identify(B1) and not Drill.Identify(B2) then
|
||||
return B1.Head
|
||||
@@ -1192,6 +1249,9 @@ local function OrderFeatures( vProc, b3Raw, nPartId)
|
||||
end
|
||||
|
||||
ReorderTruncatingCuts( vProc, nPartId)
|
||||
|
||||
-- si riverificano feature con dipendenze
|
||||
ReorderFeatureWithDependency( vProc)
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
@@ -2036,14 +2096,18 @@ local function SetDrillingsToMachineAfterHeadOrTailCut( vProc, vMachineBeforeInt
|
||||
if vDistHead and #vDistHead > 0 then
|
||||
-- verifico che il foro sia di testa
|
||||
if ( bOpen or ( not bOpen and vtExtr:getX() > 0 and vProc[i].Fcs ~= 0) or ( not bOpen and vtExtr:getX() < 0 and vProc[i].Fce ~= 0)) then
|
||||
vProc[i].MachineAfterHeadCutId = vMachineBeforeIntersectingDrillings.Head.Id
|
||||
if vProc[i].Dependency and vProc[i].Dependency.ExecAfter and vProc[i].Dependency.ExecAfter.Id == vMachineBeforeIntersectingDrillings.Head.Id then
|
||||
vProc[i].MachineAfterHeadCutId = vMachineBeforeIntersectingDrillings.Head.Id
|
||||
end
|
||||
vProc[i].Head = true
|
||||
end
|
||||
-- se esiste intersezione tra il foro e la feature di coda
|
||||
elseif vDistTail and #vDistTail > 0 then
|
||||
-- verifico che il foro sia di coda
|
||||
if ( bOpen or ( not bOpen and vtExtr:getX() < 0 and vProc[i].Fcs ~= 0) or ( not bOpen and vtExtr:getX() > 0 and vProc[i].Fce ~= 0)) then
|
||||
vProc[i].MachineAfterTailCutId = vMachineBeforeIntersectingDrillings.Tail.Id
|
||||
if vProc[i].Dependency and vProc[i].Dependency.ExecAfter and vProc[i].Dependency.ExecAfter.Id == vMachineBeforeIntersectingDrillings.Tail.Id then
|
||||
vProc[i].MachineAfterTailCutId = vMachineBeforeIntersectingDrillings.Tail.Id
|
||||
end
|
||||
vProc[i].Tail = true
|
||||
end
|
||||
end
|
||||
@@ -2051,6 +2115,7 @@ local function SetDrillingsToMachineAfterHeadOrTailCut( vProc, vMachineBeforeInt
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function AreDrillingsMirrored( Proc, ProcMirror, b3Raw)
|
||||
if Proc.Id == ProcMirror.Id then return false end
|
||||
@@ -2117,63 +2182,103 @@ end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
function GetFeatureInfoAndDependency( vProc, b3Raw, nPartId)
|
||||
-- ciclo tutte le feature
|
||||
for i = 1, #vProc do
|
||||
local Proc = vProc[i]
|
||||
-- calcolo topologia della feature
|
||||
if NeedTopologyFeature( Proc) then
|
||||
Topology.Classify( Proc, b3Raw)
|
||||
-- se non richiesto, setto 'SPECIAL'
|
||||
else
|
||||
Proc.Topology = 'SPECIAL'
|
||||
Proc.TopologyLongName = Proc.Topology
|
||||
end
|
||||
-- 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
|
||||
-- se foro in coda non setto la dipendenza
|
||||
if not ProcB.AffectedFaces.Left then
|
||||
Proc.PassedByHole = true
|
||||
ProcB.Dependency = {}
|
||||
ProcB.Dependency.ExecBefore = Proc
|
||||
end
|
||||
if vProc and #vProc > 0 and nPartId then
|
||||
-- recupero ID per tagli troncanti testa e coda
|
||||
local nHeadCuttingFeatureId = EgtGetInfo( nPartId, 'HEADCUTFEATUREID', 'i') or 0
|
||||
local nTailCuttingFeatureId = EgtGetInfo( nPartId, 'TAILCUTFEATUREID', 'i') or 0
|
||||
-- ciclo tutte le feature
|
||||
for i = 1, #vProc do
|
||||
local Proc = vProc[i]
|
||||
-- calcolo topologia della feature
|
||||
if NeedTopologyFeature( Proc) then
|
||||
Topology.Classify( Proc, b3Raw)
|
||||
-- se non richiesto, setto 'SPECIAL'
|
||||
else
|
||||
Proc.Topology = 'SPECIAL'
|
||||
Proc.TopologyLongName = Proc.Topology
|
||||
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) and DtMortise.IsDeeper( ProcB, b3Raw) 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
|
||||
-- controllo la feature con tutte le altre per recuperare le dipendenze
|
||||
for j = 1, #vProc do
|
||||
-- non si controlla feature con sé stessa
|
||||
if i ~= j then
|
||||
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
|
||||
-- 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) and DtMortise.IsDeeper( ProcB, b3Raw) 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
|
||||
-- se taglio attraversato da foro, si definisce precedenza in base ad angolo
|
||||
if Drill.Identify( Proc) and Cut.Identify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then
|
||||
-- recupero e verifico l'entità foro
|
||||
local DrillAuxId = ( EgtGetInfo( Proc.Id, 'AUXID', 'i') or 0) + Proc.Id
|
||||
local vtDrillExtr = EgtCurveExtrusion( DrillAuxId, GDB_RT.GLOB)
|
||||
local bOpen = ( Proc.Fce ~= 0) and ( Proc.Fce ~= Proc.Fcs)
|
||||
local ptCut, vtCutN = EgtSurfTmFacetCenter( ProcB.Id, 0, GDB_ID.ROOT)
|
||||
local dMaxAngleDrillOnCut = BD.MAX_ANGLE_DRILL_CUT or 10
|
||||
if GetAngle( vtDrillExtr, vtCutN) > dMaxAngleDrillOnCut then
|
||||
if bOpen and GetAngle( -vtDrillExtr, vtCutN) < dMaxAngleDrillOnCut then
|
||||
ProcB.Dependency = {}
|
||||
ProcB.Dependency.ExecBefore = Proc
|
||||
Proc.Dependency = {}
|
||||
Proc.Dependency.ExecAfter = ProcB
|
||||
else
|
||||
Proc.Dependency = {}
|
||||
Proc.Dependency.ExecBefore = ProcB
|
||||
ProcB.Dependency = {}
|
||||
ProcB.Dependency.ExecAfter = Proc
|
||||
end
|
||||
else
|
||||
ProcB.Dependency = {}
|
||||
ProcB.Dependency.ExecBefore = Proc
|
||||
Proc.Dependency = {}
|
||||
Proc.Dependency.ExecAfter = ProcB
|
||||
end
|
||||
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
|
||||
-- verifiche per tagli troncanti testa e coda: devono sempre essere subito dopo il taglio di testa e il taglio di coda, rispettivamente
|
||||
if Proc.Prc == 340 and ProcB == nHeadCuttingFeatureId then
|
||||
Proc.Dependency = {}
|
||||
Proc.Dependency.ExecBefore = ProcB
|
||||
elseif Proc == nHeadCuttingFeatureId and ProcB.Prc == 340 then
|
||||
ProcB.Dependency = {}
|
||||
ProcB.Dependency.ExecBefore = Proc
|
||||
elseif Proc.Prc == 350 and ProcB == nTailCuttingFeatureId then
|
||||
Proc.Dependency = {}
|
||||
Proc.Dependency.ExecBefore = ProcB
|
||||
elseif Proc == nTailCuttingFeatureId and ProcB.Prc == 350 then
|
||||
ProcB.Dependency = {}
|
||||
ProcB.Dependency.ExecBefore = Proc
|
||||
end
|
||||
-- se una feature deve essere lavorata prima dei tagli troncanti, si setta che non esiste taglio troncante
|
||||
if Proc.Dependency and Proc.Dependency.ExecBefore and Proc.Dependency.ExecBefore.Id == nHeadCuttingFeatureId then
|
||||
-- EgtRemoveInfo( nPartId, 'HEADCUTFEATUREID')
|
||||
end
|
||||
if Proc.Dependency and Proc.Dependency.ExecBefore and Proc.Dependency.ExecBefore.Id == nTailCuttingFeatureId then
|
||||
-- EgtRemoveInfo( nPartId, 'TAILCUTFEATUREID')
|
||||
end
|
||||
end
|
||||
end
|
||||
-- verifiche per tagli troncanti testa e coda: devono sempre essere subito dopo il taglio di testa e il taglio di coda, rispettivamente
|
||||
local nHeadCuttingFeatureId = EgtGetInfo( nPartId, 'HEADCUTFEATUREID', 'i')
|
||||
local nTailCuttingFeatureId = EgtGetInfo( nPartId, 'TAILCUTFEATUREID', 'i')
|
||||
if Proc.Prc == 340 and ProcB == nHeadCuttingFeatureId then
|
||||
Proc.Dependency = {}
|
||||
Proc.Dependency.ExecBefore = ProcB
|
||||
elseif Proc == nHeadCuttingFeatureId and ProcB.Prc == 340 then
|
||||
ProcB.Dependency = {}
|
||||
ProcB.Dependency.ExecBefore = Proc
|
||||
elseif Proc.Prc == 350 and ProcB == nTailCuttingFeatureId then
|
||||
Proc.Dependency = {}
|
||||
Proc.Dependency.ExecBefore = ProcB
|
||||
elseif Proc == nTailCuttingFeatureId and ProcB.Prc == 350 then
|
||||
ProcB.Dependency = {}
|
||||
ProcB.Dependency.ExecBefore = Proc
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
+1
-1
@@ -423,7 +423,7 @@ function DiceCut.GetDice( nParent, BBoxRawPart, ptCPlanes, vtNPlanes, bGetOrtoPl
|
||||
-- se piani non ortogonali, diminuisco la distanza di offset opportunamente
|
||||
local originalOffsetP = OffsetP
|
||||
if not bGetOrtoPlanes then
|
||||
local dCoeff = ( vtNPlanes ^ vtNBond):len()
|
||||
local dCoeff = max( ( vtNPlanes ^ vtNBond):len(), 0.5)
|
||||
OffsetP = OffsetP * dCoeff
|
||||
OffsetO = OffsetO * dCoeff
|
||||
end
|
||||
|
||||
@@ -139,6 +139,7 @@ end
|
||||
---------------------------------------------------------------------
|
||||
function VerifyMill( Machining, dDepth, sTuuidMstr, dMaxDiam, dMaxTotLen, bH2)
|
||||
if ( not dDepth or Machining.Tool.MaxMat > dDepth - GEO.EPS_SMALL) and
|
||||
( Machining.Type ~= 'FloatingAggregate' or abs( Machining.Tool.MaxMat - dDepth) < 100 * GEO.EPS_SMALL) and
|
||||
( not sTuuidMstr or sTuuidMstr == Machining.Tool.UUID) and
|
||||
( not dMaxDiam or Machining.Tool.Diameter < dMaxDiam + GEO.EPS_SMALL) and
|
||||
( not dMaxTotLen or Machining.Tool.TotalLength < dMaxTotLen + GEO.EPS_SMALL) then
|
||||
@@ -227,7 +228,11 @@ function GetMachinings( MachiningType, sType)
|
||||
table.insert( validMachinings, Machining)
|
||||
-- se non è tastatura, recupero dati utensile
|
||||
if MachiningType ~= MCH_MY.PROBING then
|
||||
if ( MachiningType == MCH_MY.MILLING) or ( MachiningType == MCH_MY.POCKETING) or ( MachiningType == MCH_MY.DRILLING and EgtStartsWith( sType, 'Pocket')) then
|
||||
-- caso speciale utensile su aggregato flottante
|
||||
if MachiningType == MCH_MY.MILLING and sType == 'FloatingAggregate' then
|
||||
local sNotes = EgtTdbGetCurrToolParam( MCH_TP.USERNOTES)
|
||||
Machining.Tool.MaxMat = EgtGetValInNotes( sNotes, 'TOOL_OVERHANG', 'd') or -1
|
||||
elseif ( MachiningType == MCH_MY.MILLING) or ( MachiningType == MCH_MY.POCKETING) or ( MachiningType == MCH_MY.DRILLING and EgtStartsWith( sType, 'Pocket')) then
|
||||
Machining.Tool.MaxMat = EgtTdbGetCurrToolMaxDepth()
|
||||
else
|
||||
Machining.Tool.MaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
|
||||
|
||||
@@ -527,6 +527,17 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
dMaxDepth = min( dMaxDepth, max( dToolFreeLen - dSubL, 0))
|
||||
-- Verifico inclinazione foro nei limiti
|
||||
local bTryDrill = EgtIf( dMaxDepth > 0, ( CosB < BD.DRILL_VX_MAX), false)
|
||||
-- se il foro deve essere eseguito dopo un taglio, potrebbe essere perchè il taglio crea una superficie perpendicolare
|
||||
if Proc.Dependency and Proc.Dependency.ExecAfter then
|
||||
local ptCut, vtCutN = EgtSurfTmFacetCenter( Proc.Dependency.ExecAfter.Id, 0, GDB_ID.ROOT)
|
||||
local dMaxAngleDrillOnCut = BD.MAX_ANGLE_DRILL_CUT or 10
|
||||
local dAngle = GetAngle( vtExtr, vtCutN)
|
||||
CosB = cos( dAngle)
|
||||
if dAngle < dMaxAngleDrillOnCut then
|
||||
-- controllo di essere nei limiti
|
||||
bTryDrill = true
|
||||
end
|
||||
end
|
||||
if ( CosB > 0.8 * BD.DRILL_VX_MAX and CosB < BD.DRILL_VX_MAX_ANGLEDRILL) then
|
||||
-- cerco le forature speciali AngleDrill
|
||||
local sDrilling3, sType3, dMaxDepth3 = ML.FindAngleDrilling( dDiam, dCheckDepth, bDrillUp, bDrillDown)
|
||||
|
||||
@@ -151,6 +151,8 @@ local Q_SAW_PLUS_CHAIN = '' -- i
|
||||
local Q_FORCE_CHAINSAW = '' -- i
|
||||
local Q_CHAINSAW_FROM_SIDE = '' -- i
|
||||
local Q_MILL_AS_BLADE_CONVENTIONAL = '' -- i
|
||||
local Q_CLEAN_CORNER = '' -- 1
|
||||
local Q_FLOATING_AGGREGATE = '' -- i
|
||||
|
||||
-- variabile smussi
|
||||
local bMadeChamfer
|
||||
@@ -201,6 +203,7 @@ local function AssignQIdent( Proc)
|
||||
Q_CHAINSAW_FROM_SIDE = 'Q999'
|
||||
Q_MILL_AS_BLADE_CONVENTIONAL = ''
|
||||
Q_CLEAN_CORNER = ''
|
||||
Q_FLOATING_AGGREGATE = ''
|
||||
|
||||
if ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 16 then
|
||||
Q_FORCE_BLADE = 'Q01' -- i
|
||||
@@ -229,6 +232,7 @@ local function AssignQIdent( Proc)
|
||||
Q_DEPTH_CHAMFER = 'Q07' -- d
|
||||
Q_MILL_AS_BLADE_CONVENTIONAL = 'Q14' -- i
|
||||
Q_CLEAN_CORNER = 'Q15' -- i
|
||||
Q_FLOATING_AGGREGATE = 'Q16' -- i
|
||||
elseif ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 30 then
|
||||
Q_BLADE_ON_ALONG_FACE = 'Q04' -- i
|
||||
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 32 then
|
||||
@@ -6897,8 +6901,77 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
if dH * dV < 0.9 * ( bBoxF:getDimX() * bBoxF:getDimY()) and nFacInd2 and dFacElev2 < 1.5 * dFacElev and not ( Proc.Topology == 'Groove' and Proc.Fct == 2) then
|
||||
bSpecial3faces = true
|
||||
end
|
||||
|
||||
local bPocketFloatingAggregate = false
|
||||
-- se abilitata lavorazione con aggregato flottante
|
||||
local sMillingFloatingAggregate
|
||||
if Proc.Topology == 'Groove' and Proc.Fct == 4 and EgtGetInfo( Proc.Id, Q_FLOATING_AGGREGATE, 'i') == 1 then
|
||||
-- verifico se è possibile lavorare con utensile su aggregato flottante
|
||||
sMillingFloatingAggregate = ML.FindMilling( 'FloatingAggregate', dFacElev, nil, min( dH , dV))
|
||||
if sMillingFloatingAggregate then
|
||||
if EgtMdbSetCurrMachining( sMillingFloatingAggregate) then
|
||||
local sTuuidPk = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuidPk) or '') then
|
||||
local dToolDiameter = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
||||
-- la larghezza della tasca non può superare il doppio del diametro, la lavorazione deve essere fatta con una passata di contornatura
|
||||
if min( dH , dV) < dToolDiameter * 1.9 then
|
||||
bPocketFloatingAggregate = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- se posso in effetti fare fresatura con aggregato flottante
|
||||
if bPocketFloatingAggregate then
|
||||
-- inserisco la lavorazione di svuotatura
|
||||
local sName = 'Float_Mill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||
local nMchFId = EgtAddMachining( sName, sMillingFloatingAggregate)
|
||||
if not nMchFId then
|
||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sMillingFloatingAggregate
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
|
||||
-- aggiungo geometria
|
||||
local Geometry = {}
|
||||
for Index = 1, Proc.Fct do
|
||||
if nFacInd ~= Index-1 then
|
||||
table.insert( Geometry, { Proc.Id, Index-1})
|
||||
end
|
||||
end
|
||||
EgtSetMachiningGeometry( Geometry)
|
||||
|
||||
-- imposto uso faccia
|
||||
local nFaceUse = BL.GetNearestParalOpposite( vtN)
|
||||
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
|
||||
-- piccolo offser radiale per essere sicuri di lavorare anche con tasca larga come diametro fresa
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, -0.01)
|
||||
|
||||
-- imposto posizione braccio porta testa
|
||||
local nSCC = MCH_SCC.NONE
|
||||
if not BD.C_SIMM then
|
||||
if AreSameVectorApprox( vtN, Z_AX()) then
|
||||
nSCC = MCH_SCC.ADIR_YM
|
||||
elseif abs( vtN:getX()) < 0.1 then
|
||||
nSCC = EgtIf( BL.IsPartFinalPhase( nPhase), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
|
||||
elseif vtN:getY() < GEO.EPS_SMALL then
|
||||
nSCC = MCH_SCC.ADIR_YP
|
||||
else
|
||||
nSCC = MCH_SCC.ADIR_YM
|
||||
end
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||
|
||||
-- eseguo
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
end
|
||||
|
||||
-- se riconosciuta gestione 3 facce (limitatamente per ora alla feature 20)
|
||||
if bSpecial3faces and Proc.Prc == 20 then
|
||||
elseif bSpecial3faces and Proc.Prc == 20 then
|
||||
-- se smusso non è esclusivo
|
||||
if nChamfer < 2 then
|
||||
-- entrambe le facce non devono essere orientate verso il basso
|
||||
@@ -8212,7 +8285,7 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
end
|
||||
-- se lunghezza richiede spezzatura
|
||||
if ( Proc.Box:getDimX() > BD.LONGCUT_MAXLEN) or
|
||||
( Proc.Box:getDimX() > 0.7 * b3Solid:getDimX() and ( b3Solid:getDimX() > ( BD.LEN_VERY_SHORT_PART or BD.LEN_SHORT_PART))) or
|
||||
( Proc.Box:getDimX() > 0.7 * b3Solid:getDimX() and ( Proc.DistanceToNextPart > 1000 or Proc.Box:getDimX() > BD.LONGCUT_ENDLEN)) or
|
||||
( ( nForceUseBladeOnNotContinueFace and nForceUseBladeOnNotContinueFace > 0) and ( Proc.Box:getDimX() > ( BD.LEN_SHORT_PART or 1000))) then
|
||||
-- una faccia
|
||||
if Proc.Fct == 1 then
|
||||
|
||||
@@ -301,6 +301,10 @@ local function MakeCutByChainSaw( nSurfId, sSawing, nFaceUse, dDepth, sNotes, dR
|
||||
local vtN = EgtSurfTmFacetNormVersor( nSurfId, 0, GDB_ID.ROOT)
|
||||
local vtOrtho = BL.GetVersRef( nFaceUse)
|
||||
EgtSetMachiningParam( MCH_MP.INITANGS, BL.GetChainSawInitAngs( vtN, vtOrtho, 1))
|
||||
-- se il taglio è un precut, sto 10mm più all'interno per essere sicuro di tagliare effettivamente qualcosa
|
||||
if BD.PRECUT_TAIL and sNotes and sNotes:find( 'Precut;') then
|
||||
dRadialOffset = dRadialOffset - 10
|
||||
end
|
||||
-- imposto offset radiale per mantenere il materiale in coda per la finitura
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, dRadialOffset)
|
||||
-- imposto eventuale allungamento percorso iniziale
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
-- Intestazioni
|
||||
require( 'EgtBase')
|
||||
_ENV = EgtProtectGlobal()
|
||||
EgtEnableDebug( true)
|
||||
EgtEnableDebug( false)
|
||||
|
||||
-- Imposto direttorio libreria specializzata per Travi
|
||||
EgtAddToPackagePath( BEAM.BASEDIR .. '\\LuaLibs\\?.lua')
|
||||
|
||||
+13
-1
@@ -1,6 +1,18 @@
|
||||
==== Beam Update Log ====
|
||||
|
||||
Versione 2.7k1 (25/11/2024)
|
||||
Versione 2.7l3 (23/12/2025)
|
||||
- Modif : nei fori che attraversano un taglio si decide la precedenza in base all'angolo tra foro e taglio stesso
|
||||
- Fixed : corretto precut in caso di sega a catena
|
||||
|
||||
Versione 2.7l2 (16/12/2025)
|
||||
- Added : in LapJoint pulizia spigoli con fresa a V su tasche non passanti
|
||||
|
||||
Versione 2.7l1 (10/12/2025)
|
||||
- Added : in LapJoint aggiunta gestione fresatura con aggregato flottante (Q specifica)
|
||||
- Modif : in LapJoint modfifiche alla lavorazione spigoli su faccia frontale o posteriore
|
||||
- Modif : in LapJoint lunghe, la spezzatura ora considera se è presente del grezzo dietro
|
||||
|
||||
Versione 2.7k1 (25/11/2025)
|
||||
- Added : in tagli di testa e coda aggiunti smussi con possibilità di raccordare o smussare spigoli
|
||||
- Added : in Lapjoint aggiunto Q14 per settare lavorazione discorde se longitudinale su faccia sotto
|
||||
- Modif : migliorati i tagli
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@
|
||||
-- Gestione della versione di Beam
|
||||
|
||||
NAME = 'Beam'
|
||||
VERSION = '2.7k1'
|
||||
VERSION = '2.7l3'
|
||||
MIN_EXE = '2.7f2'
|
||||
|
||||
Reference in New Issue
Block a user