Designing a Surfboard Fin

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
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!
User avatar
bejant
Posts: 6076
Joined: Thu Jul 11, 2013 3:06 pm

Re: Designing a Surfboard Fin

Postby bejant » Thu Jan 16, 2014 1:48 am

OK, I clicked File -> New, then copied and pasted Dwire into the new file. Selecting Dwire and then clicking the Convert Between Wire and Bspline Tool
Image gives the following error message:

Code: Select all

Traceback (most recent call last):
  File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 3457, in execute
    self.createGeometry(fp)
  File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 3472, in createGeometry
    spline.interpolate(fp.Points, True)
<type 'exceptions.Exception'>: BSplCLib::Interpolate
BSpline: BSplCLib::Interpolate
And the Multi Point Dwire Tool button only seems to draw a single line...

Edit:
OS: Windows XP
Platform: 32-bit
Version: 0.14.2370 (Git)
Branch: master
Hash: a836759ebd91404954a778ff8885e152611576e1
Python version: 2.6.2
Qt version: 4.5.2
Coin version: 3.1.0
SoQt version: 1.4.1
OCC version: 6.5.1
User avatar
quick61
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Designing a Surfboard Fin

Postby quick61 » Thu Jan 16, 2014 2:16 am

bejant wrote:OK, I clicked File -> New, then copied and pasted Dwire into the new file. Selecting Dwire and then clicking the Convert Between Wire and Bspline Tool
Image gives the following error message:

Code: Select all

Traceback (most recent call last):
  File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 3457, in execute
    self.createGeometry(fp)
  File "C:\Program Files\FreeCAD0.13\Mod\Draft\Draft.py", line 3472, in createGeometry
    spline.interpolate(fp.Points, True)
<type 'exceptions.Exception'>: BSplCLib::Interpolate
BSpline: BSplCLib::Interpolate
And the Multi Point Dwire Tool button only seems to draw a single line...

Edit:
OS: Windows XP
Platform: 32-bit
Version: 0.14.2370 (Git)
Branch: master
Hash: a836759ebd91404954a778ff8885e152611576e1
Python version: 2.6.2
Qt version: 4.5.2
Coin version: 3.1.0
SoQt version: 1.4.1
OCC version: 6.5.1
bejant, yes that's basically what i was getting.
Sorry but I don't know how the Bspline should appear
It should appear rounded, smooth, not looking like a different Dwire that makes sharp angles. Think of the difference between a true circle and a polygon.

I'm going to keep looking at this cause that's some funky behavior.

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
bejant
Posts: 6076
Joined: Thu Jul 11, 2013 3:06 pm

Re: Designing a Surfboard Fin

Postby bejant » Thu Jan 16, 2014 2:54 am

quick61 wrote:I'm going to keep looking at this cause that's some funky behavior.
It gets even funkier ... when I open the file in the daily build version ( a few days old now), "Dwire" in axonometric view Image appears as a line, oriented as shown:
20140115e.jpg
20140115e.jpg (14.92 KiB) Viewed 1436 times
But Dwire001 and Bspline are oriented differently with the leading edge at 10 o'clock and the trailing edge at 4 o'clock as was in v14.2370.

OS: Ubuntu 12.04.3 LTS
Platform: 32-bit
Version: 0.14.3012 (Git)
Branch: master
Hash: ca3b87a719825ad4065b47ade7b472e1f67dd134
Python version: 2.7.3
Qt version: 4.8.1
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.5.0
woodbuddha
Posts: 35
Joined: Mon Jan 06, 2014 2:30 am

Re: Designing a Surfboard Fin

Postby woodbuddha » Tue Jan 21, 2014 11:46 pm

Hi Mark and Bejant,

I think I've exhausted my knowledge in trying to get this to work.

Is there another way for me to do this?

Should I report this as a bug?

Thanks.

TK
User avatar
quick61
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Designing a Surfboard Fin

Postby quick61 » Wed Jan 22, 2014 4:20 am

woodbuddha wrote:Hi Mark and Bejant,

