Tutorials PartCraft help Walkthroughs

Nodes: build a model by wiring

Wire numbers into points, points into curves, curves into surfaces. Change a number and everything downstream rebuilds. Every node is also a line of CraftScript, and the graph is saved in the file.

Written for PartCraft 0.8. The same help is inside the app: press F1.

The Nodes editor builds geometry by wiring boxes together. Each box (a node) does one small job: make a number, a point, a circle, a loft. You connect the result of one to the input of the next, and the model follows when you change a number at the start.

Open it from the workspace list: Nodes. It opens the editor window. A part that already has a graph shows it when you open the workspace. It is a window over the 3D view: drag its title bar to move it, drag its corner to resize it.

Wiring

  1. Pick a node from the list on the left (type in the search box to narrow it, <kbd>Enter</kbd> adds the first match). It appears in the middle of the canvas.
  2. Drag from a round output dot on the right of one node to a round input dot on the left of another. The dot turns green when it fits and red when it does not; point at it for the reason.
  3. An input with nothing connected shows a box for a typed value. Type a number and press <kbd>Tab</kbd>: the result rebuilds.
  4. The small circle in a node's title bar is its eye. A node with the eye on is drawn in the 3D view, as lines for curves, shaded for surfaces, dots for points.

Drag a node by its title bar. Drag the background to pan, turn the wheel to zoom. <kbd>Delete</kbd> removes the selected node. Tidy arranges the nodes in columns, Fit brings them all into view, Undo and Redo step through your edits.

Types and units

Ports have a type: number, yes/no, point, vector, curve, surface, mesh, or "geometry" for any of those. A point can feed a vector input and back. Numbers carry a unit: a length is in millimetres and an angle is in degrees. A length cannot feed an angle, and a length times a length (an area) is refused, so a wrong wire is stopped when you make it.

A square dot is a list. When a list reaches a single-value input the node runs once for each item, and its result becomes a list. The shorter list repeats its last item. For example, a Series of heights into Move makes a stack of copies.

Errors

A node that cannot do its job says why under its name, in red ("The radius must be above zero."), and the nodes after it wait. The same message is a Problem in the Problems panel, so you can find it from there.

Every node is a line of script

Press Script to see the graph as CraftScript: one line per node, such as n3 = nd_circle(n2, n1, [0 0 1]);. Edit the text and press Make the graph from this script to bring it back as a graph. The same nd_ functions work in a CraftScript in PartCraft, so a graph can be run, looped or tested there. Random numbers always take a seed, so the same graph gives the same result on every computer.

Saved with the file

The graph is saved in the part file (not in the history, so Undo in the editor is its own). The nodes make curves, surfaces and meshes beside the solid: they do not change the part's features.