Hello,
I am a beginner in Ghpython, I have some questions to understand globally the functioning of Ghpython :
I would like to know the difference when we import 3 libraries: rhinoscriptsyntax, Rhino, scriptcontext, for example:
import rhinoscriptsyntax as rs
import Rhino as rh
import scriptcontext as sc
When should we use each library, they do the different things?
Where we can find the help for each method of these libraries, for example:
rh.Geometry.Brep.GetBoundingBox ()
rs.coercebrep (j)
I opened Help for rhinoscriptsyntax F1 (Rhino IronPython) in Grasshopper Python script Editor, I’m looking for GetBoundingBox, coercebrep but it does not exist in the help!
It’s supper if anyone can explain these questions to me. These questions are important for me to understand how Ghpython works.
Short-ish version:
Rhinoscriptsyntax is a bunch of pre-written functions. They are written in python. under the hood…they are using rhinocommon. You can actually look at all the code because it exists on your computer, located here:
C:\Users\YOURUSERNAMEAppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython Scripting (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript
when you import rhinoscriptsyntax, you get access to all of those rhinoscriptsyntax functions.
NOTE: when using rhinoscriptsyntax in a ghpython component…you first need to review scriptcontext.
Read the section on ghdoc in the GhPython Common Questions and Answers link.
use %APPDATA%\McNeel\Rhinoceros\6.0\Plug-ins\IronPython Scripting (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript in the address bar of the file explorer.