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 @@
-- BatchProcess.lua by Egaltech s.r.l. 2020/06/29
-- BatchProcess.lua by Egaltech s.r.l. 2020/07/07
-- Gestione calcolo batch disposizione e lavorazioni per Pareti
@@ -148,7 +148,7 @@ if bBtl and string.find( sTitle, 'Bar_', 1, true) and EgtExistsFile( sNgeFile) t
if nDiff == 0 then
bToProcess = false
-- se cambiata configurazione macchina da ultima elaborazione, devo riprocessare
if EgtCompareFilesLastWriteTime( sOriFile, sMachDir .. '\\Beam\\TS3Data.lua') == -1 or
if EgtCompareFilesLastWriteTime( sOriFile, sMachDir .. '\\Wall\\TS3Data.lua') == -1 or
EgtCompareFilesLastWriteTime( sOriFile, sMachDir .. '\\Tools\\Tools.data') == -1 then
bToRecalc = true
end
@@ -254,17 +254,26 @@ if bToProcess then
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 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