Rhodonea (rose) curve generator in CascadeStudio

I remodeled my curve generator in CascadeStudio. I simplified this version (for now, anyway) to generate only rhodonea curves. It is far faster than the OpenSCAD model, and is smoother without having to generate a lot of segments, because it generates a set of Pipes along BSplines instead of generating thousands of polyhedra.

Along the way, I had fun talking to the author of CascadeStudio about this little project.

Or with different parameters:

5 Likes

In Rose (mathematics) - Wikipedia you can find a key to low-order parameters: n and d here are a and b in my model, respectively):

I have a specific use case that requires angled sides. I’m trying to make aluminum rosette “irons” which require some draft angle so that the rosettes can be removed from the iron after cooking. Therefore, my code allows you to set a draft angle; this allows the top surface to be a different thickness from the bottom surface. If this angle is 0° the pipe will have a rectangular cross-section.

Draft angle is useful for molding in general. So whether you are 3D printing a part to burn out for investment casting, making a mold for green sand casting, making a rosette iron, or making a mold for casting plastic, you need some angle on the sides to get the part out of or off the mold.

The radius parameter is the minimal radius of a cylinder centered at the origin and enclosing the center line of the part. Therefore, the part will have an effective radius of the specified radius plus half the specified thickness which is the thickness of the line at the base of the part.

3 Likes

The author of CascadeStudio changed how the controls work when they aren’t being updated in real time, so if you found it hard to adjust the sliders when trying this out previously, try again; now it waits for you to click EVALUATE at the upper right, or F5 (as in OpenSCAD), to regenerate.

This let me play around a bit and realize that I had broken the draft angle calculation when rewriting the model from OpenSCAD to CascadeStudio. I have updated the OP with the bug-fixed model.

3 Likes

Here’s the discussion of this code in CascadeStudio:

1 Like