Search code examples
pythonpython-3.xnumpypoint-cloudsbounding-box

How do I get all 3d points in a numpy array that are not within a inner bounding box, but between the outer bounding box?


I have a Numpy array for 3d points in the format (n, 3), where n is the number of points, and column 1 is the x coordinate, column 2, is the y coordinate, and column 3 is the z coordinate. How do I get all the point in the outer bounding box, but not in a inner bounding box?


Solution

  • How are the orientations of both boxes? Are the axis parallel to x, y, z?

    In this case it is not so difficult.

    1. Find out if the point is in the x, y, z range of the outher box
    2. if yes: do the same test for the inner box

    Just let me know when you need the code