Brep Transform vs Mesh Transform performance

Hi,

I am developing a 6 axis robot simulation plugin for Rhino using Rhinocommon (C#). I have the basic kinematic model already programmed and functioning. For the robot joint geometries, I have the option to either define them as a Mesh or a Brep or a Block Instance (InstanceDefinition). Currently, I have them defined as Meshes.

However, I am facing performance issues during forward kinematics and animating the simulation most likely due to high polycount of the meshes. For Forward Kinematics, I calculate and multiply the appropriate rotation (transformation) matrices for each joints and then apply Mesh.Transform() to my individual joint meshes. I used ReduceMesh command to lower polygon count to a point where the performance is smooth. But I lose geometry definition due to low polycount and the robot ends up looking really terrible. I am considering using Brep (PolySurface) to define the robot joint geometries. However, I would like to know whether doing so would add to any significant performance boosts during my Transformation operations.

To summarize, I would like to know which one has a faster performance: Brep.Transfrom() or Mesh.Transform()?

Performance often depends on specific implementations, so if you want to know what performs better or worse, then try it. Compare.

// Rolf

1 Like