Compare commits
47 Commits
Ticket#1507
...
2.5k5
| Author | SHA1 | Date | |
|---|---|---|---|
| b3bb386ec7 | |||
| c69f80a903 | |||
| 42c043fcd7 | |||
| 344467a500 | |||
| e82a8c9c1f | |||
| 85585c0b80 | |||
| 24e853ff92 | |||
| 0bcdf65656 | |||
| 1e442c7a01 | |||
| 24e38cdad5 | |||
| a239a096cd | |||
| 737abe7d30 | |||
| b7b701f9d2 | |||
| 5974edf8b1 | |||
| 7fcf169b6b | |||
| f30558db04 | |||
| cb17b9737e | |||
| 5315b63163 | |||
| a87c9f5789 | |||
| 1dc4efa397 | |||
| 50917a61b2 | |||
| a843ef2e25 | |||
| fc3f6f22ac | |||
| 84bc8d7bd7 | |||
| 7c7fa26b8d | |||
| 54fcc27c49 | |||
| a5a8a0e98b | |||
| 27df151d3d | |||
| 34b4867a0d | |||
| 2bf15f2958 | |||
| bfa26e7610 | |||
| 398ea82d2b | |||
| 6f8c94705b | |||
| a77d0b2652 | |||
| 6c14b873f9 | |||
| 15d85e174b | |||
| a2ba993709 | |||
| e90a4db38c | |||
| 5820ccb455 | |||
| 57fa9bb8b3 | |||
| 3fe16f87b7 | |||
| fdb897ec68 | |||
| 4e4a1eca4d | |||
| d39148a9e8 | |||
| a7e0c5a33d | |||
| 5865192e23 | |||
| 869683c99a |
+2
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
REM Compilazione degli script Beam Egaltech 2023.09.26
|
||||
REM Compilazione degli script Beam Egaltech 2023.11.08
|
||||
REM Per togliere info di debug aggiungere flag -s prima del nome del file di input
|
||||
|
||||
REM Compilazione 32 e 64 bit
|
||||
@@ -44,6 +44,7 @@ REM Compilazione 32 e 64 bit
|
||||
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessTenon.lua LuaLibs\ProcessTenon.lua
|
||||
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessText.lua LuaLibs\ProcessText.lua
|
||||
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessTyroleanDovetail.lua LuaLibs\ProcessTyroleanDovetail.lua
|
||||
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessVariant.lua LuaLibs\ProcessVariant.lua
|
||||
\EgtProg\Dll32\luac54 -o bin\BatchProcess.lua BatchProcess.lua
|
||||
\EgtProg\Dll32\luac54 -o bin\BatchProcessNew.lua BatchProcessNew.lua
|
||||
\EgtProg\Dll32\luac54 -o bin\GetBeamData.lua GetBeamData.lua
|
||||
|
||||
+11
-1
@@ -1,4 +1,4 @@
|
||||
-- BeamExec.lua by Egaltech s.r.l. 2023/03/31
|
||||
-- BeamExec.lua by Egaltech s.r.l. 2023/11/08
|
||||
-- Libreria esecuzione lavorazioni per Travi
|
||||
-- 2019/07/11 Aggiunta gestione stato rotazione di feature per TS3.
|
||||
-- 2019/09/04 Corretto controllo feature di testa e coda con sovramateriale di testa elevato.
|
||||
@@ -50,6 +50,7 @@
|
||||
-- 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
|
||||
-- 2023/11/08 Aggiunta gestione processi Variant.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local BeamExec = {}
|
||||
@@ -104,6 +105,7 @@ _G.package.loaded.ProcessTyroleanDovetail = nil
|
||||
_G.package.loaded.ProcessDovetail = nil
|
||||
_G.package.loaded.ProcessFreeContour = nil
|
||||
_G.package.loaded.ProcessDecor = nil
|
||||
_G.package.loaded.ProcessVariant = nil
|
||||
local ML = require( 'MachiningLib')
|
||||
local BL = require( 'BeamLib')
|
||||
local Topology = require( 'FeatureTopology')
|
||||
@@ -142,6 +144,7 @@ local TyroleanDovetail = require( 'ProcessTyroleanDovetail')
|
||||
local Dovetail = require( 'ProcessDovetail')
|
||||
local FreeContour = require( 'ProcessFreeContour')
|
||||
local Decor = require( 'ProcessDecor')
|
||||
local Variant = require( 'ProcessVariant')
|
||||
|
||||
EgtOutLog( ' BeamExec started', 1)
|
||||
EgtMdbSetGeneralParam( MCH_GP.MAXDEPTHSAFE, BD.COLL_SIC)
|
||||
@@ -1103,6 +1106,9 @@ local function ClassifyFeatures( vProc, b3Raw, Stats)
|
||||
-- se decorazione
|
||||
elseif Decor.Identify( Proc) then
|
||||
bOk, bDown = Decor.Classify( Proc)
|
||||
-- se Variant
|
||||
elseif Variant.Identify( Proc) then
|
||||
bOk, bDown = Variant.Classify( Proc, b3Raw)
|
||||
end
|
||||
-- assegno risultato
|
||||
if bOk then
|
||||
@@ -1313,6 +1319,10 @@ local function AddFeatureMachining( Proc, nPhase, nRawId, nPartId, dCurrOvmH, bN
|
||||
elseif Decor.Identify( Proc) then
|
||||
-- esecuzione decorazione
|
||||
bOk, sErr = Decor.Make( Proc, nPhase, nRawId, nPartId)
|
||||
-- se Variant
|
||||
elseif Variant.Identify( Proc) then
|
||||
-- esecuzione variante custom
|
||||
bOk, sErr = Variant.Make( Proc, nPhase, nRawId, nPartId)
|
||||
-- altrimenti feature sconosciuta
|
||||
else
|
||||
sErr = 'Error on process ' .. tostring( Proc.Id) .. ' unknown type (' .. tonumber( Proc.Grp) .. '-' .. tonumber( Proc.Prc) .. ')'
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
-- 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.
|
||||
-- 2023/11/14 In MakeOne migliorato calcolo scelta soluzione per macchina TURN
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local FacesBySaw = {}
|
||||
@@ -371,7 +372,10 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw
|
||||
--local vtTest = EgtIf( bInvert, vtTg, -vtTg)
|
||||
local vtTest = -vtTg
|
||||
if abs( vtTest:getY()) > abs( vtTest:getZ()) then
|
||||
nSCC = EgtIf( vtTest:getY() > 0, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
|
||||
-- calcolo direzione risultante da versore utensile e direzione di lavorazione inverso
|
||||
-- se la risultante tende verso Y positiva, scelgo soluzione dietro
|
||||
local vtRes = vtTest + vtAux ; vtRes:normalize()
|
||||
nSCC = EgtIf( vtRes:getY() > 0, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
|
||||
else
|
||||
nSCC = EgtIf( vtTest:getZ() > 0, MCH_SCC.ADIR_ZP, MCH_SCC.ADIR_ZM)
|
||||
end
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- MachiningLib.lua by Egaltech s.r.l. 2022/05/07
|
||||
-- MachiningLib.lua by Egaltech s.r.l. 2023/11/06
|
||||
-- Libreria ricerca lavorazioni per Travi
|
||||
-- 2022/05/07 ES Profonde modifiche per scelta ottimale lavorazioni in macchine con più teste.
|
||||
-- 2022/07/27 Aggiunta la gestione del tipo di foratura "AngleDrill" per fori molto inclinati
|
||||
@@ -7,6 +7,7 @@
|
||||
-- 2022/12/28 Per FindMilling e FindDrilling possibilità di escludere la testa H2 dalla ricerca utensile.
|
||||
-- 2023/01/31 Per FindPocketing implementata la possibilità di escludere le teste H2 o H3 dalla ricerca utensile.
|
||||
-- 2023/07/28 Aggiunta gestione del tipo di foratura "Drill_AT".
|
||||
-- 2023/11/06 Migliorie e correzioni alle forature con AngularTransmission ("_AT").
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local MachiningLib = {}
|
||||
@@ -177,7 +178,7 @@ end
|
||||
---------------------------------------------------------------------
|
||||
function VerifyTool( MachiningType, sType, Params, bH2)
|
||||
if MachiningType == MCH_MY.DRILLING then
|
||||
if EgtStartsWith( sType, 'Drill') or EgtStartsWith( sType, 'Drill_AT') or EgtStartsWith( sType, 'AngleDrill') then
|
||||
if EgtStartsWith( sType, 'Drill') or EgtStartsWith( sType, 'AngleDrill') then
|
||||
return VerifyDrill( Params.Diam, Params.Depth, bH2)
|
||||
elseif EgtStartsWith( sType, 'Pocket') then
|
||||
return VerifyDrillPocket( Params.Diam, Params.Depth, bH2)
|
||||
@@ -382,8 +383,8 @@ end
|
||||
---------------------------------------------------------------------
|
||||
function MachiningLib.FindDrilling( dDiam, dDepth, bTopHead, bDownHead, bExcludeH2, bAngleTransmission)
|
||||
local MachiningName, MachiningType, Param1, Param2, Param3, Param4, Param5 = FindMachining( MCH_MY.DRILLING, EgtIf( bAngleTransmission, 'Drill_AT', 'Drill'), { Diam = dDiam, Depth = dDepth}, bTopHead, bDownHead, bExcludeH2)
|
||||
if ( not MachiningName or MachiningName == '') and not bAngleTransmission then
|
||||
MachiningName, MachiningType, Param1, Param2, Param3, Param4, Param5 = FindMachining( MCH_MY.DRILLING, 'Pocket', { Diam = dDiam, Depth = dDepth}, bTopHead, bDownHead)
|
||||
if ( not MachiningName or MachiningName == '') then
|
||||
MachiningName, MachiningType, Param1, Param2, Param3, Param4, Param5 = FindMachining( MCH_MY.DRILLING, EgtIf( bAngleTransmission, 'Pocket_AT', 'Pocket'), { Diam = dDiam, Depth = dDepth}, bTopHead, bDownHead)
|
||||
end
|
||||
if MachiningName and MachiningName ~= '' then
|
||||
return MachiningName, MachiningType, Param1, Param2, Param3, Param4, Param5
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -1684,7 +1684,7 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Raw, b3Sol
|
||||
end
|
||||
-- determino il massimo affondamento con l'utensile
|
||||
local sMchFind = 'Long2Cut'
|
||||
sMilling = ML.FindMilling( sMchFind)
|
||||
local sMilling = ML.FindMilling( sMchFind)
|
||||
if not sMilling then
|
||||
local sErr = 'Milling not found in library : Error on Dovetail ' .. tostring( Proc.Id)
|
||||
EgtOutLog( sErr)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- ProcessDrill.lua by Egaltech s.r.l. 2023/09/26
|
||||
-- ProcessDrill.lua by Egaltech s.r.l. 2023/11/06
|
||||
-- Gestione calcolo forature per Travi
|
||||
-- 2021/04/14 DS Corretta gestione Invert con testa da sotto. Migliorato calcolo ingombro portautensile.
|
||||
-- 2021/05/03 DS Su macchina con testa da sotto aggiunta possibilità di fare fori verticali metà sopra e l'altra sotto.
|
||||
@@ -19,6 +19,7 @@
|
||||
-- 2023/05/11 Se lavorazione in doppio e precedente no oppure di tipo diverso, forzo risalita a Zmax.
|
||||
-- 2023/07/28 Aggiunta gestione rinvio 90deg solo per forature da sotto esattamente verticali.
|
||||
-- 2023/09/26 Se errore in applicazione lavorazione si inverte e riprova solo se foratura singola su foro aperto.
|
||||
-- 2023/11/06 Migliorata gestione dei fori con AngularTransmission.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local ProcessDrill = {}
|
||||
@@ -133,8 +134,9 @@ function ProcessDrill.Split( Proc, b3Raw)
|
||||
-- restituisco se va fatto in doppio (solo fori orizzontali)
|
||||
local bHoriz = ( abs( vtExtr:getZ()) < abs( BD.DRILL_VZ_MIN) and
|
||||
( abs( vtExtr:getY()) * b3Raw:getDimZ() > abs( vtExtr:getZ()) * b3Raw:getDimY() or Proc.Fce == 5 or Proc.Fce == 6))
|
||||
local bAngTransm = ( BD.ANG_TRASM and ML.FindDrilling( dDiam, nil, nil, nil, nil, true) and AreSameOrOppositeVectorApprox( vtExtr, Z_AX()))
|
||||
local bSlant = ( abs( vtExtr:getX()) > BD.DRILL_VX_MAX)
|
||||
return ( bOpen and ( bHoriz or BD.ROT90 or BD.DOWN_HEAD or BD.TURN) and not bSlant)
|
||||
return ( bOpen and ( bHoriz or BD.ROT90 or BD.DOWN_HEAD or BD.TURN or bAngTransm) and not bSlant)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
@@ -168,17 +170,18 @@ function ProcessDrill.Classify( Proc, b3Raw)
|
||||
end
|
||||
local bOpen = ( Proc.Fce ~= 0)
|
||||
local bFaceDown = ( ptCen:getZ() < b3Raw:getMin():getZ() + 2 and (( not Proc.Head and not Proc.Tail) or (( BD.ROT90 or BD.DOWN_HEAD or BD.TURN) and abs( Proc.Flg) == 2)))
|
||||
local bAngTransm = ( BD.ANG_TRASM and ML.FindDrilling( dDiam, nil, nil, nil, nil, true) and AreSameOrOppositeVectorApprox( vtExtr, Z_AX()))
|
||||
-- verifico se il foro è sotto e quindi va spostato o sopra o sul fianco
|
||||
if (( vtExtr:getZ() < BD.DRILL_VZ_MIN or bFaceDown) and ( not bOpen or Proc.Flg ~= 1)) then
|
||||
if not bOpen then
|
||||
-- se da sotto e presente rinvio angolare verifico se c'è opportuna lavorazione
|
||||
if BD.ANG_TRASM and ML.FindDrilling( dDiam, nil, nil, nil, nil, true) and AreOppositeVectorApprox( vtExtr, Z_AX()) then
|
||||
if bAngTransm then
|
||||
return true, false, false
|
||||
else
|
||||
return true, true, false
|
||||
end
|
||||
else
|
||||
return true, not ( BD.ROT90 or BD.DOWN_HEAD or BD.TURN), ( BD.ROT90 or BD.DOWN_HEAD or BD.TURN)
|
||||
return true, not ( BD.ROT90 or BD.DOWN_HEAD or BD.TURN or bAngTransm), ( BD.ROT90 or BD.DOWN_HEAD or BD.TURN)
|
||||
end
|
||||
else
|
||||
return true, false, false
|
||||
@@ -250,9 +253,9 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
-- verifico possibilità di foratura da sotto
|
||||
local bDownDrill = ( BD.TURN or ( BD.DOWN_HEAD and ML.FindDrilling( dDiam, nil, false, true)))
|
||||
-- se presente rinvio angolare
|
||||
local bDrillAngTrasm = ( BD.ANG_TRASM and AreOppositeVectorApprox( vtExtr, Z_AX()) and not bOpen)
|
||||
local bDrillAngTrasm = ( BD.ANG_TRASM and ML.FindDrilling( dDiam, nil, nil, nil, nil, true) and AreOppositeVectorApprox( vtExtr, Z_AX()))
|
||||
-- verifico che il foro non sia fattibile solo da sotto
|
||||
local bToInvert = ( vtExtr:getZ() < BD.DRILL_VZ_MIN and not bDownDrill) and not bDrillAngTrasm
|
||||
local bToInvert = ( vtExtr:getZ() < BD.DRILL_VZ_MIN and not bDownDrill and not bDrillAngTrasm)
|
||||
if bToInvert and ( not bOpen or Proc.Flg ~= 1) then
|
||||
local sErr = 'Error : drilling from bottom impossible'
|
||||
EgtOutLog( sErr)
|
||||
@@ -461,7 +464,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
|
||||
-- aggiungo geometria
|
||||
EgtSetMachiningGeometry( {{ AuxId, -1}})
|
||||
-- eventuale inversione
|
||||
if sType == 'Drill' or sType == 'Drill_H2' or sType == 'AngleDrill' then
|
||||
if sType == 'Drill' or sType == 'Drill_H2' or sType == 'Drill_AT' or sType == 'AngleDrill' then
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, bToInvert)
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, bToInvert)
|
||||
|
||||
+221
-11
@@ -80,6 +80,10 @@
|
||||
-- 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.
|
||||
-- 2023/11/06 Migliorie per lavorazione con AngularTransmission con FAST.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local ProcessLapJoint = {}
|
||||
@@ -152,6 +156,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
|
||||
@@ -165,7 +170,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
|
||||
@@ -754,10 +760,11 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
|
||||
return false
|
||||
end
|
||||
end
|
||||
-- se è presente il rinvio angolare ed è una tasca cieca perfettamente verticale, da sotto, non ruoto
|
||||
if BD.ANG_TRASM and Proc.Fct == 5 then
|
||||
-- se è presente il rinvio angolare con lavorazioni di tasca ed è una tasca perfettamente verticale da sotto, non ruoto
|
||||
if BD.ANG_TRASM and Proc.Fct >= 4 and not bClosedOrthoFaces then
|
||||
local vtNBottomFace = EgtSurfTmFacetNormVersor( Proc.Id, nFacInd, GDB_ID.ROOT)
|
||||
if AreOppositeVectorApprox( vtNBottomFace, Z_AX()) then
|
||||
if AreOppositeVectorApprox( vtNBottomFace, Z_AX()) and
|
||||
( Proc.Fct >= 5 and ML.FindPocketing( 'Pocket_AT') or ( Proc.Fct < 5 and ML.FindPocketing( 'OpenPocket_AT'))) then
|
||||
return true, false
|
||||
end
|
||||
end
|
||||
@@ -4852,8 +4859,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
else
|
||||
local bUseOtherFace
|
||||
local bLapJointAngTrasm = false
|
||||
-- se è presente il rinvio angolare ed è una tasca cieca perfettamente verticale, da sotto
|
||||
if BD.ANG_TRASM and Proc.Fct == 5 and AreOppositeVectorApprox( vtN, Z_AX()) then
|
||||
-- se è presente il rinvio angolare ed è una tasca perfettamente verticale, da sotto
|
||||
if BD.ANG_TRASM and Proc.Fct >= 4 and AreOppositeVectorApprox( vtN, Z_AX()) then
|
||||
bLapJointAngTrasm = true
|
||||
-- se orientata verso il basso e non c'è testa da sotto, verifico l'alternativa
|
||||
elseif vtN:getZ() < BD.NZ_MINA and not BD.DOWN_HEAD and nFacInd2 then
|
||||
@@ -4913,7 +4920,6 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
local bMillDown = ( BD.DOWN_HEAD and vtN:getZ() < 0.342)
|
||||
-- settaggio voluto da Alessandro/Fabio (per fare angoli con fresa piccola)
|
||||
sMchFind = 'Pocket'
|
||||
if bLapJointAngTrasm then sMchFind = 'Pocket_AT' end
|
||||
local dDiam = min( dH, dV)
|
||||
local bTailOnSide = ( Proc.Box:getMin():getX() - b3Solid:getMin():getX() < 0.1 and not Proc.Tail and not bAllWithEndCap)
|
||||
if ( Proc.Fct == 1) or (( Proc.Fct == 2 or Proc.Fct == 3) and bIsL) or ((( Proc.Fct == 3 and bIsU) or ( Proc.Fct == 4 and not bTailOnSide)) and bSinglePart) then
|
||||
@@ -4963,6 +4969,15 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
nUseRoughTool = 1
|
||||
end
|
||||
end
|
||||
-- se abilitato rinvio da sotto
|
||||
if bLapJointAngTrasm then
|
||||
if not EgtEndsWith( sMchFind, '_AT') then
|
||||
sMchFind = sMchFind .. '_AT'
|
||||
end
|
||||
if not EgtEndsWith( sMchFindBackUp, '_AT') then
|
||||
sMchFindBackUp = sMchFindBackUp .. '_AT'
|
||||
end
|
||||
end
|
||||
-- se da sotto, imposto massima lunghezza secondo la direzione
|
||||
local dMaxTotLen
|
||||
if bMillDown and BD.GetBottomToolMaxTotLen then
|
||||
@@ -5402,10 +5417,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 oppure groove a 2 facce non su testa/coda
|
||||
-- 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) or ( Proc.Fct == 2 and not Proc.Head and not Proc.Tail)) 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
|
||||
@@ -5639,7 +5654,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)
|
||||
@@ -5666,6 +5680,199 @@ 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 95 deg
|
||||
if ( dAng > -85 + 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)
|
||||
-- lavorazioni della faccia
|
||||
for i = 2, 1, -1 do
|
||||
local dCutRadialOffsetRiser = - dVRiser / 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 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
|
||||
---------------------------------------------------------------------
|
||||
@@ -5829,6 +6036,10 @@ 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)
|
||||
@@ -5857,7 +6068,6 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
-- se piccole
|
||||
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)
|
||||
-- altrimenti svuotatura
|
||||
else
|
||||
return MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, true)
|
||||
end
|
||||
|
||||
@@ -655,6 +655,8 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus
|
||||
-- leggo il parametro Q05 solo se è una vera longcut L010
|
||||
elseif ProcessLongCut.Identify( Proc) then
|
||||
nUseBlade = EgtGetInfo( Proc.Id, 'Q05', 'i') or 0
|
||||
-- funzionamento Q05 --
|
||||
-- 0: fresa; 1: lama solo se feature passante, faccia verso l'alto; 2: lama solo se feature passante, qualunque orientamento faccia; 3: lama con feature sia cieca che passante, faccia verso l'alto, lavorazione non rovina pezzo successivo; 4: lama con feature sia cieca che passante, qualunque orientamento faccia, lavorazione non rovina pezzo successivo
|
||||
end
|
||||
local bForceUseBladeOnNotThruFace
|
||||
if nCustForceUseBladeOnNCF then
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
-- 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.
|
||||
-- 2023/11/24 Aggiunta Q05 per utilizzo lama anche in feature cieche conme per LongCut.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local ProcessLong2Cut = {}
|
||||
@@ -367,11 +368,28 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
----------------------------------------------------------------------------------------------------------------------------------------
|
||||
local bUseBlade
|
||||
local nUseMillOnSide
|
||||
local bForceUseBladeOnNotThruFace
|
||||
-- se presenti utilizzo i parametri dell'eventuale lua "padre"
|
||||
if bForcedBladeMaster ~= nil then
|
||||
bUseBlade = bForcedBladeMaster
|
||||
else
|
||||
bUseBlade = EgtGetInfo( Proc.Id, 'Q01', 'i') == 1
|
||||
local nUseBlade = EgtGetInfo( Proc.Id, 'Q05', 'i')
|
||||
-- funzionamento Q05 --
|
||||
-- 0: fresa; 1: lama solo se feature passante, faccia verso l'alto; 2: lama solo se feature passante, qualunque orientamento faccia; 3: lama con feature sia cieca che passante, faccia verso l'alto, lavorazione non rovina pezzo successivo; 4: lama con feature sia cieca che passante, qualunque orientamento faccia, lavorazione non rovina pezzo successivo
|
||||
-- feature passante
|
||||
if nFaceLimit == 0 then
|
||||
if nUseBlade == 2 or nUseBlade == 4 or
|
||||
( nSide == 1 and ( nUseBlade == 1 or nUseBlade == 3)) then
|
||||
bUseBlade = true
|
||||
end
|
||||
-- feature cieca
|
||||
else
|
||||
if nUseBlade == 4 or
|
||||
( nSide == 1 and ( nUseBlade == 3)) then
|
||||
bUseBlade = true
|
||||
bForceUseBladeOnNotThruFace = true
|
||||
end
|
||||
end
|
||||
end
|
||||
if nUseSideToolMaster ~= nil then
|
||||
nUseMillOnSide = nUseSideToolMaster
|
||||
@@ -418,8 +436,8 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
_, _, vWidth[1] = BL.GetFaceHvRefDim( Proc.Id, tFaceLong[1])
|
||||
_, _, vWidth[2] = BL.GetFaceHvRefDim( Proc.Id, tFaceLong[2])
|
||||
|
||||
-- Se senza facce limitanti, da sopra o ( da tutte i lati con testa da sotto) e taglio di lama e lunghezza facce maggiore del parametro lunghezza minima
|
||||
if nFaceLimit == 0 and ( bCanUseUnderBlade or bCanUseBlade) and bUseBlade and Proc.Box:getDimX() > dLimMinPiece - 1 then
|
||||
-- Se da sopra o ( da tutte i lati con testa da sotto) e taglio di lama e lunghezza facce maggiore del parametro lunghezza minima
|
||||
if ( bCanUseUnderBlade or bCanUseBlade) and bUseBlade and Proc.Box:getDimX() > dLimMinPiece - 1 then
|
||||
|
||||
local sCutting
|
||||
local dToolDiam = 0
|
||||
@@ -465,23 +483,36 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
end
|
||||
end
|
||||
end
|
||||
-- se la distanza dal pezzo successivo è inferiore della metà lama, do un warning
|
||||
if ( bCanUseBlade or bCanUseUnderBlade) and ( dDistToNextPiece < dToolDiam/2 or dDistToNextPiece < dToolDiamDn/2) then
|
||||
sWarn = 'Warning : Cut machining can damage next piece'
|
||||
EgtOutLog( sWarn)
|
||||
-- se la fine (a sinistra) non è limitata e ho un pezzo successivo o grezzo riutilizzabile meno distante di metà raggio, setto la fine come limitata
|
||||
if (( bCanUseBlade or bCanUseUnderBlade) and ( dDistToNextPiece < dToolDiam/2 or dDistToNextPiece < dToolDiamDn/2)) and nFaceLimit < 2 then
|
||||
if bForceUseBladeOnNotThruFace then
|
||||
nFaceLimit = nFaceLimit | 2
|
||||
bForcedLim = true
|
||||
else
|
||||
sWarn = 'Warning on saw cut : Cut machining can damage next piece'
|
||||
EgtOutLog( sWarn)
|
||||
end
|
||||
end
|
||||
-- determino gli estremi
|
||||
local dStartAccDist
|
||||
local dEndAccDist
|
||||
local bStartFixed
|
||||
local bEndFixed
|
||||
local dStartDist
|
||||
local dEndDist
|
||||
local dStartDistUp = 0
|
||||
local dEndDistUp = 0
|
||||
local dStartDistDn = 0
|
||||
local dEndDistDn = 0
|
||||
local dStartAccDistUp = BD.LONGCUT_ENDLEN
|
||||
local dEndAccDistUp = BD.LONGCUT_ENDLEN
|
||||
local dStartAccDistDn = BD.LONGCUT_ENDLEN
|
||||
local dEndAccDistDn = BD.LONGCUT_ENDLEN
|
||||
local nC
|
||||
local dC
|
||||
|
||||
local dC
|
||||
local nCUp
|
||||
local dCUp
|
||||
|
||||
-- determino numero di parti
|
||||
if bCanUseBlade then
|
||||
nCUp = ceil( ( dLen - dStartAccDistUp - dEndAccDistUp) / BD.LONGCUT_MAXLEN)
|
||||
@@ -569,7 +600,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
local nFaceUse
|
||||
local nFaceUse
|
||||
local nFaceUse2
|
||||
-- se ho solo lama da sotto
|
||||
if bCanUseUnderBlade and not bCanUseBlade then
|
||||
@@ -597,8 +628,47 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
elseif vtN[vOrd[j]]:getZ() < -0.707 then
|
||||
nFaceSide = -1
|
||||
end
|
||||
-- ricavo box della faccia
|
||||
-- ricavo informazioni della faccia
|
||||
local b3Fac = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vOrd[j]-1, GDB_BB.STANDARD)
|
||||
-- determino accorciamenti se lavorazione cieca
|
||||
if bForceUseBladeOnNotThruFace then
|
||||
if bCanUseBlade then
|
||||
bStartFixed = true
|
||||
-- limitato a destra
|
||||
if ( nFaceLimit & 1) ~= 0 then
|
||||
local dRadius = dToolDiam / 2
|
||||
local dCat1 = dRadius - dOffset
|
||||
dStartDistUp = sqrt( ( dRadius * dRadius) - (dCat1 * dCat1))
|
||||
bStartFixed = false
|
||||
end
|
||||
bEndFixed = true
|
||||
-- limitato a sinistra
|
||||
if ( nFaceLimit & 2) ~= 0 then
|
||||
local dRadius = dToolDiam / 2
|
||||
local dCat1 = dRadius - dOffset
|
||||
dEndDistUp = sqrt( ( dRadius * dRadius) - (dCat1 * dCat1))
|
||||
bEndFixed = false
|
||||
end
|
||||
end
|
||||
if bCanUseUnderBlade then
|
||||
bStartFixed = true
|
||||
-- limitato a destra
|
||||
if ( nFaceLimit & 1) ~= 0 then
|
||||
local dRadius = dToolDiamDn / 2
|
||||
local dCat1 = dRadius - dOffset
|
||||
dStartDistDn = sqrt( ( dRadius * dRadius) - (dCat1 * dCat1))
|
||||
bStartFixed = false
|
||||
end
|
||||
bEndFixed = true
|
||||
-- limitato a sinistra
|
||||
if ( nFaceLimit & 2) ~= 0 then
|
||||
local dRadius = dToolDiamDn / 2
|
||||
local dCat1 = dRadius - dOffset
|
||||
dEndDistDn = sqrt( ( dRadius * dRadius) - (dCat1 * dCat1))
|
||||
bEndFixed = false
|
||||
end
|
||||
end
|
||||
end
|
||||
-- ciclo sulle passate
|
||||
for k = 1, 2 do
|
||||
local dLioPerp = ( vWidth[vOrd[j]] - dDimStrip) / 2 + BD.CUT_SIC
|
||||
@@ -615,6 +685,8 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
-- setto le variabili delle distanze dagli estremi
|
||||
dEndAccDist = dEndAccDistUp
|
||||
dStartAccDist = dStartAccDistUp
|
||||
dStartDist = dStartDistUp
|
||||
dEndDist = dEndDistUp
|
||||
elseif bCanUseUnderBlade and not bCanUseBlade then
|
||||
sNameF = 'L2CD_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring(j) .. '_' .. tostring( nM)
|
||||
nMchFId = EgtAddMachining( sNameF, sCuttingDn)
|
||||
@@ -622,6 +694,8 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
-- setto le variabili delle distanze dagli estremi
|
||||
dEndAccDist = dEndAccDistDn
|
||||
dStartAccDist = dStartAccDistDn
|
||||
dStartDist = dStartDistDn
|
||||
dEndDist = dEndDistDn
|
||||
bMachDown = true
|
||||
-- entrambe le possibilità di lama
|
||||
else
|
||||
@@ -634,6 +708,8 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
-- setto le variabili delle distanze dagli estremi
|
||||
dEndAccDist = dEndAccDistDn
|
||||
dStartAccDist = dStartAccDistDn
|
||||
dStartDist = dStartDistDn
|
||||
dEndDist = dEndDistDn
|
||||
bMachDown = true
|
||||
-- se di fronte e prima faccia o dietro e seconda faccia, sta lavorando quella più in basso in Z (posizione)
|
||||
elseif ( ( bFront and j == 1) or ( not bFront and j == 2)) and k == 2 then
|
||||
@@ -643,6 +719,8 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
-- setto le variabili delle distanze dagli estremi
|
||||
dEndAccDist = dEndAccDistDn
|
||||
dStartAccDist = dStartAccDistDn
|
||||
dStartDist = dStartDistDn
|
||||
dEndDist = dEndDistDn
|
||||
bMachDown = true
|
||||
-- se di fronte e seconda faccia o dietro e prima faccia, sta lavorando la faccia più in alto in Z (posizione)
|
||||
elseif ( ( bFront and j == 2) or ( not bFront and j == 1)) and k == 1 then
|
||||
@@ -652,6 +730,8 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
-- setto le variabili delle distanze dagli estremi
|
||||
dEndAccDist = dEndAccDistUp
|
||||
dStartAccDist = dStartAccDistUp
|
||||
dStartDist = dStartDistUp
|
||||
dEndDist = dEndDistUp
|
||||
-- se di fronte e seconda faccia o dietro e prima faccia, sta lavorando la faccia più in alto in Z (posizione)
|
||||
elseif ( ( bFront and j == 2) or ( not bFront and j == 1)) and k == 2 then
|
||||
sNameF = 'L2C_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring(j) .. '_' .. tostring( nM)
|
||||
@@ -660,6 +740,8 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
-- setto le variabili delle distanze dagli estremi
|
||||
dEndAccDist = dEndAccDistUp
|
||||
dStartAccDist = dStartAccDistUp
|
||||
dStartDist = dStartDistUp
|
||||
dEndDist = dEndDistUp
|
||||
end
|
||||
end
|
||||
if not nMchFId then
|
||||
@@ -707,8 +789,8 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
|
||||
-- settaggio di workside, uso faccia e eventuale inversione
|
||||
-- limito opportunamente la lavorazione
|
||||
local dSalInner, dSalOuter = - dEndAccDist - ( i - 2) * dC, 0
|
||||
local dEalInner, dEalOuter = - dStartAccDist - ( nC - i - 1) * dC, 0
|
||||
local dSalInner, dSalOuter = - dEndAccDist - ( i - 2) * dC, -dEndDist
|
||||
local dEalInner, dEalOuter = - dStartAccDist - ( nC - i - 1) * dC, -dStartDist
|
||||
local dSal = EgtIf( i == 1, dSalOuter, dSalInner)
|
||||
local dEal = EgtIf( i == nC, dEalOuter, dEalInner)
|
||||
if ( bFront and k == 1) or ( not bFront and k == 2) then
|
||||
@@ -816,6 +898,43 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
end
|
||||
end
|
||||
end
|
||||
-- eventuali puliture impronta lama
|
||||
for j = 1, #vOrd do
|
||||
if bForceUseBladeOnNotThruFace then
|
||||
-- determino la massima elevazione
|
||||
local dElev = 0
|
||||
local dFacElev1 = EgtSurfTmFacetElevationInBBox( Proc.Id, tFaceLong[1], b3Solid, GDB_ID.ROOT)
|
||||
local dFacElev2 = EgtSurfTmFacetElevationInBBox( Proc.Id, tFaceLong[2], b3Solid, GDB_ID.ROOT)
|
||||
dElev = max( dFacElev1, dFacElev2)
|
||||
-- recupero la lavorazione
|
||||
local sMilling
|
||||
local bDownHead = ( nSide == -1 and BD.DOWN_HEAD)
|
||||
sMilling = ML.FindMilling( 'Long2Cut', dElev, nil, nil, nil, not bDownHead, bDownHead)
|
||||
if not sMilling then
|
||||
local sErr = 'Error : Long2Cut not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- recupero i dati dell'utensile
|
||||
local dToolDiam = 0
|
||||
local dMaxDepth = 0
|
||||
if EgtMdbSetCurrMachining( sMilling) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dToolDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dToolDiam
|
||||
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
|
||||
end
|
||||
end
|
||||
-- eventuale lavorazione della faccia limitante l'inizio (a destra)
|
||||
if not bStartFixed then
|
||||
MakeSideFace( Proc.Id, tFaceLong[vOrd[j]], 1, j, sMilling, dToolDiam, nSide, bIsAnyFaceUpsideDown)
|
||||
end
|
||||
-- eventuale lavorazione della faccia limitante la fine (a sinistra)
|
||||
if not bEndFixed then
|
||||
MakeSideFace( Proc.Id, tFaceLong[vOrd[j]], -1, j, sMilling, dToolDiam, nSide, bIsAnyFaceUpsideDown)
|
||||
end
|
||||
end
|
||||
end
|
||||
-- altrimenti concavo
|
||||
else
|
||||
-- se effettivamente un taglio longitudinale e lama non taglia completamente, limito la lavorazione. Altrimenti esco.
|
||||
@@ -960,9 +1079,8 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
|
||||
elseif ( nSide ~= -1 or BD.DOWN_HEAD or BD.TURN) and nUseMillOnSide == 0 then
|
||||
-- determino la massima elevazione
|
||||
local dElev = 0
|
||||
local dFacElev1 = BL.GetFaceElevation( Proc.Id, tFaceLong[1], nPartId)
|
||||
local dFacElev2 = BL.GetFaceElevation( Proc.Id, tFaceLong[2], nPartId)
|
||||
-- 03/12/2020
|
||||
local dFacElev1 = EgtSurfTmFacetElevationInBBox( Proc.Id, tFaceLong[1], b3Solid, GDB_ID.ROOT)
|
||||
local dFacElev2 = EgtSurfTmFacetElevationInBBox( Proc.Id, tFaceLong[2], b3Solid, GDB_ID.ROOT)
|
||||
-- se facce concave e a 90 gradi, prendo l'elevazione minima
|
||||
if bOrtho then
|
||||
dElev = min( dFacElev1, dFacElev2)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
-- ProcessVariant.lua by Egaltech s.r.l. 2023/11/08
|
||||
-- Gestione calcolo Feature Custom (Variant) per Travi
|
||||
-- 2023/11/08 Creazione modulo.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local ProcessVariant = {}
|
||||
|
||||
-- Include
|
||||
require( 'EgtBase')
|
||||
local BL = require( 'BeamLib')
|
||||
|
||||
EgtOutLog( ' ProcessVariant started', 1)
|
||||
|
||||
-- Dati
|
||||
local BD = require( 'BeamData')
|
||||
local ML = require( 'MachiningLib')
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- Riconoscimento della feature
|
||||
function ProcessVariant.Identify( Proc)
|
||||
return (( Proc.Grp == 0 or Proc.Grp == 1 or Proc.Grp == 2 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 900)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- Classificazione della feature: decide se la feature è in una posizione lavorabile
|
||||
local function ClassifyPocket( Proc, b3Raw)
|
||||
-- recupero gli indici delle facce da lavorare
|
||||
local vFace = EgtGetInfo( Proc.Id, 'Faces', 'vi')
|
||||
if not vFace or #vFace == 0 then
|
||||
local sErr = 'Error : missing Faces for Pocketing'
|
||||
EgtOutLog( sErr)
|
||||
return false
|
||||
end
|
||||
-- recupero le normali di tutte le facce e verifico siano uguali
|
||||
local vtN
|
||||
for i = 1, #vFace do
|
||||
local vtNf = EgtSurfTmFacetNormVersor( Proc.Id, vFace[i], GDB_ID.ROOT)
|
||||
if not vtN then
|
||||
vtN = vtNf
|
||||
else
|
||||
if not AreSameVectorApprox( vtN, vtNf) then
|
||||
local sErr = 'Error : Faces for Pocketing with different orientation'
|
||||
EgtOutLog( sErr)
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
local bDown = ( vtN:getZ() < - 0.5)
|
||||
-- se da sotto e presente rinvio angolare verifico se c'è opportuna lavorazione
|
||||
if bDown and BD.ANG_TRASM then
|
||||
local dMaxDiam = EgtGetInfo( Proc.Id, 'MaxDiam', 'd')
|
||||
if ML.FindPocketing( 'Pocket_AT', dMaxDiam) then
|
||||
bDown = false
|
||||
end
|
||||
end
|
||||
return true, bDown, false
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function ProcessVariant.Classify( Proc, b3Raw)
|
||||
-- recupero il codice identificativo e il tipo di lavorazione
|
||||
local sCode = EgtGetInfo( Proc.Id, 'DES')
|
||||
local sType = EgtGetInfo( Proc.Id, 'Type')
|
||||
-- gestione in base al tipo
|
||||
if sType == 'Pocket' then
|
||||
return ClassifyPocket( Proc, b3Raw)
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- Applicazione della lavorazione
|
||||
local function MakePocket( Proc, nRawId, b3Raw, nPartId)
|
||||
-- recupero gli indici delle facce da lavorare
|
||||
local vFace = EgtGetInfo( Proc.Id, 'Faces', 'vi')
|
||||
if not vFace or #vFace == 0 then
|
||||
local sErr = 'Error : missing Faces for Pocketing'
|
||||
EgtOutLog( sErr)
|
||||
return false
|
||||
end
|
||||
-- recupero i dati delle facce (le normali sono identiche)
|
||||
local dTotDepth = 0
|
||||
local vDepth = {}
|
||||
for i = 1, #vFace do
|
||||
vDepth[i] = BL.GetFaceElevation( Proc.Id, vFace[1], nPartId)
|
||||
dTotDepth = max( dTotDepth, vDepth[i])
|
||||
end
|
||||
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, vFace[1], GDB_ID.ROOT)
|
||||
-- recupero eventuale massimo diametro impostato
|
||||
local dMaxDiam = EgtGetInfo( Proc.Id, 'MaxDiam', 'd')
|
||||
-- abilitazione lavorazione da sotto
|
||||
local bMillUp = ( BD.DOWN_HEAD and vtN:getZ() > -0.259)
|
||||
local bMillDown = ( BD.DOWN_HEAD and vtN:getZ() < 0.174)
|
||||
local bMillAngTrasm = ( BD.ANG_TRASM and vtN:getZ() < -0.5)
|
||||
-- recupero la lavorazione
|
||||
local sPockType = EgtIf( not bMillAngTrasm, 'Pocket', 'Pocket_AT')
|
||||
local sPocketing = ML.FindPocketing( sPockType, dMaxDiam, dTotDepth)
|
||||
if not sPocketing then
|
||||
sPocketing = ML.FindPocketing( sPockType, dMaxDiam, dTotDepth / 2)
|
||||
if not sPocketing then
|
||||
local sErr = 'Error : pocketing not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
end
|
||||
-- recupero i dati dell'utensile
|
||||
local dMillDiam = 20
|
||||
local dMaxDepth = 0
|
||||
if EgtMdbSetCurrMachining( sPocketing) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
||||
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
|
||||
end
|
||||
end
|
||||
-- se elevazione superiore a massimo affondamento della fresa, segnalo
|
||||
local sWarn
|
||||
if dTotDepth > dMaxDepth + 10 * GEO.EPS_SMALL then
|
||||
sWarn = 'Warning : elevation bigger than max tool depth'
|
||||
EgtOutLog( sWarn)
|
||||
end
|
||||
-- lavoro ogni faccia
|
||||
for i = 1, #vFace do
|
||||
-- inserisco la lavorazione di svuotatura
|
||||
local sName = 'Pock_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( i)
|
||||
local nMchFId = EgtAddMachining( sName, sPocketing)
|
||||
if not nMchFId then
|
||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sPocketing
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- aggiungo geometria
|
||||
EgtSetMachiningGeometry( {{ Proc.Id, vFace[i]}})
|
||||
-- imposto posizione braccio porta testa
|
||||
if vtN:getY() <= 0 then
|
||||
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YM)
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YP)
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH, min( 0, dMaxDepth - vDepth[i]))
|
||||
-- imposto elevazione
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dMaxDepth, 1) .. ';')
|
||||
-- eseguo
|
||||
if not ML.ApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchFId, false)
|
||||
return false, sErr
|
||||
end
|
||||
end
|
||||
return true, sWarn
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function ProcessVariant.Make( Proc, nRawId, b3Raw, nPartId)
|
||||
-- recupero il codice identificativo e il tipo di lavorazione
|
||||
local sCode = EgtGetInfo( Proc.Id, 'DES')
|
||||
local sType = EgtGetInfo( Proc.Id, 'Type')
|
||||
-- gestione in base al tipo
|
||||
if sType == 'Pocket' then
|
||||
return MakePocket( Proc, nRawId, b3Raw, nPartId)
|
||||
else
|
||||
return false, 'Variant Type non recognized for machining'
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
return ProcessVariant
|
||||
+14
-1
@@ -1,12 +1,25 @@
|
||||
==== Beam Update Log ====
|
||||
|
||||
Versione 2.5k3 (28/11/2023)
|
||||
- Added : in Long2Cut gestite lavorazioni lama con Q05 come in LongCut.
|
||||
|
||||
Versione 2.5k2 (06/11/2023)
|
||||
- Added : in LapJoint, per L020, gestita lavorazione speciale gradino scala con fresatura + lama, attivata con Q09
|
||||
- Fixed : in ProcessSplit si imposta l'ingombro asse C correttamente anche per teste con asse rotante C con un solo braccio.
|
||||
|
||||
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
|
||||
- Fixed : in HeadCut e Split corretto calcolo allungamenti/accorciamenti per evitare lunghezze del percorso negative
|
||||
- Fixed : in Lapjoint -> MakePocket aggiunto messaggio in caso si rovini il pezzo successivo
|
||||
- Modif : in Topology aggiunti casi al check solo direzione principale
|
||||
- Modif : nella ricerca lavorazione da usare controllo di utensile attivo sostituito con controllo utensile presente nel setup corrente
|
||||
- Modif : nella ricerca lavorazione da usare controllo di utensile attivo sostituito con controllo utensile presente nel setup corrente.
|
||||
|
||||
Versione 2.5i2 (27/09/2023)
|
||||
- Added : aggiunto riconoscimento sottosquadro da facce non adiacenti
|
||||
|
||||
+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/16
|
||||
-- Gestione della versione di Beam
|
||||
|
||||
NAME = 'Beam'
|
||||
VERSION = '2.5j1'
|
||||
VERSION = '2.5k5'
|
||||
MIN_EXE = '2.5c1'
|
||||
|
||||
Reference in New Issue
Block a user