Skip to content

BoundingBoxDataPointsFilter possible bug #600

@lingerer

Description

@lingerer

In BoundingBox.cpp line 80:

  const bool x_in = (point(0) > xMin && point(0) < xMax);
  const bool y_in = (point(1) > yMin && point(1) < yMax);
  const bool z_in = (point(2) > zMin && point(2) < zMax) || nbRows == 3;
  const bool in_box = x_in && y_in && z_in;

const bool z_in = (point(2) > zMin && point(2) < zMax) || nbRows == 3;
which nbRows means dimensions.
This code means if the point cloud is 3d,any z range is useless and will be in the box.

The purpose of the code should be if nbRows == 3,let z range involve, otherwise let it be true.

So the code should be:
const bool z_in = (point(2) > zMin && point(2) < zMax) || nbRows != 3;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions