Hello,
I'm having trouble understanding the Transform class and how I can obtain the internal 3x4 transform matrix. Is it as simple as grabbing the 3 Basis vectors (i.e. the first 3 columns of the matrix), and the Origin (the 4th column of the matrix)?
Note: I have actually tried this and it mostly works, but I'm running into issues specifically with mirrored/facingflipped elements. Am I missing something? For example, do I need to check Transform.HasReflection and do something to the matrix? Similarly, do the basis vectors contain the scale, or do I need to scale them using the Scale property?
Many thanks for your time,
George
Hello,
I'm having trouble understanding the Transform class and how I can obtain the internal 3x4 transform matrix. Is it as simple as grabbing the 3 Basis vectors (i.e. the first 3 columns of the matrix), and the Origin (the 4th column of the matrix)?
Note: I have actually tried this and it mostly works, but I'm running into issues specifically with mirrored/facingflipped elements. Am I missing something? For example, do I need to check Transform.HasReflection and do something to the matrix? Similarly, do the basis vectors contain the scale, or do I need to scale them using the Scale property?
Many thanks for your time,
George
Upon further investigation, the transform for the offending (FamilyInstance) element seems to have HasReflection=False. The Transform looks completely identical to the one for a non-flipped/mirrored element, yet produces different results. In other words, applying the two transforms to the same point via transform.OfPoint appears to yield different results.
Can anyone shed a bit more light on this? Do I need to check some other properties on the FamilyInstance to get the correct matrix?
Upon further investigation, the transform for the offending (FamilyInstance) element seems to have HasReflection=False. The Transform looks completely identical to the one for a non-flipped/mirrored element, yet produces different results. In other words, applying the two transforms to the same point via transform.OfPoint appears to yield different results.
Can anyone shed a bit more light on this? Do I need to check some other properties on the FamilyInstance to get the correct matrix?
Update: it seems that mirroring is never stored in the GetTransform for the FamilyInstance. Instead, the mirrored data is actually encoded in the PolymeshTopology, which is a bit of a shame as it means a repeated object (with different mirroring/transforms) can't be reused if it is mirrored.
Any suggestions would be welcomed.
Update: it seems that mirroring is never stored in the GetTransform for the FamilyInstance. Instead, the mirrored data is actually encoded in the PolymeshTopology, which is a bit of a shame as it means a repeated object (with different mirroring/transforms) can't be reused if it is mirrored.
Any suggestions would be welcomed.
Can't find what you're looking for? Ask the community or share your knowledge.