Compare commits
40 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1dc4efa397 | |||
| a843ef2e25 | |||
| fc3f6f22ac | |||
| 84bc8d7bd7 | |||
| 7c7fa26b8d | |||
| 54fcc27c49 | |||
| a5a8a0e98b | |||
| 27df151d3d | |||
| 34b4867a0d | |||
| 2bf15f2958 | |||
| bfa26e7610 | |||
| 398ea82d2b | |||
| 6f8c94705b | |||
| a77d0b2652 | |||
| 6c14b873f9 | |||
| 15d85e174b | |||
| a2ba993709 | |||
| e90a4db38c | |||
| 5820ccb455 | |||
| 57fa9bb8b3 | |||
| 3fe16f87b7 | |||
| 15af95a77e | |||
| a9e378c468 | |||
| a524a60a41 | |||
| fdb897ec68 | |||
| 4e4a1eca4d | |||
| 03bf116341 | |||
| 82d9d4dfde | |||
| d39148a9e8 | |||
| a7e0c5a33d | |||
| 8ddf1f260a | |||
| 8671415d5e | |||
| e496feff2c | |||
| 73431c52ca | |||
| 5420bc5165 | |||
| 3ccc382d5b | |||
| 29af699ad5 | |||
| 5865192e23 | |||
| 374d99ffd9 | |||
| 869683c99a |
@@ -49,6 +49,7 @@
|
||||
-- 2023/09/13 Aggiunta ClassifyTopology per la classificazione topologica delle feature. In CollectFeatures aggiunta la raccolta preliminare di alcune informazioni.
|
||||
-- 2022/09/26 Funzione IsFeatureCuttingEntireSection spostata in BeamLib
|
||||
-- 2022/09/26 In ClassifyTopology aggiunto passaggio del parametro nRawId
|
||||
-- 2023/10/24 Aggiunta scrittura parametro BARLEN nelle info del mach group
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local BeamExec = {}
|
||||
@@ -478,6 +479,15 @@ function BeamExec.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, vBeam, bMachGroup
|
||||
-- Impostazione della tavola
|
||||
EgtSetTable( 'Tab')
|
||||
|
||||
-- salvo nota con lunghezza grezzo
|
||||
-- Recupero l'identificativo del gruppo di lavoro corrente
|
||||
local nMGrpId = EgtGetCurrMachGroup()
|
||||
-- Lunghezza della barra
|
||||
local dBarLen = EgtGetInfo( nMGrpId, 'BARLEN', 'd')
|
||||
if not dBarLen then
|
||||
EgtSetInfo( nMGrpId, 'BARLEN', dRawL)
|
||||
end
|
||||
|
||||
-- Area tavola
|
||||
local b3Tab = EgtGetTableArea()
|
||||
-- Calcolo posizione estremo TR/BR della tavola rispetto a sua origine in BL
|
||||
|
||||
+8
-1
@@ -778,13 +778,20 @@ function BeamLib.GetNzLimDownUp( b3Raw, vtN, vtOrtho)
|
||||
else
|
||||
return -0.383
|
||||
end
|
||||
elseif b3Raw:getDimZ() < BD.MIN_DIM_HBEAM then
|
||||
elseif b3Raw:getDimZ() < 300 then
|
||||
-- N_HorAng < 10°
|
||||
if vtN and ( abs( vtN:getY()) < 0.174) then
|
||||
return -0.5
|
||||
else
|
||||
return -0.259
|
||||
end
|
||||
elseif b3Raw:getDimZ() < BD.MIN_DIM_HBEAM then
|
||||
-- N_HorAng < 10°
|
||||
if vtN and ( abs( vtN:getY()) < 0.174) then
|
||||
return -0.342
|
||||
else
|
||||
return -0.259
|
||||
end
|
||||
else
|
||||
-- N_HorAng < 10°
|
||||
if vtN and ( abs( vtN:getY()) < 0.174) then
|
||||
|
||||
+75
-3
@@ -18,6 +18,7 @@
|
||||
-- 2023/05/18 Imposto in ogni caso dVzLimDwnUp prima anche di bDownHead.
|
||||
-- 2023/06/14 Aggiunta MakeParallelOne e tolti parametri nForceWorkSide, nForceSCC da MakeOne.
|
||||
-- 2023/09/26 Piccola modifica per Turn su bInvert di MakeOne.
|
||||
-- 2023/10/24 In MakeOne migliorata gestione taglio con percorso bilinea. Aggiunta funzione GetNameSolidFaceIncludingLine.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local FacesBySaw = {}
|
||||
@@ -140,6 +141,31 @@ function MakeParallelOne( nSurfId, nFacet, sCutting, dSawDiam, nFaceUse, dVzLimD
|
||||
return true, sName, nMchFId
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function GetNameSolidFaceIncludingLine( b3Solid, ptP1Comp, ptP2Comp)
|
||||
-- se aperto su faccia fronte
|
||||
if abs( b3Solid:getMin():getY() - ptP1Comp:getY()) < 100 * GEO.EPS_SMALL and abs( b3Solid:getMin():getY() - ptP2Comp:getY()) < 100 * GEO.EPS_SMALL then
|
||||
return true, 'Front'
|
||||
-- se aperto su faccia sopra
|
||||
elseif abs( b3Solid:getMax():getY() - ptP1Comp:getY()) < 100 * GEO.EPS_SMALL and abs( b3Solid:getMax():getY() - ptP2Comp:getY()) < 100 * GEO.EPS_SMALL then
|
||||
return true, 'Back'
|
||||
-- se aperto su faccia retro
|
||||
elseif abs( b3Solid:getMin():getZ() - ptP1Comp:getZ()) < 100 * GEO.EPS_SMALL and abs( b3Solid:getMin():getZ() - ptP2Comp:getZ()) < 100 * GEO.EPS_SMALL then
|
||||
return true, 'Bottom'
|
||||
-- se aperto su faccia sotto
|
||||
elseif abs( b3Solid:getMax():getZ() - ptP1Comp:getZ()) < 100 * GEO.EPS_SMALL and abs( b3Solid:getMax():getZ() - ptP2Comp:getZ()) < 100 * GEO.EPS_SMALL then
|
||||
return true, 'Top'
|
||||
-- se aperto su faccia sinistra
|
||||
elseif abs( b3Solid:getMin():getX() - ptP1Comp:getX()) < 100 * GEO.EPS_SMALL and abs( b3Solid:getMin():getX() - ptP2Comp:getX()) < 100 * GEO.EPS_SMALL then
|
||||
return true, 'Left'
|
||||
-- se aperto su faccia destra
|
||||
elseif abs( b3Solid:getMax():getX() - ptP1Comp:getX()) < 100 * GEO.EPS_SMALL and abs( b3Solid:getMax():getX() - ptP2Comp:getX()) < 100 * GEO.EPS_SMALL then
|
||||
return true, 'Right'
|
||||
end
|
||||
-- se non è sul bordo del solido
|
||||
return false
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDwnUp, dCutExtra, dCutSic, dCutOffset, dAccStart, dAccEnd, sNotes, b3Raw, bForceInvert)
|
||||
-- se lama con asse parallelo alla faccia, passo alla apposita funzione
|
||||
@@ -202,17 +228,30 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
||||
local vtTg = ptP2 - ptP1 ; vtTg:normalize()
|
||||
local dAllStart = 0
|
||||
local dAllEnd = 0
|
||||
local bIsBiLinea = false
|
||||
local bCosAngleL1L2 = 0
|
||||
local dDist1 = dist( ptP1, ptPm)
|
||||
local dDist2 = dist( ptP2, ptPm)
|
||||
-- verifico se la bilinea si trova sul bordo del solido, quindi è una geometria aperta
|
||||
local nIdSolid = EgtGetParent( EgtGetParent( nSurfId))
|
||||
-- recupero ingombro del pezzo
|
||||
local Ls = EgtGetFirstNameInGroup( nIdSolid, 'Box')
|
||||
local b3Solid = EgtGetBBoxGlob( Ls or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||
-- controllo se le linee sono sul bordo della trave, quindi aperte
|
||||
local bIsL1OnFace = GetNameSolidFaceIncludingLine( b3Solid, ptP1, ptPm)
|
||||
local bIsL2OnFace = GetNameSolidFaceIncludingLine( b3Solid, ptPm, ptP2)
|
||||
-- se bilinea, scarto la parte più allineata con la direzione ortogonale (se deviazione angolare oltre 20 deg o lunghezza minore di dSawDiam/2 * cos( 20/2)) ma maggiore di un minimo
|
||||
if ( ( ptPm - ptP1) - ( ptPm - ptP1) * vtTg * vtTg):len() > 100 * GEO.EPS_SMALL then
|
||||
bIsBiLinea = true
|
||||
local vtTg1 = ptPm - ptP1 ; vtTg1:normalize()
|
||||
local vtTg2 = ptP2 - ptPm ; vtTg2:normalize()
|
||||
local dDist1 = dist( ptP1, ptPm)
|
||||
local dDist2 = dist( ptP2, ptPm)
|
||||
local dCosMax = 0.951 -- cos( 18°)
|
||||
local dLenMin = 30
|
||||
local dLenMax = max( 0.5 * dSawDiam * 0.17365 + 1, 2 * dLenMin)
|
||||
--if vtTg1 * vtTg2 < dCosMax or ( dDist1 < dLenMax and dDist1 > dLenMin) or ( dDist2 < dLenMax and dDist2 > dLenMin) then
|
||||
if vtTg1 * vtTg2 < dCosMax then
|
||||
|
||||
bCosAngleL1L2 = vtTg1 * vtTg2
|
||||
if bCosAngleL1L2 < dCosMax then
|
||||
local dOrtho1 = abs( vtTg1 * vtOrthO)
|
||||
local dOrtho2 = abs( vtTg2 * vtOrthO)
|
||||
if dOrtho1 < dOrtho2 or ( abs( dOrtho1 - dOrtho2) < 0.1 and dDist1 > 4 * dDist2) then
|
||||
@@ -267,6 +306,39 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
||||
local dLi2Tang, dLi2Perp, dLo2Tang, dLo2Perp = FacesBySaw.CalcLeadInOutTangGeom( ptP1, ptP2, vtN, dSawDiam/2, vtRef, dCutExtra, b3Box)
|
||||
local dLenLi2 = abs( dLi2Tang)
|
||||
local dLenLo2 = abs( dLo2Tang)
|
||||
|
||||
-- se il lato non lavorato della bilinea è aperto, setto entrata/uscita con la stessa direzione
|
||||
if bIsBiLinea then
|
||||
-- angolo tra le due linee
|
||||
local dAlpha = acos( abs( bCosAngleL1L2))
|
||||
-- se ho accorciato ingresso, setto componente tangente e perpendicolare sul percorso di entrata
|
||||
if abs( dAllStart) > 100 * GEO.EPS_SMALL and bIsL1OnFace then
|
||||
-- controllo prima che il secondo lato non sia già incluso nella lavorazione del primo
|
||||
local dDistPtTang = cos( dAlpha) * dDist1
|
||||
local dDistPtPerp = abs( sin( dAlpha) * dDist1)
|
||||
local dDistToCenter = 0.5 * dSawDiam - dDistPtPerp
|
||||
local dDistPointToCenter = sqrt( dDistPtTang * dDistPtTang + dDistToCenter * dDistToCenter)
|
||||
-- se distanza al punto è maggiore del raggio lama, significa che non ho già lavorato, quindi calcolo entrata opportunamente
|
||||
if dDistPointToCenter > 0.5 * dSawDiam then
|
||||
dLiTang = -dAllStart * cos( dAlpha)
|
||||
dLiPerp = sin( dAlpha) * dDist1
|
||||
end
|
||||
end
|
||||
-- se ho accorciato uscita, setto componente tangente e perpendicolare sul percorso di uscita
|
||||
if abs( dAllEnd) > 100 * GEO.EPS_SMALL and bIsL2OnFace then
|
||||
-- controllo prima che il secondo lato non sia già incluso nella lavorazione del primo
|
||||
local dDistPtTang = cos( dAlpha) * dDist2
|
||||
local dDistPtPerp = abs( sin( dAlpha) * dDist2)
|
||||
local dDistToCenter = 0.5 * dSawDiam - dDistPtPerp
|
||||
local dDistPointToCenter = sqrt( dDistPtTang * dDistPtTang + dDistToCenter * dDistToCenter)
|
||||
-- se distanza al punto è maggiore del raggio lama, significa che non ho già lavorato, quindi calcolo uscita opportunamente
|
||||
if dDistPointToCenter > 0.5 * dSawDiam then
|
||||
dLoTang = -dAllEnd * cos( dAlpha)
|
||||
dLoPerp = sin( dAlpha) * dDist2
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- scelgo l'attacco più conveniente (se non taglio praticamente longitudinale)
|
||||
local bLioTang
|
||||
local Ktp = 1.1
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
-- 2023/09/26 Aggiunte topologie Strip e Cut.
|
||||
-- 2023/09/27 Modificata GetFacesParallelToPart per tunnel, pocket e groove 3 lati
|
||||
-- 2023/10/16 In GetFacesParallelToPart rimossa Pocket e aggiunto Rabbet al check solo direzione principale
|
||||
-- 2023/11/03 In Classify ora si settano le AffectedFaces nella Proc, se non già presenti.
|
||||
-- Aggiunta groove 2 facce, differenziata da rabbet.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local FeatureTopology = {}
|
||||
@@ -163,6 +165,7 @@ end
|
||||
-- riconosce se Proc è una delle topologie standard e, in caso positivo, ne scrive le caratteristiche in campi specifici della Proc stessa restituendo true
|
||||
function FeatureTopology.Classify( Proc, b3Raw)
|
||||
|
||||
if not Proc.AffectedFaces then Proc.AffectedFaces = BL.GetProcessAffectedFaces( Proc) end
|
||||
if not Proc.Box or Proc.Box:isEmpty() then
|
||||
return false
|
||||
end
|
||||
@@ -199,9 +202,12 @@ function FeatureTopology.Classify( Proc, b3Raw)
|
||||
elseif Proc.Fct == 2 and bAllAnglesConcave and #vTriangularFaces == 1 then
|
||||
sFamily = 'Bevel'
|
||||
bIsThrough = false
|
||||
elseif Proc.Fct == 2 and bAllAnglesConcave then
|
||||
elseif Proc.Fct == 2 and bAllAnglesConcave and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right) and ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back) then
|
||||
sFamily = 'Rabbet'
|
||||
bIsThrough = true
|
||||
elseif Proc.Fct == 2 and bAllAnglesConcave then
|
||||
sFamily = 'Groove'
|
||||
bIsThrough = true
|
||||
elseif Proc.Fct == 2 and not bAllAnglesConcave and bIsAnyDimensionLongAsPart then
|
||||
sFamily = 'DoubleBevel'
|
||||
bIsThrough = true
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
-- 2023/08/01 Correzione su offset per taglio doppio di lato.
|
||||
-- 2023/08/01 In caso di pezzi alti su macchina tipo PF i tagli doppi di lato non vengono usati, si usa il metodo standard.
|
||||
-- 2023/09/12 In MakeFromTop abbassato a 590 mm il limite per convertire in LongCut.
|
||||
-- 2023/10/27 In MakeFromTop corretto massimo materiale in caso di lavorazione da sotto.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local ProcessCut = {}
|
||||
@@ -556,7 +557,7 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
||||
end
|
||||
-- lavoro la faccia
|
||||
local vtOrthoO
|
||||
if bFromBottom and dCutV < dMaxVertDepth - BD.CUT_EXTRA and vtN:getZ() > 0 then
|
||||
if bFromBottom and dCutV < dMaxDepth - BD.CUT_EXTRA and vtN:getZ() > 0 then
|
||||
vtOrthoO = -Z_AX()
|
||||
elseif bHorizCut and ( not bVertCutOk or b3Solid:getDimX() > BD.LEN_SHORT_PART or Proc.AdvTail or ( vtN:getX() > 0 and vtN:getZ() <= 0.708) or ( abs( vtN:getY()) < 0.1 and vtN:getZ() <= 0)) then
|
||||
vtOrthoO = Z_AX()
|
||||
|
||||
+231
-9
@@ -79,6 +79,10 @@
|
||||
-- 2023/09/27 In MakeMoreFaces e Classify refactoring della gestione scanalatura chiusa.
|
||||
-- 2023/09/27 In MakeLongMoreFaces aggiunto Topology.Classify alla Proc creata.
|
||||
-- 2023/10/03 In MakePocket aggiunto messaggio in caso si rovini il pezzo successivo.
|
||||
-- 2023/10/25 In LapJoint 2 facce longitudinali faccio di lama solo se taglio completamente. Altrimenti fresa.
|
||||
-- 2023/10/27 In Lapjoint 2 facce con angolo > 90 deg, se forzata fresa, si svuota la faccia principale e si lavora poi la faccia inclinata.
|
||||
-- 2023/11/03 Aggiunta MakeStaircaseStep per lavorazione con fresa + lama di gradini scala. Smusso opzionale.
|
||||
-- 2023/11/06 In MakeStaircaseStep gestito ritorno.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local ProcessLapJoint = {}
|
||||
@@ -151,6 +155,7 @@ local function AssignQIdent( Proc)
|
||||
Q_SIDE_ROUGH_TOOL = ''
|
||||
Q_ANTISPLINT_TYPE = ''
|
||||
Q_MAX_ELEVATION = 'Q10'
|
||||
Q_STAIRCASE = ''
|
||||
|
||||
if ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 16 then
|
||||
Q_FORCE_BLADE = 'Q01' -- i
|
||||
@@ -164,7 +169,8 @@ local function AssignQIdent( Proc)
|
||||
Q_USE_MILL = 'Q02' -- i
|
||||
Q_USE_ROUGH_TOOL = 'Q03' -- i
|
||||
Q_SIDE_ROUGH_TOOL = 'Q04' -- i
|
||||
Q_BORE_ON_CORNER = 'Q06' -- i
|
||||
Q_BORE_ON_CORNER = 'Q06' -- i
|
||||
Q_STAIRCASE = 'Q09' -- i
|
||||
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 25 then
|
||||
Q_BORE_ON_CORNER = 'Q01' -- i
|
||||
elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 30 then
|
||||
@@ -5401,10 +5407,10 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
if not sWarn then sWarn = '' end
|
||||
sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sWarn2, sWarn2)
|
||||
end
|
||||
-- se ho più di 3 facce e non di forma ad u oppure ho 3 facce e di forma ad u
|
||||
-- se ho più di 3 facce e non di forma ad u oppure ho 3 facce e di forma ad u oppure groove a 2 facce
|
||||
-- e non sono stati inseriti antischeggia di lama
|
||||
-- controllo se c'è una faccia non ortogonale alla principale e la lavoro con una contornatura o svuotatura
|
||||
if ( ( Proc.Fct > 3 and not bIsU) or ( Proc.Fct == 3 and bIsU)) and not bMadeASbyBld then
|
||||
if ( ( Proc.Fct >= 3 and not bIsU) or ( Proc.Fct == 3 and bIsU) or ( Proc.Fct == 2)) and not bMadeASbyBld then
|
||||
-- Recupero le facce adiacenti alla principale
|
||||
local vAdj = EgtSurfTmFacetAdjacencies( Proc.Id, nFacInd)[1]
|
||||
if not vAdj or #vAdj == 0 then
|
||||
@@ -5428,7 +5434,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
local ptPs = ( ptP1 + ptP2) / 2
|
||||
local bOk, sWarn2
|
||||
bOk, sWarn2 = MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtNx, nFacInd, vAdj[i], ptPs, tDimAndRef,
|
||||
b3Raw, EgtIf( ( Proc.Fct == 3 and bIsU), 0, 2), nUseRoughTool, dAng, sPocketing, sTuuidPk, dFacElev)
|
||||
b3Raw, EgtIf( ( Proc.Fct == 3 and bIsU) or Proc.Fct == 2, 0, 2), nUseRoughTool, dAng, sPocketing, sTuuidPk, dFacElev)
|
||||
if not bOk then return bOk, sWarn2 end
|
||||
if sWarn2 then
|
||||
if not sWarn then sWarn = '' end
|
||||
@@ -5638,7 +5644,6 @@ local function MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
local nFct = EgtSurfTmFacetCount( vAddId[i])
|
||||
local AddProc = { Id = vAddId[i], Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Box, TotBox = Proc.Box, Fct = nFct, Flg = Proc.Flg, PartId = Proc.PartId}
|
||||
Topology.Classify( AddProc, b3Raw)
|
||||
AddProc.AffectedFaces = BL.GetProcessAffectedFaces( AddProc)
|
||||
-- lasciare il false nel sesto parametro (perchè internamente viene verificato se diverso da nil)
|
||||
local bOk, sMyWarn
|
||||
bOk, sMyWarn, bPrevBhSideMill = MakeMoreFaces( AddProc, nPhase, nRawId, nPartId, dOvmHead, bAllWithEndCap, bPrevBhSideMill, bAllWithEndCap)
|
||||
@@ -5665,6 +5670,205 @@ local function TestTwoFacesDownHead( Proc)
|
||||
return bDownHead
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function MakeStaircaseStep( Proc, nRawId, b3Raw, nPartId)
|
||||
local sWarn
|
||||
-- box della trave
|
||||
local b3Solid = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||
if not b3Solid then
|
||||
local sErr = 'Error : part box not found'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- angolo tra le facce
|
||||
local _, _, _, dAng = EgtSurfTmFacetsContact( Proc.Id, 0, 1, GDB_ID.ROOT)
|
||||
-- l'angolo tra le facce deve essere compreso tra 80 e 90.5 deg
|
||||
if ( dAng > -89.5 + 10 * GEO.EPS_ANG_SMALL) or ( dAng < -100 - 10 * GEO.EPS_ANG_SMALL) then return false end
|
||||
-- normali delle facce
|
||||
local vtNRiser = EgtSurfTmFacetNormVersor( Proc.Id, 0, GDB_ID.ROOT)
|
||||
local vtNTread = EgtSurfTmFacetNormVersor( Proc.Id, 1, GDB_ID.ROOT)
|
||||
-- la faccia 0 è l'alzata (faccia più verticale), la 1 la pedata; se così non è le scambio
|
||||
local nFacetRiser, nFacetTread = 0, 1
|
||||
if abs( vtNRiser:getZ()) > abs( vtNTread:getZ()) then
|
||||
EgtSurfTmSwapFacets( Proc.Id, 0, 1)
|
||||
vtNRiser, vtNTread = vtNTread, vtNRiser
|
||||
end
|
||||
-- riferimenti e dimensioni delle facce
|
||||
local rfFacRiser, dHRiser, dVRiser = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacetRiser, GDB_ID.ROOT)
|
||||
local rfFacTread, dHTread, dVTread = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacetTread, GDB_ID.ROOT)
|
||||
|
||||
-- recupero la fresatura
|
||||
-- verifico se fresatura da sopra
|
||||
local bIsMillingUpward = ( vtNTread:getZ() >= BD.NZ_MINA)
|
||||
-- fresatura
|
||||
local sMilling = ML.FindMilling( 'BirdsMouth', nil, nil, nil, nil, bIsMillingUpward, not bIsMillingUpward)
|
||||
if not sMilling then
|
||||
local sErr = 'Error : BirdsMouth not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- dati utensile
|
||||
local dMillDiam = 50
|
||||
local dMillMaxMat = 0
|
||||
local dMillRotationSpeed = 0
|
||||
if EgtMdbSetCurrMachining( sMilling) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
||||
dMillMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMillMaxMat
|
||||
dMillRotationSpeed = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) or dMillRotationSpeed
|
||||
end
|
||||
end
|
||||
|
||||
-- recupero la lavorazione con lama
|
||||
-- verifico se uso lama da sotto
|
||||
local bCutDown = ( BD.DOWN_HEAD and rfFacTread:getVersZ():getZ() < - 0.5)
|
||||
-- lavorazione con lama
|
||||
local sCutting = ML.FindCutting( 'HeadSide', not bCutDown, bCutDown)
|
||||
-- dati utensile
|
||||
local dSawMaxDepth = 0
|
||||
local dSawDiam = 400
|
||||
local dSawRotationSpeed = 0
|
||||
local dSawThick = 5
|
||||
if sCutting then
|
||||
if EgtMdbSetCurrMachining( sCutting) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dSawMaxDepth = EgtTdbGetCurrToolMaxDepth() or dSawMaxDepth
|
||||
dSawRotationSpeed = EgtTdbGetCurrToolParam( MCH_MP.SPEED) or dSawRotationSpeed
|
||||
dSawThick = EgtTdbGetCurrToolParam( MCH_TP.THICK) or dSawThick
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- calcolo riduzione profondità lama in caso di angolo inferiore a 90deg
|
||||
local dCutExtraSaw = 0
|
||||
if dAng < -91 and dAng > -179 then
|
||||
dCutExtraSaw = - dSawThick / tan( 180 + dAng)
|
||||
end
|
||||
|
||||
-- eventuali smussi
|
||||
-- recupero gruppo per geometria addizionale
|
||||
local nAddGrpId = BL.GetAddGroup( nPartId)
|
||||
if not nAddGrpId then
|
||||
local sErr = 'Error : missing AddGroup'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- verifiche per smusso
|
||||
local nChamfer, dDepthCham, sErrCham = EvaluateQParam( Proc)
|
||||
-- lavorazione smussi
|
||||
if nChamfer > 0 then
|
||||
local _, _, _, vtOrtho, _, nSurfInt = BL.GetTunnelDimension( Proc, nPartId)
|
||||
local nOk, sErr = MakeChamfer( Proc, true, nAddGrpId, vtOrtho, b3Solid, nSurfInt, dDepthCham)
|
||||
if nOk < 0 then return false, sErr end
|
||||
if sErr then
|
||||
if not sWarn then sWarn = '' end
|
||||
sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sErr, sErr)
|
||||
end
|
||||
end
|
||||
|
||||
-- fresatura della pedata per fare spazio alla lama
|
||||
local dMillingDepth = dVTread - dSawMaxDepth + 10
|
||||
-- divido in passate orizzontali
|
||||
local nMillHorizontalSteps = ceil( ( dMillingDepth - 100 * GEO.EPS_SMALL) / ( dMillDiam * 0.6))
|
||||
local dMillHorizontalStep = 0
|
||||
if nMillHorizontalSteps > 1 then
|
||||
dMillHorizontalStep = ( dMillingDepth - dMillDiam * 0.6) / ( nMillHorizontalSteps - 1)
|
||||
end
|
||||
for i = nMillHorizontalSteps, 1, -1 do
|
||||
-- inserisco la lavorazione
|
||||
local sName = 'Mill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
|
||||
local nMchFId = EgtAddMachining( sName, sMilling)
|
||||
if not nMchFId then
|
||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- aggiungo geometria
|
||||
EgtSetMachiningGeometry( {{ Proc.Id, nFacetTread}})
|
||||
-- imposto uso faccia
|
||||
local nFaceUse = BL.GetNearestOrthoOpposite( vtNTread)
|
||||
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
|
||||
-- imposto lato di lavoro e eventuale inversione
|
||||
local bInvert = dMillRotationSpeed < 0
|
||||
local nWorkSide = MCH_MILL_WS.LEFT
|
||||
if bInvert then
|
||||
nWorkSide = MCH_MILL_WS.RIGHT
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, nWorkSide)
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, bInvert)
|
||||
-- imposto posizione braccio porta testa
|
||||
if vtNTread:getY() < GEO.EPS_SMALL then
|
||||
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YM)
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YP)
|
||||
end
|
||||
-- imposto attacchi e allungamenti
|
||||
if nFacetTread then
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dMillDiam/2 + 10)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dMillDiam/2 + 10)
|
||||
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.LINEAR)
|
||||
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.LINEAR)
|
||||
EgtSetMachiningParam( MCH_MP.LITANG, 0)
|
||||
EgtSetMachiningParam( MCH_MP.LOTANG, 0)
|
||||
EgtSetMachiningParam( MCH_MP.LIPERP, 0)
|
||||
EgtSetMachiningParam( MCH_MP.LOPERP, 0)
|
||||
end
|
||||
-- imposto eventuale offset
|
||||
EgtSetMachiningParam( MCH_MP.OFFSR, dVTread - dMillingDepth + ( i - 1) * dMillHorizontalStep)
|
||||
-- se step verticale non presente, lo setto
|
||||
local dMillVerticalStep = EgtGetMachiningParam( MCH_MP.STEP, 'd')
|
||||
if not dMillVerticalStep or dMillVerticalStep <= 10 * GEO.EPS_SMALL then
|
||||
dMillVerticalStep = 0.25 * dMillDiam
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.STEP, dMillVerticalStep)
|
||||
-- dichiaro non si generano sfridi per VMill
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, 'VMRS=0;')
|
||||
-- eseguo
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
end
|
||||
-- eventuale segnalazione ingombro di testa o coda
|
||||
UpdateEncumbrance( Proc, nRawId, b3Raw, b3Solid)
|
||||
end
|
||||
|
||||
-- taglio di lama della pedata
|
||||
-- calcolo faceuse
|
||||
local nFaceUseTread = EgtIf( vtNRiser * Z_AX() > -GEO.EPS_SMALL, MCH_MILL_FU.ORTHO_DOWN, MCH_MILL_FU.ORTHO_TOP)
|
||||
-- lavorazioni della faccia
|
||||
for i = 2, 1, -1 do
|
||||
local dCutRadialOffsetTread = - dSawMaxDepth / 2 * ( i - 1)
|
||||
-- componente limite del vettore Z per lama downUp; impostata a -2 per non farla mai rientrare in quel caso
|
||||
local dVzLimDwnUp = -2
|
||||
local bOkSawTread, sErr = Fbs.MakeOne( Proc.Id, nFacetTread, sCutting, dSawDiam, nFaceUseTread, dVzLimDwnUp, dCutRadialOffsetTread + dCutExtraSaw, 0, 0, 0, 0, nil, b3Raw)
|
||||
if not bOkSawTread then return false, sErr end
|
||||
end
|
||||
|
||||
-- taglio di lama dell'alzata
|
||||
-- calcolo faceuse
|
||||
local nFaceUseRiser = EgtIf( vtNRiser * Z_AX() > -GEO.EPS_SMALL, MCH_MILL_FU.ORTHO_DOWN, MCH_MILL_FU.ORTHO_TOP)
|
||||
-- divido in passate orizzontali
|
||||
local nSawStepsRiser = ceil( ( dVRiser - 100 * GEO.EPS_SMALL) / ( dSawMaxDepth * 0.6))
|
||||
local dSawStepRiser = 0
|
||||
if nSawStepsRiser > 1 then
|
||||
dSawStepRiser = ( dVRiser - ( dSawMaxDepth * 0.6)) / ( nSawStepsRiser - 1)
|
||||
end
|
||||
-- lavorazioni della faccia
|
||||
for i = nSawStepsRiser, 1, -1 do
|
||||
local dCutRadialOffsetRiser = - dSawStepRiser * ( i - 1)
|
||||
-- componente limite del vettore Z per lama downUp; impostata a -2 per non farla mai rientrare in quel caso
|
||||
local dVzLimDwnUp = -2
|
||||
local bOkSawRiser, sErr = Fbs.MakeOne( Proc.Id, nFacetRiser, sCutting, dSawDiam, nFaceUseRiser, dVzLimDwnUp, dCutRadialOffsetRiser + dCutExtraSaw, 0, 0, 0, 0, nil, b3Raw)
|
||||
if not bOkSawRiser then return false, sErr end
|
||||
end
|
||||
|
||||
return true, sWarn
|
||||
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- Applicazione della lavorazione
|
||||
---------------------------------------------------------------------
|
||||
@@ -5743,7 +5947,14 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
-- leggo i parametri Q per utilizzare la fresa di fianco e/o lama
|
||||
local nUseSideTool = EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') or 0
|
||||
local bUseBlade = EgtGetInfo( Proc.Id, Q_ANTISPLINT_TYPE, 'i') == 1
|
||||
return Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool)
|
||||
local bOk, sMyWarn = Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool)
|
||||
-- se non sono riuscito a farlo di lama, riprovo con la fresa
|
||||
if not bOk and bUseBlade then
|
||||
bUseBlade = false
|
||||
return Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool)
|
||||
else
|
||||
return bOk, sMyWarn
|
||||
end
|
||||
-- prima faccia terminale
|
||||
elseif b3Fac1:getDimX() < 1 and abs( vtN2:getX()) < GEO.EPS_SMALL then
|
||||
-- la faccia 0 deve essere quella lunga
|
||||
@@ -5821,13 +6032,24 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
end
|
||||
-- due facce
|
||||
elseif Proc.Fct == 2 then
|
||||
-- se V passante e attiva Q per lavorazione speciale scala
|
||||
if EgtGetInfo( Proc.Id, Q_STAIRCASE, 'i') == 1 and Proc.Topology == 'Groove' and Proc.IsThrough == true then
|
||||
return MakeStaircaseStep( Proc, nRawId, b3Raw, nPartId)
|
||||
end
|
||||
-- se praticamente è lunga come la trave e sono due facce lunghe
|
||||
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, 0, GDB_BB.STANDARD)
|
||||
local b3Fac2 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, 1, GDB_BB.STANDARD)
|
||||
if Proc.Box:getDimX() > 0.8 * b3Solid:getDimX() and
|
||||
abs( b3Fac1:getDimX() - b3Fac2:getDimX()) < 50 and abs( b3Fac1:getCenter():getX() - b3Fac2:getCenter():getX()) < 50 then
|
||||
local nUseSideTool = EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') or 0
|
||||
return Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool)
|
||||
local bOk, sMyWarn = Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool)
|
||||
-- se non sono riuscito a farlo di lama, riprovo con la fresa
|
||||
if not bOk and bUseBlade then
|
||||
bUseBlade = false
|
||||
return Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool)
|
||||
else
|
||||
return bOk, sMyWarn
|
||||
end
|
||||
-- altrimenti
|
||||
else
|
||||
-- verifico se da lavorare con testa da sotto
|
||||
@@ -5838,9 +6060,9 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
if VerifyBHSideMill( Proc) then
|
||||
return MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, true)
|
||||
-- se ortogonali e non forzata lama, con fresa
|
||||
elseif not bUseBlade and bAdj and abs( dAng + 90) < 1 then
|
||||
elseif not bUseBlade then
|
||||
-- se piccole
|
||||
if Proc.Box:getDimX() < MAX_MILL_LIN and ( Proc.Box:getDimZ() < MAX_MILL_LIN or Proc.Box:getDimY() < MAX_MILL_LIN) then
|
||||
if Proc.Box:getDimX() < MAX_MILL_LIN and ( Proc.Box:getDimZ() < MAX_MILL_LIN or Proc.Box:getDimY() < MAX_MILL_LIN) and bAdj and abs( dAng + 90) < 1 then
|
||||
return MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId, bDownHead)
|
||||
else
|
||||
return MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, true)
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
-- 2023/05/19 Migliorato calcolo e verifica affondamento per lavorazione con lama con codolo in mezzo.
|
||||
-- 2023/08/01 Ammesso uso lama da sotto fino a N +3deg in verticale.
|
||||
-- 2023/09/26 Modificata chiamata a GetFaceWithMostAdj.
|
||||
-- 2023/10/24 Migliorata spezzatura taglio passante con due spezzoni
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local ProcessLongCut = {}
|
||||
@@ -593,6 +594,11 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
||||
-- recupero l'ingombro del grezzo di appartenenza
|
||||
local b3Raw = EgtGetRawPartBBox( nRawId)
|
||||
local b3Solid = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||
|
||||
-- recupero lunghezza grezzo totale da info sulla macchinata
|
||||
local dBarLen = EgtGetInfo( EgtGetCurrMachGroup(), 'BARLEN', 'd')
|
||||
local dOvmHead = b3Raw:getMax():getX() - b3Solid:getMax():getX()
|
||||
|
||||
-- dati della faccia
|
||||
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
|
||||
local _, dLen, dWidth = EgtSurfTmFacetMinAreaRectangle( Proc.Id, 0, GDB_ID.ROOT)
|
||||
@@ -1311,8 +1317,18 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
||||
dEndAccDist = min( dEndAccDist, dLen/2)
|
||||
dStartAccDist = dLen - dEndAccDist
|
||||
else
|
||||
dStartAccDist = dLen/2
|
||||
dEndAccDist = dStartAccDist
|
||||
-- se c'è del grezzo aggiuntivo e, considerando il grezzo mi resta abbastanza materiale per pinzare, allora faccio spezzatura asimmetrica
|
||||
if BD.MIN_CLAMPING_LEN and ( dBarLen - dLen) > dOvmHead + 100 * GEO.EPS_SMALL and ( dBarLen - dStartAccDist > BD.MIN_CLAMPING_LEN) then
|
||||
dStartAccDist = dBarLen/2
|
||||
dEndAccDist = dLen - dStartAccDist
|
||||
-- se sono sul fronte, la spezzatura assimmetrica è inversa
|
||||
if Proc.AffectedFaces.Front then
|
||||
dStartAccDist, dEndAccDist = dEndAccDist, dStartAccDist
|
||||
end
|
||||
else
|
||||
dStartAccDist = dLen/2
|
||||
dEndAccDist = dStartAccDist
|
||||
end
|
||||
end
|
||||
else
|
||||
nC = 1
|
||||
@@ -1361,9 +1377,9 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
||||
end
|
||||
-- aggiungo geometria
|
||||
EgtSetMachiningGeometry( {{ Proc.Id, 0}})
|
||||
|
||||
-- inverto se utensile antiorario per garantire senso di percorrenza migliore
|
||||
local bInvert = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) < 0
|
||||
-- setto workside e eventuale inversione
|
||||
local bInvert
|
||||
if bInvert then
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, true)
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
-- 2023/03/06 Correzione per i casi con lavorazione limitata.
|
||||
-- 2023/03/23 Correzione per caso con doppia lama da sotto.
|
||||
-- 2023/06/07 Sistemazione SCC per macchina TURN
|
||||
-- 2023/10/24 Migliorata spezzatura taglio passante con due spezzoni
|
||||
-- 2023/10/25 Se effettivamente un taglio longitudinale e lama non taglia completamente, limito la lavorazione. Altrimenti esco.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local ProcessLong2Cut = {}
|
||||
@@ -311,12 +313,17 @@ end
|
||||
---------------------------------------------------------------------
|
||||
-- Applicazione della lavorazione
|
||||
function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster, nUseSideToolMaster)
|
||||
|
||||
-- recupero l'ingombro del grezzo di appartenenza
|
||||
local b3Raw = EgtGetRawPartBBox( nRawId)
|
||||
local b3Solid = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||
-- carico i dati delle face già inserite nelle opportune tabelle
|
||||
local nFaceLimit, tFaceLong, ptC, vtN = IdentifyFaces( Proc)
|
||||
local dLen = Proc.Box:getDimX()
|
||||
|
||||
-- recupero lunghezza grezzo totale da info sulla macchinata
|
||||
local dBarLen = EgtGetInfo( EgtGetCurrMachGroup(), 'BARLEN', 'd')
|
||||
local dOvmHead = b3Raw:getMax():getX() - b3Solid:getMax():getX()
|
||||
|
||||
-- verifico posizione (+1=sopra, -1=sotto, 0=sui lati)
|
||||
local nSide = 0
|
||||
if vtN[1]:getZ() > 0.0175 and vtN[2]:getZ() > 0.0175 then
|
||||
@@ -811,6 +818,18 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
end
|
||||
-- altrimenti concavo
|
||||
else
|
||||
-- se effettivamente un taglio longitudinale e lama non taglia completamente, limito la lavorazione. Altrimenti esco.
|
||||
for k = 1, #vOrd do
|
||||
if vWidth[vOrd[k]] + BD.CUT_SIC > dMaxDepth then
|
||||
if not( ProcessLong2Cut.Identify( Proc)) then
|
||||
return false
|
||||
else
|
||||
local sWarn2 = 'Warning in ' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. ' : elevation (' .. EgtNumToString( vWidth[vOrd[k]], 1) .. ') bigger than max saw depth (' .. EgtNumToString( dMaxDepth, 1) .. ')'
|
||||
if not sWarn then sWarn = '' end
|
||||
sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sWarn2, sWarn2)
|
||||
end
|
||||
end
|
||||
end
|
||||
-- si percorrono i lati alto e basso della faccia
|
||||
for i = 1, nC do
|
||||
-- Posizione braccio portatesta
|
||||
@@ -851,16 +870,27 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
-- ciclo sulle passate
|
||||
local dOffset
|
||||
local dLioPerp
|
||||
|
||||
if j == 1 then -- il primo taglio lo faccio completo se angolo interno maggiore di 90
|
||||
local dMinOffsBigFace = max( vWidth[vOrd[j]] - dMaxDepth, 0)
|
||||
-- se la faccia è più grande del massimo materiale lama, allora limito lavorazione
|
||||
if dMinOffsBigFace > 0 then
|
||||
dOffset = dMinOffsBigFace
|
||||
-- se angolo interno inferiore di 90° calcolo l'arretramento della lama + un piccolo delta di 0.3
|
||||
if dAng < - ( 90 + 10 * GEO.EPS_SMALL) then
|
||||
elseif dAng < - ( 90 + 10 * GEO.EPS_SMALL) then
|
||||
dOffset = 0.3 + ((dToolThick* vtN[vOrd[1]]) * vtN[vOrd[2]] * vtN[vOrd[2]]):len()
|
||||
else
|
||||
dOffset = 0
|
||||
end
|
||||
dLioPerp = vWidth[vOrd[j]] + BD.CUT_SIC
|
||||
else -- il secondo ridotto della distanza minima e della componente spessore della lama
|
||||
dOffset = dDimStrip + ((dToolThick* vtN[vOrd[1]]) - (dToolThick* vtN[vOrd[1]]) * vtN[vOrd[2]] * vtN[vOrd[2]]):len()
|
||||
local dMinOffsBigFace = max( vWidth[vOrd[j]] - dMaxDepth, 0)
|
||||
-- se la faccia è più grande del massimo materiale lama, allora limito lavorazione
|
||||
if dMinOffsBigFace > 0 then
|
||||
dOffset = dMinOffsBigFace
|
||||
else
|
||||
dOffset = dDimStrip + ((dToolThick* vtN[vOrd[1]]) - (dToolThick* vtN[vOrd[1]]) * vtN[vOrd[2]] * vtN[vOrd[2]]):len()
|
||||
end
|
||||
dLioPerp = vWidth[vOrd[j]] - dOffset + BD.CUT_SIC
|
||||
end
|
||||
local dLioTang = 0
|
||||
@@ -1048,8 +1078,14 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
dEndAccDist = min( dEndAccDist, dLen/2)
|
||||
dStartAccDist = dLen - dEndAccDist
|
||||
else
|
||||
dStartAccDist = dLen/2
|
||||
dEndAccDist = dStartAccDist
|
||||
-- se c'è del grezzo aggiuntivo e, considerando il grezzo mi resta abbastanza materiale per pinzare, allora faccio spezzatura asimmetrica
|
||||
if BD.MIN_CLAMPING_LEN and ( dBarLen - dLen) > dOvmHead + 100 * GEO.EPS_SMALL and ( dBarLen - dStartAccDist > BD.MIN_CLAMPING_LEN) then
|
||||
dStartAccDist = dBarLen/2
|
||||
dEndAccDist = dLen - dStartAccDist
|
||||
else
|
||||
dStartAccDist = dLen/2
|
||||
dEndAccDist = dStartAccDist
|
||||
end
|
||||
end
|
||||
else
|
||||
nC = 1
|
||||
|
||||
@@ -246,7 +246,7 @@ end
|
||||
function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrStd, bPreMove, vtMove, dOvmTail)
|
||||
-- impostazione default a variabili aggiunte
|
||||
if not BD.OVM_CHAIN_HBEAM then BD.OVM_CHAIN_HBEAM = 8 end
|
||||
if not BD.C_SIMM_ENC then BD.C_SIMM_ENC = 180 end
|
||||
if not BD.C_SIMM_ENC then BD.C_SIMM_ENC = EgtIf( BD.C_SIMM, 180, 90) end
|
||||
-- ingombro del grezzo
|
||||
local b3Raw = EgtGetRawPartBBox( nRawId)
|
||||
-- inserimento smussi
|
||||
@@ -326,7 +326,7 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
|
||||
-- recupero lunghezza massima di lavoro della sega a catena
|
||||
local sSawing = ML.FindSawing( 'Sawing')
|
||||
local dMaxMat = 0
|
||||
local dTlen = 0
|
||||
local dTLen = 0
|
||||
if EgtMdbSetCurrMachining( sSawing or '') then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
==== Beam Update Log ====
|
||||
|
||||
Versione 2.5k1 (02/11/2023)
|
||||
- Modif : in LapJoint gestito caso groove due facce >90° con fresa, se forzato da parametro Q
|
||||
- Modif : in LongCut e LongDoubleCut migliorata spezzatura taglio passante con due spezzoni
|
||||
- Modif : nei tagli di lama migliorata gestione con percorso bilinea
|
||||
- Modif : in LapJoint 2 facce longitudinali si usa taglio di lama solo se si taglia completamente, altrimenti fresa
|
||||
|
||||
Versione 2.5j1 (23/10/2023)
|
||||
- Added : in Process (lancio da EgtCAM5 quindi uso praticamente solo interno) aggiunta possibilità di tenere ordine pezzi in barra come da selezione
|
||||
- Fixed : piccola correzione a Classify di FeatureTopology per casi senza geometria
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
-- Version.lua by Egaltech s.r.l. 2023/10/18
|
||||
-- Version.lua by Egaltech s.r.l. 2023/11/02
|
||||
-- Gestione della versione di Beam
|
||||
|
||||
NAME = 'Beam'
|
||||
VERSION = '2.5j1'
|
||||
VERSION = '2.5k1'
|
||||
MIN_EXE = '2.5c1'
|
||||
|
||||
Reference in New Issue
Block a user