Image of a 3D model of a steam engine's crank drive mechanism.


X3D is an XML application for declaratively representing 3D computer graphics. Also SVG is an XML application and both XML and originally HTML are SGML applications. So, it makes sense to use X3D markup to include 3D graphics in an HTML document. However, unlike SVG for 2D graphics, X3D is not part of HTML5. Browsers do not natively support X3D. Fortunately there is the JavaScript plugin X3DOM for integrating and manipulating X3D elements as HTML5 DOM elements, which are rendered via the JavaScript API WebGL.

If your 3D modeling software has X3D output capabilities, you can include the X3D file in an <inline> element inside an <x3d> element. FreeCAD (see next section) is free CAD software that can export to X3D. I created the models in this article with FreeCAD. Also the popular free and open-source 3D graphics program Blender exports to X3D.


FreeCAD is free and open-source 3D modeling software that allows users to create digital models of real-world objects. It is designed to be used by both professionals and hobbyists.

Through the concept of workbenches, FreeCAD provides a number of tool sets for specific modeling purposes. There are workbenches for architectural design (BIM), FEM analysis, producing technical drawings (2D) from 3D models, etc.

For this article I used a workbench (PartDesign) to create full-precision solids to design real-world (mechanical) parts (CAD). These models can be exported for 3D printing or CNC machining.

Individual parts are often part of a functional assembly. A piston is designed to work in a particular engine or pump where it is connected to other parts. When designing such a part, it is desirable (or even essential) that the modeling software provides a way of assembling the individual parts together. Providing a way to simulate the operation of the mechanism would really tick all the boxes. Unfortunately, assembly (and simulation?) is not part of the best that FreeCAD has to offer.

The PartDesign workbench only provides a basic way of creating (sub)assemblies, which in itself works well. For more complex assemblies you probably need a dedicated external assembly workbench that uses constraints and expressions to create relationships between the parts. For this article I tried the (newest?) workbench Assembly4. I did not try the other available assembly workbenches. The assembly workbenches are still under development. Assembly4 cannot yet in any way match the assembly features of the commercial CAD packages I'm familiar with (NX and Creo).

Next an assembly of an eccentric press created by using Std Part in the PartDesign workbench.

Image of a 3D model of an eccentric press.

Next shows an (unfinished) assembly of a model steam engine created by using the Assembly 4 workbench.

Image of a 3D model of a steam engine.