How to create a very accurate STL file as well as the slices for a 3D printer?



I have been using Solidworks and AutoCAD to create STL file of a 3D model I want to print. I slice the STL file using Freesteel Z level slicer ( and save the slices in a bmp format.

My 3d print has an array of circular channels, all of one radius. I expected the bmp slice to contain the circular shapes looking exactly identical to each other. However, I don't obtain the exact same replicas. Looks like the pixel-wise mapping has not been done uniformly. (View for the image).

I want each and every circle to be represented by exactly the same set of pixels in the bmp image, so that all of the circular contours are identical. (I do not prefer changing the pixel resolution.)

How can I overcome this problem? Are there any better tools which would lead to a perfectly uniform pixel-wise mapping?




Posted 2016-04-13T18:42:45.980

Reputation: 31

I think this link can help you a lot!

– John – 2018-09-14T20:18:36.800

One approach is to crank up the fidelity of the STL mesh, and then perhaps first sample at a higher resolution before passing through a more intelligent (potentially custom) decimator to your target resolution. Another, if the complexity of your design is not beyond what you can describe mathematically / programmatically, would be to skip the cad pacakge and slicer and instead try to write a program which directly generates the output bitmap. – Chris Stratton – 2016-04-13T21:55:35.830



Your objective has a serious constraint regarding the pixel resolution. Within that limitation, the software (slicer) you are using will generate "best guess" images, particularly dependent on floating point math. There may be a single combination of circular shapes (radius) and spacing for these shapes that provides your objective, but that's likely not a practical exercise.

You have not indicated if you've tried other slicers, which would be the primary direction. A list of choices can be found here:

Free Slicing Program List

Another option that you can consider, not included in this list, is to use OpenSCAD, import the STL file, then use the projection() command to manually slice and export the image file. I use the term "manually" but the program can be coded to perform this task automatically, and there is a command line feature to OpenSCAD that may be useful.

Note also that the output of these slicers and/or OpenSCAD may exceed the resolution you desire. Manipulation of the image with a graphics editor could result in the same floating point disarray as you perform the changes.


Posted 2016-04-13T18:42:45.980

Reputation: 8 399

1I'm not sure I'd blame floating point math, as much as the fact that the design if first being approximated by a triangular mesh, and then sampled at the resolution of the destination bitmap. – Chris Stratton – 2016-04-13T21:53:54.567


You seem to have a pretty good understanding of how STL, so in case it helps anyone else, there is a file format (currently) in design called 3MF which should help with more accurate 3D Printing. While its focus is to ensure solidarity in a model (or manifold), the XML-based format should leave itself open to allow the machine/slicing software to be the only limiting factor in design geometry.

Since STL relies on triangulation to define its shapes, it is common to see the discrepancy, especially on a circular feature.


Posted 2016-04-13T18:42:45.980

Reputation: 6 144