Designing a Surfboard Fin
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
-
- Posts: 35
- Joined: Mon Jan 06, 2014 2:30 am
Designing a Surfboard Fin
Hi Folks,
I am wanting to design surfboard fins as 3D objects in FreeCAD for export to CFD systems for flow modelling and CNC machines for building models. The fins are similar to an aircraft wing. They have an outline (like a dorsal fin of a dolphin), a foil cross section (typically a symmetrical NACA 00xx foil) which can be defined mathematically and a tapering thickness towards the tip of the fin (elliptical and mathematically defined). See the attached image.
I am at a loss as to how to do this in FreeCAD or if it is possible. Has anyone done this before or is there an example tutorial available?
Any help would be very much appreciated.
TK
I am wanting to design surfboard fins as 3D objects in FreeCAD for export to CFD systems for flow modelling and CNC machines for building models. The fins are similar to an aircraft wing. They have an outline (like a dorsal fin of a dolphin), a foil cross section (typically a symmetrical NACA 00xx foil) which can be defined mathematically and a tapering thickness towards the tip of the fin (elliptical and mathematically defined). See the attached image.
I am at a loss as to how to do this in FreeCAD or if it is possible. Has anyone done this before or is there an example tutorial available?
Any help would be very much appreciated.
TK
- Attachments
-
- finfoil screen shot.png (102.89 KiB) Viewed 8546 times
Re: Designing a Surfboard Fin
If you can define the profile like the profiles of airfoils are defined, then yes, it can be done. FreeCAD has an airfoil importer that will work with .dat files. There was just a thread here that announced the latest improvements. Of course, if your on Windows, this would meen you will need to compile FreeCAD your self as the daily builds of the latest code are exclusive to Ubuntu Linux (they provide the service). You didn't include your FreeCAD info so there is no real way of knowing just what features you might have available to you, but I think 0.13 stable had the airfoil importer so the basic tool should be there. Here is a screenshot of a N6409 airfoil that was lofted in an "S" pattern. You can see the profile in red.
Let us know what kind of data set your using and we can go from there. If FreeCAD won't do it directly, there is always Python scripting that could get the job done.
Edit - If you were to use a program like XFLR5 to design and analyze you fin profiles, it will export the profiles in .dat format that FreeCAD can use.
Mark
My Menu >Help > About FreeCAD > Copy to clipboard info -
OS: Ubuntu 13.10
Platform: 64-bit
Version: 0.14.2955 (Git)
Branch: master
Hash: 4be052af48b9bb296b7ed04b84995491995e57ce
Python version: 2.7.5+
Qt version: 4.8.4
Coin version: 4.0.0a
SoQt version: 1.5.0
OCC version: 6.7.0
Let us know what kind of data set your using and we can go from there. If FreeCAD won't do it directly, there is always Python scripting that could get the job done.
Edit - If you were to use a program like XFLR5 to design and analyze you fin profiles, it will export the profiles in .dat format that FreeCAD can use.
Mark
My Menu >Help > About FreeCAD > Copy to clipboard info -
OS: Ubuntu 13.10
Platform: 64-bit
Version: 0.14.2955 (Git)
Branch: master
Hash: 4be052af48b9bb296b7ed04b84995491995e57ce
Python version: 2.7.5+
Qt version: 4.8.4
Coin version: 4.0.0a
SoQt version: 1.5.0
OCC version: 6.7.0
This post made with 0.0% Micro$oft products - GOT LINUX?
-
- Posts: 35
- Joined: Mon Jan 06, 2014 2:30 am
Re: Designing a Surfboard Fin
Hi Mark,
Thanks for the reply.I have FreeCAD 0.13 Rev 1828 installed on W7. The import airfoil feature is available and I have managed to import a NACA 0012 DAT file.
I'm unsure as to how to "loft" the foil to the plan shape in the attached image and the thickness. Do you think this can be done natively in FreeCAD? At this stage I would be happy to be able to use an image of the fin plan and manually draw around it in FreeCAD. Not sure if this is possible.
TK
Thanks for the reply.I have FreeCAD 0.13 Rev 1828 installed on W7. The import airfoil feature is available and I have managed to import a NACA 0012 DAT file.
I'm unsure as to how to "loft" the foil to the plan shape in the attached image and the thickness. Do you think this can be done natively in FreeCAD? At this stage I would be happy to be able to use an image of the fin plan and manually draw around it in FreeCAD. Not sure if this is possible.
TK
Re: Designing a Surfboard Fin
OK, I think I got ya. Have a look at this and let me know if it's close. I used the NACA0012 foil and sort of followed the graph in your image. If this is close to what your wanting, we'll have a starting point for me to explain how it was done. I'v attached the file that is in the pic.woodbuddha wrote:Hi Mark,
Thanks for the reply.I have FreeCAD 0.13 Rev 1828 installed on W7. The import airfoil feature is available and I have managed to import a NACA 0012 DAT file.
I'm unsure as to how to "loft" the foil to the plan shape in the attached image and the thickness. Do you think this can be done natively in FreeCAD? At this stage I would be happy to be able to use an image of the fin plan and manually draw around it in FreeCAD. Not sure if this is possible.
TK
Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
-
- Posts: 35
- Joined: Mon Jan 06, 2014 2:30 am
Re: Designing a Surfboard Fin
Hi Mark,
Yep. That looks like it.
TK
Yep. That looks like it.
TK
Re: Designing a Surfboard Fin
I think you can get what you want to do done in FreeCAD. So give it a try and when you get stuck, just ask. Keep in mind that when asking, it's always a real good idea to attach the file of the model your stuck on. And whenever starting a new topic for help, ALWAYS include your Help > About FreeCAD info. It tells us allot, not just the FreeCAD version, but which Python, Qt, OCC, etc. your using, and there are differences. If you haven't done so, check out some of the video tutorials. There are a good number of videos out there that you can follow along with and I found them to be quite helpful in reducing the learning curve. Once you get the basics, things will start to fly together.woodbuddha wrote:Hi Mark,
Yep. That looks like it.
TK
Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
-
- Posts: 35
- Joined: Mon Jan 06, 2014 2:30 am
Re: Designing a Surfboard Fin
Thanks Mark and understood. Do you have quick suggestions on the best way to get started, what features to use, etc? I've been looking through video and written tutorials and I can't seem to find much on this type of modelling. Any help would be appreciated.
TK
TK
Re: Designing a Surfboard Fin
Mark has used the Draft workbench to import the dat file (aerofoil) which creates Draft objects that are in fact surfaces.
He has then used the Part workbench to "loft" from one to another.
Part sweep works a bit like loft, but it follows a "path" that you define. So a sweep can do the same thing as a loft but a loft can not always do what a sweep can be made to do.
Once you have your aerofoil you could consider, for some applications, using "Draft Array" or "Draft Path Array" or "Draft Clone" (clone can also scale the clone and the clones are parametrically linked to their original) to produce multiple similar or identical aerofoil cross sections, if that's what you want. Often it is not...a wing can often merge from one shape to another along its length. I don't know if the same is true for hydrofoils or not.
Jim
He has then used the Part workbench to "loft" from one to another.
Part sweep works a bit like loft, but it follows a "path" that you define. So a sweep can do the same thing as a loft but a loft can not always do what a sweep can be made to do.
Once you have your aerofoil you could consider, for some applications, using "Draft Array" or "Draft Path Array" or "Draft Clone" (clone can also scale the clone and the clones are parametrically linked to their original) to produce multiple similar or identical aerofoil cross sections, if that's what you want. Often it is not...a wing can often merge from one shape to another along its length. I don't know if the same is true for hydrofoils or not.
Jim
Re: Designing a Surfboard Fin
@ jmaustpc - Thanks Jim. Hope you stick around, I'm sure you'll be able to answer some things better than I can.woodbuddha wrote:Thanks Mark and understood. Do you have quick suggestions on the best way to get started, what features to use, etc? I've been looking through video and written tutorials and I can't seem to find much on this type of modelling. Any help would be appreciated.
TK

