Export geometry with ShapeDiver plugin PRO account other than 3dm format

I’m trying to export my model successfully uploaded to SD. It exports nicely in .3dm format but nothing else even if I choose other formats. Pls see below.

These are the format I have setup in my GH definition using the SD plugin. I have a currently running PRO account and I expected to export the model in the listed formats. Someone could suggest what I might missing? Thx

Make sure you convert surfaces and breps to meshes for OBJ or STL exports otherwise only 3DM format will produce any geometry to download. Let me know if this helped and please share a minimal version of your definition if you still struggle.

Also, please check you have installed the latest version of the plugin.

@pavol thank you, actually I’m after only wireframe drawings to export, so no breps. I thought that 3d .dxf or .ifc can be produced with the export component of SD. …anyhow, would I be better off writing a script to do this task or do you know a plugin which is “SD-friendly” and creates exports? …basically my basic need would be to create csv or json format for point coordinates and lines between them.

Please ignore my previous question, I just need to explore the SD plugin functions better. I guess the JSONConstruct component will be my friend to create nicely formatted objects to consume them alter.

The SDDataOutput component is useful for sending data via API from your ShapeDiver model to other applications. For downloading geometry use the SDExportDownload component and make sure you convert geometry to appropriate type depending on the export format. Learn more about DXF export in this video tutorial. IFC exports are supported by GeometryGym plugin and require more work in Grasshopper to prepare the objects for output. This blog article showcases a great application of this workflow.

Learn more about ShapeDiver from our Documentation page, API reference or video tutorials including this one explaining how to work with JSON objects in ShapeDiver.

1 Like

I’ve tried the SDDataOutput but it seems the platform doesn’t pick them up after re-uploading. The other type of export is available in the UI and also through the API but the the SDDataOutput do not. See below my components in GH:

How to reach the Data outputs from the model via the API and/or in the UI at SD?

To retrieve values from the SDDataOutput use the api.scene.getData() call.

Read more in the API reference and I also recommend these articles to start with the ShapeDiver API.

I didn’t posted posted, but actually I also called api.scene.getData() but returned an empty array. I’ve went trough this https://support.shapediver.com/hc/en-us/articles/360014884512-First-steps-with-the-API where this was explained.

This api.scene.getData(); and api.scene.getData(); and also this api.scene.getData({ name: "MainLegs" }) in my case returns empty array in the data.

Could you post a minimal version of your definition reproducing this? I will have a closer look.

Here is a minimal version of my approach, pls see attached. Basically few lines with one slider input and I wish to export their data in a JSON format. It properly renders in my front-end and also in SD platform, but all api functions regarding output data returns empty arrays.
Parameters return properly as for my original model.

    const parameters = await api.parameters.get().data;
    const exports = await api.exports.get();
    const scenes = await api.scene.get(null, "CommPlugin_1");
    console.log('Available model parameters', parameters);
    console.log('Exports: ', exports);
    console.log('Scenes: ', scenes);

SD version: 2.22.0
Rhino: 7.0
OS: MacOS Catalina v10.15.6[minimal_version_data_output.gh|attachment]
SD account: https://app.shapediver.com/u/bkatkisfali-com

minimal_version_data_output.gh (8.7 KB)

The data output works fine, try it yourself:

  • go to your model on ShapeDiver
  • open the browser console
  • set context to iFrame of the model
  • paste the call below and you will get the JSON object you defined in your Grasshopper definition


Your data output has a default name so I recommend to change it to something less generic.

correct, it works fine in ShapeDiver’s console but not from another client, like my front-end React app. Please note that the api.parameters.get().data; returns data properly but not the api.scene.getData();

…I tried something else now. I have embed the same model in my code with an iFrame and it works exactly as in ShapeDiver. But still doesn’t with the direct embedding.

@pavol to demonstrate this, please see the minimal app deployed to a server.

Link to the minimal app: https://testingshapediver.balazskisfali1.repl.co/

This is the code: https://repl.it/@BalazsKisfali1/TestingShapeDiver#src/SDViewer.js

You may see below that the parameters returned properly, also there are successful responses for the other calls, data returned an empty array.

A React code review is outside of the scope of this Forum, I’m afraid. Make sure you request the data after the initial scene is loaded and you might also find some answers in the collection of code examples and this React component sample:

thank you @pavol, actually this helped me

I just needed to request the data after the initial scene was loaded and now returns data properly.

1 Like