Creating Equation Curves in Fusion 360

Unlike Inventor, Fusion 360 doesn’t support the ability to create a spline based on an equation.  However, using the Fusion 360 API you can create close approximations of equation curves.  You do this by creating a spline through a series of points.  You write code that uses the equation to define the X, Y, and Z coordinates of the points.

Because the points represent a sampling of coordinates along the curve, the result is an approximation, but in most cases is still very close.  You can increase the number of sample points to get a more accurate result but this will result in a more complex curve.  More complex curves will slow down any downstream processes that use the curve.  There’s a balancing point where you want to use as few points as possible but still get the desired accuracy.  The position of the points along the curve is also important.  For example, when computing a spline curve, you want to have a sample point at the peak of the amplitude so you capture the full height of the curve.

Example 1 (Archimedean Spiral)

Here are a couple of examples that illustrate how this works.  The first one is based on a question in the Fusion 360 API Forum, which prompted me to create this post.  The equation is one for an Archimedean spiral.  From the Wikipedia article you’ll see that the equation is:

r = a + bθ

And here’s my conversion of that equation into some code that creates a series of points along the equation curve and then creates a spline using those points.  In lines 16-20, I’m defining the various inputs for the equation and some other settings to control the number of points that are generated.  In lines 21-25, I’m looping to create the points based on the equation.  And finally, in line 29 it creates the fitted spline using the points.

Example 2 (Sin Wave)

Here’s a very similar program but it uses the sin function as the equation to drive the curve.  Hopefully, you can see that it should be possible to incorporate any equation.

3D Curves

The two previous examples created 2D curves but that’s only because I set the Z component of the point to be zero. I could just have easily set a Z value to create a 3D curve too.  Below is a section of the Archimedean Spiral example where the Z value is decreasing for each point, so the center portion of the spiral protrudes.

Below is a model created from the resulting spline by lofting between two circles and using the spline as a guide.

Leave a Comment

This is a demo store for testing purposes — no orders shall be fulfilled. Dismiss