DataWall :

- aggiunta gestione feature DoubleCut
- aggiunta gestione feature SawCut
- modifica gestione FreeContour con una sola faccia
- correzioni per nesting pareti.
This commit is contained in:
DarioS
2021-05-17 20:32:52 +02:00
parent 903638adea
commit 03b521aee3
6 changed files with 221 additions and 118 deletions
+12 -49
View File
@@ -1,4 +1,4 @@
-- BatchProcess.lua by Egaltech s.r.l. 2021/01/15
-- BatchProcess.lua by Egaltech s.r.l. 2021/05/16
-- Gestione calcolo batch disposizione e lavorazioni per Pareti
-- 2021/01/15 Per nuova interfaccia Egt.
@@ -122,7 +122,7 @@ EgtAddToPackagePath( sMachDir .. '\\Wall\\?.lua')
-- Carico le librerie
_G.package.loaded.WallExec = nil
local WE = require( 'WallExec')
--local BL = require( 'BeamLib')
local WL = require( 'WallLib')
-- Carico i dati globali
local WD = require( 'WallData')
@@ -295,53 +295,6 @@ if bToProcess then
-- Se devo creare il pannello
if bCreatePanel then
-- Eseguo eventuali rotazioni e inversioni testa-coda
--for i = 1, #vWall do
-- local b3Solid = vWall[i].Box
-- -- rotazione
-- local dRotAng = EgtGetInfo( vWall[i].Id, 'ROTATED', 'd')
-- if dRotAng then
-- if abs( dRotAng) > GEO.EPS_ANG_SMALL then
-- local ptRotCen = b3Solid:getCenter()
-- EgtRotate( vWall[i].Id, ptRotCen, X_AX(), dRotAng, GDB_RT.GLOB)
-- b3Solid:rotate( ptRotCen, X_AX(), dRotAng)
-- end
-- EgtSetInfo( vWall[i].Id, 'ROTATED_DONE', dRotAng)
-- end
-- -- inversione
-- local dInvAng = EgtGetInfo( vWall[i].Id, 'INVERTED', 'd')
-- if dInvAng then
-- if abs( dInvAng - 180) > GEO.EPS_ANG_SMALL and abs( dInvAng + 180) > GEO.EPS_ANG_SMALL then
-- local ptInvCen = b3Solid:getCenter()
-- EgtRotate( vWall[i].Id, ptInvCen, Z_AX(), dInvAng - 180, GDB_RT.GLOB)
-- b3Solid:rotate( ptInvCen, Z_AX(), dInvAng - 180)
-- end
-- EgtSetInfo( vWall[i].Id, 'INVERTED_DONE', dInvAng)
-- end
-- -- correzioni per rotazioni non centrate di produzioni TS3 (quasi sempre 0 o 180 deg)
-- if not bProj and dRotAng and dInvAng then
-- if abs( dInvAng - 0) < GEO.EPS_ANG_SMALL then
-- if abs( dRotAng - 180) < GEO.EPS_ANG_SMALL then
-- vWall[i].PosZ = vWall[i].PosZ - vWall[i].Box:getDimY()
-- end
-- elseif abs( dInvAng - 90) < GEO.EPS_ANG_SMALL or abs( dInvAng + 270) < GEO.EPS_ANG_SMALL then
-- vWall[i].PosZ = vWall[i].PosZ - vWall[i].Box:getDimY()
-- if abs( dRotAng - 180) < GEO.EPS_ANG_SMALL then
-- vWall[i].PosX = vWall[i].PosX - vWall[i].Box:getDimX()
-- end
-- elseif abs( dInvAng - 180) < GEO.EPS_ANG_SMALL or abs( dInvAng + 180) < GEO.EPS_ANG_SMALL then
-- vWall[i].PosX = vWall[i].PosX - vWall[i].Box:getDimX()
-- if abs( dRotAng - 0) < GEO.EPS_ANG_SMALL then
-- vWall[i].PosZ = vWall[i].PosZ - vWall[i].Box:getDimY()
-- end
-- elseif abs( dInvAng - 270) < GEO.EPS_ANG_SMALL or abs( dInvAng + 90) < GEO.EPS_ANG_SMALL then
-- if abs( dRotAng - 0) < GEO.EPS_ANG_SMALL then
-- vWall[i].PosX = vWall[i].PosX - vWall[i].Box:getDimX()
-- end
-- end
-- end
--end
-- Ne verifico le dimensioni
local dRawH = vWall[1].Box:getDimZ()
local vWallErr = {}
@@ -402,6 +355,16 @@ if bToProcess then
local nMGrpId = EgtGetCurrMachGroup()
EgtSetInfo(nMGrpId, 'PANELHEIGHT', dRawH)
end
-- altrimenti sistemo
else
-- recupero il grezzo
local nRawId = EgtGetFirstRawPart()
-- ciclo sui pezzi
local nPartId = EgtGetFirstPartInRawPart( nRawId)
while nPartId do
WL.CreateOrEmptyAddGroup( nPartId)
nPartId = EgtGetNextPartInRawPart( nPartId)
end
end
-- Se richiesta solo pannello, esco