Calculate Smart Group of boxes with min max points

故事扮演 提交于 2021-01-28 04:09:36

问题


I have List of boundary boxes with min max point for example:

    public class BoundaryVolume {
    
        public Point3D min;
        public Point3D max;
    }

BoundaryVolume  Box1 = new BoundaryVolume ( new Point3D (5,10,15), new Point3D (30,50,100));
BoundaryVolume  Box2 = new BoundaryVolume ( new Point3D (-30,-10,-15), new Point3D (30,50,100));
BoundaryVolume  Box3 = new BoundaryVolume ( new Point3D (225,-50, -15), new Point3D (1000,0 , 0));
BoundaryVolume  Box4 = new BoundaryVolume ( new Point3D (0,0,0), new Point3D (1,1,1));
List<BoundaryVolume> = new List<BoundaryVolume>().add(Box1).add(Box2).add(Box3).add(Box4)

I want to group recursively this boxes to group of groups in a smart way calculation

Geometries geos2 = new Geometries(A, B, C);
Geometries geos3 = new Geometries(D, E);
Geometries geos1 = new Geometries(geos2, F, geos3);

Box that nearby another box make them in same box. How can I do it

What I need is to get list of Boxes and to make a List of lists. demo of my need is in attach image.

来源:https://stackoverflow.com/questions/62548949/calculate-smart-group-of-boxes-with-min-max-points

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!