timschmidt/repsnapper — Issue #50: Suggestion: Improved gcode generation
Author: wijnen
Created: 2011-11-24 10:10:21+00:00
State: open

I have two suggestions to generate better gcode:

1. Use a modularized approach, like skeinforge does. There are several things to do, each of which can be implemented by one or more modules:
- read stl (or other format) file into triangles.
- convert triangles to slices with polygons
- convert polygons to areas (either "shell" or "inside"; best would be to have shell on top and bottom of a region as well).
- convert areas to polygons (head movement)
- convert polygons to gcode

For any conversion, there must be exactly one option selected. Between conversions, there must be a defined format which can be modified by filters. Between conversions any number of filters may be added. For example, a towering filter could be added just before converting to gcode; it would reshuffle the polygons.

2. Because building this, and in particular implementing all the filters, will take long, and because skeinforge is very good: allow external gcode generators to be called from the gui instead of the internal one.

I think the start of step 1 is not so hard. Just split stl.cpp into several modules. Everything is already in there. All intermediate storage types must be defined. This is important, because filters will work on them. It's not very hard, but it must be done well.

If anyone dislikes this approach, please speak up; I don't like to spend time on things which aren't used. :-)