3D Printing OpenSCAD Fin Can Generator

kalsow

Well-Known Member
Joined
Jan 14, 2010
Messages
178
Reaction score
159
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, "[email protected]; [email protected]%; [email protected]%" . 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.jpeg 1646435951293.jpeg


Enjoy!
 

Attachments

  • FinCanGenerator.scad
    44.1 KB · Views: 14
  • FinCanGenerator.json.txt
    5.2 KB · Views: 10

Kelly

Usually remembers to get the pointy end up
Joined
Apr 25, 2010
Messages
868
Reaction score
767
Location
Oregon
Wow, that looks very, very nice.
 
Joined
Jun 30, 2015
Messages
1,733
Reaction score
1,908
Location
Australia
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:

Zyzzyva1000

Well-Known Member
TRF Supporter
Joined
Jan 15, 2022
Messages
74
Reaction score
32
Location
Kentucky
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, "[email protected]; [email protected]%; [email protected]%" . 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 507675 View 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"
 

kalsow

Well-Known Member
Joined
Jan 14, 2010
Messages
178
Reaction score
159
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

Zyzzyva1000

Well-Known Member
TRF Supporter
Joined
Jan 15, 2022
Messages
74
Reaction score
32
Location
Kentucky
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!
 

Latest posts

Top