4
$\begingroup$

I am writing my own slicer and wonder if there is a mathematical proof that proves that the intersection of the slicing plane with the STL file will only produce closed-loop polygons for every given slicing plane?

Thanks!

$\endgroup$
5
$\begingroup$

You can't prove that because it isn't true. An STL file is just a collection of triangles. There is no guarantee that an intersection with the slicing plane will consist of closed-loop polygons. To be suitable for 3D printing an STL file should represent one or more closed, disjoint polyhedra (which would yield closed-loop polygons) but this is not always the case. Many slicers have heuristics to try and "fix" bad STL files on a best-effort basis. Especially considering the possibility of rounding errors, it is important to at least detect polygons that are almost (but not quite) closed and connect their endpoints together.

$\endgroup$
2
$\begingroup$

I am also trying to write my own slicer and so I would just like to offer some additional information.

What you will find is that .stl files just store triangles and don't validate that the triangles assemble to create a printable model so a lot if not most .stl files are going to have data that isn't exactly what you want it to be. So you will want to have additional steps before you get to slicing, to fix up the data you get from the stl file.

A lot of stl models are designed for 3d graphics where intersecting other triangles and not being manifold isn't an issue. So you will probably want to write some code to test your models before trying to slice them.

For example if you just sliced the layers of the Utah Teapot Teapot and don't repair the model for 3D printing first you will get two different types of errors. The handle of the teapot does not actually attach to the teapot and is a separate model. And the spout of the teapot is a separate model that intersects the teapot. Both the handle and spout are also open at the ends and not water tight.

$\endgroup$
2
  • $\begingroup$ Surely the spout not being watertight is correct for one of the ends and should not be repaired. $\endgroup$ – Ross Dec 25 '17 at 3:42
  • $\begingroup$ As a 3D object to display on a computer the spout not being closed is not an issue and will look how you would expect a teapot to look. But for constructing a physical model you need information about the thickness of the walls of the spout. This information about the thickness should be given by including information about the inside walls of the shape, and the lip of the spout. $\endgroup$ – user802599 Jan 2 '18 at 5:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.