Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move MeshRepresentation methods #52

Open
alelom opened this issue Feb 3, 2020 · 0 comments
Open

Move MeshRepresentation methods #52

alelom opened this issue Feb 3, 2020 · 0 comments
Assignees
Labels
type:compliance Non-conforming to code guidelines type:question Ask for further details or start conversation

Comments

@alelom
Copy link
Member

alelom commented Feb 3, 2020

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:

  1. The centreline and the section property are extracted.
  2. The section property extruded along the line to generate the external surface
  3. The external surface is processed by Rhino, that renders it by meshing it.

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:

  1. 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.

  2. The mesh is converted into a Speckle Object, that acts as a bucket.

  3. 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.

@alelom alelom added type:compliance Non-conforming to code guidelines type:question Ask for further details or start conversation labels Feb 3, 2020
@alelom alelom self-assigned this Feb 3, 2020
@alelom alelom changed the title Move MeshRepresentation methods to more appropriate place Move MeshRepresentation methods Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:compliance Non-conforming to code guidelines type:question Ask for further details or start conversation
Projects
None yet
Development

No branches or pull requests

1 participant