<p>Let's say I'm modeling a simple box with a lid. Just as an example, we'll say the <strong>outer</strong> edge along the top of the box is 50 mm x 50 mm. With 3D modeling software, it's easy to build a lid for this box to surround the top with an <strong>inner</strong> edge size of also exactly 50 mm x 50 mm ...but this seems like a bad idea. Surely I'll want some kind of of gap, to ensure an easy on/off. An <em>exact</em> fit seems like it's asking for trouble.</p>
<ul>
<li>How much gap do we leave for this kind of thing?</li>
<li>Is it related to nozzle size?</li>
<li>I suppose it also matters how tightly you want to fit, though I expect in cases where a tight fit matters some kind of snap or clip would be used.</li>
<li>Are draft prints with larger layer sizes useful for figuring this, or do the rough layers make things seem tighter than they'll be in a final print?</li>
</ul>

[{'answer_id': 6578, 'author': '0scar', 'author_id': 5740, 'author_profile': 'https://3dprinting.stackexchange.com/users/5740', 'pm_score': 3, 'selected': False, 'text': '<p><em><strong>Short version:</strong> basically, this depends on your printer, make, model, type, state of maintenance, extruder, slicer settings, belt tension, play, friction, etc.</em></p>\n<hr />\n<p><em><strong>Long version:</strong></em> Basically your printer determines how accurate it prints; you can influence the accuracy a little by calibrating and fine tuning the printer. What regularly is done is to print <a href="https://www.thingiverse.com/thing:1278865" rel="nofollow noreferrer">calibration cubes</a> of fixed size. Before you do that, you should read &quot;<a href="https://3dprinting.stackexchange.com/questions/6483/how-do-i-calibrate-the-extruder-of-my-printer">How do I calibrate the extruder of my printer?</a>&quot;; this explains to calibrate the extruder. With a fine tuned extruder you could print those XYZ calibration cubes, or in your case create a box of e.g. 50 x 50 x 15 mm. When you measure the length and the width with a caliper, you will know how much the tolerances are for this print size. Eventually, you could change this by re-adjusting the steps per mm in the firmware of the printer, but this is not always a recommendation (as your steps per mm should be related to the mechanical layout of the used mechanism, e.g. the belt size and pitch in combination with the pulley and the stepper resolution).</p>\n<p>Please also look into the answer of &quot;<a href="https://3dprinting.stackexchange.com/a/6570/5740">How to make moving parts not stick together?</a>&quot;; this answer hints to printing a tolerance calibration model that uses diabolic shapes set apart from the outer object by several values for the offset between the pieces. When you print this you can find out what sort of tolerance works for you. Please do note that the tolerances on smaller parts may be different than the tolerances on larger parts.</p>\n<p>The answer on your question thus depends on your 3D printing machine, but usually the tolerance values range in the few tenths of a millimeter. To enable a lid on top of a box like in your example, you need to keep the tolerance in mind when designing the lid. Usually an extra few tenths of a millimeter will do the trick, but if you make some test prints first you will know exactly.</p>\n<p>To answer the question what the influence is of layer height on tolerance, I <a href="https://mattshub.com/2017/04/19/extruder-calibration/" rel="nofollow noreferrer">quote</a>:</p>\n<blockquote>\n<p>Load a 25 mm cube into your slicer and set the infill to 0%,\nperimeters to 1, and top solid layers to 0. You’ll also want to print\nit at a fine resolution – I chose 0.15 mm and it actualy did make a\nsmall (0.02 mm) difference in the wall thickness as opposed to 0.3 mm.</p>\n</blockquote>\n<p>So yes the layer height has an effect, it is very little though.</p>\n<p>An interesting read is &quot;<a href="https://www.matterhackers.com/articles/a-guide-to-understanding-the-tolerances-of-your-3d-printer" rel="nofollow noreferrer">A Guide to Understanding the Tolerances of Your 3D Printer</a>&quot; from &quot;<a href="https://www.matterhackers.com" rel="nofollow noreferrer">matterhackers</a>&quot;.</p>\n<p>Furthermore, when you have calibrated the printer but still run into small deviations, is that most slicers will allow you to compensate for X and Y dimensions.</p>\n'}, {'answer_id': 6599, 'author': 'Sean Houlihane', 'author_id': 4927, 'author_profile': 'https://3dprinting.stackexchange.com/users/4927', 'pm_score': 3, 'selected': False, 'text': "<p>Yes, some clearance is necessary. Even if you were machining perfect metal parts, you would want a clearance gap (and make an allowance for mis-alignment along the Z axis too, long joints can bind quite easily).</p>\n\n<p>In addition to this, you need to make a small allowance for the walls bulging slightly under the extrusion pressure (layer height being less than the nozzle diameter).</p>\n\n<p>Other factors to take into account are layer-change ooze (which often makes a small seam appear), and ripple effects resulting from acceleration. This means that even once you have tested the gap that a specific model requires on your printer, you can't rely on the same gap working perfectly when you design another model. If you require rotational symmetry in your fit, it will be harder to get a good tight joint to be reliable.</p>\n\n<p>Sometimes a print-in-place design can give you a similar effect to a clip together design, but permitting a more positive retention</p>\n"}, {'answer_id': 6854, 'author': 'Serge Rabyking', 'author_id': 11199, 'author_profile': 'https://3dprinting.stackexchange.com/users/11199', 'pm_score': 4, 'selected': False, 'text': '<p>I use my clearance values according to my rule of thumb: 0.1\xa0mm - to fit with some force, 0.2\xa0mm - just fit edge to edge without force.</p>\n<p>Examples:</p>\n<ol>\n<li><p>3\xa0mm metal cylinder to be pressed into plastic part needs <span class="math-container">$3\\ mm+0.1\\ mm*2=3.2\\ mm$</span> diameter printed hole (clearance from two sides)</p>\n</li>\n<li><p>3\xa0mm screw to fit into plastic part needs a hole bigger than <span class="math-container">$3\\ mm+0.2\\ mm*2=3.4\\ mm$</span> that is 3.5\xa0mm will be already good.</p>\n</li>\n</ol>\n<p>This is fully experimental but always worked for me on three different printers and both on PLA and ABS.</p>\n'}, {'answer_id': 6856, 'author': 'user77232', 'author_id': 12857, 'author_profile': 'https://3dprinting.stackexchange.com/users/12857', 'pm_score': 0, 'selected': False, 'text': "<p>Since you said nozzle, I expect you mean FDM 3d printing. Typically you would use one (1) outline of gap between the parts. An outline is usually equal to the size of the nozzle. The corners of a 3d printed square object are rounded. The radius of that rounding would be half your nozzle diameter (i.e. the nozzle's radius). Also if there was any over extrusion occurring on the outline it the two parts would not fit within each other. This is of course assuming that they are being designed to easily come apart. Otherwise you can make them an exact fit if you intend to friction fit them together.</p>\n"}, {'answer_id': 7011, 'author': 'dgrat', 'author_id': 10847, 'author_profile': 'https://3dprinting.stackexchange.com/users/10847', 'pm_score': 0, 'selected': False, 'text': '<p>I usually print a test cube with different wall thicknesses and calculate the average deviation. This I use as tolerance. However, I do not believe that many belt driven cartesian printers can perform much better than +/- 0.1 to 0.25 mm along the XY-axis. Consequently, I would suggest to use something between 0.1 to 0.25 mm. If it is more than 0.5 mm you have an issue with the mechanics.</p>\n'}, {'answer_id': 7614, 'author': 'Joel Coehoorn', 'author_id': 12562, 'author_profile': 'https://3dprinting.stackexchange.com/users/12562', 'pm_score': 2, 'selected': False, 'text': "<p>After printing 4 months, I've learned an answer for at least two situations, based on the geometry of the filament and nozzle. For this discussion, I'm using .1mm layers with a .4mm nozzle.</p>\n<p>First is the basic box and lid, from my question. It's important to remember the shape of the nozzle opening is a circle, and therefore when extruding to open air you get a cylinder. But we don't extrude to open air. We subtly press the extruded filament into the build surface or previous layer. In that case, using my best ascii art, a cross section of an extruded line of filament has rounded edges that only approximate that .4mm nozzle size, like this:</p>\n<pre><code>(    )\n</code></pre>\n<p>And as you lay down several layers, the exterior edge of a printed part should look more like this:</p>\n<pre><code>(\n(\n(\n(\n</code></pre>\n<p>where the outer edge of the curve actually protrudes slightly from the planned dimensions of the part. The question is, &quot;how much&quot;? My experience so far has been as much 0.05\xa0mm. And remember, you need to account for that for both the box part and the lid part. Additionally, when designing the lid, you need to account for this gap on both ends of each dimensional axis. That means a gap of as much as 0.2\xa0mm could still be a nice, snug fit.</p>\n<p>For the second scenario, let's say you have a pair of prints that will fit together. The base print includes an upward-pointing rod or cylinder, like a Lego piece, that will slot into a paired opening.</p>\n<p>Now you need to create the matching cylinder opening in the upper part, and you need to know how big. The concern is the top of the opening, which has nothing but air below it to hold up the filament. For small gaps you might bridge the distance. For larger gaps you might use support material or hemisphere top.</p>\n<p>Let's say you find those options difficult for this scenario, or perhaps other factors have you printing this part laying sideways. so instead of an opening for a cylinder sitting like a can of soup, you print the part as is the cylinder were laying on it's side.</p>\n<p>Now we can consider the geometry of how the filament is laid down. With my example nozzle and layer dimensions, we realize your opening <em>is not the precise circle indicated by the model</em>. Instead, you have a grid pattern, like old 8-bit computer art. Worse, the width of each &quot;pixel&quot; is up to 4 times greater than the height.</p>\n<p>With that in mind, the minimum extra space you need will be 1/2 of that 0.1\xa0mm height, and the wrong situation could extend this to as much as 1/2 of the 0.4\xa0mm filament width. And since this goes all the way around the part (on both sides) you need these distances twice. This is <em>in addition to</em> the ridging effect discussed for the box earlier. The result means your rounded part should look for between a gap between 0.3\xa0mm and 0.5\xa0mm, with additional gap space if you're designing a part you may want to scale at some point. Remember, though, that plastic is pliable and if push comes to (literal) shove, sandable. In practice I've done well near the lower end of that range.</p>\n"}, {'answer_id': 9796, 'author': 'John Deters', 'author_id': 7197, 'author_profile': 'https://3dprinting.stackexchange.com/users/7197', 'pm_score': 2, 'selected': False, 'text': "<p>Before we get into nozzle sizes and snap fits, let's start with the bigger picture.  We need to use a common language for defining the parts.</p>\n<ul>\n<li><strong>Allowance</strong> is a planned difference between a nominal or reference value and an exact value.</li>\n<li><strong>Clearance</strong> is an allowance defining the intentional space between two parts.</li>\n<li><strong>Interference</strong> is an allowance defining the intentional overlap between two parts.</li>\n<li><strong>Tolerance</strong> is the amount of random deviation or variation permitted for a given dimension.  How much error can the part tolerate and still function?</li>\n</ul>\n<p>Let's use an example.  We want a 5\xa0mm pin to go into a 5\xa0mm hole, and we want a loose fit between them.</p>\n<p>We've said 5\xa0mm, but which 5\xa0mm is more important -- the 5\xa0mm hole or the 5\xa0mm pin?  Let's say other people have 5\xa0mm pins they want to use with our hole.  In this case the pin dimension is out of our control, and therefore is more important for interoperability.</p>\n<p>The loose fit is calling for clearance.  Let's specify 0.2\xa0mm so they're free to turn.\nWe could add the 0.2\xa0mm allowance to the hole, giving a 5.2\xa0mm hole with a 5.0\xa0mm pin; we could subtract the 0.2\xa0mm allowance from the pin, giving a 5.0\xa0mm hole with a 4.8\xa0mm pin; or split the difference in any way we want, such as a 5.1\xa0mm hole and a 4.9\xa0mm pin.  Because we specified the pin is more important, we'll add the allowance to the hole.</p>\n<p>Now that we have defined our part, let's define other terms important to helping us understand the manufacturing process:</p>\n<ul>\n<li><strong>Accuracy</strong> is the maximum dimensional variation between parts. (Another word might be repeatability.)  Note that a machine cannot produce parts with a tighter tolerance than its accuracy.</li>\n<li><strong>Precision</strong> is the size of the steps a machine is capable of. Precision is often confused with accuracy, but they are not the same thing.</li>\n</ul>\n<p>Now we need to understand our machine's accuracy. The printer could print the pin larger than 5\xa0mm or smaller than 5\xa0mm. Or it could print the hole larger than 5\xa0mm or smaller than 5\xa0mm. To determine the printer's accuracy, we'll need to print some 5\xa0mm pins and 5\xa0mm holes and measure the differences between what we defined and what we printed. The difference between the largest and smallest measurements is our machine's accuracy. Be sure to measure the accuracy in the X, Y, and Z dimensions; a printer might have a difference between the X and Y axes that would affect the roundness of the parts.  (If it's off, this can usually be adjusted in the machine's firmware through a calibration process.)  Furthermore, we should test round parts, round holes, square parts, and square holes, as each printer can be different in how repeatable those parts are.</p>\n<p>Let's say that the printer's measured accuracy for both round holes and round pins is +/- 0.2\xa0mm.</p>\n<p>Then, we move to clearance. What is the minimum gap between parts that still does the job, and what is the maximum acceptable gap?  As the designer, it's up to you to decide.  In this example we said we want a loose fit, so let's define a clearance of at least 0.2\xa0mm between the pin and hole, but no more than 1.0\xa0mm or the parts will fall out.</p>\n<p>Since the machine's accuracy is +/-0.2\xa0mm, the pin will be anywhere between 5.2\xa0mm and 4.8\xa0mm.  The hole must therefore be the maximum pin size, 5.2\xa0mm, <em>plus</em> clearance <em>plus</em> the accuracy of the hole.  That gives the hole dimension as 5.6\xa0mm +/-0.2\xa0mm. The minimum tolerance condition would be a minimum-sized hole (5.4\xa0mm) and a maximum-sized pin (5.2\xa0mm), giving a 0.2\xa0mm clearance; the maximum tolerance would be a maximum-sized hole (5.8\xa0mm) and a minimum-sized pin (4.8\xa0mm) giving a 1.0\xa0mm clearance.</p>\n<p>Note that a clearance of 1.0\xa0mm is really sloppy.  It might be way too loose for our application. We might think to tighten the tolerances to 0.05\xa0mm in order to reduce the clearance. But we've noted that a machine can't produce a tolerance tighter than its accuracy.  If the printer can't produce a part that meets our specified tolerances, we would need to find a different way to manufacture or finish the parts.</p>\n<p>In the metalworking world, a common way to do this is to specify the parts to be initially manufactured with intentionally maximal material.  This lets us start with a smaller hole and use a bore or a drill bit to open it up to a more precise and round hole.  We can do the same thing with a pin, by starting with a thicker rod and turning or grinding it down to make it more smooth and round.</p>\n<p>In the FDM 3D printing world, we can do the same kind of thing at the workbench.  First, print the parts with an extra wall layer (or two). The extra thickness gives more material to remove while drilling it out, or grinding it down, without weakening the part too badly.  After printing, run a drill bit through the hole to clean it up.  Or spin the pin in a drill motor's chuck and grind it down with a loop of sandpaper.</p>\n<p>Of course, any time you add a finishing operation, it's more labor-intensive and therefore more expensive.  So this isn't something we want to do on every part, but we can consider it.</p>\n<p>Notice that when you define parts this way you aren't starting with the nozzle diameter or layer height.  Instead, you're allowing the nozzle diameter, layer height, belt stretch, and the sum of all the causes of variations to show up in the measured accuracy of the machine.  Smaller nozzles, thinner layers, heated beds, slower speeds, or cooling fans may each contribute to improved accuracy, allowing you to print parts with tighter tolerances. But to make successful prints you need to factor in the cumulative impact of all the machine's options.</p>\n<p>Once you've got the terminology, it will be much more clear how to factor in an allowance for half the width of the extruded material, which is a function of nozzle width, extrusion rate, and layer height.</p>\n"}, {'answer_id': 19952, 'author': 'Samuel Danielson', 'author_id': 35407, 'author_profile': 'https://3dprinting.stackexchange.com/users/35407', 'pm_score': 0, 'selected': False, 'text': "<p>Start with your nozzle width for a prototype. I made some 50-80\xa0mm jars with screw-on lids using a 0.4\xa0mm nozzle. I could get the threads to start using 0.15 \\$slop parameter (BOSL2 scad library trapezoidal thread at pitch 5 or 6) but couldn't get past 1/4 turn. With 0.4 $slop it turned loosely with just a little bit of play and tightened up nicely.</p>\n<p>There are obviously a bunch of parameters that will affect the actual clearance, but nozzle width seems like an excellent rule of thumb for a draft.</p>\n"}, {'answer_id': 20139, 'author': 'Aaargh Zombies', 'author_id': 29097, 'author_profile': 'https://3dprinting.stackexchange.com/users/29097', 'pm_score': 1, 'selected': False, 'text': "<p>My approach has always been that I'm going to lose material when I sand down the item to remove layer lines, so I generally print to exact fit, and then manually correct with sandpaper or a craft knife.</p>\n"}]
['https://3dprinting.stackexchange.com/questions/6576', 'https://3dprinting.stackexchange.com', 'https://3dprinting.stackexchange.com/users/12562/']