Grasshopper Introduction
Last updated
Last updated
Mirar for Grasshopper is a set of components that allow Grasshopper data to be uploaded to Mirar. Models are created using the Spectacles components (which allow grasshopper geometry to be decorated with materials, attributes, and a layer, and then assembled into a model), and are uploaded to Mirar using the components below.
Component
Description
Rhino Upload
Fast and simple upload of Rhino geometry with layers, colors and object names to Mirar to a new or existing Model.
Create Project
Create a Project in Mirar.
Get Projects
Get a list of your Mirar projects from the Mirar API.
Model Upload
Create a Model in a Mirar Project.
Deconstruct Model
Exposes the properties and the elements of a specified Mirar Model.
Deconstruct Project
Exposes the properties of a Mirar Project, including all of its Models.
Get Models
Get a list of Mirar models within a Project.
Component
Description
Create Attributes
Create key-value pairs - parameters - to add to other Spectacles objects. These typically are shown when an object is selected in the Spectacles viewer.
Create Curve Stroke
Create a curve stroke definition combining weight, color, and dash pattern. Feed this in to a Mirar Curve component.
Create Lambert Material
Creates a non-shiny mesh material.
Create Phong Material
Create a shiny mesh material.
Create Colored Polyline
Create a Spectacles polyline from a grasshopper polyline and a list of colors.
Create Curve
Create a Spectacles Curve from a Grasshopper Curve.
Create Mesh
Creates a Spectacles mesh from a grasshopper mesh.
Create Mesh Face Colors
Create a Spectacles Mesh with colored faces.
Create Mesh Mapped
Create a mesh element with an image mapped on to it.
Create Mesh Vertex Colors
Create a Spectacles Mesh with colored vertices from a Grasshopper mesh that contains colors.
Create Point Cloud
Create a Spectacles Point Cloud from Grasshopper points, colors and sizes.
Create Surface
Create a Spectacles Surface from a Grasshopper Surface. Currently, trimmed surfaces and Breps are not supported.
Create Group
Create a Spectacles Group. Groups can be added to models, and enable multiple elements (meshes, surfaces, curves, etc.) to be nested within one selectable object. When any object in the group is clicked, the entire group will be selected and the attributes from this component will be displayed.
Create Legend
Create a legend to overlay on your Spectacles model. Useful for data visualization using color in the Spectacles viewer.
Create View
Create a fixed view to include in a Spectacles Model.
Create Model
Create a Spectacles model. Models contain elements (groups, meshes and point clouds, legends, views, etc.), and are at the top of the Spectacles organizational hierarchy. Construct models using this component, then upload them to Mirar, or write a series of .json files to disk using Colibri and upload them to thread.
Write Spectacles JSON
Writes a .json file to disk containing a serialized Spectacles model. Use this to upload a series of Spectacles models to Thread.
Deconstruct Attributes
Exposes the parameter keys (names) and values within a Spectacles Attributes object.
Deconstruct Group
Exposes the properties of a Spectacles Group, including a list of Spectacles Elements, a Spectacles Attributes object, and a layer.
Deconstruct Mesh
Exposes the properties of a Spectacles Mesh, including a Grasshopper representation of the Mesh, a material, and any attributes attached to the Mesh.
Deconstruct Point Cloud
Exposes the properties of a Spectacles Point Cloud, including the points, the point colors, size, and the layer.
Deconstruct Spectacles Model
Exposes the properties of a Spectacles model, including all of its Elements.
Element Sorter
Sort a list of Elements into more specific Spectacles types - meshes, surfaces, point clouds, etc.