Move MeshRepresentation
methods
#52
Labels
type:compliance
Non-conforming to code guidelines
type:question
Ask for further details or start conversation
Problem statement
Most "visualiser platforms" like Rhino, Speckle and 3DRepo use meshes to visualise objects.
For example, when you want to visualise a
BH.oM.Structure.Elements.Bar
in the Rhino space, the following steps are actually done:Another example can be done for
Node
(see below), but we can imagine many other cases.This means that for a variety of BHoMObject types we could compute a Mesh Representation, useful for visualisation purposes.
The whole process of generating a visualisable mesh should be definable and customisable per individual BHoM Types.
If there is agreement on this, we need to formalise how and where this should happen.
Example of the current workflow in Speckle
When you push a
BH.oM.Structure.Elements.Node
:You may want to visualise the node in several ways, depending on its properties:
For a pinned node we want a
Mesh
containing a sphere on top of a cone.For a fixed node we want a
Mesh
containing a box.Basically it returns a different mesh to represent different constraints based on the
Constraint6DOF
. Reason to return a Rhino Mesh is because it's the only way we currently have to build "composite" meshes, AFAIK.The mesh is converted into a Speckle Object, that acts as a bucket.
All BHoMObject data is stored into the Speckle Object.
I've now isolated 1 into
MeshRepresentation
methods. It could be the case that those are moved up in BHoM_Engine, so they can be used also for other cases where we want to get a Mesh representation of a BHoMObject.The text was updated successfully, but these errors were encountered: