Compare commits
64 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7a64a68167 | |||
| 2e086f9f42 | |||
| c7e8c63f37 | |||
| 8e9de6026e | |||
| b382560cfa | |||
| 339c6acb37 | |||
| 2311ab4614 | |||
| 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 | |||
| 2e5b4c9976 | |||
| 511af04c8b | |||
| 8b1d38c451 | |||
| abe3465514 | |||
| fc753c47be | |||
| ad8a7bf73f | |||
| 4a21a4be36 | |||
| aafe565474 | |||
| b6ef0a8d7a | |||
| 779f2105ba | |||
| c2b9c4b19f | |||
| 8eadb81e91 | |||
| 2bac228fe9 | |||
| c312e72fd2 | |||
| fd4683e4fa | |||
| 70661aa3d2 | |||
| a82486e9fb | |||
| cd4a7d3b91 | |||
| 3764c58394 | |||
| e49b505fbe | |||
| 72c1eb81f3 | |||
| 037ac0d030 | |||
| f1b64b1496 | |||
| 69ab03f3ec | |||
| 3b86cd9633 | |||
| 56fc63d5ff | |||
| f27eeb9c3d | |||
| 5d603a57db | |||
| 6f45e63f11 |
+60
-25
@@ -362,7 +362,7 @@ local function CollectFeatures( PartId, b3Raw, dCurrOvmH, dCurrOvmT)
|
|||||||
-- se foro
|
-- se foro
|
||||||
if Drill.Identify( Proc) then
|
if Drill.Identify( Proc) then
|
||||||
-- assegno diametro e facce di ingresso e uscita (dati tabelle sempre per riferimento)
|
-- 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
|
-- verifico se devo inserire i prefori
|
||||||
if Drill.IsPredrillNeeded( Proc) then
|
if Drill.IsPredrillNeeded( Proc) then
|
||||||
local bAddProc, PredrillProc= Drill.AddPredrillFromDrillProc( Proc)
|
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.Tail = Drill.IsTailFeature( Proc2, b3Raw, dCurrOvmH)
|
||||||
Proc2.Fcs = Proc.Fce
|
Proc2.Fcs = Proc.Fce
|
||||||
Proc2.Fce = Proc.Fcs
|
Proc2.Fce = Proc.Fcs
|
||||||
|
Proc2.vtDrillDir = -Proc.vtDrillDir
|
||||||
Proc2.CutId = Proc.CutId
|
Proc2.CutId = Proc.CutId
|
||||||
Proc2.TaskId = Proc.TaskId
|
Proc2.TaskId = Proc.TaskId
|
||||||
Proc2.AdjId = Proc.AdjId
|
Proc2.AdjId = Proc.AdjId
|
||||||
@@ -835,13 +836,13 @@ local function OrderFeatures( vProc, b3Raw)
|
|||||||
if B2.AdvTail and ( not Split.Identify( B1) or not B1.Tail) then
|
if B2.AdvTail and ( not Split.Identify( B1) or not B1.Tail) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
-- se primo è foro e secondo è un ribasso, il foro va sempre prima a meno che il ribasso non sia di testa
|
-- se primo è foro e secondo è un ribasso o tenone, il foro va sempre prima a meno che il ribasso non sia di testa
|
||||||
if Drill.Identify(B1) and ( LapJoint.Identify(B2) or Mortise.Identify(B2)) and B2.PassedByHole and
|
if Drill.Identify(B1) and ( LapJoint.Identify(B2) or Mortise.Identify(B2) or Tenon.Identify(B2)) and B2.PassedByHole and
|
||||||
B1.Box:getCenter():getX() > B2.Box:getMin():getX() and B1.Box:getCenter():getX() < B2.Box:getMax():getX() then
|
B1.Box:getCenter():getX() > B2.Box:getMin():getX() and B1.Box:getCenter():getX() < B2.Box:getMax():getX() then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
-- se primo è un ribasso e secondo è un foro, il ribasso va sempre dopo a meno che il ribasso non sia di testa
|
-- se primo è un ribasso e secondo è un foro o tenone, il ribasso va sempre dopo a meno che il ribasso non sia di testa
|
||||||
if ( LapJoint.Identify(B1) or Mortise.Identify(B1))and B1.PassedByHole and Drill.Identify(B2) and
|
if ( LapJoint.Identify(B1) or Mortise.Identify(B1) or Tenon.Identify(B1)) and B1.PassedByHole and Drill.Identify(B2) and
|
||||||
B2.Box:getCenter():getX() > B1.Box:getMin():getX() and B2.Box:getCenter():getX() < B1.Box:getMax():getX() then
|
B2.Box:getCenter():getX() > B1.Box:getMin():getX() and B2.Box:getCenter():getX() < B1.Box:getMax():getX() then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
@@ -1119,7 +1120,7 @@ local function ClassifyFeatures( vProc, b3Raw, Stats)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- se senza geometria (già disabilitato)
|
-- 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
|
bOk = false
|
||||||
-- se intestatura
|
-- se intestatura
|
||||||
elseif Hcut.Identify( Proc) then
|
elseif Hcut.Identify( Proc) then
|
||||||
@@ -1221,7 +1222,7 @@ local function ClassifyFeatures( vProc, b3Raw, Stats)
|
|||||||
bOk, bDown, bSide = ProfHead.Classify( Proc, b3Raw)
|
bOk, bDown, bSide = ProfHead.Classify( Proc, b3Raw)
|
||||||
-- se contorno libero
|
-- se contorno libero
|
||||||
elseif FreeContour.Identify( Proc) then
|
elseif FreeContour.Identify( Proc) then
|
||||||
bOk, bDown, bSide = FreeContour.Classify( Proc, b3Raw)
|
bOk, bDown, bSide, bDownSideOnHeadOk = FreeContour.Classify( Proc, b3Raw)
|
||||||
-- se decorazione
|
-- se decorazione
|
||||||
elseif Decor.Identify( Proc) then
|
elseif Decor.Identify( Proc) then
|
||||||
bOk, bDown = Decor.Classify( Proc)
|
bOk, bDown = Decor.Classify( Proc)
|
||||||
@@ -1231,7 +1232,7 @@ local function ClassifyFeatures( vProc, b3Raw, Stats)
|
|||||||
end
|
end
|
||||||
-- assegno risultato
|
-- assegno risultato
|
||||||
if bOk then
|
if bOk then
|
||||||
-- non ammessa feature di testa da lavorare ribaltata o ruotata
|
-- non ammessa feature di testa da lavorare ribaltata o ruotata (lettura laser)
|
||||||
if Proc.Head and ( bDown or bSide) and not bDownSideOnHeadOk then
|
if Proc.Head and ( bDown or bSide) and not bDownSideOnHeadOk then
|
||||||
Proc.Flg = 0
|
Proc.Flg = 0
|
||||||
Proc.Down = true
|
Proc.Down = true
|
||||||
@@ -1352,7 +1353,8 @@ local function AddFeatureMachining( Proc, nPhase, nRawId, nPartId, dCurrOvmH, bN
|
|||||||
-- se foratura ( 3/4-040-X)
|
-- se foratura ( 3/4-040-X)
|
||||||
elseif Drill.Identify( Proc) then
|
elseif Drill.Identify( Proc) then
|
||||||
-- esecuzione foratura
|
-- 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)
|
-- se giunzione francese ( 1/2-035-X)
|
||||||
elseif FrenchRidgeLap.Identify( Proc) then
|
elseif FrenchRidgeLap.Identify( Proc) then
|
||||||
-- esecuzione giunzione francese
|
-- esecuzione giunzione francese
|
||||||
@@ -2024,22 +2026,44 @@ function GetFeatureInfoAndDependency( vProc, b3Raw)
|
|||||||
-- controllo la feature con tutte le altre per recuperare le dipendenze
|
-- controllo la feature con tutte le altre per recuperare le dipendenze
|
||||||
for j = 1, #vProc do
|
for j = 1, #vProc do
|
||||||
local ProcB = vProc[j]
|
local ProcB = vProc[j]
|
||||||
-- verifico se feature tipo LapJoint è attraversata da almeno un foro
|
-- se non è la stessa feature
|
||||||
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
|
if Proc.Id ~= ProcB.Id then
|
||||||
Proc.PassedByHole = true
|
-- verifico se feature tipo LapJoint è attraversata da almeno un foro
|
||||||
ProcB.Dependency = {}
|
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
|
||||||
ProcB.Dependency.ExecBefore = Proc
|
Proc.PassedByHole = true
|
||||||
end
|
ProcB.Dependency = {}
|
||||||
-- verifico se feature tipo LapJoint è attraversata da almeno una mortasa a coda di rondine
|
ProcB.Dependency.ExecBefore = Proc
|
||||||
if ( Proc.Topology == 'Pocket' or Proc.Topology == 'Tunnel' or Proc.Topology == 'Groove') and DtMortise.SideIdentify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then
|
end
|
||||||
Proc.PassedByDtMortise = true
|
-- verifico se feature tipo LapJoint è attraversata da almeno una mortasa a coda di rondine
|
||||||
end
|
if ( Proc.Topology == 'Pocket' or Proc.Topology == 'Tunnel' or Proc.Topology == 'Groove') and DtMortise.SideIdentify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then
|
||||||
-- verifiche per specchiature
|
Proc.PassedByDtMortise = true
|
||||||
if BD.DOWN_HEAD or BD.TWO_EQUAL_HEADS then
|
end
|
||||||
-- forature
|
-- se tenone è attraversato da foro allora il foro deve essere fatto prima
|
||||||
if BD.DOUBLE_HEAD_DRILLING and Drill.Identify( Proc) and Drill.Identify( ProcB) and not Proc.Mirror then
|
if Tenon.Identify( Proc) and Drill.Identify( ProcB) and Overlaps( Proc.Box, ProcB.Box) then
|
||||||
if AreDrillingsMirrored( Proc, ProcB, b3Raw) then
|
Proc.PassedByHole = true
|
||||||
Proc.Mirror = ProcB
|
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
|
end
|
||||||
end
|
end
|
||||||
@@ -2107,6 +2131,17 @@ function BeamExec.ProcessFeatures()
|
|||||||
PrintFeatures( vProc, b3Raw)
|
PrintFeatures( vProc, b3Raw)
|
||||||
end
|
end
|
||||||
EgtOutLog( ' *** AddMachinings ***', 1)
|
EgtOutLog( ' *** AddMachinings ***', 1)
|
||||||
|
-- scrivo nel RawPart se ci sono feature lavorate con trave ruotata a 90 o 180 deg
|
||||||
|
if bSomeSide then
|
||||||
|
EgtSetInfo( nRawId, 'ROTATE90', 1)
|
||||||
|
else
|
||||||
|
EgtSetInfo( nRawId, 'ROTATE90', 0)
|
||||||
|
end
|
||||||
|
if bSomeDown then
|
||||||
|
EgtSetInfo( nRawId, 'ROTATE180', 1)
|
||||||
|
else
|
||||||
|
EgtSetInfo( nRawId, 'ROTATE180', 0)
|
||||||
|
end
|
||||||
-- verifico se comunque necessario taglio di testa
|
-- verifico se comunque necessario taglio di testa
|
||||||
local bNeedHCut = VerifyNeedForHeadCut( vProc, bSomeDown, bSomeSide)
|
local bNeedHCut = VerifyNeedForHeadCut( vProc, bSomeDown, bSomeSide)
|
||||||
-- inserisco corrispondenze di tagli coincidenti con mortase normali o a coda di rondine di testa
|
-- inserisco corrispondenze di tagli coincidenti con mortase normali o a coda di rondine di testa
|
||||||
|
|||||||
@@ -1239,6 +1239,40 @@ function BeamLib.GetFacetsInfo( Proc, b3Raw)
|
|||||||
return Face
|
return Face
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
function BeamLib.GetEdgesInfo( Proc, Face)
|
||||||
|
local Edges = {}
|
||||||
|
local nFaceType, vEdges = EgtSurfTmGetFacetOutlineInfo( Proc.Id, Face.Id, GDB_ID.ROOT)
|
||||||
|
|
||||||
|
if nFaceType < 1 then
|
||||||
|
for j = 1, #vEdges do
|
||||||
|
local nPreviousEdgeIndex = j - 1
|
||||||
|
if j == 1 then
|
||||||
|
nPreviousEdgeIndex = #vEdges
|
||||||
|
end
|
||||||
|
local nNextEdgeIndex = j + 1
|
||||||
|
if j == #vEdges then
|
||||||
|
nNextEdgeIndex = 1
|
||||||
|
end
|
||||||
|
|
||||||
|
local CurrentEdge = {}
|
||||||
|
CurrentEdge.AdjacentFaceId = vEdges[j].Adj
|
||||||
|
CurrentEdge.ToolDirection = Vector3d( vEdges[j].Norm)
|
||||||
|
CurrentEdge.Length = vEdges[j].Len
|
||||||
|
CurrentEdge.Elevation = vEdges[j].Elev
|
||||||
|
CurrentEdge.IsOpen = vEdges[j].Open
|
||||||
|
CurrentEdge.IsStartOpen = ( vEdges[nPreviousEdgeIndex].Open)
|
||||||
|
CurrentEdge.IsEndOpen = ( vEdges[nNextEdgeIndex].Open)
|
||||||
|
|
||||||
|
table.insert( Edges, CurrentEdge)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
error( 'Face with closed hole')
|
||||||
|
end
|
||||||
|
|
||||||
|
return Edges
|
||||||
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
-- restituisce la matrice delle adiacenze di Proc dove i e j sono le facce e a(ij) è l'angolo tra di esse; 0 se nessuna adiacenza
|
-- restituisce la matrice delle adiacenze di Proc dove i e j sono le facce e a(ij) è l'angolo tra di esse; 0 se nessuna adiacenza
|
||||||
function BeamLib.GetAdjacencyMatrix( Proc)
|
function BeamLib.GetAdjacencyMatrix( Proc)
|
||||||
|
|||||||
+4
-1
@@ -275,12 +275,15 @@ local function VerifyFirstOrthoCut( CutTable, OffsetP, BBoxRawPart, dNzLimDwnUp)
|
|||||||
-- normale alla faccia ortogonale
|
-- normale alla faccia ortogonale
|
||||||
local _, vtO = EgtSurfTmFacetCenter( CutOId, 0, GDB_ID.ROOT)
|
local _, vtO = EgtSurfTmFacetCenter( CutOId, 0, GDB_ID.ROOT)
|
||||||
vtO = vtO - vtO * vtN1 * vtN1 ; vtO:normalize()
|
vtO = vtO - vtO * vtN1 * vtN1 ; vtO:normalize()
|
||||||
|
local dMaxElev = EgtSurfTmFacetElevationInBBox( CutOId, 0, BBoxRawPart, true, GDB_ID.ROOT)
|
||||||
-- calcolo lunghezza prima semi-faccia
|
-- calcolo lunghezza prima semi-faccia
|
||||||
local asseX1 = vtO
|
local asseX1 = vtO
|
||||||
local asseY1 = vtN1 ^ asseX1
|
local asseY1 = vtN1 ^ asseX1
|
||||||
local Frame1 = Frame3d( ptC1, ptC1+asseX1, ptC1+asseY1)
|
local Frame1 = Frame3d( ptC1, ptC1+asseX1, ptC1+asseY1)
|
||||||
local Box1 = EgtGetBBoxRef( Cut1Id, GDB_BB.STANDARD, Frame1)
|
local Box1 = EgtGetBBoxRef( Cut1Id, GDB_BB.STANDARD, Frame1)
|
||||||
local x1 = Box1:getDimX()
|
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
|
-- calcolo lunghezza seconda semi-faccia
|
||||||
local asseX2 = vtO
|
local asseX2 = vtO
|
||||||
local asseY2 = vtN2 ^ asseX2
|
local asseY2 = vtN2 ^ asseX2
|
||||||
@@ -430,7 +433,7 @@ function DiceCut.GetDice( nParent, BBoxRawPart, ptCPlanes, vtNPlanes, bGetOrtoPl
|
|||||||
if dElevO then
|
if dElevO then
|
||||||
local m = ceil( dElevO / OffsetO)
|
local m = ceil( dElevO / OffsetO)
|
||||||
OffsetO = dElevO / m
|
OffsetO = dElevO / m
|
||||||
end
|
end
|
||||||
|
|
||||||
-- elenco di tutte le superfici generate dai tagli
|
-- elenco di tutte le superfici generate dai tagli
|
||||||
local TabFUCHSIA = {}
|
local TabFUCHSIA = {}
|
||||||
|
|||||||
+17
-7
@@ -309,7 +309,7 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
|||||||
bIsBiLinea = true
|
bIsBiLinea = true
|
||||||
local vtTg1 = ptPm - ptP1 ; vtTg1:normalize()
|
local vtTg1 = ptPm - ptP1 ; vtTg1:normalize()
|
||||||
local vtTg2 = ptP2 - ptPm ; vtTg2:normalize()
|
local vtTg2 = ptP2 - ptPm ; vtTg2:normalize()
|
||||||
local dCosMax = 0.951 -- cos( 18°)
|
local dCosMax = 0.966 -- cos( 15°)
|
||||||
local dLenMin = 30
|
local dLenMin = 30
|
||||||
local dLenMax = max( 0.5 * dSawDiam * 0.17365 + 1, 2 * dLenMin)
|
local dLenMax = max( 0.5 * dSawDiam * 0.17365 + 1, 2 * dLenMin)
|
||||||
dCosAngleL1L2 = vtTg1 * vtTg2
|
dCosAngleL1L2 = vtTg1 * vtTg2
|
||||||
@@ -426,14 +426,14 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
|||||||
local bLioTang
|
local bLioTang
|
||||||
local Ktp = 1.1
|
local Ktp = 1.1
|
||||||
if BD.KIOTP then Ktp = BD.KIOTP end
|
if BD.KIOTP then Ktp = BD.KIOTP end
|
||||||
if ( not bDownUp or abs( vtTg:getY()) > 0.5) and
|
if ( bForceTangentLeadInOut or ( not bDownUp or abs( vtTg:getY()) > 0.5) and
|
||||||
( not bDownHead or abs( vtTg:getZ()) < 0.51) and
|
( not bDownHead or abs( vtTg:getZ()) < 0.51) and
|
||||||
abs( vtTg:getX()) < 0.9848 and
|
abs( vtTg:getX()) < 0.9848 and
|
||||||
( ( abs( vtTg:getZ()) < 0.17 and ( vtV1:getZ() < -0.5 or vtV2:getZ() < -0.5) and not bDownHead) or
|
( ( abs( vtTg:getZ()) < 0.17 and ( vtV1:getZ() < -0.5 or vtV2:getZ() < -0.5) and not bDownHead) or
|
||||||
( abs( vtTg:getZ()) < 0.51 and b3Box:getDimZ() > 300 and BD.C_SIMM and BD.MAX_HEIGHT > 450 and b3Box:getDimX() > BD.LEN_SHORT_PART) or
|
( abs( vtTg:getZ()) < 0.51 and b3Box:getDimZ() > 300 and BD.C_SIMM and BD.MAX_HEIGHT > 450 and b3Box:getDimX() > BD.LEN_SHORT_PART) or
|
||||||
( abs( vtTg:getZ()) < 0.51 and ( dLenLi2 + dLenLo2) < ( dLenLi + dLenLo)) or
|
( abs( vtTg:getZ()) < 0.51 and ( dLenLi2 + dLenLo2) < ( dLenLi + dLenLo)) or
|
||||||
Ktp * ( dLenLi2 + dLenLo2) < ( dLenLi + dLenLo) or
|
Ktp * ( dLenLi2 + dLenLo2) < ( dLenLi + dLenLo) or
|
||||||
( BD.TURN == 2 and vtRef:getZ() < -0.1)) then
|
( BD.TURN == 2 and vtRef:getZ() < -0.1))) then
|
||||||
if BD.TURN == 2 then
|
if BD.TURN == 2 then
|
||||||
if vtTg:getY() < -0.1 then
|
if vtTg:getY() < -0.1 then
|
||||||
bLioTang = 1
|
bLioTang = 1
|
||||||
@@ -467,9 +467,19 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
|||||||
if BD.C_SIMM and bMaximizeVerticalDepth then
|
if BD.C_SIMM and bMaximizeVerticalDepth then
|
||||||
nSCC = MCH_SCC.ADIR_ZM
|
nSCC = MCH_SCC.ADIR_ZM
|
||||||
elseif abs( vtAux:getX()) > abs( vtAux:getY()) - GEO.EPS_SMALL then
|
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
|
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
|
end
|
||||||
else
|
else
|
||||||
if BD.TURN == 2 then
|
if BD.TURN == 2 then
|
||||||
@@ -609,8 +619,8 @@ function FacesBySaw.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, sCutType,
|
|||||||
local bConvex = ( dAngT > 0)
|
local bConvex = ( dAngT > 0)
|
||||||
-- verifico non siano orientate troppo verso il basso e molto sbandate (oltre 10 deg), oppure in testa o in coda e non troppo distanti dal grezzo esterno
|
-- verifico non siano orientate troppo verso il basso e molto sbandate (oltre 10 deg), oppure in testa o in coda e non troppo distanti dal grezzo esterno
|
||||||
local bFaceOk = {}
|
local bFaceOk = {}
|
||||||
bFaceOk[1] = ( vtN[1]:getZ() >= 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[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.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))
|
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] or not bFaceOk[2]) then
|
||||||
local sErr = 'Error : TwoFacesBySaw from bottom impossible'
|
local sErr = 'Error : TwoFacesBySaw from bottom impossible'
|
||||||
EgtOutLog( sErr)
|
EgtOutLog( sErr)
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ function GetMachinings( MachiningType, sType)
|
|||||||
Machining.Tool.MaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
|
Machining.Tool.MaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
|
||||||
end
|
end
|
||||||
if MachiningType == MCH_MY.DRILLING then
|
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'
|
Machining.SubType = 'Drill'
|
||||||
elseif EgtStartsWith( Machining.Type, 'AngleDrill') then
|
elseif EgtStartsWith( Machining.Type, 'AngleDrill') then
|
||||||
Machining.SubType = 'AngleDrill'
|
Machining.SubType = 'AngleDrill'
|
||||||
@@ -297,7 +297,7 @@ end
|
|||||||
function ReturnParams( MachiningType, MachiningName, sType, ToolParams)
|
function ReturnParams( MachiningType, MachiningName, sType, ToolParams)
|
||||||
if MachiningType == MCH_MY.DRILLING then
|
if MachiningType == MCH_MY.DRILLING then
|
||||||
local _, sOrigType = EgtEndsWith( sType, '_H2')
|
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
|
elseif MachiningType == MCH_MY.SAWING then
|
||||||
return MachiningName, ToolParams.H2
|
return MachiningName, ToolParams.H2
|
||||||
elseif MachiningType == MCH_MY.MILLING then
|
elseif MachiningType == MCH_MY.MILLING then
|
||||||
@@ -455,10 +455,13 @@ function MachiningLib.FindCutting( sType, bTopHead, bDownHead)
|
|||||||
end
|
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
|
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
|
-- se il foro è un predrill, cerco solo punte abilitate al Predrill
|
||||||
if bIsPredrill then
|
elseif bIsPredrill then
|
||||||
sTypeMach = 'Predrill'
|
sTypeMach = 'Predrill'
|
||||||
else
|
else
|
||||||
sTypeMach = EgtIf( bAngleTransmission, 'Drill_AT', 'Drill')
|
sTypeMach = EgtIf( bAngleTransmission, 'Drill_AT', 'Drill')
|
||||||
|
|||||||
+14
-6
@@ -46,7 +46,14 @@ local ML = require( 'MachiningLib')
|
|||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
-- Riconoscimento della feature
|
-- Riconoscimento della feature
|
||||||
function ProcessCut.Identify( Proc)
|
function ProcessCut.Identify( Proc)
|
||||||
return ( ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 10)
|
-- se richiesto si forza fresatura
|
||||||
|
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
|
||||||
|
else
|
||||||
|
return ( ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 10)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
@@ -254,7 +261,7 @@ end
|
|||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
-- Applicazione della lavorazione con testa da sopra
|
-- Applicazione della lavorazione con testa da sopra
|
||||||
local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, nLimitingSurf)
|
local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, nLimitingSurf, bForceTangentLeadInOut)
|
||||||
-- ingombro del grezzo
|
-- ingombro del grezzo
|
||||||
b3Raw = b3Raw or EgtGetRawPartBBox( nRawId)
|
b3Raw = b3Raw or EgtGetRawPartBBox( nRawId)
|
||||||
-- ingombro del pezzo
|
-- ingombro del pezzo
|
||||||
@@ -267,7 +274,7 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
|||||||
if bFromBottom == nil then
|
if bFromBottom == nil then
|
||||||
bFromBottom = ( vtN:getZ() > 0.25 and b3Solid:getDimX() < BD.LEN_SHORT_PART and not Proc.AdvTail and vtN:getX() < 0 and abs( vtN:getY()) < 0.259)
|
bFromBottom = ( vtN:getZ() > 0.25 and b3Solid:getDimX() < BD.LEN_SHORT_PART and not Proc.AdvTail and vtN:getX() < 0 and abs( vtN:getY()) < 0.259)
|
||||||
end
|
end
|
||||||
local dMinFeatureLengthForLongCut = 590.000
|
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)
|
-- verifico se da considerare taglio lungo ( non da sotto, inclinato non più di 30deg, largo come la trave e abbastanza lungo)
|
||||||
local bLongCut = ( not bDownCut and vtN:getZ() > 0.865 and
|
local bLongCut = ( not bDownCut and vtN:getZ() > 0.865 and
|
||||||
Proc.Box:getDimY() > b3Solid:getDimY() - 10 * GEO.EPS_SMALL and
|
Proc.Box:getDimY() > b3Solid:getDimY() - 10 * GEO.EPS_SMALL and
|
||||||
@@ -581,7 +588,8 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
|||||||
if ( i % 2 == 0) and ( Proc.Fct == 1) and bNoPerpCuts then
|
if ( i % 2 == 0) and ( Proc.Fct == 1) and bNoPerpCuts then
|
||||||
vtOrthoOAlternative = - vtOrthoO
|
vtOrthoOAlternative = - vtOrthoO
|
||||||
end
|
end
|
||||||
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dExtraCut, BD.CUT_SIC, 0, 0, 0, sNotes, b3Raw, nil, nil, bSpecialTangentLeadInOut, nil, vtOrthoOAlternative)
|
bForceTangentLeadInOut = bForceTangentLeadInOut and ( ( i % 2) ~= 0)
|
||||||
|
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dExtraCut, BD.CUT_SIC, 0, 0, 0, sNotes, b3Raw, nil, nil, bSpecialTangentLeadInOut, bForceTangentLeadInOut, vtOrthoOAlternative)
|
||||||
if not bOk then return bOk, sErr end
|
if not bOk then return bOk, sErr end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -821,7 +829,7 @@ end
|
|||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
-- Applicazione della lavorazione
|
-- Applicazione della lavorazione
|
||||||
function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, dOvmTail, bUpdateIng, nLimitingSurf)
|
function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, dOvmTail, bUpdateIng, nLimitingSurf, bForceTangentLeadInOut)
|
||||||
-- sovramateriale di coda
|
-- sovramateriale di coda
|
||||||
dOvmTail = dOvmTail or BD.OVM_MID
|
dOvmTail = dOvmTail or BD.OVM_MID
|
||||||
-- ingombro del grezzo
|
-- ingombro del grezzo
|
||||||
@@ -860,7 +868,7 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom,
|
|||||||
local bNoDicing = false
|
local bNoDicing = false
|
||||||
-- se taglio con testa da sopra
|
-- se taglio con testa da sopra
|
||||||
if not bDownHead and not bDownTurn then
|
if not bDownHead and not bDownTurn then
|
||||||
local bOk, sErr, bNoDicing2 = MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, nLimitingSurf)
|
local bOk, sErr, bNoDicing2 = MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, nLimitingSurf, bForceTangentLeadInOut)
|
||||||
bNoDicing = bNoDicing2
|
bNoDicing = bNoDicing2
|
||||||
if not bOk then return false, sErr end
|
if not bOk then return false, sErr end
|
||||||
-- altrimenti taglio con testa da sotto
|
-- altrimenti taglio con testa da sotto
|
||||||
|
|||||||
@@ -1190,14 +1190,14 @@ local function Make2Faces( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Raw, b3Sol
|
|||||||
return MakeByBlade( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Raw, b3Solid)
|
return MakeByBlade( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Raw, b3Solid)
|
||||||
-- altrimenti provo con il truciolatore
|
-- altrimenti provo con il truciolatore
|
||||||
else
|
else
|
||||||
|
local sName = 'Mill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||||
-- se non ho la lavorazione esco
|
-- se non ho la lavorazione esco
|
||||||
if not sMilling then
|
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)
|
EgtOutLog( sErr)
|
||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
-- inserisco la lavorazione di fresatura
|
-- inserisco la lavorazione di fresatura
|
||||||
local sName = 'Mill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
|
||||||
local nMchFId = EgtAddMachining( sName, sMilling)
|
local nMchFId = EgtAddMachining( sName, sMilling)
|
||||||
if not nMchFId then
|
if not nMchFId then
|
||||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
||||||
|
|||||||
+63
-13
@@ -102,8 +102,8 @@ end
|
|||||||
function ProcessDrill.GetData( Proc, b3Raw)
|
function ProcessDrill.GetData( Proc, b3Raw)
|
||||||
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
|
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
|
||||||
-- verifico se foro da adattare
|
-- verifico se foro da adattare
|
||||||
|
local nNewAuxId
|
||||||
if EgtExistsInfo( Proc.Id, 'DiamUser') then
|
if EgtExistsInfo( Proc.Id, 'DiamUser') then
|
||||||
local nNewAuxId
|
|
||||||
if AuxId then nNewAuxId = AuxId + Proc.Id end
|
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
|
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)
|
EgtModifyArcRadius( nNewAuxId, BD.USER_HOLE_DIAM / 2)
|
||||||
@@ -115,7 +115,13 @@ function ProcessDrill.GetData( Proc, b3Raw)
|
|||||||
-- recupero faccia di entrata e uscita
|
-- recupero faccia di entrata e uscita
|
||||||
local nFcs = EgtGetInfo( Proc.Id, 'FCS', 'i') or 0
|
local nFcs = EgtGetInfo( Proc.Id, 'FCS', 'i') or 0
|
||||||
local nFce = EgtGetInfo( Proc.Id, 'FCE', '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
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
@@ -250,8 +256,13 @@ function ProcessDrill.Classify( Proc, b3Raw, sDownOrSideOrStd)
|
|||||||
-- se ci sono delle dipendenze da altre feature da rispettare
|
-- se ci sono delle dipendenze da altre feature da rispettare
|
||||||
if sDownOrSideOrStd then
|
if sDownOrSideOrStd then
|
||||||
if sDownOrSideOrStd == 'DOWN' then
|
if sDownOrSideOrStd == 'DOWN' then
|
||||||
if vtExtr:getZ() < - BD.DRILL_VZ_MIN 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
|
||||||
Proc.Down = true
|
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
|
||||||
|
-- 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
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -309,7 +320,7 @@ end
|
|||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
-- Applicazione della lavorazione
|
-- Applicazione della lavorazione
|
||||||
function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, bUseMultiDrill)
|
||||||
-- default per costanti
|
-- default per costanti
|
||||||
BD.DRILL_VX_MAX_ANGLEDRILL = ( BD.DRILL_VX_MAX_ANGLEDRILL or 0.928)
|
BD.DRILL_VX_MAX_ANGLEDRILL = ( BD.DRILL_VX_MAX_ANGLEDRILL or 0.928)
|
||||||
-- ingombro del pezzo
|
-- ingombro del pezzo
|
||||||
@@ -382,9 +393,9 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
|||||||
end
|
end
|
||||||
-- primo gruppo di controlli con lunghezza utensile pari a metà foro se passante
|
-- primo gruppo di controlli con lunghezza utensile pari a metà foro se passante
|
||||||
-- recupero la lavorazione
|
-- 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
|
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
|
if sDrilling then dCheckDepth = nil end
|
||||||
end
|
end
|
||||||
if not sDrilling then
|
if not sDrilling then
|
||||||
@@ -549,16 +560,33 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
|||||||
return false, sErr
|
return false, sErr
|
||||||
end
|
end
|
||||||
-- aggiungo geometria
|
-- 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
|
-- 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)
|
EgtSetMachiningParam( MCH_MP.INVERT, bToInvert)
|
||||||
else
|
else
|
||||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, bToInvert)
|
EgtSetMachiningParam( MCH_MP.TOOLINVERT, bToInvert)
|
||||||
end
|
end
|
||||||
-- imposto posizione braccio porta testa
|
-- imposto posizione braccio porta testa
|
||||||
local nSCC = MCH_SCC.NONE
|
local nSCC = MCH_SCC.NONE
|
||||||
if bDrillAngTrasm then
|
if bDrillAngTrasm or bUseMultiDrill then
|
||||||
nSCC = MCH_SCC.ADIR_NEAR
|
nSCC = MCH_SCC.ADIR_NEAR
|
||||||
elseif not BD.C_SIMM and not BD.TURN then
|
elseif not BD.C_SIMM and not BD.TURN then
|
||||||
nSCC = MCH_SCC.ADIR_YM
|
nSCC = MCH_SCC.ADIR_YM
|
||||||
@@ -599,6 +627,16 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
|||||||
end
|
end
|
||||||
-- se lavorazione in doppio
|
-- se lavorazione in doppio
|
||||||
if Proc.Double and Proc.Double > 0 then
|
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)
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'DOUBLE', Proc.Double)
|
||||||
if Proc.Double ~= Proc.PrevDouble then
|
if Proc.Double ~= Proc.PrevDouble then
|
||||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'StartZmax', 2)
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'StartZmax', 2)
|
||||||
@@ -608,16 +646,28 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
|||||||
-- eseguo
|
-- eseguo
|
||||||
local bOk = ML.ApplyMachining( true, false)
|
local bOk = ML.ApplyMachining( true, false)
|
||||||
if not bOk and bDownDrill and bOpen and abs( Proc.Flg) == 1 then
|
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)
|
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
||||||
else
|
else
|
||||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
|
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
|
||||||
end
|
end
|
||||||
bOk = ML.ApplyMachining( true, false)
|
bOk = ML.ApplyMachining( true, false)
|
||||||
end
|
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
|
if not bOk then
|
||||||
local _, sErr = EgtGetLastMachMgrError()
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
EgtSetOperationMode( nMchId, false)
|
EgtSetOperationMode( nMchId, false)
|
||||||
return false, sErr
|
return false, sErr
|
||||||
else
|
else
|
||||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||||
@@ -630,7 +680,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
|||||||
end
|
end
|
||||||
|
|
||||||
return true, sMyWarn
|
return true, sMyWarn
|
||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
return ProcessDrill
|
return ProcessDrill
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ local Q_DEPTH_CHAMFER = 'Q02' -- d
|
|||||||
local Q_OVERMAT_FOR_FINISH = 'Q03' -- d
|
local Q_OVERMAT_FOR_FINISH = 'Q03' -- d
|
||||||
local Q_ONLY_CHAMFER = 'Q00' -- i
|
local Q_ONLY_CHAMFER = 'Q00' -- i
|
||||||
local Q_RADIAL_OFFSET = 'Q06' -- d, valido solo per pocket
|
local Q_RADIAL_OFFSET = 'Q06' -- d, valido solo per pocket
|
||||||
|
local Q_IGNORE_LASER_PROBLEMS = 'Q07'
|
||||||
|
local Q_FORCE_CLAMPABLE_AREA = 'Q08'
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
-- Riconoscimento della feature
|
-- Riconoscimento della feature
|
||||||
@@ -99,6 +101,8 @@ end
|
|||||||
function ProcessFreeContour.Classify( Proc, b3Raw)
|
function ProcessFreeContour.Classify( Proc, b3Raw)
|
||||||
-- verifico se di tipo pocket
|
-- verifico se di tipo pocket
|
||||||
local bPocket = ( EgtGetInfo( Proc.Id, 'PCKT', 'i') == 1)
|
local bPocket = ( EgtGetInfo( Proc.Id, 'PCKT', 'i') == 1)
|
||||||
|
-- verifico se forzata esecuzione anche se di testa e ribaltata o ruotata (lettura laser)
|
||||||
|
local bDownSideOnHeadOk = ( EgtGetInfo( Proc.Id, Q_IGNORE_LASER_PROBLEMS, 'd') or 0) == 1
|
||||||
-- recupero la curva associata
|
-- recupero la curva associata
|
||||||
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
|
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
|
||||||
if not AuxId then return false end
|
if not AuxId then return false end
|
||||||
@@ -107,23 +111,23 @@ function ProcessFreeContour.Classify( Proc, b3Raw)
|
|||||||
-- se tasca
|
-- se tasca
|
||||||
if bPocket then
|
if bPocket then
|
||||||
local bDown = ( vtN:getZ() < - 0.5)
|
local bDown = ( vtN:getZ() < - 0.5)
|
||||||
return true, bDown, false
|
return true, bDown, false, bDownSideOnHeadOk
|
||||||
-- se altrimenti profilo orizzontale
|
-- se altrimenti profilo orizzontale
|
||||||
elseif abs( vtN:getZ()) < 0.5 then
|
elseif abs( vtN:getZ()) < 0.5 then
|
||||||
return true, false, false
|
return true, false, false, bDownSideOnHeadOk
|
||||||
-- se altrimenti profilo verticale che non interessa tutta la sezione
|
-- se altrimenti profilo verticale che non interessa tutta la sezione
|
||||||
elseif Proc.Box:getDimZ() < 0.9 * b3Raw:getDimZ() then
|
elseif Proc.Box:getDimZ() < 0.9 * b3Raw:getDimZ() then
|
||||||
local bDown = ( vtN:getZ() < - 0.5)
|
local bDown = ( vtN:getZ() < - 0.5)
|
||||||
return true, bDown, false
|
return true, bDown, false, bDownSideOnHeadOk
|
||||||
-- altrimenti è profilo verticale che interessa tutta la sezione
|
-- altrimenti è profilo verticale che interessa tutta la sezione
|
||||||
else
|
else
|
||||||
-- recupero la massima capacità di lavoro dell'utensile da utilizzare
|
-- recupero la massima capacità di lavoro dell'utensile da utilizzare
|
||||||
local sMilling, dMaxDepth = ML.FindMilling( 'FreeContour')
|
local sMilling, dMaxDepth = ML.FindMilling( 'FreeContour')
|
||||||
if not sMilling then dMaxDepth = 0 end
|
if not sMilling then dMaxDepth = 0 end
|
||||||
if Proc.Box:getDimZ() > dMaxDepth and BD.ROT90 then
|
if Proc.Box:getDimZ() > dMaxDepth and BD.ROT90 then
|
||||||
return true, false, true
|
return true, false, true, bDownSideOnHeadOk
|
||||||
else
|
else
|
||||||
return true, false, false
|
return true, false, false, bDownSideOnHeadOk
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -713,7 +717,13 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
-- eventuale segnalazione ingombro di testa o coda
|
-- eventuale segnalazione ingombro di testa o coda
|
||||||
local dMinHIng = min( 0.5 * BD.VICE_MINH, 0.5 * b3Raw:getDimZ())
|
local dMinHIng = min( 0.5 * BD.VICE_MINH, 0.5 * b3Raw:getDimZ())
|
||||||
local dMinZ = max( BD.MIN_HEIGHT, 0.35 * b3Raw:getDimZ())
|
local dMinZ = max( BD.MIN_HEIGHT, 0.35 * b3Raw:getDimZ())
|
||||||
if Proc.Box:getDimZ() > 0.75 * b3Raw:getDimZ() and Proc.Box:getMin():getZ() < b3Raw:getMin():getZ() + dMinZ then
|
local bRawPartHas90Rotation = ( ( EgtGetInfo( nRawId, 'ROTATE90', 'd') or 0) == 1)
|
||||||
|
-- eventuale forzatura area feature pinzabile
|
||||||
|
local bForceClampableArea = ( ( EgtGetInfo( Proc.Id, Q_FORCE_CLAMPABLE_AREA, 'd') or 0) == 1)
|
||||||
|
-- se la feature è passante top/down oppure se è passante e si ruota di 90deg considero sempre non pinzabile; in alternativa si valuta in base all'ingombro
|
||||||
|
if not bForceClampableArea and ( ( Proc.Box:getDimZ() > 0.75 * b3Raw:getDimZ() and Proc.Box:getMin():getZ() < b3Raw:getMin():getZ() + dMinZ) or
|
||||||
|
( Proc.AffectedFaces.Top and Proc.AffectedFaces.Bottom and ( AreSameOrOppositeVectorApprox( vtExtr, Z_AX()))) or
|
||||||
|
( Proc.AffectedFaces.Front and Proc.AffectedFaces.Back and bRawPartHas90Rotation)) then
|
||||||
if Proc.Head then
|
if Proc.Head then
|
||||||
local dOffs = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX()
|
local dOffs = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX()
|
||||||
BL.UpdateHCING( nRawId, dOffs)
|
BL.UpdateHCING( nRawId, dOffs)
|
||||||
@@ -722,6 +732,7 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
BL.UpdateTCING( nRawId, dOffs)
|
BL.UpdateTCING( nRawId, dOffs)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return true, sWarn
|
return true, sWarn
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ local function AddVerticalPreCuts( Proc, sCutting, dCutXOffset, b3Raw)
|
|||||||
for j = nVerticalCuts, 1, -1 do
|
for j = nVerticalCuts, 1, -1 do
|
||||||
local nFaceUse = MCH_MILL_FU.PARAL_FRONT
|
local nFaceUse = MCH_MILL_FU.PARAL_FRONT
|
||||||
local dVerticalCutOffset = dVerticalSliceHeight * -j
|
local dVerticalCutOffset = dVerticalSliceHeight * -j
|
||||||
local bForceTangentLeadInOut = BD.PRESS_ROLLER
|
local bForceTangentLeadInOut = BD.PRESS_ROLLER and not BD.DOWN_HEAD
|
||||||
bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, nFaceUse, nil, -0.1 -dCutXOffset, BD.CUT_SIC, dVerticalCutOffset, 0, 0, '', b3Raw, nil, nil, nil, bForceTangentLeadInOut)
|
bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, nFaceUse, nil, -0.1 -dCutXOffset, BD.CUT_SIC, dVerticalCutOffset, 0, 0, '', b3Raw, nil, nil, nil, bForceTangentLeadInOut)
|
||||||
if not bOk then return bOk, sErr end
|
if not bOk then return bOk, sErr end
|
||||||
end
|
end
|
||||||
@@ -494,7 +494,11 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
|
|||||||
end
|
end
|
||||||
-- tagli aggiuntivi non necessari
|
-- tagli aggiuntivi non necessari
|
||||||
else
|
else
|
||||||
bOk, sErr = Cut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, nil, false, true)
|
local bForceTangentLeadInOut = false
|
||||||
|
if BD.PRESS_ROLLER then
|
||||||
|
bForceTangentLeadInOut = true
|
||||||
|
end
|
||||||
|
bOk, sErr = Cut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, nil, false, true, nil, nil, nil, nil, nil, bForceTangentLeadInOut)
|
||||||
end
|
end
|
||||||
return bOk, sErr
|
return bOk, sErr
|
||||||
end
|
end
|
||||||
|
|||||||
+110
-48
@@ -117,6 +117,7 @@ local ProcessLapJoint = {}
|
|||||||
require( 'EgtBase')
|
require( 'EgtBase')
|
||||||
local BL = require( 'BeamLib')
|
local BL = require( 'BeamLib')
|
||||||
local Fbs = require( 'FacesBySaw')
|
local Fbs = require( 'FacesBySaw')
|
||||||
|
local Fbp = require( 'FaceByPocket')
|
||||||
local Cut = require( 'ProcessCut')
|
local Cut = require( 'ProcessCut')
|
||||||
local DoubleCut = require( 'ProcessDoubleCut')
|
local DoubleCut = require( 'ProcessDoubleCut')
|
||||||
local LongCut = require( 'ProcessLongCut')
|
local LongCut = require( 'ProcessLongCut')
|
||||||
@@ -155,18 +156,22 @@ local bTrySidePocketAtFirst = true
|
|||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
-- Riconoscimento della feature
|
-- Riconoscimento della feature
|
||||||
function ProcessLapJoint.Identify( Proc)
|
function ProcessLapJoint.Identify( Proc)
|
||||||
return ( (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 16) or
|
if Proc.bForceMill then
|
||||||
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 17) or
|
return true
|
||||||
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 20) or
|
else
|
||||||
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 25) or
|
return ( (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 16) or
|
||||||
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 30) or
|
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 17) or
|
||||||
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 32) or
|
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 20) or
|
||||||
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 33) or
|
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 25) or
|
||||||
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 34) or
|
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 30) or
|
||||||
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 90) or
|
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 32) or
|
||||||
( Proc.Grp == 4 and Proc.Prc == 37) or
|
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 33) or
|
||||||
( Proc.Grp == 4 and Proc.Prc == 39) or
|
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 34) or
|
||||||
( Proc.Grp == 4 and Proc.Prc == 120))
|
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 90) or
|
||||||
|
( Proc.Grp == 4 and Proc.Prc == 37) or
|
||||||
|
( Proc.Grp == 4 and Proc.Prc == 39) or
|
||||||
|
( Proc.Grp == 4 and Proc.Prc == 120))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
@@ -779,14 +784,16 @@ function ProcessLapJoint.IsTailFeature( Proc, b3Raw)
|
|||||||
local nPartId = EgtGetParent( EgtGetParent( Proc.Id) or GDB_ID.NULL)
|
local nPartId = EgtGetParent( EgtGetParent( Proc.Id) or GDB_ID.NULL)
|
||||||
local b3Solid = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
|
local b3Solid = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||||
-- verifico se è in coda
|
-- verifico se è in coda
|
||||||
|
|
||||||
local dEndDist = Proc.Box:getMin():getX() - b3Solid:getMin():getX()
|
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 bUseBHSideMill and ( Proc.Box:getMax():getX() - b3Solid:getMin():getX()) < 400 then
|
if not( BD.BH_MACHINE) and bUseBHSideMill and ( Proc.Box:getMax():getX() - b3Solid:getMin():getX()) < 400 then
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- se lunga come trave, oppure non è trave corta e la sua lunghezza supera il massimo o il 80% della lunghezza della trave
|
-- 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
|
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
|
( b3Solid:getDimX() > BD.LEN_SHORT_PART and Proc.Box:getDimX() > min( BD.MAX_LEN_HTFEA, 0.8 * b3Solid:getDimX())) then
|
||||||
@@ -986,8 +993,11 @@ local function MakeOneFaceByMill( Proc, nPhase, nRawId, nPartId)
|
|||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, EgtIf( bUp, MCH_MILL_FU.ORTHO_RIGHT, MCH_MILL_FU.PARAL_RIGHT))
|
EgtSetMachiningParam( MCH_MP.FACEUSE, EgtIf( bUp, MCH_MILL_FU.ORTHO_RIGHT, MCH_MILL_FU.PARAL_RIGHT))
|
||||||
end
|
end
|
||||||
-- imposto lato di correzione
|
-- imposto lato di correzione
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
||||||
if not bUp then EgtSetMachiningParam( MCH_MP.INVERT, true) end
|
if not bUp then
|
||||||
|
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
||||||
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
||||||
|
end
|
||||||
-- imposto posizione braccio porta testa
|
-- imposto posizione braccio porta testa
|
||||||
if vtN:getY() < GEO.EPS_SMALL then
|
if vtN:getY() < GEO.EPS_SMALL then
|
||||||
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YM)
|
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YM)
|
||||||
@@ -3472,6 +3482,7 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
|
|||||||
|
|
||||||
local sMchFind = 'Pocket'
|
local sMchFind = 'Pocket'
|
||||||
local dAngLimit = 40
|
local dAngLimit = 40
|
||||||
|
local sWarn
|
||||||
|
|
||||||
-- se feature é larga come trave imposto openpocket
|
-- se feature é larga come trave imposto openpocket
|
||||||
if nDiffWidth == 0 then
|
if nDiffWidth == 0 then
|
||||||
@@ -3485,6 +3496,15 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
|
|||||||
-- calcolo l'angolo dalla verticale dall'angolo tra le due facce, perchè la feature potrebbe essere ruotata sulla Z locale della
|
-- calcolo l'angolo dalla verticale dall'angolo tra le due facce, perchè la feature potrebbe essere ruotata sulla Z locale della
|
||||||
-- faccia principale e quindi la componente X del versore della faccia potrebbe dare un valore non coerente
|
-- faccia principale e quindi la componente X del versore della faccia potrebbe dare un valore non coerente
|
||||||
local dDiffFromSqAng = dAng + 90
|
local dDiffFromSqAng = dAng + 90
|
||||||
|
-- informazioni sul lato da lavorare
|
||||||
|
local Edges = BL.GetEdgesInfo( Proc, Proc.Face[nSideFace + 1])
|
||||||
|
local EdgeToMachine = {}
|
||||||
|
for i = 1, #Edges do
|
||||||
|
local CurrentEdge = Edges[i]
|
||||||
|
if CurrentEdge.AdjacentFaceId == nBaseFace then
|
||||||
|
EdgeToMachine = CurrentEdge
|
||||||
|
end
|
||||||
|
end
|
||||||
-- se l'angolo dalla verticale si discosta di più dell'angolo limite impostato, utilizzo la svuotatura
|
-- se l'angolo dalla verticale si discosta di più dell'angolo limite impostato, utilizzo la svuotatura
|
||||||
if cos( dDiffFromSqAng) < cos( dAngLimit) then
|
if cos( dDiffFromSqAng) < cos( dAngLimit) then
|
||||||
-- applico la svuotatura
|
-- applico la svuotatura
|
||||||
@@ -3510,14 +3530,28 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
|
|||||||
end
|
end
|
||||||
-- aggiungo geometria
|
-- aggiungo geometria
|
||||||
EgtSetMachiningGeometry( {{ Proc.Id, nSideFace}})
|
EgtSetMachiningGeometry( {{ Proc.Id, nSideFace}})
|
||||||
-- imposto uso faccia
|
-- imposto vettore direzione e faceUse
|
||||||
local nFaceUse = BL.GetNearestOrthoOpposite(tvtN[1])
|
local vtFaceUse = EdgeToMachine.ToolDirection
|
||||||
|
local sUserNotes = ''
|
||||||
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'VtFaceUse', EgtNumToString( vtFaceUse:getX(),3) .. ',' .. EgtNumToString( vtFaceUse:getY(),3) .. ',' .. EgtNumToString( vtFaceUse:getZ(),3))
|
||||||
|
local nFaceUse = BL.GetNearestOrthoOpposite( vtFaceUse)
|
||||||
-- aggiusto i parametri
|
-- aggiusto i parametri
|
||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
|
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
|
||||||
EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH')
|
EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH')
|
||||||
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
|
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
||||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, 1)
|
EgtSetMachiningParam( MCH_MP.WORKSIDE, 1)
|
||||||
|
-- imposto allungamenti iniziale e finale
|
||||||
|
if EdgeToMachine.IsStartOpen then
|
||||||
|
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dDiamTool / 2)
|
||||||
|
else
|
||||||
|
EgtSetMachiningParam( MCH_MP.STARTADDLEN, -dDiamTool / 2)
|
||||||
|
end
|
||||||
|
if EdgeToMachine.IsEndOpen then
|
||||||
|
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dDiamTool / 2)
|
||||||
|
else
|
||||||
|
EgtSetMachiningParam( MCH_MP.ENDADDLEN, -dDiamTool / 2)
|
||||||
|
end
|
||||||
-- imposto posizione braccio porta testa
|
-- imposto posizione braccio porta testa
|
||||||
if tvtN[2]:getY() < GEO.EPS_SMALL then
|
if tvtN[2]:getY() < GEO.EPS_SMALL then
|
||||||
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YM)
|
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YM)
|
||||||
@@ -3525,9 +3559,9 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
|
|||||||
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YP)
|
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YP)
|
||||||
end
|
end
|
||||||
-- imposto elevazione e dichiaro non si generano sfridi per VMill
|
-- imposto elevazione e dichiaro non si generano sfridi per VMill
|
||||||
local sNotes = 'MaxElev=' .. EgtNumToString( dElev, 1) .. ';'
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dElev, 1))
|
||||||
sNotes = sNotes .. 'VMRS=0;'
|
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
|
||||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
|
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||||
if not ML.ApplyMachining( true, false) then
|
if not ML.ApplyMachining( true, false) then
|
||||||
local _, sErr = EgtGetLastMachMgrError()
|
local _, sErr = EgtGetLastMachMgrError()
|
||||||
EgtSetOperationMode( nMchId, false)
|
EgtSetOperationMode( nMchId, false)
|
||||||
@@ -3547,36 +3581,27 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
|
|||||||
bOpenStart = true
|
bOpenStart = true
|
||||||
bOpenEnd = true
|
bOpenEnd = true
|
||||||
else
|
else
|
||||||
local vAdj2 = EgtSurfTmFacetAdjacencies( Proc.Id, (nBaseFace))[1]
|
bOpenStart = EdgeToMachine.IsStartOpen
|
||||||
for j = 1, #vAdj2 do
|
bOpenEnd = EdgeToMachine.IsEndOpen
|
||||||
if vAdj2[j] == (nSideFace) then
|
|
||||||
-- Se non esiste faccia adiacente a lato precedente -> inizio aperto
|
|
||||||
local i = EgtIf( j > 1, j - 1, #vAdj2)
|
|
||||||
while vAdj2[i] == (nSideFace) do
|
|
||||||
i = EgtIf( i > 1, i - 1, #vAdj2)
|
|
||||||
end
|
|
||||||
bOpenStart = ( vAdj2[i] < 0)
|
|
||||||
-- Se non esiste faccia adiacente a lato successivo -> fine aperto
|
|
||||||
local k = EgtIf( j < #vAdj2, j + 1, 1)
|
|
||||||
while vAdj2[k] == (nSideFace) do
|
|
||||||
k = EgtIf( k < #vAdj2, k + 1, 1)
|
|
||||||
end
|
|
||||||
bOpenEnd = ( vAdj2[k] < 0)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
local sMilling
|
local sMilling
|
||||||
if nUseRoughTool > 0 then
|
if nUseRoughTool > 0 then
|
||||||
sMilling = ML.FindMilling( 'Long2Cut', nil, sTuuidPk)
|
sMilling = ML.FindMilling( 'Long2Cut', nil, sTuuidPk)
|
||||||
if not sMilling then sMilling = ML.FindMilling( 'Long2Cut') end
|
if not sMilling then sMilling = ML.FindMilling( 'LongSmallCut', nil, sTuuidPk) end
|
||||||
else
|
else
|
||||||
sMilling = ML.FindMilling( 'LongSmallCut', nil, sTuuidPk)
|
sMilling = ML.FindMilling( 'LongSmallCut', nil, sTuuidPk)
|
||||||
if not sMilling then sMilling = ML.FindMilling( 'LongSmallCut') end
|
if not sMilling then sMilling = ML.FindMilling( 'Long2Cut', nil, sTuuidPk) end
|
||||||
end
|
end
|
||||||
if not sMilling then
|
if not sMilling then
|
||||||
local sErr = 'Error : Long2Cut & LongSmallCut not found in library'
|
sMilling = ML.FindMilling( 'LongSmallCut')
|
||||||
EgtOutLog( sErr)
|
if not sMilling then sMilling = ML.FindMilling( 'Long2Cut') end
|
||||||
return false, sErr
|
if not sMilling then
|
||||||
|
local sErr = 'Error : Long2Cut & LongSmallCut not found in library'
|
||||||
|
EgtOutLog( sErr)
|
||||||
|
return false, sErr
|
||||||
|
else
|
||||||
|
sWarn = 'Warning : lapjoint chamfer angle machined with different tool'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
-- recupero i dati dell'utensile
|
-- recupero i dati dell'utensile
|
||||||
local dTDiam = 50
|
local dTDiam = 50
|
||||||
@@ -3602,7 +3627,11 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
|
|||||||
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
|
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
|
||||||
-- sistemazione inversione del percorso
|
-- sistemazione inversione del percorso
|
||||||
local nWrkSide = EgtGetMachiningParam( MCH_MP.WORKSIDE)
|
local nWrkSide = EgtGetMachiningParam( MCH_MP.WORKSIDE)
|
||||||
EgtSetMachiningParam( MCH_MP.INVERT, ( nWrkSide ~= MCH_MILL_WS.RIGHT))
|
local bInvert = nWrkSide ~= MCH_MILL_WS.RIGHT
|
||||||
|
EgtSetMachiningParam( MCH_MP.INVERT, bInvert)
|
||||||
|
if bInvert then
|
||||||
|
bOpenStart, bOpenEnd = bOpenEnd, bOpenStart
|
||||||
|
end
|
||||||
-- setto a 0 eventuali offset
|
-- setto a 0 eventuali offset
|
||||||
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
|
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
|
||||||
-- calcolo elevazione per allungamenti attacchi con fianchi chiusi
|
-- calcolo elevazione per allungamenti attacchi con fianchi chiusi
|
||||||
@@ -3625,7 +3654,11 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
|
|||||||
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
|
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.LIPERP, dElev)
|
EgtSetMachiningParam( MCH_MP.LIPERP, dElev)
|
||||||
EgtSetMachiningParam( MCH_MP.LOPERP, dElev)
|
if bOpenEnd then
|
||||||
|
EgtSetMachiningParam( MCH_MP.LOPERP, 0)
|
||||||
|
else
|
||||||
|
EgtSetMachiningParam( MCH_MP.LOPERP, dElev)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if bOpenEnd then
|
if bOpenEnd then
|
||||||
@@ -3638,8 +3671,12 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
|
|||||||
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.LINEAR)
|
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.LINEAR)
|
||||||
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
|
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
|
||||||
EgtSetMachiningParam( MCH_MP.LIPERP, dElev)
|
|
||||||
EgtSetMachiningParam( MCH_MP.LOPERP, dElev)
|
EgtSetMachiningParam( MCH_MP.LOPERP, dElev)
|
||||||
|
if bOpenStart then
|
||||||
|
EgtSetMachiningParam( MCH_MP.LIPERP, 0)
|
||||||
|
else
|
||||||
|
EgtSetMachiningParam( MCH_MP.LIPERP, dElev)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- eseguo
|
-- eseguo
|
||||||
@@ -3650,7 +3687,8 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return true
|
|
||||||
|
return true, sWarn
|
||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
@@ -6297,6 +6335,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|||||||
if sMyPocketing and
|
if sMyPocketing and
|
||||||
( dMyTMaxDepth > dFacElev + dCollSic - 10 * GEO.EPS_SMALL or ( dMyTMaxDepth > 0.8 * dFacElev + dCollSic and not bIsU) or
|
( dMyTMaxDepth > dFacElev + dCollSic - 10 * GEO.EPS_SMALL or ( dMyTMaxDepth > 0.8 * dFacElev + dCollSic and not bIsU) or
|
||||||
( bIsL and nUseRoughTool == 0) or
|
( bIsL and nUseRoughTool == 0) or
|
||||||
|
( bIsL and Proc.Prc == 20) or
|
||||||
( Proc.Prc == 25 and not bIsU and not bIsL)) or
|
( Proc.Prc == 25 and not bIsU and not bIsL)) or
|
||||||
( dUserMaxElev and dUserMaxElev > 10 * GEO.EPS_SMALL) then
|
( dUserMaxElev and dUserMaxElev > 10 * GEO.EPS_SMALL) then
|
||||||
sPocketing = sMyPocketing
|
sPocketing = sMyPocketing
|
||||||
@@ -6359,6 +6398,21 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
|||||||
bUseOtherFace = true
|
bUseOtherFace = true
|
||||||
rfFac, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacInd, GDB_ID.ROOT)
|
rfFac, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacInd, GDB_ID.ROOT)
|
||||||
end
|
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
|
-- eseguo
|
||||||
bOk, sWarn, sStat = MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
bOk, sWarn, sStat = MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
|
||||||
rfFac, dH, dV, dFacElev, bForceUseBlade,
|
rfFac, dH, dV, dFacElev, bForceUseBlade,
|
||||||
@@ -7241,7 +7295,7 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
-- in base al tipo di feature attribuisco il significato dei parametri Q
|
-- in base al tipo di feature attribuisco il significato dei parametri Q
|
||||||
AssignQIdent( Proc)
|
AssignQIdent( Proc)
|
||||||
-- se non forzate frese, uso la lama
|
-- se non forzate frese, uso la lama
|
||||||
local bUseBlade = EgtIf( Proc.Prc == 90, false, EgtGetInfo( Proc.Id, Q_USE_ROUGH_TOOL, 'i') ~= 1 and EgtGetInfo( Proc.Id, Q_USE_MILL, 'i') ~= 1)
|
local bUseBlade = EgtIf( Proc.Prc == 90 or Proc.bForceMill, false, EgtGetInfo( Proc.Id, Q_USE_ROUGH_TOOL, 'i') ~= 1 and EgtGetInfo( Proc.Id, Q_USE_MILL, 'i') ~= 1)
|
||||||
local nForceUseBladeOnNotContinueFace
|
local nForceUseBladeOnNotContinueFace
|
||||||
-- se ho attivo la lama e ho la feature 30, verifico i parametri Q propri della feature
|
-- se ho attivo la lama e ho la feature 30, verifico i parametri Q propri della feature
|
||||||
if bUseBlade then
|
if bUseBlade then
|
||||||
@@ -7382,6 +7436,14 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
-- se è una spianatura a una faccia richiamo la LongCut
|
-- se è una spianatura a una faccia richiamo la LongCut
|
||||||
elseif Proc.Prc == 90 then
|
elseif Proc.Prc == 90 then
|
||||||
return LongCut.Make( Proc, nPhase, nRawId, nPartId)
|
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
|
-- altrimenti, con lama
|
||||||
else
|
else
|
||||||
return Cut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
return Cut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||||
|
|||||||
@@ -1393,7 +1393,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not Proc.MoveAfterSplit and not bEndFixed and not bConvex then
|
if not Proc.bMoveAfterSplit and not bEndFixed and not bConvex then
|
||||||
-- recupero gruppo per geometria addizionale
|
-- recupero gruppo per geometria addizionale
|
||||||
local nAddGrpId = BL.GetAddGroup( nPartId)
|
local nAddGrpId = BL.GetAddGroup( nPartId)
|
||||||
if not nAddGrpId then
|
if not nAddGrpId then
|
||||||
|
|||||||
@@ -209,7 +209,12 @@ function ProcessRidgeLap.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
|
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
|
||||||
if b3Fac1 then dHCI = b3Raw:getMax():getX() - dOvmHead - b3Fac1:getMin():getX() end
|
if b3Fac1 then dHCI = b3Raw:getMax():getX() - dOvmHead - b3Fac1:getMin():getX() end
|
||||||
else
|
else
|
||||||
dHCI = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX()
|
-- se feature inclinata, si va oltre ingombro del box. Si considera metà dell'ingombro della faccia inclinata
|
||||||
|
if vtN[vFaceOrd[2]] and vtN[vFaceOrd[2]]:getZ() > 0 then
|
||||||
|
dHCI = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX() - ( vtN[vFaceOrd[2]]:getZ() * b3Raw:getDimZ())
|
||||||
|
else
|
||||||
|
dHCI = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
BL.UpdateHCING( nRawId, dHCI)
|
BL.UpdateHCING( nRawId, dHCI)
|
||||||
elseif Proc.Tail then
|
elseif Proc.Tail then
|
||||||
@@ -218,7 +223,12 @@ function ProcessRidgeLap.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
|||||||
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
|
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
|
||||||
if b3Fac1 then dTCI = b3Fac1:getMax():getX() - b3Solid:getMin():getX() end
|
if b3Fac1 then dTCI = b3Fac1:getMax():getX() - b3Solid:getMin():getX() end
|
||||||
else
|
else
|
||||||
dTCI = Proc.Box:getMax():getX() - b3Solid:getMin():getX()
|
-- se feature inclinata, si va oltre ingombro del box. Si considera metà dell'ingombro della faccia inclinata
|
||||||
|
if vtN[vFaceOrd[2]] and vtN[vFaceOrd[2]]:getZ() > 0 then
|
||||||
|
dTCI = Proc.Box:getMax():getX() - b3Solid:getMin():getX() - ( vtN[vFaceOrd[2]]:getZ() * b3Raw:getDimZ())
|
||||||
|
else
|
||||||
|
dTCI = Proc.Box:getMax():getX() - b3Solid:getMin():getX()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
BL.UpdateTCING( nRawId, dTCI)
|
BL.UpdateTCING( nRawId, dTCI)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -196,28 +196,47 @@ local function ApplyDiceCut( vFaceOrd, nGoodFace1, nGoodFace4, nAddGrpId, b3Soli
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local dDiceFaceMaxH = 0
|
-- controllo per eseguire solo un taglio ottimizzato
|
||||||
local dDiceFaceMinH = GEO.INFINITO
|
local bExecJustOneCut = false
|
||||||
|
local dDiceFaceDim = GEO.INFINITO
|
||||||
if ( i % 2) == 0 then
|
if ( i % 2) == 0 then
|
||||||
for cont = 1, #vCuts[i] do
|
for cont = 1, #vCuts[i] do
|
||||||
local _, dDiceFaceH, dDiceFaceV = BL.GetFaceHvRefDim( vCuts[i][cont], 0)
|
local _, dDiceFaceH, dDiceFaceV = BL.GetFaceHvRefDim( vCuts[i][cont], 0)
|
||||||
dDiceFaceMaxH = max( dDiceFaceMaxH, dDiceFaceH)
|
-- se feature verso Z, si ammette anche lavorazione in doppio
|
||||||
-- calcolo lato orizzontale minore ipotizzando sia un trapezio
|
if AreSameVectorApprox( vtRef, Z_AX()) then
|
||||||
local dDiceFaceH2 = ( 2 * EgtSurfArea( vCuts[i][cont]) ) / dDiceFaceV - dDiceFaceH
|
if dMaxDepth * 2 > dDiceFaceH + BD.CUT_EXTRA then
|
||||||
dDiceFaceMinH = min( dDiceFaceMinH, dDiceFaceH2)
|
bExecJustOneCut = true
|
||||||
|
dDiceFaceDim = dDiceFaceH
|
||||||
|
break
|
||||||
|
end
|
||||||
|
elseif AreSameVectorApprox( vtRef, Y_AX()) or AreSameVectorApprox( vtRef, -Y_AX()) then
|
||||||
|
if dMaxDepth > dDiceFaceV + BD.CUT_EXTRA then
|
||||||
|
bExecJustOneCut = true
|
||||||
|
dDiceFaceDim = dDiceFaceV
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- se si può fare, faccio unico taglio parallelo
|
-- se si può fare, faccio unico taglio parallelo
|
||||||
if ( i % 2) == 0 and ( dMaxDepth > dDiceFaceMaxH - 0.5 * dDiceFaceMinH + BD.CUT_EXTRA_MIN) then
|
if bExecJustOneCut then
|
||||||
local bDoubleCut = false
|
local bDoubleCut = false
|
||||||
local dCutExtra = BD.CUT_EXTRA
|
local dCutExtra = BD.CUT_EXTRA
|
||||||
if dMaxDepth < dDiceFaceMaxH + BD.CUT_EXTRA then
|
if dMaxDepth < dDiceFaceDim then
|
||||||
bDoubleCut = true
|
bDoubleCut = true
|
||||||
dCutExtra = - 0.5 * dDiceFaceMinH + BD.CUT_EXTRA_MIN
|
|
||||||
end
|
end
|
||||||
local nSurfToCut = EgtSurfTmBySewing( nAddGrpId, vCuts[i], false)
|
local nSurfToCut = EgtSurfTmBySewing( nAddGrpId, vCuts[i], false)
|
||||||
local nFaceUseCut1, nFaceUseCut2 = MCH_MILL_FU.ORTHO_BACK, MCH_MILL_FU.ORTHO_FRONT
|
|
||||||
if Proc.Tail then
|
local nFaceUseCut1, nFaceUseCut2
|
||||||
|
-- se feature rivolta verso alto setto direzione taglio davanti e dietro
|
||||||
|
if AreSameVectorApprox( vtRef, Z_AX()) then
|
||||||
|
nFaceUseCut1, nFaceUseCut2 = MCH_MILL_FU.ORTHO_BACK, MCH_MILL_FU.ORTHO_FRONT
|
||||||
|
-- altrimenti taglio da sopra
|
||||||
|
else
|
||||||
|
nFaceUseCut2 = MCH_MILL_FU.ORTHO_DOWN
|
||||||
|
end
|
||||||
|
|
||||||
|
if Proc.Tail and AreSameVectorApprox( vtRef, Z_AX()) then
|
||||||
nFaceUseCut1, nFaceUseCut2 = nFaceUseCut2, nFaceUseCut1
|
nFaceUseCut1, nFaceUseCut2 = nFaceUseCut2, nFaceUseCut1
|
||||||
end
|
end
|
||||||
if bDoubleCut then
|
if bDoubleCut then
|
||||||
|
|||||||
@@ -352,7 +352,7 @@ local function AddVerticalPreCuts( Proc, sCutting, dCutXOffset, b3Raw, sNotes)
|
|||||||
for j = nVerticalCuts, 1, -1 do
|
for j = nVerticalCuts, 1, -1 do
|
||||||
local nFaceUse = MCH_MILL_FU.PARAL_FRONT
|
local nFaceUse = MCH_MILL_FU.PARAL_FRONT
|
||||||
local dVerticalCutOffset = dVerticalSliceHeight * -j
|
local dVerticalCutOffset = dVerticalSliceHeight * -j
|
||||||
local bForceTangentLeadInOut = BD.PRESS_ROLLER
|
local bForceTangentLeadInOut = BD.PRESS_ROLLER and not BD.DOWN_HEAD
|
||||||
bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, nFaceUse, nil, -0.1 -dCutXOffset, BD.CUT_SIC, dVerticalCutOffset, 0, 0, sNotes, b3Raw, nil, nil, nil, bForceTangentLeadInOut)
|
bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, nFaceUse, nil, -0.1 -dCutXOffset, BD.CUT_SIC, dVerticalCutOffset, 0, 0, sNotes, b3Raw, nil, nil, nil, bForceTangentLeadInOut)
|
||||||
if not bOk then return bOk, sErr end
|
if not bOk then return bOk, sErr end
|
||||||
end
|
end
|
||||||
@@ -766,7 +766,11 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
|
|||||||
end
|
end
|
||||||
-- tagli aggiuntivi non necessari
|
-- tagli aggiuntivi non necessari
|
||||||
else
|
else
|
||||||
bOk, sErr = Cut.Make( Proc, nNewPhase, nRawId, nPartId, dMaxElev, nil, false, true, b3Raw, sNotes, dCurrOvmT)
|
local bForceTangentLeadInOut = false
|
||||||
|
if BD.PRESS_ROLLER then
|
||||||
|
bForceTangentLeadInOut = true
|
||||||
|
end
|
||||||
|
bOk, sErr = Cut.Make( Proc, nNewPhase, nRawId, nPartId, dMaxElev, nil, false, true, b3Raw, sNotes, dCurrOvmT, nil, nil, bForceTangentLeadInOut)
|
||||||
end
|
end
|
||||||
if sNotesFinal then
|
if sNotesFinal then
|
||||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotesFinal)
|
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotesFinal)
|
||||||
|
|||||||
@@ -1,5 +1,50 @@
|
|||||||
==== Beam Update Log ====
|
==== 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
|
||||||
|
- 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
|
||||||
|
- Modif : migliorato ordinamento per tenoni con foro secante
|
||||||
|
- Modif : in FreeContour migliorato pinzaggio
|
||||||
|
- Modif : in LapJoint miglioramenti vari alla lavorazione delle facce oblique
|
||||||
|
- Modif : In RidgeLap l'ingombro testa coda considera inclinazione feature per pinzaggio
|
||||||
|
- Added : in FreeContour aggiunta Q08 per forzare come pinzabile l'area della feature e Q07 per ignorare possibili problemi di lettura laser
|
||||||
|
- Added : in tagli aggiunta Q07 per forzare uso fresa
|
||||||
|
|
||||||
|
Versione 2.6i3 (08/10/2024)
|
||||||
|
- Modif : In RidgeLap, ingombro testa coda considera inclinazione feature per pinzaggio.
|
||||||
|
|
||||||
|
Versione 2.6i2 (13/09/2024)
|
||||||
|
- Modif : in FacesBySaw si invertono gli accorciamenti solo se l'inversione del percorso non è forzata dall'esterno; adeguati HeadCut e Split
|
||||||
|
- Modif : in nesting correzione in lettura array per cambio dll di lettura
|
||||||
|
- Modif : in BatchProcess e New, in caso sia richiesta generazione senza check, verifico prima che il file log specifico non contenga errori: se sì, forzo il check
|
||||||
|
- Modif : in FacesBySaw per settare il FaceUse si usa il versore nelle UserNotes
|
||||||
|
- Modif : in HeadCut, Split modifiche ai tagli aggiuntivi orizzontali e verticali; disattivati attacchi tangenziali per tagli aggiuntivi verticali in PF1250
|
||||||
|
- Fixed : in ProcessDrill In GetData corretta gestione modifica diametro foro
|
||||||
|
|
||||||
Versione 2.6i1 (09/09/2024)
|
Versione 2.6i1 (09/09/2024)
|
||||||
- Added : refactoring e modifiche a HeadCut e Split per introduzione pretagli a zero sul grezzo, per evitare problemi con pezzi non lunghi quanto ci si aspetta
|
- Added : refactoring e modifiche a HeadCut e Split per introduzione pretagli a zero sul grezzo, per evitare problemi con pezzi non lunghi quanto ci si aspetta
|
||||||
- Added : in Mark, gestita la lavorazione del testo
|
- Added : in Mark, gestita la lavorazione del testo
|
||||||
|
|||||||
+1
-1
@@ -2,5 +2,5 @@
|
|||||||
-- Gestione della versione di Beam
|
-- Gestione della versione di Beam
|
||||||
|
|
||||||
NAME = 'Beam'
|
NAME = 'Beam'
|
||||||
VERSION = '2.6i1'
|
VERSION = '2.6k2'
|
||||||
MIN_EXE = '2.6e5'
|
MIN_EXE = '2.6e5'
|
||||||
|
|||||||
Reference in New Issue
Block a user