![]()
General Module Function
The polyline_spline module accepts a 3D polyline and can either increase or decrease the number of line segments of the polyline. A splining algorithm smoothes the line trajectory once the number of points are specified. This module is useful for applications such as a fly over application (along a polyline path drawn by the user). If the user drawn line is jagged with erratically spaced line segments, polyline spline smoothes the path and creates evenly spaced line segments along the path.
Module Input Ports
polyline_spline has one input port. This port should be a 2D or 3D polyline (perhaps from ContinuousSketch or draw_line).
Module Output Ports
polyline_spline has two output ports. The first output port (closest to the left) outputs the 3D or 2D polyline mesh. The second port outputs a renderable version of the polyline mesh to the viewer.

Module Control Panel
The user interface for polyline_spline is shown above.
The output line segment size can be adjusted via two modes; Number of Points mode or Path Step Size mode. Choosing the Number of Points toggle allows line smoothing adjustments by specifying the number of line segments (endpoints). Choosing the Path Step Size toggle allows smoothing adjustments by specifying the step size (in the units of the input mesh). The largest angle between any two line segments created by this module is displayed in the Max Angle of lines field.
If the Spline toggle is selected, the line is segmented and the original line nodes are used to determine the curve of the line. This option preserves the original nodes.
If the Smooth line toggle is ON, the line is both segmented and smoothed. All sharp corners are rounded off, how round the corners are made is determined by the Order, the number of Iterations, and the Smoothing Percentage.
If the Resample After toggle is ON, the line is segmented before and after being smoothed or splined.
The Order slider determines the number of points to be used for splining. More points creates a smoother line that departs more from the original.
The Smoothing Percentage slider determines the degree of smoothing. Higher values creates a smoother line that departs more from the original.
The Iterations slider determines the number of smoothing iterations. This is analogous to multiple polyline_spline modules connected in series. This provides a means to further smooth erratic lines while staying close to the original points.
The Tolerance parameter determines how close two disjoint points must before the two polylines are merged.