Project 4
Fourth project exploring g-editing following the basic slicer instructions and applications to self-intersecting geometries
Implement Slicer Following Document Instructions
I implemented the basic slicer following the document instructions on the class website. During this implementation, I had an error connecting the nodes and I actually made the extrusion too high and the nozzle was stuck for that print. After I fixed the error, I experimented with printing some basic shapes and also changing the layer height from 0.1, 0.2, and 0.6 values. 0.1 produced the best and smoothest result and 0.6 created layers that collapsed.
Modify Basic Slicer
I modified the python code and created a node that took as input the points from the divide and connected them to form a "star" shape, using a parameter to control now distant were two points that got connected. I connected this list of points to the original slicer to create the new gcode.
I also used a node called rotate 3D to rotate the curves created from the slicing and explore a twisting effect on the geometry
"""Provides a scripting component. Inputs: x: The x script variable y: The y script variable Output: a: The a output variable""" __author__ = "Ana" __version__ = "2022.04.24" import rhinoscriptsyntax as rs import ghpythonlib.treehelpers as th layerTree = [list() for _ in MeshPoints.Paths] layerTreeP = [list() for _ in MeshPoints.Paths] for i in range(0, len(MeshPoints.Paths)): pList = MeshPoints.Branch(i) ln = [] pt = [] k = 0 pt.append(pList[k]) for j in range(0,len(pList)): k = (k+distance)%len(pList) pt.append(pList[k]) ln.append(rs.AddLine(pList[j],pList[(j+distance)%len(pList)])) layerTree[i].extend(ln) layerTreeP[i].extend(pt) layerTree = th.list_to_tree(layerTree, source=[0,0]) layerTreeP = th.list_to_tree(layerTreeP, source=[0,0]) a = layerTree b = layerTreeP
Print Self-intersecting Shapes
I created an initial code that, because of the way lines were generated created more intersections than I wanted so I had to modify my code so it used the points instead of the lines and passed that to the slicer.
I explored printing a star shape from a cylinder and was able to verify that the self-intersection worked when printing and created interesting effects that I would not be able to achieve with a normal slicer
Explore More Shapes
I played with the parameters I had and used different base Breps to create shapes like the basket, by creating a loft between circles of varying diameter. I also created a dense layer of intersections until the material created a solid surface and the intersections gave a property of texture instead of shape.
Finally, I played with different Breps for the original simple slicer and created self-intersecting shapes by creating twisting lofts between star-shaped curves. I realized that the simple slicer has a limitation to capture the curves of the geometry because the points are created at different places on each layer and this creates artifacts when the point fails to be located at the corner of a shape. This could be solved by creating a slicer that uses the curve's vertices as slicing points instead of the divide operation.