Square Textile Ring?
This is an attempt at modifying the G-Code generated from a modified Grasshopper file based on Haruki Takahashi and Jeeeun Kim. 2019. 3D Printed Fabric: Techniques for Design and 3D Weaving Programmable Textiles. Instead of a single wall of 3D printed textile, I want to create a ring formed by 4 walls of textile.
Tweaking Parameters and Visualizing
I started by modifying the parameters of the modified Grasshopper file. I mostly narrowed the outer pillars and added more spacing between each pillar.
It was interesting visualizing the generated G-Code in NC Viewer.
Analyzing G-Code
I thought it would be interesting if I can duplicate and rotate the textile to have it for a square shape. Sort of like a fence. My intuition thinks I can probably do this by parsing the G-Code.
It seems that the start of the new layer is always indicated by a change in position in Z with a move command. E.g. G1
Does that mean if I am able to parse and identify the G-Code belonging to each layer, I can then compute rotations on the move coordinates to print multiple walls of textile at each layer by inserting duplicate G-Code with modified coordinates before each Z move command?
I would need to parse for G90 and G91, since switching between absolute and relative coordinates will affect how the computation applies.