BHoM / Speckle_Toolkit

GNU Lesser General Public License v3.0
10 stars 2 forks source link

Implement converts for Brep and Surfaces; clarify geometry convert strategy #59

Closed alelom closed 4 years ago

alelom commented 4 years ago

Description:

Context: get a visualisable representation of Surfaces and Nurbs in SpeckleViewer.

Unlike Meshes, Lines and Points, for which we already are the converts, other types (like Breps) are not so simple to convert.

It would be an easy job if we could reference SpeckleCoreGeometryRhino, because that project contains all the converts from Rhino classes to Speckle classes. However, the only nuget package for SpeckleCoreGeometry seems only to include the SpeckleCoreGeometryClasses, which are the base geometry types (SpeckleLine, SpecklePoint etc). We could solve this by

  1. Rewriting the convert ourselves (I just attempted to do it and it's definitely not recommendable)
  2. Hard-copying the .dll in our repo.
  3. Waiting for the Nuget package to be produced: https://github.com/speckleworks/SpeckleCoreGeometry/issues/22.

If we clarify the strategy for this one, we might as well just pass through rhino for all our geometry types, then use the speckle converter for them. This could be quite advantageous for us, because we could maintain less convert methods (the BHGeom to Rhino and vice-versa are needed anyway).

alelom commented 4 years ago

As mentioned also in https://github.com/BHoM/Speckle_Toolkit/issues/60 we decided to go for option 2.

In the long term, this strategy should ideally be replaced by a SpeckleCoreGeometryBHoM project in the Speckle Repo, which should take care of the Geometry conversions from BHoM to SpeckleObjects.