Intro_Course_4_3_1 - nasa/gunns GitHub Wiki

Intro Course 4.3.1: Shape Libraries

The majority of objects you’ll put in your networks come from our GunnsDraw shape libraries. These are custom Draw.io shape libraries that contain graphical shapes representing GUNNS links, nodes, spotters, and a few other things. When you drag one of these shapes from a stencil into your network container box, this creates an instance of the class represented by that shape in the exported network code.

There are two domains of shape libraries: GUNNS and User.

GUNNS Libraries

GUNNS libraries are our official libraries in the gunns/draw/libraries repository folder.

  • These contain shapes representing all of the usable run-time classes in gunns/core/ and gunns/aspects/.
  • There are separate libraries for each aspect: Fluid, Thermal, and Electric.
  • There are several libraries for non-aspect things: Generic, Doxygen, Spotters, and Super-Networks.
  • You can open these libraries in Draw.io (see the pictures below):
    • From the menu, select File > Open Library…
      • See the Open Library dropdown and select the aspect you want.
    • From the Shapes window pane, usually on the left side of the Visio window.
      • Select More Shapes > Open Stencil
      • Navigate to the gunns/draw/libraries folder in your gunns repo.
      • Select the library you want and click Open.
  • You can have any or all of the libraries open at the same time. The open libraries are on the left-hand side of the Draw.io window.

The GUNNS Fluid and Generic shape libraries opened:

User Libraries

User libraries are user-developed shape libraries containing their own project-specific shapes.

  • These reside somewhere in the user’s or project’s file domain, not within the gunns/ repo.
  • These shapes instantiate the users’s custom GUNNS links, which also reside outside the gunns/ repo.
  • You can open these libraries the same way as the GUNNS libraries:
    • Select File > Open Library…
    • Navigate to your library file location and Open your file.

Previous Page / Next Page

⚠️ **GitHub.com Fallback** ⚠️