Overview of platting algorithm
Now this is a gcode generator, if you want some different behavior than the default one you always can reach out to me via email.
For 3d printers:
Algorithm goes from bottom to top, shooting a rays from left to right at (nozzle diameter) intervals (front/back)
If there is a gap between left/right movement algorithm cuts the space in half and continues to print one halfspace until it is printed then goes to another halfspace and prints it.
If there is no extrusion and the nozzle needs to move the feedrate of the nozzle is set to 8000 instead of what you have chosen.
Every extrusion move is set with the feed rate set up in the export form.
App adds 'return to start position' command after finished export
For CNC (TopBottom aloghrithm i just reversed the movement instread going from bottom it goes from top to bottom) - I don;t own a cnc - i plan to but not for now: this will force me to research the field and make a ton of stuff i don't need, a bit of time waste.
App adds 'return to start position' command after finished export - use that with caution!
See short clip of the algorithm to see how it works in 3d print mode:
What we will print:
Should have chosen different camera AND the filament broke so it stopped extruding in the middle of the print.... I am not going to record it again.
Ok, so to somehow explain it further with some oversimplification:
This is the part we want to print and a start point 0,0,0
We will assume that first hit happens on the left (bottom left) of the object
Then algo continues to go up.
When it reaches that point (shown with arrow)
It will create a half space (actually two one main that will cover pinkish side and other that will cover blueish side) (2d space divided by two lines one horizontal one vertical)
which will print only remaining of the model (somewhat pink color), not exceeding first halfspace, after halfspace is printed (in this case it will be at top (dunno if it will be left or top right of pinkish color), then it checks if we have any remaining halfspaces in the stack (blueish color)
if no - it pops up and check if we have any other remaining halfspaces (in this case none)
if yes - lets print another halfspacen(by starting from the top of the whole model) now whenever it first hit left or right blueish side it will start printing from other side. And if a halfspace split happens it will create a new halfspace - explained further in the article)
BUT in this case it will just print: pink side below
Now to further explain the halfspace division:
Consider this image:
Algorithm creates a line every (increased by) nozzle diameter - beggining from start point to opposite boundary point of drawn model.
Whenever algorithm finds out that there are 2 lines or more to print at current red line, it will split the model (where first printed line ends) resulting in creation of halfspace, and this continues on and on and on.Â
After all halfspaces are finished printing it rises the nozzle up and continues to print another layer.
I did not add checking for thin line printing so you may hear some buzz going from the printer as it wants to print thin line from up/down, with left to right movement...