algorithmic modeling for Rhino
Hi,
new to C#, this is like the fifth issue I've posted about. Be gentle.
So, I have a matrix of cubes, and a point cloud and a point. What I am trying to do is identify which cube the point sits in. From there I am trying to use the identified Breps vertices to find the closest 8 points from the point cloud.
List<Surface> CubeFaces = new List<Surface>();
double inside = 0.001;
foreach(Brep cube in CubeGrid) {
bool IsInside = cube.IsPointInside(Agents, inside, true);
if(IsInside == true) {
Point3d[] vertices = cube.DuplicateVertices();
} else {
/////
}
}
The first part, identifying the cube is sorted. Getting the vertices is also done I think, but because it is returned as an array, a thing I still don't fully understand how to use (though I'm pretty sure it requires a foreach?), I have no idea how to use these vertices to find the closest points.
Cheers
Tags:
See attached (modify it accordingly in order to suite your goals)
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