Merge remote-tracking branch 'origin/HEAD' into develop

This commit is contained in:
luca.mazzoleni
2022-11-29 09:29:40 +01:00
4 changed files with 36 additions and 25 deletions
+1 -1
View File
@@ -358,7 +358,7 @@ if bToProcess then
local vWallErr = {}
for i = 2, #vWall do
local dDimH = vWall[i].Box:getDimZ()
if abs( dDimH - dRawH) > 10 * GEO.EPS_SMALL then
if abs( dDimH - dRawH) > 100 * GEO.EPS_SMALL then
table.insert( vWallErr, i)
end
end
+10 -4
View File
@@ -1,4 +1,4 @@
-- WProcessCut.lua by Egaltech s.r.l. 2020/11/13
-- WProcessCut.lua by Egaltech s.r.l. 2020/11/25
-- Gestione calcolo taglio di testa o longitudinale per Pareti
-- Tabella per definizione modulo
@@ -8,6 +8,7 @@ local WPC = {}
require( 'EgtBase')
local WL = require( 'WallLib')
local FreeContour = require( 'WProcessFreeContour')
local LapJoint = require( 'WProcessLapJoint')
EgtOutLog( ' WProcessCut started', 1)
@@ -29,7 +30,7 @@ function WPC.Classify( Proc, b3Raw)
-- verifico abbia una sola faccia
if Proc.Fct ~= 1 then return false end
-- controllo la normale
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, 0, GDB_ID.ROOT)
if vtN:getZ() < - 0.5 then return false end
return true
end
@@ -41,7 +42,7 @@ function WPC.FlipClassify( Proc)
-- verifico abbia una sola faccia
if Proc.Fct ~= 1 then return 0, 0 end
-- controllo la normale
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, 0, GDB_ID.ROOT)
local vtNZ = vtN:getZ()
if vtNZ > - GEO.EPS_SMALL then
nFlip0 = 100
@@ -67,7 +68,12 @@ end
---------------------------------------------------------------------
-- Applicazione della lavorazione
function WPC.Make( Proc, nRawId, b3Raw)
return FreeContour.Make( Proc, nRawId, b3Raw)
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, 0, GDB_ID.ROOT)
if vtN :getZ() > 0.866 then
return LapJoint.Make( Proc, nRawId, b3Raw)
else
return FreeContour.Make( Proc, nRawId, b3Raw)
end
end
---------------------------------------------------------------------
+7 -2
View File
@@ -1,4 +1,4 @@
-- WProcessLapJoint.lua by Egaltech s.r.l. 2022/02/04
-- WProcessLapJoint.lua by Egaltech s.r.l. 2022/11/15
-- 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.
@@ -10,6 +10,7 @@
-- 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.
-- 2022/09/30 In MakeSideGrooveByMill sistemato il calcolo del massimo sottosquadro dell'utensile per determinare la fattibilità della tasca.
-- 2022/11/15 DS Con lama massima inclinazione 60deg.
-- Tabella per definizione modulo
local WPL = {}
@@ -2027,6 +2028,10 @@ local function MakeByPocketing( Proc, nFacet, nRawId, b3Raw, bCheckQPar)
-- gruppo ausiliario
local nAddGrpId = WL.GetAddGroup( Proc.PartId)
local nNewProc, nNumFacet = RemoveBottomFaceAndReorder( Proc, nAddGrpId, nFacet)
-- se una sola faccia
if Proc.Fct == 1 then
dDiam = 2 * dDiam
end
-- se forma ad L
local bIsL = ( Proc.Fct == 2 or TestElleShape3( Proc.Id, Proc.Fct) or TestElleShape4( Proc.Id, Proc.Fct) == 2)
if bIsL then
@@ -2378,7 +2383,7 @@ local function MakeTwoFaces( Proc, nRawId, b3Raw)
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 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
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
return MakeByPocketing( Proc, nFacet, nRawId, b3Raw)
end
+18 -18
View File
@@ -1,4 +1,4 @@
-- NestProcess.lua by Egaltech s.r.l. 2022/06/23
-- NestProcess.lua by Egaltech s.r.l. 2022/11/24
-- Gestione nesting automatico pareti
-- Intestazioni
@@ -1574,33 +1574,33 @@ local function AddParts(RawParts, vPartsDoneManually)
end
nOutline, nCnt = EgtGetSurfTmSilhouette( SolidId, Z_AX(), 10, nOutlineLayer, GDB_RT.GLOB)
EgtBeamShowSolid( nPartId, false)
for nInd = 0, nCnt - 1 do
for nInd = 0, nCnt - 1 do
EgtSetName( nOutline + nInd, 'ON_TMP')
EgtSetStatus( nOutline + nInd, 0)
end
local nCurrOutline = nOutline
local nCurrOutline = nOutline
if nCnt > 0 then
local frSum
EgtScale( nOutline, GLOB_FRM(), 1, 1, 0, GDB_RT.GLOB)
EgtModifyCurveExtrusion( nOutline, Z_AX(), GDB_RT.GLOB)
-- verifico che la prima curva sia l'unico loop esterno
local vCrvRef = EgtCurveArea( nOutline)
for nInd = 1, nCnt - 1 do
local vCrv = EgtCurveArea( nOutline + nInd)
local vtCrvRefN = EgtCurveArea( nOutline)
for nInd = 1, nCnt - 1 do
local vtCrvN = EgtCurveArea( nOutline + nInd)
-- se trovo più loop esterni uso come contorno quello del box (quindi forzo nCurrOutline a nil)
if abs( vCrv * vCrvRef - 1) < GEO.EPS_SMALL then
if vtCrvN and vtCrvRefN and AreSameVectorApprox( vtCrvN, vtCrvRefN) then
nCurrOutline = nil
for nInd2 = 0, nCnt - 1 do
for nInd2 = 0, nCnt - 1 do
EgtErase( nOutline + nInd2)
end
nCnt = 1
break
end
nCnt = 1
break
end
end
--local frSum = EgtSurfFlatRegion(nOutlineLayer, nOutline)
--EgtSaveFile("c:\\Temp\\ProvaNesting.nge")
-- -- per ogni contorno creo flat region e le sommo
@@ -1626,7 +1626,7 @@ local function AddParts(RawParts, vPartsDoneManually)
-- EgtErase(nOutline + nIndex)
-- end
end
if nCurrOutline and nCurrOutline ~= GDB_ID.NULL then
nOutline = nCurrOutline
else
@@ -1769,11 +1769,11 @@ local function AddParts(RawParts, vPartsDoneManually)
end
-- aggiungo finestre
for nInd = 1, nCnt - 1 do
local tmp1, tmp2, area = EgtCurveArea( nOutline + nInd)
if area > WD.NEST_HOLE_MIN_AREA then
local _, _, dArea = EgtCurveArea( nOutline + nInd)
if dArea and dArea > WD.NEST_HOLE_MIN_AREA then
EgtModifyCurveExtrusion( nOutline + nInd, Z_AX(), GDB_RT.GLOB)
EgtAutoNestAddHoleToPart( nPartId, nOutline + nInd)
end
end
end
-- aggiungo aree di lavorazione del pezzo