DataWall :

- in nesting migliorati controlli esistenza dati
- in controllo spessori per inserimento in pannello si usa tolleranza di 0.1 (prima era 0.01) come in EgtBeamWall.
This commit is contained in:
DarioS
2022-11-25 09:40:34 +01:00
parent 2136ca5e8e
commit e07a1d63cb
2 changed files with 19 additions and 19 deletions
+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