Grasshopper

algorithmic modeling for Rhino

Fennec - Tool to create Grasshopper Plugins in Python

Hello folks!

I’m excited to present you my new Grasshopper tool: Fennec. This tool allows you to write plugins using Python and to generate a *.gha file ready to be distributed. 

The generated GHA doesn’t require any extra DLL files.

For more information and download links, check out my blog:
http://lharchi.com/blog/fennec-create-plugins-for-grasshopper-using...

Of course, this is beta version, probably there are some bugs there, so if you find any, please let me know.

P.S: Yes, I know that this features will be provided in Rhino 6, but I started working on it before I knew it .. I recieved the newsletter two days ago.. I'm curious however to compare the performance between my method and the one in Rhino 6.

Thanks!

Views: 2585

Replies to This Discussion

Hi Ayoub

Thanks for sharing such a powerful tool,It's very cool.

I use the Fennec met a little problem,I create gha component does not succeed.

I don't know where is wrong,Thanks

_Naruto

Hi Naruto, 

Thanks for trying Fennec!

Yes you are right, there was a small problem with the files generation.

I updated the tool. It should work now :) 

Btw, It's not advised to have multiple components with the same name: When making a GHA the tool is going to try to compile all the components in the components list and it might cause some errors! (you have so many AddLines components).

Ayoub

Hi Ayoub

yes,This run a success,But i found afew small problems.

1:Component bitmap not 24X242:This Component throw errors

Thanks

_Naruto

For the first issue: It's normal. The icon won't be resized. It will use the actual PNG you

defined. Therefore, you should define a 24x24 PNG.

 

Second: Weird. Could you share the Python file you used?

python file

My python file

Attachments:

My python file

Attachments:

Hi,

The tool is encapsulating the Python code into a C# component before compiling it. This means that your Python code have access to what a C# component have access to. Therefore you can't use ghpythonlib.components because they are only usable in GhPython component.

Just remove that import from your code. 

Thanks

It's very perfect

It seems like a great tool you did. I would like to see something similar for standard .net components, as writing a gh plugin is for the most part of the time writing a dull code (which you've automated very nicely).

There is a GH plugin wizard (credits to Giulio as far as I remember) but as you can see it has limited component creation options... it was meant to automate the VS plugin setup, that why. Your tool could stand as a nice companion for this wizard. 

Here is some info on how to create single-file generator tools for VS https://msdn.microsoft.com/en-us/library/bb166817.aspx

It could be software-independent if you would just put the code into a separate file which the user would be able to add to the project in any IDE.

Thanks for your reply!

Yes, it would great if you can automate the process of creation of inputs and outputs as it's just a repetitive code writing process.

It a great idea to have such tool actually.. However I guess the majority of users are on Visual Studio.. (Never heard of any body using SharpDevelop/MonoDevelop so far), so I guess implementing it directly in VS would be enough.

I'll wait for Rhino 6 to see what changed in Grasshopper code structure...

Hi Ayoub,

This is an amazing tool!!! Thank you for sharing it and developing it!
Just a few small suggestions if I may:

- If it's not too much: support of "modes". By this I mean right clicking on a component and switching to some other mode (for example: the way Grasshopper "Cross Reference" component does).
- Add "Tree" Access would be great! I am glad you are thinking of implementing it.
- Ability to edit the "Input" and "Output Parameters" already added to the list box.
- "Remove Component" button.
- "Description" being able to handle new lines of text (I haven'tr tried if "\n" works).
- Description of error message, which occured when Build failed.


Great work, once again!

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service