Grasshopper

algorithmic modeling for Rhino

Hi everyone-

I'm having a hard time figuring out how Rhinocommon works with surface/curve intersections.  Can anyone provide a quick sample of the syntax?

I'm just used to the arrOnX_Events used in the old SDK, and can't seem to wrap my head around this one, or find any examples to learn from.

Private Sub RunScript(ByVal crvInput As Curve, ByVal srfInput As Surface, ByRef A As Object) 

Dim dblTol as Double = 0.01
Dim dblOvlTol as Double = 0.01

Dim crvOut As Rhino.Geometry.Intersect.Intersection.CurveSurface

crvOut = Rhino.Geometry.Intersect.CurveIntersections(Rhino.Geometry.Intersect.Intersection.CurveSurface(crvInput, srfInput, dblTol, dblOvlTol))

End Sub

thanks!

Dave

Views: 2214

Replies to This Discussion

Hi Dave,

Hope you're well.

Hope the code below helps, sorry I've altered to c# syntax but should be easy to translate.

Let me know if it's not what you're trying to do.

Cheers,

Jon

Rhino.Geometry.Intersect.CurveIntersections ci = Rhino.Geometry.Intersect.Intersection.CurveSurface(crvInput, srfInput, dblTol, dblOvlTol);
for (int icounter = 0; icounter < ci.Count; icounter++)
{
Rhino.Geometry.Intersect.IntersectionEvent i = ci[icounter];
if(i.IsPoint)
xxxxx

}
See attached.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Attachments:
You guys are amazing. Thanks so much!

oh I needed this so much, it works! ;) thanks.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service