Click or drag to resize

GH_Path 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
SystemObject
  Grasshopper.Kernel.DataGH_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
  NameDescription
Public methodGH_Path
Default constructor, creates a path with zero elements.
Public methodGH_Path(Int32)
Creates a new path with a single element.
Public methodGH_Path(Int32)
Creates a new path from a series of elements.
Public methodGH_Path(GH_Path)
Creates an exact copy of another path.
Top
Properties
  NameDescription
Public propertyDimension
Gets or sets the value of the path at the given dimension index.
Public propertyIndices
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 propertyInternalPath Obsolete.
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 propertyLength
Returns the number of dimensions in the path.
Public propertyValid
Gets whether this path is valid. Invalid paths either have no elements or negative elements.
Top
Methods
  NameDescription
Public methodAppendElement
Create a new path by appending a new index value to this path.
Public methodCompare
Compare two paths. This function determines the Sorting behaviour of paths.
Public methodCompareTo
Compare this path to another path. This function determines the Sorting behaviour of paths.
Public methodCullElement
Removes the last index value from the path. If the path is already empty, nothing will happen.
Public methodCullFirstElement
Removes the first index value from the path. If the path is already empty, nothing will happen.
Public methodFormat
Format a path.
Public methodFromString
Try to deserialize a GH_Path from a String.
Public methodGetHashCode
Specialized Hash code pattern.
(Overrides ObjectGetHashCode.)
Public methodIncrement(Int32)
Increment a specific index in this path by one.
Public methodIncrement(Int32, Int32)
Increment a specific index in this path by one.
Public methodIsAncestor
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 methodIsCoincident(Int32)
Test to see if this path is coincident with set of integers.
Public methodIsCoincident(GH_Path)
Test to see if this path is coincident with another path.
Public methodPrependElement
Create a new path by prepending a new index value to this path.
Public methodRead
Read this path from an archive.
Public methodStatic memberSplitPathLikeString
Try to split up a path-like formatted string "{A;B;C}(i)" into component parts.
Public methodToString
Concatenates the indices in the path.
(Overrides ObjectToString.)
Public methodToString(Boolean)
Concatenates the indices in the path.
Public methodWrite
Write this path to an archive.
Top
Operators
See Also