algorithmic modeling for Rhino
Dear all,
Please help me for filtering a list of point3d..
I have a list of point3d and I want to REMOVE points where the distance between points is smaller than tolerance..
How do I do that in c#? I attached stupid screen shots..hope they help you understand..
Tags:
List<Point3d> points = .....;
for (int i = points.Count-1; i > 0; i--)
{
for (int k = 0; k < i; k++)
{
double distance = points[i].DistanceTo(points[k]);
if (distance <= tolerance)
{
points.RemoveAt(i);
break;
}
}
}
--
David Rutten
david@mcneel.com
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by