generative modeling for Rhino
Here's a quick overview along with a link for download
Nice work. Looks really cool. One quick question. I just updated to the latest Rhino 5.0 Beta and your .gha file... and your icon for the Python component is missing. As far as I can tell, it still works the same... just no icon. Any ideas? The reason I ask is that all of my Firefly icons for Rhino 5 are also missing. The load perfectly in Rhino 4... just not in 5. I have switched over to using: protected override Bitmap Icon method (instead of the previously used protected override Bitmap Internal_Icon_24x24) Although the weird thing is that some of my other .gha libraries load just fine with icons (kangaroo). Some of these are older installs so they probably haven't switched over to the new override method... but I was just curious if this was something that hadn't been implemented in Rhino 5 yet... or if I was doing something wrong. Let me know if you have any ideas.
Thanks for the words of encouragement Andy!
That is strange that the icon is not being loaded. Rhino 5 does use .NET 4 so there are a few subtle differences over Rhino 4 which uses .NET 2. Maybe the resource finder is not working quite as expected. Here's our code for displaying the Bitmap
I am seeing the icon in both release and debug builds on my computer, so this is going to be difficult for me to repeat.
If you can repeat the icon missing bug in a debug build, try just making a bitmap on the fly by doing something like creating a new bitmap of the appropriate size and filling it with the color red. If you end up with a red square in Grasshopper, then at least we know the bug has something to do with extracting bitmaps from embedded resources in your gha.
in Grasshopper 0.8.009, the Internal_Icon_24x24 property is obsolete.
Now, the property is simply called Icon. Can it be that in your Rhino 5 there is an older version of Gh loading?
Great news Andy. Scott Davidson here in the office is able to repeat the icon bug on his computer. I'll run a few tests and let you know what I can figure out.
Turns out Scott was just a slacker and wasn't using the latest and greatest version of Grasshopper. Once we updated his computer to Grasshopper 0.8.0010, the icon started showing up.
Are you a slacker too? :)
Thanks for sharing this Python Component. I just downloaded the file and try to compile it. After linking the libraries to my local files (GH_IO.dll , Grashopper.dll, RhinoCommon.dll). I got two errors saying Missing the reference for Extrusion (in the CustomTable.cs). Any idea how can I fix this?
You need to reference the RhinoCommon that ships with Rhino5. This DLL is in the same directory as the Rhino 5 executable.
the second line should be:
a = Brep.CreateFromLoft([x, y], Point3d.Unset, Point3d.Unset, \
Python is dynamic, so you do not need to define the type of the list. Type[T1] has a special meaning in IronPython, but we do not need it. There are more notes in the file.
Hope it helps,
PS: Please also feel free to open new discussions!
|I am trying the NurbsSurface.CreateNetworkSurface Method|
Thanks,Giulio!But I got another question,sorry...I just change a little of one of the python script samples,but can get any result...
Can you help?
Nice setup, bluelotus,
but be careful with indenting, because the last line in the script is not running because it is inside the last function.
I changed the script a bit and made it usable both in the Python editor and in the component.
Please, if you have more questions about parametric function sampling, start a new discussion.
Hope it helps,