Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Transform matrix

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
1001 Views, 3 Replies

Transform matrix

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

3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

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?

Message 3 of 4
Anonymous
in reply to: Anonymous

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.

Message 4 of 4
Anonymous
in reply to: Anonymous

what does the FamilyInstance..::..FacingFlipped Property say?

This is a very interesting question... hopefully someone can shed some light on it.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report