Sortal grammar interpreter (Python)   Index

 

The Python SortalGI sortal grammar interpreter library and API has been developed in the Python programming language and can be used within the Rhino 3D modeling environment.

The SortalGI sortal grammar interpreter supports both parametric and non-parametric shape grammars, including line segments, plane segments, points, (non-parametric) circular and elliptical arcs, labels, weights, colors, enumeratives, and (parametric) descriptions, in 2D and 3D. Emergence is naturally supported.

 

Download

Download the SortalGI library: sortal_3D.zip (version 1.181114)

 

Install

The SortalGI library is made available as a .zip file. After unzipping it, you will find a folder including, among others, the following components: a sortal-setup folder, a sortalgi folder, a documentation folder, and a demos folder.

  • The sortal-setup folder contains a setup batch file and a number of support packages, including the SortalGI library.
  • The sortalgi folder contains the application programming interface (API) to access the library from within Rhino, organized into three components:
    • The _init_.py file lists all API methods, including Rhino-specific methods and legacy methods. Legacy methods are defined within the same file, these include setting up the sortal library (which can be overwritten depending on the user's preferences) and two methods that adopt an agnostic shape description that lies between the Rhino-specific representation and the SortalGI representation for shapes (creating a rule and finding rule applications).
    • The sortal_api subfolder contains all (non-legacy) API methods, e.g., for creating a shape, creating a rule, creating a 'flow' (composite shape rule), finding rule applications, drawing shapes and rules, altering and querying shapes, rules and flows, 'maximalizing' a shape, checking whether one shape is a subshape of another shape, and reading and writing an SDL (Sortal Description Language) file.
    • The agnostic_api subfolder contains a few more legacy methods, e.g., to create a shape from an agnostic shape description or to draw or visualize an agnostic result.
  • The documentation folder contains installation instructions and API documentation.
  • The demos folder contains a python demo sub-folder for use with the Spyder Python development environment within Anaconda, and a rhino demo sub-folder for use with Rhino. The latter contains three different demonstrations, for rule creation, flow creation, and the use of predicates and directives.
 
 
 

Last update: 22 November 2018, webmaster @ sortal.org