Spline

PotterDraw

Spline

The spline lets you to draw the pot's outer wall using a series of curves or lines. The spline determines the radius of each of the pot's rings.

Segments and nodes

The spline consists of one or more segments. Each segment can be a Bézier curve or a straight line. The segments join at nodes. When a segment is selected, its nodes are displayed as small hollow squares. A Bézier segment also has two control points, which can be moved to adjust the curve. The control points are displayed as small solid squares, connected to their corresponding nodes by lines called curve vectors. To change the shape of a Bézier segment, drag its control points and/or its nodes.

There are three types of nodes. A node's type determines how the two curve vectors sharing that node are constrained.

Node TypeConstraint
CuspNo constraint; use this type to create a sharp corner between two adjacent curves.
SmoothThe two curve vectors meeting at the node are constrained to be co-linear and opposite.
SymmetricalSimilar to smooth, but the curve vectors are additionally constrained to be the same length.

Shape limitations

For normal operation, the entire spline must be positive in X, i.e. it should be entirely to the right of the x-axis. If the spline crosses the x-axis, the resulting pot will have a discontinuous surface, and won't be 3D-printable.

The spline should also continuously increase in the y-axis. Put another way, the spline should intersect any given y-coordinate no more than once. If this isn't so, PotterDraw will simplify the spline as needed.

Note that only a subset of the possible Bézier curves can be faithfully translated into a 3D mesh. For example, curves that loop or cross themselves won't work properly. For each Bézier segment, if its lower control point is below its lower node, or its upper control point is above its upper node, the segment crosses a y-coordinate more than once and will be simplified.

To check your spline's conformance with the above constraints, use the Mesh Information command.

Navigation and selection

To zoom in or out, position the cursor at the desired location and spin the mouse wheel. The Ctrl+= and Ctrl+- shortcuts also work, and Ctrl+0 resets the zoom.

To pan the spline window, press the middle mouse button and drag the cursor while keeping the middle mouse button pressed.

To select a segment, left-click it. A range of segments can be selected, either by using Shift+left-click, or by drag selecting. To drag select, press the left mouse button and hold it down while dragging the cursor, moving the selection rectangle so that it intersects the desired segments; they will be selected when you release the left mouse button. To cancel a drag select, press Escape.

To select all segments, use Edit/Select All or Ctrl+A. To deselect all segments, left-click in the spline window's background, i.e. somewhere not on the spline.

Changing segment and node types

To change a single segment’s type, right-click the segment and select the desired type from the context menu. To change the type of multiple segments at once, first select the segments and then change their type via Spline/Segment Type in the main menus, or by right-clicking somewhere not on the spline and using the context menu.

Node type works similarly. To change a single node’s type, right-click the node and select the desired type from the context menu. To change the type of multiple nodes at once, first select the segments and then change their node type via Spline/Node Type in the main menus, or by right-clicking somewhere not on the spline and using the context menu.

Adding and removing nodes

To add a node, double-click where the node should go. To delete a node, double-click it. You can also add and delete nodes by right-clicking and using the context menu.

Nodes can be added anywhere except on top of an existing node. If you add a node to a segment, the segment is divided into two segments. If you add a node somewhere else, a new segment is added between the nearest end of the spline and the cursor position.

The spline must contain at least one segment, otherwise all the rings will have a radius of zero, resulting in an invisible pot.

Dragging segments and nodes

To move a segment, left-click it anywhere but on its nodes, and drag it while holding down the left mouse button. To move a node or a control point, left-click it and drag it while holding down the left mouse button.

Selected segments can also be moved by left-clicking one of the selected segments anywhere but on its nodes, and then dragging while holding down the left mouse button.

Editing and transformations

Selected spline segments can be cut, copied, pasted and deleted, using the standard Windows editing commands, accessible via the main menu's Edit submenu. Selected spline segments can be also transformed in various ways. They can be translated (moved), scaled, rotated, and flipped horizontally or vertically. All of these transformations are accessible via the main menu's Spline submenu.

Scaling can be proportional (isotropic) or non-proportional (anisotropic). Scaling and rotation can be relative to the origin, or relative to the center of the selected segments. Scaling relative to the origin is useful for changing the size of the entire pot without otherwise changing its geometry.

Grid and rulers

The spline window can display a grid, and the dragging of segments and nodes can be snapped to the grid. To change the grid spacing, use the Grid Setup command in the Spline submenu. The spline window can also display rulers. The opposite wall of the shape can also be displayed. This is useful because the opposite wall is updated continuously during node or segment dragging, whereas the view is normally only updated when the dragging is completed (though this is configurable).

Spline import/export

Splines can be exported or imported as text files containing a series of 2D points which constitute the spline. This allows splines to be generated by or processed by an external program. The format of the spline text file is explained below. For an example, use the export command and then examine the resulting file.

Each line of a spline text file must contain exactly one 2D point. The point’s X and Y values must be separated by one or more tabs or spaces. The first point is the start point of the entire spline. Each subsequent group of three points describes a Bézier curve, specified by its first control point, its second control point, and its end point. After the first curve, each subsequent curve starts at the previous curve's end point. The total number of 2D points in the file must be a multiple of three, plus one for the start point.