Grasshopper

algorithmic modeling for Rhino

Hi everybody, 

I have this very annoying problem, I cant seem to remember how to use intersections in c#(I havent been coding much lately :/). I have this old VB code where the code is as follows: 

  Dim int As intersect.CurveIntersections = intersect.Intersection.CurveCurve(ln.ToNurbsCurve.duplicatecurve, crv, .01, .01)

When writting something similar in C#, I get an error. this is how I wrote it: 

  Intersect.CurveIntersections crv_int = Intersection.CurveCurve(ln.ToNurbsCurve().Duplicate(), obj, 0.1, 0.1);

How are these two statements different ? because the VB works and the c# doesnt. I know that normally a screen dump of the error message would be helpfull, but since my windows is set up in Danish and not english, the error message is presented in Danish(super annoying!). its basically saying that: "the type or name space Intersect needs a using directive" or something along those lines, and I cant remeber what this error message means.

I know this is an easy fix, I am just to rusty to remember. 

Thank you in advance. 

Views: 372

Reply to This

Replies to This Discussion

Hey Jens,

Try typing out the full namespace path for the Intersection objects and methods. It's a little verbose but it seems to get rid of the error for whatever reason.

Rhino.Geometry.Intersect.CurveIntersections

Rhino.Geometry.Intersect.Intersection.CurveCuve

Thank you dave! btw super strange solution. 

RSS

About

Translate

Search Grasshopper

Photos

  • Add Photos
  • View All

© 2017   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service