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 and non-parametric rules, and emergence.

 

Download

Download the SortalGI Grasshopper plug-in: sgi_gh_v050.zip (version 0.5.0)
This is the latest version. The pRule component now allows for the specification predicates and directives. Predicates serve to express special conditions on the application of a parametric rule. The Void Predicate component creates a predicate that requires the specified polygonal area to be devoid of any geometry. Directives are specifications that guide parametric rule application. The Distance Directive component creates a directive that indicates the distance between a new spatial element and an existing spatial element. The Matches component returns the matches of a rule application, without actually applying the rule; the Apply All Together component applies a rule in parallel to all matches and returns the result as a single shape/geometry; and the Sum All component combines a list of shapes together. There are also new components to assist in constructing shape descriptions.

The previous version is still available for download: sgi_gh_v040.zip (version 0.4.0)
The shape (and dShape) component accepts points, text points, lines, polylines, (flat) surfaces, meshes, boundary representations, circles, ellipses, (circular) arcs and/or quadratic Bezier curves. A new pRule component allows for the specification of parametric rules. The matching mechanism for parametric rules uses a combinatorial approach of infinite lines that carry any line segments in the given shape, and uses parallelism and perpendicularity of lines as matching constraints, as well as to whether an intersection points falls inside, outside or is an endpoint of any line segment on each infinite line. A new derive component accepts a list of rule objects and applies each in sequence.

 

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 sortal-setup folder, a components folder, a sample folder and a user manual (PDF document).

  • The sortal-setup folder contains a setup batch file and a number of support packages, including the SortalGI (Python) library.
  • The components folder contains the Grasshopper user objects that give access to (part of) the functionality of the SortalGI (Python) sortal grammar interpreter.
  • The sample folder offers a few demonstrations of the use of the SortalGI Grasshopper plug-in.
  • SortalGI plug-in user manual 05 provides information on the plug-in, installation instructions for Windows, explanation on all of the components and their usage, and detailed information on specifying descriptions.

The installation involves two steps. The first step is the installation of the SortalGI library, the second step is the installation of the SortalGI plug-in user objects. These steps are also explained in the SortalGI plug-in user manual 05 instructions.

  1. Execute the setup.bat batch file which can be found in the sortal-setup folder. This will copy the content of the sortal-setup\site-packages folder into the Plug-ins\IronPython\Lib\site-packages folder of your Rhino installation folder, as well as copy the sortal-setup\sortal-packages\sortal folder into the Plug-ins\IronPython\Lib folder. Alternatively, you can do so manually.
  2. Next, add the Plug-ins\IronPython\Lib\site-packages folder of your Rhino installation folder into Rhino's Module Search Paths.
    • Launch 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'.
  3. Open Grasshopper and select the 'User Object Folder', under 'Special Folders', from the File menu. Copy the content of the sgi_components folder into the UserObjects folder.
  4. Exit Rhino and relaunch Rhino. 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 05 for information on the different components available and their usage.

 

Use

The demo folder contains a number of grasshopper demonstration files

  • rules 1 creation.gh shows the creation of 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.
  • rules 2 application.gh illustrates the concept of emergence. It shows a derivation (Knight, 2003)1 applying the two rules created above, using a series of Apply nodes.

  • rules 3 exploration.gh shows an extended derivation of all possible rule applications over two steps, applying the two rules created above, using two Apply All nodes.

  • inscribed square.gh 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.gh 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. In a future version we will remove the need for this.

  • curves.gh illustrates the use of quadratic bezier curves. It shows a derivation (Jowers and Earl, 2011) of a Celtic knotwork. (This is only available in version 0.4.0)

  • ice_ray_lattice.gh illustrates the specification and application of parametric 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. Note that at this point it is hard to ensure a 'nice' ice-ray lattice, because the splitting points are randomly identified on the respective line segments. In a future version we will provide the means to control this better.

  • generate a simple massing.gh illustrates the specification and application of parametric rules using descriptions, predicates and directives. It determines all void rectangles (plots) in a figure, scales each rectangle (footprint) a given distance (border), extrudes each rectangle 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). Note that at this point it only works with rectangles and not yet with more general quadrilaterals. This will be resolved in a future version.

 

  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: 21 August 2018, webmaster @ sortal.org