Grasshopper - Custom G-code - Textiles
by connelltrainor in Craft > Digital Graphics
402 Views, 0 Favorites, 0 Comments
Grasshopper - Custom G-code - Textiles
The goal of this project is to investigate the creation of a 3D printed textile object, using G-code generated in Grasshopper. Inspired by the work of Haruki Takahashi, the goal is to explore the sample code for 3D printed textiles demonstrated in class, and modify parameters to produce a custom textile structure. I will also aim to extend this code and create Grasshopper modifications to produce different textile geometries including elements of randomness.
Basic Textile
The first step was to open up the "printedFabricSimplified.gh" sample code provided as a Grasshopper tutorial and begin investigating how it worked, and how adjusting parameters affected the output result. I began to understand the 2 critical components of the textile, which are the pillars (equally space vertical pillars of a given height, spacing and diameter), and the hairs (horizontally running thin lines which weave in and out of spaced pillars, alternating sides).
Printing Basic Textile
I then focused on how the G-code is generated, specifically looking at the python code used to generate the g-code for printing.
I investigated the inputs required for this code to generate a working g-code, and looked at the key components and steps within the python code (such as the startup and heating functions). I was confident that with my improved understanding of the functionality of the python and input parameters, and could begin looking deeper into how the grasshopper generates the geometries and how I could make changes without reducing the chances of the print failing.
Once I was happy with the parameters I had set for the initial print, I tested the g-code out on the Ender 3 Pro.
Challenge: The print was not sticking to the printer bed, after increasing the bed temp from 50 to 65, the print worked more successfully.
Exploring Complex Sample Code
Following on from Steps 1 & 2, with a better understanding of how each parameter affected the textile output, I began investigating the "textileFabricComplex.gh" sample code. My hope was to get a better insight into how the grasshopper flow worked in order to begin planning changes and modifications are could add. I initially started by changing all the parameters to match those found in my initial print in the simplified sample file.
I found it very interesting to see how each component of the Grasshopper affected the result. I experimented by adding multiple 'Panel' blocks to list the input/output from certain elements of the flow in order to see what was going on. By combining this with the process of switching 'preview' on for individual blocks and seeing the resulting output on the rhino model, I gain a pretty good idea of the changes I wanted to make and how I could do these.
Design Development 1 - Random Distance From Fibre to Pillars
My aim was to modify the current complex Grasshopper file to add a random element to the distance between the fibres and the pillars, and then print this a see the resulting effect and compare how it looks with both tightly and loosely woven fibres next to each other.
Upon inspection of the current input to the 'Entwine" block in the Fibre group using a Panel, I added this group of commands seen above. The group of blocks creates a new random input which closely matches the original input but now with an added 50% random increase or decrease (as can be seen by comparing the new and old inputs highlighted in the image above). The resulting effect can be seen, for each Pillar, there is not a variable distance between the fibre and the pillar as I desired.
Design Development 2 - Random Pillar Spacing
My aim for this modification was to add a random element to the previously evenly spaced pillars. As seen in the photo above the previous input for pillar positioning can be seen. After adding the group of blocks seen above the new spacing input can be seen, now with a random element added, whilst keeping the original positions of the first and last pillars the same.
Design Development 3 - Cylindrical Ends of Different Diameter
I wanted to develop the rectangular ends into cylinders for a more aesthetic outcome. I replaced the rectangle block with circle blocks, the radius controlled by the old width and length controls for the rectangles, allowing the circle radius' to be controlled separately.
Printing 1
On my first attempt to print the updated textile model I had some challenges with my generated G-code not working. It seemed that the nozzle wasn't extruding or moving. Upon opening the G-code in TextEdit and comparing this to the simplified version that had previously been printed correctly, it became evident that there were insufficient g-code instructions for initialising the print and heating the nozzle and bed. Using the functioning code used for the previous temp I updated teh the G-code to include the bed and nozzle temp initialisation and startup settings.
Printing 2
The second print was more successful, interestingly I prefer the look of the random pattern.
Removing the Bases
I had a great challenge removing the base for the print. I still have not figured out a good way to do this. Using the cutting tool I can cut away pieces of the base until only the middle section remains. At this point I struggle to remove that last bit without breaking the textile. I attempted to re-print with a thinner base (0.36) but this did not help.