I was playing around with RhinoPython for the first time and tried the script on this McNeel documentation page and it consistently crashes Rhino 6 Mac.
Even trying to run a simpler version such as the following consistently crashes Rhino.
import rhinoscriptsyntax as rs
polyline = rs.GetPolyline()
if polyline: rs.AddPolyline()
Since I’m completely new to using Python on Rhino I’m not sure if I’m the problem.
I know I forgot to pass the value of polyline to the AddPolyline() method, but I just ran the same code on windows and it trows and error when I reach that line, as it should. In Rhino Mac it never reaches line 4. GetPolyline() is a UI method so the user should get prompted for points before line 4 is executed and it never does.
Just to make things clear: This also always causes rhino mac to crash:
import rhinoscriptsyntax as rs
polyline = rs.GetPolyline()
if polyline: rs.AddPoint(polyline[0])
You’re absolutely right! I’ve tried the code snippet in the latest version of Rhino 6 and 7, and both times the application crashed immediately. Seems like you found quite the bug here!