Hi
I have an Objects.Other.BlockInstance object that consists of Objects.Geometry.Brep objects. What I want to do, is to extract a Transformation Matrix from each Objects.Geometry.Brep object (I have a reference object for each Objects.Geometry.Brep with identity Transformation Matrix - the original object that was used to compose the Objects.Other.BlockInstance). Is that possible?
Thanks for help!
Hi @Aleksandr_Bulankin , our Objects.Other.BlockInstance
object has a transform
property of class Objects.Other.Transform
. This class contains a Matrix4x4
typed matrix
property, which will give you the transform matrix used to transform any geometry found within the BlockDefinition
property of your BlockInstance
.
Hope this helps!
Thanks for you reply Claire! As far as I understand Objects.Other.Transform is a transformation for the BlockInstance itself, not for it’s children (Objects.Geometry.Brep objects). I am trying to find a way to get a Transform for each of the children, since it is a different transformation for each of them. Is my understanding wrong?
Do you mean the Brep objects are dynamically attached to the Instance, or are they nested instances? If you could link a sample commit with the Instance object that would help, so I can take a look at your data structure
They are nested objects. Actually your reply gave me an idea how to handle that issue - wrap each of them in BlockInstance. Thank you!
Great! We just put up some documentation on instances, definitions, and transforms by the way if you’d find that helpful Objects Kit | Speckle Docs
That looks perfect! Thank you for doing that