DataWall :

- modifiche per gestire rotazioni di pezzi di tipo LAYER da TS3v7.
This commit is contained in:
DarioS
2021-06-25 19:24:37 +02:00
parent eca9ed5968
commit fd78bbede6
2 changed files with 20 additions and 14 deletions
+10 -7
View File
@@ -1,4 +1,4 @@
-- Process.lua by Egaltech s.r.l. 2021/04/13
-- Process.lua by Egaltech s.r.l. 2021/06/23
-- Gestione calcolo disposizione e lavorazioni per Pareti
-- Si opera sulla macchina corrente
-- 2020/12/09 Come per BatchProcess.lua si gestiscono anche rotazioni di inversione con valori negativi.
@@ -126,8 +126,9 @@ local function MyProcessInputData()
end
EgtSetInfo( vWall[i].Id, 'INVERTED_DONE', dInvAng)
end
-- correzioni per rotazioni non centrate di produzioni di TS3 (quasi sempre 0 o 180 deg)
if not bProj and dRotAng and dInvAng then
-- correzioni per rotazioni non centrate di produzioni TS3 (quasi sempre multipli di 90 deg)
local sType = EgtGetInfo( vWall[i].Id, 'TYPE', 's')
if not bProj and dRotAng and dInvAng and sType ~= 'LAYER' 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()
@@ -136,17 +137,19 @@ local function MyProcessInputData()
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
if abs( dRotAng - 180) < GEO.EPS_ANG_SMALL or abs( dRotAng + 180) < GEO.EPS_ANG_SMALL then
vWall[i].PosX = vWall[i].PosX - vWall[i].Box:getDimX()
elseif abs( dRotAng - 270) < GEO.EPS_ANG_SMALL or abs( dRotAng + 90) < 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()
--elseif abs( dRotAng - 270) < GEO.EPS_ANG_SMALL or abs( dRotAng + 90) < GEO.EPS_ANG_SMALL then
-- vWall[i].PosX = vWall[i].PosX + vWall[i].Box:getDimX()
elseif abs( dRotAng - 270) < GEO.EPS_ANG_SMALL or abs( dRotAng + 90) < GEO.EPS_ANG_SMALL then
vWall[i].PosZ = vWall[i].PosZ - vWall[i].Box:getDimY()
elseif abs( dRotAng - 90) < GEO.EPS_ANG_SMALL or abs( dRotAng + 270) < GEO.EPS_ANG_SMALL then
vWall[i].PosX = vWall[i].PosX + vWall[i].Box:getDimX()
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