The Hell Ya Beller Fun with hot, pointy, sharp, and caustic stuff.


Simple Assemblies in FreeCAD

FreeCAD's assembly module is still in development.  By all reports, this is going to be an amazing feature just dripping with awesome sauce.  Alas, it's not here yet.

In the meantime, if you want to design anything with multiple parts, your options are pretty limited.  Here's a technique I've been using on the OpenROV project:


1) Design each of the parts in a separate FreeCAD project file.

2) Export the part as a STEP 214 file (.stp)

3) Import all the step files into a new FreeCAD file just for the assembly.

4) Duplicate any parts you need multiple instance of.

5) Use the placement dialog to rotate and position the parts together.



Step 1 - Design each of the parts in a separate FreeCAD project file.

You can certainly design multiple parts in the same file but this causes problems if you need two instance of a part for the assembly.  You can select a pad object and duplicate it, but the duplicated part will not be linked to the sketch so any downstream changes will not be incorporated into the duplicates.  I use my FreeCAD designs in other software like HeeksCNC for generating gcode and I find that the .step files are more portable.

In the image below, I have three FreeCAD files open.  bulkhead, ductingbracemount, and a new empty assembly file.



Step 2 - Export the part as a STEP 214 file (.stp)

Step files  are widely supported by different CAD/CAM applications.  FreeCAD is no exception.  Both import and export have worked flawlessly for me.  Simply select the solid in the project tree and click the menu item File->Export...  Then, when the dialog appears, select STEP 214 from the file type and give it a name.  Repeat for the other parts too.

Note: I use the same name as the file and the extension .stp.  If you don't include the extension, FreeCAD won't write the file.  I think that's a bug.



Now in my project directory I have bulkhead.fcstd bulkhead.stp ductingbracemount.fcstd, and ductingbracemount.stp.  If I make changes to the part, I have to export again.

Step 3 - Import all the step files into a new FreeCAD file just for the assembly.

Switch to the empty assembly file and import the .stp files.  This is just the reverse of the previous step.  File->import.  The import dialog will let you select multiple files at once and import them all.  This is nice.

One thing to note about the import export:  STEP files preserve the position and orientation of the parts in the global coordinate system.  Once the parts are imported, you can adjust these properties.  It's really helpful, though if you at least get your parts drawn in the right plane before exporting them.  I find adjusting position to be relatively painless but getting the rotation correct is more frustrating.  Once imported, the step files will behave like other objects.  You can run boolean operations on them, adjust colors, make them invisible, etc.



4) Duplicate any parts you need multiple instance of.

In my example, I need two ductingbracemounts.  Select the part in the tree and use Edit -> Duplicate selection.  The duplicate will be in the same position as the original so it will be invisible until moved.


5) Use the placement dialog to rotate and position the parts together.

Select each part in the tree and use the placement dialog Edit->Placement... 

to fine tune to rotation and location of the part.  Most users will fine the Euler angles (Yaw, Pitch, and Roll) more comfortable than the default "Rotation axis with angle" for setting the rotation of the part.


Bonus step - Make pretty output.

Actually this is more of a teaser since it isn't in master branch yet but mrlukeparry has been doing some really cool stuff with the raytracing workbench and soon we'll be able to generate nice pictures like this:


*Feature Ideas:

Here's some things that would make this a lot easier

  • FreeCAD should be able to import from other FreeCAD files.  It would be nice to import a solid, sketch, or part from one file into another without having to export to step.  Step is useful for going to other applications, but it would be nice to stay native whenever possible.
  • When exporting, FreeCAD should give some help with the filename.  Default the extension based on the type selected and default the filename to the current part name.
  • Can anyone calculate the rotaton with angle in their head?  I know it's superior to avoid gimble lock, but it's not very human friendly.  Maybe I'm wrong.
Comments (9) Trackbacks (0)
  1. Hi there. I have not even peeked at the assemble function and really appreciate your documentation on that!
    Another really cool function is that sweep-function:
    Hopefully I can wrap my head around that some day.

    You can actually “import” sketches from another FreeCAD files. If you open Project A and Project B.
    Then select in Project A, choose a sketch and use ‘copy’ in edit.
    Activate Project B and then use ‘paste’ and there should be that copied sketch from Project A. One can also ‘merge’ FreeCAD files, apparently. Oh, I dont know if this works in 0.12, as Im using an up-to-date-0.13.

  2. Good to know about copy/paste of sketches. I used to use the same kind of trick in HeeksCNC for cutting and pasting machining operations.

  3. Hi,

    As for part placement, you may have a look at the Edit –> Alignment menu. This tools is a little like AutoCAD’s 3D Align tool. It’s been added to 0.13 a couple of months ago.

  4. I’m currently modeling parts in FreeCAD based on Sketchup models for the new Lulzbot TK-0 RepRap project. I’ve published my files (in progress) on GitHub at

    I ended up with exactly the same workflow as yours. Since the original parts are modified every few days, I wrote a script to rebuild my assembly from the step files to try to save me some work. But getting the right placement vector is not something I’ve had much success with, so I end up doing it in the GUI and copying the python command in the terminal.

    Although you can merge projects in FreeCAD (.fcstd files), if they’ve been mostly modeled in PartDesign as my parts are, it can bring all kinds of havoc. I’ve seen sketches and features for a part remapped to another part. I’m pretty sure this is caused by the topological naming problem, which will be a top priority starting with 0.14 development. The Body container will also help diffentiate between parts in a same FreeCAD document and bring a “local” coordinate system for each part, making it easier to place them, as well as laying the ground work for the Assembly workbench.

    BTW there is another placement tool available in v0.13 since March 2012, through the Edit –> Alignment menu. Using up to 3 origin points and 3 destination points, you can match one part’s planar surface to the other and align edges. You can also use the Draft Move command, provided you have a planar face to set your working plane to beforehand.

  5. Hi Sliptonic, do you happen to have a 2D vector file for the 3 main outside frame parts (which you modified from the original design to avoid bending the plastic) such as a .SVG or .DXF (or less preferably a .PLT)? I have had a lot of trouble converting your FreeCAD design file over to a PDF, then over to Inkscape, and finally over to AutoCAD to make them compatible with my 2D design flow. I think where I made a mistake was in the scaling process in AutoCAD. If I don’t scale about the correct origin then it will warp the overall shape.

  6. Sorry, I don’t have anything beyond my FreeCAD files. I often export stp files from FreeCAD, import them into HeeksCAD and create sketch from a face. Stp is pretty universal so any good cad package should be able to do the same.

  7. Hi. To create an array of parts in the assembly, I had to use duplicate selection. Quite a hard work, but successful.

  8. Is ‘Assembly’ fully implemented now:

  9. Not yet but it’s getting very close. There are a number of good tutorials on using the functionality but you still have to build it from an alternate branch in the git repository. jriegel/dev-assembly.

Leave a comment

No trackbacks yet.