Compare commits
31 Commits
Ticket#2035
...
2.7j1
| Author | SHA1 | Date | |
|---|---|---|---|
| c796a5351f | |||
| eb09d0b65d | |||
| 6f14e4f2c2 | |||
| 950060f4dc | |||
| 1007e08e9d | |||
| 04acc25535 | |||
| 38e26b9e48 | |||
| 72b7cbac1b | |||
| 5f1b863013 | |||
| 250802048a | |||
| a8d0bcfec4 | |||
| 459eff5610 | |||
| a749895229 | |||
| 04489421e7 | |||
| 0c16b5e969 | |||
| 9193924fbd | |||
| adbd5e944e | |||
| f76797cbd8 | |||
| 09e93d600d | |||
| 63f4df2a7d | |||
| 80c5035c74 | |||
| c9451e65e1 | |||
| 19706d6264 | |||
| 46ca7c793f | |||
| e26540193c | |||
| af107a780e | |||
| 4befa4eee3 | |||
| 07db2da825 | |||
| a4e6600510 | |||
| cb8465d977 | |||
| e867e1decf |
@@ -991,12 +991,12 @@ local function OrderFeatures( vProc, b3Raw, nPartId)
|
||||
if abs( B2.Box:getDimX() - b3Raw:getDimX()) < 0.2 * b3Raw:getDimX() then
|
||||
return not ( B1.Tail or B2.Box:getMin():getX() + 20 > B1.Box:getCenter():getX())
|
||||
end
|
||||
-- se primo è foro e l'altro no, lo penalizzo
|
||||
if Drill.Identify(B1) and not Drill.Identify(B2) then
|
||||
return ( B1.Box:getCenter():getX() > B2.Box:getMax():getX() + dDrillPenalty)
|
||||
-- se primo è foro e l'altro no, lo penalizzo (a patto che il foro non attraversi nessuna feature)
|
||||
if Drill.Identify(B1) and not B1.Dependency and not Drill.Identify(B2) then
|
||||
return ( B1.Box:getCenter():getX() > B2.Box:getMax():getX() + dDrillPenalty)
|
||||
end
|
||||
-- se primo è altro e secondo è foro, lo premio
|
||||
if not Drill.Identify(B1) and Drill.Identify(B2) then
|
||||
-- se primo è altro e secondo è foro, lo premio (a patto che il foro non attraversi nessuna feature)
|
||||
if not Drill.Identify(B1) and not B2.Dependency and Drill.Identify(B2) then
|
||||
return ( B1.Box:getMax():getX() + dDrillPenalty > B2.Box:getCenter():getX())
|
||||
end
|
||||
-- se prima è mortasa coda di rondine sul fianco e secondo taglio longitudinale, la coda di rondine va sempre prima
|
||||
@@ -2181,13 +2181,13 @@ function BeamExec.ProcessFeatures()
|
||||
end
|
||||
-- costanti per doppio
|
||||
MIRROR_DRILLINGS_MIN_DISTANCE = 40
|
||||
MIRROR_POCKETS_MIN_DISTANCE = 50
|
||||
MIRROR_POCKETS_MIN_DISTANCE = EgtIf( BD.DOWN_HEAD, 35, 50)
|
||||
-- verifica se possibile rotazione di 90 gradi
|
||||
BD.ROT90 = BD.ROT90 and Verify90DegRotation( EgtGetFirstRawPart())
|
||||
-- ciclo sui pezzi
|
||||
local nTotErr = 0
|
||||
local Stats = {}
|
||||
local nOrd = 1
|
||||
local nOrd = 1
|
||||
local nRawId = EgtGetFirstRawPart()
|
||||
while nRawId do
|
||||
-- verifico che il grezzo contenga pezzi oppure sia abbastanza lungo da essere scaricato coi carrelli
|
||||
|
||||
+1
-1
@@ -551,7 +551,7 @@ function BeamLib.GetFaceWithMostAdj( Proc, nPartId, bCompare3Fc, dCosSideAng)
|
||||
local nAddGrpId = BeamLib.GetAddGroup( nPartId)
|
||||
if not nAddGrpId then
|
||||
EgtOutLog( 'Error : missing AddGroup')
|
||||
return 0, 0, 0
|
||||
return 0, 0, 0, 0
|
||||
end
|
||||
-- verifico eventuale intersezione tra la faccia i-1 esima e la proiezione dell'altra sulla stessa
|
||||
local nShadowFacetId = EgtCopySurfTmFacet( nSurfId, j - 1, nAddGrpId)
|
||||
|
||||
@@ -627,7 +627,7 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
||||
local vtOrthoO
|
||||
if bFromBottom and dCutV < dMaxDepth - BD.CUT_EXTRA and vtN:getZ() > 0 then
|
||||
vtOrthoO = -Z_AX()
|
||||
elseif ( bHorizCut or ( dCutV < dMaxDepth - BD.CUT_EXTRA and not bVertCutOk)) and
|
||||
elseif ( bHorizCut and not bVertCutOk) and
|
||||
( not bVertCutOk or b3Solid:getDimX() > BD.LEN_SHORT_PART or Proc.AdvTail or ( vtN:getX() > 0 and vtN:getZ() <= 0.708) or ( abs( vtN:getY()) < 0.1 and vtN:getZ() <= 0)) then
|
||||
vtOrthoO = Z_AX()
|
||||
elseif b3Solid:getDimX() < BD.LEN_SHORT_PART and not Proc.AdvTail and abs( vtN:getY()) > 0.259 and
|
||||
|
||||
@@ -172,6 +172,7 @@ end
|
||||
---------------------------------------------------------------------
|
||||
-- Applicazione della lavorazione
|
||||
function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
local sWarn
|
||||
bMakeAntiSplitPath = true
|
||||
-- ingombro del pezzo
|
||||
local b3Solid = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||
@@ -447,94 +448,98 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
local nAuxId1 = CalcPathAtHeight( Proc.Id, AuxId, nAddGrpId, dAltMort, dSideAng, b3Solid)
|
||||
-- se esiste il percorso
|
||||
if nAuxId1 then
|
||||
-- creo percorso sulla parte alta della mortasa
|
||||
local dToolRadDelta = dAltMort * tan( dSideAng)
|
||||
local dTopDiam = dToolDiam + 2 * dToolRadDelta
|
||||
-- recupero punto iniziale e finale del percorso
|
||||
local ptStart = EgtSP( nAuxId1, GDB_RT.GLOB)
|
||||
local ptEnd = EgtEP( nAuxId1, GDB_RT.GLOB)
|
||||
if ptStart and ptEnd then
|
||||
local nId1
|
||||
-- se richiesti due segmenti di linea
|
||||
if not bMakeAsByArc then
|
||||
-- determino il punto comune dei due segmenti
|
||||
local vtDelta = ( ptEnd - ptStart) / 4
|
||||
vtDelta:rotate( vtExtr, -90)
|
||||
local ptMid = ( ptStart + ptEnd) / 2 + vtDelta
|
||||
-- creo la spezzata formata dai due segmenti
|
||||
nId1 = EgtCurveCompoFromPoints( nAddGrpId, { ptStart, ptMid, ptEnd}, GDB_RT.GLOB)
|
||||
-- altrimenti richiesto arco
|
||||
if EgtCurveIsFlat( nAuxId1) then
|
||||
-- creo percorso sulla parte alta della mortasa
|
||||
local dToolRadDelta = dAltMort * tan( dSideAng)
|
||||
local dTopDiam = dToolDiam + 2 * dToolRadDelta
|
||||
-- recupero punto iniziale e finale del percorso
|
||||
local ptStart = EgtSP( nAuxId1, GDB_RT.GLOB)
|
||||
local ptEnd = EgtEP( nAuxId1, GDB_RT.GLOB)
|
||||
if ptStart and ptEnd then
|
||||
local nId1
|
||||
-- se richiesti due segmenti di linea
|
||||
if not bMakeAsByArc then
|
||||
-- determino il punto comune dei due segmenti
|
||||
local vtDelta = ( ptEnd - ptStart) / 4
|
||||
vtDelta:rotate( vtExtr, -90)
|
||||
local ptMid = ( ptStart + ptEnd) / 2 + vtDelta
|
||||
-- creo la spezzata formata dai due segmenti
|
||||
nId1 = EgtCurveCompoFromPoints( nAddGrpId, { ptStart, ptMid, ptEnd}, GDB_RT.GLOB)
|
||||
-- altrimenti richiesto arco
|
||||
else
|
||||
-- direzione del segmento
|
||||
local vtDir = ptEnd - ptStart ;
|
||||
local dLen = vtDir:len()
|
||||
vtDir:normalize()
|
||||
-- direzioni tangenti iniziale e finale
|
||||
local vtStart = EgtSV( nAuxId1, GDB_RT.GLOB)
|
||||
local vtEnd = EgtEV( nAuxId1, GDB_RT.GLOB)
|
||||
-- angoli
|
||||
local dAngStart = acos( vtStart * vtDir)
|
||||
local dAngEnd = acos( vtEnd * vtDir)
|
||||
local dMaxAng = min( 30, dAngStart, dAngEnd)
|
||||
if dLen < dTopDiam then
|
||||
dMaxAng = min( dMaxAng, asin( dLen / dTopDiam))
|
||||
end
|
||||
local vtTg = vtDir ; vtTg:rotate( vtExtr, -dMaxAng)
|
||||
-- creo l'arco
|
||||
nId1 = EgtArc2PV( nAddGrpId, ptStart, ptEnd, vtTg, GDB_RT.GLOB)
|
||||
end
|
||||
if not nId1 then
|
||||
local sErr = 'Wrong geometry : Error on DtMortise '
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
EgtModifyCurveExtrusion( nId1, vtExtr, GDB_RT.GLOB)
|
||||
-- inserisco la lavorazione di contornatura anti splint
|
||||
local sNameF = 'DtMtAS_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||
local nMchFId = EgtAddMachining( sNameF, sMilling)
|
||||
if not nMchFId then
|
||||
local sErr = 'Error adding machining ' .. sNameF .. '-' .. sMilling
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- aggiungo geometria
|
||||
EgtSetMachiningGeometry( {{ nId1, -1}})
|
||||
-- setto affondamento pari all'altezza della mortsasa
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH, dAltMort)
|
||||
-- setto offset radiale con aggiunto un ulteriore allargamento di 1mm
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, dToolRadDelta - 1)
|
||||
-- antischeggia sempre con una passata
|
||||
if bMultipleZPasses then
|
||||
EgtSetMachiningParam( MCH_MP.STEP, 0)
|
||||
end
|
||||
-- sistemo il lato e la direzione di lavoro
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( bCW, MCH_MILL_WS.LEFT, MCH_MILL_WS.RIGHT))
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, EgtIf( bCW, false, true))
|
||||
-- se necessario, imposto SCC
|
||||
if nSCC then
|
||||
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||
end
|
||||
-- dichiaro non si generano sfridi per VMill
|
||||
local sUserNotes = 'MaxElev='.. EgtNumToString( dAltMort, 1) .. '; VMRS=0;'
|
||||
-- se lavorazione in doppio
|
||||
if Proc.Double and Proc.Double > 0 then
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'DOUBLE', Proc.Double)
|
||||
if Proc.Double ~= nMyPrevDouble then
|
||||
nMyPrevDouble = Proc.Double
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'StartZmax', 2)
|
||||
end
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||
-- eseguo
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
end
|
||||
else
|
||||
-- direzione del segmento
|
||||
local vtDir = ptEnd - ptStart ;
|
||||
local dLen = vtDir:len()
|
||||
vtDir:normalize()
|
||||
-- direzioni tangenti iniziale e finale
|
||||
local vtStart = EgtSV( nAuxId1, GDB_RT.GLOB)
|
||||
local vtEnd = EgtEV( nAuxId1, GDB_RT.GLOB)
|
||||
-- angoli
|
||||
local dAngStart = acos( vtStart * vtDir)
|
||||
local dAngEnd = acos( vtEnd * vtDir)
|
||||
local dMaxAng = min( 30, dAngStart, dAngEnd)
|
||||
if dLen < dTopDiam then
|
||||
dMaxAng = min( dMaxAng, asin( dLen / dTopDiam))
|
||||
end
|
||||
local vtTg = vtDir ; vtTg:rotate( vtExtr, -dMaxAng)
|
||||
-- creo l'arco
|
||||
nId1 = EgtArc2PV( nAddGrpId, ptStart, ptEnd, vtTg, GDB_RT.GLOB)
|
||||
end
|
||||
if not nId1 then
|
||||
local sErr = 'Wrong geometry : Error on DtMortise '
|
||||
local sErr = 'Wrong geometry : Error on DtMortise ' .. tostring( Proc.Id)
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
EgtModifyCurveExtrusion( nId1, vtExtr, GDB_RT.GLOB)
|
||||
-- inserisco la lavorazione di contornatura anti splint
|
||||
local sNameF = 'DtMtAS_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||
local nMchFId = EgtAddMachining( sNameF, sMilling)
|
||||
if not nMchFId then
|
||||
local sErr = 'Error adding machining ' .. sNameF .. '-' .. sMilling
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- aggiungo geometria
|
||||
EgtSetMachiningGeometry( {{ nId1, -1}})
|
||||
-- setto affondamento pari all'altezza della mortsasa
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH, dAltMort)
|
||||
-- setto offset radiale con aggiunto un ulteriore allargamento di 1mm
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, dToolRadDelta - 1)
|
||||
-- antischeggia sempre con una passata
|
||||
if bMultipleZPasses then
|
||||
EgtSetMachiningParam( MCH_MP.STEP, 0)
|
||||
end
|
||||
-- sistemo il lato e la direzione di lavoro
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( bCW, MCH_MILL_WS.LEFT, MCH_MILL_WS.RIGHT))
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, EgtIf( bCW, false, true))
|
||||
-- se necessario, imposto SCC
|
||||
if nSCC then
|
||||
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||
end
|
||||
-- dichiaro non si generano sfridi per VMill
|
||||
local sUserNotes = 'MaxElev='.. EgtNumToString( dAltMort, 1) .. '; VMRS=0;'
|
||||
-- se lavorazione in doppio
|
||||
if Proc.Double and Proc.Double > 0 then
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'DOUBLE', Proc.Double)
|
||||
if Proc.Double ~= nMyPrevDouble then
|
||||
nMyPrevDouble = Proc.Double
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'StartZmax', 2)
|
||||
end
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||
-- eseguo
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
end
|
||||
else
|
||||
local sErr = 'Wrong geometry : Error on DtMortise ' .. tostring( Proc.Id)
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
sWarn = 'Warning : skipped DoveTail mortise antisplint'
|
||||
end
|
||||
else
|
||||
local sErr = 'Wrong geometry : Error on DtMortise ' .. tostring( Proc.Id)
|
||||
@@ -675,7 +680,7 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
return false, sErr
|
||||
end
|
||||
end
|
||||
return true
|
||||
return true, sWarn
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
|
||||
+118
-6
@@ -64,14 +64,14 @@ local function VerifyOrientation( Proc, vtN, b3Raw)
|
||||
-- se tenone praticamente in asse, accetto fino a -22 deg
|
||||
if abs( vtN:getY()) < 0.088 then
|
||||
return ( vtN:getZ() >= -0.375)
|
||||
-- altrimenti, accetto fino a -10 deg
|
||||
-- altrimenti, accetto fino a -12.5 deg
|
||||
else
|
||||
return ( vtN:getZ() >= -0.174)
|
||||
return ( vtN:getZ() >= -0.216)
|
||||
end
|
||||
-- altrimenti
|
||||
else
|
||||
-- accetto fino a -7deg
|
||||
return ( vtN:getZ() >= -0.122)
|
||||
-- accetto fino a -12.5 deg
|
||||
return ( vtN:getZ() >= -0.216)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -209,7 +209,20 @@ function ProcessDtTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
|
||||
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
|
||||
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
|
||||
local bFromBottom = ( b3Solid:getDimX() < BD.LEN_SHORT_PART and vtExtr:getZ() > 0.25)
|
||||
|
||||
-- se esiste grezzo successivo non serve tagliare dal basso
|
||||
local bFromBottom
|
||||
local dTotalLength = 0
|
||||
local nNextRawId = EgtGetNextRawPart( nRawId)
|
||||
while nNextRawId do
|
||||
dTotalLength = dTotalLength + EgtGetRawPartBBox( nNextRawId):getDimX()
|
||||
nNextRawId = EgtGetNextRawPart( nNextRawId)
|
||||
end
|
||||
if dTotalLength > BD.MinRaw and not Proc.Tail then
|
||||
bFromBottom = false
|
||||
else
|
||||
bFromBottom = ( b3Solid:getDimX() < BD.LEN_SHORT_PART and vtExtr:getZ() > 0.25)
|
||||
end
|
||||
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom)
|
||||
if not bOk then return bOk, sErr end
|
||||
end
|
||||
@@ -352,8 +365,107 @@ function ProcessDtTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
BL.UpdateTCING( nRawId, dOffs)
|
||||
end
|
||||
end
|
||||
|
||||
-- si controllano le ultime 5 facce della feature
|
||||
local nIndFace = -1
|
||||
for i = 1, 5 do
|
||||
if abs( vtExtr * EgtSurfTmFacetNormVersor( Proc.Id, Proc.Fct-i, GDB_ID.ROOT)) < GEO.EPS_ANG_SMALL then
|
||||
nIndFace = Proc.Fct-i
|
||||
end
|
||||
end
|
||||
-- controllo se serve passaggio di finitura in caso il tenone non cominci dal bordo della trave (P14 > 0)
|
||||
if nIndFace > 0 then
|
||||
-- verifico se almeno uno dei punti iniziale e finale della curva giace in uno dei piani limite del pezzo, quindi se è un lato aperto
|
||||
local bOpen = false
|
||||
local ptIni = EgtSP( AuxId, GDB_RT.GLOB)
|
||||
local ptFin = EgtEP( AuxId, GDB_RT.GLOB)
|
||||
if ( abs( ptIni:getX() - b3Solid:getMax():getX()) < 100 * GEO.EPS_SMALL or abs( ptFin:getX() - b3Solid:getMax():getX()) < 100 * GEO.EPS_SMALL) or
|
||||
( abs( ptIni:getX() - b3Solid:getMin():getX()) < 100 * GEO.EPS_SMALL or abs( ptFin:getX() - b3Solid:getMin():getX()) < 100 * GEO.EPS_SMALL) or
|
||||
( abs( ptIni:getY() - b3Solid:getMax():getY()) < 100 * GEO.EPS_SMALL or abs( ptFin:getY() - b3Solid:getMax():getY()) < 100 * GEO.EPS_SMALL) or
|
||||
( abs( ptIni:getY() - b3Solid:getMin():getY()) < 100 * GEO.EPS_SMALL or abs( ptFin:getY() - b3Solid:getMin():getY()) < 100 * GEO.EPS_SMALL) or
|
||||
( abs( ptIni:getZ() - b3Solid:getMax():getZ()) < 100 * GEO.EPS_SMALL or abs( ptFin:getZ() - b3Solid:getMax():getZ()) < 100 * GEO.EPS_SMALL) or
|
||||
( abs( ptIni:getZ() - b3Solid:getMin():getZ()) < 100 * GEO.EPS_SMALL or abs( ptFin:getZ() - b3Solid:getMin():getZ()) < 100 * GEO.EPS_SMALL) then
|
||||
bOpen = true
|
||||
end
|
||||
-- se entrambi i punti non sono sul limite pezzo
|
||||
if not bOpen then
|
||||
-- recupero la lavorazione
|
||||
sMillType = 'Tenon'
|
||||
sMilling = ML.FindMilling( sMillType .. EgtIf( bMillDown and not bMillUp, '_H2', ''), nil, nil, nil, nil, bMillUp, bMillDown)
|
||||
if not sMilling then
|
||||
local sErr = 'Error : milling to finish the tenon not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- recupero i dati dell'utensile
|
||||
if EgtMdbSetCurrMachining( sMilling) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dTDiam
|
||||
dMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxMat
|
||||
local dSpeed = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) or 0
|
||||
bCW = ( dSpeed >= 0)
|
||||
end
|
||||
|
||||
-- inserisco la passata finale della lavorazione
|
||||
local sNameF = 'TenF_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||
local nMchFId = EgtAddMachining( sNameF, sMilling)
|
||||
if not nMchFId then
|
||||
local sErr = 'Error adding machining ' .. sNameF .. '-' .. sMilling
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- aggiungo geometria
|
||||
EgtSetMachiningGeometry( {{ Proc.Id, nIndFace}})
|
||||
-- sistemo i parametri
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH')
|
||||
-- sistemo il lato e la direzione di lavoro
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( bCW, MCH_MILL_WS.LEFT, MCH_MILL_WS.RIGHT))
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, EgtIf( bCW, true, false))
|
||||
EgtSetMachiningParam( MCH_MP.LITANG, 0.7 * dTDiam)
|
||||
EgtSetMachiningParam( MCH_MP.LIPERP, 20)
|
||||
EgtSetMachiningParam( MCH_MP.LOTANG, 0.7 * dTDiam)
|
||||
EgtSetMachiningParam( MCH_MP.LOPERP, 20)
|
||||
|
||||
local nFaceUse
|
||||
if vtExtr:getX() > -GEO.EPS_SMALL then
|
||||
nFaceUse = MCH_MILL_FU.PARAL_LEFT
|
||||
else
|
||||
nFaceUse = MCH_MILL_FU.PARAL_RIGHT
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
|
||||
|
||||
-- imposto elevazione
|
||||
local sUserNotes = EgtSetVal( 'MaxElev', EgtNumToString( dDtTenH, 1)) .. ';'
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||
|
||||
-- imposto posizione braccio porta testa
|
||||
local nSCC = MCH_SCC.NONE
|
||||
if BD.TURN then
|
||||
if abs( vtAx:getY()) > abs( vtAx:getZ()) then
|
||||
nSCC = EgtIf( vtAx:getY() > 0, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
|
||||
else
|
||||
nSCC = EgtIf( vtAx:getZ() > 0, MCH_SCC.ADIR_ZP, MCH_SCC.ADIR_ZM)
|
||||
end
|
||||
elseif not BD.C_SIMM then
|
||||
nSCC = MCH_SCC.ADIR_YM
|
||||
if abs( vtExtr:getY()) > 0.088 then
|
||||
nSCC = EgtIf( vtExtr:getX() < GEO.EPS_SMALL, MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
|
||||
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
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
return ProcessDtTenon
|
||||
|
||||
@@ -6496,7 +6496,10 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
nSurfPartId = EgtSurfTmBySewing( nAddGrpId, { nSurfPartId, nTailCutId}, false)
|
||||
EgtErase( nSurfPartIdOld)
|
||||
end
|
||||
dCustomMaxElev = EgtSurfTmFacetElevationInClosedSurfTm( Proc.Id, nFacInd, nSurfPartId, true) + dCollSic
|
||||
dCustomMaxElev = EgtSurfTmFacetElevationInClosedSurfTm( Proc.Id, nFacInd, nSurfPartId, true)
|
||||
if dCustomMaxElev then
|
||||
dCustomMaxElev = dCustomMaxElev + dCollSic
|
||||
end
|
||||
EgtErase( nSurfPartId)
|
||||
end
|
||||
end
|
||||
@@ -7249,7 +7252,7 @@ local function TestTwoFacesDownHead( Proc)
|
||||
end
|
||||
-- recupero le caratteristiche della feature e delle facce
|
||||
local vtRes = Proc.Face[1].VtN ^ Proc.Face[2].VtN
|
||||
Proc.IsTopDownRabbet = abs( vtRes:getZ()) > 10 * GEO.EPS_SMALL
|
||||
Proc.IsTopDownRabbet = Proc.AffectedFaces.Top and abs( vtRes:getZ()) > 10 * GEO.EPS_SMALL
|
||||
for i = 1, Proc.Fct do
|
||||
Proc.Face[i].IsTooDownwardForTopBlade = Proc.Face[i].VtN:getZ() < ( BD.CUT_VZ_MIN or -0.484) - 10 * GEO.EPS_SMALL
|
||||
Proc.Face[i].IsTooWideForTopBlade = Proc.Face[i].WidthTrimmed > dTopBladeMaxDepth
|
||||
|
||||
@@ -1280,10 +1280,10 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
nFin = 1
|
||||
else
|
||||
if vtN[vOrd[1]]:getZ() >= vtN[vOrd[2]]:getZ() then
|
||||
if vtN[vOrd[2]]:getZ() < dLimitAngle then
|
||||
nFin = 1
|
||||
else
|
||||
if vtN[vOrd[1]]:getZ() < dLimitAngle then
|
||||
nIni = 2
|
||||
else
|
||||
nFin = 1
|
||||
end
|
||||
else
|
||||
if vtN[vOrd[1]]:getZ() < dLimitAngle then
|
||||
@@ -1334,7 +1334,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
nSCC = EgtIf( nSide == -1, MCH_SCC.ADIR_ZM, MCH_SCC.ADIR_ZP)
|
||||
end
|
||||
else
|
||||
local bFromZM = (( vtN[vOrd[i]]:getZ() < 0 and bConvex) or ( vtN[vOrd[i]]:getZ() > 0 and not bConvex))
|
||||
local bFromZM = (( vtN[vOrd[i]]:getZ() < 10 * GEO.EPS_ANG_SMALL and bConvex) or ( vtN[vOrd[i]]:getZ() > - 10 * GEO.EPS_ANG_SMALL and not bConvex))
|
||||
nSCC = EgtIf( bFromZM, MCH_SCC.ADIR_ZM, MCH_SCC.ADIR_ZP)
|
||||
end
|
||||
end
|
||||
@@ -1352,7 +1352,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
if dMachDepth > dMaxDepth - 10 * GEO.EPS_ANG_SMALL then
|
||||
-- verifico se posso lavorare la faccia 2
|
||||
local nOtherFace = EgtIf( i == 1, 2, 1)
|
||||
if j == 1 and vtN[vOrd[nOtherFace]]:getZ() > dLimitAngle and vWidth[vOrd[i]] < dMaxDepth then
|
||||
if Proc.Fct == 2 and j == 1 and vtN[vOrd[nOtherFace]]:getZ() > dLimitAngle and vWidth[vOrd[i]] < dMaxDepth then
|
||||
vOrd[1], vOrd[2] = vOrd[2], vOrd[1]
|
||||
dLargh = vWidth[vOrd[i]]
|
||||
dSal, dEal = dEal, dSal
|
||||
|
||||
@@ -353,6 +353,18 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
BL.SetOpenSide( AuxId, b3Solid)
|
||||
end
|
||||
|
||||
-- recupero il raggio minimo della mortasa
|
||||
local dMaxDiam = 1000
|
||||
local nSt, nEnd = EgtCurveDomain( AuxId)
|
||||
for i = nSt, nEnd - 1 do
|
||||
local dRad = EgtCurveCompoRadius( AuxId, i)
|
||||
-- se è un raggio, setto ed esco subito. Tutti i raggi sono uguali nella mortasa
|
||||
if dRad > 0 then
|
||||
dMaxDiam = dRad * 2
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
-- caso speciale feature trimmata diversamente in/out: si ricostruisce la curva non trimmata
|
||||
-- recupero gruppo per geometria addizionale
|
||||
local nAddGrpId = BL.GetAddGroup( nPartId)
|
||||
@@ -486,6 +498,10 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
end
|
||||
-- determino larghezza della mortasa
|
||||
if dL < dW then dL, dW = dW, dL end
|
||||
|
||||
-- si prende il minimo tra larghezza mortasa e il raggio minimo impostato da parametro
|
||||
dMaxDiam = min( dW, dMaxDiam)
|
||||
|
||||
-- abilitazione lavorazione da sotto
|
||||
local bPockUp = ( BD.DOWN_HEAD and vtExtr:getZ() > -0.259)
|
||||
local bPockDown = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.174)
|
||||
@@ -564,16 +580,16 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
end
|
||||
local sPocketing
|
||||
if Proc.Prc ~= 53 then
|
||||
sPocketing = ProcessMortise.VerifyMortiseOrPocket( Proc, dW, dMorH, nil, sPockType..sMchExt, bPockDown, bExcludeH2)
|
||||
sPocketing = ProcessMortise.VerifyMortiseOrPocket( Proc, dMaxDiam, dMorH, nil, sPockType..sMchExt, bPockDown, bExcludeH2)
|
||||
if not sPocketing and bPockUp then
|
||||
sPocketing = ProcessMortise.VerifyMortiseOrPocket( Proc, dW, dMorH, nil, sPockType..sMchExt, _, bExcludeH2)
|
||||
sPocketing = ProcessMortise.VerifyMortiseOrPocket( Proc, dMaxDiam, dMorH, nil, sPockType..sMchExt, _, bExcludeH2)
|
||||
end
|
||||
end
|
||||
if not sPocketing then
|
||||
sPockType = 'Pocket'
|
||||
sPocketing = ProcessMortise.VerifyMortiseOrPocket( Proc, dW, dMorH, nil, sPockType..sMchExt, bPockDown, bExcludeH2)
|
||||
sPocketing = ProcessMortise.VerifyMortiseOrPocket( Proc, dMaxDiam, dMorH, nil, sPockType..sMchExt, bPockDown, bExcludeH2)
|
||||
if not sPocketing and bPockUp then
|
||||
sPocketing = ProcessMortise.VerifyMortiseOrPocket( Proc, dW, dMorH, nil, sPockType..sMchExt, _, bExcludeH2)
|
||||
sPocketing = ProcessMortise.VerifyMortiseOrPocket( Proc, dMaxDiam, dMorH, nil, sPockType..sMchExt, _, bExcludeH2)
|
||||
end
|
||||
end
|
||||
if not sPocketing then
|
||||
@@ -594,6 +610,7 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
bCW = ( dSpeed >= 0)
|
||||
end
|
||||
end
|
||||
|
||||
-- inserisco la lavorazione di svuotatura
|
||||
local sName = 'Mort_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||
local nMchFId = EgtAddMachining( sName, sPocketing)
|
||||
@@ -613,6 +630,11 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
EgtSetMachiningParam( MCH_MP.SUBTYPE, MCH_POCK_SUB.SPIRALIN)
|
||||
end
|
||||
|
||||
-- se diametro utensile esattamente uguale a larghezza tasca, e tasca tonda, si setta un offset radiale negativo
|
||||
if Proc.Fct > 6 and abs( dMillDiam - dW) < 100 * GEO.EPS_SMALL then
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, - 50 * GEO.EPS_SMALL)
|
||||
end
|
||||
|
||||
-- aggiungo geometria
|
||||
EgtSetMachiningGeometry( {{ AuxId, -1}})
|
||||
-- sistemo la direzione di lavoro
|
||||
|
||||
@@ -796,8 +796,10 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
|
||||
if bDoubleFinishMill then
|
||||
local sNewName = 'FinB_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||
local nMch2Id = EgtCopyMachining( sNewName, EgtGetName( nMchId))
|
||||
-- ottengo l'inversione e setto il contrario
|
||||
local bInvertMode = EgtGetMachiningParam( MCH_MP.INVERT)
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, not bInvertMode)
|
||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
||||
|
||||
-- eseguo
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
==== Beam Update Log ====
|
||||
|
||||
Versione 2.7i2 (30/09/2025)
|
||||
- Modif : migliorie a mortasa e tenone a coda di rondine
|
||||
- Modif : migliorie a LongDoubleCut
|
||||
- Modif : migliorie ai tagli
|
||||
|
||||
Versione 2.7i1 (03/09/2025)
|
||||
- Added : in Tenone a coda di rondine aggiunto passaggio di finitura in caso di P14 > 0
|
||||
- Modif : in LapJoint migliorata la scelta lama in caso di due facce e altre piccole correzioni
|
||||
|
||||
Versione 2.7h3 (26/08/2025)
|
||||
- Added : in LapJoint, se possibile, si ricalcola l'elevazione in caso di feature troncanti testa/coda
|
||||
- Modif : eventuali feature troncanti testa/coda sono fatte sempre subito dopo i rispettivi tagli di testa/coda
|
||||
|
||||
Versione 2.7h2 (19/08/2025)
|
||||
- Modif : migliorata ottimizzazione teste
|
||||
- Modif : migliorate forature in doppio
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@
|
||||
-- Gestione della versione di Beam
|
||||
|
||||
NAME = 'Beam'
|
||||
VERSION = '2.7h2'
|
||||
VERSION = '2.7i2'
|
||||
MIN_EXE = '2.7f2'
|
||||
|
||||
Reference in New Issue
Block a user