BHoM / Speckle_Toolkit

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

Basic geometry convert and Structural Elements visualisation #39

Closed izzylys closed 4 years ago

izzylys commented 5 years ago

Note: Depends on

https://github.com/BHoM/BHoM_Engine/pull/1386

Note: Still WIP -- do not merge

Issues addressed by this PR

Closes #21 Closes https://github.com/BHoM/Speckle_Toolkit/issues/40

Adds conversions for point (and vector), line, and mesh from BHoM to Speckle and back, and basic visualisation in the SpeckleViewer for few BHoMObject types.

Test files

Download script

Changelog

Additional comments

Not quite sure how to register the conversion methods so they show up in the UI (Grasshopper). @alelom could you please let me know where I need to do this? At the mo, only the two first ToBHoM methods that were initially there are showing up as options in the convert component. Once I'm able to call them in GH, I'll test and add a script to validate that the conversions are working.

alelom commented 4 years ago

This is great @izzylys , thanks a lot!!

Not quite sure how to register the conversion methods so they show up in the UI (Grasshopper). @alelom could you please let me know where I need to do this? At the mo, only the two first ToBHoM methods that were initially there are showing up as options in the convert component. Once I'm able to call them in GH, I'll test and add a script to validate that the conversions are working.

I actually manage to get your new ToBHoM methods: image

just be sure you close Rhino and rebuild BHoM_UI for the changes to appear.

What I can't get are the ToSpeckle methods, but that's because I failed to mention that they need to be named FromBHoM instead in order to be found. I will push the change

Test files None as of yet. @alelom how should tests be done?

For now I'd say our target should be to send a BHoM element such a Bar to Speckle online and visualise it in its viewer.

I'll keep reviewing and testing, this looks amazing already, thanks again! 😄

alelom commented 4 years ago

@izzylys getting there! Thanks to your converts we can send stuff effectively! Some more work was needed because of the underlying bhom complexity -- get the geometry out of objects is not hard, but treating the different cases and also make Speckle happy can be tedious.

Feel free to have a look at the code -- happy to have a skype to discuss & get feedback and ideas! 😄

image image image

al-fisher commented 4 years ago

Fantastic! Great work @izzylys @alelom! 😄 Excited to play with this!

alelom commented 4 years ago

Added Node support basic representation and Bar support basic representation:

image

alelom commented 4 years ago

@izzylys, @al-fisher this is now ready for review!

al-fisher commented 4 years ago

Cool - thanks @alelom

alelom commented 4 years ago

Thanks @al-fisher ! Will definitely keep working on improving and defining the next steps!