3D Printing OpenSCAD Fin Can Generator

The Rocketry Forum

Help Support The Rocketry Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

kalsow

Well-Known Member
Joined
Jan 14, 2010
Messages
239
Reaction score
258
Several people have posted fin can generators. Most of them cannot generate round fillets. I thought, "How hard can that be?" Well, two weeks later I finally have something to share!

The attached script lets you design fin cans. A "fin" is composed of up to three trapezoidal, simple fins. The usual parameters define the gross characteristics of the fin sections: root length, tip length, semi-span, sweep distance, etc. A cool feature of this tool is that you define the thickness of the root and tip with a textual "profile". Basically a profile string is a sequence of (thickness, offset) pairs. A simple diamond shaped fin with razor sharp edges could have a profile like, "0@0; 0.25@50%; 0@100%" . It specifies that the leading edge (at offset 0) has a thickness of 0. The mid point of the fin (at offset 50% of root length) is 1/4" thick. The trailing edge (at offset 100% of root length) has thickness 0. The default for leading and trailing edges is 0 thickness. So the same effect results from the shorter profile "100%@50%". Profile descriptions can use absolute measurements, percentage-based measurements, radius specs for rounded corners, and alignment keys to tie the root and tip profiles together. The same profile strings are used to define the thickness of the fin can. A fuller description of profile strings is in the header comment of the script.

It's pretty easy to run into OpenSCAD limitations with this tool. Razor sharp edges, tiny fillets, and overly smooth curves can cause troubles. Tinkering with the input parameters usually solves the problem.

Here are a few snapshots of the possibilities:
1646435846641.jpeg 1646435877623.jpeg

1646435917625.jpeg1646435951293.jpeg


Enjoy!
 

Attachments

  • FinCanGenerator.scad
    44.1 KB · Views: 16
  • FinCanGenerator.json.txt
    5.2 KB · Views: 11
Wow, that looks very, very nice.
 
Must have missed this. It's quite complicated to use Bill.

The problem I found when trying to do fillets was that it was easy to make the program break. SCAD relies on the 2 component parts being inside each other to make the polygons of the individual components mate. With thin edges I found that difficult to do reliably and I abandoned that approach.
Here's my version. It generates a half fin, translates that by an amount of half the minimum leading edge thickness you set and mirrors that to create the other half. This allows you to set a minimum thickness for the leading edge which should be at a minimum, the minimum size your slicer can render and your printer can print or the fin you print will not be the same size as you drew. From that geometry for the first fin it creates an equivalent fillet that is a hull between a pro rata of the max fillet size and the height to the mating point on the fin. It does that for 4 heights to produce an equivalent fillet. I felt it generated reasonable looking fillets when printed, but in SCAD the fillets look faceted.
Norm
 

Attachments

  • ParametricFinCanNormV5-3 layer fillet.txt
    10.2 KB · Views: 1
  • ParametricFinCanNormV5-3 layer fillet.scad
    8 KB · Views: 1
Last edited:
Several people have posted fin can generators. Most of them cannot generate round fillets. I thought, "How hard can that be?" Well, two weeks later I finally have something to share!

The attached script lets you design fin cans. A "fin" is composed of up to three trapezoidal, simple fins. The usual parameters define the gross characteristics of the fin sections: root length, tip length, semi-span, sweep distance, etc. A cool feature of this tool is that you define the thickness of the root and tip with a textual "profile". Basically a profile string is a sequence of (thickness, offset) pairs. A simple diamond shaped fin with razor sharp edges could have a profile like, "0@0; 0.25@50%; 0@100%" . It specifies that the leading edge (at offset 0) has a thickness of 0. The mid point of the fin (at offset 50% of root length) is 1/4" thick. The trailing edge (at offset 100% of root length) has thickness 0. The default for leading and trailing edges is 0 thickness. So the same effect results from the shorter profile "100%@50%". Profile descriptions can use absolute measurements, percentage-based measurements, radius specs for rounded corners, and alignment keys to tie the root and tip profiles together. The same profile strings are used to define the thickness of the fin can. A fuller description of profile strings is in the header comment of the script.

It's pretty easy to run into OpenSCAD limitations with this tool. Razor sharp edges, tiny fillets, and overly smooth curves can cause troubles. Tinkering with the input parameters usually solves the problem.

Here are a few snapshots of the possibilities:
View attachment 507673 View attachment 507674

View attachment 507675View attachment 507676


Enjoy!

Looks very nice, but does anyone else get an error that prevents this from running immediately on opening?
"ERROR: Parser error: syntax error in file FinCanGenerator.scad, line 1042"
 
Looks very nice, but does anyone else get an error that prevents this from running immediately on opening?
"ERROR: Parser error: syntax error in file FinCanGenerator.scad, line 1042"

I don't see the error. I'm running OpenSCAD 2021.01.

It's almost certainly complaining about the double comma between lines 1041 and 1042. You can delete or comment-out line 1042. It is just for debugging. You can also delete the trailing comma on line 1041.

The patched version is attached. Thanks for the bug report.
 

Attachments

  • FinCanGenerator.scad
    44.1 KB · Views: 2
  • FinCanGenerator.json.txt
    5.2 KB · Views: 1
I don't see the error. I'm running OpenSCAD 2021.01.

It's almost certainly complaining about the double comma between lines 1041 and 1042. You can delete or comment-out line 1042. It is just for debugging. You can also delete the trailing comma on line 1041.

The patched version is attached. Thanks for the bug report.
That did it. I'm still new to this and haven't quite gotten the syntax figured out. Also appears I am running the 2/22 version, so maybe an update lead the syntax issue. Anyway, Works great now!
 
I don't see the error. I'm running OpenSCAD 2021.01.

It's almost certainly complaining about the double comma between lines 1041 and 1042. You can delete or comment-out line 1042. It is just for debugging. You can also delete the trailing comma on line 1041.

The patched version is attached. Thanks for the bug report.

@kalsow,

Thanks for pointing me over here. I tried your file. Got it dialed in with the Little John dimensions.

I have all the dimensions in mm, so I set this:
// Units of measurement
Base_Units = 1; // [1:mm, 25.4:inches]

I originally tried for a fillet radius of 5% of the root length, or 3.43. Get the following error:

I've tried up to 8% of the root length, or 5.5 for the fillet radius and still get the same error.

Please PM me if you want me to send the file and figure it out that way.
 
Last edited:
Back
Top