Hello. I am trying to place different groups instead of group elements. I can place groups at the same point, but I need to find the x and y directions to place groups with different directions. How can I find this? What is the alternative solution? Thank you.
Hello @yaseminV2XL5,
Is it possible for you to share what have you tried until now in Dynamo? It will help us to understand your approach and let you find answers faster.
Haven’t had a chance to try it, but in the API you can get LocationPoint for groups, which sometimes supports a Rotation property in turn.
I don’t believe this will report correctly in most cases, but the API may have changed since I last looked at it (2018).
I think what you need to do is get object geometry from within the group instance as well as the location point and compare that to resulting vector matrix to the same content from the group type.
In the case which @yaseminV2XL5 posted I grab the top left, bottom left, and bottom right points of the countertop, or the transform of the cooktop if that’s a family. Comparing those vectors on the instance to the type will let you know if it’s rotated or mirrored.
Hi @emrullah.yildiz @GavinCrump @jacob.small
I want to ensure that the groups are oriented correctly, as shown in the following example.
Are these correct? How do you know?
Tested rotation and it doesn’t work.
But I found a valuable thread here:
A very interesting workaround is to insert a dedicated ‘rotation checker’ family temporarily in a group, get them, get their group instance (via GroupId) and get their rotation angle, suggested in a later post.
Hacky, but very direct.
Rotated groups_R23.rvt (1.6 MB)
Group rotation by family.dyn (26.0 KB)
very interesting. when I run it again, everything except the mirrored element is in the right direction.
Thanks @GavinCrump and @jacob.small
Yea there would need to be extra steps added to account for mirroring I think.