Is there a python library, similar to rhinoscriptsyntax, that contains Grasshoper’s components?
For instance Grasshoper has a “4pt surface” (Srf4Pt) component. But I could not find any such function in the rhino python package.
Is there a python library, similar to rhinoscriptsyntax, that contains Grasshoper’s components?
For instance Grasshoper has a “4pt surface” (Srf4Pt) component. But I could not find any such function in the rhino python package.
Yes, it‘s called ghpythonlib and you can import it like this for example:
import ghpythonlib.components as ghcomp
You then have access to (almost) all components as functions
Instead of wrestling with the near obsolete ghpythonlib
, you could simply use Rhino.Geometry.NurbsSurface.CreateFromCorners
(cf. docs).
In some cases, ‘CreateFromCorners’ appears to be less sensitive to point sequence than Srf4Pt
import Rhino
a = Rhino.Geometry.NurbsSurface.CreateFromCorners(V[0],V[1],V[2],V[3])
Ruled surface component replicates exactly the same behavior as Srf4Pt component:
Rhino.Geometry.NurbsSurface.CreateRuledSurface
Or more sensitive?
Less sensitive in the sense that a correct result is less dependent on the sequence of points.