Grasshopper

algorithmic modeling for Rhino

i am a  beginner of VB.net of grasshopper(GH)
when i are learning the vb.net component , i am facing the following problem,
i follow the GH primer , typing the following script,but it does not work in the GH 0.7.
(i know the GH primer is for the old version of GH ,some of the syntax is changed.
where can i get a reference for that changing? Is that in the rhinocommon 's online help?
i am not sure about that. please tell me )

this is the original  script.

i did a litter change, but it  still dose not work,


it said the problem is about some key worlds 



i hope somebody can help me to fix out the problem~~ 


thanks

ceason

Views: 276

Replies to This Discussion

Hi ceason,

the script you posted sets the weight of all control-points to a certain value. This is pointless. The weights of control-points are relative values.

Anyway, I've rewritten the script in RhinoCommon (and added a "Step 2" to the loop to make it interesting):

Dim nc As NurbsCurve = NurbsCurve.Create(True, 3, CPoints)
For i As Int32 = 0 To nc.Points.Count - 1 Step 2
   Dim cp As ControlPoint = nc.Points(i)
   cp.Weight = w
   nc.Points(i) = cp
Next
A = nc


--
David Rutten
david@mcneel.com
Poprad, Slovakia
HI, David!

Thank you for your answer is very usefully. And your script is very simple not like the original one. As a beginner, i learn something from it.

cheers
ceason

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service