<p>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.</p>

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

<p><a href="https://all3dp.com/best-3d-printing-software-tools/" rel="nofollow">Free Slicing Program List</a></p>

<p>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.</p>

<p>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.</p>

CC BY-SA 3.0
2016-04-13T21:53:54.567Z
I'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
CC BY-SA 3.0
2016-04-13T20:24:25.270Z
2016-04-13T20:24:25.270Z
fred_dot_u
<p>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 <strong><a href="http://3mf.io/" rel="nofollow">3MF</a></strong> 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.</p>

<p>Since <em><a href="https://en.wikipedia.org/wiki/STL_(file_format)" rel="nofollow">STL</a></em> relies on triangulation to define its shapes, it is common to see the discrepancy, especially on a circular feature.</p>

CC BY-SA 3.0
2016-06-29T15:17:25.727Z
2016-06-29T15:17:25.727Z
tbm0115
<p>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 (<a href="http://www.freesteel.co.uk/wpblog/slicer/" rel="nofollow">http://www.freesteel.co.uk/wpblog/slicer/</a>) and save the slices in a bmp format. </p>

<p>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 <a href="http://s24.postimg.org/p7w09zvkl/snippet.png" rel="nofollow">http://s24.postimg.org/p7w09zvkl/snippet.png</a> for the image). </p>

<p>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.)</p>

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

<p>Thanks! </p>

<p>PJ </p>

CC BY-SA 3.0
2016-04-13T21:55:35.830Z
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
CC BY-SA 4.0
2018-09-14T20:18:36.800Z
I think this link can help you a lot!
https://www.mathworks.com/matlabcentral/fileexchange/68794-make-stl-of-3d-array-optimal-for-3d-printing
John
<3d-models>
How to create a very accurate STL file as well as the slices for a 3D printer?
PJay
# How to create a very accurate STL file as well as the slices for a 3D printer?

(Asked by: username_0 on 2016-04-13)

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 (<http://www.freesteel.co.uk/wpblog/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 <http://s24.postimg.org/p7w09zvkl/snippet.png> 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?

Thanks!

PJ

**Tags:** 3d-models

> **Comments:**
> **username_1**: 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.  
> **username_2**: I think this link can help you a lot! https://www.mathworks.com/matlabcentral/fileexchange/68794-make-stl-of-3d-array-optimal-for-3d-printing  

---

## 2 answers

### Answer by username_3 on 2016-04-13. Score: 3

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](https://all3dp.com/best-3d-printing-software-tools/)

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.

> **Comments:**
> **username_1**: I'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.  

---

### Answer by username_4 on 2016-06-29. Score: 2

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](http://3mf.io/)** 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](https://en.wikipedia.org/wiki/STL_(file_format))* relies on triangulation to define its shapes, it is common to see the discrepancy, especially on a circular feature.


---

