DataWall :
- possibilità di fresature parziali su FreeContour se impossibili fresature complete e sega a catena.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
-- 2022/03/14 Corretto riconoscimento lato esterno per percorsi aperti.
|
||||
-- 2022/03/16 Ulteriore modifica per riconoscimento lato esterno (aggiunto uso vExtr a GetFacesExternalSide).
|
||||
-- 2022/04/03 Correzioni e modifiche per pulitura spigoli tipo 2 e 3.
|
||||
-- 2022/04/19 Aggiunta passibilita' fresatura ad affondamento ridotto quando non possibile completa o sega a catena.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local WPF = {}
|
||||
@@ -1919,8 +1920,9 @@ local function MakeByCut( Proc, nRawId, b3Raw)
|
||||
local sSawing = WM.FindSawing( 'Sawing')
|
||||
-- recupero la lavorazione di fresatura
|
||||
local sMilling, dMillMaxDepth = WM.FindMilling( 'FreeContour', dMaxWidth + WD.CUT_EXTRA, nil, nil, nil, nil, true)
|
||||
local sMilling2 = WM.FindMilling( 'FreeContour', nil, nil, nil, nil, nil, true)
|
||||
if not sMilling and ( not sSawing or bSlanting) then
|
||||
sMilling = WM.FindMilling( 'FreeContour', nil, nil, nil, nil, nil, true)
|
||||
sMilling = sMilling2
|
||||
if not sMilling then
|
||||
local sErr = 'Error : milling not found in library'
|
||||
EgtOutLog( sErr)
|
||||
@@ -1928,9 +1930,73 @@ local function MakeByCut( Proc, nRawId, b3Raw)
|
||||
end
|
||||
end
|
||||
-- se possibile, inserimento delle fresature
|
||||
local bDone = false
|
||||
if sMilling then
|
||||
local nMlOk, sMlErr, dThick = AddMillings( sMilling, vFace, Proc, nRawId, b3Raw, nConeCut, nAddGrpId)
|
||||
if nMlOk == 0 then return false, sMlErr end
|
||||
bDone = ( dThick ~= nil)
|
||||
-- se ci sono almeno due facce e lavorato almeno un angolo
|
||||
if Proc.Fct >= 2 and bDone then
|
||||
-- se abilitata la lavorazione corner con stop macchina e lavorazione precedente passante e spessore sotto il limite
|
||||
-- o con fresa cono piccola e spessore sotto il limite
|
||||
if ( nConeCut == 1 and nMlOk == 1 and dThick <= ( WD.MAX_CLEAN_CRN60 + 20 * GEO.EPS_SMALL)) or
|
||||
( nConeCut == 2 and dThick <= ( WD.MAX_CLEAN_CRN30 + 20 * GEO.EPS_SMALL)) then
|
||||
local bMcok, sMcErr = AddMillCorner( nConeCut, vFace, Proc, nRawId, b3Raw,
|
||||
sMlErr, nAddGrpId, dThick, nNewProc, 0,
|
||||
true)
|
||||
if not bMcok then return bMcok, sMcErr end
|
||||
else
|
||||
-- messaggi nel log
|
||||
if nConeCut == 1 then
|
||||
if nMlOk ~= 1 then
|
||||
local sErr = 'Clean corner 60° not applid because Milling not thru the thickness'
|
||||
EgtOutLog( sErr)
|
||||
else
|
||||
local sErr = 'Clean corner 60° not applid because thickness: ' .. EgtNumToString( dThick, 2) ..
|
||||
' is bigger than parameter MAX_CLEAN_CRN60: ' .. EgtNumToString( WD.MAX_CLEAN_CRN60 , 2)
|
||||
EgtOutLog( sErr)
|
||||
end
|
||||
elseif nConeCut == 2 then
|
||||
local sErr = 'Clean corner 30° not applid because thickness: ' .. EgtNumToString( dThick, 2) ..
|
||||
' is bigger than parameter MAX_CLEAN_CRN30: ' .. EgtNumToString( WD.MAX_CLEAN_CRN30 , 2)
|
||||
EgtOutLog( sErr)
|
||||
end
|
||||
end
|
||||
end
|
||||
-- altrimenti provo con la sega a catena
|
||||
elseif sSawing then
|
||||
local nCsOk, sCSErr, dThick = AddSawings( sSawing, vFace, Proc, nRawId, b3Raw)
|
||||
if nCsOk == 0 then return false, sCsErr end
|
||||
bDone = ( dThick ~= nil)
|
||||
-- se ci sono almeno due facce e lavorato almeno un angolo
|
||||
if Proc.Fct >= 2 and bDone then
|
||||
-- se abilitata la lavorazione corner con stop macchina e lavorazione precedente passante e spessore sotto il limite
|
||||
if nConeCut == 1 and nCsOk == 1 and dThick <= ( WD.MAX_CLEAN_CRN60 + 20 * GEO.EPS_SMALL) then
|
||||
local bMcok, sMcErr = AddMillCorner( nConeCut, vFace, Proc, nRawId, b3Raw,
|
||||
sCSErr, nAddGrpId, nil, nNewProc, 0,
|
||||
true)
|
||||
if not bMcok then return bMcok, sMcErr end
|
||||
else
|
||||
if nConeCut == 1 then
|
||||
if nCsOk ~= 1 then
|
||||
local sErr = 'Clean corner 60° not applied because Chainsawing not thru the thickness'
|
||||
EgtOutLog( sErr)
|
||||
else
|
||||
local sErr = 'Clean corner 60° not applid because thickness: ' .. EgtNumToString( dThick, 2) ..
|
||||
' is bigger than parameter MAX_CLEAN_CRN60: ' .. EgtNumToString( WD.MAX_CLEAN_CRN60 , 2)
|
||||
EgtOutLog( sErr)
|
||||
end
|
||||
elseif nConeCut == 2 then
|
||||
local sErr = 'Not possible apply Clean corner 30° after use sawing'
|
||||
EgtOutLog( sErr)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
-- altrimenti provo con fresa ad affondamento ridotto
|
||||
if not bDone then
|
||||
local nMlOk, sMlErr, dThick = AddMillings( sMilling2, vFace, Proc, nRawId, b3Raw, nConeCut, nAddGrpId)
|
||||
if nMlOk == 0 then return false, sMlErr end
|
||||
-- se ci sono almeno due facce e lavorato almeno un angolo
|
||||
if Proc.Fct >= 2 and dThick then
|
||||
-- se abilitata la lavorazione corner con stop macchina e lavorazione precedente passante e spessore sotto il limite
|
||||
@@ -1958,34 +2024,7 @@ local function MakeByCut( Proc, nRawId, b3Raw)
|
||||
EgtOutLog( sErr)
|
||||
end
|
||||
end
|
||||
end
|
||||
-- altrimenti provo con la sega a catena
|
||||
else
|
||||
local nCsOk, sCSErr, dThick = AddSawings( sSawing, vFace, Proc, nRawId, b3Raw)
|
||||
if nCsOk == 0 then return false, sCsErr end
|
||||
-- se ci sono almeno due facce e lavorato almeno un angolo
|
||||
if Proc.Fct >= 2 and dThick then
|
||||
-- se abilitata la lavorazione corner con stop macchina e lavorazione precedente passante e spessore sotto il limite
|
||||
if nConeCut == 1 and nCsOk == 1 and dThick <= ( WD.MAX_CLEAN_CRN60 + 20 * GEO.EPS_SMALL) then
|
||||
local bMcok, sMcErr = AddMillCorner( nConeCut, vFace, Proc, nRawId, b3Raw,
|
||||
sCSErr, nAddGrpId, nil, nNewProc, 0,
|
||||
true)
|
||||
if not bMcok then return bMcok, sMcErr end
|
||||
else
|
||||
if nConeCut == 1 then
|
||||
if nCsOk ~= 1 then
|
||||
local sErr = 'Clean corner 60° not applied because Chainsawing not thru the thickness'
|
||||
EgtOutLog( sErr)
|
||||
else
|
||||
local sErr = 'Clean corner 60° not applid because thickness: ' .. EgtNumToString( dThick, 2) ..
|
||||
' is bigger than parameter MAX_CLEAN_CRN60: ' .. EgtNumToString( WD.MAX_CLEAN_CRN60 , 2)
|
||||
EgtOutLog( sErr)
|
||||
end
|
||||
elseif nConeCut == 2 then
|
||||
local sErr = 'Not possible apply Clean corner 30° after use sawing'
|
||||
EgtOutLog( sErr)
|
||||
end
|
||||
end
|
||||
sWarn = 'Depth reduced to mill capabilities'
|
||||
end
|
||||
end
|
||||
return true, sWarn
|
||||
|
||||
Reference in New Issue
Block a user