Mechatronic design for an extrusion-based additive manufacturing machine