generative modeling for Rhino
Hi every body
i'm about to define a component for grasshopper which would produce many parametric snails and sea-shell but i'm beginner with vb.net , I produced 3 lists of data for drawing cylindrical point and my first question is how to draw list of points with this 3 kind of data ( A, R,E ) within vs2008
is there anybody who can help?
you are aware that there already is a Cylindrical Point component which takes an angle, a radius and an elevation right?
Anyway, the code inside the SolveInstance() method of that component looks like this:
Dim plane As Rhino.Geometry.Plane = Rhino.Geometry.Plane.Unset
Dim angle As Double = Double.NaN
Dim radius As Double = Double.NaN
Dim elevation As Double = Double.NaN
If (Not DA.GetData(0, plane)) Then Return
If (Not DA.GetData(1, angle)) Then Return
If (Not DA.GetData(2, radius)) Then Return
If (Not DA.GetData(3, elevation)) Then Return
If (Not plane.IsValid) Then Return
If (Not RhinoMath.IsValidDouble(angle)) Then Return
If (Not RhinoMath.IsValidDouble(radius)) Then Return
If (Not RhinoMath.IsValidDouble(elevation)) Then Return
Dim x As Double = radius * Math.Cos(angle)
Dim y As Double = radius * Math.Sin(angle)
DA.SetData(0, plane.PointAt(x, y, elevation))
If that's any help...
that really helps , is there any other source for knowing about Grasshopper SDK ? ( I know about the one which one can download from Grasshopper help menu)
or is there anyway to know about the code inside SolveInstance() method of other components??
nope, that's all there is. Most of it is .NET skills, some of it is RhinoCommon skills, and a teeny tiny bit of it is Grasshopper skills. For this kind of stuff at least, if you want to add your own data type or parameters you'll need quite a bit more Grasshopper skills, but I've tried to keep standard component development as straightforward as possible.