Attributes

Introduction

Attributes allow the user to assign object attributes to grasshopper objects or alternatively to modify existing attributes of rhino objects. In addition, the user may filter grasshopper objects by the values of the attributes. Filtering can be used to obtain sets/groups from attribute values. For instance, grouping objects with the samenvalue of a user defined field value attribute. Filtering can be applied to multiple attribute values using principles of logical operation AND/OR/NOT.  The inverse indices of the list of data filtered is also automatically derived. For getting or settig the attributes the input can be any type of grasshopper data object.

2015-06-02_100521
Attributes Component Menu
Components for operation on attributes are in two groups of action

  • Get attributes
  • Set attributes

Two settings components are available for the user to assign settings for getting and setting data including

  • Defining the delimiters to use for field names, field values, field list values

Attributes are grouped by

  • Display attributes
  • Data attributes
  • Label or type
  • Grouping or order attributes

Every object in grasshopper can be a rhino document object (also called reference object)  or a grasshopper object. A rhino document object is a persistent piece of data that exists in a rhino document. A grasshopper object is volatile data that only exists in memory in a curent instance of a canvas definition. To make a grasshopper object persistent, the user bakes it to the rhino document so that it becomes a rhino object. This persistent data exists outside of grasshopper. Typically until now attributes were not accessible within grasshopper.

Components

The following components are available for getting and setting attribute data.

Color

  • Get by object display color 
  • Material color
  • Format options for color including HTML, argb, rgb

Data

  • Key value pairs
  • User assigns a record where each record is composed of the field names and associated field values
  • List of field values may be assigned by using a delimiter
  • Various modification options exist including clear, delete, rename, modify
  • Filter names or values by wild cards or regex expressions including values in a list
  • Group or create sets by field names or field values

Display

Get by object display

  • Object hidden or Unhidden attribute
  • Layer visibility status
  • Color display value
  • Filter by line type
  • Filter by material

Label or Type


  • Name, GUID, object type
  • Access grasshopper type or rhino document object type 
  • Filter attributes using wild cards or regex expressions 

Order

This component allows single or multiple group names to be assigned. Later names and group names maybe deleted and renamed.

  • Create and filter by group names 
  • Create and filter by layer names
  • Assign full path to layer
  • Create groups/sets from group names 

Microwave

It preserves original associations down stream and preserves attributes. Baking each time breaks associativity as a new grasshopper reference object is created with brand new attributes.

  • Allow attributes of existing rhino document objects to be modified
  • Allow baking of grasshopper objects to new rhino document objects
  • Custom preview of grasshopper objects using assigned attributes
  • Custom preview for user defined pixel width

Pipeline 

This an extension of the original pipeline component that allows syncing to a document as well as filteri of objects based on visibility, hidden state, and allows geometry to be pipes directly from a rhino document file

  • Live sync with a rhino document so taht rhino document objects are streamed to the canvas
  • Read existing rhino document girls and stream contents to canvas

Settings

When getting or setting attribute data the user can define the settings to use. Options include

  • Assign delimiter characters
  • Color formatting output; color system object, string, ARGB, RGB, Win32, OLE, HTML
  • Select or not select attributes that are in a child layer
  • Output full path for layers
  • Use RegEx expressions for filtering string values of attributes

 

Leave a Reply

Your email address will not be published. Required fields are marked *