Migliorie calcolo prerotazioni
This commit is contained in:
@@ -1442,18 +1442,20 @@ function MachiningLib.AddOperations( MACHININGS, Part, sRotation)
|
||||
local nPhase = EgtGetCurrPhase()
|
||||
local idDisp = EgtGetPhaseDisposition( nPhase)
|
||||
|
||||
-- posizione iniziale considerando eventuiali prerotazioni
|
||||
local nRealInitialPosition = Part.nInitialPosition - ( BEAM.PREROTATE90 or 0)
|
||||
if sRotation == 'DOWN' then
|
||||
local nRotation = EgtIf( Part.nInitialPosition + 2 > 4, Part.nInitialPosition + 2 - 4, Part.nInitialPosition + 2) - 1
|
||||
local nRotation = EgtIf( nRealInitialPosition + 2 > 4, nRealInitialPosition + 2 - 4, nRealInitialPosition + 2) - 1
|
||||
BeamLib.RotateRawPart( Part, nRotation)
|
||||
EgtSetInfo( idDisp, 'ROT', -2)
|
||||
EgtSetInfo( idDisp, 'TYPE', 'MID2')
|
||||
elseif sRotation == 'SIDE' then
|
||||
local nRotation = EgtIf( Part.nInitialPosition + 1 > 4, Part.nInitialPosition + 1 - 4, Part.nInitialPosition + 1) - 1
|
||||
local nRotation = EgtIf( nRealInitialPosition + 1 > 4, nRealInitialPosition + 1 - 4, nRealInitialPosition + 1) - 1
|
||||
BeamLib.RotateRawPart( Part, nRotation)
|
||||
EgtSetInfo( idDisp, 'ROT', -1)
|
||||
EgtSetInfo( idDisp, 'TYPE', 'MID2')
|
||||
else
|
||||
local nRotation = Part.nInitialPosition - 1
|
||||
local nRotation = nRealInitialPosition - 1
|
||||
BeamLib.RotateRawPart( Part, nRotation)
|
||||
EgtSetInfo( idDisp, 'TYPE', 'END')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user