Kinked Curve¶
Functionality¶
This node generates a “kinky” curve, i.e. a curve that is smooth in some places and sharp in others. The node allows the ability to control a specific angle threshold where the curve will transition from a kinked line to a smooth interpolated curve.
This node calculates angles between consequent segments of a polyline built from original points; if the angle at a point is less than specified threshold, the curve will have sharp angle at this point; otherwise, the curve will be smooth.
The node generates a separate Curve object for each smooth segment of a curve; these segments can be optionally concatenated into one Curve object.
Inputs¶
This node has the following inputs:
Vertices. The vertices to interpolate between. This input is mandatory.
AngleThreshold. Threshold of the angle between points, which defines at which points the curve will have sharp corners. The value is expected in radians. The default value is
pi/6
.
Parameters¶
This node has the following parameters:
Concatenate. If checked, the node will output single Curve object for each set of points. Otherwise, it will generate a separate Curve object for each smooth segment of the curve. Checked by default.
Cyclic. If checked, the node will generate a cyclic (closed) curve. Unchecked by default.
NURBS output. This parameter is available in the N panel only. If checked, the node will output a NURBS curve. Built-in NURBS maths implementation will be used. If not checked, the node will output generic concatenated curve from several straight segments and circular arcs. In most cases, there will be no difference; you may wish to output NURBS if you want to use NURBS-specific API methods with generated curve, or if you want to output the result in file format that understands NURBS only. Unchecked by default.
Metric. This parameter is available in the N panel only. This defines the metric used to calculate curve’s T parameter values corresponding to specified curve points. The available values are:
Manhattan
Euclidean
Points (just number of points from the beginning)
Chebyshev.
The default value is Euclidean.
Outputs¶
This node has the following output:
Curve. Generated curve object(s).
Examples of usage¶
A simple example:
Number-> A Number
RADIAND: Number-> Scalar Math
Vector-> Vector sort
Matrix-> Matrix In
Viz-> Viewer Draw Curve
Viz-> Viewer Index+
Scene-> Get Objects Data
Similar example with a closed curve: