BHoM / BHoM_Adapter

GNU Lesser General Public License v3.0
7 stars 5 forks source link

File_Adapter: Handling of geometry primitives #249

Closed pawelbaran closed 3 years ago

pawelbaran commented 3 years ago

Description:

Currently if one wants to save a geometry to file, it seems to require hacks and workarounds due to the fact that geometries are not BHoMObjects. Without wrapping it simply does not work, while with WrapNonBHoMObjects setting set to true, the geometries pushed from GH come in as wrapped Rhino objects, not wrapped BHoM geometries. Although I see the reason for that on the code level, it does not make much sense from the user's perspective.

Following the above, I would consider implementing some workaround that would handle BHoM geometry primitives same as BHoMObjects, so that the script in the screenshot below was functional OOTB:

image

I was not sure where to log that particular issue, so put it in the general Adapter - please feel free to transfer if you find applicable.

FYI @IsakNaslundBh @al-fisher @adecler @LMarkowski

alelom commented 3 years ago

The new File_Toolkit that replaces the old File_Adapter in this Toolkit does not have this problem. Closing.

image