Node3List

References
public class Node3List
Represents a list of (un)sorted nodes.

Constructors

Node3List

#
public Node3List()

Node3List

#
public Node3List(IEnumerable<GH_Point> pts)
pts (IEnumerable<GH_Point>)

Node3List

#
public Node3List(IEnumerable<Node3> L)
L (IEnumerable<Node3>)

Node3List

#
public Node3List(IEnumerable<Point3d> pts)
pts (IEnumerable<Point3d>)

Node3List

#
public Node3List(Node3List L)
L (Node3List)

Properties

Capacity

#
public int Capacity { get; set; }
Gets or sets the capacity of this list (i.e. the number of items this list can contain without resizing)

Count

#
public int Count { get; }
Get the number of nodes contained in this list.

InternalList

#
public List<Node3> InternalList { get; set; }

Indexers

Node

#
public Node3 this[int i] { get; set; }
Get or set a node. Be sure to call ExpireSequence() if your change affects sorting caches.
i (int)Index of node

Methods

Append

#
public void Append(Node3 node)
Add a single node to this list. This will reset all sorting flags and caches.
node (Node3)Node to add

AppendRange

#
public void AppendRange(IEnumerable<Node3> nodes)
Add a range of nodes to this list. This will reset all sorting flags and caches.
nodes (IEnumerable<Node3>)Nodes to add

BinarySearch_I

#
public int BinarySearch_I(int i)
i (int)

BinarySearch_X

#
public int BinarySearch_X(double x)
x (double)

BinarySearch_Y

#
public int BinarySearch_Y(double y)
y (double)

BinarySearch_Z

#
public int BinarySearch_Z(double z)
z (double)

BoundingBox

#
public bool BoundingBox(double GrowthFactor, bool ForceSquareLeaves, ref double x0, ref double x1, ref double y0, ref double y1, ref double z0, ref double z1)
Compute the bounding box of all Nodes.
GrowthFactor (double)Factor by which to grow the boundingbox
ForceSquareLeaves (bool)If True, the boundingbox will be renormalized
x0 (ref double)
x1 (ref double)
y0 (ref double)
y1 (ref double)
z0 (ref double)
z1 (ref double)

Clear

#
public void Clear()

CreateTree

#
public Node3Tree CreateTree(double GrowthFactor, bool SquareLeaves, int GroupLimit)
Create a Node3Tree that contains all the Nodes in this list.
GrowthFactor (double)Factor by which to grow the boundingbox of the topmost Leaf
SquareLeaves (bool)If True, the boundingbox will be normalized
GroupLimit (int)Maximum number of Nodes that are allowed to share a single Leaf

CullDuplicates

#
public int CullDuplicates()
Removes all duplicates from this list. It also removes ALL null references.

CullNullRefs

#
public int CullNullRefs()
Remove all null references from this list.

ExpireSequence

#
public void ExpireSequence()
Call this method when you made a change that potentially invalidates the sorting flags and caches.

Insert

#
public void Insert(int index, Node3 node)
Insert a single node into this list. This will reset all sorting flags and caches.
index (int)Index at which to insert the node
node (Node3)Node to add

InsertRange

#
public void InsertRange(int index, IEnumerable<Node3> nodes)
Insert a range of nodes into this list. This will reset all sorting flags and caches.
index (int)Index at which insertion begins
nodes (IEnumerable<Node3>)Nodes to add

JitterNodes

#
public void JitterNodes(double amount)
Randomly mutate all node locations
amount (double)Maximum distance to move in x and y directions.

NearestNodes

#
public List<int> NearestNodes(double x, double y, double z, int N, double min_dist_squared = -1.7976931348623157E+308, double max_dist_squared = 1.7976931348623157E+308)
Perform a brute force node search for the N nearest nodes in the set.
x (double)X coordinate of search start.
y (double)Y coordinate of search start.
z (double)Z coordinate of search start.
N (int)
min_dist_squared (double = -1.7976931348623157E+308)Minimum distance threshold, use any negative value to ignore this setting.
max_dist_squared (double = 1.7976931348623157E+308)Maximum distance threshold.
The N (or fewer) results, sorted by ascending distance.

NullifyDuplicates

#
public int NullifyDuplicates()
Set all duplicate nodes to NULL

Remove

#
public bool Remove(Node3 node)
Remove a single node from this list. Sorting flags are maintained but caches are destroyed.
node (Node3)Node to remove.
True on success, false if the provided Node does not occur in this list.

RemoveAt

#
public void RemoveAt(int index)
Remove the node at the specified index. Sorting flags are maintained but caches are destroyed.
index (int)Index of node to remove

RenumberNodes

#
public void RenumberNodes()
Reset all indices of all nodes by renumbering them in their current order. Nulls are ignored but they do affect the numbering.

Sort

#
public void Sort(NodeListSort type)
Sort the list using a sorting type.
type (Node3List.NodeListSort)Type of sorting algorithm.