GH_PathOffset

References
public class GH_PathOffset
Represents a relative offset within a data structure.

Constructors

GH_PathOffset

#
public GH_PathOffset()

GH_PathOffset

#
public GH_PathOffset(IEnumerable<int> pathShift, int itemShift, bool pathWrap, bool itemWrap)
pathShift (IEnumerable<int>)
itemShift (int)
pathWrap (bool)
itemWrap (bool)

GH_PathOffset

#
public GH_PathOffset(IEnumerable<int> pathShift, int itemShift)
pathShift (IEnumerable<int>)
itemShift (int)

GH_PathOffset

#
public GH_PathOffset(IEnumerable<int> pathShift)
pathShift (IEnumerable<int>)

Properties

ItemOffset

#
public int ItemOffset { get; set; }
Gets or sets the relative offset for branch items.

ItemWrap

#
public bool ItemWrap { get; set; }
Gets or sets the ItemWrap flag.

PathOffset

#
public List<int> PathOffset { get; }
Gets access to the relative offsets for path indices.

PathWrap

#
public bool PathWrap { get; set; }
Gets or sets the PathWrap flag.

Methods

OffsetPath

#
public bool OffsetPath(GH_Path path, int index, IGH_Structure tree, ref GH_Path relativePath, ref int relativeIndex)
Offset a path + index value with wrapping and bounds checking.
path (GH_Path)Path to offset.
index (int)Item to offset.
tree (IGH_Structure)Structure context for offset.
relativePath (ref GH_Path)Offsetted path.
relativeIndex (ref int)Offsetted index.
True on success, false on failure.

OffsetPath

#
public bool OffsetPath(GH_Path path, int index, ref GH_Path rel_path, ref int rel_index)
Offset a path + index value without wrapping.
path (GH_Path)Path to offset.
index (int)Item to offset.
rel_path (ref GH_Path)Offsetted path.
rel_index (ref int)Offsetted index.
True on success, false on failure.

ParseString

#
public static GH_PathOffset ParseString(string mask)
mask (string)

ToString

#
public override string ToString()
Format the Path Offset.
Object.ToString