We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug Tried to compute a xy oriented minimum bounding box. Sometimes it works, sometimes the base rectangle appears to be mirrored.
To Reproduce Steps to reproduce the behavior:
# requirements: compas==2.8.1 # requirements: numpy from compas.datastructures import Mesh from compas.geometry import bbox_numpy, Point from compas.scene import Scene import numpy as np file_path = "..." compas_mesh = Mesh.from_obj(file_path) compas_pts, _ = compas_mesh.to_vertices_and_faces() arr = np.array(compas_pts) minimum_area_rect = bbox_numpy.minimum_area_rectangle_xy(arr) pts = [] for pt in minimum_area_rect: pts.append(Point(pt[0], pt[1], 0.0)) scene = Scene() scene.add(pts[0]) scene.add(pts[1]) scene.add(pts[2]) scene.add(pts[3]) a = scene.draw()
Expected behavior
This:
Unexpected behavior
It seems like the minimum area rectangle is mirrored. The only change is moving the mesh on the canvas, with all coordinates remaining positive.
Expected goal
xy_ombb rotated to align with the coordinate system.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered:
@dominikreisach thanks for reporting. I think this might be a bug and believe I was able to find the cause. Opened a PR with a fix.
Sorry, something went wrong.
chenkasirer
Successfully merging a pull request may close this issue.
Describe the bug
Tried to compute a xy oriented minimum bounding box. Sometimes it works, sometimes the base rectangle appears to be mirrored.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
This:
Unexpected behavior
It seems like the minimum area rectangle is mirrored. The only change is moving the mesh on the canvas, with all coordinates remaining positive.
Expected goal
xy_ombb rotated to align with the coordinate system.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: