Sortal grammar interpreter (Grasshopper)   Index

 

The SortalGI Grasshopper plug-in encapsulates the SortalGI sortal grammar interpreter and makes part of its functionality available within Rhino/Grasshopper.

The SortalGI Grasshopper plug-in supports points, line segments, plane segments, circles, ellipses, (circular) arcs and quadratic Bezier curves, labelled points and descriptions. It supports both parametric-associative and non-parametric rules, and emergence.

 

Download

Download the SortalGI Grasshopper plug-in: sgi_gh_v110.zip (version 1.1.0)
This is the latest version, including new (description) components, new examples, new component icons, and bug fixes.

 

Install

The SortalGI Grasshopper plug-in is made available as a .zip file. After unzipping it, you will find a folder containing the following components: a lib folder, a user objects folder, a samples folder and a user manual (PDF document).

  • The lib folder contains all Python support packages, including the SortalGI (Python) library.
  • The user objects folder contains the Grasshopper user objects that give access to (part of) the functionality of the SortalGI (Python) sortal grammar interpreter.
  • The samples folder offer demonstrations of the use of the SortalGI Grasshopper plug-in.
  • SortalGI plug-in user manual 11 provides information on the plug-in, installation instructions, explanation on all of the components and their usage, and detailed information on specifying descriptions.

The installation involves three steps. The first, preparatory step only needs to be done once, and only on Windows. The second step is to install the SortalGI library in a place where Rhino can find it. The third step is to install the SortalGI plug-in (user objects) for Grasshopper. These steps are also explained in the SortalGI plug-in user manual 11 instructions.

  • Step 1a [Windows]: Installing GhPython -- In case of Rhino 5 (Windows only), make sure to download the GhPython Grasshopper Assembly file (gha) from Food4Rhino, choose File > Special Folders > Components folder in Grasshopper and save the gha file in this folder.
  • Step 1b [Windows]: Updating Rhino’s Module Search Paths -- Add the Plug-ins\IronPython\Lib\site-packages folder of your Rhino installation folder into Rhino's Module Search Paths and enable 'Frames'.
    • Open Rhino
    • Type EditPythonScript in the Command box
    • In the Rhino Python Editor window, select 'Options...' from the Tools menu
    • Add the Plug-ins\IronPython\Lib\site-packages folder of your Rhino installation folder into the 'Module Search Paths'
    • Select the Script Engine tab, check the 'Frames Enabled' option and click 'OK'
    • Close Rhino completely
  • Step 2 [Windows]: Installing the SortalGI library -- Copy-paste the content of the lib folder (i.e., the folders sortal and site-packages) into the location C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib or equivalent on your computer. Note:
    • There may already be a site-packages folder in IronPython\Lib, it suffices to add the content of site-packages to this folder.
    • Adding files to the target folder may require admin access. If you do not have admin access, you can choose a different location to hold these files. You must then add the appropriate module search paths in the following step.
  • Step 2 [Mac]: Installing the SortalGI library -- Copy-paste the content of the lib folder (i.e., the folders sortal and site-packages) into the location Macintosh HD/Users/me/Library/Application Support/McNeel/Rhinoceros/6.0/scripts or equivalent on your computer. Unpack site-packages by moving its content to the scripts folder. Note:
    • The Library folder may not be visible. If so, select your home directory in the finder, choose 'Show view options' from the View menu and check 'Show Library Folder'.
    • You cannot choose a different location to hold these files. Rhino 6 for Mac does not (yet) support module search paths.
  • Step 3 [Windows/Mac]: Installing the SortalGI plug-in.
    • Open Rhino and Grasshopper
    • In Grasshopper, choose File > Special Folders > User Objects folder
    • Copy-paste the content of the user objects folder into this UserObjects folder
    • The SortalGI plug-in should now be present as a specific tab in the Grasshopper Components Tab Panel, called 'SGI'.

You are now set to go.

 

Reference

Please refer to the SortalGI plug-in user manual 11 for information on the different components available and their usage.

 

Use

The samples folder contains a number of demonstrations of the use of SortalGI within Rhino and Grasshopper. Some are shown here below, others as part of the gallery.

  • emergence illustrates the concept of emergence with two rules using only line segments (the points that are drawn are not part of the respective shape, these serve as reference points). One rule moves a square diagonally and another moves an L-shape diagonally. It shows a derivation (Knight, 2003)1 applying the two rules, using a series of Apply nodes. It also shows an extended derivation of all possible rule applications over two steps, applying the two rules created above, using two Apply All nodes.

  • step-by-step shows the emergence example in a step-by-step elaboration. Each step is contained in a different gh file.
  • inscribed square illustrates the use of a point to constrain rule application. It shows a derivation (Stiny, 1985) applying a rule to inscribe a square with a rotated square.

  • froebel blocks illustrates the use of labelled points, descriptions and plane segments in 3D. It shows a derivation (Stiny, 1981) composing a design made up of blocks ('oblongs', 'pillars' and 'squares') from Froebel's building gift 6. The parallel description rules extract information form the shape to provide a description of the design, from which a block-by-block description can be derived. Note that compared to Stiny (1981), the derivation uses fewer rules, because the description rules are able to interact with the parallel shape rules. However, the derivation uses an additional labeled point assigned to each pillar.

  • curves illustrates the use of quadratic bezier curves. It shows a derivation (Jowers and Earl, 2011) of a Celtic knotwork.

  • ice ray grammar illustrates the specification and application of parametric-associative rules. It shows a derivation (Stiny, 1977) of a Chinese ice-ray lattice from five rules, each splitting a triangle, quadrilateral or pentagon into two polygons from among triangles, quadrilaterals and pentagons. This is work in progress. ice_ray_lattice.gh randomly assigns the slitting points on the respective line segments. As such, it is hard to ensure a 'nice' ice-ray lattice. quad_splitter.gh shows how with the use of predicates (shortest-line) and directives (point-on-line) one is able to split a quadrilateral more 'nicely'.

  • massing illustrates the specification and application of parametric-associative rules using descriptions, predicates and directives. It determines all void quadrilaterals (plots) in a figure, scales each quad (footprint) a given distance (border), extrudes each quad by a factor dependent on the ratio of the new area wrt the original area (gfa for a given plot ratio) and adds a surface to each face (facade and roof). A variant of this approach determines a rectangular block within the quadrilateral plot before extrusion.

  • flow example illustrates the specification and application of a flow as a composite rule embedding algorithmic patterns of sequence and iteration. The example includes three rules, where he first rule activates any square, but the second rule constrains activation such that never two adjacent sqyuares are both activated. Finally, the third rule replaces the square with a triangle. All possible outcomes are generated. The entire flow is written as '(activate_rule{2} !constrain_rule) triangle rule{2}'

 

  1. T.W. Knight, 2003, Computing with emergence, Environment and Planning B: Planning and Design 30, 125–155.
  2. G. Stiny, 1985, Computing with Form and Meaning in Architecture, Journal of Architectural Education 39(1), 7-19.
  3. G. Stiny, 1981, A note on the description of designs, Environment and Planning B: Planning and Design 8, 257-267.
  4. I. Jowers and C. Earl, 2011, Implementation of curved shape grammars, Environment and Planning B: Planning and Design 38, 616-635.
  5. G. Stiny, 1977, Ice-ray: a note on the generation of Chinese lattice designs, Environment and Planning B: Planning and Design 4(1), 89-98.
 
 
 

Last update: 3 July 2020, webmaster @ sortal.org