Using ghpythonlib.components within the new Python3 editor in Grasshopper. Running the code:
import ghpythonlib.components as ghc
a = ghc.ControlPoints(x).points
on a single Polyline. In old GHPython component it works, In new IronPython component it works, but in Python3 component it fails with the TypeError ?
Traceback (most recent call last):
File “rhinocode:///grasshopper/1/bb3c85fc-075c-479b-b881-011913859fac/6ed762a7-d56d-47de-b86d-11dae4f305a4”, line 2, in
File “/Users/em/.rhinocode/py39-rh8/site-rhinoghpython/ghpythonlib/components.py”, line 164, in component_function
elif len(result) > 1: result = __namedtuple(outputnames, result)
File “/Users/em/.rhinocode/py39-rh8/site-rhinoghpython/ghpythonlib/components.py”, line 62, in init
raise TypeError(
TypeError: Expected type Array[str] for input ‘attributes’, got IReadOnlyList[String].`
Could you please elaborate on how can I use numpy and ghpythonlib.components in Rhino 8, Grasshopper?
I want to write an algorithm to create the kinematic matrix of a structure and I have to use the numpy library. On the other hand, I use points and lines as variables, and I should use gh components in my code.