Cockatoo
(by Max Eschenbach)
Cockatoo is a prototypical open-source software toolkit for generating (3d-)knitting patterns directly inside Grasshopper.
Support Email

Cockatoo

Cockatoo is a prototypical open-source software toolkit for generating (3d-)knitting patterns from NURBS surface and mesh geometry. It is implemented as a Python module for use within Rhino 6 / 7 aswell as Grasshopper.

COCKATOO IS IN AN EARLY DEVELOPMENT STAGE. PLEASE HELP IN MAKING THIS SOFTWARE BETTER BY TESTING AND SUBMITTING ANY ISSUES YOU ENCOUNTER!

Purpose & Origins

The purpose of this project is to enable Rhino and Grasshopper to automatically derive (3d-)knitting patterns for computerized knitting machines from NURBS surfaces and unstructured triangle meshes. The absence of such a freely available open-source toolkit marks the origin point for this project. Programming Cockatoo was only possible thanks to some brilliant research done by lots of other people. Please check the Sources & References section if you're curious.

This open-source software prototype constitutes the practical part of my diploma project Knit Relaxation - Knit Membranes for Textile (Interior) Architecture (original german title: Knit Relaxation - Membrangestricke für Textile (Innen-)Architektur) in the product design department at Kunsthochschule Kassel.

Python Module

  • All datastructures, core logic and algorithms are defined in the cockatoo python module.
  • This module is developed to be compatible with IronPython (for more info, see the Pecularities section).
  • The RhinoCommon API is used to handle all geometric operations.
  • The networkx module is used to handle all the necessary graph operations (for more info, see the Pecularities section).
  • An API documentation for the python module is available here.

Rhino Integration

The cockatoo module can be used from within Rhino.Python scripts as well as from within Grasshopper through the GHPython scriptable component.

Grasshopper Components

Cockatoo includes a set of Grasshopper components (UserObjects), which provide a user interface to the underlying python module without the need of scripting.

Extendability

The python module as well as the UserObjects are designed to be open for extension. Everything is open-source and available through a GitHub Repository.

Pecularities

  1. Development Environment
    The RhinoPython and GHPython development environments are very, very special. I am not going to write in-depth about this here. Everybody who is working with these tools on a regular basis should have come accross their oddities. If not - most information about these topics is available in the Rhino Developer Docs.
     
  2. Graph Library
    To do all the juicy graph stuff, Cockatoo uses NetworkX. To be more specific, an older version - NetworkX 1.5 is used for... well, reasons. This specific networkx module was modified in some places and is therefore bundled with Cockatoo! Using a different version might be possible but may also lead to errors.
     
  3. Partial Dependencies
    Some of the UserObjects rely on Kangaroo 2. Since this is shipped with Rhino since Version 6, everything should work smoothly. The Kangaroo 2 installation should be found by the UserObjects automagically. If any hiccups occur, please let me know.

    There is one UserObject that relies on Plankton being installed, although it's just a small utility. If Plankton is already installed everything should be found automagically, otherwise you'd first have to install Plankton. If any hiccups occur with this, please also let me know.

Examples & Usage

If everything is installed correctly, you should be able to open the example file provided in Examples. For a demo, you can also have a look at the demonstration video.

For guidance on using the API provided through the python module directly, please have a look at the documentation

Testing & Contributing

  1. You are invited to participate!
    Contributing is easy as Pi (well...easier, actually). First off, Cockatoo needs software testing to find bugs and make it more robust. So just by trying out Cockatoo out of curiosity, you can actually help!

    If you find a bug (which is very likely because they always sneak in somewhere) please tell me about it by submitting an issue so I can improve Cockatoo further.
     
  2. Testing
    A sad truth is that I currently don't have access to a computerized knitting machine. As a consequence, it was not possible to actually test or verify a knitting pattern generated by Cockatoo in the real world, yet. If you have access to a machine and you would be willing to collaborate with me in testing, I would be more than happy!

    Also, if you know a thing or two about computational knitting and find a fundamental (or minor) mistake in the workings of Cockatoo, please let me know. I'm always eager to learn from others and fix mistakes.
     
  3. Code
    If you're willing to contribute to Cockatoo by writing new code or improving existing code, that's great! Please have a look at the contribution guidelines.

Sources & References

This section states the most important sources used in writing this software. The full and proper list of sources is - of course - available in the written version of the diploma thesis.

  • Cherif, Chokri: Textile Werkstoffe für den Leichtbau. Techniken - Verfahren - Materialien - Eigenschaften.
  • CITAstudio: Textile. Light. Architecture. SOFT SPACES
  • Hagberg, Aric; Schult, Dan; Swart, Pieter: NetworkX 1.5
  • McCann, James; Albaugh, Lea; Narayanan, Vidya; Grow, April; Matusik, Wojciech; Mankoff, Jen; Hodgins, Jessica: A Compiler for 3D Machine Knitting
  • Narayanan, Vidya; Albaugh, Lea; Hodgins, Jessica; Coros, Stelian; McCann, James: Automatic Machine Knitting of 3D Meshes
  • Narayanan, Vidya; Wu, Kui; Yuksel, Cem; McCann, James: Visual Knitting Machine Programming
  • Popescu, Mariana; Rippmann, Matthias; van Mele, Tom; Block, Philippe: Automated Generation of Knit Patterns for Non-developable Surfaces
  • Popescu, Mariana: KnitCrete - Stay-in-place knitted formworks for complex concrete structures
  • Thomsen, Mette Ramsgaard; Tamke, Martin; Deleuran, Anders Holden; Tinning, Ida Katrine Friis; Evers, Henrik Leander; Gengnagel, Christoph; Schmeck, Michel: »Hybrid Tower, Designing Soft Structures«. In: Modelling behaviour. Design Modelling Symposium 2015, hrsg. von Mette Ramsgaard Thomsen, Martin Tamke, Christoph Gengnagel, Billie Faircloth und Fabian Scheurer. Cham/Heidelberg/New York/Dordrecht/London 2015
  • Ramsgaard Thomsen, Mette; Tamke, Martin; Ayres, Phil; Nicholas, Paul: CITA Complex Modelling, Toronto 2019
  • Van Mele, Tom; others, many: COMPAS: A framework for computational research in architecture and structures

Licensing

  • Original code is licensed under the MIT License.
  • NetworkX is licensed under the 3-clause BSD license which can be found in licenses/networkx.
  • Some code snippets from the COMPAS framework are used within this software. This code is licensed under the MIT License which can be found in licenses/COMPAS.
  • Some code snippets by Anders Holden Deleuran are used with permission. They originate from gists and the FAHS pipeline, kindly provided by Anders. This code is licensed under the Apache License 2.0 which can be found in licenses/ahd.
License:
Reviews