-
Notifications
You must be signed in to change notification settings - Fork 177
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(navisworks) CNX-7436 navisworks is sending xzyz flip #3107
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit updates the code to set or reset the IsUpright flag instead of the ElevationMode flag for model orientation. The changes are made in multiple files, including ConverterNavisworks.cs and ConverterNavisworks.Geometry.cs. The SetModelOrientationMode method is modified to use the IsUpright flag instead of checking vector matches. Additionally, the PrimitiveProcessor class is updated to use the TargetUpVector method instead of SetElevationModeVector method.
…et units in BoxToSpeckle method.
- Simplify variable names for better readability - Use explicit conditions instead of negating the original condition
This commit adds event handlers to the `ConnectorBindingsNavisworks` class. The `RegisterAppEvents` method now registers event handlers for changes in the document filename, selection sets, and model collection. A new method `IsInvalidOrClearDocument` has also been added to evaluate if a sender object from an event handler is a valid Document. Finally, `NullifyCommitCache` has been implemented to reset the commit cache when necessary.
JR-Morgan
approved these changes
Dec 13, 2023
// TODO: do both need to match or would UP be enough? | ||
ElevationMode = upMatch && rightMatch; | ||
} | ||
private static void SetModelOrientationMode() => IsUpright = VectorMatch(Doc.UpVector, s_canonicalUp); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
JR-Morgan
pushed a commit
that referenced
this pull request
Dec 19, 2023
* Simplify methods consistently using lambda expressions * Remove commented out code for model collection change event * Set or reset the IsUpright flag for model orientation This commit updates the code to set or reset the IsUpright flag instead of the ElevationMode flag for model orientation. The changes are made in multiple files, including ConverterNavisworks.cs and ConverterNavisworks.Geometry.cs. The SetModelOrientationMode method is modified to use the IsUpright flag instead of checking vector matches. Additionally, the PrimitiveProcessor class is updated to use the TargetUpVector method instead of SetElevationModeVector method. * Update ConverterNavisworks.Geometry.cs to use a constant for the target units in BoxToSpeckle method. * Refactor geometry path comparison logic - Simplify variable names for better readability - Use explicit conditions instead of negating the original condition * Modify global event handlers for Navisworks document events This commit adds event handlers to the `ConnectorBindingsNavisworks` class. The `RegisterAppEvents` method now registers event handlers for changes in the document filename, selection sets, and model collection. A new method `IsInvalidOrClearDocument` has also been added to evaluate if a sender object from an event handler is a valid Document. Finally, `NullifyCommitCache` has been implemented to reset the commit cache when necessary. * whitespace
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description & motivation
In the end a simple fix despite chasing edge cases around the houses.
Changes:
s_canonicalUp
to replace a using on every conversioncanonicalUp
is made, no longer makes reference tocanonicalRight
Screenshots:
Before:

After:

Validation of changes:
Previous example models have been retested when the first XY corrections were made. These continue to be correctly translated.
Checklist: