DataWall:

- aggiunta gestione WD.MAXDIAM_POCK_CORNER per tasche con almeno un angolo interno.
This commit is contained in:
DarioS
2022-02-06 11:01:07 +01:00
parent d97eb06293
commit 8bfdfff68e
+19 -7
View File
@@ -1,4 +1,4 @@
-- WProcessLapJoint.lua by Egaltech s.r.l. 2022/02/03
-- WProcessLapJoint.lua by Egaltech s.r.l. 2022/02/04
-- Gestione calcolo mezzo-legno per Pareti
-- 2021/08/27 DS Se tre o più facce con flag PCKT=1 forzo svuotatura con fresa (per Variant).
-- 2021/08/29 DS Se svuotatura di fianco setto flag per farla dopo i tagli.
@@ -8,6 +8,7 @@
-- 2022/01/04 DS Se U con fondo verso basso o alto non ci possono essere spigoli verticali da pulire.
-- 2022/01/17 ES Migliorata scelta fresa per lavorazione di fianco sotto.
-- 2022/02/03 DS Gorge larga come gambo più sicurezza.
-- 2022/02/04 DS In svuotatura aggiunta gestione WD.MAXDIAM_POCK_CORNER in presenza di almeno un angolo interno.
-- Tabella per definizione modulo
local WPL = {}
@@ -1879,21 +1880,32 @@ local function MakeByPocketing( Proc, nFacet, nRawId, b3Raw, bCheckQPar)
-- gruppo ausiliario
local nAddGrpId = WL.GetAddGroup( Proc.PartId)
local nNewProc, nNumFacet = RemoveBottomFaceAndReorder( Proc, nAddGrpId, nFacet)
-- se ho forma a L
-- se forma ad L
local bIsL = ( Proc.Fct == 2 or TestElleShape3( Proc.Id, Proc.Fct) or TestElleShape4( Proc.Id, Proc.Fct) == 2)
-- verifico se U
if bIsL then
dDiam = 2 * dDiam
end
-- se forma ad U
local bIsU = ( Proc.Fct == 3 and not TestElleShape3( Proc.Id, Proc.Fct))
local dMiddleFacetLength = 0
if bIsU then
local _, dH2, dV2 = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacet, GDB_ID.ROOT)
-- prendo la linea di base
if abs( dElev - dH2) < 1 and abs ( dElev - dV2) > 1 then
local dMiddleFacetLength = 0
if abs( dElev - dH2) < 1 and abs( dElev - dV2) > 1 then
dMiddleFacetLength = dV2
elseif abs( dElev - dV2) < 1 and abs ( dElev - dH2) > 1 then
elseif abs( dElev - dV2) < 1 and abs( dElev - dH2) > 1 then
dMiddleFacetLength = dH2
end
if dMiddleFacetLength > dDiam then
dDiam = min( 2 * dDiam, dMiddleFacetLength)
end
end
-- in presenza di angoli interni, limito secondo impostazione globale il diametro massimo utensile
if Proc.Fct == 3 and bIsL then
dDiam = min( dDiam, WD.MAXDIAM_POCK_CORNER or 1000)
elseif Proc.Fct >= 4 then
dDiam = min( dDiam, WD.MAXDIAM_POCK_CORNER or 1000)
end
if Proc.Fct < 5 and (( bIsL and not bIsU) or ( bIsU and dMiddleFacetLength > dDiam * 2)) then dDiam = dDiam * 2 end
-- recupero la lavorazione
local sPocketing = WM.FindPocketing( 'Pocket', dDiam, dElev)
if not sPocketing then