Compare commits
62 Commits
Ticket#2152
...
2.7g2
| Author | SHA1 | Date | |
|---|---|---|---|
| e15a833158 | |||
| 8f36025b64 | |||
| 0bec7ba4a5 | |||
| 95346a26d7 | |||
| e59ca27cdf | |||
| 10c44c7f82 | |||
| b2adfc098b | |||
| ec1eddf909 | |||
| dfeb8c38dd | |||
| a6b72d13cd | |||
| c58a9e7912 | |||
| a13dcbccf9 | |||
| 437682ab7a | |||
| a7d6363228 | |||
| b452a9ad99 | |||
| 4fc7110885 | |||
| f07e0d4afd | |||
| 29c1eaed0c | |||
| 6cf29a3a06 | |||
| 0f84937c6f | |||
| d8af5b3989 | |||
| b8ee911ed5 | |||
| 95006f4cce | |||
| 0b78227c6b | |||
| b6dd9a096a | |||
| 2b67b00d2e | |||
| f434c70f22 | |||
| 221162ce9d | |||
| f48b40d633 | |||
| 0388dbdc0f | |||
| a27566031b | |||
| 36ddc182f9 | |||
| cb473692dd | |||
| 3e805545f0 | |||
| 611ab1cb12 | |||
| 6fda7f818f | |||
| d4c94d9e8a | |||
| 612b73e2e9 | |||
| d82802bd10 | |||
| 00d5f929bb | |||
| 8c30535a69 | |||
| 5d5eb3f5cc | |||
| e3faec9d5d | |||
| e844d761f9 | |||
| 6a86f7798e | |||
| 6a6a194df6 | |||
| dcd600af01 | |||
| 854fafddf2 | |||
| ef6cbc35df | |||
| 2887591da4 | |||
| 3d75344652 | |||
| 1952c937b0 | |||
| 99baaa6320 | |||
| 3ac752861b | |||
| d690906180 | |||
| 1bf70aaf27 | |||
| e5a2a7e5a9 | |||
| b726fbc2cc | |||
| 0771665282 | |||
| 6ba42d19e9 | |||
| 374021ad13 | |||
| dfe405f3b0 |
+48
-3
@@ -1,4 +1,4 @@
|
||||
-- BatchProcess.lua by Egaltech s.r.l. 2023/04/17
|
||||
-- BatchProcess.lua by Egaltech s.r.l. 2025/07/17
|
||||
-- Gestione calcolo batch disposizione e lavorazioni per Pareti
|
||||
-- 2020/07/24 Nuvola di punti riferita allo Zero Tavola.
|
||||
-- 2020/10/28 Corretto spostamento pezzi per rotazioni (0 o 180) e inversioni( 0, 90, 180, o 270).
|
||||
@@ -92,13 +92,49 @@ end
|
||||
-- Funzione per aggiornare dati ausiliari
|
||||
local function UpdateAuxData( sAuxFile)
|
||||
local bModif = false
|
||||
local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL
|
||||
-- Se definito PROJID, aggiorno
|
||||
local sProjId = EgtGetStringFromIni( 'AuxData', 'PROJID', '', sAuxFile)
|
||||
if sProjId ~= '' then
|
||||
EgtSetInfo( BtlInfoId, 'PROJECTNUMBER', sProjId)
|
||||
bModif = true
|
||||
end
|
||||
-- Se definito PRODID, aggiorno
|
||||
local sProdId = EgtGetStringFromIni( 'AuxData', 'PRODID', '', sAuxFile)
|
||||
if sProdId ~= '' then
|
||||
EgtSetInfo( BtlInfoId, 'PRODID', sProdId)
|
||||
bModif = true
|
||||
end
|
||||
-- Se definito LOAD90, aggiorno
|
||||
local sLoad90 = EgtGetStringFromIni( 'AuxData', 'LOAD90', '', sAuxFile)
|
||||
if sLoad90 ~= '' then
|
||||
local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL
|
||||
EgtSetInfo( BtlInfoId, 'LOAD90', sLoad90)
|
||||
bModif = true
|
||||
end
|
||||
-- Se definito REFPOS, aggiorno
|
||||
local sRefPos = EgtGetStringFromIni( 'AuxData', 'REFPOS', '', sAuxFile)
|
||||
if sRefPos ~= '' then
|
||||
EgtSetInfo( BtlInfoId, 'REFPOS', sRefPos)
|
||||
bModif = true
|
||||
end
|
||||
-- Se definito PANELDELTAX, aggiorno
|
||||
local sPanelDeltaX = EgtGetStringFromIni( 'AuxData', 'PANELDELTAX', '', sAuxFile)
|
||||
if sPanelDeltaX ~= '' then
|
||||
EgtSetInfo( BtlInfoId, 'PANELDELTAX', sPanelDeltaX)
|
||||
bModif = true
|
||||
end
|
||||
-- Se definito PANELDELTAY, aggiorno
|
||||
local sPanelDeltaY = EgtGetStringFromIni( 'AuxData', 'PANELDELTAY', '', sAuxFile)
|
||||
if sPanelDeltaY ~= '' then
|
||||
EgtSetInfo( BtlInfoId, 'PANELDELTAY', sPanelDeltaY)
|
||||
bModif = true
|
||||
end
|
||||
-- Se definito PANELDELTAZ, aggiorno
|
||||
local sPanelDeltaZ = EgtGetStringFromIni( 'AuxData', 'PANELDELTAZ', '', sAuxFile)
|
||||
if sPanelDeltaZ ~= '' then
|
||||
EgtSetInfo( BtlInfoId, 'PANELDELTAZ', sPanelDeltaZ)
|
||||
bModif = true
|
||||
end
|
||||
return bModif
|
||||
end
|
||||
|
||||
@@ -139,7 +175,6 @@ end
|
||||
-- Carico le librerie
|
||||
_G.package.loaded.WallExec = nil
|
||||
local WE = require( 'WallExec')
|
||||
--local BL = require( 'BeamLib')
|
||||
|
||||
-- Carico i dati globali
|
||||
local WD = require( 'WallData')
|
||||
@@ -508,8 +543,18 @@ else
|
||||
end
|
||||
-- Aggiorno eventuali dati ausiliari
|
||||
UpdateAuxData( sBtmFile)
|
||||
|
||||
-- Anche se non è da riprocessare, imposto nome file CN.
|
||||
-- Se file TS7 importato da altro PC, 'WALL.FILE' è cambiato da un PC all'altro. Di conseguenza si deve aggiornare nome file che si andrà a generare.
|
||||
local _, sName, _ = EgtSplitPath( WALL.FILE)
|
||||
EgtSetInfo( EgtGetLastMachGroup(), 'NcName', sName .. '.cnc')
|
||||
|
||||
-- Passo in modalità lavora
|
||||
EgtSetCurrMachGroup( EgtGetLastMachGroup())
|
||||
-- Aggiorno posizione del grezzo
|
||||
if WE.MoveRaw() then
|
||||
bToRecalc = true
|
||||
end
|
||||
-- Se necessario eseguo aggiornamento con ricalcolo delle lavorazioni
|
||||
if bToRecalc or WALL.FLAG == 3 or WALL.FLAG == 4 then
|
||||
EgtOutLog( ' +++ Recalculating all dispositions and machinings >>>')
|
||||
|
||||
@@ -4,6 +4,7 @@ REM Per togliere info di debug aggiungere flag -s prima del nome del file di inp
|
||||
|
||||
REM Compilazione 32 e 64 bit
|
||||
|
||||
\EgtProg\Dll32\luac54 -o bin\LuaLibs\Squaring.lua -s LuaLibs\Squaring.lua
|
||||
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WallExec.lua -s LuaLibs\WallExec.lua
|
||||
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WallLib.lua -s LuaLibs\WallLib.lua
|
||||
\EgtProg\Dll32\luac54 -o bin\LuaLibs\WMachiningLib.lua -s LuaLibs\WMachiningLib.lua
|
||||
|
||||
@@ -466,7 +466,10 @@ function Squaring.AddMachinings( SquaringParameters, b3Squaring, nFirstOperation
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
|
||||
|
||||
local bOk = EgtApplyMachining( true, false)
|
||||
EgtRelocateGlob( nOperationId, nFirstOperationId, GDB_IN.BEFORE)
|
||||
-- la squadratura va sempre prima delle eventuali altre lavorazioni
|
||||
if nFirstOperationId then
|
||||
EgtRelocateGlob( nOperationId, nFirstOperationId, GDB_IN.BEFORE)
|
||||
end
|
||||
if not bOk then
|
||||
local _, sMsg = EgtGetLastMachMgrError()
|
||||
nNotOkCount = nNotOkCount + 1
|
||||
|
||||
@@ -148,18 +148,27 @@ function WMachiningLib.FindSawing( sType)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function WMachiningLib.FindDrilling( dDiam, dDepth, sHead, bOnlyPockets)
|
||||
function WMachiningLib.FindDrilling( dDiam, dDepth, sHead, bOnlyPockets, bUseMultiDrill, DrillingsToAvoid)
|
||||
if bOnlyPockets == nil or not bOnlyPockets then
|
||||
-- ricerca sulle forature, dal diametro maggiore al minore
|
||||
for i = #Drillings, 1, -1 do
|
||||
local Drilling = Drillings[i]
|
||||
if Drilling.On and Drilling.Type == 'Drill' and SetCurrMachiningAndTool( Drilling.Name) then
|
||||
if Drilling.On and EgtIf( bUseMultiDrill, Drilling.Type == 'MultiDrill', Drilling.Type == 'Drill') and SetCurrMachiningAndTool( Drilling.Name) then
|
||||
local bIsToAvoid = false
|
||||
if DrillingsToAvoid then
|
||||
for j = 1, #DrillingsToAvoid do
|
||||
if Drilling.Name == DrillingsToAvoid[j] then
|
||||
bIsToAvoid = true
|
||||
end
|
||||
end
|
||||
end
|
||||
local nMchType = EgtMdbGetCurrMachiningParam( MCH_MP.TYPE)
|
||||
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
||||
local dTMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
|
||||
local sMyHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
|
||||
if nMchType == MCH_MY.DRILLING and
|
||||
dTDiam < dDiam + 10 * GEO.EPS_SMALL and dTDiam > dDiam - WD.DRILL_TOL - 10 * GEO.EPS_SMALL and
|
||||
( not bIsToAvoid) and
|
||||
( not dDiam or ( dTDiam < dDiam + 10 * GEO.EPS_SMALL and dTDiam > dDiam - WD.DRILL_TOL - 10 * GEO.EPS_SMALL)) and
|
||||
( not dDepth or dTMaxMat > dDepth - GEO.EPS_SMALL) and
|
||||
(( not sHead and sMyHead ~= 'H5' and sMyHead ~= 'H6') or sHead == sMyHead) then
|
||||
return Drilling.Name, Drilling.Type, dTMaxMat
|
||||
@@ -167,16 +176,29 @@ function WMachiningLib.FindDrilling( dDiam, dDepth, sHead, bOnlyPockets)
|
||||
end
|
||||
end
|
||||
end
|
||||
-- se MultiDrill non si prova il DrillPocket
|
||||
if bUseMultiDrill then
|
||||
return
|
||||
end
|
||||
-- ricerca sulle svuotature, dal diametro maggiore al minore
|
||||
for i = #Drillings, 1, -1 do
|
||||
local Drilling = Drillings[i]
|
||||
if Drilling.On and Drilling.Type == 'Pocket' and SetCurrMachiningAndTool( Drilling.Name) then
|
||||
local bIsToAvoid = false
|
||||
if DrillingsToAvoid then
|
||||
for j = 1, #DrillingsToAvoid do
|
||||
if Drilling.Name == DrillingsToAvoid[j] then
|
||||
bIsToAvoid = true
|
||||
end
|
||||
end
|
||||
end
|
||||
local nMchType = EgtMdbGetCurrMachiningParam( MCH_MP.TYPE)
|
||||
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
||||
local dTMaxDepth = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), EgtTdbGetCurrToolMaxDepth())
|
||||
local sMyHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
|
||||
if nMchType == MCH_MY.POCKETING and
|
||||
dTDiam < dDiam - 10 * GEO.EPS_SMALL and
|
||||
( not bIsToAvoid) and
|
||||
( not dDiam or ( dTDiam < dDiam - 10 * GEO.EPS_SMALL)) and
|
||||
( not dDepth or dTMaxDepth > dDepth - GEO.EPS_SMALL) and
|
||||
( ( not sHead and sMyHead ~= 'H5' and sMyHead ~= 'H6') or sHead == sMyHead) then
|
||||
return Drilling.Name, Drilling.Type, dTMaxDepth
|
||||
|
||||
@@ -36,14 +36,17 @@ end
|
||||
function WPDC.Classify( Proc, b3Raw)
|
||||
-- se una faccia, uso la classificazione dei tagli singoli
|
||||
if Proc.Fct == 1 then return Cut.Classify( Proc, b3Raw) end
|
||||
|
||||
-- se più di due facce non si fa
|
||||
if Proc.Fct > 2 then return false end
|
||||
-- dati delle facce
|
||||
|
||||
-- se due facce si verifica solamente se le facce non sono troppo orientate verso il basso (per due facce unite sul lato lungo il check è fatto nella LapJoint)
|
||||
local vtN = {}
|
||||
vtN[1] = EgtSurfTmFacetNormVersor( Proc.Id, 0, GDB_ID.ROOT)
|
||||
vtN[2] = EgtSurfTmFacetNormVersor( Proc.Id, 1, GDB_ID.ROOT)
|
||||
-- verifico se è lavorabile da sopra o di fianco
|
||||
return ( vtN[1]:getZ() >= - 0.01 or vtN[2]:getZ() >= - 0.01)
|
||||
local bIsMachinable = ( vtN[1]:getZ() >= ( WD.CUT_VZ_MIN or - 0.5)) and ( vtN[2]:getZ() >= ( WD.CUT_VZ_MIN or - 0.5))
|
||||
|
||||
return bIsMachinable
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
+153
-37
@@ -27,6 +27,9 @@ local WM = require( 'WMachiningLib')
|
||||
-- Parametri Q
|
||||
local sContourOnly = 'Q01' -- 0=no, 1=si
|
||||
|
||||
-- Per forature MultiDrill, lista lavorazioni già provate
|
||||
local TriedDrillings = {}
|
||||
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- Riconoscimento della feature
|
||||
@@ -56,7 +59,7 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- Classificazione della feature
|
||||
function WPD.Classify( Proc, b3Raw)
|
||||
function WPD.Classify( Proc, b3Raw, bUseMultiDrill)
|
||||
|
||||
-- recupero e verifico l'entità foro
|
||||
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') or 0
|
||||
@@ -75,6 +78,10 @@ function WPD.Classify( Proc, b3Raw)
|
||||
-- è lavorabile se non troppo inclinato
|
||||
return ( abs( vtExtr:getZ()) >= WD.DRILL_VZ_MIN)
|
||||
end
|
||||
-- multiforatore (cabinet)
|
||||
if bUseMultiDrill then
|
||||
return true
|
||||
end
|
||||
-- se con direzione asse Y e macchina con foratore orizzontale del giusto diametro
|
||||
if WD.HOR_DRILL_DIAM and abs( dDiam - WD.HOR_DRILL_DIAM) < WD.DRILL_TOL and AreSameOrOppositeVectorApprox( vtExtr, Y_AX()) then
|
||||
return true
|
||||
@@ -255,7 +262,7 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- Applicazione della lavorazione
|
||||
function WPD.Make( Proc, nRawId, b3Raw)
|
||||
function WPD.Make( Proc, nRawId, b3Raw, bUseMultiDrill, DrillingsToAvoid)
|
||||
-- recupero e verifico l'entità foro
|
||||
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') or 0
|
||||
if AuxId then AuxId = AuxId + Proc.Id end
|
||||
@@ -272,7 +279,7 @@ function WPD.Make( Proc, nRawId, b3Raw)
|
||||
local bOpen = ( Proc.Fcs ~= 0 and Proc.Fce ~= 0)
|
||||
-- verifico che il foro non sia fattibile solo da sotto
|
||||
local bToInvert = ( vtExtr:getZ() < -0.1)
|
||||
if bToInvert and ( not bOpen or Proc.Flg ~= 1) then
|
||||
if bToInvert and ( not bOpen or Proc.Flg > 1) then
|
||||
local sErr = 'Error : drilling from bottom impossible'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
@@ -299,27 +306,35 @@ function WPD.Make( Proc, nRawId, b3Raw)
|
||||
end
|
||||
end
|
||||
end
|
||||
local bUseDLenToFindDrilling = true
|
||||
local sDrilling, nType = WM.FindDrilling( dDiam, dLen, sHead)
|
||||
if not sDrilling then
|
||||
bUseDLenToFindDrilling = false
|
||||
sDrilling, nType = WM.FindDrilling( dDiam, nil, sHead)
|
||||
end
|
||||
-- se Proc è settata per essere specchiata cerco la lavorazione adatta e verifico possa essere effettivamente specchiata
|
||||
if Proc.Double and Proc.Double == 2 then
|
||||
local sDrillingBackup = sDrilling
|
||||
sDrilling = WM.FindDrilling( dDiam, EgtIf( bUseDLenToFindDrilling, dLen, nil), 'H1')
|
||||
if not IsMachiningOkForDouble( sDrilling) then
|
||||
Proc.Double = 0
|
||||
sDrilling = sDrillingBackup
|
||||
end
|
||||
end
|
||||
if sHead and not sDrilling then
|
||||
sDrilling, nType = WM.FindDrilling( dDiam, dLen)
|
||||
local sDrilling, nType
|
||||
if bUseMultiDrill then
|
||||
sDrilling, nType = WM.FindDrilling( nil, nil, nil, nil, true, TriedDrillings)
|
||||
if not sDrilling then
|
||||
sDrilling, nType = WM.FindDrilling( dDiam)
|
||||
return false
|
||||
end
|
||||
else
|
||||
local bUseDLenToFindDrilling = true
|
||||
sDrilling, nType = WM.FindDrilling( dDiam, dLen, sHead)
|
||||
if not sDrilling then
|
||||
bUseDLenToFindDrilling = false
|
||||
sDrilling, nType = WM.FindDrilling( dDiam, nil, sHead)
|
||||
end
|
||||
-- se Proc è settata per essere specchiata cerco la lavorazione adatta e verifico possa essere effettivamente specchiata
|
||||
if Proc.Double and Proc.Double == 2 then
|
||||
local sDrillingBackup = sDrilling
|
||||
sDrilling = WM.FindDrilling( dDiam, EgtIf( bUseDLenToFindDrilling, dLen, nil), 'H1')
|
||||
if not IsMachiningOkForDouble( sDrilling) then
|
||||
Proc.Double = 0
|
||||
sDrilling = sDrillingBackup
|
||||
end
|
||||
end
|
||||
if sHead and not sDrilling then
|
||||
sDrilling, nType = WM.FindDrilling( dDiam, dLen)
|
||||
if not sDrilling then
|
||||
sDrilling, nType = WM.FindDrilling( dDiam)
|
||||
end
|
||||
if sDrilling then sHead = '' end
|
||||
end
|
||||
if sDrilling then sHead = '' end
|
||||
end
|
||||
local bAngledContourDrill = false
|
||||
local nAngledContourDrillId = GDB_ID.NULL
|
||||
@@ -446,11 +461,29 @@ function WPD.Make( Proc, nRawId, b3Raw)
|
||||
-- aggiungo geometria
|
||||
if bAngledContourDrill then
|
||||
EgtSetMachiningGeometry( nAngledContourDrillId)
|
||||
elseif bUseMultiDrill then
|
||||
if Proc.SkippedGeometries and #Proc.SkippedGeometries > 0 then
|
||||
EgtSetMachiningGeometry( Proc.SkippedGeometries)
|
||||
else
|
||||
local HolesGeometries = {}
|
||||
-- aggiungo foro principale
|
||||
table.insert( HolesGeometries, { AuxId, -1})
|
||||
-- aggiungo eventuali altre geometrie connesse
|
||||
if Proc.OtherGeometries and #Proc.OtherGeometries > 0 then
|
||||
for i = 1, #Proc.OtherGeometries do
|
||||
-- recupero geometria da lavorare
|
||||
local OtherAuxId = Proc.OtherGeometries[i].Id + EgtGetInfo( Proc.OtherGeometries[i].Id, 'AUXID', 'i')
|
||||
local Geometry = { OtherAuxId, -1}
|
||||
table.insert( HolesGeometries, Geometry)
|
||||
end
|
||||
end
|
||||
EgtSetMachiningGeometry( HolesGeometries)
|
||||
end
|
||||
else
|
||||
EgtSetMachiningGeometry( {{ AuxId, -1}})
|
||||
end
|
||||
-- eventuale inversione
|
||||
if nType == 'Drill' then
|
||||
if nType == 'Drill' or nType == 'MultiDrill' then
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, bToInvert)
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.TOOLINVERT, bToInvert)
|
||||
@@ -488,7 +521,9 @@ function WPD.Make( Proc, nRawId, b3Raw)
|
||||
end
|
||||
-- imposto posizione braccio porta testa
|
||||
local nSCC = MCH_SCC.ADIR_ZP
|
||||
if AreSameOrOppositeVectorApprox( vtExtr, Z_AX()) then
|
||||
if bUseMultiDrill then
|
||||
nSCC = MCH_SCC.ADIR_NEAR
|
||||
elseif AreSameOrOppositeVectorApprox( vtExtr, Z_AX()) then
|
||||
nSCC = MCH_SCC.ADIR_YP
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
|
||||
@@ -502,8 +537,13 @@ function WPD.Make( Proc, nRawId, b3Raw)
|
||||
EgtOutLog( sMyWarn .. ' (process ' .. tostring( Proc.Id) .. ')')
|
||||
end
|
||||
end
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||
-- leggo eventuali note esistenti della lavorazione
|
||||
if bUseMultiDrill then
|
||||
local sDepth = 'TH'
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH_STR, sDepth)
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||
end
|
||||
-- leggo eventuali note esistenti della lavorazione
|
||||
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES)
|
||||
-- se foratura o svuotatura, dichiarazione nessuna generazione sfridi per Vmill
|
||||
if nType == 'Drill' or nType == 'Pocket' then
|
||||
@@ -536,19 +576,95 @@ function WPD.Make( Proc, nRawId, b3Raw)
|
||||
EgtSetMachiningParam( MCH_MP.TABMAX, 3)
|
||||
end
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sErr
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sWarn
|
||||
else
|
||||
sMyWarn = (sMyWarn or sWarn)
|
||||
local bOk = EgtApplyMachining( true, false)
|
||||
|
||||
-- in caso di fori raggruppati vengono restituiti gli eventuali fori saltati
|
||||
local SkippedGeometries = {}
|
||||
SkippedGeometries = EgtGetMachiningSkippedGeometry()
|
||||
local sMsgMaster
|
||||
if bUseMultiDrill and SkippedGeometries and #SkippedGeometries > 0 then
|
||||
if ( Proc.SkippedGeometries and ( #SkippedGeometries == #Proc.SkippedGeometries))
|
||||
or ( Proc.OtherGeometries and ( #SkippedGeometries == #Proc.OtherGeometries + 1))
|
||||
or ( not Proc.OtherGeometries and #SkippedGeometries == 1) then
|
||||
EgtRemoveOperation( nMchId)
|
||||
end
|
||||
Proc.SkippedGeometries = SkippedGeometries
|
||||
table.insert( TriedDrillings, sDrilling)
|
||||
-- per provare tutte le MultiDrill disponibili si passano quelle già fatte come lavorazioni da ignorare
|
||||
bOk = WPD.Make( Proc, nRawId, b3Raw, true, TriedDrillings)
|
||||
-- non trovata lavorazione, si prova con le lavorazioni singole
|
||||
if not bOk then
|
||||
local bOkMaster = true
|
||||
for i = #Proc.SkippedGeometries, 1, -1 do
|
||||
local sErr
|
||||
if Proc.OtherGeometries then
|
||||
for j = 1, #Proc.OtherGeometries do
|
||||
local AuxIdOtherGeometry = EgtGetInfo( Proc.OtherGeometries[j].Id, 'AUXID', 'i') or 0
|
||||
if AuxIdOtherGeometry then AuxIdOtherGeometry = AuxIdOtherGeometry + Proc.OtherGeometries[j].Id end
|
||||
if Proc.SkippedGeometries[i][1] == AuxIdOtherGeometry then
|
||||
bOk, sErr = WPD.Make( Proc.OtherGeometries[j], nRawId, b3Raw, false)
|
||||
if bOk then
|
||||
Proc.OtherGeometries[j].bOk = true
|
||||
else
|
||||
Proc.OtherGeometries[j].bOk = false
|
||||
end
|
||||
Proc.OtherGeometries[j].sMsg = sErr
|
||||
break
|
||||
end
|
||||
end
|
||||
-- se nelle altre geometrie non è stato trovato, potrebbe essere la principale
|
||||
local AuxIdProc = EgtGetInfo( Proc.Id, 'AUXID', 'i') or 0
|
||||
if AuxIdProc then AuxIdProc = AuxIdProc + Proc.Id end
|
||||
if Proc.SkippedGeometries[i][1] == AuxIdProc then
|
||||
bOk, sErr = WPD.Make( Proc, nRawId, b3Raw, false)
|
||||
if not bOk then
|
||||
bOkMaster = false
|
||||
end
|
||||
sMsgMaster = sErr
|
||||
end
|
||||
-- se non ci sono altre geometrie quella da fare è sicuramente la Proc principale
|
||||
else
|
||||
bOk, sErr = WPD.Make( Proc, nRawId, b3Raw, false)
|
||||
if not bOk then
|
||||
bOkMaster = false
|
||||
end
|
||||
sMsgMaster = sErr
|
||||
end
|
||||
if bOk then
|
||||
table.remove( Proc.SkippedGeometries, i)
|
||||
end
|
||||
end
|
||||
bOk = bOkMaster
|
||||
end
|
||||
end
|
||||
-- se presenti geometrie aggiuntive, aggiunta informazioni per output statistiche
|
||||
if Proc.OtherGeometries and #Proc.OtherGeometries > 0 then
|
||||
for i = 1, #Proc.OtherGeometries do
|
||||
if Proc.OtherGeometries[i].bOk == nil then
|
||||
Proc.OtherGeometries[i].bOk = true
|
||||
Proc.OtherGeometries[i].sMsg = ''
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if not bUseMultiDrill then
|
||||
if not bOk then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sErr
|
||||
else
|
||||
local _, sWarn = EgtGetMachMgrWarning( 0)
|
||||
if EgtIsMachiningEmpty() then
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sWarn
|
||||
else
|
||||
sMyWarn = (sMyWarn or sWarn)
|
||||
end
|
||||
end
|
||||
else
|
||||
return bOk, sMsgMaster
|
||||
end
|
||||
|
||||
-- se preforo inclinato impostato, inclinazione oltre limite impostato e foro non orizzontale
|
||||
if WD.PREDRILL_DIAM and WD.PREDRILL_DIAM > 0 and vtExtr:getZ() < ( WD.PREDRILL_MINANGLE or 0.707) and vtExtr:getZ() > 0.1 then
|
||||
-- gruppo ausiliario per preforo
|
||||
|
||||
@@ -761,6 +761,27 @@ local function MakeLocalSurf( ptP1, ptP2, ptP3, nAddGrpId)
|
||||
return nFaceId
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function GetEdgeToMachineFromVector( nSurfId, nFacet, vtOrtho)
|
||||
local _, EdgesEgt = EgtSurfTmGetFacetOutlineInfo( nSurfId, nFacet, GDB_ID.ROOT)
|
||||
|
||||
local nEdgeIndMax = 0
|
||||
local dMaxComp = - GEO.INFINITO
|
||||
for i = 1, #EdgesEgt do
|
||||
local vtN = EdgesEgt[i].Norm
|
||||
if EdgesEgt[i].Open then
|
||||
vtN = -vtN
|
||||
end
|
||||
local dComp = vtN * vtOrtho
|
||||
if dComp > dMaxComp then
|
||||
nEdgeIndMax = i -1
|
||||
dMaxComp = dComp
|
||||
end
|
||||
end
|
||||
|
||||
return nEdgeIndMax
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTypeConeCut, nAddGrpId,
|
||||
dToolDiam, dThick, sMilling, dOffsAng, dDepthMach,
|
||||
@@ -777,9 +798,9 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTyp
|
||||
-- creo superfice locale o esco
|
||||
local nSurfToAdd = MakeLocalSurf( tFacAdj[7], tFacAdj[8], tFacAdj[9], nAddGrpId)
|
||||
if nSurfToAdd then
|
||||
local nFacCntPre = EgtSurfTmFacetCount( nNewProc)
|
||||
local nFacCntPre = EgtSurfTmFacetCount( nNewProc.Id)
|
||||
-- creo copia del percorso principale e gli aggiungo la nuova faccia
|
||||
nNewProcLoc = EgtCopyGlob( nNewProc, nAddGrpId)
|
||||
nNewProcLoc = EgtCopyGlob( nNewProc.Id, nAddGrpId)
|
||||
nNewProcLoc = EgtSurfTmBySewing( nAddGrpId, {nNewProcLoc,nSurfToAdd} , true)
|
||||
-- riordino le facce
|
||||
ReorderFacesFromTab( nNewProcLoc, vFace)
|
||||
@@ -790,7 +811,7 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTyp
|
||||
return true, ''
|
||||
end
|
||||
else
|
||||
nNewProcLoc = nNewProc
|
||||
nNewProcLoc = nNewProc.Id
|
||||
end
|
||||
-- prendo il primo versore
|
||||
local _, vtN1 = EgtSurfTmFacetCenter( nNewProcLoc, nFacInd, GDB_ID.ROOT)
|
||||
@@ -847,7 +868,7 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTyp
|
||||
vtCheck:rotate( Z_AX(), dOffsAng)
|
||||
end
|
||||
-- controllo se c'è collisione con le facce della superfice
|
||||
if nTypeConeCut == 1 and CalcInterference( nNewProc, vtCheck, tFacAdj[nIdEndPoint] + Point3d( 0, 0, -dDepthMach), dDiam1, dDiam2,
|
||||
if nTypeConeCut == 1 and CalcInterference( nNewProc.Id, vtCheck, tFacAdj[nIdEndPoint] + Point3d( 0, 0, -dDepthMach), dDiam1, dDiam2,
|
||||
dTall1, dTall2, dDiam3, dTall3) then
|
||||
local sErr = 'Collision detect from clean corner tool and surface'
|
||||
EgtOutLog( sErr)
|
||||
@@ -944,6 +965,8 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTyp
|
||||
-- trasformo in percorso
|
||||
if #pAuxId > 0 then
|
||||
AuxId = EgtCurveCompo( nAddGrpId, pAuxId, true)
|
||||
EgtSetInfo( AuxId, 'TASKID', nNewProc.TaskId)
|
||||
EgtSetInfo( AuxId, 'CUTID', nNewProc.CutId)
|
||||
end
|
||||
-- se non c'é il percorso do errore
|
||||
if not AuxId then
|
||||
@@ -958,8 +981,8 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTyp
|
||||
EgtRotate( AuxId, tFacAdj[nIdEndPoint], Z_AX(), dOffsAng, GDB_RT.GLOB)
|
||||
end
|
||||
-- inserisco la lavorazione
|
||||
local sName = 'Clean_' .. ( EgtGetName( nNewProc) or tostring( nNewProc))
|
||||
local nMchId = WM.AddMachining( nNewProc, sName, sMilling)
|
||||
local sName = 'Clean_' .. ( EgtGetName( nNewProc.Id) or tostring( nNewProc.Id))
|
||||
local nMchId = WM.AddMachining( nNewProc.Id, sName, sMilling)
|
||||
if not nMchId then
|
||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
||||
EgtOutLog( sErr)
|
||||
@@ -1052,26 +1075,26 @@ local function AddMillCorner( nTypeConeCut, vFace, Proc, nRawId, b3Raw,
|
||||
-- verifico se ciclo chiuso
|
||||
local bClosed = ( abs( vFace[1].PrevAng) > 0.1)
|
||||
-- copio la feature nel layer di appoggio
|
||||
local nNewProc
|
||||
local nNewProc = { CutId = Proc.CutId, TaskId = Proc.TaskId}
|
||||
if nMasterNewProc then
|
||||
nNewProc = nMasterNewProc
|
||||
nNewProc.Id = nMasterNewProc
|
||||
else
|
||||
nNewProc = EgtCopyGlob( Proc.Id, nAddGrpId) or GDB_ID.NULL
|
||||
nNewProc.Id = EgtCopyGlob( Proc.Id, nAddGrpId) or GDB_ID.NULL
|
||||
end
|
||||
local nFacCnt = EgtSurfTmFacetCount( nNewProc)
|
||||
local nFacCnt = EgtSurfTmFacetCount( nNewProc.Id)
|
||||
local nFacInd, dDepth, nSurfInt
|
||||
local bMakeLocSurf
|
||||
-- RIMUOVERE
|
||||
if false and nFacCnt <= 4 then
|
||||
-- recupero profondità e faccia di fondo
|
||||
_, _, dDepth, _, _, nSurfInt = GetTunnelDimension( nNewProc, Proc.PartId, nAddGrpId, bClosed)
|
||||
_, _, dDepth, _, _, nSurfInt = GetTunnelDimension( nNewProc.Id, Proc.PartId, nAddGrpId, bClosed)
|
||||
if nSurfInt then
|
||||
-- aggiungo la faccia di fondo appena calcolata
|
||||
nNewProc = EgtSurfTmBySewing( nAddGrpId, { nNewProc, nSurfInt}, true)
|
||||
nNewProc.Id = EgtSurfTmBySewing( nAddGrpId, { nNewProc.Id, nSurfInt}, true)
|
||||
-- riordino le facce
|
||||
ReorderFacesFromTab( nNewProc, vFace)
|
||||
ReorderFacesFromTab( nNewProc.Id, vFace)
|
||||
-- aggiorno numero di facce e assegno indice di quella di fondo (sempre ultima)
|
||||
nFacCnt = EgtSurfTmFacetCount( nNewProc)
|
||||
nFacCnt = EgtSurfTmFacetCount( nNewProc.Id)
|
||||
nFacInd = nFacCnt - 1
|
||||
else
|
||||
return true
|
||||
@@ -1119,7 +1142,7 @@ local function AddMillCorner( nTypeConeCut, vFace, Proc, nRawId, b3Raw,
|
||||
ptLoc2 = vFace[k].PPrev
|
||||
end
|
||||
-- ricavo i punti e l'angolo interno
|
||||
local _, ptP1, ptP2, dAng = EgtSurfTmFacetsContact( nNewProc, nFace1, nFace2, GDB_ID.ROOT)
|
||||
local _, ptP1, ptP2, dAng = EgtSurfTmFacetsContact( nNewProc.Id, nFace1, nFace2, GDB_ID.ROOT)
|
||||
-- se punti validi e angolo è interno e non è quasi piatto e >= 90 creo istanza
|
||||
local tFacAdj = {}
|
||||
if ptP1 and ptP2 and dAng < 0 and dAng < -6 and dAng > EgtIf( nTypeConeCut == 1, -(90 + 10 * GEO.EPS_SMALL), -(180-dAngleSmall + 10 * GEO.EPS_SMALL)) then
|
||||
@@ -1157,8 +1180,8 @@ local function AddMillCorner( nTypeConeCut, vFace, Proc, nRawId, b3Raw,
|
||||
i = i + 1
|
||||
end
|
||||
-- cancello la copia della superfice
|
||||
if nNewProc then
|
||||
EgtErase( nNewProc)
|
||||
if nNewProc.Id then
|
||||
EgtErase( nNewProc.Id)
|
||||
end
|
||||
return true
|
||||
end
|
||||
@@ -1294,6 +1317,11 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
||||
-- assegno utilizzo faccia
|
||||
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN)
|
||||
local nEdgeFaceUse = GetEdgeToMachineFromVector( Proc.Id, vFace[i].Fac, Z_AX())
|
||||
if nEdgeFaceUse then
|
||||
local sNoteEdgeFaceUse = 'EdgesFaceUse=' .. EgtNumToString( nEdgeFaceUse) .. ';'
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sNoteEdgeFaceUse)
|
||||
end
|
||||
-- assegno affondamento
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||
-- assegno lato di lavoro
|
||||
@@ -1447,6 +1475,13 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
||||
-- assegno utilizzo faccia
|
||||
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN)
|
||||
if #vGeom == 1 then
|
||||
local nEdgeFaceUse = GetEdgeToMachineFromVector( Proc.Id, vGeom[1][2], Z_AX())
|
||||
if nEdgeFaceUse then
|
||||
local sNoteEdgeFaceUse = 'EdgesFaceUse=' .. EgtNumToString( nEdgeFaceUse) .. ';'
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sNoteEdgeFaceUse)
|
||||
end
|
||||
end
|
||||
-- assegno affondamento
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||
-- assegno lato di lavoro
|
||||
@@ -1471,6 +1506,13 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
||||
-- assegno utilizzo faccia
|
||||
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN)
|
||||
if #vGeom == 1 then
|
||||
local nEdgeFaceUse = GetEdgeToMachineFromVector( Proc.Id, vGeom[1][2], Z_AX())
|
||||
if nEdgeFaceUse then
|
||||
local sNoteEdgeFaceUse = 'EdgesFaceUse=' .. EgtNumToString( nEdgeFaceUse) .. ';'
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sNoteEdgeFaceUse)
|
||||
end
|
||||
end
|
||||
-- assegno affondamento
|
||||
-- EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||
if bNotThrou then
|
||||
@@ -1564,6 +1606,11 @@ local function AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAdd
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
||||
-- assegno utilizzo faccia
|
||||
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN)
|
||||
local nEdgeFaceUse = GetEdgeToMachineFromVector( Proc.Id, vFace[i].Fac, Z_AX())
|
||||
if nEdgeFaceUse then
|
||||
local sNoteEdgeFaceUse = 'EdgesFaceUse=' .. EgtNumToString( nEdgeFaceUse) .. ';'
|
||||
EgtSetMachiningParam( MCH_MP.USERNOTES, sNoteEdgeFaceUse)
|
||||
end
|
||||
-- assegno affondamento
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||
-- assegno lato di lavoro
|
||||
@@ -2120,6 +2167,12 @@ local function MakeByMill( Proc, nRawId, b3Raw)
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
||||
elseif ( Proc.Grp == 3 and bToolInv) or ( Proc.Grp == 4 and not bToolInv) then
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
||||
elseif ( Proc.Grp == 1 or Proc.Grp == 2) then
|
||||
if bToolInv then
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
|
||||
else
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
||||
end
|
||||
end
|
||||
|
||||
-- se lamatura affondata speciale (cliente 90480029), setto attacco e stacco al centro
|
||||
@@ -2604,6 +2657,9 @@ function WPF.Make( Proc, nRawId, b3Raw, vNLO, b3Squaring)
|
||||
ReorderFaces( Proc.Id, EgtSurfTmFacetCount( Proc.Id))
|
||||
-- recupero il tipo di lavorazione
|
||||
local nCntType = EgtGetInfo( Proc.Id, 'CNT_TYPE', 'i') or 0
|
||||
if WD.FORCE_MILL_CONTOUR == true then
|
||||
nCntType = 2
|
||||
end
|
||||
-- se fresatura
|
||||
if nCntType == 2 then
|
||||
return MakeByMill( Proc, nRawId, b3Raw)
|
||||
|
||||
+274
-243
@@ -56,6 +56,7 @@ local MIN_LEN_CUT = 30
|
||||
-- variabili assegnazione parametri Q
|
||||
local Q_SIDE_MILL = '' -- d
|
||||
local Q_CORNER_CUT = '' -- i
|
||||
local Q_USE_BLADE = '' -- i
|
||||
|
||||
-- variabile settaggio doppia lavorazione su angolo > 90
|
||||
local bMakeTwinCut = true
|
||||
@@ -80,10 +81,12 @@ local function AssignQIdent( Proc)
|
||||
-- reset assegnazione parametri Q
|
||||
Q_SIDE_MILL = ''
|
||||
Q_CORNER_CUT = ''
|
||||
Q_USE_BLADE = ''
|
||||
|
||||
if Proc.Prc == 11 then
|
||||
Q_SIDE_MILL = 'Q02' -- i
|
||||
Q_CORNER_CUT = 'Q05' -- i
|
||||
Q_USE_BLADE = 'Q06' -- i
|
||||
elseif Proc.Prc == 12 then
|
||||
Q_SIDE_MILL = 'Q02' -- i
|
||||
Q_CORNER_CUT = '' -- i
|
||||
@@ -111,8 +114,13 @@ local function EvaluateQParam( Proc)
|
||||
-- 2 : ripresa corner senza pausa (fresa 30 deg)
|
||||
-- 3 : scarico corner (tipo foro).
|
||||
local nTypeCornerCut = EgtGetInfo( Proc.Id, Q_CORNER_CUT, 'i') or 0
|
||||
|
||||
-- Verifica forzatura utilizzo lama
|
||||
-- 0 : automatico
|
||||
-- 1 : usa lama
|
||||
local nUseBlade = EgtGetInfo( Proc.Id, Q_USE_BLADE, 'i') or 0
|
||||
|
||||
return nTypeCornerCut, nUseSideMillAsBlade
|
||||
return nTypeCornerCut, nUseSideMillAsBlade, nUseBlade
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
@@ -345,7 +353,7 @@ function WPL.FlipClassify( Proc)
|
||||
end
|
||||
end
|
||||
-- se con fondo
|
||||
else
|
||||
elseif nFacInd2 then
|
||||
-- calcolo la media delle normali delle facce di fondo ed assegno punteggio maggiore se positiva
|
||||
local vtN = {}
|
||||
vtN[1] = EgtSurfTmFacetNormVersor( Proc.Id, nFacInd, GDB_ID.ROOT)
|
||||
@@ -353,6 +361,9 @@ function WPL.FlipClassify( Proc)
|
||||
if vtN[1]:getZ() == -1 or vtN[2]:getZ() == -1 then return 0, 100 end
|
||||
if vtN[1]:getZ() == 1 or vtN[2]:getZ() == 1 then return 100, 0 end
|
||||
nFlip0, nFlip1 = VerifyVtNMedia(Proc.Id, nFacInd, nFacInd2)
|
||||
else
|
||||
-- verifico che la normale del fondo permetta la lavorazione da sopra ed assegno punteggio di conseguenza
|
||||
nFlip0, nFlip1 = VerifyVtN( Proc.Id, nFacInd)
|
||||
end
|
||||
-- se 5 facce
|
||||
elseif Proc.Fct == 5 then
|
||||
@@ -692,15 +703,15 @@ local function CalcInterference( nNewProc, vtExtr, ptCentr, dDiam1, dDiam2,
|
||||
|
||||
local ptCentrGrid1 = ptCentr + ( vtExtr * 0.01)
|
||||
local frOriTool = Frame3d( ptCentrGrid1, vtExtr)
|
||||
local bColl1 = EgtCDeConeSolid( frOriTool, dDiam1/2, dDiam2/2, dTall1, nNewProc, 0, GDB_RT.GLOB)
|
||||
local bColl1 = EgtTestConeSurface( frOriTool, dDiam1/2, dDiam2/2, dTall1, nNewProc, 0, GDB_RT.GLOB)
|
||||
if bColl1 then return true end
|
||||
local ptCentrGrid2 = ptCentr + ( vtExtr * ( dTall1 + 0.01))
|
||||
frOriTool = Frame3d( ptCentrGrid2, vtExtr)
|
||||
local bColl2 = EgtCDeCylSolid( frOriTool, dDiam2/2, (dTall2-dTall1), nNewProc, 0, GDB_RT.GLOB)
|
||||
local bColl2 = EgtTestCylSurface( frOriTool, dDiam2/2, (dTall2-dTall1), nNewProc, 0, GDB_RT.GLOB)
|
||||
if bColl2 then return true end
|
||||
local ptCentrGrid3 = ptCentr + ( vtExtr * ( dTall2 + 0.01))
|
||||
frOriTool = Frame3d( ptCentrGrid3, vtExtr)
|
||||
local bColl3 = EgtCDeCylSolid( frOriTool, dDiam3/2, (dTall3-dTall2), nNewProc, 0, GDB_RT.GLOB)
|
||||
local bColl3 = EgtTestCylSurface( frOriTool, dDiam3/2, (dTall3-dTall2), nNewProc, 0, GDB_RT.GLOB)
|
||||
if bColl3 then return true end
|
||||
-- restituisco risultato controllo collisioni
|
||||
return false
|
||||
@@ -760,9 +771,9 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTyp
|
||||
-- creo superfice locale o esco
|
||||
local nSurfToAdd = MakeLocalSurf( tFacAdj[7], tFacAdj[8], tFacAdj[9], nAddGrpId)
|
||||
if nSurfToAdd then
|
||||
local nFacCntPre = EgtSurfTmFacetCount( nNewProc)
|
||||
local nFacCntPre = EgtSurfTmFacetCount( nNewProc.Id)
|
||||
-- creo copia del percorso principale e gli aggiungo la nuova faccia
|
||||
nNewProcLoc = EgtCopyGlob( nNewProc, nAddGrpId)
|
||||
nNewProcLoc = EgtCopyGlob( nNewProc.Id, nAddGrpId)
|
||||
nNewProcLoc = EgtSurfTmBySewing( nAddGrpId, {nNewProcLoc,nSurfToAdd} , true)
|
||||
-- riordino le facce
|
||||
nNewProcLoc = ReorderFacesFromTab( nNewProcLoc, vFace)
|
||||
@@ -775,7 +786,7 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTyp
|
||||
return true, ''
|
||||
end
|
||||
else
|
||||
nNewProcLoc = nNewProc
|
||||
nNewProcLoc = nNewProc.Id
|
||||
end
|
||||
-- prendo il primo versore
|
||||
local _, vtN1 = EgtSurfTmFacetCenter( nNewProcLoc, nFacInd, GDB_ID.ROOT)
|
||||
@@ -829,7 +840,7 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTyp
|
||||
vtCheck:rotate( Z_AX(), dOffsAng)
|
||||
end
|
||||
-- controllo se c'è collisione con le facce della superfice
|
||||
if nTypeConeCut == 1 and CalcInterference( nNewProc, vtCheck, tFacAdj[nIdEndPoint] + Point3d( 0, 0, -dDepthMach), dDiam1, dDiam2,
|
||||
if nTypeConeCut == 1 and CalcInterference( nNewProc.Id, vtCheck, tFacAdj[nIdEndPoint] + Point3d( 0, 0, -dDepthMach), dDiam1, dDiam2,
|
||||
dTall1, dTall2, dDiam3, dTall3) then
|
||||
local sErr = 'Collision detect from clean corner tool and surface'
|
||||
EgtOutLog( sErr)
|
||||
@@ -926,6 +937,8 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTyp
|
||||
-- trasformo in percorso
|
||||
if #pAuxId > 0 then
|
||||
AuxId = EgtCurveCompo( nAddGrpId, pAuxId, true)
|
||||
EgtSetInfo( AuxId, 'TASKID', nNewProc.TaskId)
|
||||
EgtSetInfo( AuxId, 'CUTID', nNewProc.CutId)
|
||||
end
|
||||
-- se non c'é il percorso do errore
|
||||
if not AuxId then
|
||||
@@ -940,8 +953,8 @@ local function AddMillCornerMachining( nPartId, nNewProc, nFacInd, tFacAdj, nTyp
|
||||
EgtRotate( AuxId, tFacAdj[nIdEndPoint], Z_AX(), dOffsAng, GDB_RT.GLOB)
|
||||
end
|
||||
-- inserisco la lavorazione
|
||||
local sName = 'Clean_' .. ( EgtGetName( nNewProc) or tostring( nNewProc))
|
||||
local nMchId = WM.AddMachining( nNewProc, sName, sMilling)
|
||||
local sName = 'Clean_' .. ( EgtGetName( nNewProc.Id) or tostring( nNewProc.Id))
|
||||
local nMchId = WM.AddMachining( nNewProc.Id, sName, sMilling)
|
||||
if not nMchId then
|
||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
|
||||
EgtOutLog( sErr)
|
||||
@@ -1035,27 +1048,27 @@ local function AddMillCorner( nTypeConeCut, vFace, Proc, nRawId, b3Raw,
|
||||
end
|
||||
end
|
||||
-- copio la feature nel layer di appoggio
|
||||
local nNewProc
|
||||
local nNewProc = { CutId = Proc.CutId, TaskId = Proc.TaskId}
|
||||
if nMasterNewProc then
|
||||
nNewProc = nMasterNewProc
|
||||
nNewProc.Id = nMasterNewProc
|
||||
else
|
||||
nNewProc = EgtCopyGlob( Proc.Id, nAddGrpId) or GDB_ID.NULL
|
||||
nNewProc.Id = EgtCopyGlob( Proc.Id, nAddGrpId) or GDB_ID.NULL
|
||||
end
|
||||
local nFacCnt = EgtSurfTmFacetCount( nNewProc)
|
||||
local nFacCnt = EgtSurfTmFacetCount( nNewProc.Id)
|
||||
local nFacInd, dDimMin, dDimMax, dDepth, nSurfInt
|
||||
local bMakeLocSurf
|
||||
-- RIMUOVERE
|
||||
if false and nFacCnt <= 4 then
|
||||
-- ottengo le dimensioni apertura, la normale e la faccia inferiore
|
||||
dDimMin, dDimMax, dDepth, _, _, nSurfInt = GetTunnelDimension( nNewProc, Proc.PartId, nAddGrpId)
|
||||
dDimMin, dDimMax, dDepth, _, _, nSurfInt = GetTunnelDimension( nNewProc.Id, Proc.PartId, nAddGrpId)
|
||||
if nSurfInt then
|
||||
-- uso la dimensione minima anche nel caso che la cava sborda perchè la lavorazione potrebbe collidere con un pezzo limitrofo
|
||||
local dMinWidth = dDimMin
|
||||
nNewProc = EgtSurfTmBySewing( nAddGrpId, {nNewProc,nSurfInt} , true)
|
||||
nNewProc.Id = EgtSurfTmBySewing( nAddGrpId, {nNewProc.Id,nSurfInt} , true)
|
||||
-- riordino le facce
|
||||
nNewProc = ReorderFacesFromTab( nNewProc, vFace)
|
||||
nNewProc.Id = ReorderFacesFromTab( nNewProc.Id, vFace)
|
||||
-- acquisisco il numero della faccia
|
||||
nFacCnt = EgtSurfTmFacetCount( nNewProc)
|
||||
nFacCnt = EgtSurfTmFacetCount( nNewProc.Id)
|
||||
nFacInd = nFacCnt - 1
|
||||
else
|
||||
local sErr = 'Error : cannot create base surface'
|
||||
@@ -1107,7 +1120,7 @@ local function AddMillCorner( nTypeConeCut, vFace, Proc, nRawId, b3Raw,
|
||||
ptLoc2 = vFace[k].PPrev
|
||||
end
|
||||
-- ricavo i punti e l'angolo interno
|
||||
local _, ptP1, ptP2, dAng = EgtSurfTmFacetsContact( nNewProc, nFace1, nFace2, GDB_ID.ROOT)
|
||||
local _, ptP1, ptP2, dAng = EgtSurfTmFacetsContact( nNewProc.Id, nFace1, nFace2, GDB_ID.ROOT)
|
||||
-- se punti validi e angolo è interno e non è quasi piatto e >= 90 creo istanza
|
||||
local tFacAdj = {}
|
||||
if ptP1 and ptP2 and dAng < 0 and dAng < -6 and dAng > EgtIf( nTypeConeCut == 1, -(90 + 10 * GEO.EPS_SMALL), -(180-dAngleSmall + 10 * GEO.EPS_SMALL)) then
|
||||
@@ -1145,8 +1158,8 @@ local function AddMillCorner( nTypeConeCut, vFace, Proc, nRawId, b3Raw,
|
||||
i = i + 1
|
||||
end
|
||||
-- cancello la copia della superfice
|
||||
if nNewProc then
|
||||
EgtErase(nNewProc)
|
||||
if nNewProc.Id then
|
||||
EgtErase( nNewProc.Id)
|
||||
end
|
||||
return true
|
||||
end
|
||||
@@ -1691,13 +1704,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
dExtraLongEnd = 0
|
||||
end
|
||||
-- se ho abilitato la lavorazione di fresatura per garantire passaggio gambo utensile, inserisco la lavorazione
|
||||
local bThroughRaw = false
|
||||
if bEnablePreMill then
|
||||
-- verifico se feature e' passante
|
||||
if ((Proc.Box:getMin():getX() < ( b3Raw:getMin():getX() + 50)) and (Proc.Box:getMax():getX() > ( b3Raw:getMax():getX() - 50))) or
|
||||
((Proc.Box:getMin():getY() < ( b3Raw:getMin():getY() + 50)) and (Proc.Box:getMax():getY() > ( b3Raw:getMax():getY() - 50))) then
|
||||
bThroughRaw = true
|
||||
end
|
||||
|
||||
-- recupero la lavorazione di taglio
|
||||
local sCuttingGorge = WM.FindCutting( 'Standard')
|
||||
@@ -1745,7 +1752,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
local bSawInvertSE = false
|
||||
|
||||
-- se non passante, aggiungo fresatura area della fresa
|
||||
if not bThroughRaw and nNumStep - 1 > 0 then
|
||||
if not Proc.IsThrough and nNumStep - 1 > 0 then
|
||||
local SquareId -- Id della composita da fresare
|
||||
local dSawShortening = sqrt( b3Raw:getDimZ() * ( dSawDiam - b3Raw:getDimZ())) -- da calcolare in base a raggio lama e spessore grezzo
|
||||
-- gruppo ausiliario
|
||||
@@ -2015,6 +2022,10 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
local nStep = ceil( ( dThick - dMaxMat) / dStep)
|
||||
dStep = max( ( dThick - dMaxMat) / max( nStep, 1), 0)
|
||||
local dMaxElev = max( ( nStep + 1) * dStep - GEO.EPS_SMALL, 0)
|
||||
-- tasca aperta sopra non necessita di MaxElev
|
||||
if Proc.Fct == 2 and Proc.AffectedFaces.Top then
|
||||
dMaxElev = nil
|
||||
end
|
||||
if nSinglePass and nSinglePass > 0 then
|
||||
dStep = 0
|
||||
if nSinglePass == 1 then
|
||||
@@ -2028,7 +2039,9 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
-- leggo eventuali note esistenti della lavorazione
|
||||
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES)
|
||||
-- aggiungo alle note massima elevazione
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElev, 3))
|
||||
if dMaxElev then
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElev, 3))
|
||||
end
|
||||
-- se lavorazione in doppio aggiungo le rispettive note
|
||||
if Proc.Double and Proc.Double == 2 then
|
||||
sUserNotes = EgtSetValInNotes( sUserNotes, 'DOUBLE', Proc.Double)
|
||||
@@ -2102,15 +2115,9 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d
|
||||
-- setto allungamenti iniziali e finali
|
||||
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dExtraLongIni)
|
||||
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dExtraLongEnd)
|
||||
-- se ho passate orizzontali riduco l'eventuale allungamento settato dall'utente
|
||||
local dLiPerp = EgtGetMachiningParam( MCH_MP.LIPERP)
|
||||
local dLoPerp = EgtGetMachiningParam( MCH_MP.LOPERP)
|
||||
if dLiPerp > 0 then
|
||||
dLiPerp = dLiPerp - dRadialOffset
|
||||
end
|
||||
if dLoPerp > 0 then
|
||||
dLoPerp = dLoPerp - dRadialOffset
|
||||
end
|
||||
-- tutte le passate partono dalla stessa distanza
|
||||
local dLiPerp = dElev + WD.CUT_SIC - dRadialOffset
|
||||
local dLoPerp = dElev + WD.CUT_SIC - dRadialOffset
|
||||
EgtSetMachiningParam( MCH_MP.LIPERP, dLiPerp)
|
||||
EgtSetMachiningParam( MCH_MP.LOPERP, dLoPerp)
|
||||
-- se richiesto, setto la nota per spostare la lavorazione alla fine
|
||||
@@ -2281,6 +2288,10 @@ local function VerifyPocket( Proc, nFacet, dElev, nRawId)
|
||||
local _, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacet, GDB_ID.ROOT)
|
||||
local dStartDiameter = min( dH, dV)
|
||||
local dMaxDiameter = dStartDiameter
|
||||
-- se tasca chiusa si riduce il massimo diametro per evitare che la svuotatura fallisca
|
||||
if Proc.Topology == 'Pocket' or Proc.Topology == 'Tunnel' then
|
||||
dMaxDiameter = 0.9 * dStartDiameter
|
||||
end
|
||||
-- se una sola faccia posso usare un utensile più grande della faccia
|
||||
if Proc.Fct == 1 then
|
||||
dMaxDiameter = 2 * dMaxDiameter
|
||||
@@ -2288,7 +2299,12 @@ local function VerifyPocket( Proc, nFacet, dElev, nRawId)
|
||||
-- se forma ad L posso usare un utensile più grande della faccia
|
||||
local bIsL = ( Proc.Fct == 2 or WL.TestElleShape3( Proc.Id, Proc.Fct) or WL.TestElleShape4( Proc.Id, Proc.Fct) == 2)
|
||||
if bIsL then
|
||||
dMaxDiameter = 2 * dMaxDiameter
|
||||
if Proc.Fct < 4 then
|
||||
dMaxDiameter = 2 * dMaxDiameter
|
||||
-- per tasche chiuse l'utensile non può essere più grande del lato più grande
|
||||
else
|
||||
dMaxDiameter = min( 2 * dMaxDiameter, max( dH, dV))
|
||||
end
|
||||
end
|
||||
-- se forma ad U riduco il diametro se necessario
|
||||
local bIsU = ( Proc.Fct == 3 and not WL.TestElleShape3( Proc.Id, Proc.Fct))
|
||||
@@ -2382,7 +2398,7 @@ local function VerifyPocket( Proc, nFacet, dElev, nRawId)
|
||||
|
||||
-- se tasca chiusa cerco lavorazione con diametro massimo pari a dimensione tasca e riverifico per eventuale doppio
|
||||
if bForceClosedPocket then
|
||||
dMaxDiameter = dStartDiameter
|
||||
dMaxDiameter = 0.9 * dStartDiameter
|
||||
bUseDElevToFindPocketing = true
|
||||
sPocketing = WM.FindPocketing( 'Pocket', dMaxDiameter, dElev, nil, nil, bExcludeNoTipFeed, dDistanceToNearestPart)
|
||||
if not sPocketing then
|
||||
@@ -2511,6 +2527,40 @@ local function MakeByPocketing( Proc, nFacet, nRawId, b3Raw, bCheckQPar)
|
||||
return true, sWarn, sTuuid
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function MakeOneFaceByBlade( Proc, sCutting, idFace)
|
||||
-- inserisco la lavorazione
|
||||
local sName = 'Cut_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId)) .. '_' .. tostring( Proc.Id) .. '_' .. tostring( i)
|
||||
local nMchId = WM.AddMachining( Proc, sName, sCutting)
|
||||
if not nMchId then
|
||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sCutting
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
EgtSetInfo( nMchId, 'Part', Proc.PartId)
|
||||
-- aggiungo geometria
|
||||
EgtSetMachiningGeometry( { { Proc.Id, idFace}})
|
||||
-- percorso da non invertire
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
||||
-- assegno affondamento
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH, 0)
|
||||
-- assegno il lato di lavoro
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
||||
-- assegno l'attacco e l'uscita
|
||||
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_SAW_LI.CENT)
|
||||
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_SAW_LO.CENT)
|
||||
-- nessun criterio per il braccio è necessario
|
||||
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.NONE)
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sErr
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function MakeOneFace( Proc, nRawId, b3Raw)
|
||||
-- dati della faccia
|
||||
@@ -2591,7 +2641,7 @@ local function MakeTwoFaces( Proc, nRawId, b3Raw)
|
||||
-- recupero la lavorazione di taglio con lama e i suoi parametri
|
||||
local sCutting, dSawDiam, dSawThick, dSawMaxDepth = WM.FindCutting( 'Standard')
|
||||
-- se parametro Q abilita lavorazione ribasso con fresa di fianco
|
||||
local _, nUseMillOnSide = EvaluateQParam( Proc)
|
||||
local _, nUseMillOnSide, nUseBlade = EvaluateQParam( Proc)
|
||||
local dMaxZVers, dMinZVers
|
||||
if nUseMillOnSide >= 1 then
|
||||
dMaxZVers = 0.866
|
||||
@@ -2632,183 +2682,184 @@ local function MakeTwoFaces( Proc, nRawId, b3Raw)
|
||||
dMaxZVers = 0.95
|
||||
dMinZVers = 0.1
|
||||
end
|
||||
-- se di fianco in basso
|
||||
if vtN[1]:getZ() < -dMaxZVers or vtN[2]:getZ() < -dMaxZVers then
|
||||
-- cerco la faccia verticale o quasi
|
||||
local nFacet = EgtIf( abs( vtN[1]:getZ()) < dMinZVers, 0, 1)
|
||||
-- cerco nei parametri utensili la nota di affondamento di fianco SIDEDEPTH
|
||||
local dMaxDepthOnSide = 0
|
||||
local dMillDiam = 0
|
||||
local dMillDiamTh = 0
|
||||
if bEnableMillOnSide and EgtMdbSetCurrMachining( sMillOnSide) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
||||
dMillDiamTh = EgtTdbGetCurrToolThDiam() or dMillDiamTh
|
||||
dMaxDepthOnSide = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or dMaxDepthOnSide
|
||||
dMaxDepthOnSide = min( dMaxDepthOnSide, 0.5 * ( dMillDiam - dMillDiamTh))
|
||||
end
|
||||
end
|
||||
local dMaxDist = 300
|
||||
if bEnableMillOnSide and dMaxDepthOnSide > 0 then
|
||||
dMaxDist = dMaxDepthOnSide
|
||||
end
|
||||
-- se vicino al bordo del grezzo e non troppo larga, provo con fresatura di fianco
|
||||
local ptMid = ( ptP1 + ptP2) / 2
|
||||
local bMakeFirstGroove
|
||||
local bMachFromDn = true
|
||||
local bInsertMach
|
||||
local dSideDist
|
||||
-- per evitare errori in casi di pezzi molto stretti, verifico le distanze in base alla direzione della faccia
|
||||
-- se normale verso X
|
||||
if vtN[nFacet+1]:getX() > 0.99 then
|
||||
dSideDist = abs( ptMid:getX() - b3Raw:getMax():getX())
|
||||
-- altrimenti se normale verso X-
|
||||
elseif vtN[nFacet+1]:getX() < -0.99 then
|
||||
dSideDist = abs( ptMid:getX() - b3Raw:getMin():getX())
|
||||
-- altrimenti se normale verso Y+
|
||||
elseif vtN[nFacet+1]:getY() > 0.99 then
|
||||
dSideDist = abs( ptMid:getY() - b3Raw:getMax():getY())
|
||||
-- altrimenti se normale verso Y-
|
||||
elseif vtN[nFacet+1]:getY() < -0.99 then
|
||||
dSideDist = abs( ptMid:getY() - b3Raw:getMin():getY())
|
||||
end
|
||||
if dSideDist and dSideDist < dMaxDist then
|
||||
bInsertMach = true
|
||||
bMakeFirstGroove = false
|
||||
-- altrimenti la distanza è maggiore e se è sempre abilitata la lavorazione MillOnSide
|
||||
elseif bEnableMillOnSide and dMaxDepthOnSide then
|
||||
bInsertMach = true
|
||||
bMakeFirstGroove = true
|
||||
end
|
||||
-- se posso eseguire la lavorazione per distanza inferiore utensile o lavorazione preceduta da sgossatura gola
|
||||
if bInsertMach then
|
||||
return MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, EgtIf( bEnableMillOnSide and dMaxDepthOnSide, sMillOnSide, nil), dMaxDepthOnSide, bMakeFirstGroove, bMachFromDn, dAng, nil, nil, nil, bDoubleMillOnSide)
|
||||
else
|
||||
local sErr = 'Error feature not machinable (dimensions)'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- se altrimenti di fianco in alto
|
||||
elseif vtN[1]:getZ() > dMaxZVers or vtN[2]:getZ() > dMaxZVers then
|
||||
-- cerco la faccia con il maggior numero di adiacenze (e minor elevazione)
|
||||
local nFacInd, _, nFacInd2 = WL.GetFaceWithMostAdj( Proc.Id, Proc.PartId)
|
||||
if nFacInd == -2 then
|
||||
local sErr = 'Error feature with 2 faces with undercut'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
local vtNTemp = EgtSurfTmFacetNormVersor( Proc.Id, nFacInd, GDB_ID.ROOT)
|
||||
local dSideDist
|
||||
local ptMid = ( ptP1 + ptP2) / 2
|
||||
-- faccia orizzontale
|
||||
local nFacet = EgtIf( vtNTemp:getZ() >= WD.NZ_MINA, nFacInd, nFacInd2)
|
||||
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nFacet, GDB_ID.ROOT)
|
||||
-- faccia verticale
|
||||
local nFacetVert = EgtIf( nFacet == nFacInd, nFacInd2, nFacInd)
|
||||
local vtNV = EgtSurfTmFacetNormVersor( Proc.Id, nFacetVert, GDB_ID.ROOT)
|
||||
-- per evitare errori in casi di pezzi molto stretti, verifico le distanze in base alla direzione della faccia
|
||||
-- local dSideDist = min( abs( ptMid:getX() - b3Raw:getMin():getX()), abs( ptMid:getX() - b3Raw:getMax():getX()),
|
||||
-- abs( ptMid:getY() - b3Raw:getMin():getY()), abs( ptMid:getY() - b3Raw:getMax():getY()))
|
||||
-- se normale verso X
|
||||
if vtNV:getX() > 0.99 then
|
||||
dSideDist = abs( ptMid:getX() - b3Raw:getMax():getX())
|
||||
-- altrimenti se normale verso X-
|
||||
elseif vtNV:getX() < -0.99 then
|
||||
dSideDist = abs( ptMid:getX() - b3Raw:getMin():getX())
|
||||
-- altrimenti se normale verso Y+
|
||||
elseif vtNV:getY() > 0.99 then
|
||||
dSideDist = abs( ptMid:getY() - b3Raw:getMax():getY())
|
||||
-- altrimenti se normale verso Y-
|
||||
elseif vtNV:getY() < -0.99 then
|
||||
dSideDist = abs( ptMid:getY() - b3Raw:getMin():getY())
|
||||
end
|
||||
-- cerco nei parametri utensili la nota di affondamento di fianco SIDEDEPTH
|
||||
local dMaxDepthOnSide = 0
|
||||
local dMillDiam = 0
|
||||
if bEnableMillOnSide and EgtMdbSetCurrMachining( sMillOnSide) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
||||
dMaxDepthOnSide = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or dMaxDepthOnSide
|
||||
end
|
||||
end
|
||||
-- 2021.10.08 E.S. in base a richieste del cliente:
|
||||
-- Se parametro Q riduce utilizzo lavorazione di lato come lama ed elevazione laterale supera il 60% diametro utensile
|
||||
-- disabilito
|
||||
if nUseMillOnSide == 2 and dSideDist > 0.6 * dMillDiam then
|
||||
bEnableMillOnSide = false
|
||||
end
|
||||
-- per il fianco in alto non ci sono problemi di inserimento massimo laterale, setto la variabile pari al raggio utensile - 1mm
|
||||
dMaxDepthOnSide = ( 0.5 * dMillDiam) - 1
|
||||
local dMaxDist = 300
|
||||
if bEnableMillOnSide and dMaxDepthOnSide > 0 then
|
||||
dMaxDist = dMaxDepthOnSide
|
||||
end
|
||||
-- se vicino al bordo del grezzo e non troppo larga, provo con fresatura di fianco
|
||||
local bMakeFirstGroove = false
|
||||
local bLikeAsMakeFirstGroove
|
||||
local bMachFromDn = false
|
||||
local bInsertMach
|
||||
if dSideDist and dSideDist < dMaxDist then
|
||||
-- se abilitata SideMill oppure se la specchiata guarda in basso e quindi l'attacco deve essere a filo
|
||||
if ( bEnableMillOnSide and dMaxDepthOnSide > 0) or ( Proc.Double == 2 and Proc.MirrorDeltaZ and abs( Proc.MirrorDeltaZ) > GEO.EPS_SMALL) then
|
||||
bLikeAsMakeFirstGroove = false
|
||||
return MakeSideGrooveByMill( Proc, nFacetVert, nRawId, b3Raw, EgtIf( bEnableMillOnSide and dMaxDepthOnSide, sMillOnSide, nil), dMaxDepthOnSide, bMakeFirstGroove, bMachFromDn, dAng, bLikeAsMakeFirstGroove, nil, nil, bDoubleMillOnSide)
|
||||
else
|
||||
local bOk, sErr, bSideMachiningNotFound = MakeByMill( Proc, nFacet, 1 - nFacet, nRawId, b3Raw, dSideDist)
|
||||
if not bOk and bSideMachiningNotFound then
|
||||
bOk, sErr = MakeByPocketing( Proc, nFacet, nRawId, b3Raw)
|
||||
if nUseBlade == 0 then
|
||||
if vtN[1]:getZ() < -dMaxZVers or vtN[2]:getZ() < -dMaxZVers then
|
||||
-- cerco la faccia verticale o quasi
|
||||
local nFacet = EgtIf( abs( vtN[1]:getZ()) < dMinZVers, 0, 1)
|
||||
-- cerco nei parametri utensili la nota di affondamento di fianco SIDEDEPTH
|
||||
local dMaxDepthOnSide = 0
|
||||
local dMillDiam = 0
|
||||
local dMillDiamTh = 0
|
||||
if bEnableMillOnSide and EgtMdbSetCurrMachining( sMillOnSide) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
||||
dMillDiamTh = EgtTdbGetCurrToolThDiam() or dMillDiamTh
|
||||
dMaxDepthOnSide = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or dMaxDepthOnSide
|
||||
dMaxDepthOnSide = min( dMaxDepthOnSide, 0.5 * ( dMillDiam - dMillDiamTh))
|
||||
end
|
||||
end
|
||||
local dMaxDist = 300
|
||||
if bEnableMillOnSide and dMaxDepthOnSide > 0 then
|
||||
dMaxDist = dMaxDepthOnSide
|
||||
end
|
||||
-- se vicino al bordo del grezzo e non troppo larga, provo con fresatura di fianco
|
||||
local ptMid = ( ptP1 + ptP2) / 2
|
||||
local bMakeFirstGroove
|
||||
local bMachFromDn = true
|
||||
local bInsertMach
|
||||
local dSideDist
|
||||
-- per evitare errori in casi di pezzi molto stretti, verifico le distanze in base alla direzione della faccia
|
||||
-- se normale verso X
|
||||
if vtN[nFacet+1]:getX() > 0.99 then
|
||||
dSideDist = abs( ptMid:getX() - b3Raw:getMax():getX())
|
||||
-- altrimenti se normale verso X-
|
||||
elseif vtN[nFacet+1]:getX() < -0.99 then
|
||||
dSideDist = abs( ptMid:getX() - b3Raw:getMin():getX())
|
||||
-- altrimenti se normale verso Y+
|
||||
elseif vtN[nFacet+1]:getY() > 0.99 then
|
||||
dSideDist = abs( ptMid:getY() - b3Raw:getMax():getY())
|
||||
-- altrimenti se normale verso Y-
|
||||
elseif vtN[nFacet+1]:getY() < -0.99 then
|
||||
dSideDist = abs( ptMid:getY() - b3Raw:getMin():getY())
|
||||
end
|
||||
if dSideDist and dSideDist < dMaxDist then
|
||||
bInsertMach = true
|
||||
bMakeFirstGroove = false
|
||||
-- altrimenti la distanza è maggiore e se è sempre abilitata la lavorazione MillOnSide
|
||||
elseif bEnableMillOnSide and dMaxDepthOnSide then
|
||||
bInsertMach = true
|
||||
bMakeFirstGroove = true
|
||||
end
|
||||
-- se posso eseguire la lavorazione per distanza inferiore utensile o lavorazione preceduta da sgossatura gola
|
||||
if bInsertMach then
|
||||
return MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, EgtIf( bEnableMillOnSide and dMaxDepthOnSide, sMillOnSide, nil), dMaxDepthOnSide, bMakeFirstGroove, bMachFromDn, dAng, nil, nil, nil, bDoubleMillOnSide)
|
||||
else
|
||||
local sErr = 'Error feature not machinable (dimensions)'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- se altrimenti di fianco in alto
|
||||
elseif vtN[1]:getZ() > dMaxZVers or vtN[2]:getZ() > dMaxZVers then
|
||||
-- cerco la faccia con il maggior numero di adiacenze (e minor elevazione)
|
||||
local nFacInd, _, nFacInd2 = WL.GetFaceWithMostAdj( Proc.Id, Proc.PartId)
|
||||
if nFacInd == -2 then
|
||||
local sErr = 'Error feature with 2 faces with undercut'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
local vtNTemp = EgtSurfTmFacetNormVersor( Proc.Id, nFacInd, GDB_ID.ROOT)
|
||||
local dSideDist
|
||||
local ptMid = ( ptP1 + ptP2) / 2
|
||||
-- faccia orizzontale
|
||||
local nFacet = EgtIf( vtNTemp:getZ() >= WD.NZ_MINA, nFacInd, nFacInd2)
|
||||
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nFacet, GDB_ID.ROOT)
|
||||
-- faccia verticale
|
||||
local nFacetVert = EgtIf( nFacet == nFacInd, nFacInd2, nFacInd)
|
||||
local vtNV = EgtSurfTmFacetNormVersor( Proc.Id, nFacetVert, GDB_ID.ROOT)
|
||||
-- per evitare errori in casi di pezzi molto stretti, verifico le distanze in base alla direzione della faccia
|
||||
-- local dSideDist = min( abs( ptMid:getX() - b3Raw:getMin():getX()), abs( ptMid:getX() - b3Raw:getMax():getX()),
|
||||
-- abs( ptMid:getY() - b3Raw:getMin():getY()), abs( ptMid:getY() - b3Raw:getMax():getY()))
|
||||
-- se normale verso X
|
||||
if vtNV:getX() > 0.99 then
|
||||
dSideDist = abs( ptMid:getX() - b3Raw:getMax():getX())
|
||||
-- altrimenti se normale verso X-
|
||||
elseif vtNV:getX() < -0.99 then
|
||||
dSideDist = abs( ptMid:getX() - b3Raw:getMin():getX())
|
||||
-- altrimenti se normale verso Y+
|
||||
elseif vtNV:getY() > 0.99 then
|
||||
dSideDist = abs( ptMid:getY() - b3Raw:getMax():getY())
|
||||
-- altrimenti se normale verso Y-
|
||||
elseif vtNV:getY() < -0.99 then
|
||||
dSideDist = abs( ptMid:getY() - b3Raw:getMin():getY())
|
||||
end
|
||||
-- cerco nei parametri utensili la nota di affondamento di fianco SIDEDEPTH
|
||||
local dMaxDepthOnSide = 0
|
||||
local dMillDiam = 0
|
||||
if bEnableMillOnSide and EgtMdbSetCurrMachining( sMillOnSide) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
||||
dMaxDepthOnSide = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or dMaxDepthOnSide
|
||||
end
|
||||
end
|
||||
-- 2021.10.08 E.S. in base a richieste del cliente:
|
||||
-- Se parametro Q riduce utilizzo lavorazione di lato come lama ed elevazione laterale supera il 60% diametro utensile
|
||||
-- disabilito
|
||||
if nUseMillOnSide == 2 and dSideDist > 0.6 * dMillDiam then
|
||||
bEnableMillOnSide = false
|
||||
end
|
||||
-- per il fianco in alto non ci sono problemi di inserimento massimo laterale, setto la variabile pari al raggio utensile - 1mm
|
||||
dMaxDepthOnSide = ( 0.5 * dMillDiam) - 1
|
||||
local dMaxDist = 300
|
||||
if bEnableMillOnSide and dMaxDepthOnSide > 0 then
|
||||
dMaxDist = dMaxDepthOnSide
|
||||
end
|
||||
-- se vicino al bordo del grezzo e non troppo larga, provo con fresatura di fianco
|
||||
local bMakeFirstGroove = false
|
||||
local bLikeAsMakeFirstGroove
|
||||
local bMachFromDn = false
|
||||
local bInsertMach
|
||||
if dSideDist and dSideDist < dMaxDist then
|
||||
-- se abilitata SideMill oppure se la specchiata guarda in basso e quindi l'attacco deve essere a filo
|
||||
if ( bEnableMillOnSide and dMaxDepthOnSide > 0) or ( Proc.Double == 2 and Proc.MirrorDeltaZ and abs( Proc.MirrorDeltaZ) > GEO.EPS_SMALL) then
|
||||
bLikeAsMakeFirstGroove = false
|
||||
return MakeSideGrooveByMill( Proc, nFacetVert, nRawId, b3Raw, EgtIf( bEnableMillOnSide and dMaxDepthOnSide, sMillOnSide, nil), dMaxDepthOnSide, bMakeFirstGroove, bMachFromDn, dAng, bLikeAsMakeFirstGroove, nil, nil, bDoubleMillOnSide)
|
||||
else
|
||||
local bOk, sErr, bSideMachiningNotFound = MakeByMill( Proc, nFacet, 1 - nFacet, nRawId, b3Raw, dSideDist)
|
||||
if not bOk and bSideMachiningNotFound then
|
||||
bOk, sErr = MakeByPocketing( Proc, nFacet, nRawId, b3Raw)
|
||||
end
|
||||
-- se angolo ottuso riprendo il lato quasi verticale
|
||||
if bOk and dAng and dAng > -90 + 10 * GEO.EPS_SMALL then
|
||||
local bOk2, sErr2 = MakeSideGrooveByMill( Proc, nFacetVert, nRawId, b3Raw, EgtIf( bEnableMillOnSide and dMaxDepthOnSide, sMillOnSide, nil), dMaxDepthOnSide, bMakeFirstGroove, bMachFromDn, dAng, false, nil, true)
|
||||
end
|
||||
return bOk, sErr
|
||||
end
|
||||
elseif bEnableMillOnSide and dMaxDepthOnSide > 0 then
|
||||
bLikeAsMakeFirstGroove = true
|
||||
local bOk, sErr = MakeSideGrooveByMill( Proc, nFacetVert, nRawId, b3Raw, EgtIf( bEnableMillOnSide and dMaxDepthOnSide, sMillOnSide, nil), dMaxDepthOnSide, bMakeFirstGroove, bMachFromDn, dAng, bLikeAsMakeFirstGroove, nil, nil, bDoubleMillOnSide)
|
||||
if bOk then return true end
|
||||
end
|
||||
-- se non inclinate o capacità di taglio non sufficiente o non molto grandi (80mm), provo con contornatura o svuotatura
|
||||
if vtN:getZ() > 0.866 or vtNV:getZ() > 0.866 or not sCutting or dSawMaxDepth < dDimY[1] + WD.CUT_SIC or dSawMaxDepth < dDimY[2] + WD.CUT_SIC or dDimY[1] < 80 or dDimY[2] < 80 then
|
||||
-- eseguo la svuotatura
|
||||
local bOk, sErr, sTuuid = MakeByPocketing( Proc, nFacet, nRawId, b3Raw)
|
||||
-- se angolo ottuso riprendo il lato quasi verticale
|
||||
if bOk and dAng and dAng > -90 + 10 * GEO.EPS_SMALL then
|
||||
local bOk2, sErr2 = MakeSideGrooveByMill( Proc, nFacetVert, nRawId, b3Raw, EgtIf( bEnableMillOnSide and dMaxDepthOnSide, sMillOnSide, nil), dMaxDepthOnSide, bMakeFirstGroove, bMachFromDn, dAng, false, nil, true)
|
||||
local _, dHVert, dVVert = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacetVert, GDB_ID.ROOT)
|
||||
local dDepth = min( dHVert, dVVert)
|
||||
local _, dHHor, dVHor = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacet, GDB_ID.ROOT)
|
||||
local dDiam = 2 * min( dHHor, dVHor)
|
||||
local sMillObtuseAngle = WM.FindMilling( 'FreeContour', dDepth, sTuuid, nil, dDiam, nil, nil, nil)
|
||||
if not sMillObtuseAngle then
|
||||
sMillObtuseAngle = WM.FindMilling( 'FreeContour', dDepth, nil, nil, dDiam, nil, nil, nil)
|
||||
end
|
||||
if not sMillObtuseAngle then
|
||||
local sErrMillNotFound = 'Error : Processing to finish obtuse angle not found in library'
|
||||
EgtOutLog( sErrMillNotFound)
|
||||
return true, sErrMillNotFound
|
||||
end
|
||||
local bOk2, sErr2 = MakeSideGrooveByMill( Proc, nFacetVert, nRawId, b3Raw, sMillObtuseAngle, dMaxDepthOnSide, bMakeFirstGroove, bMachFromDn, dAng, false, nil, true)
|
||||
end
|
||||
return bOk, sErr
|
||||
end
|
||||
elseif bEnableMillOnSide and dMaxDepthOnSide > 0 then
|
||||
bLikeAsMakeFirstGroove = true
|
||||
local bOk, sErr = MakeSideGrooveByMill( Proc, nFacetVert, nRawId, b3Raw, EgtIf( bEnableMillOnSide and dMaxDepthOnSide, sMillOnSide, nil), dMaxDepthOnSide, bMakeFirstGroove, bMachFromDn, dAng, bLikeAsMakeFirstGroove, nil, nil, bDoubleMillOnSide)
|
||||
if bOk then return true end
|
||||
end
|
||||
-- se non inclinate o capacità di taglio non sufficiente o non molto grandi (80mm), provo con contornatura o svuotatura
|
||||
if vtN:getZ() > 0.866 or vtNV:getZ() > 0.866 or not sCutting or dSawMaxDepth < dDimY[1] + WD.CUT_SIC or dSawMaxDepth < dDimY[2] + WD.CUT_SIC or dDimY[1] < 80 or dDimY[2] < 80 then
|
||||
-- eseguo la svuotatura
|
||||
local bOk, sErr, sTuuid = MakeByPocketing( Proc, nFacet, nRawId, b3Raw)
|
||||
-- se angolo ottuso riprendo il lato quasi verticale
|
||||
if bOk and dAng and dAng > -90 + 10 * GEO.EPS_SMALL then
|
||||
local _, dHVert, dVVert = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacetVert, GDB_ID.ROOT)
|
||||
local dDepth = min( dHVert, dVVert)
|
||||
local _, dHHor, dVHor = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacet, GDB_ID.ROOT)
|
||||
local dDiam = 2 * min( dHHor, dVHor)
|
||||
local sMillObtuseAngle = WM.FindMilling( 'FreeContour', dDepth, sTuuid, nil, dDiam, nil, nil, nil)
|
||||
if not sMillObtuseAngle then
|
||||
sMillObtuseAngle = WM.FindMilling( 'FreeContour', dDepth, nil, nil, dDiam, nil, nil, nil)
|
||||
end
|
||||
if not sMillObtuseAngle then
|
||||
local sErrMillNotFound = 'Error : Processing to finish obtuse angle not found in library'
|
||||
EgtOutLog( sErrMillNotFound)
|
||||
return true, sErrMillNotFound
|
||||
end
|
||||
local bOk2, sErr2 = MakeSideGrooveByMill( Proc, nFacetVert, nRawId, b3Raw, sMillObtuseAngle, dMaxDepthOnSide, bMakeFirstGroove, bMachFromDn, dAng, false, nil, true)
|
||||
-- se una delle due facce rivolta verso il basso
|
||||
elseif vtN[1]:getZ() < -0.001 or vtN[2]:getZ() < -0.001 then
|
||||
-- cerco la faccia rivolta verso l'alto
|
||||
local nFacet
|
||||
if vtN[1]:getZ() > 0 then
|
||||
nFacet = 0
|
||||
elseif vtN[2]:getZ() > 0 then
|
||||
nFacet = 1
|
||||
else
|
||||
local sErr = 'Error feature with 2 faces facing down'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
return bOk, sErr
|
||||
-- eseguo la svuotatura
|
||||
return MakeByPocketing( Proc, nFacet, nRawId, b3Raw)
|
||||
end
|
||||
-- se una delle due facce rivolta verso il basso
|
||||
elseif vtN[1]:getZ() < -0.001 or vtN[2]:getZ() < -0.001 then
|
||||
-- cerco la faccia rivolta verso l'alto
|
||||
local nFacet
|
||||
if vtN[1]:getZ() > 0 then
|
||||
nFacet = 0
|
||||
elseif vtN[2]:getZ() > 0 then
|
||||
nFacet = 1
|
||||
else
|
||||
local sErr = 'Error feature with 2 faces facing down'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- eseguo la svuotatura
|
||||
return MakeByPocketing( Proc, nFacet, nRawId, b3Raw)
|
||||
end
|
||||
-- ordino i tagli per fare prima quello meno inclinato
|
||||
local nOrd = { 0, 1}
|
||||
@@ -2816,37 +2867,15 @@ local function MakeTwoFaces( Proc, nRawId, b3Raw)
|
||||
nOrd = { 1, 0}
|
||||
end
|
||||
-- eseguo i tagli di lama
|
||||
local bOk, sErr
|
||||
for i = 1, 2 do
|
||||
-- inserisco la lavorazione
|
||||
local sName = 'Cut_' .. ( EgtGetName( Proc.PartId) or tostring( Proc.PartId)) .. '_' .. tostring( Proc.Id) .. '_' .. tostring( i)
|
||||
local nMchId = WM.AddMachining( Proc, sName, sCutting)
|
||||
if not nMchId then
|
||||
local sErr = 'Error adding machining ' .. sName .. '-' .. sCutting
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
EgtSetInfo( nMchId, 'Part', Proc.PartId)
|
||||
-- aggiungo geometria
|
||||
EgtSetMachiningGeometry( { { Proc.Id, nOrd[i]}})
|
||||
-- percorso da non invertire
|
||||
EgtSetMachiningParam( MCH_MP.INVERT, false)
|
||||
-- assegno affondamento
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH, 0)
|
||||
-- assegno il lato di lavoro
|
||||
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
|
||||
-- assegno l'attacco e l'uscita
|
||||
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_SAW_LI.CENT)
|
||||
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_SAW_LO.CENT)
|
||||
-- nessun criterio per il braccio è necessario
|
||||
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.NONE)
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
local _, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nMchId, false)
|
||||
return false, sErr
|
||||
bOk, sErr = MakeOneFaceByBlade( Proc, sCutting, nOrd[i])
|
||||
if not bOk then
|
||||
return bOk, sErr
|
||||
end
|
||||
end
|
||||
return true
|
||||
|
||||
return bOk, sErr
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
@@ -2864,7 +2893,7 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw)
|
||||
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, nFacInd, GDB_ID.ROOT)
|
||||
local _, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacInd, GDB_ID.ROOT)
|
||||
local dMaxSlotThicknessForBlade = 19
|
||||
local bIsSmallSlot = ( Proc.Fct == 3 and ( min( dH, dV) < dMaxSlotThicknessForBlade - 10 * GEO.EPS_SMALL) and vtN:getZ() > -0.01)
|
||||
local bIsSmallSlot = ( Proc.Fct == 3 and ( min( dH, dV) < dMaxSlotThicknessForBlade - 10 * GEO.EPS_SMALL) and ( vtN:getZ() > -0.01) and ( vtN:getZ() < 0.5))
|
||||
-- se di fianco
|
||||
if not bPckt and Proc.Fct >= 3 and ( ( vtN:getZ() < WD.NZ_MINA) or bIsSmallSlot) then
|
||||
-- recupero elevazione faccia in feature
|
||||
@@ -2886,13 +2915,15 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw)
|
||||
-- se ho abilitata lavorazione di fresa di fianco
|
||||
if Proc.Fct >= 3 and sMillOnSide and nUseMillOnSide >= 1 and not bIsSmallSlot then
|
||||
-- cerco nei parametri utensili la nota di affondamento di fianco SIDEDEPTH
|
||||
local dMaxDepthOnSide = 0
|
||||
local dMaxDepthOnSide = 999
|
||||
local dMillDiam = 0
|
||||
local dMillDiamTh = EgtTdbGetCurrToolThDiam() or 60
|
||||
if EgtMdbSetCurrMachining( sMillOnSide) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
|
||||
dMaxDepthOnSide = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or dMaxDepthOnSide
|
||||
dMillDiamTh = EgtTdbGetCurrToolThDiam() or dMillDiamTh
|
||||
dMaxDepthOnSide = min( EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or dMaxDepthOnSide, 0.5 * ( dMillDiam - dMillDiamTh))
|
||||
end
|
||||
end
|
||||
local bMakeFirstGroove
|
||||
@@ -2981,7 +3012,7 @@ local function MakeMoreFaces( Proc, nRawId, b3Raw)
|
||||
else
|
||||
local sErr = 'Side milling not possible'
|
||||
EgtOutLog( sErr)
|
||||
return true, sErr
|
||||
return false, sErr
|
||||
end
|
||||
-- fessura verticale
|
||||
elseif Proc.Stype == 3 then
|
||||
|
||||
+106
-29
@@ -61,26 +61,10 @@ local Variant = require( 'WProcessVariant')
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
-- *** Inserimento delle pareti nel pannello ***
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bNewProcess, nRawOutlineId)
|
||||
|
||||
-- Creazione nuovo gruppo di lavoro
|
||||
if not bMachGroupOk then
|
||||
local sMgName = EgtGetMachGroupNewName( 'Mach')
|
||||
local NewMgId = EgtAddMachGroup( sMgName)
|
||||
if not NewMgId then
|
||||
local sOut = 'Errore nella creazione del gruppo di lavoro ' .. sMgName
|
||||
return false, sOut
|
||||
end
|
||||
end
|
||||
|
||||
-- Impostazione della tavola
|
||||
EgtSetTable( 'Tab')
|
||||
|
||||
local function GetRawOrigAndDeltas()
|
||||
-- Area tavola
|
||||
local b3Tab = EgtGetTableArea()
|
||||
-- Calcolo posizione estremo di riferimento della tavola rispetto a sua origine in BL
|
||||
local OrigOnTab
|
||||
local nCorner
|
||||
local sOrigCorner = WD.ORIG_CORNER or 'BR'
|
||||
local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL
|
||||
if WD.GetOrigCorner then
|
||||
@@ -95,6 +79,8 @@ function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bNewPr
|
||||
local DeltaY = EgtIf( dDeltaYFromBtl > 0, dDeltaYFromBtl, WD.DELTA_Y or 0)
|
||||
local DeltaZ = EgtIf( dDeltaZFromBtl > 0, dDeltaZFromBtl, WD.DELTA_Z or 0)
|
||||
|
||||
local nCorner
|
||||
local OrigOnTab
|
||||
if sOrigCorner == 'TL' then
|
||||
nCorner = MCH_CR.TL
|
||||
OrigOnTab = Point3d( 0 + abs( DeltaX), b3Tab:getDimY() - abs( DeltaY), DeltaZ)
|
||||
@@ -120,6 +106,28 @@ function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bNewPr
|
||||
nCorner = MCH_CR.BL
|
||||
OrigOnTab = Point3d( WD.NEW_REF + abs( DeltaX), abs( DeltaY), DeltaZ)
|
||||
end
|
||||
|
||||
return sOrigCorner, nCorner, OrigOnTab
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bNewProcess, nRawOutlineId)
|
||||
|
||||
-- Creazione nuovo gruppo di lavoro
|
||||
if not bMachGroupOk then
|
||||
local sMgName = EgtGetMachGroupNewName( 'Mach')
|
||||
local NewMgId = EgtAddMachGroup( sMgName)
|
||||
if not NewMgId then
|
||||
local sOut = 'Errore nella creazione del gruppo di lavoro ' .. sMgName
|
||||
return false, sOut
|
||||
end
|
||||
end
|
||||
|
||||
-- Impostazione della tavola
|
||||
EgtSetTable( 'Tab')
|
||||
|
||||
-- Recupero dati posizionamento grezzo
|
||||
local sOrigCorner, nCorner, OrigOnTab = GetRawOrigAndDeltas()
|
||||
-- Impostazione dell'attrezzaggio di default
|
||||
EgtImportSetup()
|
||||
-- Impostazione eventuale allargamento area disponibile per grezzo
|
||||
@@ -175,6 +183,23 @@ function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bNewPr
|
||||
return true
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
function WallExec.MoveRaw()
|
||||
-- Recupero dati posizionamento grezzo
|
||||
local sOrigCorner, nCorner, OrigOnTab = GetRawOrigAndDeltas()
|
||||
-- Recupero identificativo del grezzo
|
||||
local nRaw = EgtGetFirstRawPart() or GDB_ID.NULL
|
||||
-- Posizione iniziale del centro grezzo
|
||||
local ptOriCen = EgtGetRawPartCenter( nRaw)
|
||||
-- Sposto il grezzo
|
||||
EgtMoveToCornerRawPart( nRaw, OrigOnTab, nCorner)
|
||||
EgtSetInfo( nRaw, 'ORIGCORNER', sOrigCorner)
|
||||
-- Posizione finale del centro grezzo
|
||||
local ptNewCen = EgtGetRawPartCenter( nRaw)
|
||||
-- Restituisco flag di movimento
|
||||
return not AreSamePointApprox( ptOriCen, ptNewCen)
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
-- *** Inserimento delle lavorazioni nelle pareti ***
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
@@ -303,7 +328,8 @@ local function ClassifyFeatures( vProc, b3Raw)
|
||||
if not bOk then Proc.Flg = 0 end
|
||||
-- se foratura
|
||||
elseif Drill.Identify( Proc) then
|
||||
local bOk = Drill.Classify( Proc, b3Raw)
|
||||
local bUseMultiDrill = WD.USE_MULTI_DRILL or false
|
||||
local bOk = Drill.Classify( Proc, b3Raw, bUseMultiDrill)
|
||||
if not bOk then Proc.Flg = 0 end
|
||||
-- se mortasatura
|
||||
elseif Mortise.Identify( Proc) then
|
||||
@@ -383,7 +409,8 @@ local function AddFeatureMachining( Proc, nRawId, b3Raw, vNLO, b3Squaring)
|
||||
-- se foratura ( 3/4-040-X)
|
||||
elseif Drill.Identify( Proc) then
|
||||
-- esecuzione foratura
|
||||
bOk, sErr = Drill.Make( Proc, nRawId, b3Raw)
|
||||
local bUseMultiDrill = WD.USE_MULTI_DRILL or false
|
||||
bOk, sErr = Drill.Make( Proc, nRawId, b3Raw, bUseMultiDrill)
|
||||
-- se mortasatura (3/4-050-X) o similari
|
||||
elseif Mortise.Identify( Proc) then
|
||||
-- esecuzione mortasatura
|
||||
@@ -536,7 +563,7 @@ local function SortMach( nPhase, PrevMch, nPartId, nType, StartNames, bExistName
|
||||
end
|
||||
|
||||
if bByTool then
|
||||
function ToolCompare(a,b)
|
||||
local function ToolCompare(a,b)
|
||||
if a.ToolType < b.ToolType then
|
||||
return true
|
||||
elseif a.ToolType == b.ToolType then
|
||||
@@ -579,7 +606,7 @@ local function SortMach( nPhase, PrevMch, nPartId, nType, StartNames, bExistName
|
||||
end
|
||||
end
|
||||
|
||||
table.sort(TabCut, ToolCompare)
|
||||
table.sort( TabCut, ToolCompare)
|
||||
-- table.sort(TabCut, function(a,b) return a.ToolType < b.ToolType and a.ToolDiam > b.ToolDiam and a.Tool < b.Tool end)
|
||||
local SupportTabCut = {}
|
||||
local nPrevTUUID = 0
|
||||
@@ -667,7 +694,7 @@ end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
-- setto la rimozione sfridi dopo le lavorazioni di outline
|
||||
function InsertScrapRemoval( nPhase)
|
||||
local function InsertScrapRemoval( nPhase)
|
||||
local nCurrentOperationId = EgtGetNextOperation( EgtGetPhaseDisposition( nPhase))
|
||||
local nActiveMachiningId = EgtGetCurrMachining()
|
||||
while nCurrentOperationId do
|
||||
@@ -1086,6 +1113,30 @@ local function SetMirroredOperations()
|
||||
end
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function GetFeatureInfoAndDependency( vProc)
|
||||
-- ciclo tutte le feature
|
||||
for i = 1, #vProc do
|
||||
local Proc = vProc[i]
|
||||
-- controllo la feature con tutte le altre per recuperare le dipendenze
|
||||
for j = 1, #vProc do
|
||||
local ProcB = vProc[j]
|
||||
-- se non è la stessa feature
|
||||
if Proc.Id ~= ProcB.Id then
|
||||
-- raggruppamento fori per eventuale Multidrill
|
||||
if WD.USE_MULTI_DRILL and Drill.Identify( Proc) and Proc.Flg ~= 0 and Drill.Identify( ProcB) and ProcB.Flg ~= 0 then
|
||||
if not Proc.OtherGeometries then
|
||||
Proc.OtherGeometries = {}
|
||||
end
|
||||
table.insert( Proc.OtherGeometries, ProcB)
|
||||
ProcB.Flg = 0
|
||||
ProcB.bGrouped = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function CalculateSquaring( sSquaringTool, RawPart, vPart)
|
||||
local dRawPartHeight = RawPart.b3:getDimZ()
|
||||
@@ -1127,11 +1178,27 @@ local function AddSquaring( SquaringParameters, b3Squaring)
|
||||
return false, sMsg
|
||||
end
|
||||
|
||||
Squaring.AddScrapRemoval( nFirstOperationId)
|
||||
-- se presenti altre lavorazioni, prima di queste va eseguita la pulizia sfridi
|
||||
if nFirstOperationId then
|
||||
Squaring.AddScrapRemoval( nFirstOperationId)
|
||||
end
|
||||
|
||||
return true, sMsg
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function AddFeatureStats( Stats, bOk, sMsg, nCutId, nTaskId)
|
||||
if not bOk then
|
||||
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId = nCutId, TaskId = nTaskId})
|
||||
elseif sMsg and #sMsg > 0 then
|
||||
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=0, CutId = nCutId, TaskId = nTaskId})
|
||||
else
|
||||
table.insert( Stats, {Err=0, Msg='', Rot=0, CutId = nCutId, TaskId = nTaskId})
|
||||
end
|
||||
|
||||
return Stats
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
function WallExec.ProcessFeatures()
|
||||
-- errori e stato
|
||||
@@ -1185,6 +1252,7 @@ function WallExec.ProcessFeatures()
|
||||
bOk, SquaringParameters, b3Squaring, sMsg = CalculateSquaring( 'Mill', RawPart, vPart)
|
||||
end
|
||||
|
||||
-- TODO sostituire con funzione
|
||||
if not bOk then
|
||||
nTotErr = nTotErr + 1
|
||||
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=0, TaskId=0})
|
||||
@@ -1202,6 +1270,8 @@ function WallExec.ProcessFeatures()
|
||||
local vPartProc = WallExec.CollectFeatures( vPart[i].Id, b3Raw, b3Squaring)
|
||||
vProc = EgtJoinTables( vProc, vPartProc)
|
||||
end
|
||||
-- recupero informazioni ausiliarie feature e dipendenze tra feature stesse
|
||||
GetFeatureInfoAndDependency( vProc)
|
||||
-- classifico topologicamente le feature
|
||||
ClassifyTopology( vProc, nRawId)
|
||||
-- classifico le feature
|
||||
@@ -1229,13 +1299,19 @@ function WallExec.ProcessFeatures()
|
||||
local bOk, sMsg = AddFeatureMachining( Proc, nRawId, b3Raw, vNLO, b3Squaring)
|
||||
if not bOk then
|
||||
nTotErr = nTotErr + 1
|
||||
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
||||
elseif sMsg and #sMsg > 0 then
|
||||
table.insert( Stats, {Err=-1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
||||
else
|
||||
table.insert( Stats, {Err=0, Msg='', Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
||||
end
|
||||
elseif not Proc.Double and not Proc.LockOut then
|
||||
-- output statistiche feature
|
||||
Stats = AddFeatureStats( Stats, bOk, sMsg, Proc.CutId, Proc.TaskId)
|
||||
-- output statistiche in caso di più feature lavorate nella stessa Proc
|
||||
if Proc.OtherGeometries and #Proc.OtherGeometries > 0 then
|
||||
for j = 1, #Proc.OtherGeometries do
|
||||
Stats = AddFeatureStats( Stats, Proc.OtherGeometries[j].bOk, Proc.OtherGeometries[j].sMsg, Proc.OtherGeometries[j].CutId, Proc.OtherGeometries[j].TaskId)
|
||||
if not Proc.OtherGeometries[j].bOk then
|
||||
nTotErr = nTotErr + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif not Proc.Double and not Proc.LockOut and not Proc.bGrouped then
|
||||
local sMsg = 'Feature not machinable by orientation'
|
||||
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
|
||||
end
|
||||
@@ -1330,6 +1406,7 @@ function WallExec.ProcessFeatures()
|
||||
if SquaringParameters and next( SquaringParameters) ~= nil then
|
||||
local bOk, sMsg = AddSquaring( SquaringParameters, b3Squaring)
|
||||
|
||||
-- TODO sostituire con funzione
|
||||
if not bOk then
|
||||
nTotErr = nTotErr + 1
|
||||
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=0, TaskId=0})
|
||||
|
||||
+29
-30
@@ -1629,7 +1629,7 @@ local function AddParts(RawParts, vPartsDoneManually)
|
||||
if bOnEdge or bOnAngle then
|
||||
local nBoxLayerId = EgtGetFirstNameInGroup( nPartId, "Box")
|
||||
local nBoxId = EgtGetFirstNameInGroup( nBoxLayerId, "Box")
|
||||
local b3Part = EgtGetBBoxGlob(nBoxId, GDB_BB.STANDARD)
|
||||
local b3Part = EgtGetBBoxGlob(nBoxId, GDB_BB.STANDARD)
|
||||
|
||||
-- punto di riferimento sul pezzo
|
||||
local ptRef
|
||||
@@ -1807,40 +1807,39 @@ if bNestingOk then
|
||||
end
|
||||
end
|
||||
|
||||
-- aggiungo pezzi nestati a mano
|
||||
nPartCount = 0
|
||||
for nInd = 1, #vDoneManually do
|
||||
if vDoneManually[nInd].SheetId == nId then
|
||||
vDoneManually[nInd].Done = 1
|
||||
for nInd2 = 1, #(vDoneManually[nInd].Parts) do
|
||||
nPartCount = nPartCount + 1
|
||||
local nPartDuploId = EgtDuploNew( vDoneManually[nInd].Parts[nInd2].Id)
|
||||
|
||||
-- aggiungo le curve corrispondenti alle aree di lavorazione del pezzo
|
||||
local sToolOutlines = EgtGetInfo( vDoneManually[nInd].Parts[nInd2].Id, "ToolOutlines", 's')
|
||||
if sToolOutlines then
|
||||
-- recupero o creo il gruppo per gli outlines
|
||||
local nToolOutlinesGrp = EgtGetFirstNameInGroup( nPartDuploId, "ToolOutlines")
|
||||
if not nToolOutlinesGrp then
|
||||
nToolOutlinesGrp = EgtGroup( nPartDuploId)
|
||||
EgtSetName( nToolOutlinesGrp, "ToolOutlines")
|
||||
EgtSetStatus( nToolOutlinesGrp, GDB_ST.ON)
|
||||
end
|
||||
|
||||
for str in string.gmatch(sToolOutlines, "([^"..",".."]+)") do
|
||||
EgtCopyGlob( tonumber(str), nToolOutlinesGrp)
|
||||
-- aggiungo pezzi nestati a mano
|
||||
nPartCount = 0
|
||||
for nInd = 1, #vDoneManually do
|
||||
if vDoneManually[nInd].SheetId == nId then
|
||||
vDoneManually[nInd].Done = 1
|
||||
for nInd2 = 1, #(vDoneManually[nInd].Parts) do
|
||||
nPartCount = nPartCount + 1
|
||||
local nPartDuploId = EgtDuploNew( vDoneManually[nInd].Parts[nInd2].Id)
|
||||
|
||||
-- aggiungo le curve corrispondenti alle aree di lavorazione del pezzo
|
||||
local sToolOutlines = EgtGetInfo( vDoneManually[nInd].Parts[nInd2].Id, "ToolOutlines", 's')
|
||||
if sToolOutlines then
|
||||
-- recupero o creo il gruppo per gli outlines
|
||||
local nToolOutlinesGrp = EgtGetFirstNameInGroup( nPartDuploId, "ToolOutlines")
|
||||
if not nToolOutlinesGrp then
|
||||
nToolOutlinesGrp = EgtGroup( nPartDuploId)
|
||||
EgtSetName( nToolOutlinesGrp, "ToolOutlines")
|
||||
EgtSetStatus( nToolOutlinesGrp, GDB_ST.ON)
|
||||
end
|
||||
|
||||
for str in string.gmatch(sToolOutlines, "([^"..",".."]+)") do
|
||||
EgtCopyGlob( tonumber(str), nToolOutlinesGrp)
|
||||
end
|
||||
end
|
||||
|
||||
-- applico flip, rotazione e traslazione pezzo e box da nesting
|
||||
EgtSetInfo( nMachGroup, "PART" .. nPartCount, nPartDuploId .. "," .. EgtNumToString( vDoneManually[nInd].Parts[nInd2].posX, 3) .. "," .. EgtNumToString( vDoneManually[nInd].Parts[nInd2].posY, 3) .. "," .. 0 .."," .. 0)
|
||||
EgtSetInfo( nPartDuploId, "POSX", vDoneManually[nInd].Parts[nInd2].posX)
|
||||
EgtSetInfo( nPartDuploId, "POSY", vDoneManually[nInd].Parts[nInd2].posY)
|
||||
end
|
||||
|
||||
-- applico flip, rotazione e traslazione pezzo e box da nesting
|
||||
EgtSetInfo( nMachGroup, "PART" .. nPartCount, nPartDuploId .. "," .. EgtNumToString( vDoneManually[nInd].Parts[nInd2].posX, 3) .. "," .. EgtNumToString( vDoneManually[nInd].Parts[nInd2].posY, 3) .. "," .. 0 .."," .. 0)
|
||||
EgtSetInfo( nPartDuploId, "POSX", vDoneManually[nInd].Parts[nInd2].posX)
|
||||
EgtSetInfo( nPartDuploId, "POSY", vDoneManually[nInd].Parts[nInd2].posY)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
-- altrimenti pezzo
|
||||
else
|
||||
|
||||
@@ -1,5 +1,50 @@
|
||||
==== Wall Update Log ====
|
||||
|
||||
Versione 2.7g2 (17/07/2025)
|
||||
- Added : aggiunta gestione origine e offset da questa che non fanno riprocessare l'intero grezzo (ma solo aggiornare)
|
||||
- Fixed : corretta BatchProcess per nome file anche se da non riprocessare.
|
||||
|
||||
Versione 2.7g1 (09/07/2025)
|
||||
- Fixed : in FreeContour corretta scelta del lato da lavorare in caso si abbiano lati inclinati
|
||||
|
||||
Versione 2.7f2 (06/06/2025)
|
||||
- Fixed : in Lapjoint migliorie alle svuotature
|
||||
|
||||
Versione 2.7f1 (05/06/2025)
|
||||
- Added : gestita forzatura freecontour di fresa per macchine senza lama (costante WallData FORCE_MILL_CONTOUR)
|
||||
- Modif : migliorata DoubleCut
|
||||
- Fixed : corretta BatchProcess per caso in cui il nome del file cnc generato non era corretto
|
||||
|
||||
Versione 2.7d1 (14/04/2025)
|
||||
- Added : in DoubleCut aggiunta Q06 per forzare utilizzo lama
|
||||
|
||||
Versione 2.7b1 (03/03/2025)
|
||||
- Added : gestione multidrill
|
||||
|
||||
Versione 2.7a2 (23/01/2025)
|
||||
- Fixed : in Ts7 corretto un problema che portava a rotazioni errate, introdotto con 2.7a1
|
||||
- Fixed : in squadratura piccole correzioni
|
||||
|
||||
Versione 2.7a1 (21/01/2025)
|
||||
- Modif : in Ts7 aggiunta scrittura id progetto e produzione in Btm
|
||||
|
||||
Versione 2.6l1 (11/12/2024)
|
||||
- Modif : modificato il calcolo feature passante per gorge
|
||||
- Modif : in pulizia spigoli si riporta correttamente la collisione sulla feature specifica
|
||||
- Fixed : in pulizia spigoli correzioni varie
|
||||
- Fixed : in LapJoint correzioni varie
|
||||
|
||||
Versione 2.6k3 (27/11/2024)
|
||||
- Modif : migliorato calcolo approccio e retrazione in Sidemill/Sidegroove
|
||||
|
||||
Versione 2.6k2 (19/11/2024)
|
||||
- Modif : in Nesting riportata allo stato precedente la tolleranza posizionamento pannelli sul bordo
|
||||
|
||||
Versione 2.6k1 (14/11/2024)
|
||||
- Added : aggiunta squadratura master panel
|
||||
- Modif : L010 si inseriscono con lama anche se il percorso è breve
|
||||
- Fixed : in Nesting corretto errore in posizionamento pannelli che devono stare necessariamente sul bordo della tavola
|
||||
|
||||
Versione 2.6j2 (04/11/2024)
|
||||
- Modif : Modificato limite dimensione tasca per utilizzo lama come SideGroove
|
||||
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
-- Version.lua by Egalware s.r.l. 2024/08/20
|
||||
-- Version.lua by Egalware s.r.l. 2025/07/17
|
||||
-- Gestione della versione di Wall
|
||||
|
||||
NAME = 'Wall'
|
||||
VERSION = '2.6j2'
|
||||
MIN_EXE = '2.6h1'
|
||||
VERSION = '2.7g2'
|
||||
MIN_EXE = '2.7f2'
|
||||
|
||||
Reference in New Issue
Block a user