Creating Formers using spreadsheet parameters

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!
Post Reply
StixUK
Posts: 4
Joined: Mon Jun 27, 2022 3:25 pm

Creating Formers using spreadsheet parameters

Post by StixUK »

Hi
I'm new here, enjoying learning FreeCAD.
I am trying to make a "fuselage" for a streamlined bike. (www.BHPC.org.uk)
What I want to do is produce a set of circular formers in FreeCAD PartDesign which I can do an "Additive Loft" through to make the fuselage shape.
I have attached a file to show what Im trying to do using 3 (semicircular) formers. The formers will be at 100mm intervals along the length of the bike, and I'm hoping that I can get their diameters from a spreadsheet (as there are 24 of them).
I could make 24 seperate sketches and fill in the placement and dimensions by hand, but wondered if there was an automated way of doing it.
Thanks for making a brilliant app!
:)
Stix
Attachments
TopCrossSection.FCStd
(21.7 KiB) Downloaded 13 times
Bance
Veteran
Posts: 4256
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Creating Formers using spreadsheet parameters

Post by Bance »

I would suggest curved shapes addon, search the forum.

It's mostly used for flying wings/airplane wings.

WB is available through Addon manager.

https://forum.freecadweb.org/viewtopic.php?f=8&t=36989
User avatar
onekk
Veteran
Posts: 6208
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Creating Formers using spreadsheet parameters

Post by onekk »

StixUK wrote: Wed Jul 06, 2022 8:53 am Hi
I'm new here, enjoying learning FreeCAD.
I am trying to make a "fuselage" for a streamlined bike. (www.BHPC.org.uk)

You could use maybe a script, if you have some datas, like a profile defined by some points, you could:

1) create bsplines profiles starting from points
2) position then using a for loop
3) feed them to a makePipeShell() method

and you obtain the shape.

Advantages:

1) You will work with raw data, so if a profile will change, just change the data and relaunch the script
2) it is fully parametric
3) the file is compact as the shapes could be created on the fly and you could only store "generation script"

Disadvantages:

1) It is a script, so you have to "code it"
2) probably you have to learn a little about Python and FC API
3) it is not a click and point work

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
Workshop_Notes
Posts: 614
Joined: Wed Sep 29, 2021 8:35 am

Re: Creating Formers using spreadsheet parameters

Post by Workshop_Notes »

Please read below as an idea, not a tried and tested method.

Your former is a surface of revolution. You are forming it by making slices perpendicular to its axis (the 24 sketches). If you open the current model and click on 'bottom' of the view cube, it looks a bit like a cross section of a jet engine with the spinny bits removed. If you draw one half of that cross section in a single sketch (maybe using construction points whose X- and Y- coordinates/dimensions are driven by the spreadsheet), you could revolve the shape so produced to give the former you want.

Start with something simple: have four points at (-1,1), (-1,2), (1,1) and (1,2) and join them with four straight lines. Revolve the (rectangular) shape and you get a horizontal tube, 2 units long, ID 2 units, OD 4 units. Now add an extra point at (0, 3): The cross section turns into a pentagon and the revolved tube has a bulge at its midpoint.

So, rather than drawing a load of semi-circular formers along the axis of the part, draw one point on each former, that represents the radius of the former from its centre and its distance along the former's axis.
StixUK
Posts: 4
Joined: Mon Jun 27, 2022 3:25 pm

Re: Creating Formers using spreadsheet parameters

Post by StixUK »

Thanks everyone for your ideas. I think the best solution for my immediate needs is @Bance Curved Shapes WB. I can create the shape using a few key points (see the following) and use CurvedShapes to make the fuselage tube, and then create outlines for the formers by slicing through the fuselage at regular intervals - kind of the reverse of what I thought I wanted!
My original post was a slightly simplified version of what I want to do. The fuselage is actually a semicircular section on the top half and a semi-ellipse on the bottom half. The key points I mentioned above are measurements like length and width of two cycling shoes, width of hips, depth reqd from bum to raised knees etc. Knees need lots of room which is why the bottom half is elliptical not circular.
@onekk Looks very interesting, I've written lots of computer code (including 3d stuff), but none in FreeCAD. I'm finding freecad quite a steep learn, but when Ive got the hang of it I'll definitely have a look at that!
Thanks again every body! :-)
User avatar
onekk
Veteran
Posts: 6208
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Creating Formers using spreadsheet parameters

Post by onekk »

FC is not very difficult, the main problem is the fact that is done using some libraries, and that FC is made of two different parts, the Gui snd the App part and sometimes is not immediate to see this.

If you want to model in FC you will use mainly "Part WB" with some excursions in "Draft WB" and few other WB.

Some WB could have a "decent" python API some other do not.

But usually for 3d modelling you have all "at hand" in Part WB, (usually importing Part will suffice for most of the work).

You have even some powerful ways slightly different from the GUI commands. (in other word what you can do using the mouse).


Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
Post Reply