FreeCAD-manual

An experiment at reorganizing the contents of the FreeCAD wiki in an easier, friendlier book-like manner. The manual is now hosted on the FreeCAD wiki

View the Project on GitHub yorikvanhavre/FreeCAD-manual

Modeling for product design

Product design is originally a commercial term, but in the 3D world, it often means modeling something with the idea to have it 3D-printed or, more generally, manufactured by a machine, being a 3D printer or a CNC machine.

When you print objects in 3D, it is of ultimate importance that your objects are solid. As they will become real, solid objects, this is obvious. Nothing prevents them from being hollow inside, of course. But you always need to have a clear notion of which point is inside the material, and which point is outside, because the 3D printer or the CNC machine needs to know exactly what is filled with material and what is not. For this reason, in FreeCAD, the Part Design Workbench is the perfect tool to build such pieces, because it will always verify that your objects stay solid and buildable, and warn you if you perform an operation that prevents this.

To illustrate how the PartDesign Workbench works, let’s model this well-known LEGO® brick:

the Lego piece

The cool thing with LEGO® bricks is that the dimensions are easy to obtain on the internet, at least for the standard pieces. These are pretty easy to model and print on a 3D printer, and with a bit of patience (3D printing often requires much adjustment and fine-tuning) you can make pieces that are totally compatible and click perfectly into original bricks. In the example below, we will make a piece that is 1.5 times bigger than the original. This is solely for the purpose of this exercise of course, as it will make our piece incompatible with the original pieces.

We will now use exclusively the Sketcher and Part Design tools. Since all the tools from the Sketcher Workbench are also included in the Part Design Workbench, we can stay in Part Design and we will not need to switch back and forth between the two.

Part Design objects are fully based on Sketches. A Sketch is a 2D object, made of linear segments (lines, arcs of circle or ellipses) and constraints. These constraints can be applied either on linear segments or on their endpoints or center points, and will force the geometry to adopt certain rules. For example, you can place a vertical constraint on a line segment to force it to stay vertical, or a position (lock) constraint on an endpoint to prohibit it from moving. When a sketch has the exact number of constraints that prohibits any point of the sketch to be moved, we talk about a fully constrained sketch. When there are redundant constraints, where one could be removed without allowing the geometry to be moved, it is called over-constrained. This should be avoided, and FreeCAD will notify you if such case occurs.

Sketches have an edit mode, where their geometry and constraints can be changed. When you are done with editing, and leave edit mode, sketches behaves like any other FreeCAD object, and can be used as building blocks for all the Part Design tools, but also in other workbenches, such as Part or Arch. The Draft Workbench also has a tool that converts Draft objects to Sketches, and vice-versa.

the first sketch

When adding the last constraint, the rectangle will jump to the origin point and your sketch will turn green, meaning it is now fully constrained. You can try moving its lines or points, nothing will move.

fully constrained sketch

Note that the last point-on-point constraint was not absolutely necessary. You are never forced to work with fully constrained sketches. However, if we are going to print this block in 3D, it will be necessary to maintain our piece close to the origin point (which will be the center of the space where the printer head can move). By adding that constraint we are making sure that our piece will always stay “anchored” to that origin point. It is a good habit to take.

the first pad

The Pad behaves very much like the Part Extrude tool that we used in the previous chapter. There are some differences, though, the main one being that a pad cannot be moved. It is attached forever to its sketch. If you want to change the position of the pad, you must move the base sketch. In the current context, where we want to be sure nothing will move out of position, this is an additional security.

the bottom rectangle

external geometry

As with other Sketcher tools, when you are finished, right-click to exit the External geometry tool.

You will notice that only edges from the the base face can be added by this tool. When you create a sketch with a face selected, a relation is created between that face and the sketch, which is important for further operations. You can always remap a sketch to another face later with the icon Map Sketch tool.

the constrained internal rectangle

the pocket

the two upper dots

the extruded dots

the arrayed pad

sketch at the bottom

the three pads

the last sketch

the complete piece

You will notice that our modeling history (what appears in the tree view) has become quite long. This is precious because every single step of what we did can be changed later on. Adapting this model for another kind of brick, for example one with 2x2 dots, instead of 2x4, would be a piece of cake, we would just need to change a couple of dimensions and the number of occurrences in linear patterns. We could as easily create bigger pieces that don’t exist in the original LEGO® set.

But we could also delete the history, for example if we are going to model a castle with this brick, and we don’t want to have this whole history repeated 500 times in our file.

There are two simple ways to get rid of the history, one is using the Create simple copy tool from the Part Workbench, which will create a copy of our piece that doesn’t depend on the history (you can delete the whole history afterwards), the other way is exporting the piece as a STEP file and re-importing it.

Assembling

But the best of both worlds also exists, which is to create assemblies. An assembly allows you build a file with simple copies of objects from other files. This way, we can keep our precious building history in one file, and reuse the final result in other files withoout clogging it with all the history of each piece.

While FreeCAD still doesn’t ship with a built-in, offcial assembly workbench, several assembly workbenches are available as add-ons: A2Plus is the oldest one, but is still widely used among the FreeCAD community. Assembly3 is what will probably become the official, built-in version in the future, but is currently not installable via the add-on manager, and Assembly4 which is a Python version of Assembly3 and works much the same way.

In this exercise, we will use A2Plus, because Assembly3 is not as easy toinstall and Assembly4 doesn’t work on older versions of FreeCAD. But the steps described below are very similar in all 3 workbenches. All these workbenches also feature additional constraint tools to position objects relative to each other. This is usually preferred than using tools like icon Draft Move and icon Draft Rotate as the position of the pieces will adapt automatically if one of the piece changes.

We could now use the different constraints tools offered by the A2Plus workbench, such as “face on face”, “vertex on line”, etc… to position our objects. However, in this case, we don’t have any common anchor point on these pieces, so it will be a complicated operation. Instead, it will be much faster to use the Draft move and rotate tools to position our pieces:

assembly


Downloads

Read more

Disclaimer

LEGO® is a trademark of the LEGO Group of companies which does not sponsor, authorize or endorse this manual. The use of the LEGO name is permitted by their Fair play use document