DataWall :

- corretto posizionamento pezzi per Inversioni 90 e 270 deg.
This commit is contained in:
Dario Sassi
2020-10-28 11:47:15 +00:00
parent 3a103b1a54
commit ffe641a705
+18 -5
View File
@@ -1,6 +1,7 @@
-- BatchProcess.lua by Egaltech s.r.l. 2020/07/24
-- BatchProcess.lua by Egaltech s.r.l. 2020/10/28
-- Gestione calcolo batch disposizione e lavorazioni per Pareti
-- 2020/07/24 Nuvola di punti riferita allo Zero Tavola.
-- 2020/10/28 Corretto spostamento pezzi per rotazioni (0 o 180) e inversioni( 0, 90, 180, o 270).
-- Intestazioni
@@ -268,18 +269,30 @@ if bToProcess then
if 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) > GEO.EPS_ANG_SMALL then
vWall[i].PosX = vWall[i].PosX - vWall[i].Box:getDimX()
if abs( dRotAng) < GEO.EPS_ANG_SMALL 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( dRotAng) > GEO.EPS_ANG_SMALL then
elseif abs( dInvAng - 90) < 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 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 then
if abs( dRotAng - 0) < GEO.EPS_ANG_SMALL then
vWall[i].PosX = vWall[i].PosX - vWall[i].Box:getDimX()
end
end
end
end