EgtBEAMWALL :
- correzione errore legato a flip (rotazione di 1 deg anzichè 1 * 180 deg).
This commit is contained in:
@@ -180,7 +180,7 @@ Public Class MyMachGroupPanelM
|
||||
Dim RotArray(DuploList.Count) As Integer
|
||||
Dim FlipArray(DuploList.Count) As Integer
|
||||
DuploArray = DuploList.ToArray()
|
||||
' recupero ROT e FLIP per non perderli
|
||||
' recupero ROT (gradi) e FLIP (0/1) per non perderli
|
||||
For Duploindex = 0 To DuploArray.Length - 1
|
||||
EgtGetInfo(DuploArray(Duploindex), MGR_PRT_ROT, RotArray(Duploindex))
|
||||
EgtGetInfo(DuploArray(Duploindex), MGR_PRT_FLIP, FlipArray(Duploindex))
|
||||
@@ -188,22 +188,22 @@ Public Class MyMachGroupPanelM
|
||||
' aggiornamento dei Duplo
|
||||
EgtDuploUpdate(nPartId)
|
||||
' recupero flip e rot dell'originale
|
||||
Dim OrigRot As Integer
|
||||
Dim OrigFlip As Integer
|
||||
Dim DeltaRot As Integer
|
||||
Dim DeltaFlip As Integer
|
||||
EgtGetInfo(nPartId, BTL_PRT_ROTATED, OrigRot)
|
||||
EgtGetInfo(nPartId, BTL_PRT_INVERTED, OrigFlip)
|
||||
Dim dRotated As Double
|
||||
Dim dInverted As Double
|
||||
Dim dRotAng As Double
|
||||
Dim dFlipAng As Double
|
||||
EgtGetInfo(nPartId, BTL_PRT_ROTATED, dRotated)
|
||||
EgtGetInfo(nPartId, BTL_PRT_INVERTED, dInverted)
|
||||
' ripristino i valori di ROT e FLIP
|
||||
For Duploindex = 0 To DuploArray.Length - 1
|
||||
' recupero box del pezzo
|
||||
Dim b3Part As New BBox3d
|
||||
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, b3Part)
|
||||
' faccio flip e rotazione rispetto all'originale che ha sovrascritto posizione del duplo
|
||||
DeltaRot = RotArray(Duploindex) - OrigRot
|
||||
EgtRotate(DuploArray(Duploindex), b3Part.Center, -Vector3d.Z_AX, DeltaRot)
|
||||
DeltaFlip = FlipArray(Duploindex) - OrigFlip
|
||||
EgtRotate(DuploArray(Duploindex), b3Part.Center, Vector3d.X_AX, DeltaFlip)
|
||||
dRotAng = RotArray(Duploindex) - dRotated
|
||||
EgtRotate(DuploArray(Duploindex), b3Part.Center, -Vector3d.Z_AX, dRotAng)
|
||||
dFlipAng = FlipArray(Duploindex) * 180.0 - dInverted
|
||||
EgtRotate(DuploArray(Duploindex), b3Part.Center, Vector3d.X_AX, dFlipAng)
|
||||
EgtSetInfo(DuploArray(Duploindex), MGR_PRT_ROT, RotArray(Duploindex))
|
||||
EgtSetInfo(DuploArray(Duploindex), MGR_PRT_FLIP, FlipArray(Duploindex))
|
||||
Next
|
||||
|
||||
Reference in New Issue
Block a user