TK, To start with, Jim has everything correct with just one little caveat, I used a handy little Macro (that used Draft), to import and scale my Airfoil to the desired chord in one shot. You can copy the code below, and in FreeCAD, click on the Macro icon on the tool bar -
Here is the Macro - Note, do not use the "select all" link. Instead, drag your mouse to highlight all the code and right click > Copy or Ctrl-c to copy it.
Code: Select all
#=================================================
# Import & Scale .dat Formatted Airfoil
# Original scaling script by shoogen, modified for GUI input
#=================================================
from PyQt4 import QtCore, QtGui
import FreeCAD, FreeCADGui, Draft
import importAirfoilDAT
# Selcet .dat airfoil data file to be imported
filename = QtGui.QFileDialog.getOpenFileName(QtGui.qApp.activeWindow(),'Open An Airfoil File','*.dat')
class p():
def proceed(self):
try:
# start Original Script
scalefactor=float(self.s1.text())
f1=str(filename)
importAirfoilDAT.insert(f1,"Unnamed") # imports one Draft Wire named and labeled 'DWire'
oldobject = FreeCAD.ActiveDocument.DWire # imported object
matrix=FreeCAD.Matrix()
matrix.scale(scalefactor,scalefactor,scalefactor) #scale uniformly
newshape=oldobject.Shape.copy() # extract the shape from the imported airfoil
newshape.transformShape(matrix) # scale the Shape
newobject=FreeCAD.ActiveDocument.addObject('Part::Feature','Airfoil1') #create a new Object for the resized shape
newobject.Shape=newshape # assign the resized shape
oldobject.ViewObject.Visibility=False #hide the old object
# end Orignial Script
except:
FreeCAD.Console.PrintError("Error, not a valid .dat file\n")
self.close()
def close(self):
self.dialog.hide()
def __init__(self):
self.dialog = None
self.s1 = None
# Make dialog box and get the scale size
self.dialog = QtGui.QDialog()
self.dialog.resize(260,100)
self.dialog.setWindowTitle("Airfoil Import Scale")
la = QtGui.QVBoxLayout(self.dialog)
t1 = QtGui.QLabel("Chord Length")
la.addWidget(t1)
self.s1 = QtGui.QLineEdit()
la.addWidget(self.s1)
okbox = QtGui.QDialogButtonBox(self.dialog)
okbox.setOrientation(QtCore.Qt.Horizontal)
okbox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
la.addWidget(okbox)
QtCore.QObject.connect(okbox, QtCore.SIGNAL("accepted()"), self.proceed)
QtCore.QObject.connect(okbox, QtCore.SIGNAL("rejected()"), self.close)
QtCore.QMetaObject.connectSlotsByName(self.dialog)
self.dialog.show()
self.dialog.exec_()
p()
It should be noted that when imported, that airfoil is in the dorm of a scaled Dwire clone. For a lot of applications that should be good enough, but it will leave lines at every point the wire is joined when lofted, extruded, or swept. In the example I gave, I had converted the clone to a Dwire in the Draft Workbench then used the Dwire to Bspline tool the make it a smooth Bspline. As Jim noted, I lofted between the airfoils. I did this because OCC (the CAD kernel) has a nasty little tick about tight curves sweeping and lofting a Bspline, though OCC 6.7 / OCE 0.15 dev seems to have made some rather pleasing improvements in this area.
Once you get the airfoil importer copied and working we'll get you going on the next step.
One thing to note - when copying and pasting that macro the spaces from the left margin are very important. If you get a line off it will complain and give you an error in the Report view. View > Views > Report view should be checked to see it. It will tell you what line the error is on so it's easy enough to go back and fix.
Here is a quick video I did lofting between 3 sketches - http://youtu.be/PWQ7rnAtbTc
It will show you the basic usage of the loft tool. If you bare with me, I will grab a short video tomorrow using the sweep, more aimed at what your wanting to do.
Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
Re: Designing a Surfboard Fin
As Mark said, spaces matter in Python, which is what FreeCAD macro is (Python code).
So if you copy an paste a macro you often find the process adds spaces to the beginning of lines. The next version of the Forum server software (currently in alpha state) will address this issue. But for now you have to live with it.
The import thing to remember is that if it adds 4 spaces to the first line...it will have done so to all lines. You must remove the same number of spaces from all lines or otherwise you effect the indentation which in Python code, matters.
So for example the first line may have 4 spaces at the beginning, a subsequent line may have more, if so the same 4 spaces only should be removed, not all the spaces.
So if you copy an paste a macro you often find the process adds spaces to the beginning of lines. The next version of the Forum server software (currently in alpha state) will address this issue. But for now you have to live with it.
The import thing to remember is that if it adds 4 spaces to the first line...it will have done so to all lines. You must remove the same number of spaces from all lines or otherwise you effect the indentation which in Python code, matters.
So for example the first line may have 4 spaces at the beginning, a subsequent line may have more, if so the same 4 spaces only should be removed, not all the spaces.