algorithmic modeling for Rhino


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. 


Views: 202

Reply to This

Replies to This Discussion

See attached (modify it accordingly in order to suite your goals) 







  • Add Photos
  • View All

© 2018   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service