Grasshopper

algorithmic modeling for Rhino

Hi,

Is there any method that calculates multiples curve - curve proximity not just one?

Views: 1145

Replies to This Discussion

I don't think it's exposed in any component, but it's easy enough to code up curve intersections using an explicitly set tolerance:

private void RunScript(Curve A, Curve B, double tol, ref object PtsA, ref object PtsB)
{

var ptsA = new List<Point3d>();
var ptsB = new List<Point3d>();

var curveIntersections = Rhino.Geometry.Intersect.Intersection.CurveCurve(A, B, tol, RhinoDoc.ActiveDoc.ModelAbsoluteTolerance);

for (int i = 0; i < curveIntersections.Count; i++)
{
ptsA.Add(curveIntersections[i].PointA);
ptsB.Add(curveIntersections[i].PointB);
}

PtsA = ptsA;
PtsB = ptsB;

}

Thanks,

This is probably the one moment in Rhino, when tolerances works for the user ;) 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