Skip to content

Align concave polygon normals with boundary winding - #1532

Open
ArianMoeini wants to merge 1 commit into
compas-dev:mainfrom
ArianMoeini:fix/concave-polygon-normal
Open

ArianMoeini wants to merge 1 commit into
compas-dev:mainfrom
ArianMoeini:fix/concave-polygon-normal

Conversation

@ArianMoeini

Copy link
Copy Markdown

Summary

  • Use the full polygon boundary to orient its best-fit plane.
  • Fix concave polygons whose first edge makes the old centroid triangle point against the polygon winding.
  • Cover every starting vertex and both winding directions in a regression test.

Closes #1487.

Tests

  • PYTHONPATH=src:/private/tmp/compas-test-deps python -m pytest tests/compas/geometry/test_polygon.py -q — 15 passed.
  • git diff --check — passed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Polygon.normal with normal_polygon instead of normal_triangle?

1 participant