IGH_Structure
Base interface for all GH_Structure types.
Namespace: Grasshopper.Kernel.Data
Assembly: Grasshopper (in Grasshopper.dll)
Syntax
public interface IGH_Structure
The IGH_Structure type exposes the following members.
Properties
Name
Description
Public Property
Branch.GH_Path.
Gets a limited access pointer to the data list associated with a certain path.
Public Property
Branch.Int32.
Gets a limited access pointer to the data list at the specified index.
Public Property
DataCount
Gets the total number of data items stored in all paths.
Public Property
IsEmpty
Gets the Empty state of the structure. If the structure is Empty when it contains no paths and no branches.
Public Property
Path
Gets the data path at the specified index.
Public Property
PathCount
Gets the number of paths defined in this structure.
Public Property
Paths
Gets a list of all the paths in this structure.
Public Property
StructureProxy
Gets a proxy list of all the data-arrays in this structure
Public Property
TopologyDescription
Gets a description of the topology of the structure. Useful for debugging purposes.
Methods
Name
Description
Public Method
AllData
Gets an enumerator for all the data items in this structure.
Public Method
Clear
Clears the entire structure.
Public Method
ClearData
Removes all data from all paths without affecting the structure topology.
Public Method
DataDescription
Gets a description of the data contained in this structure.
Public Method
EnsureCapacity
Ensures that all branches have a certain capacity
Public Method
ExpandPath
Expand a path in this structure by appending an element.
Public Method
Flatten
Flattens the entire structure into a single path.
Public Method
Graft(GH_GraftMode)
Grafts all paths by reallocating all data into child paths.
Public Method
Graft(GH_GraftMode, GH_Path)
Grafts a specific path by reallocating all data into child paths. If a grafted path coincides with an existing path, the data item in question will be appended to the existing path.
Public Method
LongestPathIndex
Finds the path in this structure with the most dimensions. In case of multiple equally long longest paths, the last one will be returned.
Public Method
PathExists
Returns True if the specified path is already defined inside the structure.
Public Method
PathIndex
Find the indices that delineate the given path domain.
Public Method
RemovePath
Removes a path and all associated data from the structure. If the path doesn’t exist, nothing will happen.
Public Method
ReplacePath
Replace an existing path with a different one. If the operation is successfull, then the ‘find’ path will be deleted. If the ‘replace’ path is already defined, the items in ‘find’ will be appended to the existing path.
Public Method
ShortestPathIndex
Finds the path in this structure with the least dimensions. In case of multiple equally long longest paths, the first one will be returned.
Public Method
Simplify
Simplify the data structure by removing path indices shared by all branches.
Public Method
TrimExcess
Trims the excess allocated memory in all branches