Thanks, i see this problem in another topic and i though it solved.
Actually i convert tree to one list avoid this error than i split it in grasshopper.
We can also create output list for length of lists in the tree than use it to split the flattened tree.
Input trees were implemented, but not output trees
@anon39580149 if its any help, Iâve been dealing with oupting trees in two ways:
- serialiazing the python nested list into a string with the json module, namemly
json.dumps()
, and after hops converting it back into a nested list with a ghpyhon component that deserializes it withjson.loads()
- flattening the list in python, then passing also a length of each list in another hops output to regenerate the structure with the partition list GH component.
Either way has worked well so far, until those tree outpus in hops come around
Thanks, i used the second method
Iâm not sure how hard would it be to implement or what are your plans with CPython + Hops, but I believe that it would be really cool if there would be some way to make it more portable.
I mean it would be great to make it possible to create some sort of plugin with these Hops components, the plugin that could be released on food4rhino, and the user could easily install it and use it. Right now itâs already amazing, but for your own usage, cause you still need to run the code manually in VSC / Pycharm, and set addresses for Hops components manually.
Looking forward to see more
Packaging as gha is something I would love to implement, but it is still a ways off.
Hello guys,
First of all, congratulations for this amazing feature! Iâm loving testing it.
During those tests, I came up with something I couldnât figure:
What is the correct version to define in a pyproject.toml file?
I thought it was â1.4.0â but it didnât work.
@thomas.takeuchi Are you using poetry
to manage the environment? Seems like you originally had ghhops-server
@ 1.3.0
and then manually edited the pyproject file to 1.4.0
poetry
throws the error that you see.
Run poetry update
to update the poetry.lock
file
Oh Thatâs true!
I changed the version manually and forgot about it.
Thank you! Now it worked!
Thanks for these development, inside compute and then hops, only beneficial impacts on my work
A test to detect the list of components from image, sadly the plugin used âEasyOCRâ is very slow but work excellent.
I will try to place components in canvas based on the results.
Questions:
How we can create a Polyline with rhino3dm?
-What is the role of Hops - Compute server URLs?
-How we can clear Hops Memory Cache without open Preference everytime?
I didnât find how to create Polyline from list of points, i donât know if that available or not
Have you tried instantiating an empty polyline pline
and adding the relevant points one by one with pline.Add(pt)
?
The URL is the server address that the Hops component gets its information from.
Thanks
Where you get pline.Add(pt)?, Polyline donât have Add function
Itâs probably not documented.
Polyline derives from a Point3dList which has an Add function
https://mcneel.github.io/rhino3dm/python/api/Point3dList.html#rhino3dm.Point3dList.Add
Thatâs the only location to clear the memory cache. If you donât want to use the memory cache, then you can specify this on the Hops component itself
Thanks, in rhino3dm documentation isnât clear.
We must add x,y,z values separated
import rhino3dm as rh
poly = rh.Polyline()
x = [0,1,4]
y = [0,0,2]
z = [0,0,0]
for i in range(3):
poly.Add(x[i],y[i],z[i])
poly.ToPolylineCurve()
print (poly)
------------------------------------------
<rhino3dm._rhino3dm.Polyline object at 0x00000269E991AB70>