Skip to content

GH_Path

Public Class

Describes the path in structure space of a data item or a list of items. A path consists of a series of integers, each one of which represents an index in a branch structure.

Inheritance Hierarchy

System.Object
Grasshopper.Kernel.Data.GH_Path

Namespace: Grasshopper.Kernel.Data

Assembly: Grasshopper (in Grasshopper.dll)

Syntax

public class GH_Path : IComparable<GH_Path>,
IComparer<GH_Path>, GH_ISerializable

The GH_Path type exposes the following members.

Constructors

Name

Description


Public Method

Default constructor, creates a path with zero elements.


Public Method

Creates an exact copy of another path.


Public Method

Creates a new path with a single element.


Public Method

Creates a new path from a series of elements.


Properties

Name

Description


Public Property

Gets or sets the entire index space; the path that identifies an element in structure space. You should not change the index space when the path is used inside a structure since it will invalidate the sort order. If you don’t know what you’re doing, for Pete’s sake don’t touch this.


Public Property

Returns the number of dimensions in the path.


Public Property

Gets whether this path is valid. Invalid paths either have no elements or negative elements.


Methods

Name

Description


Public Method

Create a new path by appending a new index value to this path.


Public Method

Compare two paths. This function determines the Sorting behaviour of paths.


Public Method

Compare this path to another path. This function determines the Sorting behaviour of paths.


Public Method

Removes the last index value from the path. If the path is already empty, nothing will happen.


Public Method

Removes the first index value from the path. If the path is already empty, nothing will happen.


Public Method

Format a path.


Public Method

Try to deserialize a GH_Path from a String.


Public Method

Specialized Hash code pattern.

(Overrides Object.GetHashCode..)


Public Method

Increment a specific index in this path by one.


Public Method

Increment a specific index in this path by one.


Public Method

Test another path to see if it is an ancestor of this path. For a path to be considered an ancestor, it must share the initial dimensions.


Public Method

Test to see if this path is coincident with another path.


Public Method

Test to see if this path is coincident with set of integers.


Public Method

Create a new path by prepending a new index value to this path.


Public Method

Read this path from an archive.


Public Method
Static Member

Try to split up a path-like formatted string “{A;B;C}(i)” into component parts.


Public Method

Concatenates the indices in the path.

(Overrides Object.ToString..)


Public Method

Concatenates the indices in the path.


Public Method

Write this path to an archive.


Operators

Name

Description


Public Operator
Static Member
Equality
Public Operator
Static Member
GreaterThan
Public Operator
Static Member
Inequality
Public Operator
Static Member
LessThan