Grasshopper

algorithmic modeling for Rhino

Hi,

I am looking for a better understanding of the 'point_stride as Int32' and 'point_dimension as Int32' components in the OnPolyline constructor.

Such components exist for most constructors like OnNurbsCurve, RhUtil.RhinoInterpCurve, etc etc, but I have been mostly getting my way around them with trial and error. Is there some place where I can find a comprehensive explanation on these?

Also, I do understand that IOn- objects are 'Const' objects, i.e. instances/read-only objects, but then how can one associate any value to them? For instance, the RhinoInterpCurve only takes an IOn3dPointArray as input, but even if you have points in an array, how do you convert them to IOn3dPointArray?

Many thanks.

Views: 272

Replies to This Discussion

Alright, a bit more struggle and I think I've managed to figure out how IOn- objects are set to a value:

Dim Vert As New On3dVector(0, 0, 1)
Dim IVect As IOn3dVector = Vert

Looks like one needs to create a non-const version first, and then set it to the const version with an "=".
Hope thats right, and hope it helps anyone else stuck on this.

Yet to figure out the constructor components. Help appreciated :)
Do you have the Rhino dotNET help file? Even though its not necessarily the easiest thing to use, it does have all of the classes and methods that are available. Also, it might be worth it to check out the Dot Net essentials page on the wiki as that answers a few questions as well

http://en.wiki.mcneel.com/default.aspx/McNeel/DotNetPluginEssential...

Lastly I have no idea what you're talking about in regards to the OnPolyLine constructors, there are only three and none of them have anything to say about point_stride or point_dimension, so you may need to further explain what you're seeing or the issue your having with the OnPolyLine constructor
Thanks Damien,

I dont have the Rhino.NET help file, but I'll dig it out... sounds like it should be what I am looking for. I did look through the McNeel Wiki - its very good, but very brief.

About the OnPolyline constructor, try this:

Dim myPoly as New OnPolyline
myPoly.Create(

The drop down that appears once you open the parenthesis suggests various methods of creating an OnPolyline. The parameters it asks for are:

{point_dimension as Int32, bRational as Boolean, point_stride as Int32, points as Single[]}

This is what my original question relates to.
Just discovered the .NET SDK help. It's got all the answers I was looking for.. thanks Damien.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service