Sort Curves By Axis
Sorts a tree of curves based on their bounding box center along a specific axis.
Overview
Sorts a tree of curves based on their bounding box center along a specific axis.
Inputs (3)
- Curves (Curve): Tree of curves to sort
- Axis (Integer): Sort Axis (0=X, 1=Y, 2=Z)
- Reverse (Boolean): Reverse sorting direction
Outputs (1)
- Sorted Curves (Curve): Sorted tree of curves
Method, assumptions and simplifications
The same notes appear in the component's Info output.
Method
- In each branch, sorts the curves by the X, Y or Z coordinate (Axis 0, 1, else 2) of their bounding-box centre, ascending, or descending with Reverse.
Assumptions
- The bounding-box centre is a good proxy for the curve position.
Simplifications and limits
- Null curves are removed, so the output can be shorter than the input.