I am currently working on software for layered manufacturing (3D printing), and have come to a point where I no longer know what to do. I am at the stage where I must take a bunch of lines, and order them to create a seamless contour of a model. I have some basic ideas on how I am going to do this, but since I am using .STL files there are excess lines in some of the layers.
In that image you can see that there is a simple square with a line connecting two corners to form two triangles. This is the base of a cube. Ideally the line connecting the two corners wouldn't be there, but because this was processed from a .STL file which uses triangles only it has to be there to turn the square into two triangles. My original thought was to print out that line too, but in a more complex model ( like a gear ) there would be too many and it would be impossible to create one seamless contour. My next thought was to just print it out as two triangles, but I cannot go over the same line twice, so that doesn't work especially in complex models. I have been thinking about this problem for quite a while, but I can never come up with a solution that would work for any model. I need to end up with series of lines that form contours of not just the outside, but possibly the inside as well if there are holes. For example a gear would have one set of lines that form the teeth all the way around, and another set of lines that form the hole in the middle. If anyone knows a solution to this, or has experience with this, I would greatly appreciate your input =)