DataWall :

- sistemazioni varie durante prime prove con macchina S3.
This commit is contained in:
Dario Sassi
2020-07-11 09:40:28 +00:00
parent 1f752a05e0
commit 767e7287a5
7 changed files with 347 additions and 77 deletions
+15 -6
View File
@@ -1,4 +1,4 @@
-- Process.lua by Egaltech s.r.l. 2020/04/29
-- Process.lua by Egaltech s.r.l. 2020/07/07
-- Gestione calcolo disposizione e lavorazioni per Pareti
-- Si opera sulla macchina corrente
@@ -105,23 +105,32 @@ local function MyProcessInputData()
-- rotazione
local dRotAng = EgtGetInfo( vWall[i].Id, 'ROTATED', 'd')
if dRotAng then
if abs( dRotAng) > GEO.EPS_ANG_SMALL then
if abs( dRotAng) > GEO.EPS_ANG_SMALL and not EgtExistsInfo( vWall[i].Id, 'ROTATED_DONE') 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)
EgtRemoveInfo( vWall[i].Id, 'ROTATED')
end
-- inversione
local dInvAng = EgtGetInfo( vWall[i].Id, 'INVERTED', 'd')
if dInvAng then
if abs( 180 - dInvAng) > GEO.EPS_ANG_SMALL then
if abs( dInvAng - 180) > GEO.EPS_ANG_SMALL and not EgtExistsInfo( vWall[i].Id, 'INVERTED_DONE') then
local ptInvCen = b3Solid:getCenter()
EgtRotate( vWall[i].Id, ptInvCen, Z_AX(), 180 - dInvAng, GDB_RT.GLOB)
EgtRotate( vWall[i].Id, ptInvCen, Z_AX(), dInvAng - 180, GDB_RT.GLOB)
end
EgtSetInfo( vWall[i].Id, 'INVERTED_DONE', dInvAng)
EgtRemoveInfo( vWall[i].Id, 'INVERTED')
end
-- correzioni per rotazioni non centrate di TS3 (quasi sempre 0 o 180 deg)
if 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
vWall[i].PosZ = vWall[i].PosZ - vWall[i].Box:getDimY()
end
elseif abs( dRotAng) > GEO.EPS_ANG_SMALL then
vWall[i].PosZ = vWall[i].PosZ - vWall[i].Box:getDimY()
end
end
end