Grasshopper

algorithmic modeling for Rhino

Hello,

in GHPython, I can find the closest points of two curves like so:

a = rc.Geometry.Curve.ClosestPoints(crv1,crv2)

How do I do this in C#? I'm trying:

List<object> a = Rhino.Geometry.Curve.ClosestPoints(crv1,crv2);

A = a;

...but it says that the method doesn't take 2 arguments. I thought it would work the same way regardless of whether I'm using RhinoCommon in Python or C#?

Cheers,

Max

Views: 1064

Attachments:

Replies to This Discussion

It should be more like this:

Point3d pt1, pt2;

if (crv1.ClosestPoints(crv2, out pt1, out pt2))

{

   A = pt1;

  B = p2;

} else {

   // something went wrong

}

Interesting! 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