- Aggiunto offset tavola per permettere rotazioni
- Cambio nome da RotatePart a RotateRawPart perchè in effetti viene ruotato il grezzo e non il pezzo
This commit is contained in:
+8
-4
@@ -106,6 +106,8 @@ end
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
function BeamLib.AddPhaseWithRawParts( nRawId, OriXR, PosXR, dDeltaSucc)
|
||||
EgtAddPhase()
|
||||
-- si aprono i limiti tavola per permettere rotazioni di pezzi più larghi della tavola
|
||||
EgtSetTableAreaOffset( 2000, 2000, 2000, 2000)
|
||||
local dRawMove = 0
|
||||
while nRawId do
|
||||
EgtKeepRawPart( nRawId)
|
||||
@@ -182,8 +184,8 @@ function BeamLib.ConvertToClosedCurve( Proc, AuxId)
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
--- funzione che ruota il pezzo, da lanciare per creare la disposizione corretta
|
||||
function BeamLib.RotatePart( Part, nNumberOfRotations)
|
||||
--- funzione che ruota il grezzo
|
||||
function BeamLib.RotateRawPart( Part, nNumberOfRotations)
|
||||
-- sistemo numero rotazioni in caso sia negativa
|
||||
if nNumberOfRotations < 0 then
|
||||
nNumberOfRotations = nNumberOfRotations + 4
|
||||
@@ -200,7 +202,8 @@ function BeamLib.RotatePart( Part, nNumberOfRotations)
|
||||
local nRId = Part.idRaw
|
||||
while nRId do
|
||||
if bPreMove then EgtMoveRawPart( nRId, vtMove) end
|
||||
EgtRotateRawPart( nRId, X_AX(), EgtIf( BeamData.RIGHT_LOAD, -90, 90))
|
||||
local bIsRotationOK = EgtRotateRawPart( nRId, X_AX(), EgtIf( BeamData.RIGHT_LOAD, -90, 90))
|
||||
if not bIsRotationOK then error( 'UNEXPECTED ERROR: rotation of the raw not executed') end
|
||||
if not bPreMove then EgtMoveRawPart( nRId, vtMove) end
|
||||
nRId = EgtGetNextRawPart( nRId)
|
||||
end
|
||||
@@ -221,7 +224,8 @@ function BeamLib.RotatePart( Part, nNumberOfRotations)
|
||||
local nRId = Part.idRaw
|
||||
while nRId do
|
||||
if bPreMove then EgtMoveRawPart( nRId, vtMove) end
|
||||
EgtRotateRawPart( nRId, X_AX(), EgtIf( BeamData.RIGHT_LOAD, 90, -90))
|
||||
local bIsRotationOK = EgtRotateRawPart( nRId, X_AX(), EgtIf( BeamData.RIGHT_LOAD, 90, -90))
|
||||
if not bIsRotationOK then error( 'UNEXPECTED ERROR: rotation of the raw not executed') end
|
||||
if not bPreMove then EgtMoveRawPart( nRId, vtMove) end
|
||||
nRId = EgtGetNextRawPart( nRId)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user