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

fix: Make orientation for open office consistent #91

Merged
merged 2 commits into from
Jan 12, 2024

Conversation

serenayl
Copy link
Contributor

@serenayl serenayl commented Jan 10, 2024

If edges are all roughly the same length, fall back to the first one to determine orientations


This change is Reviewable

Copy link
Member

@andrewheumann andrewheumann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: 1 of 1 approvals obtained, 1 unresolved discussion (waiting on @serenayl)


LayoutFunctions/LayoutFunctionCommon/WallGeneration.cs line 643 at r1 (raw file):

            // If all the edges are essentially equal, use the first one.
            // TODO: use a real orientation when it becomes part of the data.
            if (edgesOrderedByLength.Last().Length - edgesOrderedByLength.First().Length < Vector3.EPSILON)

very minor — we can use minSeg instead of edgesOrderedByLength.Last() here to avoid double-enumeration.

@serenayl serenayl merged commit 9a50043 into master Jan 12, 2024
1 check passed
@serenayl serenayl deleted the fix-ambiguous-open-office branch January 12, 2024 17:54
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.

None yet

2 participants