Export geometry from Spider gbxml Tools

I wonder if there is a way to export visualized geometry from Spider gbxml Tools to a 3D-CAD format, for exmple OBJ?

/Max

Hi @MaxTillberg

Here you can find more information.

I noticed that three.js has a OBJ-exporter https://github.com/mrdoob/three.js/blob/master/examples/js/exporters/OBJExporter.js Maby that could be used in some way?

@TheoA might have already implemented that in one of the versions of the viewer. I know he has done it fit gltf and stl.

@MaxTillberg

Sorry for slow reply

Yes, Three.js does have an OBJ exporter that works well. I have built some demos that use it. The sad thing is that the exporter does not create MTL files. This means that all exported objects have the same color. Ditto STL files. The demo needs work. Maybe I can get a version ready for you to play with quite soon.

What I think may be useful is exporting to glTF files. glTF files have a lot of features. gbXML surface types can be separate objects in a glTF file, etc.

Export as OBJ, STL or glTF should all be part of the demo I am building.

BTW, what do you want to do with the exports?

I am trying to get a workflow between Revit/Archicad and IDA ICE. Right now, I use IFC but I think that gbXML would work better since it is developed for this purpose. IDA ICE does not import gbXML directly, but it has a clever plugin for Rhino that can create thermal zones/windows/shadings based upon geometry. My problem is therefore to get gbXML into Rhino and I would hope that an OBJ-export would do that. I have tried Honeybee/Openstudio as well but my experiance is that Spider gbXML does a better job (I might be wrong). If it would be possible to get glTF into Rhino I guess that would work as well but I have no experience of this format.

@MaxTillberg

Looks interesting:

I will download the free viewer and see what formats it can handle.


Thinking out loud: Would a gbXML to IFC translator be useful?

I think a gbXML IFC translator would be extremly useful, I do not understand why there is no such thing, at least not open source.

@MaxTillberg

Please have a look at:

https://www.ladybug.tools/spider-2020/sandbox/exporter-gbxml/

Exports OBJ, STL amd glTF files translated from gbXML files.

Please let me know if you think this script is OK to share with the world.

1 Like

A far as I can see it works great, thanks a lot Theo.

/Max

@MaxTillberg

You’re welcome!

Thinking out loud: If you want to use STL files for 3D data transfer, I could write a script that exports each type of gbXML surface to a separate STL file and them bundles them all into a ZIP file.

I think that would be very useful, then I do not have to go through Rhino/grasshopper. Personally I find obj more useful than STL, is there a reason why you prefere STL?
/Max

@MaxTillberg

I started with STL because it was easier. I will look into adding an OBJ exporter. And finishing the glTF exporter

Thanks Theo. Any news on this work? I have a project where it would be very useful.
/Max

@MaxTillberg

Yes!

https://www.ladybug.tools/spider-2021/spider-viewer/

Opens gbXML files and exports STL, OBJ, glTF and JSON files

Here is a screen capture of the gbXML file translated into a glTF file and displayed in the Windows 10 3D model Viewer

There are a number of issues to be worked on, but it’s a start.

1 Like

Hi @TheoA ,

Thanks for developing the spider viewer. Its is very interesting tool with a lot of possibilities.
I have been playing around with it to export gltf file. Although, I am facing an issue with the nodes and children in gltf. All the geometry meshes are flat and don’t have the hierarchy information.

So the windows, walls are all independent meshes and the room informtion is missing.
Do you think its lost in the conversion or could it be the problem with gbxml file(prepared using LBT 1.3).