diff --git a/LuaLibs/ProcessProfCamb.lua b/LuaLibs/ProcessProfCamb.lua index 554d829..3f74deb 100644 --- a/LuaLibs/ProcessProfCamb.lua +++ b/LuaLibs/ProcessProfCamb.lua @@ -175,7 +175,7 @@ local function VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDephtCham, sOnly EgtOutLog( sErr) return -1, 0, sErr end - if BD.DOWN_HEAD and abs( vtExtr:getZ()) > 0.99 then + if BD.DOWN_HEAD and abs( vtExtr:getZ()) > 0.9 then sMilling2 = ML.FindMilling( 'Mark_H2') if not sMilling2 then local sErr = 'Error : chamfer2 not found in library' diff --git a/LuaLibs/ProcessProfConcave.lua b/LuaLibs/ProcessProfConcave.lua index af3bda3..bba3ff1 100644 --- a/LuaLibs/ProcessProfConcave.lua +++ b/LuaLibs/ProcessProfConcave.lua @@ -1,5 +1,6 @@ --- ProcessProfConcave.lua by Egaltech s.r.l. 2021/03/28 +-- ProcessProfConcave.lua by Egaltech s.r.l. 2021/05/03 -- Gestione calcolo profilo concavo per Travi +-- 2021/05/03 Aggiunta gestione smusso da sopra e sotto per macchina con testa da sotto. -- Tabella per definizione modulo local ProcessProfConcave = {} @@ -134,7 +135,7 @@ local function VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDephtCham, sOnly nChamfer = nChamfer + 1 -- altrimenti se non ho l'affondamento esco else - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' no chamfer depth' + local sErr = 'Error : no chamfer depth' EgtOutLog( sErr) return -1, dDepth, sErr end @@ -146,28 +147,36 @@ local function VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDephtCham, sOnly if abs( vtExtr:getZ()) > 0.1 then if not bMakeVertCham then if nChamfer == 2 then -- se devo fare solo smusso, genero errore - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' not horizontale chamfer' + local sErr = 'Error : not horizontale chamfer' EgtOutLog( sErr) return -1, dDepth, sErr else - local sWarn = 'Warning on process ' .. tostring( Proc.Id) .. ' skipped not horizontale chamfer' + local sWarn = 'Warning : skipped not horizontale chamfer' EgtOutLog( sWarn) return 0, dDepth end end end -- recupero la lavorazione - local sMilling + local sMilling, sMilling2 if nChamfer > 0 then sMilling = ML.FindMilling( 'Mark') if not sMilling then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' chamfer not found in library' + local sErr = 'Error : chamfer not found in library' EgtOutLog( sErr) return -1, 0, sErr end + if BD.DOWN_HEAD and abs( vtExtr:getZ()) > 0.9 then + sMilling2 = ML.FindMilling( 'Mark_H2') + if not sMilling2 then + local sErr = 'Error : chamfer2 not found in library' + EgtOutLog( sErr) + return -1, 0, sErr + end + end end - return nChamfer, dDepth, sMilling + return nChamfer, dDepth, sMilling, sMilling2 end --------------------------------------------------------------------- @@ -179,7 +188,7 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) local Ls = EgtGetFirstNameInGroup( nPartId, 'Box') local b3Solid = EgtGetBBoxGlob( Ls or GDB_ID.NULL, GDB_BB.STANDARD) if not b3Solid then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' part box not found' + local sErr = 'Error : part box not found' EgtOutLog( sErr) return false, sErr end @@ -187,7 +196,7 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') if AuxId then AuxId = AuxId + Proc.Id end if not AuxId or ( EgtGetType( AuxId) & GDB_FY.GEO_CURVE) == 0 then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' missing profile geometry' + local sErr = 'Error : missing profile geometry' EgtOutLog( sErr) return false, sErr end @@ -221,13 +230,14 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) -- recupero gruppo per geometria addizionale local nAddGrpId = BL.GetAddGroup( nPartId) if not nAddGrpId then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' missing AddGroup' + local sErr = 'Error : missing AddGroup' EgtOutLog( sErr) return false, sErr end -- verifico se sono presenti i parametri Q per la profondità smusso e -- per eseguire in esclusiva solo lo smusso - local nChamfer, dDepthCham, sChamfer = VerifyCham( Proc, AuxId, nRawId, false, sDepthChamferMill, sPreemptiveChamfer) + local bMakeVertCham = BD.DOWN_HEAD + local nChamfer, dDepthCham, sChamfer, sChamfer2 = VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDepthChamferMill, sPreemptiveChamfer) -- se non posso lavorare la feature perché condizionata dall'esecuzione del solo chamfer -- genero errore e non faccio nulla if nChamfer < 0 then @@ -282,6 +292,7 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) end -- altrimenti lavorazione dal davanti o dal dietro else + bDoubleCham = BD.DOWN_HEAD -- se fresa verso il basso, la porto verso l'alto if vtExtr:getZ() < 0 then EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) @@ -317,9 +328,10 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) if bDoubleCham then -- inserisco la lavorazione local sName = 'ChamB_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) - local nMchId = EgtAddMachining( sName, sChamfer) + local sMachining2 = EgtIf( BD.DOWN_HEAD and sChamfer2, sChamfer2, sChamfer) + local nMchId = EgtAddMachining( sName, sMachining2) if not nMchId then - local sErr = 'Error adding machining ' .. sName .. '-' .. sChamfer + local sErr = 'Error adding machining ' .. sName .. '-' .. sMachining2 EgtOutLog( sErr) return false, sErr end @@ -359,7 +371,7 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) -- recupero la lavorazione local sMilling = ML.FindMilling( 'Prof') if not sMilling then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' milling not found in library' + local sErr = 'Error : milling not found in library' EgtOutLog( sErr) return false, sErr end diff --git a/LuaLibs/ProcessProfConvex.lua b/LuaLibs/ProcessProfConvex.lua index 463c6a5..6647e1e 100644 --- a/LuaLibs/ProcessProfConvex.lua +++ b/LuaLibs/ProcessProfConvex.lua @@ -1,5 +1,6 @@ --- ProcessProfConvex.lua by Egaltech s.r.l. 2021/03/28 +-- ProcessProfConvex.lua by Egaltech s.r.l. 2021/05/03 -- Gestione calcolo profilo convesso per Travi +-- 2021/05/03 Aggiunta gestione smusso da sopra e sotto per macchina con testa da sotto. -- Tabella per definizione modulo local ProcessProfConvex = {} @@ -134,7 +135,7 @@ local function VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDephtCham, sOnly nChamfer = nChamfer + 1 -- altrimenti se non ho l'affondamento esco else - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' no chamfer depth' + local sErr = 'Error : no chamfer depth' EgtOutLog( sErr) return -1, dDepth, sErr end @@ -146,28 +147,36 @@ local function VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDephtCham, sOnly if abs( vtExtr:getZ()) > 0.1 then if not bMakeVertCham then if nChamfer == 2 then -- se devo fare solo smusso, genero errore - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' not horizontale chamfer' + local sErr = 'Error : not horizontale chamfer' EgtOutLog( sErr) return -1, dDepth, sErr else - local sWarn = 'Warning on process ' .. tostring( Proc.Id) .. ' skipped not horizontale chamfer' + local sWarn = 'Warning : skipped not horizontale chamfer' EgtOutLog( sWarn) return 0, dDepth end end end -- recupero la lavorazione - local sMilling + local sMilling, sMilling2 if nChamfer > 0 then sMilling = ML.FindMilling( 'Mark') if not sMilling then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' chamfer not found in library' + local sErr = 'Error : chamfer not found in library' EgtOutLog( sErr) return -1, 0, sErr end + if BD.DOWN_HEAD and abs( vtExtr:getZ()) > 0.9 then + sMilling2 = ML.FindMilling( 'Mark_H2') + if not sMilling2 then + local sErr = 'Error : chamfer2 not found in library' + EgtOutLog( sErr) + return -1, 0, sErr + end + end end - return nChamfer, dDepth, sMilling + return nChamfer, dDepth, sMilling, sMilling2 end --------------------------------------------------------------------- @@ -179,7 +188,7 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) local Ls = EgtGetFirstNameInGroup( nPartId, 'Box') local b3Solid = EgtGetBBoxGlob( Ls or GDB_ID.NULL, GDB_BB.STANDARD) if not b3Solid then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' part box not found' + local sErr = 'Error : part box not found' EgtOutLog( sErr) return false, sErr end @@ -187,7 +196,7 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') if AuxId then AuxId = AuxId + Proc.Id end if not AuxId or ( EgtGetType( AuxId) & GDB_FY.GEO_CURVE) == 0 then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' missing profile geometry' + local sErr = 'Error : missing profile geometry' EgtOutLog( sErr) return false, sErr end @@ -221,13 +230,14 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) -- recupero gruppo per geometria addizionale local nAddGrpId = BL.GetAddGroup( nPartId) if not nAddGrpId then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' missing AddGroup' + local sErr = 'Error : missing AddGroup' EgtOutLog( sErr) return false, sErr end -- verifico se sono presenti i parametri Q per la profondità smusso e -- per eseguire in esclusiva solo lo smusso - local nChamfer, dDepthCham, sChamfer = VerifyCham( Proc, AuxId, nRawId, false, sDepthChamferMill, sPreemptiveChamfer) + local bMakeVertCham = BD.DOWN_HEAD + local nChamfer, dDepthCham, sChamfer, sChamfer2 = VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDepthChamferMill, sPreemptiveChamfer) -- se non posso lavorare la feature perché condizionata dall'esecuzione del solo chamfer -- genero errore e non faccio nulla if nChamfer < 0 then @@ -282,6 +292,7 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) end -- altrimenti lavorazione dal davanti o dal dietro else + bDoubleCham = BD.DOWN_HEAD -- se fresa verso il basso, la porto verso l'alto if vtExtr:getZ() < 0 then EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) @@ -317,9 +328,10 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) if bDoubleCham then -- inserisco la lavorazione local sName = 'ChamB_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) - local nMchId = EgtAddMachining( sName, sChamfer) + local sMachining2 = EgtIf( BD.DOWN_HEAD and sChamfer2, sChamfer2, sChamfer) + local nMchId = EgtAddMachining( sName, sMachining2) if not nMchId then - local sErr = 'Error adding machining ' .. sName .. '-' .. sChamfer + local sErr = 'Error adding machining ' .. sName .. '-' .. sMachining2 EgtOutLog( sErr) return false, sErr end @@ -359,7 +371,7 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) -- recupero la lavorazione local sMilling = ML.FindMilling( 'Prof') if not sMilling then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' milling not found in library' + local sErr = 'Error : milling not found in library' EgtOutLog( sErr) return false, sErr end diff --git a/LuaLibs/ProcessProfFront.lua b/LuaLibs/ProcessProfFront.lua index 96815f1..6f946fb 100644 --- a/LuaLibs/ProcessProfFront.lua +++ b/LuaLibs/ProcessProfFront.lua @@ -1,5 +1,6 @@ --- ProcessProfFront.lua by Egaltech s.r.l. 2021/03/28 +-- ProcessProfFront.lua by Egaltech s.r.l. 2021/05/03 -- Gestione calcolo profilo frontale per Travi +-- 2021/05/03 Aggiunta gestione smusso da sopra e sotto per macchina con testa da sotto. -- Tabella per definizione modulo local ProcessProfFront = {} @@ -106,7 +107,7 @@ local function VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDephtCham, sOnly nChamfer = nChamfer + 1 -- altrimenti se non ho l'affondamento esco else - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' no chamfer depth' + local sErr = 'Error : no chamfer depth' EgtOutLog( sErr) return -1, dDepth, sErr end @@ -118,28 +119,36 @@ local function VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDephtCham, sOnly if abs( vtExtr:getZ()) > 0.1 then if not bMakeVertCham then if nChamfer == 2 then -- se devo fare solo smusso, genero errore - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' not horizontale chamfer' + local sErr = 'Error : not horizontale chamfer' EgtOutLog( sErr) return -1, dDepth, sErr else - local sWarn = 'Warning on process ' .. tostring( Proc.Id) .. ' skipped not horizontale chamfer' + local sWarn = 'Warning : skipped not horizontale chamfer' EgtOutLog( sWarn) return 0, dDepth end end end -- recupero la lavorazione - local sMilling + local sMilling, sMilling2 if nChamfer > 0 then sMilling = ML.FindMilling( 'Mark') if not sMilling then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' chamfer not found in library' + local sErr = 'Error : chamfer not found in library' EgtOutLog( sErr) return -1, 0, sErr end + if BD.DOWN_HEAD and abs( vtExtr:getZ()) > 0.9 then + sMilling2 = ML.FindMilling( 'Mark_H2') + if not sMilling2 then + local sErr = 'Error : chamfer2 not found in library' + EgtOutLog( sErr) + return -1, 0, sErr + end + end end - return nChamfer, dDepth, sMilling + return nChamfer, dDepth, sMilling, sMilling2 end --------------------------------------------------------------------- @@ -151,7 +160,7 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) local Ls = EgtGetFirstNameInGroup( nPartId, 'Box') local b3Solid = EgtGetBBoxGlob( Ls or GDB_ID.NULL, GDB_BB.STANDARD) if not b3Solid then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' part box not found' + local sErr = 'Error : part box not found' EgtOutLog( sErr) return false, sErr end @@ -159,7 +168,7 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') if AuxId then AuxId = AuxId + Proc.Id end if not AuxId or ( EgtGetType( AuxId) & GDB_FY.GEO_CURVE) == 0 then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' missing profile geometry' + local sErr = 'Error : missing profile geometry' EgtOutLog( sErr) return false, sErr end @@ -192,13 +201,14 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) -- recupero gruppo per geometria addizionale local nAddGrpId = BL.GetAddGroup( nPartId) if not nAddGrpId then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' missing AddGroup' + local sErr = 'Error : missing AddGroup' EgtOutLog( sErr) return false, sErr end -- verifico se sono presenti i parametri Q per la profondità smusso e -- per eseguire in esclusiva solo lo smusso - local nChamfer, dDepthCham, sChamfer = VerifyCham( Proc, AuxId, nRawId, false, sDepthChamferMill, sPreemptiveChamfer) + local bMakeVertCham = BD.DOWN_HEAD + local nChamfer, dDepthCham, sChamfer = VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDepthChamferMill, sPreemptiveChamfer) -- se non posso lavorare la feature perché condizionata dall'esecuzione del solo chamfer -- genero errore e non faccio nulla if nChamfer < 0 then @@ -244,6 +254,7 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) end -- altrimenti lavorazione dal davanti o dal dietro else + bDoubleCham = BD.DOWN_HEAD -- se fresa verso il basso, la porto verso l'alto if vtExtr:getZ() < 0 then EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) @@ -278,9 +289,10 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) if bDoubleCham then -- inserisco la lavorazione local sName = 'ChamB_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) - local nMchId = EgtAddMachining( sName, sChamfer) + local sMachining2 = EgtIf( BD.DOWN_HEAD and sChamfer2, sChamfer2, sChamfer) + local nMchId = EgtAddMachining( sName, sMachining2) if not nMchId then - local sErr = 'Error adding machining ' .. sName .. '-' .. sChamfer + local sErr = 'Error adding machining ' .. sName .. '-' .. sMachining2 EgtOutLog( sErr) return false, sErr end @@ -318,7 +330,7 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) -- recupero la lavorazione local sMilling = ML.FindMilling( 'Prof') if not sMilling then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' milling not found in library' + local sErr = 'Error : milling not found in library' EgtOutLog( sErr) return false, sErr end diff --git a/LuaLibs/ProcessProfHead.lua b/LuaLibs/ProcessProfHead.lua index 273edbd..37f7505 100644 --- a/LuaLibs/ProcessProfHead.lua +++ b/LuaLibs/ProcessProfHead.lua @@ -1,5 +1,6 @@ --- ProcessProfHead.lua by Egaltech s.r.l. 2021/04/23 +-- ProcessProfHead.lua by Egaltech s.r.l. 2021/05/03 -- Gestione calcolo profilo di testa per Travi +-- 2021/05/03 Aggiunta gestione smusso da sopra e sotto per macchina con testa da sotto. -- Tabella per definizione modulo local ProcessProfHead = {} @@ -126,7 +127,7 @@ local function VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDephtCham, sOnly nChamfer = nChamfer + 1 -- altrimenti se non ho l'affondamento esco else - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' no chamfer depth' + local sErr = 'Error : no chamfer depth' EgtOutLog( sErr) return -1, dDepth, sErr end @@ -138,28 +139,36 @@ local function VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDephtCham, sOnly if abs( vtExtr:getZ()) > 0.1 then if not bMakeVertCham then if nChamfer == 2 then -- se devo fare solo smusso, genero errore - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' not horizontale chamfer' + local sErr = 'Error : not horizontale chamfer' EgtOutLog( sErr) return -1, dDepth, sErr else - local sWarn = 'Warning on process ' .. tostring( Proc.Id) .. ' skipped not horizontale chamfer' + local sWarn = 'Warning : skipped not horizontale chamfer' EgtOutLog( sWarn) return 0, dDepth end end end -- recupero la lavorazione - local sMilling + local sMilling, sMilling2 if nChamfer > 0 then sMilling = ML.FindMilling( 'Mark') if not sMilling then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' chamfer not found in library' + local sErr = 'Error : chamfer not found in library' EgtOutLog( sErr) return -1, 0, sErr end + if BD.DOWN_HEAD and abs( vtExtr:getZ()) > 0.9 then + sMilling2 = ML.FindMilling( 'Mark_H2') + if not sMilling2 then + local sErr = 'Error : chamfer2 not found in library' + EgtOutLog( sErr) + return -1, 0, sErr + end + end end - return nChamfer, dDepth, sMilling + return nChamfer, dDepth, sMilling, sMilling2 end --------------------------------------------------------------------- @@ -171,7 +180,7 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) local Ls = EgtGetFirstNameInGroup( nPartId, 'Box') local b3Solid = EgtGetBBoxGlob( Ls or GDB_ID.NULL, GDB_BB.STANDARD) if not b3Solid then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' part box not found' + local sErr = 'Error : part box not found' EgtOutLog( sErr) return false, sErr end @@ -179,7 +188,7 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') if AuxId then AuxId = AuxId + Proc.Id end if not AuxId or ( EgtGetType( AuxId) & GDB_FY.GEO_CURVE) == 0 then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' missing profile geometry' + local sErr = 'Error : missing profile geometry' EgtOutLog( sErr) return false, sErr end @@ -225,13 +234,14 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) -- recupero gruppo per geometria addizionale local nAddGrpId = BL.GetAddGroup( nPartId) if not nAddGrpId then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' missing AddGroup' + local sErr = 'Error : missing AddGroup' EgtOutLog( sErr) return false, sErr end -- verifico se sono presenti i parametri Q per la profondità smusso e -- per eseguire in esclusiva solo lo smusso - local nChamfer, dDepthCham, sChamfer = VerifyCham( Proc, AuxId, nRawId, false, sDepthChamferMill, sPreemptiveChamfer) + local bMakeVertCham = BD.DOWN_HEAD + local nChamfer, dDepthCham, sChamfer, sChamfer2 = VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDepthChamferMill, sPreemptiveChamfer) -- se non posso lavorare la feature perché condizionata dall'esecuzione del solo chamfer -- genero errore e non faccio nulla if nChamfer < 0 then @@ -286,6 +296,7 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) end -- altrimenti lavorazione dal davanti o dal dietro else + bDoubleCham = BD.DOWN_HEAD -- se fresa verso il basso, la porto verso l'alto if vtExtr:getZ() < 0 then EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) @@ -322,9 +333,10 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) if bDoubleCham then -- inserisco la lavorazione local sName = 'ChamB_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) - local nMchId = EgtAddMachining( sName, sChamfer) + local sMachining2 = EgtIf( BD.DOWN_HEAD and sChamfer2, sChamfer2, sChamfer) + local nMchId = EgtAddMachining( sName, sMachining2) if not nMchId then - local sErr = 'Error adding machining ' .. sName .. '-' .. sChamfer + local sErr = 'Error adding machining ' .. sName .. '-' .. sMachining2 EgtOutLog( sErr) return false, sErr end @@ -365,7 +377,7 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) -- recupero la lavorazione local sMilling = ML.FindMilling( 'Prof') if not sMilling then - local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' milling not found in library' + local sErr = 'Error : milling not found in library' EgtOutLog( sErr) return false, sErr end