One of the key features of RhinoScript that make it easy to write powerful scripts is a large library of Rhino specific functions that can be called from scripts. Our python implementation includes a set of similar functions that can be imported and used in any python script for Rhino. This set of functions is known as the rhinoscript package. Documentation on this package can be found at:
Let's compare scripts for letting a user pick two points and adding a line to Rhino.
RhinoScript Version
Dim arrStart, arrEnd arrStart = Rhino.GetPoint("Start of line") If IsArray(arrStart) Then arrEnd = Rhino.GetPoint("End of line") If IsArray(arrEnd) Then Rhino.AddLine arrStart, arrEnd End If End If
Python version
import rhinoscriptsyntax as rs start = rs.GetPoint("Start of line") if start: end = rs.GetPoint("End of line") if end: rs.AddLine(start,end)
Different… but similar enough that you should be able to figure out what is happening in python if you've written RhinoScript.
2020/08/17 | ||
2020/08/14 | ||
2020/08/14 | ||
2020/08/14 | ||
2020/08/14 | ||
2020/08/17 | ||
2020/08/17 | ||
2020/08/14 | ||
2020/08/14 | ||
2020/08/14 | ||
2020/08/14 | ||
2020/08/14 | ||
2020/08/14 | ||
2020/08/14 | ||
2020/08/14 | ||
2020/08/14 | ||
2020/08/17 | ||
2020/08/17 | ||
2020/08/17 | ||
2020/08/17 |