algorithmic modeling for Rhino
Hello,
I want to build GH forms with customized xml string:
<param>
<name>curves</name>
<count>*</count>
</param>
<param>
<name>clip</name>
<count>1</count>
</param>
I want to know if it is possible to use the class GH_Slider, GH_TextBoxInput, ... in a GH_Component ? Or a GDI+ controls library
thank you...
Tags:
Hi jmv,
I'm confused. I don't see the immediate connection between "GH", "forms", "xml", "GH_Component" and "GDI+ controls library".
Are you trying to create a System.Windows.Forms.Form using Grasshopper interface elements (such as the colour picker, digit scroller or slider)?
Are you trying to create a new IGH_DocumentObject which is located on the Grasshopper canvas and which has a customized interface (such as Text Panel, Number Slider or Boolean Toggle)?
Are you trying to generate this at runtime from xml, or at compiletime?
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Hello
I'm French and I was a bad student in English class (sorry).
I am a designer in architecture. I make models with stereolithography.
use Grasshopper to develop my own automation.
My problem is with great descriptions in Grasshopper.
I use cluster but the number of parameters entering makes the definition unreadable.
I want to combine the parameters, functions and cluster in this: (Like blender nodes).
If possible, I would create this interface from an XML definition.
I am a beginning programmer and I would like to use GH controls or an external library.
I can not find much help on GH programming on the internet.
Thank you.
Ok, I think I'm starting to understand. The bad news is there's nothing in Grasshopper that does this, or even half of this. So someone is going to have to spend a lot of time writing a lot of code.
Grasshopper UI is fairly modular, so at least it's not a from-the-ground-up job, but obviously making an interface that is created on the fly will be more work than a hard-coded one. It is possible to override the way components look and behave. The Gradient and Legend objects are good examples of this. They are regular GH_Component derived classes but they override the display and layout and mouse events. But there's no 5-sentence introduction to this, it's a lot of work.
"I can not find much help on GH programming on the internet."
True, there is very little out there if you want to go beyond regular component development. The Grasshopper SDK is commented, but that is no substitute for an explanation.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Ok, thank you for the answer.
I will turn to external windows forms interfaces.
thanks
Btw cluster with interface will be really cool thing
Hello!
I progress in my user interface.
But i have some problem for access at the value of a IGH_Goo.
This when i don't know if i have a GH_Point, a GH_Number, a GH_...
Please see this code:
Public Class I_GHView
Inherits C_View
Public Overrides Sub loadData(ByRef V As Object)
MyBase.loadData(DirectCast(V, IGH_Goo).Value)
End Sub
End Class
How access to the value when i have just a IGH_Goo type ?
Thank you.
There's three ways to extract a type-safe value from IGH_Goo, and all three can be used together.
[1] is easiest, but it doesn't really allow you to figure out what type of data you're dealing with, only whether that data can be converted into some other type. [2] is a last ditch effort, only to be used when everything else fails, basically, it's the only way external data types can play ball with other Grasshopper data, as the conversion to and from these 3rd party types cannot be handled by GH_Convert. [3] is a lot of typing, but if you're only dealing with a limited subset of possible types, then I suggest you start there. Basically, you test to see whether your IGH_Goo is of type GH_Point, or GH_Number, or GH_String etc. etc. One you know the real type, you can cast it and access the local value.
--
David Rutten
david@mcneel.com
Vienna, Austria
Thank you David.
I think change my process structure... :(
Yes It's possible with this: (.NET 4)
Dim D As IGH_Goo
...
CTypeDynamic(D, D.GetType()).Value
Hi jmv,
Verry intersting... i'm french and works to interfacing grasshopper.
link: http://www.grasshopper3d.com/group/rhinobridges
I worked on interface issues for grasshopper.
It would be interesting to get in touch, and if possible share both our knowledge.
David thanks for your reply.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by