##### May 14, 2014

Computer Aided Engineering, never thought I would be dealing with it. Yet, here I am messing with stuffs for the first time. At work FreeCAD is what we use to make 3D models. Technically speaking I do not directly work on FreeCAD but rather come in help if things go wrong or new stuffs are needed. Luckily, FreeCAD understands Python, and that chemistry makes it easier for me to provide additional stuffs not-yet-bundled in the core application.

Like today, my fellow colleague needed a way to generate the list of parts that were assembled to form a final object. See the example below, the object is made up of a series of separately designed parts which are then assembled to make up the final object.

More complex designs can involve dozens or even hundreds of smaller parts assembled together. Usually an engineer will later need the part names while building up a report. At the moment there is no option in FreeCAD that allows to export a list of parts. With some handy Python however, this could be made possible. See code below:

import os,pwd
user = pwd.getpwuid(os.getuid())[0]