Thinly walled bosses
A case study in FDM CAD-CAM DFM
This article outlines a practical problem in the design of the Concertina keyboard, using the DMOTE CAD application. The problem is in the realm of design for manufacture (DFM) and specifically in 3D printing with fused deposition modeling (FDM).
In the problem at hand, a hole of rectangular profile is going to be enclosed by thin walls on five sides in such a way that a magnet can be inserted into the hole from the one open side. The magnet is 2.5 mm thick and the body into which it must go is 4 mm thick, which leaves a total of 1.5 mm of positive space around the magnet.
The scope of this article is limited to the use of our 1.5 mm of play subject to Ultimaker Cura 4.7.0 for the CAM step of slicing STLs. Other slicers produce different results. The fit of the magnet, a significant practical concern, is glossed over. Material choice and stresses in use are ignored.
The magnet will interact with an object on only one side of the enclosing body. Though it is not strictly necessary, the ideal use of the 1.5 mm of play would be one full-width wall, i.e. one line of thermoplastic in the xy plane per layer of the print, on that side, with the remaining play allocated to the opposite side. That would print quickly, provide adequate structural integrity, and still allow good use of the magnet.
Because we’re interested in full-width lines, the main variable in this scenario is the nozzle width of the printer we’re designing for. In this article, I will be considering printers of 0.3 and 0.5 mm nozzle width to make one general point that can be applied to any width. The slicer will be configured to use the same line width as the width of the nozzle: 100%.
The simplest approach to the problem is to centre the magnet in the 4 mm body. This is implemented in the DMOTE application’s bundled
cylinder5x2p5_centre.yaml configuration file, which is included in the standard Concertina build target because it has reasonable results with 0.3 mm and 0.4 mm nozzles.
The image above shows the use of a 0.3 mm nozzle on such a centred boss. The image is taken looking straight down onto the xy plane. The model is oriented as recommended in the Concertina v0.6.0 build guide. The magnet boss is the dark rectangle in the middle of the image, while the smaller circle represents an unrelated hole for an M3 screw.
In this example, you can see that the 1.5 mm of play is evenly split on both sides of the magnet. This leaves 0.75 on each side which, unfortunately, is 2.5 times the nozzle width. This mismatch leads to a central line on each side being extruded at less than the nominal feed rate. This, in turn, endangers the fit.
The second image, above, shows the same design (same STL) sliced for a 0.5 mm nozzle. The problem is basically the same, with one important difference. Because the half-width line in this example is not contained by an inner full-width line printed earlier, the risk of a poor fit is greater.
Incidentally, the centred design is the default because it works better than this with the most common size of nozzle (0.4 mm).
With a 0.5 mm nozzle, getting the perfect single-line wall requires an adjustment to the design itself. In this section, the default configuration file for the Concertina is replaced by an alternative bundled file, namely
cylinder5x2p5_nozzle0p5.yaml, in running the application.
The third image, above, shows the new position of the boss, offset by a small fraction of a millimetre. To be specific, the centre of the boss has gone from the centre of the body to 0.245 mm off centre. Even more concretely,
cylinder5x2p5_centre.yaml specifies a -2 mm offset between the centre of the boss and the edge of the body, while
cylinder5x2p5_nozzle0p5.yaml specifies a -1.755 mm offset. The reason for pulling up 0.245 mm instead of 0.25 would not be apparent in Ultimaker Cura, but is apparent in e.g. Prusa Slicer of an equivalent version.
Slicing for the 0.3 mm nozzle, in Cura, the results of the offset are good. The boss has a single-line wall at more than full width, which ought to work well enough. However, under almost identical circumstances, the same sort of adaptation can leave a divot on the outside of the boss.
The fourth image, above, reveals the intended effect of the offset, slicing for the 0.5 mm nozzle. Here we have the ideal single-line wall between the magnet and its target, and two full lines on the opposite side. In this configuration, print strength, speed, fit, magnetic field strength and appearance are all likely to be good.
This illustrates the need for DFM. You can similarly ensure a good fit by adjusting the dimensions of your design to your CAM software and your hardware.
Instead of moving the boss around, you can make it larger. This is the approach I’ve taken in
scad-tarmi’s DFM module.
In this pair of images we’re back to the default centred build target, but the YAML file has been retouched by hand to set the width of each magnet to 2.8 mm instead of the physical object’s 2.5 mm.
The results are promising. Print strength will be impaired, but for this application, that shouldn’t matter. You might get a loose fit, but a little putty will prevent magnets from rattling around inside the final product.
Offset larger boss
The difference between a nominal 2.5 mm magnet width and the 2.8 mm above is equal to our smaller nozzle diameter, so applying the larger width to the 0.245 mm offset file should produce the perfect single-line wall at our higher resolution.
Disaster! This wall, which should be slightly larger than 0.3 mm in the STL, falls below some cut-off point in Cura and doesn’t appear in the G-code at all, not even for 0.3 mm line width. In the 0.5 mm case, we get a little divot on the opposite exterior.
Here’s an example print of the larger boss, centred, sliced for and printed with the most common nozzle size (0.4 mm, so none of the above).
The screw hole had to be tapped in this print, but the neodymium magnet fits very well and its strength is adequate to hold a drawer.
One design does not fit all. It doesn’t necessarily matter whether you widen your boss or reposition it. The point is that even 3D printing is a craft. In the same way that one bad cut with your chisel can ruin your woodworking, an apparently simple decision on thinly walled bosses can make a feature of your design unusable in the physical object on the other end of some user’s CAM chain.
Design for manufacture and check before you print.