algorithmic modeling for Rhino
From what I've seen, this seems to me that Grasshopper scripting components aren't built to support this, but I thought I'd mention it anyways. It would be nice to be able to access Grasshopper-specific algorithms through the scripting interface. For example, having a gh.Voronoi(points,radius,box,plane) which returns [curves], or gh.Populate2D(), etc.
Tags:
Voronoi actually is accessible. The Grasshopper.Kernel.Geometry namespace contains ConvexHull, Delaunay, Voronoi and subdivision trees. Due the horrendous autocompletion features of QWhale (our code text editor) it will be difficult to figure out how to call those methods.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
If I am not mistaken, they also do not show up in the GH SDK?
Yeah, the namespace is poorly commented and not included in the SDK docs. I suppose having it there even without comments is better than nothing though.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
I suppose we (RMA) need to decide whether anything in the Grasshopper.Kernel.Geometry namespace warrants moving into RhinoCommon. If that is the case it would reach a far wider developer base and will also force me to rethink the approach and provide decent comments.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
I for one would vote for it. I am not proud of the things I've had to do to get these to work ;) I think in general these are very useful algorithms which would be (and are) useful outside of GH. Maybe it's time to rework the Rhinocommon / GH SDK divide? Seems the GH SDK should be about extending Rhinocommon to a visual programming logic and not necessarily about solvers and algorithms. This is of course said knowing there is a very big grey area...GH uses algorithms and solvers which are key to its operation as a system which describes a digital model. I guess I mean Delaunay/Voronoi/etc solvers...
A big +1 on this one. I have been trying to figure out how to implement the Grasshopper.Kernel.Geometry classes in Python scripts without much luck. So having things like Convex Hull, Delauney, Voronoi and OC Tree available directly via RhinoCommon would indeed be great.
I think I figured out how to do a 2D Voronoi using the Grasshopper.Kernel.Geometry classes in Python (in the sense that it works, but may not be the "correct" way of going about it!). In case anyone needs to do something similar, please find an example in the attachment.
Ps. Can we post source code here on the forum with proper indenting etc. I know WordPress has code tags. Perhaps something similar exists here?
I updated the Voronoi bit to use the "connectivity" function instead of "brute force". This appears to be significantly faster! Also cleaned it up a bit and added a boundingbox for the Voronoi diagram outline.
Hi Anders,
Thanks a lot for the Voronoi Definition in python. Since I was trying to include a Voronoi function in a Loop it is exactly what I was trying to implement. Unfortunately I don't have a very good understandig of how the Voronoi function is defined in Grasshopper. Right now it seems that it creates a cell Distribution in the xy plane for any Points. I was trying to create the voronoi structure in a given plane (not xy). It would be very helpful if you have a hint on how to do this (if it is possible).
Hey, I'm tring to find some who knows abot these libraries,
do you know how to use Grasshopper.Kernel.Geometry.ConvexHull ??
or more specifically, this is my question:
http://www.grasshopper3d.com/forum/topics/convexhull-using-python-i...
It is hard to find something about it in the internet :(
Thanks!
Hey can you help me with the convex hull function?
I'm lookin for answers in the internet and there is nothing about it :(
to be more specific, this is my question:
http://www.grasshopper3d.com/forum/topics/convexhull-using-python-i...
Welcome to
Grasshopper
Added by morteza khorsand 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by