I am having an issue with correctly applying the position of a mesh according to the block instance it belongs to.
So, as the question says, how do I exactly apply the transform data of a CRhinoInstanceObject into an mesh of type currentONMesh. (I am using the C++ API, btw)
Keep in mind that an instance object’s transformation is based from the world origin. So before applying the instance object’s transformation matrix on the mesh, you will first want to transform the mesh to the world origin.
Just curious, what you trying to do and why? If you need to obtain the render mesh from an instance object, there are better ways to approach this.
Since you are working on an exporter based on meshes you may be interested in the discussion here
Basically I’m trying to push for the mentioned changequeue mechanism for exporters so that we have a central place where handling conversion to meshes is done, including handling of block instances…
RhinoMeshObjects creates meshes from some meshing parameters that you provide.
If all you want is an object’s standard render meshes, then use RhinoGetRenderMeshes.
Both of these functions will accept CRhinoInstanceObject objects and generate/return the correct meshes and in the correct transformed location. There is no need to perform any post- get mesh transformation after you’ve called either of these functions. This is why I am confused why you are transforming the meshes.
So, perhaps you can un-confuse me as to why either of these two functions don’t just work for you?