# Master Splines in SolidWorks – Part 1

CAD expert takes a deep dive into SolidWorks 2014's new Style Spline.

By now you’ve heard about the new Style Spline in SOLIDWORKS 2014. If so, you’re probably wondering what makes it different from the spline that’s already available, why Style Spline may be useful to you, and when you may want to use it. In this 3-part series we’ll be answering those questions.

First, the Style Spline actually isn’t something new in the world of CAD. It’s an entity that’s been around for a long time, but is sometimes overlooked. It’s called a Bézier curve. This type of curve is commonly referred to as a “spline”, but it’s something a little different from the spline currently offered in SOLIDWORKS, classified as a B-Spline. Let’s take a look under the hood.

The math involved in calculating a Bézier curve uses a single polynomial called the Bernstein Polynomial. The curve is defined by the position of control vertices, or CV’s as they’re commonly called. Together they form the control polygon, or “hull” of the curve. Along the curve, there are no through points like you see on the current spline, so it’s considered “single span”. The degree of the curve, or the order of the underlying polynomial, depends on how many control points there are. The more control points, the higher the degree of the curve, the more complex you can make its shape. By looking at the control polygon, the degree of the curve is always equal to the number of CV’s minus 1.

B-Splines, on the other hand, use multiple polynomials to achieve their shape, and are a generalization of multiple curves. Think of a B-Spline as a series of overlapping, or connected, curves. The regions in between each through point are called “spans”, so it is possible to have multiple spans. The user can also weight the tangency and control the vector at each through point. These controls give a B-Spline the capability of making very complex curves very easily. If you show the control polygon on our B-Spline (RMB on the spline -> Display Control Polygon), things aren’t as straight forward as the Bézier curve. The degree and number of generalized curves that make up the overall shape is not controlled by the user, but rather by an algorithm that adjusts depending on how much control the user requests of the curve (curvature constraints applied at the endpoints, spline handle manipulation at each through point).

Note that as you pull on spline handles and apply constraints at the endpoints, the control polygon adds new CV’s. These new CV’s accommodate the extra degrees of freedom the user is requesting. It can also, however, allow the curve to get a little… unruly, shall we say? This added complexity can adversely affect the overall smoothness of the curve, introducing small deviations, bumps, and wrinkles which may not be immediately visible in the curve, but that can show up in the resulting geometry that uses the curve. If smoothness (aesthetics, ergonomics) is your goal, we want to keep the curve as simple as possible, adding complexity (more control) only when necessary.

Both curves have their advantages and disadvantages, and that’s what we’ll explain in Part 2 of the series. However, put simply, a Bézier curve is simpler than a B-Spline. This diagram is a good visual of the curves that are available in SolidWorks, in order of increasing flexibility, as well as mathematical complexity.

So what does all this mean? The reason SolidWorks added the Style Spline is not to replace anything that we currently have, but to provide something better suited for certain jobs. As you can see, the math involved is easier than a B-Spline, but more complex than a conic. It’s another tool in your toolbox, and the key is knowing when to use it and why.

Be sure to check out Hawk Ridge System’s blog for Part 2 and 3 of the series. This video, from the company’s YouTube channel, shows the Style Spline in action.

www.hawkridgesys.com

*Todd Domke is the Hawk Ridge Systems Product Manager for SolidWorks 3D CAD, and holds a number of certifications, including Certified SolidWorks Expert.*

## Leave a Reply