# PathNode class

Namespace: [Grasshopper2.Data](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.data.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public sealed class PathNode : IEquatable<PathNode>, IComparable<PathNode>
```

A single node in a recursive path structure. This is an alternate way to represent multiple paths, particularly handy for diagramming purposes.

## Constructors

- [PathNode](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.pathnode/ctor.md): (2 overloads) Create a new root node.

## Properties

- [AllNodes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.pathnode/allnodes.md): Recurse over this node and all child nodes.
- [Count](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.pathnode/count.md): Gets the number of child nodes.
- [DiagramColour](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.pathnode/diagramcolour.md): Property for storing the diagram colour of this node.
- [DiagramCurve](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.pathnode/diagramcurve.md): Property for storing the diagram curve leading up to this node.
- [DiagramDot](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.pathnode/diagramdot.md): Property for storing the diagram textdot of this node.
- [Leaf](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.pathnode/leaf.md): Gets whether this node represents a full path. This property might change over time from false to true, as more paths are inserted into a node-graph.
- [Path](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.pathnode/path.md): Gets the (possibly partial) path from the root up to this node.
- [Root](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.pathnode/root.md): Gets whether this node represents the root. This property never changes.

## Indexers

- [this[]](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.pathnode/item.md): Gets the child node at the given index.

## Methods

- [CompareTo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.pathnode/compareto.md)
- [Equals](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.pathnode/equals.md): (2 overloads)
- [GetHashCode](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.pathnode/gethashcode.md)
- [Insert](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.pathnode/insert.md): Insert a new path into this node. Full paths should only be inserted into the root node.
- [ResolveColour](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.pathnode/resolvecolour.md): Resolve the colour of this node based on the average of all child nodes. Before calling this method, ensure that all Leaf nodes in the entire hierarchy have had their colour assigned.
- [ToString](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.pathnode/tostring.md)