I think I've exhausted my knowledge in trying to get this to work.

Is there another way for me to do this?

Should I report this as a bug?

Thanks.

TK
If this is a bug anywhere, it's in OCC/OCE, and that is something our most excellent FreeCAD developers have no control over. I'm one of those that is out there kind of hanging 10 of the bleeding edge as I am building and using the latest development code of both FreeCAD and OCE. Both of which have seen a lot of improvement. OCE in particular has had some advancement with Bsplines. You can give a try with just the imported airfoil and not bother with the conversion to Bspline. While this will leave lines at every angle change, it's basically the same way XFLR5 handles the foils in it's annalists.

Give it a try and see how it goes.

Sorry for not getting back to you on this, this thread kind of slipped under the radar on me. My bad.

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
jmaustpc
Posts: 10390
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Designing a Surfboard Fin

Postby jmaustpc » Wed Jan 22, 2014 5:01 am

Werner posted some code last night that might work...or be adapted to work here..it converted imported step wires into Parametric Draft wires.

see here
viewtopic.php?f=3&t=5413&start=20#p43832

this macro/code will create a new document and put the parametric dwire in that.

I don't have time right now...I have to go out for a while...but I suspect it will work for you.

Check if your imported aerofoil's shape type is actually a compound...I have to go now.

Jim
jmaustpc
Posts: 10390
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Designing a Surfboard Fin

Postby jmaustpc » Wed Jan 22, 2014 5:29 am

I change my mind and quickly tried this before I went out, it works perfectly with the GUI.

Your zip file naca0012 which you posted above, is empty when I try to extract it.

I went here and searched for naca0012
http://www.airfoildb.com

which brought me here
http://www.airfoildb.com/foils/435

right click on dat format "save" to my system.

it imported perfectly into FreeCAD.
I then click Draft wire to Bspline..worked perfectly.

then I Draft Clone...worked
then I adjusted the placement values of the clone ...it moved to where I wanted it.

I then adjusted the scale parameter of the clone to 1000 so that it would go from a chord of 1mm to 1m, worked
then I Part workbench extruded 3000mm ...worked

then select the extrude ...Edit menu placement tool ...incremental...moves and rotates exactly as expected...

here is the fcstd file
naca0012_aerofoil_import_scale_extrude.fcstd
(54.17 KiB) Downloaded 92 times

OS: Ubuntu 12.04.4 LTS
Platform: 64-bit
Version: 0.14.3052 (Git)
Branch: master
Hash: 88ff8076cdbcca2a52c13f40d1cb14df220b3c55
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.5.0
jmaustpc
Posts: 10390
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Designing a Surfboard Fin

Postby jmaustpc » Wed Jan 22, 2014 5:40 am

Another thought...sometimes if a curve looks "stepped" (if a curve looks more like a wire) the problem can be just a display matter, not actually in the model, so check out what setting you have here
preferences.png
preferences.png (61.23 KiB) Viewed 1401 times
you might want to see what effect it has on rendering speed on a complicated model, and that will be effected by your drivers and GPU.

Mine is set to 0.02% ...I set it years ago...I can't remember what the default was ...nor do I know what is appropriate...however that is the value I have and it seems to work for me. :)

Now I really, really, have to go .... :)

Jim
User avatar
quick61
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Designing a Surfboard Fin

Postby quick61 » Wed Jan 22, 2014 6:04 am

Mine is set to 0.02% ...I set it years ago...I can't remember what the default was ...nor do I know what is appropriate...however that is the value I have and it seems to work for me. :)
Yea, I have mine set at .025% as I found it to be a happy middle between speed and display. I think the default is 0.5. It will produce a sphere faster, but that's about the only real advantage I can see for leaving it there.

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
woodbuddha
Posts: 35
Joined: Mon Jan 06, 2014 2:30 am

Re: Designing a Surfboard Fin

Postby woodbuddha » Wed Jan 22, 2014 11:02 pm

Thanks Mark and Jim. Appreciated you taking the time to help me with this.

I'll have a play around using your suggestions.

TK