algorithmic modeling for Rhino
Hello,
I am working on my first component using Visual Studio 2012 and the GH Assembly Addon found here:
https://visualstudiogallery.msdn.microsoft.com/9e389515-0719-47b4-a...
The Archimedean Spiral code example that comes with the GH Assembly addon, linked above, and the Grasshopper SDK Help propose two different means of declaring start values for the component inputs--
The example in the GH Assembly Addon uses:
Plane plane = Plane.WorldXY;
Which would suggest using "Plane plane = null;" for initializing the object.
The Grasshopper SDK Help file recommends using:
Rhino.Geometry.Circle circle = Rhino.Geometry.Circle.Unset;
Which method for initializing variables is preferred? Why doesn't Visual Studio recognize the ".Unset" method?
Thanks,
Aaron
Tags:
In a way it doesn't matter how you initialise variables. The DA.GetData() method will return false if the value wasn't assigned from an input, and that's your queue to exist the SolveInstance method.
And even if the DA.GetData method returns true, you still need to check whether the value you got is legal.
Great! Thanks, David. Super helpful.
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