Friday, 30 May 2014

FreeCAD: Perforated Sheets and HoneyComb

Perforated sheets are very useful and widely used in a lot of things. Yesterday I started to think about the algorithm and this is the result:

Simple circular holes at the moment. Circular and Hexagonal now!

The code is here

The function PSheet has 6 inputs, 4 mandatory and 2 optional:

L = Length of the base rectangle
H = Heigth of the base rectangle
W = Width of the base rectangle
R = Hole radius

The optional parameters are hole type (circle by default) and  "hole density" set as 1/5 by default.

To get the same as the above photo type after copy-paste:

PSheet(100, 100, 1, 4)

Yes, is slow to load. I will try to improve that, maybe doing a big sketch with all the holes, extruding them and substracting to the main plane.

Now everything is created with sketches. The speed has improved but not enougth to create big sheets. Almost all time is spent doing the recompute step, the last line of the script. I don't know how to speed up that :s
This is the graph of the needed time as a function of the sheet length (with heigth equal to length):

Just for curiosity and to see that if you want to create something bigger than an 800x800mm sheet, you will need more than 24 hours.

Honeycomb :

If you give enougth width to an hexagonal pattern you get a honeycomb like this one:

Honeycomb cores are very common in carboon-fiber structures.

That's all by now.