Skip to content
New issue

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

Handle Ambiguity in RotatedRectangleDemo Positions #20

Merged
merged 2 commits into from
Jun 3, 2024

Conversation

dwmunster
Copy link
Contributor

Overview

Since the RotatedRectangleDemo is underspecified and used across the tests for several solvers, this PR adds a method that will check for the four possible outcomes and test their positions to the desired tolerance.

Details

The RotatedRectangleDemo has 7 constraints (for the rectangle):

  • Fix A at the origin
  • Line AB and BC are perpendicular
  • Line BC and CD are perpendicular
  • Line CD and DA are perpendicular
  • || AB || = 2
  • || BC || = 3
  • Line AB has an angle with the x-axis of 45 degrees

This leaves two choices for the line segment AB: above the x-axis or below the x-axis. Each of those options has two sub-options corresponding to the two orthogonal directions to the line segment AB. E.g., if AB is above the x-axis, point C can be up-and-left or down-and-right of point B.

This leaves four cases to test for, which this PR adds.

Alternatives

We could consider adding additional constraints to fully specify the rectangle. However, I think have an underconstrained example is valuable, as it helped catch an erroneous assumption of mine while working on the GaussNewtonSolver.

@TobiasJacob TobiasJacob merged commit 0a4cf5f into CADmium-Co:main Jun 3, 2024
3 of 4 checks passed
@dwmunster dwmunster deleted the bugfix/rotated-rectangle branch June 4, 2024 03:02
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.

2 participants