this is going to be a rather long post, so here is tl;dr summary:
I am working on a cross-CAD standard parts library called BOLTS. It is already somewhat useable, and you are cordially
invited to join the discussion to make it better.
Although there are several threads with similar content like:
I did not feel comfortable hijacking any of these, but decided to start a new one.
When I got a 3D printer a while ago I looked into various free and open source CAD tools, and FreeCAD struck me as promising. I played around a bit, but there were a few bugs hitting me, so I ended up with using mostly OpenSCAD. I like programming, but on the other hand there are some warts in this language. I have seen CATIA in Action, and this seems to be a powerful way of doing stuff.
One of the most complex OpenSCAD projects that I am aware of is the Mendel90 3D Printer by nophead (https://github.com/nophead/Mendel90
), and he created a few pretty nifty constructs to keep the scad code manageable. Among others he had reusable standard parts and a automatic BOM creator.
Having FreeCAD still on my mind, I developed the vision of a cross-CAD standard parts repository, where one has a common repository of data and metadata (like dimensions, standards, ...), such that it is relatively easy from there to build a standard parts library for an arbitrary CAD system using its parametric capabilities.
I played around with this idea, and got again sidetracked several times, but now I can show you some results. It is already roughly working, but probably not very useful. I show examples how to use BOLTS with FreeCAD below.
I should add that I am not an expert in this stuff. I am neither a mechanical engineer, nor have I otherwise been exposed to standards. I am not very familiar with the inner workings of FreeCAD, I only know enough python to be able to get everything somehow done. So if you read this description and think "No, this should be done differently", then you are probably right. Please tell me about it.
The non-geometric data and metadata is stored in yaml files (http://yaml.org/)with
extension blt, as yaml is both machine and human-readable, and works well with version control. They includes dimensions, author and licence information, standards, and stuff like that. The geometric information has to be supplied separately. For FreeCAD I used python functions, that add a part (e.g. a washer with certain dimensions) to the current document. I call these functions base functions, because the represent the base geometry of a part. This geometric information can usually be shared between many different standards (DIN, ISO,...). For example, BOLTS currently provides 18 different standards for washers using only two base functions.
Only the base functions are application specific (e.g. I need to do it both for OpenSCAD and FreeCAD), the data and metadata can be shared. I hope that this will allow to exploit synergies, as all communities can profit from each other.
FreeCAD is conveniently written in Python, so it was relatively easy to write a widget that docks into the main window and reads in the yaml files with the data. At the moment I have only added 4 base functions, so in FreeCAD the selection of parts is restricted to hexagon head bolts and washers.
How to use it
You can download the current state of BOLTS for FreeCAD from its homepage:
It currently consists of a bunch of python modules and a few yaml files. One needs to start FreeCAD with the right include paths, I have supplied a script that does that for you (at least in Linux). A short description what to do can be found on the Homepage.
From an overview over all the data and metadata currently I generated a set of html files giving an overview over all the standards currently available. This is also useful if one does not know the DIN and ISO norms by heart.
All this code is very much a proof of concept. It is basically built to handle nuts, bolts, washers and similar items well, but from some of these other threads about standard parts in this forum I got that there are also other use cases. In the beginning I want to focus more on getting the overall infrastructure right, and less so on adding thousands of parts. So please tell me about your needs for standard parts and use cases.
In particular there are a few things that I plan to research, where I might have questions:
- Drawings: Currently I have very ugly drawings (that show the different dimensions of a part) generated using a horrible OpenSCAD mechanism. I have the feeling that FreeCAD is much better suited to create such drawings. Is there a way to do it automatically or at least half-automatically?
- Base geometries: The base geometries that I have implemented for FreeCAD right now are basically one to one translations from the corresponding OpenSCAD ones, done is CSG style. I guess this is not the best way to do it, and there are other ways to do it. In particular I would be interested in having the base geometries in fcstd files, because then it would be possible to reuse the work that was done for https://github.com/yorikvanhavre/FreeCAD-library
I would like to hear your opinions, criticism, suggestions, ideas, usecases. Or even better: try to do something with BOLTS and tell me about the difficulties.
[Edit: Changed links to new website URL]