Welcome! Log In Create A New Profile

Advanced

Difference with respect to fdm printing ....

Posted by Replace 
Difference with respect to fdm printing ....
July 13, 2016 11:20PM
The OpenScad difference () function is so important, that I can not make nice things without.

However, when I use the difference () to create to parts that fit into each other, they will never fit after printing.
Example, difference a small cube from a large cube, print them both, they will not fit. I need to print the small cube approx 1mm smaller for a nice tight fit.
I calculate these problems with a 0.5mm marge at all sides and that will often work... not always sad smiley


When the shape is more complex, f.i. to create a shaped box in which you store an item by differencing that complex item, you can not just subtract 0.5 mm at all perimeters, nor can you scale down, as the inner spaces will also scale down, not fitting at their complements.

Is there a general way of defining the size of components so that after the difference has been executed, both parts will fit ?
Or could a function be developed to manipulate the 'to subtract' object so that it will fit after the difference () ?

Just a silly question , which makes sense to me..

Thomas


www.3daybreaker.blogspot.com

Orca V4.4 rebuild to Ramps with Mk8 and E3D, as well as a Rostock Delta Mini and an OLO in backorder :-)
Re: Difference with respect to fdm printing ....
July 14, 2016 04:53AM
Your problem is not with OpenScad, it is with the printer. All manufacturing techniques work to a particular tolerance. Parts may be bigger or smaller by the amount of tolerance the manufacturing process can provide. FFF 3D printers do not produce parts that are exactly the same size as the STL specifies for a number of reasons. Usually inner and outer perimeters are slightly oversize - this is because the extrusion amount calculated by the slicing software to give a particular width of line assumes that the extruded line is symmetrical. An external perimeter is only constrained by an extrusion next to it on one side, so it will bulge out into a round section on the free (external) side and be slightly wider, making pegs bigger and holes smaller. In addition, corners and circular perimeters will be displaced outwards due to the fact that the inner circumference is smaller than the outer circumference (some slicers can compensate for this to a degree). Small holes usually have a considerably smaller diameter than what was designed. With my printer, I have to give holes a diameter of 3.5mm to clear an M3 bolt, for example.

Any design that has push-fit parts in solid (as opposed to elastic) materials must be designed with a small difference (gap) between the male and female sections to allow for manufacturing tolerances.

In OpenScad I will often define a "tolerance" constant that is applied to parts that need to mate with other parts. This constant is then added or subtracted from the relevant dimensions throughout the code. I test the fit by trial-and-error, and then adjust the single "tolerance" constant according to how the printed part turns out. As you have found however, it is not always the same correction factor for all parts of the design. Circular sections & cut-outs in particular have to be adjusted individually, because the amount of adjustment will vary depending on diameter. Making all critical dimensions named constants that are defined at the start of the code means that you can adjust them in one place rather than hunting through the code to find all the places the value is used. With experience you will be able to estimate what correction needs to be applied to various shapes and sizes to work on your printer. For complex designs I will sometimes make small test designs and check prints to test fit of various parts before making the final design. Remember that it is no use making adjustments to any Z dimension that is smaller than the layer height you intend to use. You cannot make a vertical slot 0.1mm longer than the peg that fits into it if your layer height is 0.2mm ! Fortunately the Z accuracy of a FFF 3D printer is far more consistent than the XY accuracy.

For one-off parts I'll use a tight tolerance and then use a needle file, drill or sandpaper to achieve a perfect fit.

Dave
Re: Difference with respect to fdm printing ....
July 14, 2016 09:39AM
Hi Dave,

thanks for the elaboration.

I realize it is my problem, not OpenScad's. I was just interested in methods of others.

Your tip to work wit a tolerance variable is great. I will start to use that in my next designs.

Thnks
Thomas


www.3daybreaker.blogspot.com

Orca V4.4 rebuild to Ramps with Mk8 and E3D, as well as a Rostock Delta Mini and an OLO in backorder :-)
Re: Difference with respect to fdm printing ....
July 18, 2016 04:32AM
I'll add that horizontal slots and holes (e.g. a hole through a vertical wall) that have to be a good fit are particularly problematic because the Z dimension will be as accurate as the layer height allows, while the X or Y dimension will have a different error. You first must ensure that the vertical size of the slot or hole is an exact multiple of your layer height, and that it starts on an exact layer (you can vary layer height and first layer height to ensure that this is the case), and then you may have to scale the slot or hole so that it is bigger in the X or Y dimension - i.e. holes are designed to be slightly elliptical using the "scale" function of OpenScad. If you need a tight push-fit in a wall (e.g. to fit a metal bearing), make the fit a bit looser in the Z dimension than the X or Y dimension. If the Z dimension is very tight, you run the risk of having the layers split. It is however better to arrange holes that are going to take a tight push-fit part to be vertical rather than horizontal, even if that means printing the part as different sections and gluing or bolting the sections together afterwards.

Dave
Sorry, only registered users may post in this forum.

Click here to login