Version 1.1 - Added 2510 and 2515 Fan models as per eagebhart feedback (but with screw size 3mm - holes are designed for screw to go thru not to embed the screw). Again lightly tested.
When I was making my Carbon Air Filter, I needed dimensions for a Fan to cutout the air hole and screw holes. So I went overboard and collected a whole bunch of sizes, then hey-presto FanLib, an OpenSCAD library to help draw Computer/Muffin fan shapes/sizes.
Arrgh - Thingiverse Rendering...click view full size!
Limited testing to-date.
The sizes were collected from various datasheets, if they don't match your fan you can create your own definition, see FanLib-Test.scad for an example. If someone thinks there is a really common size missing give me the sizes and I'll add it.
The data storage strategy is as used in MCAD/stepper.scad "A nema standard stepper motor module Originally by Hans Häggström, 2010.", thanks Hans.
Uses the MCAD libraries shapes.scad (for the handy roundedBox module) & materials.scad (just for the test module to look pretty), thans to Catarina Mota/Elmo Elmo Mäntynen & again Hans Häggström.
All the Modules and their parameters are in UpperCamelCase.
Full documentation is at the top of the source, in summary;
Find the Fan you want in the FanData section, they are defined as Fan, e.g. Fan80, Fan12038 etc.
You can extract specific sizes using the lookup() function, e.g.
FanBody(Fan=Fan80); // the shell of the fan without motor/blades
FanOutline(Fan=Fan6025); // the rounded box shape
FanScrewHoles(Fn=Fan12038); // useful for difference()
FanCutout(); // with difference() to make a hole in a panel etc
Most modules have FanDeep= and FanHoles= parameters, FanDeep defaults the the Fan Model thickness, FanHoles defaults to true.
There is a variable FanRender=true which means it uses render() in places to make the object look better in preview, this does however take longer to calculate the first time you compile it. Set it to false if you want to speed it up.
Ohh...and measure three times print once...don't blame my measurements.
2Do - fan motor & blades...don't hold your breath...