Extract X,Y,Z coordinates to a curve w/ Python?


I want to use Python to “draw” with a 3D printer using data output from a Processing sketch. The sketch draws X,Y with mouse movement and Z with time elapsed. This line will eventually be translated to gcode. This won’t follow a conventional shape>slicer>gcode workflow but rather line (curve)>gcode.

Each x,y,z coordinate in the text file will look like this :


How can I extract them and get a curve in Rhino?


I think if you use this sample, replacing rs.AddPoints with rs.AddInterpCurve then you will get what you are looking for. (Not tested - let me know how you get on).

Best regards


Thank you so much! That looks promising. I will give that a try.