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.180819)

 

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 legacy methods and Rhino-specific 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), methods that adopt an agnostic shape description that lies between the Rhino-specific representation and the SortalGI representation for shapes, and methods that generate GUIDS corresponding to one or more rule applications.
    • The rhino_specific subfolder contains all supporting Rhino-specific methods, which are used to interactively impart attribute information such as labels, descriptions, tags, predicates and directives onto Rhino geometry.
    • The sortal_lib_api subfolder contains all other 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, abd reading and writing an SDL (Sortal Description Language) file.
  • 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 Ananconda, 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: 19 August 2018, webmaster @ sortal.org