The Grasshopper plugin contains components which allows you to create objects from any installed schema and object model. These three components are grouped under
SpeckleKits and perform the following functions:
- Creates a SpeckleObject
- Modifies the properties of a SpeckleObject
- Converts to the chosen SpeckleObject
Creating Speckle objects
You can directly create the objects you wish to send using the Schema Builder component, allowing you manually set the properties and values of the Speckle object.
To use the component, first select the object type you wish to create by right-clicking on the component to bring up its context menu. The object types will be grouped by its Speckle kit name. After selecting a type, the inputs will then be automatically populated to expose its properties. You can expose additional properties from the
overwrite custom properties menu option. Hovering over an input will bring out a tooltip which will provide information regarding what type of input it takes.
Modifying Speckle objects
The modify component allows you to change the properties of a Speckle object. Similar to the object creation, default properties are automatically exposed, with additional properties hidden in the
overwrite custom properties menu option. The modify component will only change properties which have inputs.
Converting Speckle objects
Lastly, the converting components attempts to convert the input into the chosen object type. This can be used to convert Grasshopper objects such as
meshes to Speckle objects or to convert one Speckle object type to another.
To select the type to convert to, right-click on the component to bring up its context menu. The object types will be grouped by its Speckle kit name. Note that in order to change type from one Speckle object to another, the input must either be a base or child class of the target type. For example, in the SpeckleElements kit, a
Mesh can be converted to a
Floor and vice versa. However, a
Point cannot be converted to or from a
Wall. The easiest way to see if a conversion is possible is to test it.
This guide has shown how to use the Grasshopper components to convert, create, and modify Speckle objects. Using these components, you will be able to control exactly what gets sent to Speckle.