16.1. Why Node Kits?

Node kits offer a convenient way to create both simple and complex graphs of nodes. Node kits can contain other node kits, a feature that allows you to build hierarchies of kits relative to each other. Some of the advantages of node kits include the following:

  • Node kits organize a number of Inventor nodes into a subgraph that has a higher-level meaning for you. An SoShapeKit SoShapeKit SoShapeKit , for example, can describe a shape that can move and has a particular appearance. The shape and its properties are all packaged into one node kit. You do not need to worry about how the nodes are placed into the graph because the node kit takes care of this organization for you.

  • Node kits are flexible, allowing you to create complex subgraphs that use many Inventor features, or simple subgraphs that use only a few features.

  • Node kits create collections of nodes efficiently. They create only the nodes needed for a particular instance.

  • Node kits provide shortcut routines for creating nodes and setting values in them. Your code is short and easy to read.

  • Through subclassing, you can design your own node kits that are tailored to the kinds of groupings used in your particular application. (See The Inventor Toolmaker, Chapter 7.)