@dwuk Made some good progress today on a basic gcode post processor to segment prints into the 4 sections that are going to be required for parallel printing.
The challenges were
a) Extruded Lines going out or coming in to segment
b) Extruded Lines passing both in and out of the segment
c). G2/G3 Arcs
Took sliced gcode file of this
Screenshot 2024-12-20 at 15.07.04.png
And sliced out just one section
Screenshot 2024-12-20 at 15.06.25.png
Another example for a more complex model
Screenshot 2024-12-20 at 15.11.41.png
Screenshot 2024-12-20 at 15.12.33.png
Screenshot 2024-12-20 at 15.13.20.png
Screenshot 2024-12-20 at 15.13.30.png
Remaining challenges before moving on to slicing the whole 4 sections and reording the gcode within each layer to do 2 of each of the sections in parallel on the front and rear gantry extruders.
Performance is fairly slow due to the low tech approach I have taken to arcs - which is to segment them into tiny line sections and treat them the same as lines - as the maths for splitting circles into up to 4 smaller sections where they intersect the border of each section got too difficult.
Another issue is travel moves around the cut off borders - the issue is fairly clear in this screenshot. - This will be a particular issue when printing sections that ajoin a layer on a section that has already been printed.
Screenshot 2024-12-20 at 15.22.44.png
Will be interest to see how these segmented files actually print - should be able to run some real tests on a single extruder printer.
The approach I now think I will take with the final output is as follows:
Go through the Gcode file expanding out G2/G3 to G1s.
Go through the expanded file 4 times - creating versions of each of the 4 segments - and collecting statistics per layer per segment.
NB/ Segment precise bounds can vary a bit per layer for strength and in later versions to better spread the load - they just need to be wide enough to avoid gantry clashes.
Final iteration - with output gcode file is generated - which will consist of GCODE, separated by laters - with each layer being either:
a). The gcode of the whole layer unsegmented - for layers with more than 2 colours per segment or not enough time needed in each segment to warrant parallel printing.
b) Segmented - with the following structure:
M596 P01
--Seg3 gcode
M596 P00
--Seg1 gcode - which can be printed in parallel to seg3
M598 - to wait for Seg3 and Seg1 to complete
M596 P01
--Seg4 gcode
M596 P00
--Seg2 gcode for printing in parallel to seg4
M598 - to wait for Seg4 and Seg2 to complete