Import Geometry
The Import Geometry component is a way to let online users upload a CAD file that can be used as an input to the Grasshopper definition. There are two ways to import geometry using this component:
By giving a URL to the URI input parameter (possible locally in Grasshopper and in the online viewer)
By clicking on the button generated by the component, after the file is uploaded to the platform (possible only in the online viewer). The button opens a dialog allowing online users to upload their local files.
Let users set a file URL
You might want to give the possibility for users to enter a public URL where their images are stored instead of uploading local files. The Direct Text Input component can be connected to the URI input parameter as a way of dynamically changing the location/URL of the file which will be imported.
In Grasshopper, the component can only be tested using the option 1, both with public online URLs and with files stored locally (using the path of the file on the local machine).
The files must be hosted in a publicly accessible online location that allows downloading. Read more about how to store files online and use them in the ShapeDiver viewer.
Importing private files
ShapeDiver Enterprise customers are provided with a private and secure storage space that can be used to store external CAD files and use them with the ShapeDiver plugin. Learn more about the Enterprise plan here.
The component outputs a list of geometry objects extracted from the imported file.
Import options
Right-click on the component to open its context menu and see the two import options:
Set Maximum File Size: use this option to limit the size of files that users of the ShapeDiver model will be able to use for this input (size in bytes). By default, this input is set to 50mb. Note that this size is itself limited by the file input size limit included with your account. You can read about the limits per account type here.
Add File Formats: use this option to define which file formats are allowed as inputs for this component. By default, all possible formats are enabled.
Set at least one file format
Make sure at least one file format is checked, otherwise online users will not be able to upload their files. By default, all of the geometry file formats are checked.
Supported file formats
Rhino 6
At the moment, the ShapeDiver plugin can import two file types:
OBJ (MIME type: application/wavefront-obj) - 3D meshes
DXF (MIME type: application/dxf) - 2D drawings
For the DXF format, the following entities are supported (other entities will be ignored):
Points
Lines
Polylines
LwPolylines
Arcs
Circles
Splines
Meshes
PolyfaceMeshes
Faces3d
If you need to import other file formats, we suggest you switch to the Rhino 7 version of the plugin.
Export OBJ files from Rhino
When exporting OBJ files from Rhino, a dialog with several options for export opens. If the goal is to use these files for importing them in ShapeDiver in Rhino 6, make sure the option "Wrap long lines" from the Formatting tab is unchecked, otherwise the viewer will not be able to parse them.
Rhino 7
In Rhino 7, most of the formats available for importing in Rhino (command _Import
) are also available with the Import Geometry component. Right-click on the component to see the full list in the context menu.

Unit System
In Rhino 7, the component imports the files using the currently active system in the Rhino viewport. When using the component locally, make sure the unit system of your Rhino session corresponds to the dimensions you are expecting in Grasshopper. When uploading the file, you can force the online servers to use a specific unit system by using the “Tolerance Settings” component.
Import geometry including document properties
The Import Geometry component imports in Grasshopper any geometry contained in a specified file input. Depending on the input file format, a set of document properties are stored in the geometry objects in Grasshopper as attributes after they are imported. The current set of document properties imported as attributes are the following: name, layer, color, plotcolor, plotweight, material.
Consider the following object in Rhino:

It has a defined name (“example box”), layer (“example layer”) and color (“Red”). When saving it to a 3dm file (or any other file format which support the concepts of names, layers and object colors) and then using the Import Geometry component to import it in Grasshopper, those three properties can be extracted from the imported object using the attribute components. This can be tested locally be referencing the local 3dm file:

Once the definition is uploaded, the same behavior will be available when one uploads the same file to the input corresponding to the Import Geometry component. Let’s add a data output for each of the attributes we want to see on the platform:

Once uploaded, the ShapeDiver model contains a file input. Any user can then upload their own 3dm file. When the file containing the box is selected as input, one can verify that the data outputs show the corresponding attribute values:

Find below the final Grasshopper definition, as well as the 3dm file containing the example geometry from above:
Import geometry including stored user text
The Import Geometry component imports in Grasshopper any geometry contained in a specified file input. In Rhino, it is possible to defined so-called User Text key-value pairs for each object in a document. This User Text is then stored with the objects when saving them as a 3dm file, as well as some other file formats which map User Text to similar properties of their own. Consider the following object in Rhino, where we have stored two key-value pairs:

When saving it to a 3dm file (or any other file format which support custom properties that Rhino can map to User Text) and then using the Import Geometry component to import it in Grasshopper, those two user text key-value pairs can be extracted from the imported object using the attribute components.
Make sure to check the option “Save Plugin Data” before exporting, to make sure User Text is included in the file.
This can be tested locally be referencing the local 3dm file:

Once uploaded, the ShapeDiver model contains a file input. Any user can then upload their own 3dm file. When the file containing the box is selected as input, one can verify that the data outputs show the corresponding attribute values:

Find below the final Grasshopper definition, as well as the 3dm file containing the example geometry from above: