Grasshopper

algorithmic modeling for Rhino

I am trying to add hatch objects to closed curves in vb .net. I believe I need to provide a pattern_index value but dont know where to query that from. Can I provide a name instead?

Dim hatch As New OnHatch
hatch.Create(onplane.World_xy, "solid")

How do I assign it to curves? Is the following correct?

For Each curve As OnCurve In cevs
curve.Transform(hatch)

Thanks for all the help and attention!

Views: 960

Replies to This Discussion

Hi Sameer,

looks like it's more involved then I remembered:

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

--
David Rutten
david@mcneel.com
Poprad, Slovakia
And the examples are in C++ and C# :(

Thanks for pointing to it... I will keep trying.
There is a C# to VB.NET convert that might be useful in these cases, and in the instances I've used it, the converted code is pretty good.

http://www.developerfusion.com/tools/convert/csharp-to-vb/

any chance this might be easier using Python?

sth like:

import rhinoscriptsyntax as rs
a = rs.AddHatch(myCrv)

 

....

The python version that Daniel posted has to be the easiest/shortest answer, but if you want to use VB.NET I updated the wiki sample to a RhinoCommon version.

http://wiki.mcneel.com/developer/rhinocommonsamples/hatchcurve

 

Until the next V5 beta or V4 version of Grasshopper, you will need to use a different version of the Hatch.Create function (which takes a list of curves instead of a single curve).

Thanks,

-Steve

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2021   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service